text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Detect possible WIFI leechers?. <p>If someone is leeching of your WIFI router, would you typically be able to detect this by looking at the connected IP addresses (association list) in the routers admin environment?</p> <p>I've configured my WIFI router to: </p> <ul> <li>use a strong WPA2 PSK key </li> <li>only allow 3 MAC-addresses</li> <li>let the firewall drop all LAN to WAN packets except from 3 IP-addresses</li> </ul> <p>But still I experience a slow connection. Even the ping to the router is very slow. This is probably due to something else than somebody leeching. But still, considering the above security measures, would a leecher typically show up in the association list if there would be one?</p> <p>I'm using a <code>ZyXEL P-2602HW-D1A</code> router by the way.</p>
0non-cybersec
Stackexchange
Unfilled grey area for fncychap and bjornstrup option. <p>I use <code>fncychap</code> and the option <code>Bjornstrup</code> in the following MWE:</p> <pre><code>\documentclass[pdftex,10pt,b5paper,twoside]{book} \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \addto\captionsenglish{\renewcommand{\figurename}{Fig.}} %rename the caption of figures % \addto\captionsenglish{\renewcommand*\contentsname{Table of Contents}} %rename the table of contents \usepackage{setspace} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{amsthm} \usepackage{amsmath} \usepackage{gensymb} % for \degree \usepackage{siunitx} %For SI-enheter \usepackage{wrapfig}%tabell \usepackage{multicol} % enables sizing of table \usepackage{hhline}%multirowtabell \usepackage{tabularx} \usepackage{threeparttable} % environment to handle notes in table \usepackage{multirow, boldline, booktabs} \usepackage[table,xcdraw]{xcolor} %extended colours and for the use in tables \definecolor{steelBlue}{RGB}{70,130,180} \definecolor{tableGrey}{HTML}{EFEFEF} \usepackage{array,float} \usepackage{cellspace} \setlength\cellspacetoplimit{4pt} \setlength\cellspacebottomlimit{4pt} \usepackage{adjustbox} \usepackage{efbox,graphicx} %should be loaded after color package because of define color \efboxsetup{linecolor=steelBlue,linewidth=0.5pt} \usepackage[Bjornstrup]{fncychap} %[Bjornstrup]{fncychap} - Chapters are printed with surrounding shaded box \usepackage[pdftex,bookmarks=true]{hyperref} \definecolor{dgreen}{RGB}{0,150,0} \definecolor{dblue}{RGB}{0,0,180} \hypersetup{ colorlinks=true, citecolor=black, filecolor=black, linkcolor=black, urlcolor=blue, } %Add prefix to hyperref \addto\extrasenglish{% \def\subsubsectionautorefname{}% \def\subsectionautorefname{}% \def\figureautorefname{Fig.}% \def\tableautorefname{Table}% \def\subsectionautorefname{Subsection}% \def\sectionautorefname{Section}% \def\chapterautorefname{Chapter}% \def\Appendixautorefname{Appendix}% \def\algorithmautorefname{Algorithm}% } %\newcommand*{\appendixautorefname}{Appendix} \usepackage[font=small,labelfont=bf]{caption} \usepackage{subcaption} \usepackage{fancyhdr} \usepackage{times} \usepackage{natbib} \bibliographystyle{elsarticle-harv} \setcitestyle{authoryear,open={(},close={)},aysep{,}} %plainnat %abbrvnat %babunsrt %agsm - Harvard %humannat %apalike - Harvard without URLlinks \usepackage{pdfpages} \usepackage[intoc]{nomencl} %Note: needs to come before babelbib \makenomenclature \setlength{\nomlabelwidth}{1.75cm} % \renewcommand{\nomname}{Abbreviations} % \renewcommand{\nompreamble}{The next list describes several symbols that will be later used within the body of the document} \usepackage{etoolbox} \renewcommand\nomgroup[1]{% \item[\bfseries \ifstrequal{#1}{A}{Abbreviations}{% \ifstrequal{#1}{S}{Symbols}}% ]} \usepackage{appendix} \usepackage[section]{placeins} \usepackage{algpseudocode,algorithm,algorithmicx} \newcommand*\Let[2]{\State #1 $\gets$ #2} \algrenewcommand\algorithmicrequire{\textbf{Precondition:}} \algrenewcommand\algorithmicensure{\textbf{Postcondition:}} \newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu} \newcommand{\mybar}[1]{\makebox[0pt]{$\phantom{#1}\overline{\phantom{#1}}$}#1} \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} \pagestyle{fancy} \fancyhf{} \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \renewcommand{\headrulewidth}{0.1ex} \renewcommand{\footrulewidth}{0.1ex} \fancypagestyle{plain}{\fancyhf{}\fancyfoot[LE,RO]{\thepage}\renewcommand{\headrulewidth}{0ex}} \setlength\parindent{0pt} %Set indent length to 0, i.e. \noindent not required \begin{document} %input different chapters %refer to appendix somewhere %Appendix \appendix \pagenumbering{Roman} \addcontentsline{toc}{chapter}{Appendix} \newgeometry{top=4mm,left=5mm,right=5mm, bottom=18mm} \chapter{Specs} \begin{figure} \centering \includegraphics[width=\textwidth]{04_Appendices/terns.pdf} \end{figure} \end{document} </code></pre> <p>Now I want to reduce all margins so that more of the page is available for large charts in general. I plan on using both <code>includepdf</code> and <code>includegraphic</code>. So far I have read elsewhere that this is solved if <code>geometry</code> is defined before <code>fncychap</code>, but I need to redefine the geometry in my appendix and therefore <a href="https://tex.stackexchange.com/questions/301513/geometry-and-fncychap-packages-create-an-ugly-header-how-do-i-correct-that">Geometry and fncychap packages create an ugly header - How do I correct that?</a> does not work.</p> <ol> <li>First, I need to fill the grey area after redefining a new geometry (see picture)</li> <li>What basic commands can I edit the appendix (margins and title/pagenumber placement) with?</li> </ol> <p>Note: not comfortable coding LaTeX and have therefore not been able to solve this from relevant documentation.</p> <p><a href="https://i.stack.imgur.com/07zmI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/07zmI.png" alt="Example of unfilled grey area"></a></p>
0non-cybersec
Stackexchange
Show Inventory command on Cisco. <p>Could someone please confirm if 'show inventory' command works on 'IOS (tm) C3560 Software (C3560-I9-M), Version 12.1(19)EA1d'? If no, what is version and upwards do I need this to get it working?</p>
0non-cybersec
Stackexchange
I drew a seamstress mimikyu that makes their own friends!.
0non-cybersec
Reddit
LEGO Marvel has some nice reference jokes!.
0non-cybersec
Reddit
As promised: 150 burpees.... Done in 18:58. Also bested my mark at 100 in 11:58. I had my Five Guys Bacon Cheeseburger today as well, but [no vomit](http://www.reddit.com/r/Fitness/comments/buofl/the_cosmos_have_aligned_two_posts_from_yesterday/). I forgot to take a HR immediately after, though, and I'm bummed about that. It was about 130 five mins later. It was an interesting sensation, as the only thing hurting when I was done was my lungs and my delts. I was wondering, "Man, did I not jump high enough?" Well, 25 mins later and I feel weak and wobbly all over and barely able to walk or eat my turkey sandwich...
0non-cybersec
Reddit
Windows XP ISO looks for CD. <p>I created a windows XP iso from the windows xp installation CD I have, so I can upload the ISO to proxmox. When I boot the VM and try to install windows XP, it seems to ask for the CD. I assume this is because the MD5 hashes don't match. Is there anyway to fix this, so the iso hash and cd hash match?</p> <p>I used the following command to rip: </p> <pre><code> sudo dd if=/dev/cdrom of=windowsXPsp2.iso bs=blocksize count=volume size </code></pre> <p><img src="https://i.stack.imgur.com/7MBun.png" alt="enter image description here"></p>
0non-cybersec
Stackexchange
Consider round trip identically. <p>I'm having difficulty for encoding the route variable in R in a way that it assumes a unique value when the route is the same, regardless of the origin and destination point (The origin is the first 4 characters of the variable route and the destination is the last 4). The base is as follows:</p> <pre><code>base &lt;- data.frame(route = c("SBAA - SBBE", "SBAA - SBBR", "SBAA - SBCI", "SBBE - SBAA", "SBBE - SBBR", "SBBR - SBBE"), seats = c(1231, 1021, 715, 989, 759, 695)) base &lt;- as_tibble(base) # A tibble: 6 x 2 route seats &lt;chr&gt; &lt;dbl&gt; 1 SBAA - SBBE 1231 2 SBAA - SBBR 1021 3 SBAA - SBCI 715 4 SBBE - SBAA 989 5 SBBE - SBBR 759 6 SBBR - SBBE 695 </code></pre> <p>I thought of doing a transformation to generate the variable code:</p> <pre><code>code &lt;-as.numeric (as.factor (route)) </code></pre> <p>However, the output will be different for same routes (same connecting airports) but with reverse origin and destination airports. For example, "SBAA - SBBE" and SBBE - SBAA "  should have the same code, but will look like this:</p> <pre><code> route seats code &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt; 1 SBAA - SBBE 1231 1 2 SBAA - SBBR 1021 2 3 SBAA - SBCI 715 3 4 SBBE - SBAA 989 4 5 SBBE - SBBR 759 5 6 SBBR - SBBE 695 6 </code></pre> <p>I need routes that have the same connecting airports to have the same code, so that the code variable returns the following result:</p> <pre><code> route seats code &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt; 1 SBAA - SBBE 1231 1 2 SBAA - SBBR 1021 2 3 SBAA - SBCI 715 3 4 SBBE - SBAA 989 1 5 SBBE - SBBR 759 4 6 SBBR - SBBE 695 4 </code></pre> <p>Note that the code for "SBAA - SBBE" is identical to "SBBE - SBAA". Thank you for your help.</p>
0non-cybersec
Stackexchange
Disable tooltip on certain points in Highcharts. <p>I have a Highcharts line chart going and I have tooltips enabled, however, I would like to disable tooltips for the certain case where x=0. Is there a way of doing this? The closest that I have come so far is this:</p> <pre><code>tooltip: { formatter: function() { if (this.x &gt; 0) { return this.x; } else return null; } } </code></pre> <p>This just creates an empty tooltip but there is still a popup.</p>
0non-cybersec
Stackexchange
It was predictable that the target audience of fidget spinners would quickly lose interest in them..
0non-cybersec
Reddit
We are rate limiting the FCC to dialup modem speeds until they pay us for bandwidth.
0non-cybersec
Reddit
How do you change a user&#39;s email address in Phabricator. <p>I've set up phabricator and added several users. I noticed that I can change a user's real name or username, but I am unable to change their email address. Is there some reason why this is not exposed to admins? Is there a server setting that allows admins to change email addresses.</p>
0non-cybersec
Stackexchange
How do a dynamically switch parts of a pipe?. <p>I have a script which should execute a series of commands through a pipe. Depending of the arguments passed to the script:</p> <ul> <li>Either it encrypts the file, computes its hash, and sends it to a REST service.</li> <li>Or it compresses the file, computes its hash, and sends it to a REST service.</li> <li>Or it simply reads the file, computes its hash, and sends it to a REST service.</li> </ul> <pre><code>if [ &quot;$encryption&quot; = &quot;GPG&quot; ]; then gpg2 \ --batch \ --passphrase-file &quot;$keyFile&quot; \ --output - \ --symmetric \ --compress-level &quot;$compressLevel&quot; \ &quot;$filePath&quot; | \ ./scripts/sha1.py --store &quot;$sha1Destination&quot; | \ curl --silent -X PUT --limit-rate &quot;$limitRate&quot; &quot;$uri&quot; -F files[]=@- elif [ &quot;$encryption&quot; = &quot;disabled&quot; ]; then if [ &quot;$compressLevel&quot; &gt; 0 ]; then gzip --stdout &quot;$filePath&quot; -&quot;$compressLevel&quot; | \ ./scripts/sha1.py --store &quot;$sha1Destination&quot; | \ curl --silent -X PUT --limit-rate &quot;$limitRate&quot; &quot;$uri&quot; -F files[]=@- else cat &quot;$filePath&quot; | \ ./scripts/sha1.py --store &quot;$sha1Destination&quot; | \ curl --silent -X PUT --limit-rate &quot;$limitRate&quot; &quot;$uri&quot; -F files[]=@- fi fi </code></pre> <p>The second and third part of each chain of commands remains the same: only the first part changes, being <code>gpg2</code> in one case, <code>gzip</code> in another, and <code>cat</code> in the last one.</p> <p>I'm annoyed by the code duplication for the second and third part of the chain.</p> <p>Is there a way to remove the code duplication, that is to do something like:</p> <pre><code>if [ &quot;$encryption&quot; = &quot;GPG&quot; ]; then ... elif [ &quot;$encryption&quot; = &quot;disabled&quot; ]; then if [ &quot;$compressLevel&quot; &gt; 0 ]; then ... else ... fi fi ... | \ ./scripts/sha1.py --store &quot;$sha1Destination&quot; | \ curl --silent -X PUT --limit-rate &quot;$limitRate&quot; &quot;$uri&quot; -F files[]=@- </code></pre>
0non-cybersec
Stackexchange
Confused with CouchDB and Couchbase. <p>I'm investigating CouchDB and Couchbase as I am looking for a DB solution for a web application that I will eventually be able to make into a native Android/iOS app as well. From what I understand, CouchDB/Couchbase excel at being able to use the DB offline and have it synchronize as soon as the connection is restored.</p> <p>I further understand that CouchDB and Couchbase are 2 distinct products from 2 different organizations - CouchDB is from Apache and Couchbase is from Couchbase. There is a great response in <a href="https://stackoverflow.com/a/15184612/827480">SO here explaining some of the differences</a>.</p> <p>Couchbase has <a href="https://github.com/couchbase/couchbase-lite-android" rel="nofollow noreferrer">Couchbase-Lite-Android</a> and similar for iOS as native embedded DBs for mobile apps which sync with Couchbase server.</p> <p>Where I get lost is when I try to find the CouchDB equivalent. Everything points to TouchDB which then says it is no longer actively developed and instead points to Couchbase-Lite-Android as the project that has superceeded it. But does Couchbase-List-Android/iOS sync with CouchDB or just Couchbase? According to the Wiki, it indicates that it can sync with CouchDB, but it is a secondary backend which receives lower priority and/or bug fixes.</p> <p>So then what are the embedded/mobile versions of CouchDB that should be used for Android/iOS?</p>
0non-cybersec
Stackexchange
Noticed a nod to Monty Python in the new Witcher..
0non-cybersec
Reddit
Was at Costco, and saw a book called "The Brick Bible." Opened it up for some major WTF..
0non-cybersec
Reddit
Trouble with boost::lockfree::queue in shared memory (boost 1.53, gcc 4.7.2 / clang 3.0-6ubuntu3). <p>I have a problem with placing <code>boost::lockfree::queue&lt;&lt;T, fixed_sized&lt;false&gt;, ..&gt;</code> in shared memory. I need it because I have to be able to insert more than 65535 messages into the queue, and fixed_sized queue is limited with 65535.<br> The following code works properly (but <code>capacity&lt;...&gt;</code> option implies <code>fixed_sized&lt;true&gt;</code>):</p> <pre><code>typedef boost::interprocess::allocator&lt; MessageT, boost::interprocess::managed_shared_memory::segment_manager&gt; ShmemAllocator; typedef boost::lockfree::queue&lt; MessageT, boost::lockfree::capacity&lt;65535&gt;, boost::lockfree::allocator&lt;ShmemAllocator&gt; &gt; Queue; m_segment = new boost::interprocess::managed_shared_memory( boost::interprocess::create_only, segmentName, size); Queue* m_queue = m_segment-&gt;construct&lt;Queue&gt;( queueName)( m_segment-&gt;get_segment_manager()); ... m_queue-&gt;bounded_push(message); </code></pre> <p>The following code works properly too (but it doesn't use shared memory):</p> <pre><code>boost::lockfree::queue&lt;MessageT&gt; q; .... q.bounded_push(message); </code></pre> <p>But when I try to combine it:</p> <pre><code>typedef boost::interprocess::allocator&lt; MessageT, boost::interprocess::managed_shared_memory::segment_manager&gt; ShmemAllocator; typedef boost::lockfree::queue&lt; MessageT, boost::lockfree::allocator&lt;ShmemAllocator&gt; &gt; Queue; m_segment = new boost::interprocess::managed_shared_memory( boost::interprocess::create_only, segmentName, size); Queue* m_queue = m_segment-&gt;construct&lt;Queue&gt;( queueName)( m_segment-&gt;get_segment_manager()); ... m_queue-&gt;bounded_push(message); </code></pre> <p>it fails to compile with the following log: </p> <pre><code>In file included from src/model/Queue.h:16: In file included from /home/uppi/lib/include/boost/lockfree/queue.hpp:24: /home/uppi/lib/include/boost/lockfree/detail/freelist.hpp:171:28: error: no viable conversion from 'pointer' (aka 'offset_ptr&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, long, unsigned long, 0UL&gt;') to 'boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node *' return Alloc::allocate(1); ~~~~~~~~~~~~~~~~~ /home/uppi/lib/include/boost/lockfree/detail/freelist.hpp:157:20: note: in instantiation of function template specialization 'boost::lockfree::detail::freelist_stack&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, boost::interprocess::allocator&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;::allocate_impl&lt;true&gt;' requested here return allocate_impl&lt;Bounded&gt;(); /home/uppi/lib/include/boost/lockfree/detail/freelist.hpp:89:20: note: in instantiation of function template specialization 'boost::lockfree::detail::freelist_stack&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, boost::interprocess::allocator&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;::allocate&lt;true, true&gt;' requested here T * node = allocate&lt;ThreadSafe, Bounded&gt;(); /home/uppi/lib/include/boost/lockfree/queue.hpp:281:34: note: in instantiation of function template specialization 'boost::lockfree::detail::freelist_stack&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, boost::interprocess::allocator&lt;boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;::construct&lt;true, true, PacketMessage, boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::node *&gt;' requested here node * n = pool.template construct&lt;true, Bounded&gt;(t, pool.null_handle()); /home/uppi/lib/include/boost/lockfree/queue.hpp:270:16: note: in instantiation of function template specialization 'boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::do_push&lt;true&gt;' requested here return do_push&lt;true&gt;(t); src/model/Queue.inl:4:18: note: in instantiation of member function 'boost::lockfree::queue&lt;PacketMessage, boost::lockfree::allocator&lt;boost::interprocess::allocator&lt;PacketMessage, boost::interprocess::segment_manager&lt;char, boost::interprocess::rbtree_best_fit&lt;boost::interprocess::mutex_family, boost::interprocess::offset_ptr&lt;void, long, unsigned long, 0&gt;, 0&gt;, iset_index&gt; &gt; &gt;, boost::parameter::void_, boost::parameter::void_&gt;::bounded_push' requested here return m_queue-&gt;bounded_push(message); /home/uppi/lib/include/boost/interprocess/offset_ptr.hpp:450:4: note: candidate function operator unspecified_bool_type() const </code></pre> <p>Please tell me what I'm missing</p>
0non-cybersec
Stackexchange
What is this angle calculation rule with $2$ parallel lines?. <p>The rule is that when line n and m are parallel, </p> <p>$$b=a+c$$</p> <p>What's the name of this rule? - You won't believe how many books I've checked.</p> <p><img src="https://i.stack.imgur.com/YaUBem.jpg" alt="image illustration"></p>
0non-cybersec
Stackexchange
Web Cache Deception Attack.
1cybersec
Reddit
Real Madrid 7 - Malaga 0...ouch. Cristiano did a hatttrick !.
0non-cybersec
Reddit
arXiv:math-ph/9811006v1 9 Nov 1998 ar X iv :m at h- ph /9 81 10 06 v1 9 N ov 1 99 8 Symmetry group analysis of relativistic heat conducting fluids C Alexa Particle Physics Dept., IFIN-HH, Bucharest 76900, Romania Abstract. The Lie symmetry group for 1+1 dimensional relativistic heat-conducting fluid is calculated for two different theories, Eckart and Israel-Stewart and a comparison between the group-invariant solutions has been made. Both fluids were founded to be physical acceptable in the sense that during the evolution of the fluid there are three velocity solutions that are decreasing exponentially for particular choices of the initial conditions. PACS numbers: 47.75.+f, 03.40.Gc, 02.20.Sv Submitted to: J. Phys. A: Math. Gen. http://arxiv.org/abs/math-ph/9811006v1 Symmetry group analysis of relativistic fluids 2 1. Introduction Relativistic fluid dynamics provide a simple but intuitive description of many physical systems. The hot and compressed nuclear matter behaves like a compressible fluid and fluid dynamical effects are observed in high energy heavy ion reactions [1]. Supernova or neutron star may be another situation where the relativistic heat-conducting fluid gives a satisfactory description. The standard theory of the relativistic dissipative fluid proposed by Eckart [2] and a similar one by Landau and Lifshitz [3] was analysed by Hiscock and Lindblom [4, 5, 6, 7] and it was found to be unstable, acausal and ill posed in the linear regime near equilibrium. A more complicated extended hydrodynamic theory has been proposed by Israel and Stewart [8, 9, 10] which is free of the most part of the troubles of the standard theory. The Hiscock and Lindblom studies were dedicated to causality, stability, hyperbolicity and to the connection between them. In [7] the solution discussion was restricted to spatially homogeneous fluid. This paper will improve the dimensional restriction considering the evolution equations for the plane symmetric motion (1+1 dimensional) of the relativistic heat-conducting fluid and propose a complementary analysis dedicated to group-invariant solutions study. Symmetry analysis is a systematic and accurate way to obtain solutions of differential equations. The Lie symmetry group method is well known but the major obstacle in the application of this method to partially differential equations is the large number of tedious calculations usually involved. We begin our analysis by the calculation of the Lie symmetry group for both Eckart and Israel-Stewart fluids using, for the equation of state, the high temperature limit of the ideal gas, where p = ρ/3 = nkT . This constraint allows us to eliminate from the fluid equations two dependent variables, in particular, we substitute the temperature T and the pressure p in favour of the energy density ρ and the number density n. Next, we make a systematic classification of the solutions constructing the optimal system of transformations. The investigation of the solutions is completed by solving the reduced system of equations; we present both analytical and numerical solutions. Section 2 will display the system of equations of the relativistic dissipative fluid in its general form eqs. (1) and in the particular case of heat-conducting theory eqs. (4). The application of the Lie symmetry group method to differential equations and the corresponding Lie algebra of the fluid equations (4) are presented in Section 3. Section 4 is devoted to integrability conditions and invariants, Section 5 to the classification of the solutions and Section 6 to group invariant solutions analysis. Possible applications of the group-invariant solutions to high energy collisions, miscellaneous comments and final conclusions are discussed in Section 7. Symmetry group analysis of relativistic fluids 3 2. Dissipative relativistic fluid mechanics In the particle frame, used by Eckart, the energy tensor T αβ and the particle flux vector Nα take the form [8]: T αβ = ρuαuβ + (p+ σ) ( gαβ + uαuβ ) + qαuβ + qβuα + σαβ Nα = nuα (1) where uα is a unit time-like vector field which may be thought of as the four-velocity of the fluid, gαβ is the Minkowski metric diag(-1,1,1,1), ρ the energy density of the fluid, p the thermodynamical pressure, n the number density, qα is the heat flow, σ the bulk stress and σαβ the shear stress. The heat conducting case is obtained by setting σ = 0 and σαβ = 0. In this particular condition the heat flow obeys the following phenomenological law [8]: qα = −κT ( gαβ + uαuβ ) ( T−1∂βT + u µ∂µuβ + β̄1u µ∂µqβ ) (2) where beside the usual thermal conductivity κ and temperature T we have a new phenomenological coefficient β̄1 [8]. Setting β̄1 = 0 we obtain the standard Eckart heat conducting fluid theory. The conservation laws: ∂αT αβ = 0, ∂αN α = 0 (3) and the equation (2) form the complete system of equations of the general theory of relativistic dissipative fluids. If we write the four-velocity in the form uα = (coshΨ, sinhΨ, 0, 0), the heat flow vector, which is orthogonal to uα, will be qα = q (sinhΨ, coshΨ, 0, 0) and the system of equations of the fluid becomes: sinhΨ∂xn− coshΨ∂tn+ n coshΨ∂xΨ− n sinhΨ∂tΨ = 0 coshΨ∂tρ− sinhΨ∂xρ+ sinhΨ∂tq − coshΨ∂xq + [(p+ ρ) sinhΨ + 2q coshΨ] ∂tΨ− [(p+ ρ) coshΨ + 2q sinhΨ] ∂xΨ = 0 coshΨ∂xp− sinhΨ∂tp + sinhΨ∂xq − coshΨ∂tq − [(p+ ρ) coshΨ + 2q sinhΨ] ∂tΨ+ [(p+ ρ) sinhΨ + 2q coshΨ] ∂xΨ = 0 T−1 (coshΨ∂xT − sinhΨ∂tT ) + β̄1 (sinhΨ∂xq − coshΨ∂tq) + sinhΨ∂xΨ− coshΨ∂tΨ+ q κT = 0 (4) We will supplement the eqs. (4) by an equation of state (EOS) for the fluid and a thermodynamic expression for β̄1. Choosing the high temperature limit of an ideal gas, the equation of state is p = ρ/3 = nkT (5) Finally, we take the thermal conductivity to be constant and the second-order thermodynamic coefficient β̄1 to be given by β̄1 = 5λ/4p; the parameter λ will be 1 for the Israel-Stewart theory and 0 for the Eckart theory. The equation (5) allows us to eliminate T and p in favour of ρ and n, obtaining finally a closed set of evolution equations for four variables (Ψ, n, ρ, q). Symmetry group analysis of relativistic fluids 4 3. Symmetry group of transformations and its Lie algebra The symmetry group of a system of differential equations is the largest local group of transformations acting on the independent and dependent variables of the system with the property that it transforms solutions of the system to other solutions. Let S be a system of differential equations. A symmetry-group of the system S is a local group of transformations G acting on an open subset M of the space of independent and dependent variables of the system with the property that whenever u=f(x) is a solution of S, and whenever g · f is defined for g ∈ G, then u = g · f(x) is also a solution of the system. The symmetry group infinitesimal generator is defined by : ~V = τ∂t + ξ∂x + Φ∂Ψ + Σ∂n + Γ∂ρ + Ω∂q (6) and the first order prolongation of ~V is: pr(1)~V = ξ∂x + τ∂t + Φ∂Ψ + Σ∂n + Γ∂ρ + Ω∂q +Φx∂Ψx + Φ t∂Ψt + Σ x∂nx + Σ t∂nt +Γx∂ρx + Γ t∂ρt + Ω x∂qx + Ω t∂qt (7) where, for example, Φx = Dx(Φ− ξΨx − τΨt) + ξΨxx + τΨxt (8) and DxΦ = Φx+ΦΨΨx +Φnnx+Φρρx+Φqqx is the total derivative and Φx = ∂xΦ, etc. Suppose ∆ν(x, u (n)) = 0, ν = 1, ..., l, is a system of differential equations, where u(n) = (Ψ, n, ρ, q,Ψx,Ψt, ..., qtt). If G is a local group of transformations acting onM and pr(n)~V [ ∆ν(x, u (n)) ] = 0, ν = 1, ..., l, whenever ∆(x, u(n)) = 0, for every infinitesimal generator ~V of G, then G is a symmetry group of the system. The standard procedure‡ is based on finding the infinitesimal coefficient functions ξ, τ,Φ,Σ,Γ and Ω. Substituting the general formulae for Φx,Σx, etc. and equating the coefficients of various monomials in the first and second order partial derivatives of Ψ, n, ρ and q, we find the defining equations. We wish to determine all possible coefficient functions ξ, τ,Φ,Σ,Γ and Ω by solving the defining equations system so that the corresponding one-parameter group exp(ε~V) will be the symmetry group of the equations (4). These solutions are: Eckart : τ = c1 + tc4, ξ = c2 + xc4, Φ = 0, Σ = −nc4, Γ = ρc3, Ω = qc3 Israel− Stewart : τ = c1 + tc4, ξ = c2 + xc4, Φ = 0, Σ = 0, Γ = ρc3, Ω = qc3 (9) where ci are constants. The basis of the corresponding Lie algebra are: Eckart : V1 = ∂t, V2 = ∂x, V3 = ρ∂ρ + q∂q, V4 = t∂t + x∂x − n∂n Israel− Stewart : V1 = ∂t, V2 = ∂x, V3 = ρ∂ρ + q∂q, (10) ‡ A good description can be found in [11] Symmetry group analysis of relativistic fluids 5 4. Solvable group and invariants Because we have the Lie algebra of the equations (4) we want to know if the general solution of the system of differential equations can be found by quadratures. This thing is possible if the Lie group is solvable. The requirement for solvability is equivalent to the existence of a basis {V1, . . . , Vr} of Lie algebra g such that [Vi, Vj] = j−1 ∑ k=1 ckijVk (11) whenever i < j. Looking at the commutator table of the Lie algebra we will see that the requirement of solvability is fulfilled for both Eckart and Israel-Stewart theories. Table 1. Commutator table for the Eckart and Israel-Stewart algebra [ , ] V1 V2 V3 V4 V1 0 0 V1 0 V2 0 0 V2 0 V3 -V1 -V2 0 0 V4 0 0 0 0 [ , ] V1 V2 V3 V1 0 0 V1 V2 0 0 V2 V3 -V1 -V2 0 We use the method of characteristics to compute the invariants of the Lie algebra hopping that the reduced system, which can be obtained using the invariants of the group, will help us to solve the system of equations (4). An n-th order differential invariant of a group G is a smooth function depending on the independent and dependent variables and their derivatives, invariant on the action of the corresponding n-th prolongation of G [11]. Suppose that we have the following generator: Vi = τi∂t + ξi∂x + Φi∂Ψ + Σ∂n + Γi∂ρ + Ωi∂q (12) A local invariant ζ of Vi is a solution of the linear, homogeneous first order partial differential equation: Vi(ζ) = τi∂tζ + ξi∂xζ + Φi∂Ψζ + Σi∂nζ + Γi∂ρζ + Ωi∂qζ = 0 (13) The classical theory of such equations shows that the general solution of equation (13) can be found by integrating the corresponding characteristic system of differential equations, which is dt τi = dx ξi = dΨ Φi = dn Σi = dρ Γi = dq Ωi (14) Doing this integration we get, in this case, five invariants; we now re-express the next generator of Lie algebra in terms of these five invariants and then we perform another integration. We continue this calculation until we re-express and integrate the last generator; at this point we obtain a set of invariants that represent the system of independent invariants of this group. The system of invariants can be used to reduce the order of the original equations - constructing the reduced order system of equations. Doing this one can hope to find simple equations that can be integrated (for example [11]). Symmetry group analysis of relativistic fluids 6 5. Classification of group-invariant solutions A solution of the system of partial differential equations is said to be G-invariant if it is unchanged by all the group transformations in G. In general, to each s-parameter subgroup H of the full symmetry group G of a system of differential equations, there will correspond a family of group-invariant solutions. Since there are almost always an infinite number of such subgroups, it is not usually feasible to list all possible group- invariant solutions of the system. We need an effective systematic means of classifying these solutions, leading to an optimal system of group-invariant solutions from which every other solution can be derived. Since the elements g ∈ G not in the subgroup H will transform anH-invariant solution to some other group-invariant solution, only those solutions not so related need to be listed in our optimal system. An optimal system of s-parameter subgroups is a list of conjugancy inequivalent s-parameter subgroups with the property that any other subgroup is conjugate to precisely one subgroup in the list (conjugancy map: h → ghg−1). Let G be a Lie group with Lie algebra g ; for each v ∈ g , the adjoint vector ad v at w ∈ g is ad v|w = [w, v] = −[v, w]. If v ∈ g generates the one- parameter subgroup H = [exp(εv) : ε ∈ ℜ], then Ad g(v) will generate the conjugate one-parameter subgroup gHg−1. Now we can construct the adjoint representation Ad G of the Lie group by summing the Lie series Ad(exp(εv))w = ∞ ∑ n=0 εn n! (ad v)n(w) = w − ε[v, w] + ε2 2 [v, [v, w]]− ... (15) obtaining the adjoint table. Table 2. Adjoint table for Eckart and Israel-Stewart algebra. Ad V1 V2 V3 V4 V1 V1 V2 V3 − εV1 V4 V2 V1 V2 V3 − εV2 V4 V3 e εV1 e εV2 V3 V4 V4 V1 V2 V3 V4 Ad V1 V2 V3 V1 V1 V2 V3 − εV1 V2 V1 V2 V3 − εV2 V3 e εV1 e εV2 Finding the optimal system is a well known standard method [11]; we have found an optimal system of one-dimensional (a ∈ ℜ) sub-algebras to be that spanned by: Eckart Israel− Stewart 1) ∂x ∂x 2) ∂t ∂t 3) x∂x + t∂t − n∂n x∂x + t∂t − n∂n 4) ∂t + a∂x ∂t + a∂x 5) x∂x + t∂t − n∂n + aρ∂ρ + aq∂q 6) ρ∂ρ + q∂q + a∂x + ∂t 7) ρ∂ρ + q∂q + ∂x 8) ρ∂ρ + q∂q + ∂t 9) ρ∂ρ + q∂q (16) Symmetry group analysis of relativistic fluids 7 6. Group-invariant solutions study Each symmetry of the optimal system of transformations (16) will be treated separately. 1) The fluid is spatially homogeneous and because the reduced system is very simple the fluid equations can be immediately integrated analytically. The Figure 1 shows that, for any initial state, the Eckart theory is unstable: as t → ∞ then v → 1 ⇒ T → ∞, n → 0, ρ = 3p → 3E0 and q → −2E0. The same thing happens, for the Israel-Stewart theory, only if the initial velocity is higher than the critical value 0.76 but it can be stable for initial values v < 0.76, where v = tanhΨ. This spatially homogeneous case was also studied by Hiscock and Lindblom [7] and they found the critical value around vc = 0.51. 5 10 15 t 0.2 0.4 0.6 0.8 1 v Israel 5 10 15 20 t 0.4 0.5 0.6 0.7 0.8 v Eckart Figure 1. Israel-Stewart and Eckart velocity solution, where t is 4kN0 χ t. 2) Also in this stationary case, the reduced system is very easy to integrate and the space dependence of the velocity can be observed in the Figure 2. For the Eckart fluid, if the initial velocity is higher then 0.77 then as x → ∞ we have v → 1 ⇒ T → ∞, n → 0, ρ = 3p → 3E0, q → −2E0. If we correlate this stationary behaviour with the previous result, we can comment that the stationary solution will increase in time for any initial Eckart velocity conditions; the Stewart-Israel fluid has the chance to decrease when t → ∞, x → ∞ for a initial velocity smaller that 0.76. 0.6 0.8 1 1.2 1.4 x 0.1 0.2 0.3 0.4 0.5 v Israel 2 4 6 8 10 x 0.6 0.7 0.8 0.9 1 v Eckart Figure 2. Israel-Stewart and Eckart velocity solution, where x is 4kN0 χ x. 3) The invariants of the characteristic equation dx/x = dt/t = −dn/n are α = n · t, y = x/t and for the Eckart fluid the reduced system of equations take Symmetry group analysis of relativistic fluids 8 the following form: α−1αy = − d dy [ln (sinhΨ + y coshΨ)] ⇒ α = N0 (sinhΨ + y coshΨ) −1 q = ρy 6Ψy (1 + y2) cosh(2Ψ) + 2(−1 + y2 + y sinh(2Ψ) 1− y2 3qy + 4ρΨy + ρy 2y cosh(2Ψ) + (1 + y2) sinh(2Ψ) 1− y2 = 0 ρy − 3kN0 χ q sinhΨ + y coshΨ + 2ρ 1 + [(1 + y2) cosh(2Ψ) + 2y sinh(2Ψ)]Ψy (1 + y2) sinh(2Ψ) + 2y cosh(2Ψ) = 0 (17) where Ψy = dΨ dy ,etc.. The system of equations can be decoupled and the behaviour of the velocity numerical solution can be observed in the first picture of the Figure 3. 5 10 15 20 25 30 x ����� t 0.2 0.4 0.6 0.8 1 v Eckart 1 2 3 4 5 6 7 x+t 0.2 0.4 0.6 0.8 1 v Eckart Figure 3. Eckart velocity solution for the 3rd and 4th optimal transformations. It is important to mention that the first picture of the Figure 3 shows that we have both exponentially increasing and decreasing solutions, which means that we found a good Eckart velocity solution. Also important is that if the initial velocity is smaller than 0.75 we have only decreasing solutions. Further numerical investigations of the equation are needed in order to obtain information about the stability, initial condition dependence, etc.. For the Israel-Stewart fluid the reduced system is much more complicated and we didn’t succeed to solve the equations. 4) For this optimal transformation the invariant is y = t− ax; if we choose a = −1 the reduced system can be easily decoupled and for the Eckart fluid the solutions are: v = tanh [ ln [ √ χC1/(kN0) tanh ( √ χC1/(kN0)(y − C2) )]] n = N0 √ (1 + v)/(1− v), ρy = 0, q = 2χ 3kN0 ρ vy (1 + v)2 (18) The velocity solution is ploted in the second picture of the Figure 3. This t + x dependence is typical for a wave type solution but as y = t+ x → ∞ we arrive again to wrong physical situation: v → 1 ⇒ n → ∞, T → 0. The choice a = −1 does not affect the physics, it can change the x axes direction or it can scale the space coordinate. The Israel-Stewart reduced system is also integrable but we found complex velocity solution. Symmetry group analysis of relativistic fluids 9 5) The invariants are β = n·x, y = x/t, w = ρ·ta, θ = q/ρ. After some calculations, the reduced system of equations becomes: β = N0y/(sinhΨ + y coshΨ) w−1wy = −{(ln [(sinhΨ + y coshΨ)(coshΨ + y sinhΨ)])y + (a− 2) sinhΨ coshΨ + y sinhΨ + a((1 + y) sinh(2Ψ) + 2y) (sinhΨ + y coshΨ)(coshΨ + y sinhΨ)(6(y2 − 1)Ψy − 3a) } [ 1 + 3kN0 χ 2y cosh(2Ψ) + (1 + y2) cosh(2Ψ) + 2(y2 − 1) (sinhΨ + y coshΨ)(coshΨ + y sinhΨ)(6(y2 − 1)Ψy − 3a) ] −1 θ = [w−1wy (2y cosh 2Ψ + (1 + y 2) cosh 2Ψ + 2(y2 − 1)) + a ((1 + y) sinh 2Ψ + 2y)] (6(y2 − 1)Ψy − 3a) wy w (y sinh 2Ψ + cosh 2Ψ− 2− 3yθ)− 3yθy + a (sinh 2Ψ− 3θ)− 2 (2y + 3θ)Ψy = 0 (19) The system of equations can be decoupled and solved numerically. The behaviour of the numerical velocity solution is the same as that was founded for the third optimal transformation; ofcourse, more precise numerical investigations are also needed. 6) In this case the invariants are y = x ± at, σ = ρ exp (−t), α = q/ρ and the reduced system is: ny (sinhΨ− a coshΨ) + n (coshΨ− a sinhΨ)Ψy = 0 σ−1σy (a coshΨ− sinhΨ + aα sinhΨ− α coshΨ) + αy (a sinhΨ− coshΨ) + coshΨ + α sinhΨ + [4/3 (a sinhΨ− coshΨ) + 2α (a coshΨ− sinhΨ)]Ψy = 0 σ−1σy (1/3 coshΨ− 1/3a sinhΨ + α sinhΨ− aα coshΨ) +αy (sinhΨ− a coshΨ)− 1/3 sinhΨ− α coshΨ + [4/3 (sinhΨ− a coshΨ) + 2α (coshΨ− a sinhΨ)]Ψy = 0 coshΨ (ρ−1ρσ−1σ − n−1ny)− sinhΨ [ρ −1ρ (aσ−1σ + 1)− n−1ny] + (sinhΨ− a coshΨ)Ψy + 3nαk/κ = 0 (20) We can decouple the equations and in the end we obtain the following equation: Ψyy + k1Ψ 2 y + k2f (Ψ)Ψy + k3g (Ψ) = 0 (21) where k1,2,3 are constants and f (Ψ) , g (Ψ) are known functions of Ψ. The equation (21) is integrable [12]; because the integration algorithm is very long we will present only the final form of the equation that can be integrated: dΨ(y)/dy = −tξ′(t) exp (C2Ψ) (22) where ξ = C4 exp [(2− C2)Ψ] and Ci are constants; t, which is a function of Ψ via ξ, has to be found from the equation t2ξ′′(t) +C4ξ(t) = 0. Because the analytical solution formula is very long and complicated we don’t write it here, we prefer to mention that it has the same exponentially increasing trouble founded before. For the 7),8) and 9) transformation we can’t reduce the fluid system of equations. Symmetry group analysis of relativistic fluids 10 7. Summary and outlook The Lie symmetry group method was applied to two different relativistic heat- conducting fluid theories, the Eckart theory and the Israel-Stewart theory, and a comparison between them has been made. We may summarise the results as follows: • applying the Lie symmetry group method to both fluids, we found that the Lie algebra of the Eckart theory has an additional transformation, namely the space, time and particle density dilatation (V4). • a systematic classification of the solutions is done by constructing the optimal system of transformations. • solving all the Eckart’s reduced systems of equations, we found that during the evolution of the fluid, there are, beside the exponentially increasing velocities, also solutions with good physical behaviour; we mention that in the 1 dimensional approximation, for the Eckart theory, there are only exponentially increasing solutions. • due to a different (more complicate) phenomenological law, the optimal transformation system of the Israel-Stewart theory is trivial and as a consequence the reduced systems of equations are not very much simplified but the transformation invariants; anyway, we found good physical behaviour for the spatially homogeneous and stationary solutions. Due to the fact that each fluid has a different phenomenological law, the corresponding symmetry groups is different. We considered here only two values for the parameter λ that leads us to some well known fluids, but performing the same kind of analysis for other λ values, we could shed some light on the domain in which the relativistic heat-conducting fluid theory is well behaved. Taking into account the bulk stress and the shear stress, the phenomenological law becomes more general but then the fluid equations will be more difficult to solve and in spite of the tremendous work needed, it is possible to obtain a very simple symmetry group that does not help very much on the reduced system integration. It is important to point out that we are looking to find the simplest well behaved fluid theory in order to be solved much easier. Anyway, it is an open subject that needs some attention. Because the 1+1 dimensional approximation is appropriate to describe the collision of two highly Lorentz contracted heavy ions, further analysis of the relativistic fluid, with or without viscosities, with different λ values, etc., are very important because, for some years, any theoretical predictions can be compared with the experimental data that were taken at AGS or CERN. The concept of a quark-gluon plasma (QGP) predicted for heavy ion collisions [13] has been the driving force for the experimental and theoretical studies of hadronic matter at high energy densities. A lot of theoretical work has been done in order to use the hydrodynamical models in heavy ion physics and several models based on relativistic hydrodynamics exist, the reader is reffered to Refs. [1, 14, 15]. Symmetry group analysis of relativistic fluids 11 Acknowledgments I wish to thank prof. M. Vişinescu for continue encouraging this work. References [1] Proc. of the Int. Workshop on Applicability of Relativistic Hydrodynamical Models in Heavy Ion Physics edited by Csernai L P 1997 Heavy Ion Physics 5 321-474 [2] Eckart C 1940 Phys. Rev. 58 919 [3] Landau L D and Lifshitz L 1958 Fluid Mechanics (Addison-Wesley, Reading, Mass.) Sec. 127 [4] Hiscock W and Lindblom L 1983 Ann. Phys. 151 466 [5] Hiscock W and Lindblom L 1985 Phys. Rev. D 31 725 [6] Hiscock W and Lindblom L 1987 Phys. Rev. D 35 3723 [7] Hiscock W and Lindblom L 1988 Phys. Lett. A 131 509 [8] Israel W 1976 Ann. Phys., NY 100 310 [9] Israel W and Stewart J M 1979 Proc. R. Soc. A 357 43 [10] Israel W and Stewart J M 1979 Ann. Phys., NY 118 341 [11] Olver P J Applications of Lie Groups to Differential Equations 1986 (Springer Verlag) [12] Kamke E 1961 Diff. Lösungsmethoden und Lösungen (Acad. Verlag) [13] For example, Müller B Lecture given at the NATO Advanced Study Institute DUKE-TH-92-36 [14] Strottman D 1994 Nucl. Phys. A 566 245c [15] Bjorken J D 1983 Phys. Rev. D 27 140
0non-cybersec
arXiv
Hacking The Gibson.
1cybersec
Reddit
MIT’s design for Mars city habitats win first prize.
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
Building a shared library using gcc on Linux and MinGW on Windows. <p>I'm having trouble with generating a build setup that allows shared libraries to be built in both Linux and Windows using gcc and MinGW, respectively. In Linux, a shared library doesn't have to resolve all dependencies at compile time; whereas, this appears to the case in Windows. Here is the problem setup:</p> <hr> <pre><code>$ cat foo.h #ifndef FOO_H #define FOO_H void printme(); #endif </code></pre> <hr> <pre><code>$ cat foo.c #include "foo.h" #include &lt;stdio.h&gt; void printme() { printf("Hello World!\n"); } </code></pre> <hr> <pre><code>$ cat bar.h #ifndef BAR_H #define BAR_H void printme2(); #endif </code></pre> <hr> <pre><code>$ cat bar.c #include "bar.h" #include "foo.h" void printme2() { printme(); printme(); } </code></pre> <hr> <pre><code>$ cat main.c #include "bar.h" int main(){ printme2(); } </code></pre> <hr> <pre><code>$ cat Makefile .c.o: gcc -fPIC -c $&lt; all: foo.o bar.o main.o gcc -shared foo.o -o libfoo.so gcc -shared bar.o -o libbar.so gcc main.o -Wl,-rpath=. -L . -lbar -lfoo -o main </code></pre> <hr> <p>Now, in Linux, this compiles and runs just fine:</p> <pre><code>$ make gcc -fPIC -c foo.c gcc -fPIC -c bar.c gcc -fPIC -c main.c gcc -shared foo.o -o libfoo.so gcc -shared bar.o -o libbar.so gcc main.o -Wl,-rpath=. -L . -lbar -lfoo -o main $ ./main Hello World! Hello World! </code></pre> <p>In Windows, we need to change so to dll, which is minor and fine:</p> <pre><code>$ cat Makefile .c.o: gcc -fPIC -c $&lt; all: foo.o bar.o main.o gcc -shared foo.o -o libfoo.dll gcc -shared bar.o -o libbar.dll gcc main.o -Wl,-rpath=. -L . -lbar -lfoo -o main </code></pre> <p>However, when we try to build, we get the following error:</p> <pre><code>$ make gcc -fPIC -c foo.c foo.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] gcc -fPIC -c bar.c bar.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] gcc -fPIC -c main.c main.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] gcc -shared foo.o -o libfoo.dll gcc -shared bar.o -o libbar.dll bar.o:bar.c:(.text+0x7): undefined reference to `printme' bar.o:bar.c:(.text+0xc): undefined reference to `printme' collect2.exe: error: ld returned 1 exit status make: *** [all] Error 1 </code></pre> <p>Now, we can fix the error by simply including the objects from foo.o into libbar.dll:</p> <pre><code>$ cat Makefile .c.o: gcc -fPIC -c $&lt; all: foo.o bar.o main.o gcc -shared foo.o -o libfoo.dll gcc -shared bar.o foo.o -o libbar.dll gcc main.o -Wl,-rpath=. -L . -lbar -lfoo -o main $ make gcc -fPIC -c foo.c foo.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] gcc -fPIC -c bar.c bar.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] gcc -fPIC -c main.c main.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] gcc -shared foo.o -o libfoo.dll gcc -shared bar.o foo.o -o libbar.dll gcc main.o -Wl,-rpath=. -L . -lbar -lfoo -o main $ ./main Hello World! Hello World! </code></pre> <p>However, I don't like this approach since libbar.dll now contains symbols for both foo and bar. In Linux, it only contains symbols for bar. This separation is important for situations where a library depends on some standard numerical library like BLAS. I'd like to be able to deploy the shared library and have it depend on the optimized version of the numerical library on the user's machine and not my own.</p> <p>In any case, what's the proper procedure to create a shared library where not all of the symbols are present at compile time?</p> <p>In case it matters, I compiled these examples with gcc 4.6.3 on Linux and mingw-get-inst-20120426.exe with gcc 4.7.2 on Windows.</p>
0non-cybersec
Stackexchange
Prebuilt binaries of GCC 4.6.2 for Android ARM/x86.
0non-cybersec
Reddit
TIL donuts were invented in New York and were originally called "Oily Cakes". The name later changed to Donut because nuts were added to the middle because the center would not cook properly..
0non-cybersec
Reddit
Characterization of pseudo split epimorphisms in Cat. <p>Is there an easy way to characterize pseudo split epimorphisms in Cat?</p> <p>Obs: A pseudo split epimorphism in Cat is a functor $F: E\to B $ such that there is a functor $ M: B\to E $ and a natural isomorphism $\alpha : FM\to Id _ B $.</p> <p>Thank you in advance</p>
0non-cybersec
Stackexchange
Stop pretending bathrooms are the greatest threat to young girls..
0non-cybersec
Reddit
Ragnarok Global Box Office Explodes to $427 Million.
0non-cybersec
Reddit
Split function - avoid last empty space. <p>I have a doubt on how to use the split function.</p> <pre><code>str = 'James;Joseph;Arun;' str.split(';') </code></pre> <p>I got the result <code>['James', 'Joseph', 'Arun', '']</code></p> <p>I need the output as <code>['James', 'Joseph', 'Arun']</code></p> <p>What is the best way to do it?</p>
0non-cybersec
Stackexchange
My friends sons laugh.
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
[Updated/More Recent]: The scale of the moon compared to dwarf planets....
0non-cybersec
Reddit
How to set up Asus RT-N66U in bridge mode with wired connection to main router?. <p>I have a wired router (TP-Link RT-860) in the basement where the cable service comes in. Eight wired ethernet connections span two buildings. I currently have a Linksys wireless router set up in bridge mode, but its signal doesn't span the whole area. I have purchased an Asus RT-N66U to replace it, but I can't figure out how to set it up in bridge mode. Does anyone know if this is possible? Second question: Would there be any advantage in installing DD-WRT on the Asus?</p>
0non-cybersec
Stackexchange
White socks?. Need an amazing pair of white socks, very bright and high. A bit thicker than dress socks as well. Thanks in advance!
0non-cybersec
Reddit
Finding moment estimator. <p>I am required for a homework question to find moment and maximum likelihood estimators, and in class we have only looked at finding MLEs and using already known moment estimators, hence I have no idea how to find the moment estimator myself. I have looked it up and done a little research, but I simply have no idea how go start. Is there some formula?</p> <p>Sorry I don't want to post the question on fear of plagiarism concerns.</p>
0non-cybersec
Stackexchange
ar X iv :1 00 9. 37 53 v2 [ q- fi n. P M ] 6 J an 2 01 1 Transaction fees and optimal rebalancing in the growth-optimal portfolio Yu Feng1,2, Matúš Medo3, Liang Zhang4, Yi-Cheng Zhang1,2,3,4 1 Physics Department, Renmin University, 100872 Beijing, PR China 2 Complexity Research Center, USST, 200093 Shanghai, PR China 3 Physics Department, University of Fribourg, 1700 Fribourg, Switzerland 4 Lab of Information Economy and Internet Research, University of Electronic Science and Technology, 610054 Chengdu, PR China Abstract The growth-optimal portfolio optimization strategy pioneered by Kelly is based on constant portfolio rebalancing which makes it sensitive to transaction fees. We examine the effect of fees on an example of a risky asset with a binary return dis- tribution and show that the fees may give rise to an optimal period of portfolio rebalancing. The optimal period is found analytically in the case of lognormal re- turns. This result is consequently generalized and numerically verified for broad return distributions and returns generated by a GARCH process. Finally we study the case when investment is rebalanced only partially and show that this strategy can improve the investment long-term growth rate more than optimization of the rebalancing period. Keywords: growth-optimal portfolio, Kelly game, transaction fees, lognormal distri- bution. 1 Introduction Portfolio optimization is one of the main topics in quantitative finance. The aim is to maximize investment return while simultaneously minimizing its risk (see [1, 2] for a review of the modern portfolio theory). Pioneering works on this problem were mainly focused on the Mean-Variance approach [3] where the portfolio variance is minimized under the constraint of a fixed expected return value. A different approach has been put forward by Kelly [4] who focused on repeated investments and proposed to maximize the long-term growth rate of the investor’s capital. This so-called growth-optimal or Kelly portfolio has been shown to be optimal according to various criteria [5] and generalized in different ways. For example, the question of diversification and constant rebalancing among a certain 1 http://arxiv.org/abs/1009.3753v2 number of uncorrelated stocks was investigated in [6]. In [7], the authors showed that there is a close connection between the Mean-Variance approach and the Kelly portfolio and that in many cases, the Kelly-optimal portfolio includes only a small fraction of the available profitable assets. When investing in games without specified levels of risk and reward, the Kelly criterion can be merged with Bayesian statistical learning as in, for example, [8, 9], yielding generalized results for the optimal investment fractions. Stochastic portfolio theory [10] is also a descendant of Kelly’s approach by utilizing on a logarithmic representation of price processes. Application of Kelly’s optimization process to real stock prices was studied in [11] with the conclusion that non-trivial investment (i.e., investing only a part of one’s wealth) oc- curs rarely. This is related to the general notion that Kelly’s portfolio is very aggressive and investment outcomes are sensitive to errors in estimates of assets’ properties. Modi- fications such as fractional Kelly strategies [12] and controlled downturns [13] have been consequently proposed to make the resulting portfolios more secure (these modifications can be of particular importance for risky assets [14]). Optimization in the long-term can even explain the emergence of cooperation in environments where outcomes of the partic- ipants are of multiplicative nature [15]. An interested reader is referred to [14, 16] for a comprehensive introduction to the Kelly portfolio. Kelly’s optimization scheme is based on the long-term prospects of the investor and requires continual rebalancing of the portfolio which ensures that the investment fraction is kept constant. This rebalancing represents the key advantage of the Kelly portfolio over the simple buy-and-hold strategy. On the other hand, when non-zero transaction costs are imposed, resulting investment performance may deteriorate considerably (for an example of how the transaction costs influence real traders and their decisions see [17]). In this paper we intend to study the effect of non-zero transaction costs on the Kelly portfolio. We study the situation where portfolio is rebalanced less often (intermittent rebalancing). Our key quantity of interest is the optimal rebalancing period which minimizes the negative effects of transaction fees while maintaining the positive effects of frequent rebalancing. Another reason for intermittent rebalancing is that the distribution of returns may dif- fer from one turn to another. We approach this problem by postulating a risky asset which evolves on two different time scales and its return distribution hence regularly varies in time. This setting allows us to study the interplay between the time scales and portfolio rebalancing. Considering a risky asset with a lognormal return distribution allows us to obtain an analytical form for the optimal rebalancing period. This result is further general- ized to other stationary return distributions with finite variance and used to explain some observations made for binary return distributions. Our numerical simulations show that similar behavior can be observed even for returns generated by the standard GARCH(1, 1) process where consecutive returns are not independent. Finally, we briefly study partial rebalancing where the investor transfers only a certain part of the required amount between cash and the risky asset. We show that this strategy can enhance the long-term growth rate more than intermittent rebalancing. 2 2 Basic Model Consider a situation where an investor with an initial wealth W0 is allowed to repeatedly invest a fraction f of the current wealth to a risky asset while keeping the rest in cash. We assume that the asset price x(t) undergoes a multiplicative stochastic process x(t + 1) = { x(t)(1 + r1) with probability 1 2 + P1, x(t)(1− r1) with probability 12 − P1 (1) at discrete time steps t (t = 1, 2, 3, . . . ) and x(1) = 1. Here r1 is a positive parameter (0 < r1 ≤ 1) representing the rate of gain or loss of the investment, 12 +P1 is the “winning” probability and P1 ∈ (0, 12 ] (when P1 < 0, the asset is not profitable and it is advisable to refrain from investment); it is assumed that they are both constant and known to the investor.1 This “symmetric” setting can be easily generalized by assuming distinct rates of gain/loss (e.g., r1 and r ′ 1) as well as their probabilities (e.g., P1 and P ′ 1). To keep the notation simple and to limit the number of parameters to minimum, we treat only the symmetric case here. By setting r1 = 1, one recovers the original Kelly game studied in [4]. Since asset’s properties do not change with time and investor’s wealth follows a multi- plicative process, the investment fraction set by a rational investor has to be the same in all time steps. Investor’s wealth after N investment turns is therefore WN = W0(1 + fr1) w(1− fr1)N−w (2) where w and N −w is the number of “winning” and “loosing” turns, respectively. Now we can introduce a so-called exponential growth rate of investor’s wealth, G, which is defined by the relation WN = W0 exp[GN ]. Its limit value has the form G := lim N→∞ 1 N ln WN W0 . (3) One can easily show that for the given model parameters this converges to the unique value G(f) = (1 2 + P1) ln(1 + fr1) + ( 1 2 − P1) ln(1− fr1). (4) In the case of a general risky asset with return distribution ̺(r), this formula generalizes to the form G(f) = 〈 ln(1 + fr) 〉 ̺ (5) where the average is over the return distribution ̺(r). The long-term profitability of the risky asset can be measured by the average return per time step, R. By definition, WN = W0(1 +RN) N and R = limN→∞RN . Using Eq. (3), R can be expressed in terms of G simply as R = exp(G)− 1. (6) 1Our parametrization based on “excess” winning probability P1 is different from the common one but it will prove very useful in later calculations where it will allow us to obtain approximate results assuming that P1 is small. 3 Both G and R are functions of the asset parameters r1, P1 and of the investment fraction f . According to the Kelly portfolio strategy [4], for a long-term investment it is best to maximize the growth rate G (or, equivalently, the long-term return R)—this strategy is therefore sometimes referred to as the growth-optimal investment strategy. Starting from Eq. (4), simple computation yields the optimal investment fraction f ∗1 = 2P1/r1. (7) Increasing the value of P1 enhances the asset’s profitability and leads to an increased optimal investment fraction. On the other hand, increasing r1 enhances the asset’s expected return (when P1 > 0) but it also increases the magnitude of losses; overall it leads to a decreased value of f ∗. When P1 > r1, we obtain f ∗ > 1 which means that the investor is advised to borrow additional money and invest them in the risky asset too. When P1 < 0 (the asset is not profitable), f ∗ < 0 which corresponds to the so-called short selling. For simplicity we assume that both borrowing and short selling are forbidden and hence f ∈ [0; 1]. 3 Transaction fees and intermittent portfolio rebal- ancing The requirement of keeping the investment fraction f constant implies that the investor needs to constantly rebalance the portfolio: after a “winning” turn, some part of wealth has to be moved from the asset to cash and after a “loosing” turn, some additional wealth has to be invested in the asset. This constant portfolio rebalancing may require payment of substantial transaction fees. The question is, how the fees affect the portfolio optimization process. In particular, we are interested whether there are situations where the investor fares better with intermittent rebalancing which is sub-optimal from the point of view of the Kelly strategy but requires fewer money transfers and hence lowers the transaction fees. 3.1 Transaction fees We assume that for any wealth X transferred from or to the risky asset, a transaction fee α|X| must be paid (α > 0; the absolute value reflects the fact that transaction fees are paid regardless of the direction of the transfer).2 How to include α in the derivation of the optimal investment fraction presented above? Given that the portfolio is properly balanced at a certain moment, the total amount invested in the risky asset is fW . If the realized return from the risky asset is r, the total wealth changes to W (1 + fr) and the 2Since the investor’s wealth grows without bounds, the relative effect of any sub-linear fee α|X |β is asymptotically zero in the long term. The directly proportional fee α|X | is hence the only possible choice for the growth-optimal portfolio. 4 invested amount changes to fW (1 + r). If r > 0, wealth X > 0 needs to be transferred from the risky asset to cash to keep the portfolio balanced. The resulting total wealth is then W (1+fr)−αX and the invested amount is fW (1+r)−X . To achieve the investment fraction f , it must hold that f [ W (1 + fr)− αX ] = fW (1 + r)−X. (8) From this formula it follows immediately that the total transferred volume is Xr>0 = Wrf(1−f)/(1−αf). As expected, no transfer is needed when f = 0 or f = 1; transaction fees have no effect on portfolio optimization in these two cases. When r < 0, the transferred volume can be derived in a similar way and has the formXr<0 = Wrf(1−f)/(1−α(1−f)). Now we know the wealth lost to transaction fees which allows us to write investor’s wealth after N time steps WN = W0 [ 1 + fr1 − αr1f(1− f) 1− αf ]w [ 1− fr1 − αr1f(1− f) 1− α(1− f) ]N−w . (9) This is a generalization of Eq. (2) for the case with transaction fees. It is straightforward to use Eq. (9) to obtain the exponential growth rate G(f) and maximize it to get the optimal investment fraction. Since the resulting quadratic equation has complicated coefficients and provides little insights to the behavior of the system, we introduce an approximate approach which will be of great importance in later more complicated cases. We expand dG/df in terms of α, P1, r1 and keep only terms up to order α (this is motivated by the fact that the transaction fee coefficient α is nowadays usually small in practice). Assuming that P1 and r1 are sufficiently small, we neglect terms that are of the order higher than P 21 , P1r1, or r 2 1. The resulting optimal fraction then has the simple form f ∗1 (α) = 2P1 − α r1 − 2α . (10) Fig. 1 illustrates the dependency of this result on both P1 and α. Naturally, in the limit α → 0 we recover the fee-free result f ∗1 = 2P1/r1. Interestingly, transaction fees may both decrease and increase the optimal investment fraction (in comparison with the value corresponding to α = 0). On the other hand, the average return is always reduced by transaction fees. Using Eq. (10), one can solve the equation f ∗1 (α) = 0 to obtain a lower bound for P1 at which the asset becomes profitable, P low1 = α/2. As expected, P low 1 is greater than the fee-free lower bound which means that transaction fees decrease the asset’s profitability. Similarly, one can solve the equation f ∗1 (α) = 1 to obtain an upper bound for P1 at which the investor is advised to invest all wealth in the asset, P up 2 = (r1 − α)/2 which is less than the threshold r1/2 valid for α = 0. We can conclude that transaction fees narrow the region where non-trivial optimal investment fractions (0 < f ∗1 < 1) realize (this effect is well visible in Fig. 1a). Another point of view is that transaction fees modify the optimal investment fraction f ∗ so that the transferred amounts (which are approximately proportional to (1− f)f) are lowered. Transaction fees are in this sense similar to friction 5 0 0.01 0.02 0.03 0.04 0.05 P 1 0 0.2 0.4 0.6 0.8 1 f * α = 0 α = 0.02 α = 0.04 0 0.01 0.02 0.03 0.04 0.05 P 1 0 1 2 3 4 5 10 3 G * α = 0 α = 0.02 α = 0.04 0 0.01 0.02 0.03 0.04 α 0 0.1 0.2 0.3 0.4 f * P 1 = 0.01 P 1 = 0.02 0 0.01 0.02 0.03 0.04 α 0 2 4 6 8 10 4 G * P 1 = 0.01 P 1 = 0.02 (a) (b) (c) (d) Figure 1: The influence of transaction fees on the optimal investment: the dependency on P1 for r1, α fixed (a,b) and the dependency on α for r1, P1 fixed (c,d) r1 = 10% in all cases. Analytical and numerical results are shown as lines and symbols, respectively. in mechanics which also both attenuates motion and leads to dissipation of energy (in the case of transaction fees we face dissipation of wealth). 3.2 Intermittent portfolio rebalancing While in the original Kelly game the investor should rebalance the portfolio as often as possible (i.e., after each time step), in the presence of transaction fees it may be profitable to rebalance the portfolio less often. Our goal is to solve the intermittent portfolio op- timization problem first without and then with transaction fees. Denoting the investor’s rebalancing period as T , the probability of “winning” in w steps out of T is binomial and reads B1(w|T ) = ( T w ) (1 2 + P1) w(1 2 − P1)T−w. Since the asset’s return in T time steps can be written as rw = (1 + r1) w(1− r1)T−w − 1, we know the return distribution and Eq. (5) gives the exponential growth rate G(f) = T ∑ w=0 B1(w|T ) ln [ 1 + frw ] (11) where substitution T = 1 recovers G(f) given by Eq. (4). Using Eq. (9), it is easy to generalize this result to the case with both intermittent rebalancing and transaction fees, 6 yielding G(f) = T ∑ w=0 B1(w|T ) ln [ 1 + frw − αf(1− f)|rw| 1 − αχ(f, rw) ] (12) where χ(f, rw) = f if rw > 0 and χ(f, rw) = 1− f otherwise. Eq. (12) cannot be maximized analytically in general and one has to resort to numerical techniques. When T = 2, the approach that we developed to derive Eq. (10) yields f ∗2 (α) = 8P1 − α(2 + r1) 4r1 − 2α(2 + r1) . (13) Notice that in the limit α → 0, this result is identical with the optimal portfolio fraction for rebalancing after each turn which is a direct consequence of assuming that P1 and r1 are small.3 Numerical tests show that Eq. (13) is reasonably precise for α, P1 ≪ 1. Solution of the optimization problem for T = 2 allows us to ask what transaction fee αx makes rebalancing every other turn as profitable (in terms of the exponential growth rate G) as rebalancing in every turn. Using Eqs. (7), (11), (13) one can show that when α = 0, the difference of the optimal growth rates per turn is G∗1(0)− 12G ∗ 2(0) = P 2 1 (r1 − 2P1)2 where we neglected fifth and higher powers of P1 and r1 in the result. (The factor 1/2 at G∗2(0) converts the exponential growth rate in two-turn basis to the growth rate per turn.) Assuming that P1, r1, α are small, it is also possible to find that the growth rates depend on α as G∗1(α) = G ∗ 1(0)− 2P1 r1 (r1 − 2P1)α +O(α2), G∗2(α) = G ∗ 2(0)− P1 r1 (r1 − 2P1)(2 + r1)α+O(α2). Both growth rates are for P1 = 0 and P1 = r1/2 independent of α. This is not surprising: in those cases is f ∗ = 0 or f ∗ = 1 and hence no rebalancing is necessary and the optimal exponential growth rate is unaffected by transaction fees. Combining the obtained results together, the equality G∗1(α) = G ∗ 2(α)/2 can be solved with respect to α, leading to αx = 2r1P1 r1 − 2P1 2− r1 (14) which represents the magnitude of α for which rebalancing in every turn and in every other turn are equally profitable. As shown in Fig. 2, this formula is very accurate even for moderate values of parameters P1, r1. It is instructive to note that the threshold fee value αx is small for weakly profitable assets (P1 small) and in particular for assets with small return in one step (r1 small). 3In a general case, f∗ 2 (0) may be considerably different from f∗ 1 (0). For our setting, for example, one can find the approximate result f∗ 2 (0) ≈ 2P1 r1 ( 1 − 1 2 r2 1 + 3r1P1 − 4P 21 ) which shows that f∗ 2 (0) is indeed different from f∗ 1 (0) = 2P1/r1. 7 0 0.01 0.02 0.03 0.04 0.05 P 1 0 400 800 1200 10 6 α αx αz rebalancing every two steps rebalancing less often rebalancing every step Figure 2: Intermittent rebalancing: numerical and approximate analytical values (shown as symbols and lines, respectively) of αx and αz for r1 = 10%. In a very similar way it is possible to study the transaction fee at which rebalancing every two turns is as profitable as rebalancing every three turns. Interestingly, the result- ing value αy = 2P1(r1 − 2P1) is for r1 < 1 greater than αx (by the factor of (2 − r1)/r1). This means that rebalancing every three turns is quite ineffective and hence it is mean- ingful to ask what αz makes rebalancing every two and four turns equally profitable. The corresponding value αz = 16P1r1 r1 − 2P1 2 + r1 (15) is greater than αx for α < 9/14 and it is smaller than αy for r1 < 2/7. This means that rebalancing every three turns is sub-optimal in the case of small investment returns: it is better to rebalance either more (for α > αz) or less (α < αz) often. As shown in Fig. 2, while precision of αz is lower than that of αx, obtained values agree well with a purely numerical treatment of the problem.4 When r1, P1, α are given, it is natural to ask what rebalancing period T ∗ maximizes the exponential growth rate per turn. While this question cannot be answered analytically, it is straightforward to solve it numerically. Results are shown in Fig. 3 for various choices of r1, P1. As can be seen, T ∗ decreases with both P1 and r1. This agrees with the growth of the threshold values αx, αz with P1 (until P1 < r1/4) and r1 (see Eqs. (14), (15)). When transaction fees are small, T ∗ is proportional to α2/3—a behavior which will be explained in Sec. 4. When α & 10−2, this scaling breaks down and T ∗ grows even faster than linearly. Since this mode of behavior occurs only for exceedingly large transaction fees (note that α = 1 corresponds to confiscating all invested amount), we do not study it further. 4For the sake of completeness, the optimal investment fractions for rebalancing every three and four turns are f∗ 3 = (2P1 − α/2)/(r1 − 2α) and f∗4 = [32P1 − 3α(2 + r1)]/[16r1 − 6α(2 + r1)], respectively, while the optimal exponential growth rates are G∗ 3 (α) = G∗ 3 (0)− 3(r1 − 2P1)P1/r1 +O(α2) and G∗4(α) = G∗ 4 (0)− 3 2 P1(r1 − 2P1)(2 + r1)/r1 +O(α2), respectively. 8 10 −5 10 −4 10 −3 10 −2 10 −1 10 0 α 10 0 10 1 10 2 10 3 10 4 T * P 1 = 1%, r 1 =10% P 1 = 1%, r 1 =20% P 1 = 2%, r 1 =10% P 1 = 2%, r 1 =20% (a) 10 −6 10 −5 10 −4 10 −3 α 10 0 10 1 10 2 10 3 T * P 1 = 0.1%, r 1 =1% P 1 = 0.1%, r 1 =2% P 1 = 0.2%, r 1 =1% P 1 = 0.2%, r 1 =2% (b) Figure 3: Optimal rebalancing periods T ∗ vs α for different choices of r1 and P1; the indicative thick lines have slope 2/3. 3.3 Risky assets with multiple time scales Assets’ properties are in real life generally non-stationary. To analyze investment in an asset with time-varying properties, we propose a simple model where the price of the asset undergoes a stochastic binary process on two distinct time scales. In addition to the basic time scale 1, we add a longer scale of length T2. We assume that price of the asset undergoes a multiplicative dynamics given by Eq. (1) at all time steps and when (t mod T2) = 0, there is an additional return ±r2 with probabilities 12 + P2 and 1 2 − P2, respectively (as before, asset parameters are constrained to 0 < r2 ≤ 1 and 0 < P2 ≤ 1/2). This framework is a simple generalization of the original Kelly game to the case with non-stationary game properties and multiple time scales. The simplest case is when the investor keeps the investment fraction f constant and rebalances the investment every T steps. Since price dynamics is still binary, we can parametrize the outcome by the number of “winning” turns on the basic time scale, w1, and by the number of “winning” turns on the longer time scale, w2. While w1 is simply constrained to 0, . . . , T , the upper bound for w2 can be either T\T2 or 1 + T\T2 (% and \ denote the modulus operator and integer division, respectively). Simple algebra shows that the odds of the two cases are 1 − (T%T2)/T2 and (T%T2)/T2, respectively, hence we can write the long-term exponential growth rate of the portfolio in the form G = ( 1− T%T2 T2 ) T ∑ w1=0 t ∑ w2=0 B1(w1|T )B2(w2|t) ln [ 1 + frt − αf(1− f)|rt| 1− αχ(f, rt) ] + + T%T2 T2 T ∑ w1=0 t+1 ∑ w2=0 B1(w1|T )B2(w2|t+ 1) ln [ 1 + frt+1 − αf(1− f)|rt+1| 1− αχ(f, rt+1) ] (16) where t := T\T2, rt = (1 + r1) w1(1− r1)T−w1(1 + r2)w2(1− r2)t−w2 − 1 is the compound return before transaction fees are applied and B2(w2|t) is the binomial probability of w2 wins in t trials when the winning probability is 1 2 +P2. Albeit principally 9 0 10 20 30 40 50 60 T 0 0.04 0.08 0.12 0.16 f * α = 0% α = 2% α = 5% 0 10 20 30 40 50 60 T 0 1 2 3 10 4 G * α = 0% α = 2% α = 5% Figure 4: Optimal investment fraction and growth rate of the Kelly portfolio for an asset with price change on two time scales with P1 = −0.01, r1 = 0.05, P2 = 0.05, R = 0.5, T2 = 10. simple, the described situation is out of scope of analytical optimization tools and hence we report only numerical results here. The most interesting behavior is obtained when the risky asset is profitable only on the longer time scale (that is, P1 < 0 and P2 > 0). The need to rebalance often (which is a principal property of the Kelly portfolio) then directly competes with the asset profitability on a longer time scale. An example of the resulting behavior is shown in Fig. 4 where irregularities corresponding to the longer time scale are visible on both f ∗(T ) and G∗(T ). On the other hand, when T ≫ T2, the two time scales merge into average behavior of the risky asset and the irregularities are not visible anymore. We can conclude that the presence of multiple time scales is important only if portfolio rebalancing occurs in time intervals comparable to the longest time scale of asset’s returns. 4 Intermittent rebalancing for lognormal returns Now we shall study portfolio optimization for a simple asset with lognormally distributed returns. We assume that the asset’s price pi(t) (i = 1, . . . , N) undergoes an uncorrelated multiplicative random walk p(t) = p(t− 1)eη(t) where random variable η(t) is drawn from the Gaussian distribution with mean m and variance D. Consequently, returns of the asset have the form r(t) := p(t) p(t− 1) − 1 = eη(t) − 1. Using the same notation as above, the investor’s expected exponential growth rate has the form G(f) = 〈ln(1+ fr)〉 where the average is over different values of η. Written in detail, the previous expression reads G(f) = ∫ ∞ −∞ dη̺(η) ln [ 1 + f(eη − 1) ] 10 where ̺(η) is the Gaussian probabilistic density of returns. With transaction fees, G(f) generalizes to the form G(f) = ∫ ∞ −∞ dη̺(η) ln [ 1 + f(eη − 1)− αf(1− f)|eη − 1| 1− αχ(f, eη − 1) ] . (17) When α = 0, it is known (see [7]) that the optimal investment fraction has the approximate form f ∗0 (m,D) = 1 2 + m D (18) which is valid when m,D ≪ 1. Here f ∗0 = 0 for m < −D/2 and f ∗0 = 1 for m > D/2 (when f is out of the range [0, 1], the investor has a non-zero probability of going bankrupted and hence the long-term growth rate is automatically zero [7]). In our following analysis we will hence assume that m and D are of the same order of smallness. When α > 0, we search the optimal fraction in the form f ∗(α) = f ∗(0) + u where the correction u is small when α is small. Since our goal is to find the highest order correction to f ∗, we neglect the term αχ(f, eη−1) in Eq. (17). The optimal investment fraction is the solution of ∂G/∂f = 0. By exchanging the order of derivation and integration we obtain ∂G ∂f = ∫ 0 −∞ (eη − 1)(1 + α− 2αf)̺(η)dη 1 + f(eη − 1)[1 + α(1− f)] + ∫ ∞ 0 (eη − 1)(1− α + 2αf)̺(η)dη 1 + f(eη − 1)[1− α(1− f)] where it was necessary to write two separate terms because of the absolute value |eη − 1| present in G(f). We can now substitute f = f ∗0 +u where f ∗ 0 is the solution of ∂G/∂f = 0 for α = 0 (see Eq. (18) above). Assuming that both α and u are small, the integrand of the first integral can be approximated as (1 + α− 2αf ∗0 )x(η) 1 + (u+ αf ∗0 (1− f ∗0 )x(η) ≈ x(η) [ 1 + α(1− 2f ∗0 )− ( u+ αf ∗0 (1− f ∗0 ) ) x(η) ] where x(η) = (eη−1)/(1+(eη−1)f ∗0 ). The second integral can be manipulated in a similar way; by putting the results together we get ∂G ∂f = ∫ ∞ −∞ dη̺(η) [ x(η) + α(2f ∗0 − 1)|x(η)| − ux(η)2 ] which is equivalent to three separate integrals. The first one is zero by definition (we assume that f ∗0 is the solution for α = 0). For the second and third integral, we use x(η) ≈ eη − 1 (because m,D ≪ 1 and hence η is small) and ̺(η) ≈ exp[−η2/(2D)]/ √ 2πD (because D ≪ 1 and |m| ≤ D/2 and hence |m| ≪ √ D). While the integration results are complicated and involve the error function, for D ≪ 1 we can simplify them further to finally obtain ∂G ∂f = α(2f ∗0 − 1)D − u √ πD3/2. 11 10 −5 10 −4 10 −3 α 10 −4 10 −3 10 −2 10 −1 f * ( α ) − f * ( 0) m = 1.10 −5 , D = 10 −4 m = 4.10 −5 , D = 10 −4 m = 1.10 −4 , D = 10 −3 (a) 10 −5 10 −4 10 −3 α 1 10 100 1000 T * m = 1.10 −5 , D = 10 −4 m = 4.10 −5 , D = 10 −4 m = 1.10 −4 , D = 10 −3 (b) Figure 5: The dependency of the optimal investment fraction (a) and the optimal rebal- ancing period (b) on α: numerical and analytical results are shown with symbols and lines, respectively. Thus u that maximizes G (solution of ∂G/∂f = 0) has the form u = αm √ 8 πD3 with the next contributing term of the order of O( √ D). In combination with Eq. (18) we have f ∗(m,D, α) = 1 2 + m D + αm √ 8 πD3 , G∗(m,D, α) = G∗(m,D, 0)− α ( 1 4 − m 2 D2 ) √ 2D π . (19) As shown in Fig. 5a, this agrees well with numerical results for f ∗ (numerical results for G∗ are not shown). When α = 0, by expanding ln[1 + f(eη − 1)] in Eq. (17) into a series of f(eη − 1) we get the following approximate expression for the optimal exponential growth rate G∗(m,D) = D 2 ( 1 2 + m D )2 − D2 4 ( 1 4 − m2 D2 )2 +O(D3). When the rebalancing period is T , the compound return of the asset is again lognormally distributed, this time with η drawn from the Gaussian distribution with mean Tm and variance TD (here we take the advantage from the fact that the Gaussian distribution is stable). Using the above expression for G∗(m,D) we can write the resulting optimal growth rate per time step as G∗(m,D, T ) := G∗(Tm, TD)/T ≈ D 2 ( 1 2 + m D )2 − TD 2 4 ( 1 4 − m 2 D2 )2 (20) which is a decreasing function of T as expected. Combining this result with Eq. (19) produces a general dependency of the optimal growth rate on T and α. This dependency 12 can be simply maximized with respect to T , yielding T ∗(m,D, α) = α2/3 D √ 8 π ( 1 4 − m 2 D2 ) −2/3 (21) which is confirmed by comparison with numerical simulations in Fig. 5b (small irregularities visible for D = 10−3 are caused by true T ∗ being an integer number). After multiplying Eq. (21) with D we obtain an expression for DT ∗ := D∗ which can be understood as an optimal variance of lognormally distributed returns. When α = 0, this optimal variance is zero, indicating that the investor should rebalance the portfolio continuously. Results derived for the lognormal distribution of returns are of particular importance when intermittent rebalancing is considered. If we write the return at time t as r(t) := p(t)/p(t− 1)− 1 = e̺(t) − 1 where values ̺(t) are drawn from a probabilistic distribution with finite mean and variance, the compound return over a period of T turns is rT (t) := p(t)/p(t− T )− 1 = exp [ T−1 ∑ u=0 ̺(t− u) ] − 1. According to the central limit theorem, if variables ̺(t) are independent and T is large, the sum ∑T−1 u=0 ̺(t−u) is approximately normally distributed and hence compound return rT (t) follows a lognormal distribution when the rebalancing period T is long. This im- mediately explains the scaling T ∗ ∼ α2/3 which was found numerically for binary returns in Sec. 3.2.5 The same reasoning applies to any ̺(t) following a broad distribution with finite variance. As an example, we use returns r(t) = eσχ(t) − 1 where χ(t) is Student’s distribution with two degrees of freedom (the tails of χ(t) then decay as χ−3, hence χ(t) has finite variance). Since Student’s distribution is not stable, the distribution of returns for an arbitrary rebalancing period T does not have a closed form and one cannot attempt to find the optimal rebalancing period analytically. We employ numerical simulations in which the exponential growth rate is maximized with respect to the investment fraction f over 106 time steps for rebalancing periods in the range 1, . . . , 100. The resulting op- timal growth rates G∗(T ) are averaged over 103 independent realizations of returns and finally yield the optimal rebalancing period which is again roughly proportional to α2/3 (see Fig. 6a). When aiming at even more realistic return distributions, it is a question whether α2/3- scaling holds for returns with some degree of dependence (memory). Since there are various central limit theorems for dependent variables [20, 21], one expects that when the depen- dence of returns is sufficiently weak, above-obtained results continue to hold. This is confirmed by our simulations with returns generated by a GARCH(1, 1) process [22, 23] with parameters α0 = 10 −5, α1 = 0.2, β = 0.7 (these parameter values are similar to those inferred from S&P index data in [24]). The optimal rebalancing period—obtained by the same simulation approach as above for the Student-based returns—is again proportional 5When the random variable ̺(t) has two possible values ln(1± r1) with probabilities 1/2± P1, respec- tively, one recovers the binary returns studied in Sec. 3.2. 13 10 −5 10 −4 10 −3 10 −2 α 1 10 100 T * (a) 10 −6 10 −5 10 −4 α 1 10 100 T * (b) Figure 6: Optimal rebalancing period T ∗ vs α for: (a) Student-based returns and (b) GARCH-based returns. The indicative dashed lines have slopes 0.70 and 0.66, respectively. to α2/3 (see Fig. 6b). This confirms that our main result is highly robust with respect to the nature of the return distribution. Detailed insights on the degree of dependence at which this scaling breaks down are however yet to come. 5 Partial rebalancing So far we only considered mitigating the impact of transaction fees by intermittent rebal- ancing. There is another approach, which we call partial rebalancing, where only part of the required amount is transferred between cash and the asset. The transferred amount required to keep the investment fraction fixed is represented by X in Eq. (8). If only part ε of the required capital is transferred (ε ∈ (0, 1] is a rebalancing parameter), 1/ε steps would be needed to transfer the whole. Hence one can expect that partial rebalancing with ε should be similar to intermittent rebalancing with period T ≈ 1/ε. Since partial rebalancing is parametrized by a continuous parameter ε, it allows for smoother setting of the portfolio than intermittent rebalancing where the rebalancing period is integer. When ε < 1, the desired investment fraction is almost never achieved by partial re- balancing and the actual invested fraction fluctuates around it. (The smaller the value of ε, the larger the deviations; when ε = 1, the standard rebalancing is recovered and the stake is always adjusted accurately.) Due to these irregularities, partial rebalancing is less accessible to analytical treatment and we present only numerical results here. As shown in Fig. 7, the optimal growth rates are achieved for ε inside the range (0, 1]. These rates outperform the optimal values obtained with intermittent rebalancing for both studied val- ues of α. If growth rate improvement is measured in respect to standard rebalancing (the same as obtained with ε = 1), improvements obtained with partial rebalancing are 23% (for α = 10−6) and 18% (for α = 10−5) better than those obtained with intermittent rebal- ancing. As foreseen above, optimal values of ε (0.21 and 0.06, respectively) approximately correspond to the optimal periods of intermittent rebalancing (4 and 22, respectively). 14 0 0.2 0.4 0.6 0.8 1 ε 2040 2042 2044 2046 2048 10 9 G * α = 10−6 α = 10−5 Figure 7: Optimal growth rate G∗ vs ε for binary returns with P1 = 0.1% and r1 = 1%. The two thick dotted lines show performance of intermittent rebalancing for α = 10−6, T = 4 (upper) and α = 10−5, T = 22 (lower), respectively. 6 Discussion While transaction fees represent an important factor limiting investor’s profit, in finance literature they are often considered as uninteresting and neglected in order to keep the analysis simple and focused. However, money transfers required by active portfolio opti- mization strategies may be considerable and the effect of transaction fees significant. In this work we investigated this effect on the growth-optimal/Kelly portfolio in detail. To this end we studied a toy risky asset with a binary return distribution, an asset with time-depending return distribution, and more realistic assets with lognormal and fat-tailed return distributions. Our results show that transaction fees indeed have substantial impact on investment profitability, in particular when the average return of the risky asset is low. Their influence is greatest when the investment fraction is 1/2. This is natural because the wealth volumes transferred in rebalancing are proportional to f(1− f) and hence they are maximized at f = 1/2. We showed for various settings that when the transaction fee coefficient α is sufficiently high, for the investor it may be more profitable to adjust the portfolio less frequently and an optimal rebalancing period T ∗ arises. In the case of a lognormal distribution of returns, the optimal optimal rebalancing period was analytically shown to be proportional to α2/3 for small α. When α is small yet T ∗ is sufficiently long for the central limit theorem to be an appropriate approximation, the optimal rebalancing period scales with α2/3 for any independent returns drawn from a distribution with finite mean and variance. Our numerical simulations confirm this for binary returns, returns based on Student’s distribution, and even for returns with memory modeled by a GARCH(1, 1) process where the requirement of independence is violated. We showed that a so-called partial rebalancing can also reduce the impact of transaction fees and hence improve the performance of the Kelly strategy. Besides presented results, several research questions remain open. Firstly, while trans- action fees are maximized by f = 1/2 when investing in one asset, the situation gets more complicated when investment is distributed among several assets. That situation can be 15 further generalized by assuming correlated asset returns. Secondly, through the paper we have assumed that parameters of the return distribution are known to the investor. Invest- ment optimization hence only consists of choosing the right investment fraction. In real life, the return distribution itself is unknown and its estimation is part of the optimization process. Whether the presented results hold also this case is an open question. Finally, results for partial rebalancing presented in Sec. 5 show that this can be a superior approach to the Kelly optimization in presence of transaction fees. Observed similarity between op- timal values of rebalancing parameters T and ε suggests that many of analytical results found here for intermittent rebalancing may hold also for partial rebalancing. Verification of this hypothesis remains as an important challenge for future research. Acknowledgements This work was partially supported by the Shanghai Leading Discipline Project (grant no. S30501). We acknowledge helpful comments of our anonymous reviewers. References [1] E. J. Elton, M. J. Gruber, S. J. Brown, W. N. Goetzmann, Modern Portfolio Theory and Investment Analysis, 7th edn., Wiley, 2006. [2] S. Zenios, W. Ziemba, Eds., Handbook of Asset and Liability Management, Volume 1, North-Holland, 2006. [3] H. M. Markowitz, The Journal of Finance 7, 77–91, 1952. [4] J. L. Kelly Jr., Bell System Technical Journal 35, 917–926, 1956. [5] H. M. Markowitz, The Journal of Finance 31, 1273–1286, 1976. [6] M. Marsili, S. Maslov, Y.-C. Zhang, Physica A 253, 403–418, 1998. [7] P. Laureti, M. Medo, Y. C. Zhang, Quantitative Finance 10, 689–697, 2010. [8] S. Browne, W. Whitt, Advances in Applied Probability 28, 1145–1176, 1996. [9] M. Medo, Y. M. Pis’mak, Y.-C. Zhang, Physica A 387, 6151–6158, 2008. [10] E. R. Fernholz, I. Karatzas, in Handbook of Numerical Analysis. Mathematical Mod- eling and Numerical Methods in Finance, A. Bensoussan, Ed., Elsevier, 89–168, 2009. [11] F. Slanina, Physica A 269, 554–563, 1999. [12] L. C. MacLean, W. T. Ziemba, G. Blazenko, Management Science 38, 1562–1585, 1992. 16 [13] S. J. Grossman, Z. Zhou, Mathematical Finance 3, 241–276, 1993. [14] E. O. Thorp, in Handbook of Asset and Liability Management, Volume 1, S. Zenios and W. Ziemba, Eds., North-Holland, 385–428, 2006. [15] G. Yaari, S. Solomon, EPJ B 73, 625–632, 2010. [16] L. C. MacLean, W. T. Ziemba, in Handbook of Asset and Liability Management, Volume 1, S. Zenios and W. Ziemba, Eds., North-Holland, 429–474, 2006. [17] D. Morton de Lachapelle, D, Challet, New Journal of Physics 12, 075039, 2010. [18] R. C. Merton, Continuous-Time Finance, Blackwell, 1990. [19] S. Maslov, Y. C. Zhang, International Journal of Theoretical and Applied Finance 1, 377–387, 1998. [20] W. Hoeffding, H. Robbins, Duke Mathematical Journal 15, 773–80, 1948. [21] Yu.V. Prokhorov, V. Statulevicius, Eds., Limit Theorems of Probability Theory, Springer, 2000. [22] R. Engle, Journal of Economic Perspectives 15, 157–168, 2001. [23] S. J. Taylor, Modelling financial time series, 2nd Ed., World Scientific, 2008. [24] J.-C. Duan, Mathematical Finance 5, 13–32, 1995. 17 1 Introduction 2 Basic Model 3 Transaction fees and intermittent portfolio rebalancing 3.1 Transaction fees 3.2 Intermittent portfolio rebalancing 3.3 Risky assets with multiple time scales 4 Intermittent rebalancing for lognormal returns 5 Partial rebalancing 6 Discussion
0non-cybersec
arXiv
depression should also be in there.
0non-cybersec
Reddit
Deck Finishing Question. Hi All, pardon if this has been asked a lot but I wasn't able to find much after searching through a few years of posts. Looking to finish our deck and we're torn between using a 'Deckover' type paint and a semi-transparent or solid stain. Does anybody have any experience with the Behr/Rustoleum (or similar) deckover paints and would you recommend? We've seen the class-actions lawsuits and poor reviews for these, but have also heard some first hand accounts of them working quite well. The other option is to use a stain, but I was hesitant as our pup would likely shred it a bit when he shoots out the back door to chase whatever animal is outside the fence that day. Any and all advice is much appreciated!!
0non-cybersec
Reddit
Is &quot;ref return&quot; a language feature or feature of the CLR. <p>In this SO question: <a href="https://stackoverflow.com/questions/6339602/why-doesnt-c-sharp-support-the-return-of-references">Why doesn't C# support the return of reference</a> (and elsewhere on the web), I can't determine when <code>ref return</code> was introduced to the .NET framework. Is it just syntax sugar?</p> <p>Reason I'm asking is that many of our hosts are not installed with latest .NET framework version (still on 4.5.2) and I'm wondering how this would affect CLR backwards compatibility, runtime correctness and performance.</p> <p>Also, where would I be able to find documentation on how older .NET framework handles backwards compatibility? The C# 6.0 Language specification does not seem to cover this, perhaps I'm somehow skipping this?</p>
0non-cybersec
Stackexchange
Alex Grey "Ecstasy" by Dana Carnegie at True Love Tattoo in London Ontario Canada.
0non-cybersec
Reddit
'Being the president is a bigger job than I thought' - Trump.
0non-cybersec
Reddit
How can I stop Thunderbird from silently appending .xml to incoming .gpx filenames and making them readonly?. <p>A convenient way for me to get tracklogs off my phone onto my PC is to email them from gmail to my primary account, which is set up in Thunderbird. When I go to open the attachment, I get </p> <pre> You have chosen to open: Myfile.gpx which is: XML Document (xxx kB) from Mailbox:// What should Thunderbird do with this file? Open with [dropdown] Save </pre> <p>If I select "Save", the file is saved correctly, but if I select "Open with" the file saved in %TMP% and sent to my chosen program is <code>MyFile.gpx.xml</code> (not a big deal if I'm opening it in a text editor, but problematic for software that expects <code>.gpx</code>). Presumably it gets that from the MIME type </p> <p>It also sets the readonly flag, which is more annoying; further tests suggest that it does that for incoming <code>.txt</code> files as well.</p> <p>This is on my win7 machine, running Thunderbird 52.9.1 (32-bit), I <em>think</em> the behaviour is different on my Linux box at home, or at least was until recently.</p> <p>Is there a buried setting somewhere to save temporary files under their real names rather than appending the MIME type? Or to disable saving as readonly? The Tools|Options|Attachments|Incoming tab has <code>XML Document (text/xml :.xml) Always ask</code> and no entry for <code>.gpx</code></p>
0non-cybersec
Stackexchange
That’s not the date you’re looking for.
0non-cybersec
Reddit
Friendly neighborhood gossip (found on instagram).
0non-cybersec
Reddit
Close inspection. [xpost /r/eyebleach].
0non-cybersec
Reddit
Question about the legendre transform in convex analysis. <p>I'm work through a script about convex analysis, especially with dual problems. There is one step in a proof, which is not entirely clear to me.</p> <p>Let $U$ be a function, which is strictly concave, $C^1$ and strictly increasing. We define</p> <p>$$J(y)=\sup_{x&gt;0}(U(x)-xy)$$</p> <p>That's the Legendretransform of $-U(-x)$. One can prove that $J$ is $C^1$ too, decreasing and convex. We also have the equality: $$J(y)=U(I(y))-yI(y)$$</p> <p>where $I=-J'=(U')^{-1}$. Now, let $J_n(y)=\sup_{n\ge x&gt;0}(U(x)-xy)$ and they claim that for $y\ge I(n)$ $J_n(y)=J(y)$. I think it should be true that for $y\le I(n)$, since:</p> <p>$$J_n(y)=\sup_{n\ge x&gt;0}(U(x)-xy)$$ and $$J(y)=U(I(y))-yI(y)$$ imply that for $I(y)\le n$ both coincide. Or why am I wrong?</p>
0non-cybersec
Stackexchange
shared_ptr with non-pointer resources. <p>In C++11 is it possible to use <code>shared_ptr</code> to control non-pointer resources?</p> <hr> <p>It is possible to use <code>unique_ptr</code> to manage non-pointer resources. This is done by implementing a custom deleter class which provides:</p> <ol> <li>A <code>typedef {TYPE} pointer;</code> where <code>{TYPE}</code> is the non-pointer resource type</li> <li><code>operator()(pointer)</code> which frees the controlled resource</li> </ol> <p>...and then instantiating a <code>unique_ptr</code> with the custom deleter as the second template parameter.</p> <p>For example, under Windows it is possible to create a <code>unique_ptr</code> which manages a <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms685104%28v=vs.85%29.aspx" rel="noreferrer">service control handle</a>. This handle type is not freed by calling <code>delete</code>, but by calling <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682028%28v=vs.85%29.aspx" rel="noreferrer"><code>CloseServiceHandle()</code></a>. Here is sample code which does this:</p> <h2>Custom Deleter</h2> <pre><code>struct SvcHandleDeleter { typedef SC_HANDLE pointer; SvcHandleDeleter() {}; template&lt;class Other&gt; SvcHandleDeleter(const Other&amp;) {}; void operator()(pointer h) const { CloseServiceHandle(h); } }; typedef std::unique_ptr&lt;SC_HANDLE,SvcHandleDeleter&gt; unique_sch; </code></pre> <h2>Instantiation</h2> <pre><code>unique_sch scm(::OpenSCManagerA(0, 0, SC_MANAGER_ALL_ACCESS)); </code></pre> <hr> <p>Is it possible to use <code>shared_ptr</code> to control a non-pointer resource as well?</p> <p>According to the documentation, there are <a href="http://en.cppreference.com/w/cpp/memory/shared_ptr/shared_ptr" rel="noreferrer"><code>shared_ptr</code> constructor overloads</a> which take provide the means to provide a custom deleter class, but none of the constructors accept a resource type that is not either a pointer or a wrapper around a pointer.</p> <p>How can this be done?</p>
0non-cybersec
Stackexchange
Can I mix Low Voltage (LV) ram wiith Regular Voltage RAM?. <p>I heard from our vendor that it is okay to put Low Voltage ram with regular voltage RAM. They said all that would happen is that the LV RAM would ramp up to match the 1.5v ram (in other words, the ram won't run at LV).</p> <p>Can anyone confirm from experience if this is the case? From my experience mixing any factors in RAM is not the best idea, but curious about experience around this particular issue.</p>
0non-cybersec
Stackexchange
Google Analytics gtag.js ready callback. <p>I try to update my Google Analytics implementation from analytics.js to the new gtag.js.</p> <p>In the old implementation I am using the <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/command-queue-reference#ready-callback" rel="noreferrer">ready callback</a> function.</p> <pre><code>ga(function() { console.log('Google analytics is ready'); }); </code></pre> <p>How can I implement a ready callback in the new gtag.js? I can't find any information in Google's documentation.</p>
0non-cybersec
Stackexchange
Confused about what to show a matrix is an element of GL(2,$\mathbb{R}$).. <p>I am kind of confused about what I am supposed to show in the following problem:</p> <p>Show that for any $\theta \in \mathbb{R}$, we have $$ \begin{pmatrix} cos \hspace1mm\theta&amp; -sin \hspace1mm\theta \\ sin \hspace1mm \theta &amp; cos \hspace1mm\theta \\ \end{pmatrix} \in GL(2,\mathbb{R})$$</p> <p>Am I supposed to show that matrices of this form satisfy closure, associativity, existence of an identity and inverse? That is for matrices of this form, but with different $\theta$'s? I am not to sure what exactly it is asking. </p>
0non-cybersec
Stackexchange
Former gitmo detainee was instrumental in helping stop the recent bombs sent to the US from Yemen.
0non-cybersec
Reddit
Microsoft has announced, the interoperability between Skype for Consumer and Teams across its native apps and browsers is designed to help businesses that have moved to Microsoft Teams. “Teams and Skype interoperability will enable collaboration with more partners....
0non-cybersec
Reddit
ITAP of a Squirrel who was interest in my phone....
0non-cybersec
Reddit
There's Life in the Old Dog Yet: Tearing New Holes into Intel/iPhone Cellular Modems.
1cybersec
Reddit
Rant: So got called out on my form last night at the gym. Last night at the gym a guy came up to me and said I was doing arm curls all wrong (I know glamour muscles, sorry fittit). Now I wouldn't have minded the tips, if he hadn't started by yelling at me saying, "Your killing me! I can't watch you do it like that anymore, this is how you do it". The guy was older and in good shape so I took his advice tried it out and he did have good points about my form. I am totally for getting help just don't annouce to the entire GD gym that I'm not doing it the way you like! So if you guys try to help someone with form at the gym, try and do it as discretely as possible /rant
0non-cybersec
Reddit
Official Fedora package for &#39;xxd&#39; command?. <p>I need to use a script based upon <code>xxd</code>, but it's not installed on my Fedora 21:</p> <pre><code>$ xxd bash: xxd: command not found </code></pre> <p>So I tried without success to search and install it:</p> <pre><code>$ yum install xxd (fails) $ yum search xxd (fails) $ yum search all xxd (fails - detailed log below) Loaded plugins: langpacks ================================================================= Matched: xxd ======== perl-Data-HexDump-XXD.noarch : Format hexadecimal dump like xxd xxdiff.i686 : Graphical file and directories comparator and merge tool xxdiff-tools.i686 : Tools for xxdiff </code></pre> <ul> <li><strong>Do you know which package <code>xxd</code> is provided with?</strong> (I mean an official package to install with <code>yum</code> from the fedora repositories).</li> </ul> <p>Thanks in advance for any help!</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 qtpie´s wise words won me a game.. Hi, some of you have probably seen [this video](https://www.youtube.com/watch?v=AnVIz6nOKhQ), where qtpie talks about what separates a pro player from a lesser player. Well, I too have seen the video - and I actually won a game thanks to this awesome gold-making advice. This is what happened: It was about 50 minutes into the game, I was playing vayne. I had my upgraded boots, IE, BotRK, ghostblade, banshee´s and an avarice blade. There was a teamfight and I died. I had enough money for statikk shiv, but just as I was about to upgrade it, I remembered the wise words of qtpie and waited for the whole duration of my death before upgrading my Shiv. After upgrading it, I realized I have about 335gold, so I decided to wait for redpot before the next teamfight. So I waited for redpot, and both teams head to baron as it´s just spawned. Long story short, we teamfight and I find myself being the only alive member of our team, sitting on around 40%hp. The only alive member of enemy team was corki. I decided to go ham on him and voila - Corki is dead, I´m left with no more than 70-80 hp. Our creeps are knocking on the door of their base, and since they only have an inhibitor, a nexus tower and nexus, I manage to finish the game before enemy team spawns. Around 3 minutes later, electricity in our part of town goes off because of a storm. If It wasn´t for qtpie´s excellent advice, I would have upgraded statikk shiv just as I died, which would have left me with around 320 gold when I spawned, and I wouldn´t have bothered waiting for that red elixir. I would then lose the 1v1 with corki, because I survived with 80 hp and red elixir gives 235 at level 18. Corki would have then pushed to our base, and even if we didn´t lose there, we would have lost eventually because my electricity went off and my team wouldn´t have won 4v5. Thank you based QTpie & big dick club. God bless. Also, sorry for any grammar mistakes that occured, english is not my main. TL;DR: Had enough gold for Elixir of fortitude thanks to qtpie´s advice, won game because of it. EDIT 1: I didnt have all items 50 minutes into the game, because I´m obviously a terrible noob. That´s also the reason why I didn´t buy last whisper. EDIT 2: To everyone telling me the video is a joke: Thank you so very much! Without you, dear friends, I would remain convinced he was completely serious about everything he said. I obviously somehow missed the part when our lord spends 18 seconds saying he was just joking.
0non-cybersec
Reddit
Unions and intersections of indexed families of transitive sets are transitive. <p>Let $\{ T_a \}_{a \in A}$ be a family of transitive sets. Prove that $\bigcup_{a \in A} T_a$ and $\bigcap_{a \in A} T_a$ are transitive. Assume $A \neq \emptyset$.</p> <p>I'm not sure how to apply the definitions to write the proof. </p> <p>For the union we will have $\bigcup$ $T_a$= {x|x$\in$$T_a$ for some a $\in$A}.</p> <p>For the intersection we will have $\bigcap$ $T_a$= {x|x$\in$$T_a$ for every a $\in$A}.</p>
0non-cybersec
Stackexchange
How to prevent direct access to API hosted in Azure app service. <p>I have a backend API that is hosted in Azure app service. I want to use Azure API management as the front end to this backend API and have successfully configured this in Azure. I have configured API management to use OAuth when accessing this backend API which works when clients access the API through the Azure API management endpoints, but how do I prevent people from accessing the backend API endpoints directly so that only calls from the API management endpoints are allowed? </p>
0non-cybersec
Stackexchange
An American judge poked at a wasp’s nest when ruling that the mass-lawsuits of the entertainment industry infringe the file-sharers’ right to anonymous speech..
0non-cybersec
Reddit
what do you think.
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
Look what I found at my local thrift store.
0non-cybersec
Reddit
Seven months at the gym and I had a real breakthrough today. I fit my jeans AND my calves into my gardening boots! At the same time! WooHoo!! &#x200B; &#x200B; When I first joined the gym and decided to make the investment of a personal trainer, he asked me what my 3 main goals were. I told him I want to be stronger, I want more endurance, and I want to get rid of my cankles. I think he thought I was kidding. I was not. Women in my family, no matter their overall size, have absolutely no calf definition and since I'm also fat, the area between my ankles and my calves is annoyingly fat. My ankles themselves are normal though, as are my feet. I always have to wear wide calf boots and I have never been able to fit anything but leggings in them. I used to take off my gardening boots to find a tight imprint of the boots on my legs. I am not fluid overloaded, I just have big, fat calves. &#x200B; The fitness analyzer thingie at the gym is frustrating. I am down 7 pounds since October and have managed to lose skeletal muscle mass despite increasing my protein intake. What I can't see though, I can definitely feel. I am so much stronger and my endurance is exponentially improved. I did about 5 hours of extremely strenuous gardening today and other than being a bit sunburned and sore like I just did an hour at the gym, I feel fine . I was able to use brute strength (along with a spade and a maul) to remove a huge root from the ground without power tools. I pulled many big roots just with my own strength. I spent at least half the time squatting and I can still walk! &#x200B; &#x200B; But, despite all the endurance and strength changes, the very small weight change has made it hard to actually see changes. My wardrobe consists of scrubs and leggings for the most part and my only pairs of jeans were bought last month so I have nothing really that shows whether or not my clothes no longer fit due to toning. &#x200B; &#x200B; Now though, I have a faint hint of calf definition and that's all the physical proof I need.
0non-cybersec
Reddit
Increasing swap space and removing previous swap space on ubuntu?. <p>I have a virtual machine (hosted online) with 2Gb swap space.</p> <p><strong>free -m</strong></p> <pre><code> total used free shared buffers cached Mem: 1995 438 1557 37 22 190 -/+ buffers/cache: 225 1770 Swap: 1998 0 1998 </code></pre> <p>Since the swap space was small, I tried to increase it to 4GB.</p> <p>Doing <strong>swapon -s</strong>, returned this result (not sure what it means since I don't have a second hard disk sda2)</p> <pre><code>Filename Type Size Used Priority /dev/sda2 partition 2046972 0 -1 </code></pre> <p><strong>df -H</strong></p> <pre><code>Filesystem Size Used Avail Use% Mounted on /dev/sda1 25G 19G 4.3G 82% / udev 1.1G 4.1k 1.1G 1% /dev tmpfs 210M 492k 209M 1% /run none 4.1k 0 4.1k 0% /sys/fs/cgroup none 5.3M 0 5.3M 0% /run/lock none 1.1G 0 1.1G 0% /run/shm none 105M 0 105M 0% /run/user </code></pre> <p>So I did</p> <pre><code>swapoff -a #deactivating previous swap space fallocate -l 4G /swapfile #creating a swapfile chmod 600 /swapfile #giving permissions mkswap /swapfile #making swap the file swapon /swapfile #activating swap on the file echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab #stabilizying swap for it to be there after next reboot </code></pre> <p>Now I have the swap space I needed</p> <p><strong>free -m</strong></p> <pre><code> total used free shared buffers cached Mem: 1995 1153 842 64 116 455 -/+ buffers/cache: 581 1414 Swap: 4095 0 4095 </code></pre> <p>But, the 2GB of the previous swap space are still considered occupied if I do a df (maybe they will be free at the next reboot?) and my fstab has two entries for swap space.</p> <pre><code># &lt;file system&gt; &lt;mount point&gt; &lt;type&gt; &lt;options&gt; &lt;dump&gt; &lt;pass&gt; /dev/sda1 / ext4 errors=remount-ro,relatime 0 1 /dev/sda2 swap swap defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 devtmpfs /dev devtmpfs rw 0 0 /swapfile none swap sw 0 0 </code></pre> <p>In this situation, how I may proceed to finalize the procedure? I have to remove the second line referring to swap in the fstab? (I mean /dev/sda2 swap swap defaults 0 0) It is safe to reboot?</p>
0non-cybersec
Stackexchange
[Spoilers][Rewatch] Fullmetal Alchemist: Brotherhood Episode 53 Discussion. #Episode 53: *Flame of Vengeance* --- **Information:** * [MAL](https://myanimelist.net/anime/5114/Fullmetal_Alchemist__Brotherhood) * [IMDB](http://www.imdb.com/title/tt1355642/) --- [↞↞Previous Episode↞↞](https://redd.it/5frs1u)|| [**Rewatch Index**](https://www.reddit.com/r/anime/comments/559rhx/fullmetal_alchemist_brotherhood_rewatch_schedule/) || [↠↠ Next episode↠↠](https://redd.it/5g5e3m) --- **Legal Streams:** As of October 3rd, the full series is available on [Crunchyroll](http://www.crunchyroll.com/fullmetal-alchemist-brotherhood) in a large number of countries both subbed and dubbed (both of which are highly acclaimed). If it's not available in yours, then you might want to check if it's available on [Netflix](https://www.netflix.com/). Failing that, I believe the only alternative left is the high seas. Adding to that, For AU/NZ viewers, Full metal alchemist is available on [AnimeLab](https://www.animelab.com/shows/fullmetal-alchemist-brotherhood). --- **Spoilers PSA:** Rewatchers, please do your absolute best to keep these threads spoiler-free. I want newcomers to have the full experience of this show and wouldn't want them spoiled on key events. Also, please try to minimize your use of spoiler tags. No one wants to scroll through a forest of black. --- ###[Eyecatch album](http://imgur.com/a/BRRA8), courtesy of /u/Magnus_Lux --- ##[~Daily Fanart~](http://i.imgur.com/PkXaUN5.jpg) ##[~Daily Fanart~](http://i.imgur.com/08GXe50.jpg) ##[~Daily Fanart~](http://i.imgur.com/EeC3SAr.jpg) ^^^^^^^^^^^^^^^^^^^^s
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
Redditor pretends to be gay to help out an asexual co worker whose family is on his back. Things take a turn for the worst in this brilliant story that was narrated by another fellow redditor (link in the main post for narration).
0non-cybersec
Reddit
SOME NORTH CAROLINA RESIDENTS MAILED INCORRECT VOTER REGISTRATION INFORMATION.
0non-cybersec
Reddit
Show that each of the $35$-roots of unity is the cube of some root of $35$th degree of unity.. <p>After showing that the $n$-roots of unity form a multiplicative group I'm asked the following:</p> <blockquote> <p>Show that each of the $35$-roots of unity is the cube of some root of $35$th degree of unity.</p> </blockquote> <p>I don't have idea how to start with this problem. I'm only able to sort of formalize what the problem is asking me to prove, that is: </p> <blockquote> <p>Let $(\mathbb{C}^{35}, \cdot)$ be the group of the $35$-roots of unity. Then I have to show that $\forall a \in \mathbb{C}^{35}\ \exists\ b \in \mathbb{C}^{35}: b = a^3$.</p> </blockquote> <p>Any help would be appreciated.</p>
0non-cybersec
Stackexchange
Sunset in Namibia.
0non-cybersec
Reddit
This weekend in Polish city Lodz.
0non-cybersec
Reddit
Need an Ubuntu Server image with the minimum possible kernel and packages. <p>I need to build an Ubuntu (16.04 at the moment) base server image for deployment for compliance. We do not want things like... </p> <ul> <li>any added libraries (like python, perl)</li> <li>apt/aptitude/etc (we'll use Chef or Packer.io or something to build an image)</li> <li>vim</li> <li>ssh/sshd, sh/bash/etc. </li> <li>ping </li> <li>iputils </li> <li>bzip, gzip, tar, </li> <li>more, less</li> <li><p>sudo </p> <p>and so forth. </p></li> </ul> <p>Red Hat has a "minimal" - I see Ubuntu has: Core, MinimalCD, and NetBoot, however, these seem to require network and go and install the "base" Ubuntu image with this sort of stuff. For example, I just did the "Mini"CD which is 57MB, and I didn't select "base" or "standard system utilities", however, it still installed all sorts of stuff... 1.2GB total. 150 packages and 120 libraries... </p> <p>Research:<br> This one doesn't answer the question, is too old to resurrect, and the answer starts with "Perhaps" : <a href="https://askubuntu.com/questions/652422/ubuntu-server-minimal-package">Ubuntu Server minimal package</a> </p> <p>Further goals include minimizing disk and memory usage for VM/Cloud cost savings. </p>
0non-cybersec
Stackexchange
Naomi Ishida confirmed dead by her parents. She was coloring lead on Haruhi and Hyouka..
0non-cybersec
Reddit
Pointers in Swift. <p>I'm trying to understand the use of pointers in Swift, in particular: <code>Unsafe[Mutable]Pointer</code> and <code>UnsafeRaw[Mutable]Pointer</code>. I have several questions on the subject.</p> <ol> <li><p>Is <code>UnsafePointer &lt;T&gt;</code> equal to <code>const T * Pointer</code> in ? and <code>UnsafeMutablePointer &lt;T&gt;</code> is equal to <code>T * Pointer</code> in C?</p></li> <li><p>What is the difference between <code>Unsafe[Mutable]Pointer</code> and <code>UnsafeRaw[Mutable]Pointer</code>?</p></li> <li><p>Why does this compile</p></li> </ol> <p></p> <pre><code>func receive(pointer: UnsafePointer&lt;Int&gt; ) { print("param value is: \(pointer.pointee)") } var a: Int = 1 receive(pointer: &amp;a) // prints 1 </code></pre> <p>but this gives me an error?</p> <p></p> <pre><code>var a: Int = 1 var pointer: UnsafePointer&lt;Int&gt; = &amp;a // error : Cannot pass immutable value of type 'Int' as inout argument </code></pre>
0non-cybersec
Stackexchange
You know what a disparity is?.
0non-cybersec
Reddit
Needed IMMEDIATELY...no benefits though....
0non-cybersec
Reddit
NTLDR is missing. <p>I'm new with Ubuntu. </p> <p>I have formatted my HDD and tried to install Ubuntu from a DVD, but I only get the above mentioned message. </p> <p>Any suggestions?</p>
0non-cybersec
Stackexchange
Firefox: make &quot;file://path/to/a/directory/&quot; open Windows Explorer. <p>Is there a way to make FireFox open a Windows Explorer view of the directory when clicking a hyperlink with a href that begins with <code>file://</code> and specifically points to a directory, not a file (perhaps even only when it expicitly does so by ending with a trailing delimiter <code>/</code>?)</p> <p>Ideally it would do as prescribed under <code>HKEY_CLASSES_ROOT\Folder\shell\open\command</code> (I see now there's something else there under newer Windows versions than what I remember from XP...), but there's <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx" rel="nofollow noreferrer">a Shell API call for that</a>... </p> <p>Is this possible with changes to <code>about:config</code>? Is it possible with an add-on? Should I post this as a feature request on bugzilla?</p>
0non-cybersec
Stackexchange
$(1-ba)$ left-invertible $\implies (1-ab)$ left-invertible. <p>Suppose <span class="math-container">$(1-ba)$</span> in a ring <span class="math-container">$R$</span> is left-invertible. Then we wish to show that <span class="math-container">$(1-ba)$</span> is left invertible and explicitly construct its inverse. </p> <p>We have <span class="math-container">$Rb(1-ab)=R(1-ba)b=Rb \subseteq R(1-ab)$</span>. I'm unsure of why the last equality is true <span class="math-container">$R(1-ba)b=Rb$</span>. We do know that <span class="math-container">$(1-ba)$</span> is left-invertible and so there is an <span class="math-container">$x \in R$</span> such that <span class="math-container">$x(1-ba)=1$</span> but I don't know how to actually make the conclusion. Then we conclude that <span class="math-container">$1 \in Rb \implies 1 \in R(1-ab)$</span> and so <span class="math-container">$(1-ab)$</span> is left-invertible as is <span class="math-container">$b$</span>. We have a <span class="math-container">$y \in R$</span> such that <span class="math-container">$yb=1$</span>. Thus, the explicitly constructed inverse is</p> <p><span class="math-container">$$(yxb)(1-ab)=(yx)(1-ba)b=yb=1$$</span></p> <p>I'm fairly confident about the construction of the inverse but the set equality has lost me. </p> <p>(A somewhat relevant post <a href="https://math.stackexchange.com/questions/2341289/in-a-ring-1-ab-is-invertible-implies-1-ba-is-invertible-from-scratch">In a ring, <span class="math-container">$1-ab$</span> is invertible <span class="math-container">$\implies$</span> <span class="math-container">$1-ba$</span> is invertible (from scratch)</a>)</p>
0non-cybersec
Stackexchange
IAmA 74-time Jeopardy! champion, Ken Jennings. I will not be answering in the form of a question.. Hey Redditors! I'll be here on and off today in case anyone wants to Ask Me Anything. Someone told me the questions here can be on any subject, within reason. Well, to me, "within reason" are the two lamest words in the English language, even worse than "miniature golf" or "Corbin Bernsen." So no such caveats apply here. Ask Me ANYTHING. I've posted some proof of my identity on my blog: http://ken-jennings.com/blog/?p=2614 and on "Twitter," which I hear is very popular with the young people. http://twitter.com/kenjennings **Updated to add**: You magnificent bastards! You brought down my blog! **Updated again to add**: Okay, since there are only a few thousand unanswered questions now, I'm going to have to call this. (Also, I have to pick up my kids from school.) But I'll be back, Reddit! When you least expect it! MWAH HA HA! Or, uh, when I have a new book to promote. One of those. Thanks for all the fun. **Updated posthumously to add**: You can always ask further questions on the [message boards](http://ken-jennings.com/messageboards/) at my site. You can sign up for my [weekly email trivia quiz](http://ken-jennings.com/blog/) or even [buy books](http://www.ken-jennings.com/brainiac.html) there as well.[/whore]
0non-cybersec
Reddit
Girl, 9, forced to marry man 69 years her senior.
0non-cybersec
Reddit
Lunch for two. "Huevos Rotos" Chorizo sausage, Homemade Guacamole, Triple cooked chips and Fried eggs..
0non-cybersec
Reddit
Someone has been visiting non-league (UK) football grounds and rating their chips.
0non-cybersec
Reddit
[WDYWT] Hey friends its been a lil bit.
0non-cybersec
Reddit
Aces high..
0non-cybersec
Reddit
Compute $\oint_{\partial D_3(0)}\frac{\cos(z+4)}{z^2+1}dz$. <p>I want to compute <span class="math-container">$$\oint_{\partial D_3(0)}\frac{\cos(z+4)}{z^2+1}dz$$</span> without using the residue theorem. My plan was to do a partial fractians decomposition: <span class="math-container">$$\frac{\cos(z+4)}{z^2+1}=\frac{i}{2}\cos(z+4)\left(\frac{-1}{z-i}+\frac{1}{z+i}\right)$$</span>And then I want to use the Cauchy integral formula: <span class="math-container">$$\oint_{\partial D_3(0)}\frac{\cos(z+4)}{z^2+1}dz=\frac{i}{2}\oint\frac{-\cos(z+4)}{z-i}dz+\frac{i}{2}\oint\frac{\cos(z+4)}{z+i}dz$$</span> <span class="math-container">$$=-\frac{i}{2}\cos(4+i)+\frac{i}{2}\cos(4-i)$$</span></p> <p>Is this correct? If not, how do I approach it?</p>
0non-cybersec
Stackexchange
Solution for non-IT to update certain AD user account info (phone/address/title/etc.). How do you all manage updates to AD user account info like that found on the General/Address/Telephones/Organization tabs in AD? Today in our organization when someone is promoted (for instance) three different departments separately maintain this info, IT, HR, and Corporate Services (for the corp wide phone/address list.) I'd like to make it so that only one group manages these changes, and ideally have it not be IT since there's really nothing technical about changing a person's job title or department name. Sure, we may have to physically move them, or change their group memberships, but the rest doesn't *have to be* maintained by IT, right? I want to have the fabled "single source of truth" for user info, which will then allow us to have the correct info also available in Outlook/Exchange, Lync, SharePoint, company directory, etc. I'd also like to start storing thumbnail pics of associates in there so they automatically appear in Outlook/Lync/SP/etc. My question is... do any of you already do this? If so, how do you give access to someone outside of IT to do it? Obviously I could give them access to ADUC and tweak the permissions just right... but that seems cumbersome for us to maintain (as we grow and add OU's) and them to use. Is there software out there that makes this management easy? Custom apps you've built? Something else I'm not thinking about? Edit: 450 users and growing
0non-cybersec
Reddit
Command to create a file owned by another user. <p>I created a directory <code>test</code> owned by the <code>root</code> user, and then I created a file called <code>F1</code> inside <code>test</code> , now I need to create a file called <code>T5</code> inside <code>test</code> but by a user called <code>student</code></p> <p>What is the command to do that? </p> <p>This what I did:</p> <pre><code>root@mylamp:/# mkdir test root@mylamp:/# touch F1 </code></pre> <p>Now I need to access <code>test</code> by the user <code>student</code> to create <code>F5</code></p> <pre><code>student@mylamp:/test$ </code></pre>
0non-cybersec
Stackexchange
python if elif else statement. <p>I'm trying to create a program with python that calculate the cost for shipping. </p> <p>However, I can't run the program to where it works properly. </p> <p>What ever my total is the same amount comes out as $6 for US and $8 for Canada. I can't seem to get pass that.</p> <pre><code>total = raw_input('What is the total amount for your online shopping?') country = raw_input('Shipping within the US or Canada?') if country == "US": if total &lt;= "50": print "Shipping Costs $6.00" elif total &lt;= "100": print "Shipping Costs $9.00" elif total &lt;= "150": print "Shipping Costs $12.00" else: print "FREE" if country == "Canada": if total &lt;= "50": print "Shipping Costs $8.00" elif total &lt;= "100": print "Shipping Costs $12.00" elif total &lt;= "150": print "Shipping Costs $15.00" else: print "FREE" </code></pre>
0non-cybersec
Stackexchange
This was my favorite book as a kid. I forgot all about until today..
0non-cybersec
Reddit
Use Microphone and Headphones on a splitter. <p>I bought this thing: <a href="http://www.dhgate.com/store/product/3-5mm-1-male-to-2-female-earphone-headphone/157719473.html" rel="nofollow noreferrer">http://www.dhgate.com/store/product/3-5mm-1-male-to-2-female-earphone-headphone/157719473.html</a> From a shop.My laptop have only a jack port and i don't have Headphones with microphone.And i need this thing to connect my microphone and my headphones on it.I don't know if this works.I tryed this and i can't find the microphone on any program.The headphones are working.</p> <p>Windows 7 Premium Home |x86| Quad Core</p>
0non-cybersec
Stackexchange
The Chicken Game.
0non-cybersec
Reddit
Bounds on the Christoffel symbols in normal coordinates. <p>Given a smooth closed Riemannian manifold <span class="math-container">$(M,g)$</span> with injectivity radius <span class="math-container">$i_M$</span> I can choose for every <span class="math-container">$x \in M$</span> an orthonormal basis of <span class="math-container">$T_x M$</span> and a normal coordinate system <span class="math-container">$ \phi$</span> in <span class="math-container">$x$</span>, such that the Christoffel symbols satisfy <span class="math-container">$$ (\Gamma^k_{ij})_x(0)=0. $$</span> By differentiability we have for <span class="math-container">$p \in B_{i_M}(0)$</span> <span class="math-container">$$ |(\Gamma^k_{ij})_x(p)| \leq |p| \sup_{p \in B_{i_M}(0)} |D(\Gamma^k_{ij})(p)| $$</span> How can I bound <span class="math-container">$\sup_{p \in B_{i_M}(0)}|D(\Gamma^k_{ij})(p)|$</span> in terms of the curvature tensor <span class="math-container">$R$</span> of <span class="math-container">$(M,g)$</span>? I found that the Christoffel symbols satisfy <span class="math-container">$$ \Gamma^k_{ij,l} = -\frac{1}{3} ( R^k_{jkl} + R^k_{kjl}). $$</span> Does this imply that <span class="math-container">$$ \sup_{p \in B_{i_M}(0)} |D(\Gamma^k_{ij})(p)| \leq \sup_{p \in B_{i_M}(0)} \sup_{ijkl} R^k_{jkl}(\phi^{-1}(p)). $$</span></p>
0non-cybersec
Stackexchange
How to see if filebeat data is being sent to logstash. <p>When I open up Kibana interface, I get an error to configure index when logstash-* is entered as a query:</p> <p>kibana error: please specify a default index pattern</p> <p>How can I see if filebeat is sending logs to logstash? I followed the filebeat and ELK stack tutorials exactly. I can see data when I enter in filebeat-* into Kibana, but nothing when I enter in logstash-* into Kibana.</p>
0non-cybersec
Stackexchange
Proving existence of unique polynomial satisfying some integral. <p>I came across a problem that I was having some trouble with.</p> <p>Fix a positive integer $n$. Let $f(x) \in C(R)$ be a (real valued) continuous function. Show that there exists a unique polynomial $q(x) \in P_n(R)$, such that for every polynomial $p(x) \in P_n(x)$ we have $\int^1_0 p(x)f(x)dx=\int^1_0 p(x)q(x)dx$.</p> <p>I know that typically to solve uniqueness questions, you need to assume another $g(x)$ exists and then manipulate the resulting equation(s) to show that $g(x)=q(x)$. However, it's not so clear to me here how I should go about this here. I think that the $p(x)$ might be confusing me in this question.</p> <p>If anyone can give me some pointers, it would be greatly appreciated. Thanks!</p>
0non-cybersec
Stackexchange
YSK that there's a woman who will turn your kid's drawings into their very own stuffed animals!.
0non-cybersec
Reddit