text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
CSS :after content below a select element causes click not to work. <p>I have this (simplified) css for the select element to get rid of the browser-specific appearance</p> <pre><code>.select{ display:inline-block; position:relative; } .select:after{ position:absolute; bottom:0;right:0; content:'\2193'; } select{ appearance:none; (-moz and -webkit too) width:100%; height:100%; } </code></pre> <p>(Best seen in <a href="http://jsfiddle.net/kwpke3xh/" rel="noreferrer">http://jsfiddle.net/kwpke3xh/</a>)</p> <p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false"> <div class="snippet-code snippet-currently-hidden"> <pre class="snippet-code-css lang-css prettyprint-override"><code>body{ background:#eef; font-family:sans-serif; } .select{ display:inline-block; background-color:#fff; border-radius:.5em; border:.1rem solid #000; color:#013; width:8em; height:1.5em; vertical-align:middle; position:relative; } .select:after{ position:absolute; bottom:.15em;top:.15em;right:.5rem; content:'\2193'; } select{ -webkit-appearance:none; -moz-appearance:none; appearance:none; font:inherit; border:none; background-color:transparent; color:inherit; width:100%; height:100%; padding:0 .5em; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;span class="select"&gt; &lt;select&gt; &lt;option&gt;A&lt;/option&gt; &lt;option&gt;B&lt;/option&gt; &lt;/select&gt; &lt;/span&gt;</code></pre> </div> </div> </p> <p>It looks good, aside from Firefox still showing the arrow (as described <a href="https://stackoverflow.com/questions/24165355/firefox-30-0-moz-appearance-none-not-working">Firefox 30.0 - -moz-appearance: none not working</a>)</p> <p>The only technical problem is that when I click on the select element, it shows the option elements, but if I click directly on the arrow, it does not.</p> <p>Is there a way to avoid this?</p>
0non-cybersec
Stackexchange
Every single song Clear Channel suggested its stations skip post-9/11.
0non-cybersec
Reddit
'Affluenza' teen may delay deportation with human rights law.
0non-cybersec
Reddit
Table of contentes: title overlaping. <p>I am using this code for table of contents,</p> <pre><code>\tableofcontents{} </code></pre> <p>but for the sections where I apply</p> <pre><code>\renewcommand{\thesection}{Appendix \Alph{section}} \section{- Summary statistics by year} </code></pre> <p>the reference in the table of contents appears overlapped, like:</p> <p><a href="https://i.stack.imgur.com/iT2i9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iT2i9.png" alt="enter image description here" /></a></p> <p>Can you please help me? Thanks!</p>
0non-cybersec
Stackexchange
Cauchy&#39;s Formula. <p>In the proof for Cauchy's Formula in my notes it states that $$\frac{1}{2\pi i}\int_{∂D}\frac{dw}{w-z}=1,$$ can somebody please explain why this is to me. Is it something to do with Euler's identity?</p> <p>If anybody could help me it would be much appreciated, sorry if this is not explained very well.</p> <p>Thanks very much,</p>
0non-cybersec
Stackexchange
problem - upgrade 15.10 to 16.04 , 404 not found. <p>It is my first question on this website. I am newbie, I am using dual boot on my dell laptop with windows 10 and ubuntu 15.10. I want my Ubuntu 15.10 upgraded to 16.04. Currently, I can do <strong><code>sudo apt-get update</code></strong> , <strong><code>sudo apt-get upgrade</code></strong> and <strong><code>sudo apt-get dist-upgrade</code></strong> on my Ubuntu 15.10 without any problem, but when I use <strong><code>sudo update-manager -d</code></strong> and proceed further </p> <p><a href="https://i.stack.imgur.com/6Odm4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Odm4.png" alt="enter image description here"></a> </p> <p>There were options:</p> <pre><code>Upgrading Ubuntu to version 16.04 Preparing to upgrade Setting new software channels Getting new packages Installing the upgrades Cleaning up Restarting the computer </code></pre> <p>After finishing first step, on second step <strong>Setting new software channels</strong> , after some times it shows:</p> <pre><code>W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/source/Sources 404 Not Found [IP: 91.189.88.152 80], W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.88.152 80], W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/binary-i386/Packages 404 Not Found [IP: 91.189.88.152 80], E:Some index files failed to download. They have been ignored, or old ones used instead. </code></pre> <p>But, when I go to these websites, I find Sources, Packages file only in the form of <code>Sources.gz/tz</code> , <code>Packages.gz/tz</code>. I do not know how to configure, whatever is needed, so that it can extract <code>Sources.gz/tz</code> and <code>Packages.gz/tz</code> without any 404:not found sign.</p> <p>Please, help me. Thanks in advance.</p>
0non-cybersec
Stackexchange
Visual Studio 2005 to send notification on build completion. <p>OS: Windows 7 Visual Studio 2005 SP1 + Visual Assist X 1830</p> <p>Looks like there's no way to do this for VS2005. I know in Windows control panel > Sound settings, we can set VS2008/2010 Build Finishes/Success/Error sounds. However, I was wondering if we can set any type of notifications? Like making the VS icon on taskbar flashing (similar to getting new message in MSN Messenger). Is that possible?</p>
0non-cybersec
Stackexchange
My 3rd try at dark sky photography, looking for critique and advices.
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
Sweet Dreams.
0non-cybersec
Reddit
Petition for the Theatrical Cuts of the Original Star Wars Trilogy On Blu-ray.
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
Image source binding in Aurelia. <p>I am trying to bind the <code>src</code> attribute of an <code>img</code> tag in an aurelia component, how can I do so?</p> <p>I'm creating some images in a <code>reapeat.for</code> loop this way:</p> <pre class="lang-html prettyprint-override"><code>&lt;img repeat.for="picture of infoboard.memberPictures" src.bind="picture"&gt; </code></pre> <p>In which, the <code>memberPictures</code> array comes from the view model, and the value of <code>picture</code> is a relative address: <code>../../../assets/pictures/img_avatar.png</code>.</p> <p>In the view model, I fetch members' info from the database and by processing the data, populate the <code>memberPictures</code> array this way:</p> <pre><code>this.httpClient.fetch(`boards/membersof/${this.infoboard.id}`) .then(response =&gt; response.json()) .then(data =&gt; { this.infoboard.memberPictures = data.result.map(element =&gt; `../../../assets/pictures/${element.profile_pic}.png`); }); </code></pre> <p>Binding the address this way, the images do not load, like this:</p> <p><img src="https://raw.githubusercontent.com/Galiold/references/master/aurelia-bind-img-src/src-bind-problem.png" alt="picture of the problem" title="problem with dynamic addressing"></p> <p>and also the browser console shows the following error:</p> <pre class="lang-sh prettyprint-override"><code>img_avatar.png:1 GET http://localhost:8080/assets/pictures/img_avatar.png 404 (Not Found) </code></pre> <p>when inspecting the elements, the picture tag for member avatar is this:</p> <pre class="lang-html prettyprint-override"><code>&lt;img src.bind="picture" class="au-target" au-target-id="10" src="../../../assets/pictures/img_avatar.png"&gt; </code></pre> <p>But if we provide the image source with a static image with the exact same address generated in the above example as shown below:</p> <pre class="lang-html prettyprint-override"><code>&lt;img repeat.for="picture of infoboard.memberPictures" src.bind="../../../assets/pictures/img_avatar.png"&gt; </code></pre> <p>there will be no problem:</p> <p><img src="https://raw.githubusercontent.com/Galiold/references/master/aurelia-bind-img-src/src-bind-no-problem.png" alt="picture of the problem" title="no problem with static addressing"></p> <p>and now by inspecting elements there is different result:</p> <pre class="lang-html prettyprint-override"><code>&lt;img src="/a5e81f19cf2c587876fd1bb08ae0249f.png"&gt; </code></pre> <p>Apparently, there is a difference in handling static files in aurelia. How is the image source changed this way, and what is the correct way of binding the image source?</p>
0non-cybersec
Stackexchange
New Chrome experiment lets you use your android phone as controller for 1-4 players on a shared computer screen. .
0non-cybersec
Reddit
A 9-year-old girl gave this heartfelt letter to her teacher after he came out as gay.
0non-cybersec
Reddit
Cisco IOS version. <p>Current release: 15.0(2)SE4</p> <p>Latest release: 15.2(2)SE6 ED</p> <p>Recommended release: 15.0(2)SE6 ED</p> <p>Two questions:</p> <ol> <li><p>What does the 'SE' stand for in the IOS versions?</p></li> <li><p>Where can I find Cisco release notes that speak about the limitations, caveats and restrictions of each release?</p></li> </ol> <p>Thanks in advance. </p>
0non-cybersec
Stackexchange
Is there an orbot equivalet app for Desktop?. <p>I've been using Orbot for Android for a while and having a great experience with it. I always thought it would be slow and so on.</p> <p>Now, for Desktop, I can't find an equivalent to Orbot, that would behave like a VPN and route all connections via Tor regardless if I'm using the Tor browser.</p> <p>I found a couple of VPN tutorials but they all rely on some external company that provides the the "connect via Tor" profile for OpenVPN or some other generic VPN app.</p> <p>Is there such a thing as an Orbot for Windows/Mac?</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
Hey Disney, HBO, NBC, ABC, and the rest of you making us buy each subscription to watch one or 2 shows..
0non-cybersec
Reddit
All 131 career goals scored by Rogério Ceni, the goalkeeper, who retired yesterday.
0non-cybersec
Reddit
It seems the fundamentalists are in agreement. Convert or die.... Convert, pay tax, or die, Islamic State warns Christians http://news.yahoo.com/convert-pay-tax-die-islamic-state-warns-christians-181415698--business.html?soc_src=mediacontentsharebuttons And.... Duck Dynasty Phil: It’s Time to Convert ISIS or Kill Them http://time.com/3261225/duck-dynasty-kill-convert-isis-phil-robertson/
0non-cybersec
Reddit
Median Rents of Approx. 162 U.S. & Canadian Cities.
0non-cybersec
Reddit
A Question on the Convergence of Products. <p>I may be asking a very basic question in real analysis, but I can neither prove or disprove it even after repeated trials. The question is:</p> <p>Let $a_j$ be a sequence of <strong>non-negative</strong> real numbers such that $\prod_{j=1}^n (1+a_j)$ is bounded as a sequence of $n$. Prove or disprove that $\prod_{j=1}^n (1+2a_j)$ is also bounded as a sequence of $n$. </p> <p>Even if this is true, does there exist a large constant $M$, such that $\prod_{j=1}^n (1+Ma_j)$ is unbounded as a sequence of $n$?</p>
0non-cybersec
Stackexchange
My brother/roommate is making sauerkraut in his closet. AMA. So, apparently you can make sauerkraut in your closet because my brother is doing exactly that. He turned his armoire into a sauerkraut-maker by installing a fan, connected to a thermometer, that sucks in air from outside anytime the temperature gets above 75 degrees Fahrenheit. Now our NYC apartment smells like fermenting vegetable matter. AMA EDIT: You can downvote all you like; it's not going to make the 'kraut any less delicious. EDIT 2: [Pictures!](http://kooganani.imgur.com/sauerkraut) These are in no particular order, but include the following: Converting the armoire, cutting the cabbage, various 'kraut glamor shots, a wiring diagram for the soon-to-be air-flow mechanism, and me and my brother eating the bounty. Enjoy!
0non-cybersec
Reddit
105-year-old Japanese runner Hidekichi Miyazaki dubbed as the ‘Golden Bolt’ who has broken the world record in the 100-meter dash for the over-105 age category.
0non-cybersec
Reddit
Does color blindness affect a person's ability to see in darkness/dim light?. I've heard people who only rod can see well in dim light than a normal person, but I've also heard the opposite. I've also heard night vision is based on the different wavelengths of colors. So does a person who have some kind of color blindness would have better/worse night time vision than a normal person?
0non-cybersec
Reddit
My new Faye Valentine tattoo! Tattoo and Design by: Kara Klenk.
0non-cybersec
Reddit
How to introduce a few lines in Bangla font in an otherwise English document in PdfLaTex?. <p>I am writing my dissertation with TeXMaker, compiling with PDFLatex. I want to add a couple of lines in Bangla fonts on a particular page. How can I accomplish that? I am on Mac El-Capitan system. I have been able to compile a primarily Bengali document as given <a href="https://tex.stackexchange.com/questions/99606/how-to-write-bengali-in-latex/99659#99659">here</a>.</p>
0non-cybersec
Stackexchange
Did someone say Par Olofsson?.
0non-cybersec
Reddit
Mac / CAM entries from non-Cisco switches with Q-BRIDGE-MIB. <p>How do I do community string Indexing for other switches like <strong>D link DES 3526</strong> and <strong>Brocade Fastiron SX800</strong>?</p> <p>I am running a java program to poll a specific vlan on a <strong>Brocade sx 800</strong> l3 switch. The program throws a "Time out error". I then checked the switch log , which says <strong>community string invalid</strong>. I'm having trouble with the syntax "community@vlanid".</p> <p>Displaying all Vlans and their names:</p> <p><img src="https://i.stack.imgur.com/IH232.jpg" alt="Displaying all Vlans and their names"></p> <p>Could someone please tell me the community string indexing for switches other than Cisco?</p> <h3>EDIT</h3> <p>I tried the commands in CLI with Net-SNMP: </p> <p>Poll sysDescr:</p> <pre><code>snmpwalk -v 2c -c public 10.21.200.4 1.3.6.1.2.1.1.1 SNMPv2-MIB::sysDescr.0 = STRING: DES-3526 Fast-Ethernet Switch </code></pre> <p>Poll dot1dTpFdbAddress (default Vlan):</p> <pre><code>snmpbulkwalk -v 2c -c public 10.21.200.4 1.3.6.1.2.1.17.4.3.1.1 SNMPv2-SMI::mib-2.17.4.3.1.1.0.27.17.189.90.220 = Hex-STRING: 00 1B 11 BD 5A DC SNMPv2-SMI::mib-2.17.4.3.1.1.4.254.127.149.86.136 = Hex-STRING: 04 FE 7F 95 56 88 </code></pre> <p>Poll dot1dTpFdbAddress (default Vlan4):</p> <pre><code>snmpbulkwalk -v 2c -c public@4 10.21.200.4 .1.3.6.1.2.1.17.4.3.1.1 Timeout: No Response from 10.21.200.4 </code></pre> <p>Netdisco listing all ports and corresponding MAC addresses <img src="https://i.stack.imgur.com/XXr1q.jpg" alt="Netdisco listing all ports and corresponding MAC addresses"></p> <p>I want to retrieve all MAC addresses from individual ports. The <strong>Q-Bridge MIB</strong> shows all the ports on the switch but unfortunately the MAC address OID is not accessible. On the other hand, using the <strong>Bridge MIB</strong> lists only MAC addresses from the default Vlan. P.S: the community string indexing ( coommstring@vlanid ) to access other vlans only works with CISCO switches.</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
show $[0,1]$ is uncountable using outer measure. <p>This is a question from <em>Real Analysis</em> by Royden, 4th edition. (#5, pg. 34)</p> <p>Using properties of outer measure, prove that $[0,1]$ is uncountable.</p> <p>I believe that I am going to have to assume otherwise and use countable subadditivity in some way to produce a contradiction. I am not sure how to do so though. What other properties of outer measure might I need?</p> <p>Thank you for any help!</p>
0non-cybersec
Stackexchange
Just normal family photos (x-post r/AnormalDayInRussia).
0non-cybersec
Reddit
Cancel your plans for the 14th, Reddit.
0non-cybersec
Reddit
How to set max line length rules in view? (not linting). <p>I am using Webstorm 7 and want to set a max line length in the view to be 80 and not 120 (as the default ruler is set to).</p> <p>I've searched all over and the closest I can find is the JSLinter (<a href="https://www.jetbrains.com/webstorm/webhelp/jslint.html">https://www.jetbrains.com/webstorm/webhelp/jslint.html</a>) but I cannot seem to see how to actually change the ruler in the IDE.</p> <p>Question: How do I set the ruler for the line length in Webstorm 7?</p>
0non-cybersec
Stackexchange
Compiler compiler that consumes BNF. <p>Is there any reason why there are no parser generators that consume straight BNF?</p> <p>I'm familiar with <a href="https://javacc.java.net/" rel="noreferrer">JavaCC</a> and <a href="http://www.antlr.org/" rel="noreferrer">Antlr</a>, and recently came across <a href="http://www.parse2.com/" rel="noreferrer">Parse2</a>. It seems that each has its own notation. BNF is really easy to read and the other notations aren't. BNF is unambiguous. Is there some inherent reason why I can't feed BNF to a compiler compiler and get a parse tree out?</p>
0non-cybersec
Stackexchange
android button with half circle edges. <p>I am trying to create a shape to be used for my imagebuttons in my Android project that would essentially have half circles for the left and right sides.</p> <p>I thought I could just use a shape XML with a radius, but that just rounds the corners where I need the whole left and right sides to be half circles like the image below. </p> <p>My current XML for the shape looks like this:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:color="@color/white"&gt; &lt;corners android:radius="60dip" /&gt; &lt;stroke android:width="0dp" android:color="#000000" /&gt; &lt;solid android:color="@color/white" /&gt; &lt;/shape&gt; </code></pre> <p>but I am trying to get this effect : <img src="https://i.stack.imgur.com/hNYAk.png" alt="enter image description here"></p>
0non-cybersec
Stackexchange
Corona virus again?.
0non-cybersec
Reddit
Flowers usually get the glory, but let’s hear it for foliage!.
0non-cybersec
Reddit
Born Like an Artist ....
0non-cybersec
Reddit
Run npm 32-bit on linux 64-bit system?. <p>So I download this: <code>https://nodejs.org/dist/v10.16.3/node-v10.16.3-win-x86.zip</code></p> <p>Unzip it. Then install wine 32-bit:</p> <pre><code>dpkg --add-architecture i386 &amp;&amp; apt-get update &amp;&amp; apt-get install -y wine32 </code></pre> <p>I get this error message:</p> <pre><code>wine ./node/npm --version wine: Bad EXE format for Z:\srv\node\npm.. </code></pre> <p>The <code>node.exe</code> works though:</p> <pre><code>wine node/node.exe --version v10.16.3 ls -la node/ total 21544 drwxr-xr-x 3 root root 4096 Aug 15 18:54 . drwxr-xr-x 1 root root 4096 Sep 19 09:33 .. -rw-r--r-- 1 root root 53390 Aug 15 18:19 CHANGELOG.md -rw-r--r-- 1 root root 70122 Aug 15 18:19 LICENSE -rw-r--r-- 1 root root 27446 Aug 15 18:19 README.md -rw-r--r-- 1 root root 21845656 Aug 15 18:54 node.exe -rw-r--r-- 1 root root 10630 May 24 2018 node_etw_provider.man drwxr-xr-x 3 root root 4096 Aug 15 18:54 node_modules -rw-r--r-- 1 root root 4974 Aug 15 18:19 node_perfctr_provider.man -rw-r--r-- 1 root root 702 May 24 2018 nodevars.bat -rw-r--r-- 1 root root 867 Aug 15 18:19 npm -rw-r--r-- 1 root root 483 May 24 2018 npm.cmd -rw-r--r-- 1 root root 922 May 26 2018 npx -rw-r--r-- 1 root root 539 May 26 2018 npx.cmd </code></pre> <p>As you can see npm is not an exe. How does one run the 32-bit npm on a 64-bit linux system via wine 32-bit?</p>
0non-cybersec
Stackexchange
Convergence of functions in $L^p$. <p>Let $\{f_k\} \subset L^2(\Omega)$, where $\Omega \subset \mathbb{R}^n$ is a bounded domain and suppose that $f_k \to f$ in $L^2(\Omega)$. Now if $a \geq 1$ is some constant, is it possible to say that $|f_k|^a \to |f|^a$ in $L^p$ for some $p$ (depending on $a$ and also possibly depending on $n$)? </p> <p>Showing the statement is true would probably require a smart way of bounding $\left| |f_k|^a - |f|^a \right|$ by a term including the factor $|f_k - f|^2$. However, I don't really know what to do with the fact that $a$ doesn't have to be an integer...</p>
0non-cybersec
Stackexchange
Using the Fundamental Theorem of Calculus to solve for a function. <p>I need to find a valid $f$ in this, knowing $x&gt;0$ and $a&gt;0$</p> <p>$$6+\int_a^x \frac{f(t)}{t^2}dt=2\sqrt{x}$$</p> <p>Applying the FCT i have: $$6+\frac{f(x)}{x^2}=2\sqrt{x}$$ so $$f(x)=(2\sqrt{x}-6)x^2$$</p> <p>Is this solution valid? I also need to calculate for my $f$ which $a$ is valid. I think every positive $a$ is valid, but i don't understand why my book ask this if i already know $a&gt;0$</p>
0non-cybersec
Stackexchange
My girlfriend hates cheesy jokes. What's your favourite ones so I can annoy her?. Dad jokes are good too. Puns are even better.
0non-cybersec
Reddit
iPhone 5 blurry camera. I just started having issues with my rear camera being blurry. It seems to take close up photos fine but after a couple feet it cannot focus at all. Anyone ever have similar problems? How can I fix it? Thanks
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
How do I list every other file extension using regex on Linux?. <p>I have the following command which lists all files that have the extension <code>.swf</code> however I would like to return a list of every file that does not have the extension <code>.swf</code></p> <pre><code>find . -maxdepth 1 -regextype posix-egrep -regex '.*/.*\.swf' -exec echo {} \; </code></pre>
0non-cybersec
Stackexchange
VPN on Fedora Linux?. <p>I'm looking to install and setup a VPN on my Linux installation which is Fedora 14. At the moment the only one I know of is OpenVPN but I'm wondering if this the best option for Fedora or if Fedora offers other options that are better?</p> <p>EDIT: Definitely looking for free solutions :)</p>
0non-cybersec
Stackexchange
Are static IP&#39;s supposed to show up in DHCP.leases list?. <p>I messed with the dhcp.leases file (removed, and remade it) hoping it would force the IP's to repopulate. That was a mistake.. I think I have fixed it by reinstalling though.</p> <p>Anyway, I setup static IP's for the servers via the dhcp.config file, I can connect to the servers via ssh &amp; ip, and the servers no longer show up in the leases list. But the one that didn't have a static IP did. </p> <p>Do static IP's not show up in the leases? Where/how would I see the static IP's that are connected?</p>
0non-cybersec
Stackexchange
Proof that a certain derivation is well defined. <p>I have spent several hours on this, apparently straightforward issue. This is with reference to page 17 in the following notes</p> <p><a href="http://www.math.lsa.umich.edu/~hochster/615W10/615.pdf" rel="nofollow">http://www.math.lsa.umich.edu/~hochster/615W10/615.pdf</a></p> <p>Suppose, $R$ is a commutative ring, $W$ a multiplicatively closed subset in $R$, $M$ an $R$-module. If $D:R\to M$ is a derivation, then $W^{-1}D: W^{-1}R\to W^{-1}M$ is a derivation where $W^{-1}D$ acts on $\frac{r}{w}$ by the quotient rule, i.e. maps $\frac{r}{w}$ to $\frac{wD(r)-rD(w)}{w^2}$.</p> <p>I have tried several manipulations, but I am unable to show that this map is well defined. I would appreciate if anyone can help me see what I am missing here.</p> <p>Thanks.</p>
0non-cybersec
Stackexchange
Kinematics equations with calculus what does dv mean?. <p>I am trying to solve for kinematics equations using calculus. I am trying to get to this equation:</p> <p>$$v_t = v_0 + at$$</p> <p>Which comes from, </p> <p>$$a = \frac{\mathrm{d}v}{\mathrm{d}t}$$ $$ \mathrm{d}v = a \cdot \mathrm{d}t$$ $$ \int_{v_0}^{v_t} \mathrm{d}v = \int_0^{\Delta t} a \cdot \mathrm{d}t$$ $$ v_t - v_0 = a \cdot t$$ $$ \boxed{ v_t = v_0 + at}$$</p> <p>1) What does this mean? <strong>Does it mean that the change in velocity = the acceleration times the change of time?</strong></p> <p>Now, when you continue, I also understand the definite integral. I understand why you must have v and v initial and t and 0 (t initial). However, my second question is:</p> <p>2) <strong>How can you get the antiderivative of something that is not even a derivative? is dv a derivative? I thought the derivative was (dv/dt), not just dv by itself?</strong></p> <p>I just don't understand how dv can be anything by itself?</p>
0non-cybersec
Stackexchange
Is there such thing as a relative jQuery selector?. <p>I have a reference to a jquery object with the <code>this</code> variable. I am looking for a way of applying the child selector to the object.</p> <p>I'm using <code>$(this).find('table &gt; tbody &gt; tr &gt; td')</code>, but what I'm aiming for is something more like <code>$('[Value of $(this) goes here somehow] &gt; table &gt; tbody &gt; tr &gt; td')</code>.</p> <p>I realise that I can do <code>$(this).children('table').children('tbody').children('tr').children('td')</code>, but I was wondering if there was some syntactic sugar I could use here.</p>
0non-cybersec
Stackexchange
How to model entities that exists in all bounded contexts and that are a central part of the app?. <p>I'm making an application using DDD principles. After thinking everything through as much as I can I'm down to start making my Bounded Contexts. I haven't set the final structure yet, but as of now my application will consist of the following bounded contexts:</p> <ol> <li>Employee managment</li> <li>Purchasing</li> <li>Archive</li> <li>Reporting</li> </ol> <p>I want this to be as pluggable as possible, so I can for example develop and maintain them seperately. Probably they will expose either WCF or Web API to interact with them.</p> <p>I will use <a href="http://www.udidahan.com/2011/10/02/why-you-should-be-using-cqrs-almost-everywhere%E2%80%A6/">Udi Dahans implementation of a simple CQRS pattern</a>. I'd prefer not to go all the way with event sourcing, message busses and so on because this wil not be a highly collaborative app (less than 1000 users, and they are not likely to edit the same small dataset), and this would add a lot of unneeded complexity.</p> <p>So to the questions:</p> <blockquote> <p><strong>The employee and department entities are common for all BC, how to model that?</strong></p> </blockquote> <p>Department is a part of the organizational structure, so in the employee managment BC the employees work in a department, they can manage an department and they have a history of departments they've worked on.</p> <p>In the purchasing BC goods are purchased from a department, and delivered to a department. Suplliers have different contracts with different departments.</p> <p>In archive some information will be archived and tied to a department, and so on.</p> <p>The same pretty much applies to Employees.</p> <blockquote> <p><strong>How to persist the data from the bounded contexts?</strong></p> </blockquote> <p>They can be mapped to the same database or each have their own.</p> <p><strong>Some thoughts I've made so far</strong></p> <p><em>How to model</em> <br/> Should I make one more BC called "Company" or "Organization" and manage departments there?</p> <p>Acoording to Udi Dahans article referenced above, I should make a department entity and a employee entity for each BC with just the fields and behavior I need for that BC. This sounds reasonable but then I'm thinking of how to actually use this and I can't figure that out. I need to access the departments managed somwhere else, but how exactly do i do this and not mix my BC's?</p> <p><em>How to use?</em><br/> Let's say that I get my list of departments from somwhere by querying. In the UI i get a list of departments that I want to make a purchase too. This is the first purchase for this department so the Purchasing BC does not know about this department yet... So the Department Object in Purchasing BC will be filled with data maintained from anoher BC - so how do I persist this? I would need to add some information like delivery address, and invoice address if that doesn't exist?</p> <p>In the "register department UI" should I then call "RegisterDepartment" service on all BC and then make shure that these are in sync with all changes made through the UI (MVC controller)?</p> <p>The same with employees. I want to know which employee made a purchase or put something in the archive. So somehow I would need an employee-object in these BC's too but manage them from a different BC.</p> <p><em>Persisting</em> <br/> Some of the challanges above could be solved by mapping the different employee-objects to the same table in a database. Purchasing BC and Archive BC cannot register new employees, but append information to those who are there and tie them to other objects in the same database. Then the database would make shure that all the BC's still live in the same world... </p> <p>I need advice so I don't end up making something that will be very hard to maintain later on.</p>
0non-cybersec
Stackexchange
Irrationality or Rationality of p+q given that pq=1. <p>Let $p,q$ are irrational numbers such that $pq=1$. Then what can we say about character of $p+q$? i.e, $p+q$ is rational or irrational? Probably, I believe it is irrational but could not prove.</p>
0non-cybersec
Stackexchange
What absolutely terrified you until you figured out how it works?.
0non-cybersec
Reddit
Password manager OneLogin hit by data breach - BBC News.
0non-cybersec
Reddit
How to remove these stains from a stainless steel pot?.
0non-cybersec
Reddit
Difference between Parameter vs. Tensor in PyTorch. <p>I would like to know the difference between PyTorch Parameter and Tensor?</p> <p>The existing <a href="https://stackoverflow.com/questions/50935345/understanding-torch-nn-parameter/51027227#51027227">answer</a> is for the old PyTorch where variables are being used?</p>
0non-cybersec
Stackexchange
SV/NSV Feats of the Day - Wednesday, 09 November 2016: Today, I conquered!. #The habit of persistence is the habit of victory! Celebrating something great? **Scale Victory, Non-Scale Victory, Progress, Milestones** -- this is the place! **Big or small, long or short**, please post here and help us focus all of today's awesomeness into an inspiring *and informative* mega-dose of greatness! (**Details are appreciated!!** *How are you losing your weight?*) * Did you just change your flair? pass a milestone? reach a goal? * Did you log for an entire week? or year? * Did you take the stairs? walk a mile? jog for 3? set a new personal record? * Fit into your old pair of jeans? throw away your fat clothes? fit into your college outfit? Post it here! This is the *new, improved* place for recording your **acts of awesomeness!** Due to space limitations, this may be an announcement (sticky) only occasionally. **Please find it daily and keep it the hottest thing on /r/loseit!** *** On reddit [your vote means, "I found this interesting!"](https://www.reddit.com/wiki/voting) Help us make this daily post the *most read, most used, most interesting* post on /r/loseit by reading, commenting, and participating often! ***
0non-cybersec
Reddit
How to uninstall Java 9 using pacman (target not found). <p>I want to remove Java 9 and install Java 10, but I cannot remove it using pacman.</p> <p>The result of <code>pacman -Q</code> (regarding Java 9):</p> <pre><code>java-environment-common 3-1 java-runtime-common 3-1 jdk9-openjdk 9.0.4.u11-1 jre9-openjdk 9.0.4.u11-1 jre9-openjdk-headless 9.0.4.u11-1 </code></pre> <p>But when I use <code>sudo pacman -Rsc</code>, it says <code>target not found</code>. Can you help me?</p>
0non-cybersec
Stackexchange
Predator is surprisingly deep for an action movie.
0non-cybersec
Reddit
Losing weight and the hoodie I want is either a size smaller or a size bigger. Advice please.. I'm that chubby guy that likes to wear band clothing. I'm losing weight fast so I think I should go for the medium (Right now I'm large) but I don't know about fashion, so help please? I'm afraid of getting the one smaller and it wont fit me even after I (hopefully) slim down.
0non-cybersec
Reddit
The Crown Sizzle - Netflix Trailer [HD].
0non-cybersec
Reddit
How To Remove Brut Maps From OpenDesire v4 ROM....
0non-cybersec
Reddit
TIL That Rob Halford of Judas Priest is the first openly gay Heavy Metal singer. He based his leather look that became standard Heavy Metal style on the gay BDSM subculture of the time..
0non-cybersec
Reddit
ffmpeg add new srt and delete old ones. <p>I'm struggling to find a one line command to merge new subtitle and delete existing ones from video file.</p> <p>Example:</p> <p>test1.mkv (already contain softcoded subs, dont need them)</p> <p>test1.srt (only subtitle that i want on video)</p> <p>Working under ubuntu server 18.04 LTS 64bit</p> <p>Any help?</p> <p>SOLUTION UPDATE;</p> <p>mkvmerge -o output.mkv -S 1.mkv --language 0:hrv --sub-charset 0:utf-8 1.srt</p> <p>This will do the work</p>
0non-cybersec
Stackexchange
What does it mean to share code between server and client in Javascript?. <p>I will be honest in saying that I did not quite understand one concept while digging into NodeJS. And this concept is about how NodeJS lets us share code between the server and client. What does this really mean? Does it mean that I can write a function that I perhaps call on the client side and it gets invoked as a remote method or does it mean that the code gets copied onto the client side and gets executed?</p> <p>Can someone give me some intuitive example that I can wrap my head around with?</p>
0non-cybersec
Stackexchange
arXiv:nlin/0601005v2 [nlin.AO] 1 Mar 2007 ar X iv :n li n/ 06 01 00 5v 2 [ nl in .A O ] 1 M ar 2 00 7 Reinforcement learning of recurrent neural network for temporal coding Daichi Kimura Yoshinori Hayakawa∗ Abstract We study a reinforcement learning for temporal coding with neu- ral network consisting of stochastic spiking neurons. In neural net- works, information can be coded by characteristics of the timing of each neuronal firing, including the order of firing or the relative phase differences of firing. We derive the learning rule for this network and show that the network consisting of Hodgkin-Huxley neurons with the dynamical synaptic kinetics can learn the appropriate timing of each neuronal firing. We also investigate the system size dependence of learning efficiency. 1 Introduction Many studies have assumed that neurons transmit information by their firing rate. The McCulloch-Pits unit is a typical model and networks of these units have been investigated. On the other hand, recent experiments suggest that the timing of neuronal firing may also contribute to the information representation function in the brain and the synaptic modification (Gray, König, Engel, & Singer, 1989; Bi & Poo, 1999; Varela, Lachaux, Rodriguez, & Martinerie, 2001; Reyes, 2003). For example, it seems that local and global synchronization play a significant role in integration of information which is distributed across the brain. Another example shows that the order of timing of neuronal firings can encode the information of stimuli on fingertips, and this encoding by sequence can transmit information faster than coding from the firing rate directly (Johansson & Birznieks, 2004). To capture the dynamical aspects of neural networks, networks consisting of various model neurons other than the McCulloch-Pitts unit have been ∗Department of Physics, Tohoku University, Sendai 980-8578, Japan 1 http://arxiv.org/abs/nlin/0601005v2 investigated, because McCulloch-Pitts units cannot describe the temporal behavior of neurons over short time scales. In this context, an associative memory for neural networks of oscillator neurons or spiking neurons has been studied (Aoyagi, 1995; Yoshioka & Shiino, 1998; Hoppensteadt & Izhikevich, 1999; Kanamaru & Okabe, 2000; Hasegawa, 2001; Lee & Farhat, 2001, 2002). In these systems, the relative phase differences, i.e., the timing of firings, are used to represent the memory. There are few studies of learning in pulse neuron models such as those consisting of Hodgkin-Huxley (HH) neurons because of difficulty in deriving the learning rule. Although several studies have been made of learning in networks that consist of integrate-and-fire (IF) model neurons (Seung, 2003; Xie & Seung, 2004; Cios, Swiercz, & Jackson, 2004), most of these studies focus only on coding in terms of the firing rate. However, it would be useful to combine temporal coding and learning because it has been shown that temporal coding can deal with more infor- mation and process it faster than coding from just the firing rate (Thorpe, Delorme, & Rullen, 2001). As an example of this, Delorme et al.(2001) show that a neural network consisting of IF neurons can learn to identify human faces by using “Rank Order Coding”, i.e., coding by the order of timing of each neuronal firing, where neurons are allowed to spike once only. In this paper, we study a reinforcement learning for temporal coding with neural network consisting of stochastic spiking neurons. After defining a network of coupled stochastic HH neurons and some quantities in Sec. II, we train the network to learn an XOR operation, where the output information is coded by the order of firing in Sec. III. In Sec. IV, we investigate how the result or performance of learning depends on the system size and the strength of noise, and conclusions follow. 2 The model To illustrate an example of the learning process of spiking neurons, we con- sider a neural network consisting of HH neurons. Since HH neurons show excitability, they can code information by the timing of firing. The complete 2 dynamics for a network of coupled HH neurons may be expressed as Cm dVi dt = gNam 3 ihi(VNa − Vi) + gKn 4 i (VK − Vi) + gL(VL − Vi) + ∑ j wijI s j (t) + ξi(t), (1) dmi dt = αm(Vi)(1−mi)− βm(Vi)mi, (2) dhi dt = αh(Vi)(1− hi)− βh(Vi)hi, (3) dni dt = αn(Vi)(1− ni)− βn(Vi)ni, (4) where Vi is the membrane potential of neuron i, Cm the membrane capac- itance, Vr(r = Na,K,L) are the equilibrium potentials, gr(r = Na,K,L) the conductance, mi, hi, ni the voltage dependent activating or inactivating vari- ables, αx and βx(x = m, h, n) the functions of voltage Vi (Hodgkin & Huxley, 1952), wij is the synaptic weight from neuron j to i (wij 6= wji in general), Isj (t) the synaptic current and ξi(t) is the Gaussian white noise which obeys, ξi(t) = 0, (5) ξi(t)ξj(t′) = Qδijδ(t− t ′), (6) where A is the average of A over time and Q the variance of noise. The synaptic current Isj (t) is given by Isj (t) = rj(t)[Vsyn − Vi], (7) where Vsyn is the synaptic reversal potential and rj(t) the fraction of bound receptors (Destexhe, Mainen, & Seijnowski, 1994) described by drj dt = αT (t)(1− rj)− βrj, (8) T (t) = { 1 t0j ≤ t < t 0 j + τ, 0 otherwise, (9) where α = 0.94 ms−1, β = 0.18 ms−1, t0j the time when the presynaptic neuron j fires (membrane potential over 27 mV) and τ = 1.5 ms (Fernández, Huerta, Corbacho, & Sigüenza, 2000) Fig. 1 shows the behavior of Vi(t) and ri(t) of single neuron added the external current whose amplitude is 10 mA. We used the forth order Runge-Kutta method with the time step ∆t = 0.01 to solve Eqs. (1)∼(4). 3 -80 -60 -40 -20 0 20 40 60 V [m v] 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 r Time[ms] Figure 1: The behavior of Vi(t) and rj(t) of single HH neuron added the external current. The neuron fires at t = 2 ms, then the value of ri(t) starts to increase. After a lapse of τ = 1.5 ms, ri(t) turns into decline. 4 To train the neural network, we use a reinforcement learning algorithm. Let us consider time sequences of states of neurons; σ ≡ (V (0),V (1),V (2), · · · ,V (T )), where V (t) denotes the vector (V1(t), · · · , VN(t)). We assign a scalar value (“reward”) to each time sequence σ according to the signal from the network (Sutton & Barto, 1998). We give a high reward R to the desirable time se- quence σ in each episode. Here we consider episodic learning. Since Eq. (1) includes the Gaussian white noise, we calculate the expected value of the reward 〈R〉, where 〈· · · 〉 signifies the average over all possible time sequences σ. Then the goal of learning is to maximize 〈R〉 by adjusting wij. We use an ascending gradient strategy; wNewij = w Old ij + δwij , (10) δwij = ǫ ∂〈R〉 ∂wij , (11) where ǫ is the learning coefficient. We can calculate the gradient of 〈R〉 with respect to wij (Hayakawa, 2001; Fiete & Seung, 2006), ∂〈R〉 ∂wij = 1 Q 〈 R(σ) ∫ T 0 dtξi(t)I s j (t) 〉 . (12) For details of the derivation, see appendix. 3 Learning procedure for temporal coding The present learning rule Eq. (10)∼(12) can be effective for any information coding including the order coding. To show an example, we consider a neural network consisting of 2 input neurons, 15 output neurons and hidden neurons. We divide the set of output neurons into three disjoint subsets, O1, O2 and O3, each containing 5 output neurons. Here, we assume that information is coded by the temporal order of the “group activity” of subsets O1, O2 and O3. As a learning goal, we chose an XOR operation in terms of order coding; the subsets O1, O2 and O3 should fire in this order for input patterns [−1,−1] and [1, 1], and in reverse order for input patterns [−1, 1] and [1,−1]. We train the neural network to learn the suitable timing tkp of firing in the subset Op for given input pattern k = [−1,−1], [−1, 1], [1,−1] and [1, 1], respectively, as described in Table 1. The right column of Table 1 shows the desirable order of group activity of subsets for each input pattern. The learning goal is the reduction of the RMS 5 Table 1: The order of collective firing as a learning goal. t1 = 2.0, t2 = 4.0 and t3 = 6.0, respectively. Input tkp Desirable pattern O1 O2 O3 order [−1,−1] t1 t2 t3 O1, O2, O3 [1,−1] t3 t2 t1 O3, O2, O1 [−1, 1] t3 t2 t1 O3, O2, O1 [1, 1] t1 t2 t3 O1, O2, O3 errors Ek for each input pattern k given by Ek = 1 NO 3 ∑ p=1 ∑ i∈Op ( t0i − t k p )2 , (13) where t0i is the time when the neuron i fires and NO the number of output neurons. We define an “episode” as the transient dynamics of the network which lasts from t = 0 to t = T accompanied with external inputs. We evaluate the reward R depending on the resulting error Ek through each episode for given input pattern as R = { 1 Ek < Ekth, 0 Ek ≥ Ekth, (14) where Ekth is a threshold of error. We change the threshold E k th gradually as the learning proceeds. In the following simulations, we calculate the aver- age error Ekave over 100 episodes for each input pattern, and we update the threshold for the next 100 episodes by Ekth = 0.99 × E k ave. E k th and E k ave are almost identical. It sometimes happens that Ekave increases through learning since the update of wij to decrease E k will affect the value of Ek ′ where k 6= k′. Thus, Ekth also sometimes increases, not decreases monotonically. During each episode, the input signals are fixed to the time-independent value, Isi = I0 or −I0, corresponding to the input patterns. (Here, I0 = 10 mA.) The learning coefficient, the variance of noise and the period of one episode are ǫ = 0.001, Q = 10000 and T = 10.0 ms, respectively. We assume that all the output and hidden neurons are excitatory, i.e., wij for j 6∈ I can take only positive value, where I is the set of input neurons, while wij for j ∈ I can take both positive and negative value. We first set the synaptic weights wij for j ∈ I using the uniformly distributed 6 random number in [−1.0, 1.0], while for j 6∈ I between [2.5 N , 5.0 N ], where N is the number of neurons. Due to this normalization factor 1 N , the magnitude of error Ek does not depend on N . In this section, the number of hidden neurons was 5. Fig. 2 shows the behavior of the output neurons at initial state (upper) and that after 5×104 episodes for each input pattern (that is, 2×105 episodes in total) elapsed (lower). We find that neurons in O1, O2 and O3 fire in this order for the input patterns [−1,−1] and [1, 1], while in reverse order for the patterns [1,−1] and [−1, 1] after learning. In fact, Fig. 3 shows that the average error Ekave decrease gradually through learning. These figures indicate that learning in terms of the order of firing by applying the present learning rule is successful. Fig. 4 shows wij in a matrix form representing the connections with color after learning. As can be seen, there is few connection between O1 and O3 as a result of learning. This can be interpreted as the consequence that there is no direct correlation between O1 and O3 in the both of the output time sequence. Few connections from I to O2 can be understood in the same way. 4 System size dependence of learning efficiency Since realistic biological systems consist of many neurons, it is interesting and important how efficient this learning rule is for larger system size. In this section, we discuss the system size dependence of the performance of learning At first, we train the network for various number of hidden neurons NH. In the following simulation, all parameters but NH are given as the same as previous section. The sum of average errors ∑ k E k ave are shown in Fig. 5(a). To investigate the property of learning, we assumed an exponential decay of the error ∼ exp(−λs) as the function of the number of episode s and showed λ in inset of Fig. 5(a). As shown in Fig. 5(a), the speed of learning becomes slower when extra hidden neurons are added, and, decay rate λ also has the same tendency. However, the error is significantly reduced as the episodes proceed. In this case, it turned out that the network with NH = 5 showed best result in this simulation so that those added neurons are redundant and do not contribute learnability. Next, we examine the case the learning speed for various number of output neurons NO, where each subsets Op consist ofNO/3 and the number of hidden neurons NH = 5. Fig. 5(b) shows the error ∑ k E k ave and the decay rate λ (inset). In this first stage of the learning process (s ≤ 104), decay rate is approximately given as λ ∼ N δO, where δ ≈ −2. However, if λ is evaluated 7 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 5 10 O 1 O 2 O 3 Time [-1,-1] 0 5 10 Time [-1,1] 0 5 10 Time [1,-1] 0 5 10 Time [1,1] 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 5 10 O 1 O 2 O 3 Time [-1,-1] 0 5 10 Time [-1,1] 0 5 10 Time [1,-1] 0 5 10 Time [1,1] Figure 2: The action potential of each output neuron at initial state (upper) and after 5 × 104 episodes for each input pattern (that is, 2 × 105 episodes in total) elapsed (lower). The index of each output neuron is shown on the vertical axis. The neurons with index ≤ 5 are in O1, those with index ≥ 11 are in O3, and the others are in O2. O1, O2 and O3 fire in this order for input patterns [-1,-1] and [1,1], while in reverse order for [1,-1] and [-1,1]. See also Table 1. 8 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 0 1 2 3 4 5 A ve ra g e o f E k A ve ra g e o f E k Episode(x104) Episode(x104) [-1,-1] [1,1] [-1,1] [1,-1] 0.1 1 10 0 1 2 3 4 5 Figure 3: Ekave for each input pattern as a function of episodes through learn- ing. Inset is the same data in semi-logarithmic plot. Typical value of Ek before learning is approximately 3. -1.5 -1 -0.5 0 0.5 1 1.5 i O1 O2 O3 Hidden j Input O1 O2 O3 Hidden Figure 4: wij in a matrix form representing the connections with color after learning. Neuron j is presynaptic and i is postsynaptic. 9 0.1 1 10 100 0 1 2 3 4 5 S u m o f E k Episode(x104) (a) 0 5 15 32 50 100 10-5 10-4 1 10 100 λ Number of hidden neurons 0.1 1 10 100 0 1 2 3 4 5 S u m o f E k Episode(x104) (b) 15 24 39 60 99 10-6 10-5 10-4 10 100 λ Number of output neurons Figure 5: ∑ k Ekave as a function of episodes through learning for each NH(a) and NO(b). Inset: The decay constant λ of ∑ k E k ave for 0 < s < 10 4 (filled circle) and 4 × 104 < s < 5 × 104 (open square) where s is the number of episode. The slope of dotted line in inset (b) is approximately −2. 10 0.1 1 10 100 0 1 2 3 4 5 S u m o f E k Episode(x104) 1250 2500 5000 10000 20000 40000 80000 10-6 10-5 10-4 103 104 105 λ Q Figure 6: ∑ k E k ave as a function of episodes through learning for each Q. Inset: λ of ∑ k E k ave for 0 < s < 10 4 (filled circle) and 4 × 104 < s < 5 × 104 (open square). in the interval 4 × 104 < s < 5 × 104, the NO dependence of λ seems to be more weaken, so that a long-term behavior of the learning process needs to be investigated to discuss the asymptotics. We would like to mention the effects of noise in the learning. The noise strength may affect the result or performance of learning because a random search process in the weight space is the essential part of this learning algo- rithm. We tested the dependence of the learning performance on the variance of noise Q in Eq. (6) , where NO = 15, NH = 5 and other parameters are given as previous section. Fig. 6 shows the learning error and its decay rate. Since the amount of update |δwij| is in the order of |ǫ/Q|, the magnitude of Q will directly affect the stability of learning. However, Fig. 6 indicates this learning rule is robust against the change of Q as long as the gradient ascending process assumed in Eq. (11) holds. 5 Conclusions We have proposed a concrete method to encode temporal information for a network of stochastic spiking neurons utilizing a reinforcement learning 11 method, and we show that this learning rule is effective for order coding. Since the derivation of Eq. (11) does not depend on the form of the differential equation for the action potential like Eq. (1), the learning rule Eq. (11) is generally applicable to networks of other types of model neurons, for example neurons following the IF or FitzHugh-Nagumo (FHN) model with random fluctuation. In fact, we have checked the network consisting of IF or FHN neurons can also learn the same order coding task with the learning rule Eq. (11). (We omit these details in this paper.) The present learning rule can be applied not only to the order coding, but also to any information coding. In general, if one can design an appropriate reward R by defining the error of group activity from the reference signals, the learning process is given in a straightforward manner as described in Sec. III. For example, we confirmed that the present method also worked for the XOR task in terms of phase coding, where the relative phase difference codes information in the same way as oscillator neurons (Aoyagi, 1995). In the simulation, neural network consisted of 2 input neurons, a few hidden neurons and 10 output neurons which were divided into two disjoint subsets, O1 and O2, each containing 5 output elements. Learning goal was for group activity in O1 and O2 to become in phase for input patterns [−1,−1] and [1, 1], and to be out of phase for [1,−1] and [−1, 1]. In general, convergence of the reinforcement learning is slow and the present model is not the exception. Several factors need to be investigated to improve the speed of convergence. Although we have assumed Gaussian white noise in this study, in real neuronal systems it is likely that noise may obey other statistical properties. For example, Fiete et al. (2006) discusses a learning rule using the arbitrary noise. Furthermore, learning speed depends to a great extent on the design of the cost function, i.e., the reward. If the design of the reward is not suitable, the learning process drops into local minima easily. In the present study, we empirically employed a sliding threshold method by changing the learning goal Ekth in Eq. (14) started from easier one. Although this strategy can be applied to any learning tasks, the performance or result of learning is sensitive to define Ekth. In this paper, we have defined Ekth as A× E k ave where A = 0.99, because A = 0.9 is too severe to learn so that the speed of learning becomes slower and A = 1.0 causes overestimated reward so that the learning process drops into local minima. The point that Ekth does not monotonically decrease is also important since the update of wij to decrease E k will affect the value of Ek ′ where k 6= k′. Therefore, if we decrease Ekth monotonically while E k ave increases because of this influence with update of wij, the task becomes harder to learn. As well as the conventional back propagation learning, how to decide the number of hidden neurons and assign the initial value of wij are also important problem. 12 In the XOR task with the order coding, convergence speed in learning process significantly affected by both the number of hidden and output neurons, larger size system seems to require more learning steps. We intend to examine this relationship in future research. We have assumed a fully connected network and assigned the random value to the initial state of wij , which may not be appropriate for learning. Watts and Strogatz have proposed a “small-world” network structure (Watts & Strogatz, 1998). This network has been investigated in the context of a multi-layered feed-forward network, and some improvements in performance have been made (Simard, Nadeau, & Kröger, 2005). Also, the propagation velocity and coherent oscillation of IF or Hodgkin-Huxley neurons depend on the topology of network (which includes small-world network) (Fernández et al., 2000; Roxin, Riecke, & Solla, 2004). These results may indicate that there are some suitable topologies of network for temporal coding as well. Since the present learning rule Eq. (12) includes only the local relation between neuron i and j, this learning rule may be applied to a network with an arbitrary topology. Finding a suitable network topology to facilitate learning is also a problem for future investigation. Acknowledgments We would like to thank Dr. Toshihiro Kawakatsu and Dr. Tsuyoshi Hondou for helpful comments. Appendix : Estimation of gradient of 〈R〉 Let us introduce a stochastic processing element as a model neuron. The value of action potential of i-th neuron at discrete time t(= 0, 1, 2, · · · ) is represented by Vi(t). Vi(t) and other internal state mi(t) at successive time step t+ 1 are then determined as Vi(t + 1) = g(Vi(t), mi(t)) + N ∑ j wijf(Vj(t)) + ξi(t), (15) mi(t+ 1) = h(Vi(t), mi(t)), (16) where wij is the synaptic weight from neuron j to i, f(Vi(t)) the signal which i-th neuron emits according to Vi(t), N the total number of neurons, g(Vi(t), mi(t)) and h(Vi(t), mi(t)) are functions of the neuronal states, and ξi(t) is the Gaussian white noise which obeys Eq. (5) and Eq. (6). We consider that f(Vi(t)), g(Vi(t), mi(t)) and h(Vi(t), mi(t)) are arbitrary functions. 13 As a continuous time representation, we employ a Langevin equation for neuronal updates; dVi dt = g(Vi(t), mi(t)) + N ∑ j wijf(Vj(t)) + ξi(t), (17) dmi dt = h(Vi(t), mi(t)). (18) Although we treat mi(t) as a scalar variable in the following discussion, the same method can also be applied if mi(t) is multivariate. We consider time sequences of states of neurons for t = 0, · · · , T ; σ ≡ (V (0),V ((1),V (2), · · · ,V (T )), where V (t) denotes the vector (V1(t), · · · , VN(t), m1(t), · · · , mN (t)). We assign a reward R to each time sequence σ and calculate the gradient of 〈R〉 with respect to wij (Hayakawa, 2001; Fiete & Seung, 2006). The probability density Tσ for each time sequence is defined as Tσ = P (V (T )|V (T − 1)) · · ·P (V (1)|V (0)), (19) where P (A|B) is the transition probability from state B to A. Since mi(t) is deterministic and only Vi(t) includes the Gaussian noise described by Eqs. (5) and (6), the transition probability in Eq. (19) may be expressed as P (V (t+ 1)|V (t)) = ∏ i 1 (2πQ)1/2 exp [ − 1 2Q ξ2i (t) ] ×δmi(t+1),h(Vi(t),mi(t)) = 1 (2πQ)N/2 exp [ − 1 2Q ∑ i ηi(t) ] ∏ i δmi(t+1),h(Vi(t),mi(t)), (20) where ηi(t) ≡ [ Vi(t+ 1)− g(Vi(t), mi(t))− N ∑ j wijf(mj(t)) ]2 . (21) and δm,n is the Kronecker delta. The average of a quantity Y (σ) over all possible time sequences can be described by 〈Y 〉 = 1 Z ∑ σ Y (σ)Tσ = 1 Z ∑ σ Y (σ) exp [ − 1 2Q ∑ t ∑ i ηi(t) ] , (22) 14 where Z is a normalization factor. Therefore, the gradient of Y (σ) may be obtained as ∂〈Y 〉 ∂wij = 1 Z ∑ σ TσY (σ) 1 Q T ∑ t=0 ξi(t)f(Vj(t)) = 1 Q 〈 Y (σ) T ∑ t=0 ξi(t)f(Vj(t)) 〉 . (23) In the continuous case (17), the sum over σ in Eq. (22) becomes the path integral 〈Y 〉 = 1 Z ∫ σ Y (σ) exp [ − 1 2Q ∫ T 0 dt ∑ i η̃i(t) ] d(path), (24) where η̃i(t) ≡ [ dVi dt − g(Vi(t), mi(t))− N ∑ j wijf(Vj(t)) ]2 . (25) Using R(σ) as Y (σ), we obtain the derivative in Eq. (11) as ∂〈R〉 ∂wij = 1 Q 〈 R(σ) ∫ T 0 dtξi(t)f(Vj(t)) 〉 . (26) For the network consisting of HH neurons (1)∼(4), we can derive Eq. (12) by instituting Eq. (7) to Eq. (26). Thus, this result indicates that the calculation of the gradient of 〈R〉 depends only on ξi(t), f(Vj(t)) and R(σ). The linear summation of the pre- synaptic neuronal activity and an additive independent noise as in Eq. (15) and Eq. (17) is essential for the present learning algorithm. This learning rule includes only the local relation between neurons i and j, while back- propagation (Rumelhart, Hinton, & Williams, 1986) or RTRL (Williams & Zipser, 1989) requires the information of other neurons in addition to i, j in order to calculate δwij. References Aoyagi, T. (1995). Network of neural oscillators for retrieving phase infor- mation. Phys. Rev. Lett., 74, 4075. Bi, G.-q., & Poo, M.-m. (1999). Distributed synaptic modification in neural networks induced by patterned stimulation. Nature, 401, 792. 15 Cios, K., Swiercz, W., & Jackson, W. (2004). Networks of spiking neurons in modeling and problem solving. Neurocomputing, 61, 99. Delorme, A., & Thorpe, S. (2001). Face identification using one spike per neuron: resistance to image degradations. Neural Networks, 14, 795. Destexhe, A., Mainen, Z., & Seijnowski, T. (1994). An efficient method for computing synaptic conductances based on a kinetic model of receptor binding. Neural Computation, 6, 14. Fernández, L., Huerta, R., Corbacho, F., & Sigüenza, A. (2000). Fast response and temporal coherent oscillations in small-world networks. Phys. Rev. Lett., 84, 2758. Fiete, I., & Seung, H. (2006). Gradient learning in spiking neural networks by dynamic perturbation of conductances. Phys. Rev. Lett., 97, 048104. Gray, C., König, P., Engel, A., & Singer, W. (1989). Oscillatory responses in cat visual-cortex exhibit inter-columnar synchronization which reflects global stimulus properties. Nature, 338, 334. Hasegawa, H. (2001). An associative memory of hodgkin huxley neuron networks with willshaw-type synaptic couplings. J. Phys. Soc. Jpn., 70, 2210. Hayakawa, Y. (2001). Reinforcement learning for stochastic neural networks. Proceedings of 2001 International Symposium on Nonlinear Theory and its Applications, 2, 493. Hodgkin, A., & Huxley, A. (1952). A quantitative description of membrane current and its application to conduction and excitation in nerve. J Physiol.(London), 117, 500. Hoppensteadt, F., & Izhikevich, E. (1999). Oscillatory neurocomputers with dynamic connectivity. Phys. Rev. Lett., 82, 2983. Johansson, R., & Birznieks, I. (2004). First spikes in ensembles of human tactile afferents code complex spatial fingertip events. Nat.Neurosci., 7, 179. Kanamaru, T., & Okabe, Y. (2000). Associative memory retrieval induced by fluctuations in a pulsed neural network. Phys. Rev. E, 62, 2629. Lee, G., & Farhat, N. (2001). The bifurcating neuron network i. Neural Networks, 14, 115. Lee, G., & Farhat, N. (2002). The bifurcating neuron network 2: an analog associative memory. Neural Networks, 15, 69. Reyes, A. (2003). Synchrony-dependent propagation of firing rate in itera- tively constructed networks in vitro. Nat.Neurosci., 6, 593. Roxin, A., Riecke, H., & Solla, S. (2004). Self-sustained activity in a small- world network of excitable neurons. Phys. Rev. Lett., 92, 198101. Rumelhart, D., Hinton, G., & Williams, R. (1986). Learning representations by back-propagating errors. Nature, 323, 533. 16 Seung, H. (2003). Learning in spiking neural networks by reinforcement of stochastic synaptic transmission. Neuron, 40, 1063. Simard, D., Nadeau, L., & Kröger, H. (2005). Fastest learning in small-world neural networks. Physics Letters A, 336, 8. Sutton, R., & Barto, A. (1998). Reinforcement learning : An introduction. Cambridge, MA: MIT Press. Thorpe, S., Delorme, A., & Rullen, R. (2001). Spike-based strategies for rapid processing. Neural Networks, 14, 715. Varela, F., Lachaux, J., Rodriguez, E., & Martinerie, J. (2001). The brainweb: Phase synchronization and large-scale integration. Nat.Rev.Neurosci., 2, 229. Watts, D., & Strogatz, S. (1998). Collective dynamics of ’small-world’ net- works. Nature, 393, 440. Williams, R., & Zipser, D. (1989). A learning algorithm for continually running fully recurrent neural networks. Neural Computation, 1, 270. Xie, X., & Seung, H. (2004). Learning in neural networks by reinforcement of irregular spiking. Phys. Rev. E, 69, 041909. Yoshioka, M., & Shiino, M. (1998). Associative memory based on synchro- nized firing of spiking neurons with time-delayed interactions. Phys. Rev. E, 58, 3628. 17
0non-cybersec
arXiv
The $50,000 Subaru WRX STI Type RA Is the Most Expensive Subaru Ever- Doug DeMuro.
0non-cybersec
Reddit
SAP is a gamer..
0non-cybersec
Reddit
If terminating a hung thread is a good idea, how do I do it safely?. <p>My Delphi program relies heavily on Outlook automation. Outlook versions prior to 2007-SP2 tend to get stuck in memory due to badly written addins and badly written Outlook code.</p> <p>If Outlook is stuck, calling CreateOleObject('Outlook.Application') or GetActiveObject ... doesn't return and keeps my application hanging till Outlook.exe is closed in the task manager.</p> <p>I've thought of a solution, but I'm unsure whether it's good practice or not.</p> <p>I'd start Outlook with CreateOleObject in a separate thread, wait 10 seconds in my main thread and if Outlook hangs (CreateOleObject doesn't return), offer the user to kill the Outlook.exe process from my program.</p> <p>But since I don't want to <strong>force</strong> the user to kill the Outlook.exe process, as an alternative I also need a way to kill the new thread in my program which keeps hanging now.</p> <ol> <li>Is this good practice?</li> <li>How can I terminate a hanging thread in Delphi without leaking memory?</li> </ol>
0non-cybersec
Stackexchange
Skipping a Pound of Sodium Across a Lake.
0non-cybersec
Reddit
Lenovo T540p, Nvidia GeForce GT 730M, 19.10 Eoan, 4K second monitor problem, 3840x2160 mode not autodetected. <p>I just want my 4K monitor to work as a 4K monitor when it is plugged in. Pixels help, FPS not so much.</p> <p>Basically what the title says, the screen in my office gets plugged in with an HDMI to Mini Display Port cable. The monitor does show up in the video settings for position and resolution and the other settings. But, 3840x2160 is not an option for the resolution without sending an xrandr command or fiddling with a /etc/X11/xorg.conf file.</p> <p>The monitor edid information does have a mode I find acceptable in the factory embedded list of modes. It is using HDMI 1.4 (and not 2.0).</p> <p>Anyhoo, here is my workaround-- can you see a better way to handle it?</p> <p>That is my question, is there a better built-in way to do this if the hardware isn't going to automatically configure all the things?</p> <pre><code>#!/usr/bin/env bash apt update apt -y upgrade apt -y autoremove #ubuntu-drivers devices ## Output: ## == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == ## modalias : pci:v000010DEd00001290sv000017AAsd0000221Ebc03sc00i00 ## vendor : NVIDIA Corporation ## model : GK208M [GeForce GT 730M] ## driver : nvidia-340 - distro non-free ## driver : nvidia-driver-390 - distro non-free recommended ## driver : xserver-xorg-video-nouveau - distro free builtin ## ## == /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0 == ## modalias : pci:v00008086d000008B2sv00008086sd0000C270bc02sc80i00 ## vendor : Intel Corporation ## model : Wireless 7260 (Dual Band Wireless-AC 7260) ## manual_install: True ## driver : backport-iwlwifi-dkms - distro free ubuntu-drivers autoinstall apt install -y get-edid get-edid ## Output: ## This is read-edid version 3.0.2. Prepare for some fun. ## Attempting to use i2c interface ## No EDID on bus 1 ## No EDID on bus 2 ## No EDID on bus 3 ## No EDID on bus 4 ## No EDID on bus 6 ## No EDID on bus 8 ## No EDID on bus 9 ## 3 potential busses found: 0 5 7 ## Will scan through until the first EDID is found. ## Pass a bus number as an option to this program to go only for that one. ## Bus 0 doesn't really have an EDID... ## 256-byte EDID successfully retrieved from i2c bus 5 ## ������N�▒� ##ץ�YJ�$PT�������@��t0�pZ��X�Ď!f!P�Q@p6?C!�LP ## �W55 ## �5tS�_^] &amp; Pm ## &lt; `�`a�rQ� n(UĎ!�▒q X,%Ď!�� ## Њ �-&gt;��!▒� ## Looks like i2c was successful. Have a good day. ## А @1 ## @U�!▒5 ### &lt;!&gt; As it turns out, I wanted the info on bus 5. ### &lt;!&gt; Let's get the Modelines get-edid -b5 | parse-edid ## Output: ## 5 ## This is read-edid version 3.0.2. Prepare for some fun. ## Attempting to use i2c interface ## Only trying 5 as per your request. ## 256-byte EDID successfully retrieved from i2c bus 5 ## Looks like i2c was successful. Have a good day. ## Checksum Correct ## ## Section "Monitor" ## Identifier "W55" ## ModelName "W55" ## VendorName "SPT" ## # Monitor Manufactured week 24 of 2018 ## # EDID version 1.3 ## # Digital Display ## # Display Physical Size not given. Normal for projectors. ## Gamma 1.00 ## Option "DPMS" "false" ## Horizsync 30-80 ## VertRefresh 30-76 ## # Maximum pixel clock is 300MHz ## #Not giving standard mode: 1920x1080, 60Hz ## #Not giving standard mode: 1680x1050, 60Hz ## #Not giving standard mode: 1280x800, 60Hz ## #Not giving standard mode: 1280x1024, 60Hz ## #Not giving standard mode: 1280x960, 60Hz ## #Not giving standard mode: 1280x720, 60Hz ## ## #Extension block found. Parsing... ## #WARNING: I may have missed a mode (CEA mode 95) ## #WARNING: I may have missed a mode (CEA mode 94) ## #WARNING: I may have missed a mode (CEA mode 93) ## Modeline "Mode 18" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync ## Modeline "Mode 0" 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync ## Modeline "Mode 1" 85.50 1360 1424 1536 1792 768 771 777 795 +hsync +vsync ## Modeline "Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync ## Modeline "Mode 3" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace ## Modeline "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync ## Modeline "Mode 5" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync ## Modeline "Mode 6" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace ## Modeline "Mode 7" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync ## Modeline "Mode 8" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace ## Modeline "Mode 9" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync ## Modeline "Mode 10" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync ## Modeline "Mode 11" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace ## Modeline "Mode 12" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync ## Modeline "Mode 13" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync ## Modeline "Mode 14" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace ## Modeline "Mode 15" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync ## Modeline "Mode 16" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace ## Modeline "Mode 17" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync ## Modeline "Mode 19" 74.25 1920 2008 2052 2200 540 542 547 562 +hsync +vsync interlace ## Modeline "Mode 20" 27.00 720 736 798 858 480 489 495 525 -hsync -vsync ## Modeline "Mode 21" 27.00 720 732 796 864 576 581 586 625 -hsync -vsync ## Option "PreferredMode" "Mode 18" ## EndSection ### &lt;!&gt; It did not work for me, but you can try generating Modelines with cvt #cvt 3840 2160 ## Output: ## # 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHz ## Modeline "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync ### &lt;!&gt; 60Hz is the default for cvt refresh rate parameter-- my screen is 60Hz... ### &lt;!&gt; A more specifica cvt refresh rate is the optional third parameter ### &lt;!&gt; The only line I see that is 4K is "Mode 0" ### &lt;!&gt; Modeline "Mode 0" 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync ### &lt;!&gt; The quoted part of the Modeline is just a label ### &lt;!&gt; Changing "Mode 0" to "3480x2160" for my own nitpicky self xrandr --newmode "3840x2160" 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync ### &lt;!&gt; cvt generated mode #xrandr --newmode "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync xrandr --addmode HDMI-1-1 "3840x2160" ### &lt;!&gt; cvt generated mode #xrandr --addmode HDMI-1-1 "3840x2160_60.00" ### &lt;!&gt; To see what's what and the available modes for each #xrandr -q ### &lt;!&gt; Used arandr for help with xrandr bash command that follows #apt install arandr &amp;&amp; arandr # ...save output file as xrandr-example.sh from GUI application #tail xrandr-example.sh ## Output: ## #!/bin/sh ## xrandr --output HDMI-1-2 --off --output HDMI-1-1 --mode 1920x1080 --pos 1920x0 --rotate normal --output eDP-1-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA-1-1 --off --output DP-1-2 --off --output DP-1-1 --off ### &lt;!&gt; I took that "template" and substituted my own mode and positions xrandr --output HDMI-1-1 --mode 3840x2160 --pos 0x0 --rotate normal --output HDMI-1-2 --off --output eDP-1-1 --primary --mode 1920x1080 pos 960x2160 --rotate normal --output VGA-1-1 --off --output DP-1-2 --off --output DP-1-1 --off ### &lt;!&gt; Now I want it to happen when I plug in my monitor ### &lt;!&gt; If W55 is seen, then run my xrandr command #udevadm monitor ## Output: ## monitor will print the received events for: ## UDEV - the event which udev sends out after rule processing ## KERNEL - the kernel uevent ## ## KERNEL[10928.549817] change /devices/pci0000:00/0000:00:02.0/drm/card1 (drm) ## UDEV [10928.551102] change /devices/pci0000:00/0000:00:02.0/drm/card1 (drm) ## KERNEL[10939.083981] change /devices/pci0000:00/0000:00:02.0/drm/card1 (drm) ## UDEV [10939.085367] change /devices/pci0000:00/0000:00:02.0/drm/card1 (drm) ### &lt;!&gt; So, it is a drm UDEV change ### &lt;!&gt; We can use the change to trigger a script echo "SUBSYSTEM==\"drm\", ACTION==\"change\", RUN+=\"/usr/local/bin/xrandr-for-W55-monitor.sh\"" &gt; /etc/udev/rules.d/xrandr-for-W55-monitor.rules ### &lt;!&gt; Create the script and make it executable ### &lt;!&gt; There's a second way to get edid info ls -1 /sys/class/drm/*/edid ## Output: ## /sys/class/drm/card1-DP-1/edid ## /sys/class/drm/card1-DP-2/edid ## /sys/class/drm/card1-eDP-1/edid ## /sys/class/drm/card1-HDMI-A-1/edid ## /sys/class/drm/card1-HDMI-A-2/edid ## /sys/class/drm/card1-VGA-1/edid ### &lt;!&gt; To get the bash script "heredoc" to respect indent spacing below, the indents must be tabs... cat &lt;&lt;-EOF &gt; /usr/local/bin/xrandr-for-W55-monitor.sh #!/usr/bin/env bash if [[ $(xrandr | grep "HDMI-1-1 connected" | wc -l) -gt 0 ]] then #echo $(date) "drm event HDMI-1-1 changed" &gt;&gt; /tmp/checkin.txt if [[ $(parse-edid &lt; /sys/class/drm/card1-HDMI-A-1/edid | grep "Identifier \"W55\"" | wc -l) -gt 0 ]] then #echo "IT'S W55!!!" &gt;&gt; /tmp/checkin.txt xrandr --newmode "3840x2160" 297.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync xrandr --addmode HDMI-1-1 "3840x2160" xrandr --output HDMI-1-1 --mode 3840x2160 --pos 0x0 --rotate normal --output HDMI-1-2 --off --output eDP-1-1 --primary --mode 1920x1080 --pos 960x2160 --rotate normal --output VGA-1-1 --off --output DP-1-2 --off --output DP-1-1 --off else xrandr --output HDMI-1-1 --mode 1920x1080 --above eDP-1-1 fi else xrandr --output HDMI-1-1 --off fi EOF chmod 550 /usr/local/bin/xrandr-for-W55-monitor.sh ### &lt;!&gt; That ought to do it... </code></pre>
0non-cybersec
Stackexchange
The topological boundary of the closure of a subset is contained in the boundary of the set. <p>Let $X$ be a topological space and $N$ a subset of $X$. I want to show that $\partial \bar N\subset \partial N$.</p> <p>I know that since $\bar N$ is closed then $\partial \bar N\subset \bar N$. By definition $\bar N=N \cup \partial N$, now if $x\in \partial\bar N$ then $x\in \bar N$ but why $x$ must lie precisely in $\partial N\subset \bar N$?</p>
0non-cybersec
Stackexchange
Japan's population falls 'by record 244,000' in 2013.
0non-cybersec
Reddit
(Riddle) Captain Kirk versus the Monster. <p>So there is a question which was aked to me a long while ago (and I don't remember what was the answer) so here goes:</p> <p>Captain Kirk is on a remote planet again and there is a monster trying to eat him. Fortunately, captain Kirk has a super-shielding device with him. The device casts a perfectly circular 10 meter around it. Captain Kirk uses it to protect himself from the monster. The problem is that while he is inside the protective range of the device, captain Kirk cannot be beamed away. As soon as he leaves the shield, he can (instantly) be beamed away.</p> <p>What is the highest ratio $\dfrac{\text{speed of the monster}}{\text{speed of Kirk}}$ so that Kirk still has a chance to escape?</p> <p><strong>So in math terms:</strong></p> <ul> <li><p>the prey is inside a circle of radius $r$ (the actual value does not matter, so say it's 1).</p></li> <li><p>the predator is outside the circle and cannot enter.</p></li> <li><p>if the predator is at the point of exit of the prey, then the predator wins.</p></li> <li><p>otherwise, the prey wins.</p></li> <li><p>The answer should hold independently of the starting positions. (In other words, assume a worst-case scenario for the prey).</p></li> </ul> <p><strong>The answer is not $\pi$!</strong></p> <p>A first thought of many (including me) is to say the answer is $\pi$. This turns out to be wrong.</p> <p>First, one can assume that the prey begins at the center of the circle and the monster on the boundary. This case encompasses the worst-case scenario: if the prey is not in the center, then it can go to the center; if the predator is not on the boundary of the circle, then it's only better for it to be on the boundary.</p> <p>Next, consider the following strategy. The prey start to run for the point on the boundary opposite to the predator. The predator will then start to run along the circle either in clockwise or counterclockwise manner. Once the prey is at the middle of this radius, it makes an angle (about 37°) to go a point which is further away form the predator. Note that the angle is too small (so it's not worth for the predator to start to run in the opposite direction). Both the predator and the prey have now a longer way to go, but the predator more so. With the given data, the predator would need a speed of at least 3.3.</p> <p><strong>Even better</strong></p> <p>Here is a better strategy. Decompose the motion of the prey as radial and angular. Note that when the prey is closer to the center a small speed is sufficient to get a large angular speed. </p> <p>Assume for simplicity that the speed of the prey is $1$ and that of the predator $v$. Then the prey can run to some point on the border (and the predator will start to run around the circle). As long as the prey is inside a smaller circle of $\tfrac{1}{v}$ the radius, it may have a higher angular speed than the predator. This means it can use parts of its speed to move radially until it gets as close as possible to this radius all the while haveing the predator on the opposite side of the circle. </p> <p>After a very long time, being as close as desired to the circle of radius $\tfrac{1}{v}$ the prey can try to dash for the point opposite the predator.</p> <p>This means that the prey has $1-\tfrac{1}{v}$ time units to the boundary while the predator would need $\tfrac{\pi}{v}$. This shows that as long as $v &lt; \pi +1$ the prey can win.</p> <p>Now obviously, you can still improve upon that later strategy (for example, by using the former strategy at some point). But in the end, I still don't know what is the actual supremum of the speed ratios.</p>
0non-cybersec
Stackexchange
FosElasticaBundle Dynamic Index?. <p>I'm building a multi-tenant application with multiple indexes, one index per tenant.</p> <p>Just wondering if there has been any work on allowing the index names to be changed <strong>dynamically</strong>? </p>
0non-cybersec
Stackexchange
Use different desktop theme for Ubuntu Software Center. <p>I'm using the Evolve theme for Ubuntu and I'm happy with it.</p> <p>All applications work well with this theme except one, Ubuntu Software Center. The text is not readable with this theme (white text on light grey background).</p> <p>Every time I need to use USC I have to change the theme and then change it back.</p> <p>Is it possible to tell Ubuntu to use the Ambiance theme for USC only?</p> <p>I tried adding <code>env GTK_THEME="Ambiance"</code> to the exec line in the .desktop file but it didn't have any effect whatsoever.</p>
0non-cybersec
Stackexchange
Sublime 3 with Arara. <p>I would like to use Sublime 3 for my LaTeX work, however I'm having some difficulty getting arara working as part of the build. I have TexLive installed so I have the arara binaries available (used them with TexStudio), and I don't mind about which LaTeX plugin I use (LaTeXing, LaTeXTools, LaTeXSQ), I'd just like arara working for glossaries.</p> <p>Here is the snippet I'd like to compile as a test</p> <pre><code>% arara: pdflatex: { draft: true } % arara: makeglossaries % arara: pdflatex: { synctex: true } % arara: pdflatex: { synctex: true } \documentclass{article} \usepackage{longtable} \usepackage[acronym,nonumberlist]{glossaries} % abbreviations: \newacronym{ny}{NY}{New York} \newacronym{la}{LA}{Los Angeles} \newacronym{un}{UN}{United Nations} % nomenclature: \newglossaryentry{angelsperarea}{ name = $a$ , description = The number of angels per unit area, } \newglossaryentry{numofangels}{ name = $N$ , description = The number of angels per needle point } \newglossaryentry{areaofneedle}{ name = $A$ , description = The area of the needle point } \makeglossaries \begin{document} \printglossary[title=Nomenclature] \printglossary[type=\acronymtype,title=Abbreviations] \gls{ny}, \gls{la} and \gls{un} are abbreviations whereas \gls{angelsperarea}, \gls{numofangels} and \gls{areaofneedle} kare part of the nomenclature \gls{ny} \gls{ny} ;l d \end{document} </code></pre>
0non-cybersec
Stackexchange
partial fractions decomposition issue. <p>How do you decompose the following fraction?</p> <p>$$\frac{2}{2x^2 (x+1)} = \frac{a}{2x^2} + \frac{b}{x+1}$$</p> <p>i just want to know if I am on the right track or I am missing something(based on the above beginning).</p>
0non-cybersec
Stackexchange
Specify &#39;PATH&#39; environment does not work when running Gradle &#39;exec&#39;. <p>I tried to call <code>npm</code> in my <strong>Gradle</strong> build. The <code>npm</code> is installed via <code>homebrew</code> into <code>/usr/local/bin</code>. The gradle will fail to find <code>npm</code> when executing it. </p> <p>However it always failed after I added <strong>PATH</strong> environment variable when executing <code>npm</code> command.</p> <p>The only workaround for me is using absolute path for <code>npm</code>, it does not make sense to use same gradle script in Linux.</p> <p>Did anyone meet the similar issue? Should I open ticket for gradle?</p> <p>Below is my <strong>build.gradle</strong>,</p> <pre><code>import org.gradle.api.tasks.Exec import org.apache.tools.ant.taskdefs.condition.Os ext { npmCommand = Os.isFamily(Os.FAMILY_WINDOWS) ? 'npm.cmd' : 'npm' npmPath = Os.isFamily(Os.FAMILY_WINDOWS) ? '' : '/bin/:/usr/bin/:/usr/local/bin/' } task wrapper(type: Wrapper) { gradleVersion = '2.4' } // Install packages from package.json task npm(type: Exec) { description = "Grab NodeJS dependencies (from package.json)" environment PATH: npmPath workingDir = 'src/webapp' commandLine = [npmCommand, "install"] inputs.file "src/webapp/package.json" } </code></pre> <p>Below is complete output of gradle,</p> <pre><code>./gradlew npm -S :npm FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':npm'. &gt; A problem occurred starting process 'command 'npm'' * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':npm'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:49) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:71) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'npm'' at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:196) at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:325) at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:83) ... 5 more Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'npm' at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27) at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36) at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:65) ... 5 more Caused by: java.io.IOException: Cannot run program "npm" (in directory "/Users/kane/git/videome/wechat/src/webapp"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25) ... 7 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 8 more BUILD FAILED Total time: 1.139 secs </code></pre> <p>The task will run fine if changing to the absolute path of npm,</p> <p><code>npmCommand = Os.isFamily(Os.FAMILY_WINDOWS) ? 'npm.cmd' : '/usr/local/bin/npm'</code></p>
0non-cybersec
Stackexchange
Lucius -- Turn It Around [Indie Pop].
0non-cybersec
Reddit
Got a new buddy yesterday. Its a bit of a long story, so hear me out. :) The girlfriend and I recently decided to have her move into my house with me. She already has a dog, and that dog has grown up around other dogs. I've wanted to get a puppy anyways, so we decided to get a 'joint puppy'. I really wanted a Border Collie, and as long as it was a puppy (in her words "I love all the puppies") we were cool. I looked around online to see if I could find any in the area, and I happen to work for a company that lets people list puppies for sale. I found one I adored: http://i.imgur.com/KEjLF.jpg I do all the background checks I can on the breeder, they've been doing it for a long time, listed multiple puppies and not a single bad review. There aren't any good ones either, but lets face it, people are only really vocal when they're angry about something. So I called them up. First red flag was when they said they didn't have him anymore and that they gave him to someone else and I should call them (the assumption was it was a family member or someone watching the puppy). Not really a big deal, but its a bit of a run around. So I call and left a voicemail with that person to call me back. They seemed nice enough on the phone, but they lived quite a ways away (the other people did too, but this was further). They agree'd to meet me an hour away from their place turning a 4 hour drive into only a 3 hour one. They tell me to call when they get close, and they'll give me directions on where to meet them. Drive up, get the directions.. its the parking lot of a effing McDonalds... Ohhkay.. We wait for the guy to show up with a few puppies (just incase we wanted a different one). He gets there in his bigass truck, and rolls down the window "Ya'll the ones looking for a puppeh?" Never even gets out of the truck. Shows us one of them, it looks healthy and happy and waaaay older. Then the second one, its healthy-ish and clean (only looked at it for a second). Now its the one I originally wanted.. covered in mud, drooling, completely out of it, and really skinny. At this point my heart breaks. He looks soooo sad, and I just can't let this poor guy go back with them. So we take him and the guy roughly hands him over to us. We've got a 3 hour drive back home to do, so we brought a small bag of food, a bowel for water, and some snacks for him. They apparently didn't feed him much of anything. Everything we brought with us was gone in just a few minutes. He was STARVING. We had to stop and get him a full bag of food before we could even start driving home. After eating he slept in my girlfriends lap for 90% of the way home. Here he is at a stop to let him get out and go to the bathroom, and so we could stretch our legs: http://i.imgur.com/Ctknw.jpg The second we got home and he went to the bathroom again he fell asleep: http://i.imgur.com/eNBS1.jpg and more sleeping: http://i.imgur.com/6jJ9s.jpg He pretty much slept the entire day away. This morning, he's a happy puppy, with energy and playing ball. First vet appointment, says he's either malnourished or has a parasite, we'll know in a couple of days. Vet says he should be fine however. He's a complete sweetheart, and I have no idea how anyone could treat him rough. He has a good home now, but we can really see the signs of abuse in how he acts. We're working with him tho, and he's already starting to come around. :)
0non-cybersec
Reddit
QuickBooks Desktop Enterprise® | Get Support @+1-844-551-9757.
0non-cybersec
Reddit
Uber driver tried to draw me into his body, I jerked away, but was it real? Could use female solidarity. Hi all - I guess I could just really use some female solidarity right now? Please? I had a bad Uber trip tonight. I use Uber all the time; most things that happen during my grocery runs or whatnot have become commonplace, and I even know a lot of the drivers in the area. But tonight was different. A new guy, older, picked me up from the little Indian place where I'd had my dinner (decided to treat myself). I put in the grocery store as a 'stop' and then my house as the final destination. I got a bad vibe from this guy from minute 1. It was just...just a bad vibe, really, I guess. This is part of why I'm posting and why I'm doubting myself over and over and over again, because how can you prove a bad vibe? A bad feeling? There's nothing concrete there, no *proof*, so how can it be real? How can I know for sure? But something was wrong, I know i was wrong. He kept making disparaging comments towards me. He drove veeeeeeeeery slowly - below the speed limit - and kept talking about how he had to "behave" because we passed a police car. Like he wouldn't shut up about it for ten minutes. He seemed...out of it. I don't know. I don't know this guy. I don't know if 'out of it' is his general personality type or if he was slightly drunk, which was honestly my guess. I just, I don't know??? The shopping took longer than I expected (nothing ridiculous, maybe 15 minutes, which is longer than I like to take on an Uber stop, but the lines were unexpectedly very long for the time of night) and he took my shopping bags from me (without asking, kind of grabbed them?) and was like "this is all you got for all that time?!" he made a noise of disgust, tied the shopping bag handles into tiny knots (making it impossible for me to freaking carry them) and put them into the trunk. I grabbed my purse before he could grab that too, instinctively. He drove reeeeaaaaaally slowly the whole ride home and kept asking me to direct him, which I couldn't do for the first part of the trip (didn't know the roads well enough), not until we got closer to home. When we got close he asked me to direct him again and like sure, fine, but he slowed down o like 2 fucking miles an hour, no joke, while trying to find my driveway. All of that I could've just let go, you know? Other drivers have made rude or disparaging comments before, I'm certainly not going to report them all, that would be utterly ridiculous. I mean of course it shouldn't happen, I guess, but I'm not going to take away people's livelihood for a bad joke or something. So whatever. But we're getting out of the car and I explain my driveway to him, how to turn around, since it's dark...Actually as I'm writing this it's occurring to me that the way he was acting and driving was like he couldn't see the whole time. Like he was having trouble seeing the app for directions, hence wanting me to direct him, and he didn't want to go into my driveway because he didn't know how to turn around, even though you can see it even in the dark, many other drivers have figured it out. ...Although in that case maybe he should not be driving?? Anyway. He gets out of the car and opens the trunk and my door for me - he was sort of vaguely chauvinistic the whole time, but lots of drivers open the doors, it's not a big deal by itself - and hands me my bags. And then he reaches out and puts his hand on my shoulder and starts to draw me into his body!! trying to hug me??? I got so fucking freaked out by this guy who had been rude and unpleasant towards me and my reflexes were/are good, so I jerked away and backwards from him VERY fast and said 'good night' swiftly. And walked away towards my door. But he kept calling out after me even then, "are you sure you know the way?" "Yep!" "Do you want me to turn on the lights for you?? I can turn on lights!!" "No thanks I got it! Have a good night!" (thinking oh god please just go) He then proceeded to stare at me all the way to my door. I went inside and locked it tight. I was freaking out and feeling unsure about all of this and whether to report it or not, but a friend on Facebook said to report it, that it was...enough, you know? Because like WAS it enough??? He just tried to hug me. Maybe hugging is normal for him. Maybe it's a cultural thing (he had somewhat of an accent, sort of Indian but I'm not sure). Maybe it's a normal thing for him, maybe I'm overreacting, like, maybe this isn't enough of reason?? What if this is his only livelihood?? What if I fucking take that away from him?? Is this even enough, a bad vibe, what is that even?? With reassurance from friends I reported it to Uber and to my great surprise someone called me from the company within like 10 minutes. (As a side note considering you really can't call them I was kind of thinking 'omg, Uber has PHONES!!' lol.) This really nice lady spoke to me and I told her everything I've written down here, INCLUDING that I was honestly just not ure it was even worth reporting. Like what even is all this?? a hug?? why would that matter?? what am i even fucking doing?? She said she was grateful I said something, so that there can be a trail, if there have been, or continue to be, other incidents, there's some kind of trail for their investigations team. She was very kind to me and reassured me that they're very good at keeping details vague from the driver about who made the report. Thank God. She also said the drivers are super not allowed to touch passengers, ever, so he at least broke their community guidelines. I still dont' know. I guess I"m posting here for some female solidarity and support, because I'm still feeling really, really conflicted, and confused, and uncertain. Questioning myself. What even happened? A touch?? All I know is I still feel vaguely violated and unsafe, even with the door locked. what he did was fucked up, you know? EDIT: so grateful for the outpouring of love and reassurance here. Thank you all so much. I keep having anxious visions of him pounding up to my door and hammering on it and doing very bad things :( (attacking me?? yelling?? forcing his way INSIDE???????) but the Uber lady said they take a lot of precautions to ensure he does not know the person who reported him. I assume there will be a delay in telling the guy - not least because they have to 'investigate' first anyway - so there will be a buffer of trips. (Though, those poor other women he drives. Ugh.) So glad to find a community of support here. Thank you. <3
0non-cybersec
Reddit
[USA][Texas]I had the blinker on jackass!.
0non-cybersec
Reddit
I left 2015 with a bang - made ribeye steak au jus, fresh rosemary and Parmesan french fries in duck fat, and roasted asparagus..
0non-cybersec
Reddit
Bard allied race confirmed!.
0non-cybersec
Reddit
Window function with order by returns strange results. <p>Here is example:</p> <pre><code>drop table if exists tst; create table tst ( num integer not null ); insert into tst values (1), (2), (3); -- window functions WITH order by clause select *, max(num) over (partition by true order by num asc), array_agg(num) over (partition by true order by num asc) as test from tst; -- window functions WITHOUT order by clause select *, max(num) over (partition by true), array_agg(num) over (partition by true) as test from tst; </code></pre> <p>The result is as follows:</p> <p><a href="https://i.stack.imgur.com/98fJ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98fJ6.png" alt="enter image description here"></a></p> <p>Why order by clause has impact on aggregation function?</p>
0non-cybersec
Stackexchange
Cars are becoming increasingly connected to the internet. How can humans use this to better our lives?.
0non-cybersec
Reddit
Nginx doesn&#39;t route according to my custom rules. <p><strong>Problem</strong>: Nginx doesn't route traffic based on the rule I have defined in a separate config file, and just displays the default 404 response.</p> <p><strong>Context</strong>: I have a small middleware application written in Go that provides a simple response to GET requests. The application is deployed on port 8080:</p> <pre><code>$ curl localhost:8080 ok </code></pre> <p>I wish to write an Nginx configuration that allows me to route calls from <strong>/api</strong> to <strong>localhost:8080</strong>, which would allow me to do the following</p> <pre><code>$ curl localhost/api ok </code></pre> <p>To achieve this, I have written the following config:</p> <p><strong>/etc/nginx/sites-available/custom-nginx-rules</strong></p> <pre><code>server { listen 80; location /api { proxy_pass http://localhost:8080; } } </code></pre> <p>I have also created a softlink in <strong>/etc/nginx/sites-enabled/</strong> for the above file</p> <pre><code>$ ls -l /etc/nginx/sites-enabled total 0 lrwxrwxrwx 1 root root 34 Jan 19 16:42 default -&gt; /etc/nginx/sites-available/default lrwxrwxrwx 1 root root 32 Feb 20 14:56 custom-nginx-rules -&gt; /etc/nginx/sites-available/custom-nginx-rules </code></pre> <p>The rest of the setup is vanilla Nginx, nothing is changed. Despite this simple setup, I get a 404 when making the following call:</p> <pre><code>$ curl localhost/api &lt;html&gt; &lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt; &lt;body bgcolor="white"&gt; &lt;center&gt;&lt;h1&gt;404 Not Found&lt;/h1&gt;&lt;/center&gt; &lt;hr&gt;&lt;center&gt;nginx/1.10.3&lt;/center&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>Other info</strong>: the following are nginx packages installed on my system (running on raspberry pi)</p> <pre><code>$ dpkg -l | grep nginx ii libnginx-mod-http-auth-pam 1.10.3-1+deb9u1 armhf PAM authentication module for Nginx ii libnginx-mod-http-dav-ext 1.10.3-1+deb9u1 armhf WebDAV missing commands support for Nginx ii libnginx-mod-http-echo 1.10.3-1+deb9u1 armhf Bring echo and more shell style goodies to Nginx ii libnginx-mod-http-geoip 1.10.3-1+deb9u1 armhf GeoIP HTTP module for Nginx ii libnginx-mod-http-image-filter 1.10.3-1+deb9u1 armhf HTTP image filter module for Nginx ii libnginx-mod-http-subs-filter 1.10.3-1+deb9u1 armhf Substitution filter module for Nginx ii libnginx-mod-http-upstream-fair 1.10.3-1+deb9u1 armhf Nginx Upstream Fair Proxy Load Balancer ii libnginx-mod-http-xslt-filter 1.10.3-1+deb9u1 armhf XSLT Transformation module for Nginx ii libnginx-mod-mail 1.10.3-1+deb9u1 armhf Mail module for Nginx ii libnginx-mod-stream 1.10.3-1+deb9u1 armhf Stream module for Nginx ii nginx 1.10.3-1+deb9u1 all small, powerful, scalable web/proxy server ii nginx-common 1.10.3-1+deb9u1 all small, powerful, scalable web/proxy server - common files ii nginx-full 1.10.3-1+deb9u1 armhf nginx web/proxy server (standard version) </code></pre> <p>I also require that this setup is independent of any host or server names. It should do the routing regardless of host.</p> <p>Running the <code>nginx -T</code> command confirms that the files is loaded. The error log is also empty.</p>
0non-cybersec
Stackexchange
Mr Tom Ford’s Three Rules Of Grooming.
0non-cybersec
Reddit
Corsair MP510 or WD Black NVME. Hey guys! I'm looking into upgrading from my 500gb 850 EVO. I'm currently looking at Corsair MP510 and WD Black 1TB. I know they are relatively close in performance. I noticed the corsair one has a much higher TBW at 1700 and a longer warranty as well. I was originally gonna buy a 970 EVO but they are now back up to $250 +. I mostly game and do basic productivity work. Which of the two would you guys suggest?
0non-cybersec
Reddit
So this is a thing..
0non-cybersec
Reddit
3 Men in Garden City, Kansas arrested and charged with domestic terrorism. They planned to set off bombs at an apartment complex and mosque occupied by Refugees..
0non-cybersec
Reddit
Asymptotic expansion of a series. <p>I am interested in the asymptotics, as $x$ tends to $0$, of $$f(x) = \sum_{n=1}^\infty \frac{1}{n}\frac{1}{(e^{nx}-1)^2}$$ This function is well defined for every $x &gt; 0$ (for example, use $e^{nx}-1 \geq nx$).</p> <p>Furthermore, <a href="http://mathworld.wolfram.com/LebesguesDominatedConvergenceTheorem.html">Lebesgue's dominated convergence theorem</a> shows that, $$ f(x) \sim \frac{\zeta(3)}{x^2} $$ as $x$ tends to $0$, where $\displaystyle\zeta(3) = \sum_{n=1}^\infty \frac{1}{n^3}$ is <a href="http://mathworld.wolfram.com/AperysConstant.html">Apéry's constant</a>.</p> <p>Could you help me get a more precise asymptotic expansion of $f(x)$ as $x$ tends to $0$ ?</p> <p>(best would be with $o(1)$)</p>
0non-cybersec
Stackexchange
Declaration Versus Definition in c. <p>Recently while learning about c programming i noticed something that i found interesting. I had read that a statement like <code>int i=0;</code> is the only way to force a definition while a statement like <code>extern int i;</code> implies a forced declaration. A statement like <code>int i;</code> would be context dependent. But what happens when i combine the the extern with initialization like <code>extern int i=13;</code>. Compiler generates a warning. But what is this rule governing this?</p>
0non-cybersec
Stackexchange
Inkscape unable to render latex text. <p>I am trying to render some Latex text in Inkscape on Windows, but I keep getting the error </p> <pre><code>Problem during opening C:\Program Files\pstoedit\drvmagick.dll: Unable to find the specified module. </code></pre> <p>I have already installed pstoedit and the file drvmagick.dll is exactly in that directory (which I also added to the PATH).</p>
0non-cybersec
Stackexchange
Clownhouse (1989)-One of my favorite "unknown" movies ever. Brother and I saw this as a kid, and watched the VHS tape more times than I can count. Give it a chance if you get a chance. One of Sam Rockwell's first movies.
0non-cybersec
Reddit
In 1978, I taught my 12 year old brother how to use a SLR and develop black and white film. This is one of the pictures he took. I call it Free Range Childhood. San Fernando Valley, Los Angeles, California..
0non-cybersec
Reddit