text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Immediate one time task with Quartz. <p>I am using a <a href="http://www.quartz-scheduler.org" rel="noreferrer">Quartz</a> to build a clustered ThreadPool and I have number of tasks that run at various times. What is the best way to run 1 task immanently and only once on the clustered ThreadPool. I know I can set the task to a high priority. But what is the best way to register a "one shot" task?</p>
0non-cybersec
Stackexchange
How can we ensure that a space is a subset of locally convex topological space?. <p>I am looking for fast ways to ensure that a given set is a subset of topologically locally convex space.<br> I have already read the posts <a href="https://math.stackexchange.com/questions/216669/seminorms-in-locally-convex-spaces">post1:seminorms-in-locally-convex-spaces</a>, <a href="https://math.stackexchange.com/questions/233693/locally-convex-space-via-seminorms">locally-convex-space-via-seminorms</a>, <a href="https://math.stackexchange.com/questions/312756/topological-vector-space-locally-convex">post2:topological-vector-space-locally-convex</a> and also <a href="http://en.wikipedia.org/wiki/Locally_convex_topological_vector_space" rel="nofollow noreferrer">wikipage</a>. However I am still not sure if semi-norm is only fast way to ensure the locally convexity and how can we ensure that a space (or subset of a topological vector space) has semi-norm or not! For example I am not sure that if the following convex sets has semi-norm</p> <ol> <li>Probably space over $\mathbb{R}^2$<br/></li> <li>The subspace of continuous probability density function over the above probability measure space</li> </ol>
0non-cybersec
Stackexchange
Doesn't seem very safe to put your scanned passport online, or is this just an example?.
1cybersec
Reddit
Ubuntu 18.04 Keyboard Unresponsive for ~2 minutes after boot. <p>After Boot or Restart</p> <p>The keyboard is unresponsive for a little over 2 minutes on Ubuntu 18.04.4 LTS (updated)</p> <p>I have tried running</p> <pre><code>sudo apt-get install xserver-xorg-input-all startx </code></pre> <p>after the keyboard becomes responsive, but upon boot &amp; reboot, it will remain unresponsive for 2 minutes again. </p> <p>I have tried these solutions:</p> <p><a href="https://askubuntu.com/questions/1033767/keyboard-not-working-after-update-to-18-04">Keyboard not working after update to 18.04</a></p> <p><a href="https://unix.stackexchange.com/questions/174091/mouse-and-keyboard-not-working-in-ubuntu-14-04">https://unix.stackexchange.com/questions/174091/mouse-and-keyboard-not-working-in-ubuntu-14-04</a></p> <p><a href="https://stackoverflow.com/questions/60105862/laptop-keyboard-not-working-properly-ubuntu-18-04">https://stackoverflow.com/questions/60105862/laptop-keyboard-not-working-properly-ubuntu-18-04</a> </p> <p>Please do not give me a solution that requires the use of the keyboard every time i log in, to get the keyboard to work. Thank you</p>
0non-cybersec
Stackexchange
Facebook account got deleted for no reason, without warning or notification. <p>I don't know if this is the right place to ask this, but my friends facebook account got deleted. Whats the best way of enquiring about this as they aren't replying to emails!</p>
0non-cybersec
Stackexchange
Add cell from multiple spreadsheets in Google Spreadsheets. <p>I have a Google spreadsheet that contains 30 sheets (each day for the month of September). I want to add cell K36 from each sheet, but I don’t know how. How can I do this?</p>
0non-cybersec
Stackexchange
The Nintendo Switch is Overpriced.
0non-cybersec
Reddit
Ambiguity in calling function. Implicit conversion?. <pre><code>#include &lt;string&gt; void f(std::string&amp;&amp; rref){ } void f(std::string s){ } int main() { std::string s = "s"; f(std::move(s)); } </code></pre> <p>This code causes an ambiguity and I don't know why, perhaps, I made explicit conversion to <em>rvalue</em> reference. </p> <p>My idea is that <em>rvalue</em> reference can be implicitly converted to just <em>lvalue</em>. But I am not sure. Please explain.</p>
0non-cybersec
Stackexchange
Finding cardinality of sets composed of a difference set $\bar A= \{x-y \ | \ \forall x,y\in A \}$. <blockquote> <p>For a non empty set <span class="math-container">$A$</span> of real numbers, let <span class="math-container">$\bar A= \{x-y \ | \ \forall x,y\in A \}$</span> be the difference set of <span class="math-container">$A$</span>.</p> <p>Find the cardinality of the following sets:</p> <ul> <li><p><span class="math-container">$B= \{A\in \mathcal P(\mathbb Z) | \bar A\subseteq(-1,1) \}$</span></p> </li> <li><p><span class="math-container">$C= \{A\in \mathcal P(\mathbb R) | \bar A=\{-1,0,1\} \}$</span></p> </li> <li><p><span class="math-container">$D= \{A\in \mathcal P(\mathbb R) | \bar A\subseteq(-1,1)\}$</span></p> </li> </ul> </blockquote> <p>Okay, so first let's see if I understand the notations, <span class="math-container">$B$</span> has a cardinality of <span class="math-container">$\aleph_0$</span> because all the elements must be equal to themselves <span class="math-container">$(x=y)$</span> and we know that <span class="math-container">$|\mathbb Z|=|\mathbb N|=\aleph_0$</span>.</p> <p>For <span class="math-container">$C$</span> for all <span class="math-container">$x,y$</span> we must have <span class="math-container">$x-y\lt 2$</span>, I see that the cardinality must be <span class="math-container">$\frak c$</span> but I don't know how to show it.</p> <p>The last one, <span class="math-container">$D$</span>, I'm not sure how to read it but it must be at least <span class="math-container">$\frak c$</span>. I don't know how to show it.</p>
0non-cybersec
Stackexchange
JSON in C#; Sending and receiving data. <p>I am trying to make a desktop client for Request and Response application.</p> <p>I am able to do GET requests easily. But I was wondering whether someone could help me work out how I could do a JSON request and response. and parse it to a string, from there I can workout how to slit it all up</p>
0non-cybersec
Stackexchange
Conan o'brien knows how to dance.
0non-cybersec
Reddit
Equivalence relation by the symmetric difference of sets. <p>Let <span class="math-container">$A, B$</span> subsets of <span class="math-container">$X$</span> and <span class="math-container">$\mathbb P(X)$</span> the power set, we define the following equivalence relation on <span class="math-container">$\mathbb P(X)$</span>:</p> <p>Let <span class="math-container">$ S\subseteq X$</span> a fixed subset of <span class="math-container">$X$</span> and <span class="math-container">$A$</span>~<span class="math-container">$B$</span> <span class="math-container">$\iff A△B \subseteq S$</span> </p> <p>Prove that is is an equivalence relation and find the class of <span class="math-container">$X$</span> and <span class="math-container">$S$</span></p> <p>My work:</p> <p>I have already shown that the relationship satisfies reflexivity and symmetry, all this is justified respectively by the fact that the empty set is a subset of any set and the symmetric difference is commutative.</p> <p>My problem is with transitivity, I do not know how to do it, that is when I try to use it for the definition of symmetric difference I fall in many cases. There is some way to test transitivity using only operations between sets. And with respect to the equivalence class of <span class="math-container">$S$</span>, I showed that they are all subsets of <span class="math-container">$X$</span> contained in <span class="math-container">$S$</span>. But with respect to the equivalence class of $X4 I do not see what it is.</p> <p>Any help would be useful. Thank you!</p>
0non-cybersec
Stackexchange
MFW I play Mario Kart 8 online....
0non-cybersec
Reddit
sqlite : Fatal error: Call to undefined function sqlite_escape_string(). <p>I use a script that requires SQLITE,</p> <p>On my previous host, it worked. On localhost it works. On my new dedicaced server, it doesn't.</p> <p>I use PHP5 of course, you can access <a href="http://gamer-certified.com/phpinfo.php" rel="nofollow noreferrer">phpinfo() of the server</a>.</p> <p>Could you tell me what/how (apt-get?) to install correctly sqlite to avoid this fatal error?</p>
0non-cybersec
Stackexchange
A man who was gored by a bison in June took a date back to the same place - only for her also to be attacked..
0non-cybersec
Reddit
Symfony2 - translatable field - The class &#39;Gedmo\Translatable\Entity\Translation&#39; was not found in the chain configured namespaces. <p>I'm trying to translate some fields of my entity and I have the following error when I'm try create an object...</p> <pre><code>&lt;?php namespace XXXX\Entity; use Gedmo\Mapping\Annotation as Gedmo; use Doctrine\ORM\Mapping as ORM; use Gedmo\Translatable\Translatable; use Doctrine\Common\Collections\ArrayCollection; /** * Line * * @ORM\Table() * @ORM\Entity(repositoryClass="XXXX\Entity\LineRepository") */ class Line implements Translatable { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @Gedmo\Translatable * @ORM\Column(name="name", type="string", length=255) */ private $name; /** * Get id * * @return integer */ public function getId() { return $this-&gt;id; } /** * Set name * * @param string $name * @return Line */ public function setName($name) { $this-&gt;name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this-&gt;name; } public function setTranslatableLocale($locale) { $this-&gt;locale = $locale; } } </code></pre> <p>And the error:</p> <pre><code>[Doctrine\Common\Persistence\Mapping\MappingException] The class 'Gedmo\Translatable\Entity\Translation' was not found in the chain configured namespaces </code></pre> <p>I'm using Symfony 2.5, but in 2.4 occurs too. Any idea how I can solve this?</p>
0non-cybersec
Stackexchange
A male lion's head going after cheetah.
0non-cybersec
Reddit
Into the Abyss (Werner Herzog)- The film profiles Michael Perry, a man on death row convicted of murdering....
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
[LPT Request] How to avoid hand cramps when writing an exam/essay?. Super frustrating in time sensitive exams
0non-cybersec
Reddit
i made this kite for my arts project, what do you guys think?.
0non-cybersec
Reddit
Why `distinct` and `count` operations generate `&quot;op&quot;: &quot;command&quot;` in system.profile. <p><a href="https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.op" rel="nofollow noreferrer">According to documentation</a> <code>count</code> and <code>distinct</code> queries should result in <code>op</code> = <code>count</code> and <code>op</code> = <code>distinct</code> in <code>system.profile</code>. However when I tried to run such queries in shell both were generated as <code>op</code> = <code>command</code>.</p> <pre><code>&gt; db.p.count() 23 &gt; db.p.distinct("item") [ "pencil", "eraser" ] &gt; db.system.profile.find().sort({$natural: -1}).limit(2).pretty() { "op" : "command", "ns" : "test.p", "command" : { "distinct" : "p", "key" : "item", "query" : { } }, (...) } { "op" : "command", "ns" : "test.p", "command" : { "count" : "p", "query" : { }, "fields" : { } }, (...) } </code></pre> <p>For <code>remove</code> this works perfectly fine, I execute <code>remove</code> and I get <code>op</code> = <code>remove</code> in <code>system.profile</code>.</p> <pre><code>&gt; db.p.remove({item: "pen"}) WriteResult({ "nRemoved" : 0 }) &gt; db.system.profile.find().sort({$natural: -1}).limit(1).pretty() { "op" : "remove", "ns" : "test.p", "query" : { "item" : "pen" }, (...) } </code></pre>
0non-cybersec
Stackexchange
Switch Different Program Shortcut. <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://superuser.com/questions/435602/is-there-a-shortcut-or-way-in-windows-7-to-switch-same-applications-windows-li">Is there a shortcut or way in Windows 7 to switch same application’s windows, like Cmd + ~ in Mac.l</a> </p> </blockquote> <p>Is there any shortcut in windows switch windows in same program. In Mac OSX is </p> <blockquote> <p>Command + ~</p> </blockquote> <p>Is there any shortcut like this in Windows?</p>
0non-cybersec
Stackexchange
Finding a denumerable set $X_0$ satisfying a condition.. <p>Let $(X,\tau)$, with $X$ an uncountable set, $x_0 \in X$ fixed, be the space with topology generated by the collection: $$\mathscr{B} = \{ \{x\} \mid x \in X \setminus \{x_0\}\} \cup \{ A \subset X \mid x_0 \in A \text{ and } X \setminus A \text{ is countable} \}.$$</p> <p>Let $f: X \to \Bbb R$ be a continuous function. I must show that exists $X_0 \subset X$ countable such that for all $x\in X \setminus X_0$, we have $f(x) = f(x_0)$. I am given the hint that the inverse images of points in the real line are closed sets.</p> <p><strong>Work:</strong> the hint strongly suggests looking at: $$f^{-1}(\{f(x_0)\}) = \{x \in X \mid f(x) = f(x_0) \}.$$</p> <p>My first impulse is looking at the complement $X \setminus f^{-1}(\{f(x_0)\})$. By the hint this is open, and if $x$ isn't there, we have $f(x) = f(x_0)$. But telling me that this is open is useless, because since $x_0 \not\in X\setminus f^{-1}(\{f(x_0)\})$, I only know that this set is the reunion of its points. This could be a big set. And with this in mind, I just take $X_0$ any countable subset and I'm done. </p> <p>So in the end I didn't use that $f$ is continuous, so my reasoning most certainly is wrong. Any explanations? Thanks. </p>
0non-cybersec
Stackexchange
How can I use &lt;ul&gt; list instead of &lt;select&gt; dropdown for the languages switcher?. <p>I use <code>msDropDown</code> to convert the <code>&lt;select&gt;</code> to <code>&lt;ul&gt;</code> list for languages switcher. But the problem is that with this jQuery plugin, the select takes a long time to load after page loaded.</p> <p>So, how can I use a <code>ul</code> list rather than <code>select</code>?</p> <p>This is my select code:</p> <pre><code>&lt;select name="lang" class="language" onchange="location.href='index.php?lang='+this.value+''.$trackpage.'"&gt; &lt;option name="lang" data-image="style/lang/de.png" value="de"&gt;Deutsch&lt;/option&gt; &lt;option name="lang" data-image="style/lang/en.png" value="en" selected="selected"&gt;English&lt;/option&gt; &lt;option name="lang" data-image="style/lang/es.png" value="es"&gt;Espanol&lt;/option&gt; &lt;option name="lang" data-image="style/lang/fr.png" value="fr"&gt;Francais&lt;/option&gt; &lt;option name="lang" data-image="style/lang/it.png" value="it"&gt;Italiano&lt;/option&gt; &lt;/select&gt; </code></pre> <p>I tried with:</p> <pre><code>&lt;ul onchange="location.href='index.php?lang='+this.value+'"&gt; &lt;li&gt; &lt;a href="" name="lang" data-image="style/lang/de.png" value="de"&gt;English&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>but <code>value</code> and <code>onchange</code> is not supported by <code>ul</code> and <code>a</code>.<br> Is there a way to make <code>ul</code> works with the <code>select</code> attributes?</p> <p>Thank you! And sorry for my bad English!</p>
0non-cybersec
Stackexchange
Worst E3 of all-time?. I feel like the meme answer is 2006 with 599 US dollars But there were some worst than that. Anybody remember E3 2009-2010? Sony & Microsoft were trying so hard to push Kinect and PS Move, even Nintendo pushed Dance Central. ‘Twas a dark time.
0non-cybersec
Reddit
Ubuntu Internet stops working. <p>I have a very big Internet problem in Ubuntu. Whenever I load a web page or download something it will download half of the file and then it will stop downloading. After that the only whey I can fix it is if I diconnect from my wireless access point and then reconnect and start the download again. So how do I fix this? This also happens with Youtube videos.</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
Get the points of a moving body on a curve each T seconds. <p>There is a body moves along an <strong>eight figure</strong> path and there is a laser beam at the origin that rotating with rotation rate <strong><span class="math-container">$w$</span></strong>.<br> How to get the points that originate each rotation from the intersection between the moving body path (eight figure) and the rotating beam.</p> <p>Note that the laser beam is used for nothing but only as time reference.</p> <p><strong>Given:</strong></p> <ol> <li>the equation that describes that path:<br> <span class="math-container">$(x-h)^4 = a^2((x-h)^2-(y-k)^2)$</span><br> where <span class="math-container">$(h,k)$</span> = (50,70)</li> <li><p>The start point of the curve <span class="math-container">$(X_S,Y_S)$</span><br> where <span class="math-container">$(X_S,Y_S)$</span> = (30,70).</p></li> <li><p>The speed of the moving body (<span class="math-container">$V$</span>=150 m/s).</p></li> <li><p>The speed of rotation of the laser beam <span class="math-container">$w= 36$</span> deg/sec.</p></li> <li><p>The value of a = 10.</p></li> </ol> <p><strong>Required:</strong></p> <p>The points on the curve that came from the intersection between the beam line and the motion path (yellow points on the attached figure).</p> <p><strong>Please note that</strong>:<br> I do not know any information about how many points came from the intersection between the body path and the beam, for sure it depends on the body speed and the rotation rate of the beam.</p> <p>Here is a figure for more illustration:</p> <p><a href="https://i.stack.imgur.com/scglK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/scglK.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
my lion king tattoo by Randy at Ink Dreams Tattoo, College Station, TX. .
0non-cybersec
Reddit
Singular value decomposition of sum of single particle operators. <p>here is my question. Suppose to have an operator $L$ in a composite Hilbert space $A\otimes B$ which can be written as sum of single particle operator as: \begin{equation} L = (L_0\otimes \mathbb{I} + \mathbb{I} \otimes L_0). \end{equation} Suppose now that your numerical capabilities allow you to compute the singular value decomposition of $L_0=U_0S_0V_0^\dagger$.</p> <p>Is it possible to write the SVD of the operator $L=USV^\dagger$ using just tensor product or compositions of the matrices $U_0$, $S_0$ and $V_0$?</p> <p>My intuition says that is should be possible as it is possible to compute the spectrum and the inverse of $L$ just knowing the full spectrum of $L_0$. From a more physical point of view this seems to me reasonable since the <em>properties</em> of composite systems with no interactions between the subsystems can be always deduced from the local properties (I mean, the spectrum of an ensamble of non-interacting spins or electrons can be deduced knowing the spectrum of a single particle).</p> <p>Thank you very much in advance, best regards</p> <p>Alberto</p>
0non-cybersec
Stackexchange
Rotel slow-cooked chicken with Mexican spiced roasted sweet potatoes.
0non-cybersec
Reddit
Representing every positive rational number in the form of $(a^n+b^n)/(c^n+d^n)$. <p>About a month ago, I got the following : </p> <blockquote> <p>For <strong>every positive rational number</strong> $r$, there exists a set of four <strong>positive integers</strong> $(a,b,c,d)$ such that $$r=\frac{a^\color{red}{3}+b^\color{red}{3}}{c^\color{red}{3}+d^\color{red}{3}}.$$</p> <p>For $r=p/q$ where $p,q$ are positive integers, we can take $$(a,b,c,d)=(3ps^3t+9qt^4,\ 3ps^3t-9qt^4,\ 9qst^3+ps^4,\ 9qst^3-ps^4)$$ where $s,t$ are positive integers such that $3\lt r\cdot(s/t)^3\lt 9$.</p> <p>For $r=2014/89$, for example, since we have $(2014/89)\cdot(2/3)^3\approx 6.7$, taking $(p,q,s,t)=(2014,89,2,3)$ gives us $$\frac{2014}{89}=\frac{209889^3+80127^3}{75478^3+11030^3}.$$</p> </blockquote> <p>Then, I began to try to find <strong>every positive integer</strong> $n$ such that the following proposition is true : </p> <p><strong>Proposition</strong> : For every positive rational number $r$, there exists a set of four positive integers $(a,b,c,d)$ such that $$r=\frac{a^\color{red}{n}+b^\color{red}{n}}{c^\color{red}{n}+d^\color{red}{n}}.$$</p> <p>The followings are what I've got. Let $r=p/q$ where $p,q$ are positive integers.</p> <ul> <li><p>For $n=1$, the proposition is true. We can take $(a,b,c,d)=(p,p,q,q)$.</p></li> <li><p>For $n=2$, the proposition is <strong>false</strong>. For example, no such sets exist for $r=7/3$.</p></li> <li><p>For even $n$, the proposition is <strong>false</strong> because the proposition is false for $n=2$.</p></li> </ul> <p>However, I've been facing difficulty in the case of odd $n\ge 5$. I've tried to get a similar set of four positive integers $(a,b,c,d)$ to the set for $n=3$, but I have not been able to get any such set. So, here is my question.</p> <blockquote> <p><strong>Question</strong> : How can we find <strong>every odd number</strong> $n\color{red}{\ge 5}$ such that the following proposition is true?</p> <p><strong>Proposition</strong> : For every positive rational number $r$, there exists a set of four positive integers $(a,b,c,d)$ such that $$r=\frac{a^n+b^n}{c^n+d^n}.$$</p> </blockquote> <p>I would like to know any relevant references as well. </p> <p><strong>Remark</strong> : This question has been asked previously on <a href="https://math.stackexchange.com/questions/1185535/representing-every-positive-rational-number-in-the-form-of-anbn-cndn">math.SE</a> without receiving any answers. </p>
0non-cybersec
Stackexchange
Sweet.
0non-cybersec
Reddit
Windows, not admin: Proxy working in Firefox but not in cmd, why?. <p>I've manually configured the proxy in Firefox, and it works. I tried to use it also in the command line, but it fails:</p> <pre><code>&gt;set http_proxy=http://USERNAME:PASSWORD@HOST:PORT &gt;set https_proxy=https://USERNAME:PASSWORD@HOST:PORT &gt; &gt;ping www.google.com Pinging www.google.com with 32 bytes of data: Request timed out. </code></pre> <p>I also tried to use http for https_proxy, no result. I can't configure them as envvars since I'm not admin. Why is it wrong and what can I do?</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
Spending A Full Day In State Of Decay 2's Apocalypse.
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
My new favorite crank call. Guy gets call from someone using a soundboard of him (NSFW).
0non-cybersec
Reddit
Add redundacy disk to Synology Hybrid Raid. <p>I have a DS216j NAS by Synology that currently hosts a single 4 TB disk.</p> <p>Volume is set to SHR (Synology Hybrid Raid) <em>(without data protection)</em>.</p> <p>Now I bought another disk, same model, same size.</p> <p>I want to add it as a redundacy disk, i.e. add data protection to my SHR configuration.</p> <p>Is that possible?</p>
0non-cybersec
Stackexchange
How to fix the Zoom problems in Google Chrome and Firefox?. <p>Latest updates of Firefox and Google Chrome affects their Default Zoom scaling. It affects Fonts size, Image size and also entire Browser. </p> <p>Here is your Answers......</p> <p><strong>For Firefox :</strong> </p> <ol> <li><p>open up a new tab, and type about:config into the address bar, and press enter.</p></li> <li><p>Then use the search box, enter the word <strong>"pixel"</strong> then it will show <strong>"layout.css.devPixelsPerPx"</strong>.</p></li> <li><p><strong>change the value -1.0 to 1</strong> for 100% perfect scale...</p></li> </ol> <p><strong>For Chrome:</strong></p> <ol> <li><p>Right Click the chrome icon or chrome shortcut icon, go to the properties.</p></li> <li><p>Then in the <strong>"Target:"</strong> field, Click the field and press end button.</p></li> <li><p>Now you are seen this <strong>"chrome.exe"</strong> at the end.</p></li> <li><p>copy this text : <strong>chrome.exe" /high-dpi-support=1 /force-device-scale-factor=1</strong></p> <p>and paste on <strong>chrome.exe"</strong></p></li> <li><p>Then Restart chrome or close the browser and double click the shortcut icon.</p></li> </ol>
0non-cybersec
Stackexchange
Theorem formulation &quot;Given ..., then ...&quot; or &quot;For all ..., ...&quot;?. <p>When formulating a theorem, which of the following forms would be preferred, and why? Or is there another even better formulation? Are there reasons for or against mixing them in one paper?</p> <p>Formulation 0: If $x\in X$, then (expression involving $x$).</p> <p>Formulation 1: Given $x$ in $X$, then (expression involving $x$).</p> <p>Formulation 2: For all $x$ in $X$ it holds that (expression involving $x$).</p>
0non-cybersec
Stackexchange
In Spider-man homecoming (2017) Robert Downey Jr. received 1 million dollars for every minute of his appearance in the movie.
0non-cybersec
Reddit
I hate when this happens....
0non-cybersec
Reddit
Linux SFTP user without a home directory. <p>Suppose I have a home directory called "website".</p> <p>I want to create an sftp user to access that home folder and the sftp user is going to have a less obvious user name. There may be quite a few users like this so I am wondering if I can create these new sftp users without a home directory of their own and send them to the "website" directory.</p> <p>I tried this by using usermod -m -d and then deleting the new users home folder but got access denied when logging in.</p>
0non-cybersec
Stackexchange
Increasing USB port Power Output. <p>I have a new (2013) 15" Macbook Pro.</p> <p>The USB port provides 500mA which is not good enough for many devices I use (Hard Drive, 3G Dongle...)</p> <p>Reading this article: <a href="http://support.apple.com/kb/HT4049">http://support.apple.com/kb/HT4049</a> it seems that these ports are capable of delivering more power, but it's limited to Apple products.</p> <p>Is it possible to hack the mac, and change this default value (to something like 900mA?)</p>
0non-cybersec
Stackexchange
I started a new job today and I am super nervous, but my new colleague Peanut is helping me a lot..
0non-cybersec
Reddit
How to write DRY Unit Tests when order of method calls matters. <p>Suppose I'm writing a calculator engine with a class as follows...</p> <pre><code>public class ArithmeticExpression { ArithmeticExpression Add(double operand) { /* ... */ } ArithmeticExpression Subtract(double operand) { /* ... */ } // ... other useful operations like division, multiplication, etc. double ProduceResult() { /* ... */ } } </code></pre> <p>... and the goal is to defer evaluation of the expression until <code>ProduceResullt()</code> is called, so that correct order of all stacked operations is maintained.</p> <h3>My question is:</h3> <p>How should I tackle with <strong>unit testing this class</strong> without getting overwhelmed by the number of combinations of method calls?</p> <p>It is clear to me that the order of calls should be tested somehow, but writing tests like this:</p> <pre><code>public void Multiply_CalledAfterAdd_TakesPrecedenceOverAdd() { // ... } public void Multiply_CalledAfterDivide_EvaluatesLeftToRight() { // ... } </code></pre> <p>can get maddening and out of control quite quickly. And it's not even about those 16 tests for the four basic arithmetic functions. Suppose in the future I decide to extend the calculator with a modulo operation - that's 9 <strong>almost identical</strong> tests more to begin with.</p> <p>On the other hand - the whole puprose of the class is to keep the order of operations maintained, so it's got to be verified somehow.</p> <p>Wrapping up - I know the example is trivial, but it's a general problem that I struggle to find an answer to. Any help is appreciated, thanks.</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
How to hide UINavigationBar 1px bottom line. <p>I have an app that sometimes needs its navigation bar to blend in with the content. </p> <p>Does anyone know how to get rid of or to change color of this annoying little bar? </p> <p>On the image below situation i have - i'm talking about this 1px height line below "Root View Controller"</p> <p><img src="https://i.stack.imgur.com/iE0SO.png" alt="enter image description here"></p>
0non-cybersec
Stackexchange
that news about the 7th grader killing himself really got to me.. poor poor kid. I used to think I didn't care much about the death of people I don't know at all. Like if I hear "one trillion people dead after an explosion" blah blah blah, I don't think much of it. But for some reason the news on the front page of that 7th grade kid from forest hills middle school killing himself a day or two ago really got to me. I have no idea who he was or even what he looks like, but i'm still really bothered by it. Even though i'm not within two thousand miles of michigan, I have some irational idea that I could have prevented this. Maybe i'm impacted by it because it happened a day ago, or that he was only a couple years younger than me. Fuck. He'll never... Uh... Exist again. I can't relate to this kid at all, but I still for some reason have a lot of sympathy for him. I'm not sure what the point of this post was... It sucks this news will fade into obscurity with all the other kids his age who off'd themselves. If you or someone you know seems depressed or suicidal, ya know... Do something about it I guess.
0non-cybersec
Reddit
When you're a fucking nonconformist and aren't afraid of the repercussions.
0non-cybersec
Reddit
Changing windows 10 numpad mouse behavior. <p>My mouse is half broken, now I can't use my left click properly.</p> <p><strong>Luckily</strong> for me, I still have my keyboard. <strong>The problem</strong> is controlling mouse with keyboard is not as simple as it sounds like. Clicking and dragging with keyboard is not the same as controlling it with standard mouse.</p> <p>Pressing the <code>5</code> numpad button will trigger the <code>mouseclick</code> event, while pressing <code>0</code> will trigger <code>mousedown</code> event. The <code>mousedown</code> won't let go until you press <code>.</code>, which is for <code>mouseup</code>.</p> <p>This pattern is complicated, and kinda annoying to use. Is there any way to change the behavior of these things? Like pressing the <strong>5</strong> button into normal mouse click, where it automatically follows the normal pattern: <code>mousedown</code>, <code>mouseup</code> then finally <code>mouseclick</code>.</p>
0non-cybersec
Stackexchange
Zzzderps.
0non-cybersec
Reddit
MRW my new Doctor gives me a handshake.
0non-cybersec
Reddit
Why are there no B batteries?.
0non-cybersec
Reddit
This just about sums up what Australia is going through..
0non-cybersec
Reddit
Difference between Homogeneous first order operator and Homogeneous first order differential operator. <p>By definition, a <strong>Homogeneous first order operator</strong> on the algebra of differentiable functions is an operator like $$ Df = \sum \phi_i \frac{\partial f}{\partial x_i} $$ where $\phi_i$ are differentiable functions on $\mathbb{R^n}$ or open subset of $\mathbb{R^n}$ , satisfying the <strong>Leibniz rule</strong>. </p> <p>And we define <strong>Homogeneous first order differential operator</strong> as a sheaf homomorphism from $\mathcal{A} \rightarrow \mathcal{A} $ , ($\mathcal{A(M)}$ is a sheaf on a differentiable manifold $M$).</p> <p>Now, I suppose any homogeneous first order operator can be defined as a sheaf homomorphism from $\mathcal{A}$ into itself satisfying Leibniz rule. So what is the difference between above defined two operators? What is the <strong>differential</strong> structure defined on the second operator that makes it different from the first one? </p>
0non-cybersec
Stackexchange
Always wear a condom...That was a social message, courtesy of r/trashy.
0non-cybersec
Reddit
Windows XP Startup Sound slowed down to 24 hours.
0non-cybersec
Reddit
Show cell selection in Excel when not in focus. <p>It's really annoying that Excel (2003 and 2007) doesn't show what cell, row or column that is selected when the window is not in focus. I typically want to refer to the current cell or row while working in another application.</p> <p>Is there any workaround or fix that will make the cell/row highlighted when not in focus? I know that you can copy a cell (Ctrl+C) but it's kind of tiresome to do that every time.</p>
0non-cybersec
Stackexchange
selectize.js - how can I disable the flashing cursor after the selected item?. <p>I'm using <a href="https://github.com/brianreavis/selectize.js" rel="nofollow noreferrer">selectize.js</a> to style text boxes, and it's working fine. </p> <pre><code>$("select[name='somename']").selectize({ valueField: 'id', labelField: 'name', searchField: 'name', options: selectableThings, render: { option: function(item, escape) { return render(someTemplate, item); }, item: function(item, escape) { return render(someTemplate, item); } } }); </code></pre> <p>However I have a limited range of items and do not wish for the cursor (flashing |) to be enabled all the time. I've searched through <a href="https://github.com/brianreavis/selectize.js/blob/master/docs/api.md" rel="nofollow noreferrer">the API docs</a> and the source but can't find anything obvious. </p> <p>Is there something inbuilt to disable the flashing cursor?</p> <p><strong>Edit</strong> originally has this as 'disabling input' but it looks like the cursor can't be used for input (and disabling input still shows the cursor). </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
Number of lines formed by sides of polygon. <p>Let $n\geq 3$, and consider an $n$-gon, not necessarily convex. What is the minimum number of <em>distinct</em> lines that are formed by sides of the $n$-gon?</p> <p>When $n=3,4,5$ the answer is $3,4,5$ respectively. For $n=6$ we can save one line, for example if we draw the "V-shaped" $6$-gon so that the two sides at the top of the V form the same line. For larger $n$ we should be able to halve the number of distinct lines by forming a "star shape" so that opposite sides of the star form the same line. But can we do better?</p>
0non-cybersec
Stackexchange
Saw this posted on a police's FB page.
0non-cybersec
Reddit
Do guys fixate?. I obviously can't speak for all women, but personally I can only focus on one guy at a time. Whether I simply like the guy, date him, get screwed over, etc., whatever the case may be, this guy will remain the center of my romantic thoughts until someone else comes along. Even if the guy has screwed me over or proven to be a dick, I will still continue to think about him until someone else catches my attention (these fixations have lasted up to a year before). I know men are programmed to be less monogamous (not all men, but they tend to be), so I am curious, do men experience this type of fixation?
0non-cybersec
Reddit
How can I fake/mock/spy the a service in component test to avoid the NullInjectorError with Angular 9 / Jasmine / Karma?. <p>In my Angular app I need to test my component which use a <code>UserService</code> service. This <code>UserService</code> extends the <code>ProxyService</code> which extends <code>RemoteDataService</code>. This <code>RemoteDataService</code> uses <code>HttpClient</code>.</p> <p>This is the component's code:</p> <pre class="lang-js prettyprint-override"><code>@Component({ selector: 'app-tax-type-list', templateUrl: './tax-type-list.component.html', }) export class TaxTypeListComponent { userService = AppModule.InjectorInstance.get&lt;UserService&gt;(UserService); constructor() { } // ... } </code></pre> <p><strong>user.service.ts</strong></p> <pre class="lang-js prettyprint-override"><code> @Injectable({ providedIn: 'root' }) export class UserService extends ProxyService&lt;UserInterface&gt; { constructor() { super(new User()); } getCurrentUser(): UserInterface { return new User().init(localStorage.getItem('user')); } } </code></pre> <p><strong>proxy.service.ts</strong></p> <pre class="lang-js prettyprint-override"><code> @Injectable({ providedIn: 'root' }) export class ProxyService&lt;T&gt; extends RemoteDataService&lt;T&gt; { constructor( private instance: T, ) { super(instance); } // ... } </code></pre> <p><strong>remote-data.service.ts</strong></p> <pre class="lang-js prettyprint-override"><code>export class DataService&lt;T&gt; { private http: HttpClient; constructor(model: T) { this.http = AppModule.InjectorInstance.get&lt;HttpClient&gt;(HttpClient); } // ... } </code></pre> <p>Here is my test:</p> <pre class="lang-js prettyprint-override"><code>describe('TaxTypeListComponent', () =&gt; { let component: TaxTypeListComponent; let fixture: ComponentFixture&lt;TaxTypeListComponent&gt;; // set TestBed before each tests beforeAll(async(() =&gt; { TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); TestBed.configureTestingModule({ imports: [ // angular testing module that provides mocking for http connections HttpClientTestingModule, RouterTestingModule, ], // add declaration of services or components and use inject to get to them in tests providers: [ Injector, {provide: HelperFactoryService, useValue: new TaxType() }, ], declarations: [ TaxTypeListComponent, ], }).compileComponents(); AppModule.InjectorInstance = TestBed; TestBed.inject(HelperFactoryService); })); beforeEach(() =&gt; { fixture = TestBed.createComponent(TaxTypeListComponent); component = fixture.componentInstance; component.userService = new UserService(); fixture.detectChanges(); }); it('should create', () =&gt; { expect(component).toBeTruthy(); }); }); </code></pre> <p>And now I get this error message:</p> <pre><code>NullInjectorError: R3InjectorError(DynamicTestModule)[UserService -&gt; HttpClient -&gt; HttpClient]: NullInjectorError: No provider for HttpClient! error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 'UserService', 'HttpClient', 'HttpClient' ] }) </code></pre> <p>How can I fake/mock/spy the <code>UserService</code> to avoid the NullInjectorError?</p>
0non-cybersec
Stackexchange
MRW I'm working from home and my wife asks me to get some milk.
0non-cybersec
Reddit
Is it possible to get commits history for one file in github api?. <p>I would like to get all commit messages for separate file in github REST api. But all I got - only to get all commits for separate branch. Then I tried to get following:</p> <pre><code>http://api.github.com/users/&lt;username&gt;/&lt;project&gt;/commits/&lt;branch&gt;/&lt;path/to/file&gt; </code></pre> <p>But that didn't help also. Is this at least possible?</p>
0non-cybersec
Stackexchange
Labelling a section or &quot;subproof&quot; within a proof. <p>Does anyone have ideas on labelling a section in a proof that can be referenced later? </p> <p>Just to be clear I would like to do a "subproof" in a proof environment.</p>
0non-cybersec
Stackexchange
Why double double quotes make string run as function?. <p>A simple function receive two arguments and add <code>and</code> ,then print them.</p> <pre><code>function myprint(){ echo "$1 and $2";} </code></pre> <p>It works.</p> <pre><code>myprint xx yy xx and yy </code></pre> <p>It is a string,bash parse it separately.</p> <pre><code>"myprint xx yy" bash: myprint xx yy: command not found </code></pre> <p>Why double double quotes make string run as function?</p> <pre><code>""myprint xx yy"" xx and yy </code></pre>
0non-cybersec
Stackexchange
Homemade copy-cat chicken and gnocchi soup from Olive Garden: https://www.fivehearthome.com/slow-cooker-chicken-gnocchi-soup/.
0non-cybersec
Reddit
WWII Veteran Awarded Purple Heart 72 Years After He Was Wounded.
0non-cybersec
Reddit
Ubisoft Spent Years Protecting Mental And Physical Abusers (The Jimquisition).
0non-cybersec
Reddit
Prove that $W_0^{1,p}$ is a Banach space. <blockquote> <p><span class="math-container">$\textbf{Problem}$</span> Prove that <span class="math-container">$W_0^{1,p}(\Omega)$</span> is a Banach space where <span class="math-container">$\Omega$</span> be an open and bounded set in <span class="math-container">$\mathbb{R}^n$</span></p> </blockquote> <p><span class="math-container">$\textbf{Proof}$</span> <span class="math-container">$\quad $</span>Let <span class="math-container">$\{u_n\}$</span> be the Cauchy Sequence in <span class="math-container">$W_0^{1,p}(\Omega)$</span>. Then, <span class="math-container">$\{u_n\}$</span> be also the Cacuhy Sequence in <span class="math-container">$W^{1,p}(\Omega)$</span>. Since <span class="math-container">$W^{1,p}(\Omega)$</span> is a Banach space, there exists <span class="math-container">$u \in W^{1,p}(\Omega)$</span> such that <span class="math-container">$\Vert u-u_n \Vert _{W^{1,p}(\Omega)} \rightarrow 0 $</span> as <span class="math-container">$n \rightarrow \infty$</span>. We suffices to show that <span class="math-container">$u \in W_0^{1,p}(\Omega)$</span>. </p> <p>Since <span class="math-container">$u_n \in W_0^{1,p}(\Omega)$</span>, there exists <span class="math-container">$\phi_{n_j} \in C^{\infty}_{0}(\Omega)$</span> such that <span class="math-container">$\Vert u_n - \phi_{n_j}\Vert _{W^{1,p}(\Omega)} \rightarrow 0 $</span> as <span class="math-container">$n_j \rightarrow 0$</span>.</p> <p>Thus, <span class="math-container">\begin{align*} \Vert u - \phi_{n_j} \Vert_{W^{1,p}(\Omega)}\leq \Vert u-u_k \Vert_{W^{1,p}(\Omega)}+\Vert u_k-u_n\Vert_{W^{1,p}(\Omega)}+\Vert u_n-\phi_{n_j}\Vert_{W^{1,p}(\Omega)} \end{align*}</span> (i) There exists <span class="math-container">$N_1&gt;0$</span> such that <span class="math-container">\begin{align*} \Vert u-u_k\Vert_{W^{1,p}(\Omega)}&lt;\epsilon/3 \end{align*}</span> for <span class="math-container">$k&gt;N_1$</span>. (<span class="math-container">$u_n$</span> converge to <span class="math-container">$u$</span> in <span class="math-container">$W^{1,p}(\Omega)$</span>) </p> <p>(ii) There exists <span class="math-container">$N_2&gt;0$</span> such that <span class="math-container">\begin{align*} \Vert u_k-u_n \Vert_{W^{1,p}(\Omega)}&lt;\epsilon/3 \end{align*}</span> for <span class="math-container">$n,k&gt;N_2$</span>. (<span class="math-container">$u_n$</span> Cauchy sequence in <span class="math-container">$W^{1,p}(\Omega)$</span>) </p> <p>(iii) There exists <span class="math-container">$N_3&gt;0$</span> such that <span class="math-container">\begin{align*} \Vert u_n-\phi_{n_j}\Vert _{W^{1,p}(\Omega)}&lt;\epsilon/3 \end{align*}</span> for <span class="math-container">$n_j&gt;N_3$</span>. (<span class="math-container">$u_n \in W^{1,p}_0(\Omega)$</span>)</p> <p>Consequently, <span class="math-container">$\phi_{n_j} \in C^{\infty}_0(\Omega)$</span> converge to <span class="math-container">$u$</span> in <span class="math-container">$W^{1,p}(\Omega)$</span>. i.e, <span class="math-container">$u\in W^{1,p}_0(\Omega)$</span>. </p> <p>I'm not sure my proof is right....</p> <p>I want to know where my proof is wrong.. </p> <p>Any help is appreciated....</p> <p>Thank you!</p>
0non-cybersec
Stackexchange
Fixed Point of a Gaussian. <p>Is there any analytic method to compute $x$ such that $e^{-x^{2}} = x$? Came across this in some game theory I am doing.</p>
0non-cybersec
Stackexchange
Explain mixing bijection with an example. <p>I am reading whitebox AES. "Mixing Bijection" is one of the important definition. For example, I copy one paragraph here:</p> <p><em>The look-up tables that incorporate bytes of round keys can be considered miniature block ciphers. The application of concatenated input and output encodings help these components achieve confusion, as defined by Shannon. To help them achieve diffusion, linear transformations are also composed at their input and output (these compositions are done before the application of the concatenated input and output encodings). An invertible linear transformation is referred to as a <strong>mixing bijection</strong>.</em></p> <p>I have read the definition of bijection online, which is easy to understand. What means <strong>mixing bijection</strong>? Explain in "simple" English, better with an example.</p>
0non-cybersec
Stackexchange
Why does an UPDATE take much longer than a SELECT?. <p>I have the following select statement that finishes almost instantly.</p> <pre><code>declare @weekending varchar(6) set @weekending = 100103 select InvoicesCharges.orderaccnumber, Accountnumbersorders.accountnumber from Accountnumbersorders, storeinformation, routeselecttable,InvoicesCharges, invoice where InvoicesCharges.pubid = Accountnumbersorders.publication and Accountnumbersorders.actype = 0 and Accountnumbersorders.valuezone = 'none' and storeinformation.storeroutename = routeselecttable.istoreroutenumber and storeinformation.storenumber = invoice.store_number and InvoicesCharges.invoice_number = invoice.invoice_number and convert(varchar(6),Invoice.bill_to,12) = @weekending </code></pre> <p>However, the equivalent update statement takes 1m40s</p> <pre><code>declare @weekending varchar(6) set @weekending = 100103 update InvoicesCharges set InvoicesCharges.orderaccnumber = Accountnumbersorders.accountnumber from Accountnumbersorders, storeinformation, routeselecttable,InvoicesCharges, invoice where InvoicesCharges.pubid = Accountnumbersorders.publication and Accountnumbersorders.actype = 0 and dbo.Accountnumbersorders.valuezone = 'none' and storeinformation.storeroutename = routeselecttable.istoreroutenumber and storeinformation.storenumber = invoice.store_number and InvoicesCharges.invoice_number = invoice.invoice_number and convert(varchar(6),Invoice.bill_to,12) = @weekending </code></pre> <p>Even if I add:</p> <pre><code>and InvoicesCharges.orderaccnumber &lt;&gt; Accountnumbersorders.accountnumber </code></pre> <p>at the end of the update statement reducing the number of writes to zero, it takes the same amount of time. </p> <p>Am I doing something wrong here? Why is there such a huge difference?</p>
0non-cybersec
Stackexchange
Independent combined event. <p>Two athletes, A and B, are attempting to qualify for an international competition in both the 5000m and 10000m races. The probabilities for athlete A, for 5000m is $\frac{3}{5}$ and for 10000m is $\frac{1}{4}$. </p> <p>For athlete B, for 5000m is $\frac{2}{3}$ and for 10000m is $\frac{2}{5}$.</p> <p>Assuming that the probabilities are independent, calculate the probability that </p> <p>a) athlete A will qualify for both races,</p> <p>b) exactly one of the athletes qualifies for the 5000m race</p> <p>c) both athletes qualify only for the 10000m race.</p> <p>For a) $\frac{3}{5}\cdot \frac{1}{4}=0.15$</p> <p>How about b and c? Can anyone give me some hints and explanation?</p>
0non-cybersec
Stackexchange
comparing two columns. <p>I want to print OK if in column3 all fields are OK from below output.</p> <pre><code>port mcg clk stat ------ ------- ---- OK EXTCLK1 OK OK CLK3B OK OK CLK3A OK </code></pre> <p>I have tried like this</p> <pre><code>a=`cat file2.txt | awk '{if ($1 == $3) {print "sync is OK";} else { print "sync is NOK";}}'` echo "$a" &gt; file3.txt </code></pre> <p>here it if conditions is satisfied thrice so it is printing ok three times but I want to print only once.</p>
0non-cybersec
Stackexchange
The First Advice-Animal I Remember.
0non-cybersec
Reddit
[FRESH VIDEO] The Weeknd - Often (NSFW).
0non-cybersec
Reddit
Finding Extreme Points. <p>I am working on understanding extreme points better and was wondering how one would go about finding the extreme points of the ball<span class="math-container">$(L^\infty(\partial\mathbb{D}))$</span>? </p> <p>Thanks in advance for your help.</p>
0non-cybersec
Stackexchange
Does screen refresh rate actually matter?. I'm currently using a gaming laptop, it has a 60 hz display. Apparently that means that the frames are basically capped at 60 fps, in terms of what I can see, so like if I'm getting 120 fps in a game, I'll only be able to see 60 fps, is that correct? And also, does the screen refresh rate legitamately make a difference in reaction speed? When I use the reaction benchmark speed test, I get generally around 250ms, which is pretty slow I believe, and is that partially due to my screen? Then also aside from those 2 questions, what else does it actually affect, if anything at all?
0non-cybersec
Reddit
When you're gaming baked af and need to get in the most ergonomic, pro playing position possible. [9].
0non-cybersec
Reddit
SED shadow master boot record and linux md raid 1. <p>I'm contemplating this setup:</p> <ul> <li>Two SSDs with SED (self encrypting drive), </li> <li>in a software raid mirror, </li> <li>linux (or grub?) to unlock the two disks with one pwd from the Shadow Master Boot Record</li> </ul> <p>I have already implemented a full disk encryption on sw raid where the resulting raid image is the encrypted luks container. I'm happy with this as it minimizes the unencrypted surface. It works great but has some drawbacks: First, I'm typing my password twice - once for grub and once for linux kernel. Second, the encryption key is probably floating around somewhere in kernel memory.</p> <p>With SED I'd like to achieve the following: Keep the same password for both drives so both can be unlocked at once. Once unlocked, no more passwords are needed. No encryption keys in memory, they are contained/protected by the SED.</p> <p>Has anyone done this or parts of it? Would you recommend this? What is your experience and procedure?</p> <p>UPDATE: found that there's <a href="https://www.drivetrust.com/" rel="nofollow noreferrer">Drive Trust Aliance</a> working on <a href="https://github.com/Drive-Trust-Alliance/sedutil" rel="nofollow noreferrer">sedutil</a> with a nice pun on their website: "There Should Be No Encryption Backdoors, Only Front Doors"</p>
0non-cybersec
Stackexchange
SQL Server MDW - Query for data collector retention period. <p>I have data collectors active on many remote servers and I am trying to find a query that will capture the retention periods for all data collectors active on an instance. </p> <p>These are system data collectors, part of Management Data Warehouse, not custom collectors.</p> <p>Any ideas which tables will hold this data?</p>
0non-cybersec
Stackexchange
Youve been hit oh you been struck by death..
0non-cybersec
Reddit
Steven Spielberg Faces Criticisms For Reported Plan To Block Netflix From Oscars.
0non-cybersec
Reddit
How can I completely remove MySQL, including config and data?. <p>On a fresh Ubuntu install, I set a root password but forgot to save it.</p> <p>As I want to document the setup steps for later reproduction, I do not want to go through any password recovery steps but remove all traces of MySQL on the system and start over.</p> <p>I have tried:</p> <pre><code>sudo apt-get remove dbconfig-mysql sudo apt-get remove --purge mysql* sudo apt-get autoremove sudo apt-get autoclean </code></pre> <p>(as per <a href="https://askubuntu.com/a/912173/149408">this answer</a>), and an additional</p> <pre><code>rm -r /etc/mysql </code></pre> <p>but when I install MySQL after that, I still do not get a password prompt, which indicates there are still some MySQL leftovers from which the old password is resurrected.</p> <p>How do I completely eradicate MySQL from this system, so the next MySQL install will appear like a fresh install and prompt me for a root password again?</p>
0non-cybersec
Stackexchange
Finally, Finished Phoenix by Nick Limpens, Royal Ink, Brunssum (NL).
0non-cybersec
Reddit
[WP] Harry Potter and his parents were miraculously saved from Voldemort by his mothers secret lover, Zeus..
0non-cybersec
Reddit
ar X iv :1 61 0. 05 01 8v 2 [ q- fi n. M F ] 2 9 D ec 2 01 7 An Explicit Formula for Optimal Portfolios in Complete Wiener Driven Markets: a Functional Itô Calculus Approach Kristoffer Lindensjö Department of Mathematics Stockholm University SE-106 91 Stockholm, Sweden [email protected] +46 70 444 10 07 May 8, 2018 Abstract We consider a standard optimal investment problem in a complete finan- cial market driven by a Wiener process and derive an explicit formula for the optimal portfolio process in terms of the vertical derivative from functional Itô calculus. An advantage with this approach compared to the Malliavin calculus approach is that it relies only on an integrability condition. AMS MSC2010: 91G10; 93E20; 97M30; 91G80 Keywords: Functional Itô calculus, Martingale representation, Optimal investment, Optimal portfolios, Portfolio theory, Utility maximization, Vertical derivative 1 Introduction Optimal investment and consumption problems are among the most important problems in mathematical finance. Problems of this type were first studied in a Markovian framework using standard stochastic control methods, see e.g. [17, 18]. The martingale method studied in the present paper was developed in e.g. [11, 22]. We consider the optimal investment problem of maximizing the expected value of a general utility function of terminal wealth in a standard complete financial market driven by a Wiener process, see Section 3 and Section 4 for a detailed description of the problem. It is well-known that if X∗ is the optimal wealth process and H is the state price density, then the discounted wealth process, given by X∗(t)H(t), is a martingale, and it is therefore possible to implicitly characterize the optimal portfolio π∗ using the standard martingale representation theorem. In the present paper, we use this result and a construc- tive martingale representation theorem from functional Itô calculus to derive an 1 http://arxiv.org/abs/1610.05018v2 explicit formula for the optimal portfolio π∗ in terms of the vertical derivative, see Theorem 4.3. There is a large literature on optimal investment problems using Malliavin calculus and in particular the Clark-Ocone formula. Using this approach it is possible to derive explicit formulas for optimal portfolios in terms of Malliavin derivatives. One of the first papers in this direction was [19]. Other papers using the Malliavin calculus approach to optimal investment and consumption problems include [2, 7, 9, 14, 15, 21, 23]. An advantage with the functional Itô calculus approach to optimal portfolios proposed in the present paper compared to the Malliavin calculus approach is that it only relies on an integrability condition, whereas the Malliavin calculus approach relies on a differentiability condition in the Malliavin sense, which requires further restrictions on the financial market. This point is elaborated in Section 4.1. Additionally, a purpose of the present paper is to point out an area of ap- plication in which the theory of functional Itô calculus can be applied. The structure of the present paper is as follows. Section 2 contains a non- technical account of the relevant parts of functional Itô calculus. Section 3 contains a description of the financial market. Section 4 presents the optimal investment problem and the explicit formula for the optimal portfolio. In Sec- tion 4.1 we describe in what sense the approach of the present paper requires less restrictions on the financial market compared to the Malliavin calculus ap- proach. In section 4.2 we illustrate the explicit formula for optimal portfolios by studying two well-known examples. Remark 1.1 A method for the computation of explicit approximations to func- tional Itô calculus martingale representations is studied in [6]. Numerical stud- ies of optimal portfolios using the Malliavin calculus approach can be found in [8, 24]. Remark 1.2 The functional Itô formula is in [20] used in the study of an opti- mal investment problem where asset prices are modeled by a particular stochas- tic delay differential equation. Moreover, the particular structure of the problem implies that an HJB equation for an optimal value function depending only on a finite number (four) of state variables can be derived using the functional Itô formula, and a corresponding verification theorem is proved. The approach is therefore fundamentally different from that of the present paper. 2 Martingale representation in functional Itô cal- culus Functional Itô calculus was proposed in [10]. It was developed into a coherent theory in e.g. [1, 3, 4, 5, 6]. This section contains a non-technical account of the relevant parts of functional Itô calculus. For a comprehensive account we refer to [1, 5]. Consider the space of càdlàg paths Ω = D([0, T ],Rn), where T < ∞. The value of a path ω at a fixed t is denoted by ω(t) and a path stopped at t is denoted by ωt, i.e. ωt(s) = ω(t ∧ s), 0 ≤ s ≤ T . Let F : [0, T ] × Ω → R be a functional of paths that is non-anticipative in the sense that F (t, ωt) = F (t, ω). 2 The horizontal derivative of F is defined by DF (t, ω) = lim hց0 F (t+ h, ωt)− F (t, ωt) h . The vertical derivative is defined by ∇ωF (t, ω) = (∂iF (t, ω), i = 1, ..., n), where ∂iF (t, ω) = lim h→0 F (t, ωt + eih1[t,T ])− F (t, ωt) h . The second order vertical derivative is obtained by vertically differentiating the elements of vertical derivative, i.e. ∇2ωF (t, ω) = (∂j(∂iF (t, ω)), i, j = 1, ..., n). Remark 2.1 If F (t, ω) = f(t, ω(t)) where f(t, x) is a sufficiently differentiable function [0, T ] × Rn → R, then the horizontal and vertical derivatives reduce to the standard partial derivatives in the sense that DF (t, ω) = ∂f(t,ω(t)) ∂t and ∂iF (t, ω) = ∂f(t,ω(t)) ∂xi . From now on we consider a stochastic basis (Ω,F ,P,F) where F = {Ft}0≤t≤T is the P-augmented filtration generated by an n-dimensional Wiener process W . The first main result of functional Itô calculus is the functional Itô formula, see e.g. [1, Theorem 6.2.3] or [5, Theorem 4.1]. It can be described as essentially the standard Itô formula for non-anticipative functionals, where the partial deriva- tives are replaced with the horizontal and vertical derivatives. The functional Itô formula holds for non-anticipative functionals which satisfy certain condi- tions regarding mainly continuity and boundedness written as F ∈ C 1,2 b , see [1, Ch.5,6] for details. The functional Itô formula implies that if Y is a martingale given by Y (t) = F (t,Wt) P-a.s. for some F ∈ C 1,2 b , then, for any t, Y (t) = Y (0) + ∫ t 0 ∇ωF (s,Ws) ′ dW (s) P-a.s. In this particular case the vertical derivative of the martingale Y with respect to W is defined by ∇WY (t) = ∇ωF (t,Wt). Let us now extend the definition of the vertical derivative ∇WY . Let L 2(W ) be the space of progressively measurable processes φ with E[ ∫ T 0 φ(s)′φ(s)ds] < ∞. Let M2(W ) be the space of square integrable martingales starting at zero. Let C 1,2 b (W ) be the space of processes Y which can be represented as Y (t) = F (t,Wt) P-a.s. with F ∈ C 1,2 b . Let D(W ) = C 1,2 b (W ) ∩ M2(W ). It turns out that {∇WY | Y ∈ D(W )} is dense in L2(W ) and that D(W ) is dense in M2(W ), see [1, Lemma 7.3.1]. Moreover, the vertical derivative of Y ∈ D(W ), defined above, is characterized as the unique element in L2(W ) satisfying E[Y (T )Z(T )] = E [ ∫ T 0 ∇WY (t) ′∇WZ(t)dt ] for every Z ∈ D(W ), see [1, Proposition 7.3.2]. Using these observations it is possible to show that the vertical derivative ∇W : D(W ) → L 2(W ) has a unique continuous extension ∇W : M 2(W ) → L2(W ) satisfying ∇W [ ∫ · 0 φ(s)′dW (s) ] = φ. 3 Specifically, for Y ∈ M2(W ) the (weak) vertical derivative ∇WY is the unique element in L2(W ) satisfying E[Y (T )Z(T )] = E [ ∫ T 0 ∇WY (t) ′∇WZ(t)dt ] for every Z ∈ D(W ), see [1, Theorem 7.3.3]. The martingale representation follows, see e.g. [1, Theorem 7.3.4.]. Theorem 2.2 Let Y be a square integrable martingale. Then, for any t, Y (t) = Y (0) + ∫ t 0 ∇WY (s) ′dW (s) P-a.s. We remark that [16] contains an extension of this result to local martingales. 3 The financial market This section introduces a standardWiener driven continuous time financial mar- ket that is arbitrage free and complete. For a more detailed description of the market we refer to [13] and for proofs that it is arbitrage free and complete we refer to [13, Ch. 1: Theorem 4.2, Theorem 6.6]. The financial market corresponds to the stochastic basis (Ω,F ,P,F) defined in Section 2. The market is endowed with a money market process B defined by B(t) = e ∫ t 0 r(s)ds, 0 ≤ t ≤ T, where r is a progressively measurable instantaneous risk-free rate process sat- isfying ∫ T 0 |r(t)|dt < ∞ P-a.s. The market is also endowed with n stocks with price-per-share processes Si, i = 1, ..., n which are continuous, strictly positive and satisfy dSi(t) = Si(t)αi(t)dt+ Si(t) n ∑ d=1 σiddW (d)(t), Si(0) > 0, 0 ≤ t ≤ T. It is assumed that the n-dimensional process α is progressively measurable and that ∫ T 0 |α(t)|dt < ∞ P-a.s. Moreover, the n × n-dimensional matrix-valued process σ is progressively measurable, σ(t) is non-singular for all t and all ω and ∑n i=1 ∑n d=1 ∫ T 0 σ2id(t)dt < ∞ P-a.s. The market price of risk process θ is defined by θ(t) = σ(t)−1(α(t)− r(t)1), 0 ≤ t ≤ T. The likelihood process Z is defined by Z(t) = e− ∫ t 0 θ(s)′dW (s)− 1 2 ∫ t 0 |θ(s)|2ds , 0 ≤ t ≤ T. The state price density process H is defined by H(t) = B(t)−1Z(t), 0 ≤ t ≤ T. (1) 4 Assumption 3.1 ∫ T 0 |θ(t)|2dt < ∞ P-a.s. The local martingale Z is a martin- gale. E[H(T )] < ∞. Definition 3.2 A portfolio process (π, π0) consists of an n-dimensional pro- gressively measurable process π and a 1-dimensional progressively measurable process π0 for which ∫ T 0 |π0(t)+π(t)′1||r(t)|dt < ∞, ∫ T 0 |π′t(α(t)−r(t)1)|dt < ∞ and ∫ T 0 |π(t)′σ(t)|2dt < ∞ P-a.s. The corresponding wealth process X is given by X(t) = x0 + ∫ t 0 (π0(s) + π(s)′1)r(s)ds + ∫ t 0 π(t)′(α(s) − r(s)1)ds + ∫ t 0 π(s)′σ(s)dW (s), 0 ≤ t ≤ T (2) where x0 is the initial wealth. The portfolio process is said to be self-financing if X(t) = π0(t) + π(t)′1, 0 ≤ t ≤ T . A self-financing portfolio corresponding to π is from now on denoted by Xπ. Note that the vector π(t) corresponds to the amount of capital invested in each stock at the time t and that B(t) corresponds to the amount of capital invested in the money market. 4 The optimal portfolio process For any fixed initial wealth x0 ≥ 0, a portfolio process π is said to be admissible if the corresponding wealth process is self-financing and satisfies Xπ(t) ≥ 0, 0 ≤ t ≤ T P-a.s. For a fixed initial wealth x0 > 0 we consider the optimal investment problem sup π∈A(x0) E [U(Xπ(T ))] where A(x0) is the set of admissible portfolio processes which satisfy the condi- tion E[min[U(Xπ(T ), 0)]] > −∞ and U is a utility function satisfying standard conditions, see [13, Ch. 3]. Let I denote the (generalized) inverse of the derivative U ′, for details see Ch. 3.4 (ibid.). We need the following assumption and standard result. For a proof see Chapter 3 Theorem 7.6, and also Theorem 3.5, Corollary 6.5, Remark 6.4 and p. 102 (ibid.). Assumption 4.1 E [ (H(T )I(yH(T )))2 ] < ∞, ∀y ∈ (0,∞). Theorem 4.2 Consider an initial wealth x0 ∈ (limy→∞ E [H(T )I(yH(T ))] ,∞). The optimal wealth process X∗ is then given by X ∗(t) = EFt [ H(T ) H(t) I(Y(x0)H(T )) ] , 0 ≤ t ≤ T, (3) where Y(x0) > 0 is determined by E[H(T )I(Y(x0)H(T ))] = x0. 5 We are now ready to present the main result of the present paper. Theorem 4.3 Consider an initial wealth x0 ∈ (limy→∞ E [H(T )I(yH(T ))] ,∞). The optimal portfolio process π∗ is then given by π ∗(t) = σ(t)′−1 ∇WEFt [H(T )I(Y(x0)H(T ))] + θ(t)EFt [H(T )I(Y(x0)H(T ))] H(t) , (4) 0 ≤ t ≤ T , where ∇W is the vertical derivative operator with respect to W . Remark 4.4 Use (3) and (4) to see that the optimal portfolio process can also be represented as π∗(t) = σ(t)′−1 [ H(t)−1∇W [H(t)X ∗(t)] + θ(t)X∗(t) ] , 0 ≤ t ≤ T. (5) Proof. Define M by M(t) = H(t)X∗(t) = EFt [H(T )I(Y(x0)H(T ))]] . (6) Using Assumption 4.1 and Y(x0) > 0 we obtain E[M(t)2] = E [ EFt [H(T )I(Y(x0)H(T ))] 2 ] ≤ E [ EFt [ (H(T )I(Y(x0)H(T ))) 2 ]] = E [ (H(T )I(Y(x0)H(T ))) 2 ] < ∞. It follows that M is a square integrable martingale. Now use (1), (2), the standard Itô formula, the self-financing condition and the definition of θ to obtain dM(t) = H(t)dX∗(t) +X∗(t)dH(t) + dX∗(t)dH(t) = H(t)[X∗(t)r(t)dt + π∗(t)′(α(t) − r(t)1)dt + π∗(t)′σ(t)dW (t)] +X∗(t)[−r(t)H(t)dt − θ(t)′H(t)dW (t)] + π∗(t)′σ(t)(−θ(t)H(t))dt = H(t)π∗(t)′σ(t)dW (t) −X∗(t)θ(t)′H(t)dW (t). This implies that π∗ satisfies, for any t, M(t) = M(0) + ∫ t 0 H(s)(π∗′(s)σ(s) −X∗(s)θ(s)′)dW (s). Since M is a square integrable martingale we may use Theorem 2.2 to obtain, for any t, the representation M(t) = M(0) + ∫ t 0 ∇WM(s) ′dW (s) P-a.s. It follows that π∗ can be represented by ∇WM(t) ′ = H(t)(π∗′(t)σ(t) −X∗(t)θ(t)′). 6 It follows that π∗(t)′σ(t) = [ ∇WM(t) ′ H(t) +X∗(s)θ(t)′ ] , which implies that π ∗(t) = σ(t)′−1 [ ∇WM(t) H(t) +X∗(t)θ(t) ] . (7) Replace X∗(t) in (7) with the right side of (3) and replace M(t) with the right side of (6). The result follows. 4.1 A comparison with the Malliavin calculus approach According to the Clark-Ocone theorem it holds that if F is an integrable FT - measurable random variable that is Malliavin differentiable in the sense F ∈ D1,1 then F = E[F ] + ∫ T 0 EFt [(DtF ) ′]dW (t), where D is the Malliavin derivative operator. For a definition of the space D1,1 and a proof we refer to [13, Appendix E] and [12]. With the Clark-Ocone theorem as a starting point [19] arrives at an explicit formula for the optimal portfolio process π∗ based on Malliavin derivatives, in essentially the same financial market that we study in the present present paper. Naturally, this result relies on the requirement that the discounted optimal terminal wealth is sufficiently Malliavin differentiable. In order to ensure that this condition is fulfilled, further restrictions on the financial market and the utility function are needed. For example, conditions regarding the Malliavin differentiability of θ and r, and further conditions for the inverse I are necessary, see [19, Theorem 4.2] for details. In comparison, the only non-standard condition that the explicit formula for π∗ in Theorem 4.3 relies on is the square integrability in Assumption 4.1, since typically only integrability is assumed, cf. [13, Ch. 3.7]. 4.2 Examples Let us illustrate Theorem 4.3 by studying two well-known examples. 4.2.1 Logarithmic utility Let U(x) = ln(x) for x ∈ (0,∞). It follows that I(y) = 1 y for y ∈ (0,∞). Using calculations similar to those in (8) below it is easy to see that Assumption 4.1 is satisfied and that limy→∞ E [H(T )I(yH(T ))] = 0. We may therefore use Theorem 4.2 and Theorem 4.3 for any initial wealth x0 > 0. We directly obtain EFt [H(T )I(Y(x0)H(T ))] = EFt [ H(T ) 1 Y(x0)H(T ) ] = 1 Y(x0) . (8) 7 This implies that ∇WEFt [H(T )I(Y(x0)H(T ))] = ∇W [ 1 Y(x0) ] = 0, (9) since the vertical derivative reduces to the standard derivative in this case, cf. Remark 2.1. Using (4), (8) and (9) we obtain π∗(t) = σ(t)′−1 0 + θ(t) 1 Y(x0) H(t) = (σ(t)σ(t)′)−1(α(t) − r(t)1) Y(x0)H(t) . Now use Theorem 4.2 and (8) to see that x0 = 1 Y(x0) which implies that the optimal portfolio can be represented as π∗(t) = (σ(t)σ(t)′)−1(α(t)− r(t)1) x0 H(t) . For completeness sake we use Theorem 4.2 and the above to obtain the optimal wealth process X ∗(t) = x0 H(t) . 4.2.2 Power utility with deterministic coefficients Let r, α and σ be deterministic functions of time and U(x) = x γ γ for x ∈ (0,∞) with γ < 1, γ 6= 0. It follows that I(y) = y 1 γ−1 for y ∈ (0,∞). This implies that E [(H(T )I(yH(T )))] = y 1 γ−1E [ H(T )H(T ) 1 γ−1 ] = y 1 γ−1E [H(T )I(H(T ))] . Assumption 4.1 implies that limy→∞ E [H(T )I(yH(T ))] = 0. A sufficient con- dition for Assumption 4.1 is in this case that θ and r are bounded. Recall that HX∗ given by H(t)X∗(t) = EFt [H(T )I(Y(x0)H(T ))] , is a square integrable martingale. Now use I(y) = y 1 γ−1 , (1) and (3) to perform the following calculations, where (...) denotes a deterministic function of time based on r, θ and γ, H(t)X∗(t) = Y(x0) 1 γ−1EFt [ H(T ) γ γ−1 ] (10) = Y(x0) 1 γ−1EFt [ e − ∫ T 0 γ γ−1 θ(s)′dW (s)+ ∫ T 0 (...)ds ] = Y(x0) 1 γ−1 e ∫ T 0 (...)ds EFt [ e ∫ T 0 −γ γ−1 θ(s)′dW (s) ] = Y(x0) 1 γ−1 e ∫ T 0 (...)dse ∫ t 0 −γ γ−1 θ(s)′dW (s) EFt [ e ∫ T t −γ γ−1 θ(s)′dW (s) ] = Y(x0) 1 γ−1 e ∫ T 0 (...)dse ∫ t 0 −γ γ−1 θ(s)′dW (s) e 1 2 ∫ T t | γθ(s) γ−1 |2ds = Y(x0) 1 γ−1 e ∫ T 0 (...)dse ∫ t 0 −γ γ−1 θ(s)′dW (s) e 1 2 ∫ T 0 | γθ(s) γ−1 |2ds− 1 2 ∫ t 0 | γθ(s) γ−1 |2ds = Y(x0) 1 γ−1 e ∫ T 0 (...)ds e ∫ t 0 −γ γ−1 θ(s)′dW (s) e − 1 2 ∫ t 0 | γθ(s) γ−1 |2ds . 8 Thus, HX∗ is in fact a square integrable exponential martingale. Using Itô’s formula we obtain H(t)X∗(t) = H(0)X∗(0) + ∫ t 0 H(s)X∗(s) −γ γ − 1 θ(s)′dW (s). Together with Theorem 2.2 this implies that the vertical derivative of HX∗ with respect to W can be represented as ∇W [H(t)X ∗(t)]′ = H(t)X∗(t) −γ γ − 1 θ(t)′. (11) Now use (5) and (11) to see that the optimal portfolio can be represented as π∗(t) = σ(t)′−1 [ H(t)−1∇W [H(t)X ∗(t)] + θ(t)X∗(t) ] = σ(t)′−1 [ X ∗(t) −γ γ − 1 θ(t) + θ(t)X∗(t) ] = σ(t)′−1 [ 1 1− γ θ(t)X∗(t) ] = (σ(t)σ(t)′)−1(α(t) − r(t)1) X∗(t) 1 − γ . For completeness sake let us find an expression for the optimal wealth process X∗. Use Theorem 4.2 and I(y) = y 1 γ−1 to see that Y(x0) 1 γ−1 = x0 E [ H(T ) γ γ−1 ] . Using (10) and the above we obtain X ∗(t) = 1 H(t) x0 E [ H(T ) γ γ−1 ]EFt [ H(T ) γ γ−1 ] . References [1] V. Bally, L. Caramellino, R. Cont, F. Utzet, and J. Vives. Stochastic Integration by Parts and Functional Itô Calculus. Springer, 2016. [2] F. E. Benth, G. Di Nunno, A. Lökka, B. Øksendal, and F. Proske. Explicit representation of the minimal variance portfolio in markets driven by Lévy processes. Mathematical finance, 13(1):55–72, 2003. [3] R. Cont and D.-A. Fournié. Change of variable formulas for non- anticipative functionals on path space. Journal of Functional Analysis, 259(4):1043–1072, 2010. [4] R. Cont and D.-A. Fournié. A functional extension of the Itô formula. Comptes Rendus Mathematique, 348(1):57–61, 2010. [5] R. Cont and D.-A. Fournié. Functional Itô calculus and stochastic integral representation of martingales. The Annals of Probability, 41(1):109–133, 2013. 9 [6] R. Cont and Y. Lu. Weak approximation of martingale representations. Stochastic Processes and their Applications, 126(3):857–882, 2016. [7] J. Detemple and M. Rindisbacher. Closed-form solutions for optimal portfo- lio selection with stochastic interest rate and investment constraints. Math- ematical Finance, 15(4):539–568, 2005. [8] J. B. Detemple, R. Garcia, and M. Rindisbacher. A Monte Carlo method for optimal portfolios. The journal of Finance, 58(1):401–446, 2003. [9] G. Di Nunno and B. Øksendal. Optimal portfolio, partial information and Malliavin calculus. Stochastics: An International Journal of Probability and Stochastics Processes, 81(3-4):303–322, 2009. [10] B. Dupire. Functional Itô calculus. Bloomberg portfolio research paper, (2009-04), 2009. [11] I. Karatzas, J. P. Lehoczky, and S. E. Shreve. Optimal portfolio and con- sumption decisions for a ”small investor” on a finite horizon. SIAM journal on control and optimization, 25(6):1557–1586, 1987. [12] I. Karatzas, D. L. Ocone, and J. Li. An extension of Clark’s formula. Stochastics: An International Journal of Probability and Stochastic Pro- cesses, 37(3):127–131, 1991. [13] I. Karatzas and S. E. Shreve. Methods of Mathematical Finance (Stochastic Modelling and Applied Probability). Springer, 1998. [14] P. Lakner. Optimal trading strategy for an investor: the case of partial information. Stochastic Processes and their Applications, 76(1):77–97, 1998. [15] P. Lakner and L. M. Nygren. Portfolio optimization with downside con- straints. Mathematical Finance, 16(2):283–299, 2006. [16] K. Lindensjö. Constructive martingale representation using functional Itô calculus: a local martingale extension. arXiv:1611.09214, 2017. [17] R. C. Merton. Lifetime portfolio selection under uncertainty: the continuous-time case. The review of Economics and Statistics, 51(3):247– 257, 1969. [18] R. C. Merton. Optimum consumption and portfolio rules in a continuous- time model. Journal of economic theory, 3(4):373–413, 1971. [19] D. L. Ocone and I. Karatzas. A generalized Clark representation formula, with application to optimal portfolios. Stochastics: An International Jour- nal of Probability and Stochastic Processes, 34(3-4):187–220, 1991. [20] T. Pang and A. Hussain. An application of functional Ito’s formula to stochastic portfolio optimization with bounded memory. In Proceedings of 2015 SIAM Conference on Control and Its Applications (CT15), pages 159–166. SIAM, 2015. [21] H. Pham and M.-C. Quenez. Optimal portfolio in partially observed stochastic volatility models. Annals of Applied Probability, 11(1):210–238, 2001. 10 [22] S. R. Pliska. A stochastic calculus model of continuous trading: optimal portfolios. Mathematics of Operations Research, 11(2):371–382, 1986. [23] W. Putschögl and J. Sass. Optimal consumption and investment under partial information. Decisions in Economics and Finance, 31(2):137–170, 2008. [24] A. Takahashi and N. Yoshida. An asymptotic expansion scheme for op- timal investment problems. Statistical Inference for Stochastic Processes, 7(2):153–188, 2004. 11 1 Introduction 2 Martingale representation in functional Itô calculus 3 The financial market 4 The optimal portfolio process 4.1 A comparison with the Malliavin calculus approach 4.2 Examples 4.2.1 Logarithmic utility 4.2.2 Power utility with deterministic coefficients
0non-cybersec
arXiv
Avengers Endgame flip book.
0non-cybersec
Reddit
share git rep access on unix machine with ssh. <p>at my school we have a student unix server with our accounts.</p> <p>i have installed git on my account, created a repository, and created the acl permissions on the folder repository so other users can access the repository</p> <pre><code># file: tp1 # owner: my_account # group: groupxxx user::rwx user:friend_account:rwx group::--- mask::rwx other::--- default:user::rwx default:user:friend_account:rwx default:group::--- default:mask::rwx default:other::--- </code></pre> <p>but friend_account cant even cd to my tp1 directory (permission denied), so i think the problem should be in unix acl permissions..</p>
0non-cybersec
Stackexchange
Dave Grohl.
0non-cybersec
Reddit
TIL In 2007, a woman delivered twins in North Carolina. One was born at 1:32 a.m. and the second came 34 minutes later, but because the clocks switched back an hour, the second baby was technically born at 1:06 a.m..
0non-cybersec
Reddit
Valve to keynote US GamesIndustry.biz Investment Summit.
0non-cybersec
Reddit
Compiling with TL2015 doesn&#39;t work. <p>I wanted to install TeXLive shortly. But when I start my TeXStudio Editor and I try to compile a minimal example, the following failure occurs:</p> <pre><code>Prozess gestartet: pdflatex.exe -synctex=1 -interaction=nonstopmode "document".tex Cannot get a temporary directory after five iterations ... sorry! at d:\TeXlive\2015\texmf-dist\scripts\texlive\fmtutil.pl line 334. fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order): fmtutil: d:/texlive/2015/texmf-dist/web2c/fmtutil.cnf fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes: fmtutil: c:/users/bastian/.texlive2015/texmf-config/web2c/fmtutil.cnf D:\TeXlive\2015\bin\win32\runscript.tlu:663: command failed with exit code 2: perl.exe d:\TeXlive\2015\texmf-dist\scripts\texlive\fmtutil.pl --byfmt pdflatex Running the command D:\TeXlive\2015\bin\win32\fmtutil.exe kpathsea: Running mktexfmt pdflatex.fmt The command name is D:\TeXlive\2015\bin\win32\mktexfmt Prozess endete mit Fehler(n) </code></pre> <p>(It is German-English mix, <code>Prozess gestartet</code> means <code>process started</code> and <code>Prozess endete mit Fehler(n)</code> means <code>process ended with error(s)</code>.)</p> <p>I really don't have any idea how to solve this problem. I uninstalled TL2014. I did not receive any errors or problems during the installation of TL2015, everything went fine. Renaming <code>c:/users/bastian/.texlive2015</code> to <code>c:/users/bastian/.texlive2015incase</code> is not possible: it says that I have to enter a filename when I wanted to add the "...incase".</p>
0non-cybersec
Stackexchange
[SV] finally down to the 60's. So I woke up this morning and saw 267 on my scale. I stepped on it again and saw 267 again. So as of this morning I've lost a total of 76 pounds.
0non-cybersec
Reddit