text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
C++ pointer to member of derived class. <p>I don't understand what's happening here. I have a class <code>Base</code> that contains a field <code>a</code>. Now I create a <code>Derived</code> class that extend Base. I also have a template function that prints the field we want by passing a pointer-to-member template argument. </p> <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt; class Base { public: Base(double a):a{a} {} double a; }; class Derived : public Base { public: Derived(double a) : Base(a) {} }; template&lt;double (Derived::*p)&gt; void print(Derived d) { std::cout &lt;&lt; d.*p; } int main() { Derived d {10.0}; print&lt;&amp;Derived::a&gt;(d); } </code></pre> <p>The problem is that it doesn't work, but if I only use the base class:</p> <pre class="lang-cpp prettyprint-override"><code>template&lt;double (Base::*p)&gt; void print(Base b) { std::cout &lt;&lt; b.*p; } int main() { Base b {10.0}; print&lt;&amp;Base::a&gt;(b); } </code></pre> <p>It works as expected and prints <code>10.0</code>. How can I get it to work with the subclass?</p> <p>The compiler says:</p> <pre><code>test.cpp:15:6: note: template argument deduction/substitution failed: test.cpp:21:23: error: could not convert template argument ‘&amp;Base::a’ from ‘double Base::*’ to ‘double Derived::*’ print&lt;&amp;Derived::a&gt;(d); </code></pre>
0non-cybersec
Stackexchange
What kind of QoS do I need?. <p>I have a small office. There are ~5 PCs connected via cable. There is 1 PC via WiFi, 3 VoIP phones and a bunch of cellphones connected via WiFi.</p> <p>There is a Gigalan switch and a internet connection via a modem and router. The internet connection is 10 MB for download and 1MB for upload.</p> <p>When an user is download a big file from the internet, all the others users cannot browse or cannot place calls. Or the calls have a big latency that makes them very low quality.</p> <p>How do I diagnose where is the problem? A better switch would make things better? Or is it a problem with my router?</p> <p>I can run a few tests using a linux box and come back with the results.</p> <p><strong>UPDATE:</strong></p> <p>My hardware configuration (all home equipment, nothing fancy):</p> <ul> <li>1 gigalan switch</li> <li>1 cable modem (provided by my carrier)</li> <li>1 linksys router with public ip</li> <li>1 wifi access point (professional) connected to the switch.</li> <li>3 voip phones directly connected to the switch (no wifi here). each one to different ports on the switch.</li> <li>~5 PCs via ethernet and 1 via wifi.</li> <li>I haven't set up any qos in the router or specific configuration.</li> </ul>
0non-cybersec
Stackexchange
Guerrilla planted our potted Christmas tree in the unkept park near me a year ago. Now the city mows the grass around it and people litter a bit less..
0non-cybersec
Reddit
With ios restyled for ios7, wouldn't this be cool for Mavericks?.
0non-cybersec
Reddit
There is a player on my server that loves to troll and prank people, today was his birthday, this is his base now.
0non-cybersec
Reddit
Angular 2 injector hierarchy and NgModule. <p>I wonder how <code>NgModule</code> actually affects Angular 2 injector hierarchy.</p> <p>What does the hierarchy look like in an app with nested modules? Does it create a new injector instance per each module or gets access to top-level injector (similarly to Angular 1.x modules)?</p> <p>It can be somewhat confusing to figure out the tree in a big app.</p> <p>Is there a way to print out, inspect or explore visually the hierarchy of injectors (like it could be done for scope hierarchy in Angular 1.x)?</p>
0non-cybersec
Stackexchange
Dear r/facepalm.
0non-cybersec
Reddit
Jackass - The Chair.
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
65.1 percent of Brazilians think if a woman is “dressed provocatively” she deserves to be “attacked and raped.”.
0non-cybersec
Reddit
Google Duplex: An AI System for Accomplishing Real World Tasks Over the Phone.
0non-cybersec
Reddit
Combine the effects of separate delete and insert rows. <p>How to I combine the two rows below:</p> <pre><code>Date Id For_Id Type New_Value Old_Value ------------------------------------------------------------------ 2015-08-13 6 327 DELETE NULL Value1 2015-08-13 6 327 INSERT Value2 NULL </code></pre> <p>...into a single row, removing the <code>NULLs</code>, matching rows based on the dates?</p> <pre><code>Date Id For_Id New_Value Old_Value ------------------------------------------------- 2015-08-13 6 327 Value2 Value1 </code></pre>
0non-cybersec
Stackexchange
Socket connection into Docker initially succeeds then fails. <p>Running under MacOS I am connecting from a node.js app with net.Socket() into a Docker container running on the same host, which contains a C++ sockets server under Centos. The Docker run command is:</p> <pre><code>docker run -it --rm -p 14000-14010:14000-14010 -v /Users/me/Development/spdz:/spdz spdz/spdzdev </code></pre> <p>When the c++ server in docker is <strong>not</strong> running, I see a successful connection in node followed 3ms later by a socket closed message.</p> <p>It appears as if a proxy in front of the container is accepting the request, passing it through to Docker where it is rejected. However this leads to erroneous messages in my front end application which thinks the connection was successful, only to find out later it was not.</p> <p>I would like to see a simple connection declined. Any suggestions as to how this may be remedied or better understood would be helpful. </p> <p>I am confident that the behaviour is introduced by Docker, as running the components outside Docker gives the expected immediate failure on connection. Also I have tried mapping the exported ports to an external network interface rather than localhost but see the same behaviour.</p>
0non-cybersec
Stackexchange
`xmodmap` not working on startup. <p>I recently installed Debian 9 and inserted my usual <code>~/.Xmodmap</code> file and added <code>xmodmap ~/.Xmodmap</code> to my <code>.xsession</code>. To my disappointment this didn't actually work. </p> <p>For reference, I run <code>i3</code> from <code>startx</code> without a DM.</p> <p>To test if the command ran successfully I replaced the command in my <code>.xsession</code> with <code>touch ~/prior &amp;&amp; xmodmap ~/.Xmodmap &amp;&amp; touch ~/post</code>. And the files were in fact created indicating that the <code>xmodmap</code> command was indeed ran correctly but the mappings were reset somewhere, probably by a call to <code>setxkbmap</code>. </p> <p>I searched for a solution and found only questions without answers, or questions with old answers that didn't work for me, or that contained no real solution:</p> <ul> <li><a href="https://askubuntu.com/questions/7190/why-wont-my-xmodmap-file-load-on-login">Why won't my ~/.Xmodmap file load on login?</a> </li> <li><a href="https://unix.stackexchange.com/questions/1677/why-wont-my-xmodmap-command-run-on-startup-login">Why won't my xmodmap command run on startup/login?</a></li> <li><a href="https://askubuntu.com/questions/54157/how-do-i-set-xmodmap-on-login">How do I set Xmodmap on login?</a></li> <li><a href="https://unix.stackexchange.com/questions/43672/openbox-overwrites-xmodmap-configuration?rq=1">Openbox overwrites xmodmap configuration</a></li> </ul>
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
Slow roasted beef with a mushroom sauce for a Happy New Years!.
0non-cybersec
Reddit
n-bucket water puzzle. <p>Inspired by this <a href="https://math.stackexchange.com/questions/324594/three-bucket-water-puzzle">post</a>. I am thinking of a general case.</p> <p><a href="https://mathoverflow.net/questions/5800/generalization-of-the-two-bucket-puzzle">Reference</a> to read.</p> <p>Suppose $N,L_1,L_2,p,q$ are integers, and $N L_1 = pq$. with $p\ge 2$ and $L_1&gt;L_2$.</p> <p>Now you have $N+1$ buckets, the first $N$ buckets are full of water, each of these buckets can hold $L_1$ liters of water, the left one is a small bucket which is empty at first, the small bucket can hold $L_2$ liters of water.</p> <p>Now the problem is I want to split the $N L_1$ liters of water to $p$ people evenly, everybody can get $q$ liters of water.</p> <p><strong>Question: in what situation $(L_1,L_2,N,p,q)$ we can split the water evenly, in what case we cannot.</strong></p> <hr> <p>For $p=1$ case, that means all the water will go to one people, that is easy.</p> <p>For the original problem setting, if we change the capacity of the small bucket, let $(L_1,L_2,N,p,q)=(8,L_2,2,4,4)$, we can see that </p> <ol> <li>when $L_2 = 1$, it is easy to do, we just get $1$ liter of water every time.</li> <li>when $L_2 = 2$, it also easy, we just get $2$ liters of water every time.</li> <li>$L_2 =3$ is done in the post.</li> <li>$L_2=4$ is also easy as the first two.</li> <li>I can prove when $L_2 = 6,7$, we cannot succeed.</li> </ol> <p>I guess, if $L_2&gt;q$, then we cannot succeed. I am trying to cook up a theory on this, but very limited. Since to find out a proper way to split is kind of NP hard.</p> <p><strong>Conjecture 1</strong>: $gcd(L_1,L_2)\mid q$ and $L_2\le q$ are necessary(not sufficient) to find a solution.</p>
0non-cybersec
Stackexchange
Don't become a victim of the silent killers!.
0non-cybersec
Reddit
custom key sequence in ubuntu mate. <p>I've been looking at custom key shortcuts on Ubuntu, but I haven't seen anything regarding custom key sequence in Ubuntu Mate 16.04.1.LTS: Ideally, when I press:</p> <p><em>the windows key + enter,</em> </p> <p>this would trigger, in sequence:</p> <p><em>alt+right, control-v, alt-left</em></p> <p>Is this possible? If it's then possible to tweak the timing between these 3 combos, that'd be amazing, but likely unnecessary. I don't know how lofty my dreams can be in Ubuntu Mate...</p>
0non-cybersec
Stackexchange
Frequent crashing on BrettSpielWelt? Solution inside.... I was playing Dominion on BSW (www.brettspielwelt.de) with some friends last night and some of the players were having the game lock up on them every few minutes. You can re-join the game just by restarting the client so it's not a HUGE disaster, but it certainly slowed the game down a lot. Sometimes it would crash twice in the same player's turn! Anyway, I did some digging afterward to see if there's a fix. Apparently the issue is caused by the JVM running out of memory from all the pretty high-resolution graphics, and due to the sandboxed-ness of Java it can't easily request more after the app has been launched. Resizing the window to make it bigger than the default exacerbates the issue, since a bigger window means more pixels means more memory taken up on graphics. You could just leave the window at the default size, but that's no fun, so here's ----- **THE FIX** * First, if you haven't already, download the standalone client. It's exactly the as the web-based client, but it installs on your computer so you don't have to load the .jar file from BSW every time. Downloads are [here](http://www.brettspielwelt.de/Community/Download/). * If you just installed the client, run it once so it can download all the game data. * Next, create a shortcut. For the Target field, put: "C:\Program Files\Java\jre6\bin\javaw.exe" -cp "." -Xms64m -Xmx256m de.brettspielwelt.client.Starter The above assumes java is installed in "C:\Program Files\Java", so if you put it somewhere else, adjust accordingly. * For Vista or Windows 7, change the Start in field to: %APPDATA%\Roaming\BSW On XP it's: %APPDATA%\BSW This is where the updater stores the actual program data. ----- Basically what this shortcut does is sets the initial Java heap size to 64MB (-Xms64m) and the maximum Java heap size to 256MB (-Xmx256m). You can increase it further, to say -Xmx512m if you still get crashes, though it's more likely that something else besides running out of memory is causing them at that point. Without these options, the default maximum heap size is 64MB, which is downright puny by modern standards, and you can see how that could cause problems. Edit: The same fix should work for the OSX and Linux clients as well, just create a shell script using this template: `cd` *path\_to\_installed\_app\_data* `java -cp . -Xms64m -Xmx256m de.brettspielwelt.client.Starter`
0non-cybersec
Reddit
Would having 4 states per &quot;bit&quot; rather than 2 mean twice the storage space?. <p>Pretty straightforward fundamental, albeit naive, question:</p> <p>Would having 4 states per "bit" rather than 2 mean twice the storage space? In case that isn't clear, I mean as in if every "storage structure", rather than only representing 2 values, (base 2 : 0, 1), could represent 4 values (base 4 : 0, 1, 2, 3).</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
Proof by induction step $k(k+1)+2(k+1)=(k+1)(k+2)$. <p>I think I do understand the proof by induction right now but on the tutorial I am watching, I don't understand the last steep.</p> <p>How is it possible to go from <span class="math-container">$k(k+1)+2(k+1)$</span> to <span class="math-container">$(k+1)(k+2)$</span>? </p> <p>thank you</p> <p><a href="https://i.stack.imgur.com/L21CV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L21CV.png" alt="Video"></a></p>
0non-cybersec
Stackexchange
HDD activity when computer is idle. <p>What can cause HDD activity when computer is left idle? My HDD is quite loud and I want to get rid of the noise when computer is idle.</p> <p>It happens on Windows 7, automatic defragmentation and antivirus background scanning are turned off. Recently noticed it happen also while running Windows 10 TP install (which is installed on another drive - SSD, but the activity is still on HDD). I've looked into Resource manager - "Processes with Disk Activity" and found only system processes there, <strong>svchost.exe</strong> mainly - does it mean, it's some service causing this HDD activity? How do I found out which one?</p> <p>UPDATE:</p> <p>Based on PID I've found out which svchost process is causing it. <img src="https://i.stack.imgur.com/4kXLz.png" alt="enter image description here"></p>
0non-cybersec
Stackexchange
he did what he could to make it work.
0non-cybersec
Reddit
The Dark Tower TV series will adapt Stephen King's Wizard and Glass.
0non-cybersec
Reddit
Beamer/TikZ shadow printed via Adobe Reader (PostScript) cause errors. <p>Consider the example below compiled using <code>pdflatex</code>. Basically it is a simple test of the Frankfurt theme and the Whale color theme (just attempting to make something smaller).</p> <p>We experience problems with this example when printed on our Konica Minolta C360.</p> <p>When we print from Adobe Reader, on Linux (or Mac, or from Windows using a PostScript Driver), the print is ignored. Prints fine if printed on Canon, HP or Oki, also print fine if we do not use Adobe Reader!</p> <p>AR also prints on the KM, if the file is made using <code>latex+dvips+ps2pdf</code>.</p> <p>I'm having some discussions with KM as to what the problem is.</p> <p>Here are a few interesting observations.</p> <p>If I print the PDF to a PS file on Linux using AR 8, the Adobe Distiller 9 on Win7, complain and recreate a PDF that is flawed.</p> <p>AR X on Win 7, freezes if I attempt to print the PDF to a file.</p> <p>The main problem in the PDF is the shadow, there is no problem if I remove the shadow.</p> <p>Does anyone know if there are Adobe problems in regards to some of the shadings used by TikZ? (when compiling with <code>pdflatex</code>)</p> <p>I can provide some of the generated files if needed.</p> <p>I use an up to date TL 11 system to create the offending PDF.</p> <p>Any comments?</p> <pre><code>\documentclass[handout]{beamer} \usepackage{tikz} %\usetheme{Frankfurt} \makeatletter \def\beamer@themerounded@shadow{true} %\def\beamer@themerounded@shadow{false} \setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow] \usecolortheme{whale} \title{Test} \author{} \date{} \begin{document} \begin{frame} \titlepage \end{frame} \end{document} </code></pre>
0non-cybersec
Stackexchange
INNER JOIN select columns from table2. <p>How can I select certain columns from the second and third tables using <strong>INNER JOIN</strong></p> <pre><code>SELECT * FROM 1_packages_plu AS p INNER JOIN 1_stock as s ON p.fk_products_id = s.fk_products_id AND branch = 1 INNER JOIN 1_products AS j ON p.fk_products_id = j.id WHERE fk_packages_id = 54; </code></pre> <p>In the tables <code>1_stock</code> I only want to return the value of <code>stock-repair</code> columns and in the <code>1_products</code> all I need is make,model columns</p>
0non-cybersec
Stackexchange
Seth Putnam of Anal Cunt dies at 43. Putnam was responsible for such classics as "You're a Trendy Fucking Pussy" and "Ha Ha Holocaust"..
0non-cybersec
Reddit
How to check an AUR package for malicious code?. <p>Malicious code has been found and deleted later from 3 AUR packages <code>acroread</code>, <code>blaz</code> and <code>minergate</code> (<a href="https://aur.archlinux.org/cgit/aur.git/commit/?h=acroread&amp;id=b3fec9f2f16703c2dae9e793f75ad6e0d98509bc" rel="nofollow noreferrer">e,g: acroread PKGBUILD detail</a>). It was found in a commit released by a malicious user by changing the owner of the orphaned AUR package and including a malicious <code>curl</code> command.</p> <p>The <code>curl</code> command will download the main bash script <code>x</code> then the second script <code>u</code> (<code>u.sh</code>) in order to create a systemd service and using a function to collect some system data (non sensitive data) but the scripts can be modified by the attacker to be uploaded sequentially.</p> <p>In practice not all users have the ability to check the PKGBUILD before building any package on their systems for some reasons (require some knowledge , take more time etc...). To understand how it work I have downloaded and uploaded the 2 bash scripts on <a href="https://pastebin.com/5xqU9LC7" rel="nofollow noreferrer">this pastbin page</a>.</p> <p>What is the easiest way to check an AUR package for malicious code? </p> <p><a href="https://nakedsecurity.sophos.com/2018/07/11/another-linux-distro-poisoned-with-malware/" rel="nofollow noreferrer">naked security : Another Linux community with malware woes</a></p> <p><a href="https://thehackernews.com/2018/07/arch-linux-aur-malware.html" rel="nofollow noreferrer">Malicious Software Packages Found On Arch Linux User Repository</a></p>
1cybersec
Stackexchange
How to consume soap service in react native?. <p>I am new in react native and wanted to consume soap service but did not get any api to do that. I have used fetch api for Rest service with json parser. Is there any api available to consume soap service and parse xml in react-native. In ios we create soap envelope and send to the server like :</p> <pre><code>NSString *soapMessage = [NSString stringWithFormat: @"&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n" "&lt;soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchem\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;\n" "&lt;soap:Body&gt;\n" "&lt;GetCitiesByCountry xmlns=\"http://www.webserviceX.NET\"&gt;\n" "&lt;CountryName&gt;%@&lt;/CountryName&gt;\n" "&lt;/GetCitiesByCountry&gt;\n" "&lt;/soap:Body&gt;\n" "&lt;/soap:Envelope&gt;\n",@"India"]; NSURL *url = [NSURL URLWithString:@"http://webservicex.com/globalweather.asmx"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; [theRequest addValue: @"http://www.webserviceX.NET/GetCitiesByCountry" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: [NSString stringWithFormat:@"%lu",(unsigned long)[soapMessage length]] forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; self.responseData = [[NSMutableData alloc]init]; NSURLSession *soapSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate:self delegateQueue:[NSOperationQueue mainQueue]]; NSURLSessionDataTask *dataTask = [soapSession dataTaskWithRequest:theRequest]; [dataTask resume]; </code></pre> <p>Same thing I am looking in react-native.</p>
0non-cybersec
Stackexchange
I tried to take a video of this beautiful caterpillar :(.
0non-cybersec
Reddit
Are Nassi-Shneiderman diagrams actually used?. <p>I learned about them in a Structured Programming course, but never saw them used thereafter either at the analysis phase or for documentation purposes. Not even for highly structured languages like Pascal (Delphi).<br> Does any of you actually use Nassi-Shneiderman diagrams? If yes, what tools do you use to create/maintain them?<br> <strong>edit:</strong><br> Or have you never heard of them?</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
There's bad ideas, then there's bad tattoos..
0non-cybersec
Reddit
Organizing skype downloads in subfolders with contact names. <p>I always wondered why skype don't put all my accepted downloads in subfolders with the name of my contacts! </p> <p>If anybody have own solutions, share)</p>
0non-cybersec
Stackexchange
My oven started to smoke up the whole room. I got a self cleaning oven that started to smoke when it was empty. I searched online and it said that what happens when you have a dirty oven. But my paranoid ass doesn't know the health risks? I know this is a cooking subreddit but I don't know where else to ask this
0non-cybersec
Reddit
nginx / ssl: Always redirect to one of two https subdomains. <p>My webserver supports the following two subdomains:</p> <ul> <li><a href="https://www.example.com" rel="nofollow noreferrer">https://www.example.com</a></li> <li><a href="https://en.example.com" rel="nofollow noreferrer">https://en.example.com</a></li> </ul> <p>I want to create my nginx config so that:</p> <ol> <li><a href="http://en.example.com" rel="nofollow noreferrer">http://en.example.com</a>$request_uri => <a href="https://en.example.com" rel="nofollow noreferrer">https://en.example.com</a>$request_uri</li> <li><a href="http://www.example.com" rel="nofollow noreferrer">http://www.example.com</a>$request_uri => <a href="https://www.example.com" rel="nofollow noreferrer">https://www.example.com</a>$request_uri</li> <li>Every other subdomain independent of http or https => <a href="https://www.example.com" rel="nofollow noreferrer">https://www.example.com</a>$request_uri</li> </ol> <p>I could not find any solution online that solves this problem. Can anybody help me out with the correct nginx config.</p>
0non-cybersec
Stackexchange
How to power down display on terminal?. <p>I would like to power down/up my display from the terminal.</p> <p>Right now I have:</p> <pre><code>setterm --blank force #wake setterm --blank poke </code></pre> <p>Which gives a blank screen; but active screen (screen still receives output from computer, just blank output, it won't enter a "no signal" state)</p> <p>How would I turn off the display completely like you can do from X with this?</p> <pre><code>xset dpms force off #wake xset dpms force on </code></pre>
0non-cybersec
Stackexchange
Live Time in Windows 8. <p>There is an app in Windows Store called "The Time" which shows current time (every minute) on its Tile. The app can do this without registering any Background Task.</p> <p>How can it do this?</p> <p><strong>UPDATE:</strong> it seems that it schedules lots and lots of tiles! Because if you draw back the computer time, it will stop working. However, I don't know how many tiles it schedules and how many tiles it is possible to schedule?</p>
0non-cybersec
Stackexchange
What&#39;s the difference between the &quot;remainder&quot; and &quot;radius of convergence&quot; for Taylor series that converge for all $x$?. <p>From what I can understand, the remainder is how much difference there is between the function itself and the polynomial approximation. And the radius of convergence is related to the series representation of the polynomial approximation, and how its convergence could be tested by the ratio test.</p> <p>But what's the difference between them when they seem to tell you the same thing?</p> <p>For example, since <span class="math-container">$\sin(x)$</span> is <span class="math-container">$$ \sum_{n=0}^\infty(-1)^n \frac{x^{2n+1}}{(2n+1)!}, $$</span> it seems that we can find that it converges for all values of <span class="math-container">$x$</span> by either</p> <ol> <li>making to the remainder becomes zero (by having it approach <span class="math-container">$0$</span> by having <span class="math-container">$n$</span> approach <span class="math-container">$\infty$</span>.</li> <li>showing that the ratio test has convergence criteria</li> </ol> <p>My other example would be <span class="math-container">$e^x$</span>, but that seems easier to do the ratio test on since the <span class="math-container">$f^{(n+1)}(c)$</span> term isn't bounded.</p> <p>It seems that doing the ratio test for <span class="math-container">$\sin(x)$</span> will give me the same result as making the remainder <span class="math-container">$0$</span>, and finding that the remainder is <span class="math-container">$0$</span> for <span class="math-container">$e^x$</span> is the same result as the ratio test.</p>
0non-cybersec
Stackexchange
Safari always shows the bookmarks window. <p>Whenever I open Safari, the bookmarks/saved for later window is always shown on the right side. How can I disable this? I can't seem to find such setting.</p>
0non-cybersec
Stackexchange
Collecting package metadata (current_repodata.json): failed NotWritableError: The current user does not have write permissions to a required path. <p>When i am trying to install any library such as pandas and even when i tried to install clean package using <code>conda install anaconda-clean</code>. it gives an error :</p> <pre><code>Collecting package metadata (current_repodata.json): failed NotWritableError: The current user does not have write permissions to a required path. path: /home/parth/.conda/pkgs/urls.txt uid: 1000 gid: 1000 If you feel that permissions on this path are set incorrectly, you can manually change them by executing $ sudo chown 1000:1000 /home/parth/.conda/pkgs/urls.txt In general, it's not advisable to use 'sudo conda'. </code></pre>
0non-cybersec
Stackexchange
Tor not working after update. <p>Yesterday I updated my Ubuntu 14.04 LTS and after that Tor stopped working :</p> <p>When I try to run Tor using command </p> <p><code>sudo service tor start</code> it gives an error</p> <pre><code>aa-exec: ERROR: profile 'system_tor' does not exist </code></pre> <p>prior to the update everything was working fine.</p>
0non-cybersec
Stackexchange
My man cave/cigar lounge - finished!.
0non-cybersec
Reddit
AW: What is a hot insider tip you know because of your job that the rest of us should know too?.
0non-cybersec
Reddit
Best event based architecture for Linux to GUI. <p>I've looked around <a href="https://www.quora.com/What-are-the-most-popular-online-forums-or-chatrooms-for-software-engineers-to-discuss-programming-practices-and-methodologies" rel="nofollow noreferrer">a</a> <a href="https://meta.stackoverflow.com/questions/252777/is-there-a-less-restrictive-stack-exchange-site-specially-suited-for-not-too-spe">bit</a> and probably haven't found the right medium for this question so let me know if there's a different forum I should bother. </p> <p>First, there is an application managed by another group that does some simulations and communicates to our system via Ethernet. Let's call this App.</p> <p>Now, we have the following setup on a Red Hat Enterprise Linux system: </p> <ol> <li>Legacy Ada code (used to communicate with App following a predefined standard)</li> <li>Linux csh/sh scripts (call Ada tasks to communicate with App or write files to update Flash - either called by Ada tasks or constantly running alongside program to monitor status)</li> <li>Actionscript 2 Flash Movie in Firefox window (GUI - polls files to see if updates are necessary and loads variables to PHP to make system calls, call Linux scripts, or run Ada tasks)</li> <li>PHP (used by Flash to call Linux scripts and Ada tasks to communicate with App)</li> </ol> <p>I am looking for architectural improvements. Obviously the mishmash of languages is a nightmare. Above that, Flash is difficult to work with because we haven't been able to get an interrupt-driven architecture in place. I've tried to use Flash's ExternalInterface class for a more event-based flow, but whoever setup the Flash environment did so in a way that there is no available ExternalInterface. "Finally" (for this post), our program is run on a local machine, so running a .swf in a Firefox window is unnecessary. </p> <hr> <p>Thanks for the feedback! Let me respond to the first three comments I see: </p> <ol> <li>It would be an absolute dream to get time and money to rewrite the entire system in a more coherent manner. I expect significant resistance (because I've already tried a few times), but I will do more research and attempt to gather more compelling cases and communicate the "feebleness" of only updating part of the "design". </li> <li>You're right - I was rushing too much to think it was necessary to know the guts. Basically I was hoping for stuff like, "My favorite languages/tools/patterns/paradigms/etc for an architecture that needs to have a GUI and interact with Linux is blah" or "An interrupt driven architecture for AS2 does exist, it's blah" or "ExternalInterface isn't available? Have you made sure that blah?". I've updated the above with maybe more useful information. Let me know if that didn't actually clarify anything.</li> <li>Hopefully the previous response helps explain what the pieces do to some degree.</li> </ol> <p>EDIT: I no longer work on this project, but we can keep the thread open if anyone else thinks it'll be useful for others (doubtful as I hope no one ever runs into this embarrassing situation). What ended up happening was <code>&lt;whine&gt;</code> despite repeated attempts from me and two other developers to suggest rewriting the entire application in Java/Python, we never convinced anyone. Then another developer (not on the project) volunteered to rewrite everything in Java and everyone jumped on board all of a sudden so now the whole thing is in Java (not App, but everything in 3 and 4 is now Java). <code>&lt;/whine&gt;</code></p>
0non-cybersec
Stackexchange
Generate all permutations of a list without adjacent equal elements. <p>When we sort a list, like</p> <pre><code>a = [1,2,3,3,2,2,1] sorted(a) =&gt; [1, 1, 2, 2, 2, 3, 3] </code></pre> <p>equal elements are always adjacent in the resulting list. </p> <p>How can I achieve the opposite task - shuffle the list so that equal elements are never (or as seldom as possible) adjacent?</p> <p>For example, for the above list one of the possible solutions is</p> <pre><code>p = [1,3,2,3,2,1,2] </code></pre> <p>More formally, given a list <code>a</code>, generate a permutation <code>p</code> of it that minimizes the number of pairs <code>p[i]==p[i+1]</code>. </p> <p>Since the lists are large, generating and filtering all permutations is not an option.</p> <p>Bonus question: how to generate all such permutations efficiently?</p> <p>This is the code I'm using to test the solutions: <a href="https://gist.github.com/gebrkn/9f550094b3d24a35aebd" rel="nofollow noreferrer">https://gist.github.com/gebrkn/9f550094b3d24a35aebd</a></p> <p>UPD: Choosing a winner here was a tough choice, because many people posted excellent answers. <a href="https://stackoverflow.com/a/25285879/989121">@VincentvanderWeele</a>, <a href="https://stackoverflow.com/a/25290780/989121">@David Eisenstat</a>, <a href="https://stackoverflow.com/a/25291640/989121">@Coady</a>, <a href="https://stackoverflow.com/a/25286137/989121">@enrico.bacis</a> and <a href="https://stackoverflow.com/a/25401193/989121">@srgerg</a> provided functions that generate the best possible permutation flawlessly. <a href="https://stackoverflow.com/a/25286251/989121">@tobias_k</a> and David also answered the bonus question (generate all permutations). Additional points to David for the correctness proof.</p> <p>The code from @VincentvanderWeele appears to be the fastest.</p>
0non-cybersec
Stackexchange
How to apply stopwords accurately in French using R. <p>I'm trying to pull a book using the Gutenberg library and then remove French stopwords. I've been able to do this accurately in English by doing this:</p> <pre><code>twistEN &lt;- gutenberg_download(730) twistEN &lt;- twistEN[118:nrow(twistEN),] twistEN &lt;- twistEN %&gt;% unnest_tokens(word, text) data(stop_words) twistEN &lt;- twistEN %&gt;% anti_join(stop_words) countsEN &lt;- twistEN %&gt;% count(word, sort=TRUE) top.en &lt;- countsEN[1:20,] </code></pre> <p>I can see here that the top 20 words (by frequency) in the English version of Oliver Twist are these:</p> <pre><code>word n &lt;chr&gt; &lt;int&gt; 1 oliver 746 2 replied 464 3 bumble 364 4 sikes 344 5 time 329 6 gentleman 309 7 jew 294 8 boy 291 9 fagin 291 10 dear 277 11 door 238 12 head 226 13 girl 223 14 night 218 15 sir 210 16 lady 209 17 hand 205 18 eyes 204 19 rose 201 20 cried 182 </code></pre> <p>I'm trying to accomplish the same thing with the French version of the same novel:</p> <pre><code>twistFR &lt;- gutenberg_download(16023) twistFR &lt;- twistFR[123:nrow(twistFR),] twistFR &lt;- twistFR %&gt;% unnest_tokens(word, text) stop_french &lt;- data.frame(word = stopwords::stopwords("fr"), stringsAsFactors = FALSE) stop_french &lt;- get_stopwords("fr","snowball") as.data.frame(stop_french) twistFR &lt;- twistFR %&gt;% anti_join(stop_words, by = c('word')) %&gt;% anti_join(stop_french, by = c("word")) countsFR &lt;- twistFR %&gt;% count(word, sort=TRUE) top.fr &lt;- countsFR[1:20,] </code></pre> <p>I did alter the code for the French stopwords based on info I found online, and it is removing some stopwords. But this is the list I'm getting:</p> <pre><code>word n &lt;chr&gt; &lt;int&gt; 1 dit 1375 2 r 1311 3 tait 1069 4 re 898 5 e 860 6 qu'il 810 7 plus 780 8 a 735 9 olivier 689 10 si 673 11 bien 656 12 tout 635 13 tre 544 14 d'un 533 15 comme 519 16 c'est 494 17 pr 481 18 pondit 472 19 juif 450 20 monsieur 424 </code></pre> <p>At least half of these words should be getting captured by a stopwords list and they're not. Is there something I'm doing wrong in my code? I'm new to tidy text, so I'm sure there are better ways to get at this.</p>
0non-cybersec
Stackexchange
A valid provisioning profile for this executable was not found error while using instruments. <p>I'm getting the classic "A valid provisioning profile for this executable was not found" when I use instruments to try and profile my app. When I try to build, run, debug, distribute, my app, I don't get this problem at all. Has anyone experience this problem before?</p>
0non-cybersec
Stackexchange
Face-off: 1979 Apple Graphics Tablet vs. 2010 Apple iPad.
0non-cybersec
Reddit
Updating a mutable named set in nftables with responses from bind. <p>I need to apply an <code>nftables</code> rule to all traffic originating from a specific host, but the packets will not necessarily include the proper FQDN, so I need to rely on the IP address(s). The issue is that there are multiple redundant IP's returned for the FQDN that may change order/priority from time to time, or may even be replace entirely. </p> <p>Because there are multiple IP's returned, I have to use a mutable named <code>set</code>, but I need that set to update somewhat regularly to ensure we have an up to date list of IP's to match against.</p> <p>We have BIND9 (<code>named</code>) on the server so my thought is that I could have a cron job script that:</p> <ol> <li>Flush the local dns resolver for the the FQDN with <code>rdnc flushname...</code>, </li> <li>Then dig against it to update the resolver cache with <code>dig +short...</code>, </li> <li>Run <code>nft add element...</code> with the new ones,</li> <li>Flush the old named set with <code>nft delete element...</code></li> </ol> <p>Is this the right way to go about this, or have I overthought something thats already been solved another way?</p>
0non-cybersec
Stackexchange
Not able to access file via SMB but able to access from NTFS. <p>I have a strange problem.</p> <p>I have a file uploaded by some colleague via mapped drive. She is able to read the file after uploading. She has write/read/execute/list NTFS permission, and I see she is the owner of files.</p> <p>Then some other colleague tell me she can't read these files via mapped drive, they have the same NTFS permission and sharing permission.</p> <p>Then I test by myself, directly on the server: 1. I can't read either from mapped drive, and I logged as admin user 2. I can read it, via NTFS physical drive. 3. All sharing is inherited from the sharing root.</p> <p>From ACL checking everything is correct. Other folders/files from the same sharing root is ok.</p> <p>Do you have any ideas?</p>
0non-cybersec
Stackexchange
Running PowerShell cmdlets in C#. <p>I need to run powershell cmdlets using C# in Visual Studio Console.</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Management.Automation; using System.Threading; using System.Management.Automation.Runspaces; using System.Collections.ObjectModel; using System.Collections; namespace ConsoleApp1 { class Program { private static string RunScript() { Runspace runSpace = RunspaceFactory.CreateRunspace(); runSpace.Open(); Pipeline pipeline = runSpace.CreatePipeline(); Command cmd = new Command("Connect-MsolService"); pipeline.Commands.Add(cmd); ICollection results = pipeline.Invoke(); // Here exception occurs runSpace.Close(); StringBuilder stringBuilder = new StringBuilder(); foreach (PSObject obj in results) { stringBuilder.AppendLine(obj.ToString()); } return stringBuilder.ToString(); } static void Main(string[] args) { using (PowerShell PowerShellInstance = PowerShell.Create()) { Console.WriteLine(RunScript()); Console.ReadKey(); } } } } </code></pre> <p>When I run the code an Exception occurs:</p> <blockquote> <p>The term 'Connect-MsolService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.</p> </blockquote> <p>Even though it works when I run the commands in Powershell.</p>
0non-cybersec
Stackexchange
Internet sharing not working after one hop. <p>I have a broadband ADSL connection to a modem router. I have connected this router 'A' to another wifi-modem router 'B' through a LAN cord. </p> <p>Internet works fine in windows with wifi connection.</p> <p>However, in linux (Android, Fedora, Ubuntu) it connects to the wifi network but I am not able to use internet.</p> <p>Please note that all settings are automatic DHCP.</p>
0non-cybersec
Stackexchange
I knew I was fat, when blind people knew I was fat. . Years ago I worked for for a state Deaf/Blind school, I am an ASL interpreter. I always knew I was chunky, big boned, hardy, whatever other terms I could use to describe my physical appearance without admitting I was obese. What bothered me more than my physical appearance, was knowing how unhealthy I was. One day after walking up two flights of stairs to get to my office, a blind co-worker asked if I was alright. I was confused and responded "yes, why?" He told me he could hear me breathing heavy and was concerned. I had to confess that I was out of breath because walking up the stairs was difficult for me. He responded "oh, I didn't know you were overweight." I was crushed and thought that was incredibly insensitive of him. I wanted to crawl in a hole and die. I was mortified, ashamed, embarrassed. He couldn't see that I no longer fit into my jeans, he couldn't see my discomfort in my office chair, he was oblivious to my physical appearance. He knew my body was failing me, or I was failing my body and he didn't even have to see me to know it. That day everything changed. I got a gym membership that afternoon, asked my friends to support me and lost 100 pounds that year. I've kept it off for 5 years now and often think of the man who heard my fat. But, after I lost the weight, while I worked there I made it a point to make him hear me running up the stairs -- without panting or wheezing. Proving to us both that I was no longer out of shape. Sometimes you need to hear the things you already know. Tl;dr - I was so overweight that a blind person commented on my heavy breathing after walking two small flights of stairs that I changed my life and lost 100 pounds. Now I thank him every time I walk up stairs.
0non-cybersec
Reddit
Script to run commands as soon as a key is hit. <p>I would like to make a repeating function in bash, that runs the same three commands every time any key is pressed.</p> <p>In Windows, I can do this by having the pause command in an infinite loop in a batch file, which works fine for my needs.</p> <p>Most *nix distros don't have a pause command equivalent, and <code>read -p</code> is not functioning the way I would like.</p> <p>What is the best way to accomplish what I need? Additionally, would it be possible to have a different command (for cleanup) executed when a certain key combination (say <kbd>Ctrl</kbd>-<kbd>C</kbd>) is input?</p>
0non-cybersec
Stackexchange
Ohh Tekashi.
0non-cybersec
Reddit
Hand drawn card. How much should this sell for?.
0non-cybersec
Reddit
Docker Node Alpine Image Build Fails on node-gyp. <p>I'm attempting to Dockerize a Vue.js application. I'm using the <code>node:10.15-alpine</code> Docker image as a base. The image build fails with the following error:</p> <pre><code>gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19) gyp ERR! stack at PythonFinder.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16) gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16) gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21) gyp ERR! System Linux 4.9.125-linuxkit gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /app/node_modules/inotify gyp ERR! node -v v10.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. </code></pre> <p>The application runs on my Ubuntu machine. And I've searched for a resolution online.</p> <p>I tried:</p> <pre><code>FROM node:10.15-alpine EXPOSE 8080 RUN mkdir -p /app/src WORKDIR /app COPY build/ config/ dist/ static/ .babelrc .postcssrc.js index.html /app/ COPY package*.json ./ RUN apk add --no-cache make gcc g++ python &amp;&amp; \ npm install --production --silent &amp;&amp; \ apk del make gcc g++ python ADD src/ /app/src/ CMD ["npm", "start"] </code></pre> <p>This fails too. The error output is quite verbose and references C/C++ code.</p> <p>Here's my current Dockerfile:</p> <pre><code>FROM node:10.15-alpine EXPOSE 8080 RUN mkdir -p /app/src WORKDIR /app COPY build/ config/ dist/ static/ .babelrc .postcssrc.js index.html /app/ COPY package*.json ./ RUN npm install ADD src/ /app/src/ CMD ["npm", "start"] </code></pre> <p>Can anyone help me to resolve this issue with node-gyp? I'd like to be able to run the application from with a Docker container, but I need to get the image to build first.</p> <h3>Update</h3> <p>Since the build was working on my Ubuntu machine, I checked the <code>node</code> version. It was 8.12, so I switch to using the <code>node:8.12-alpine</code> image and the application now works with the following Dockerfile:</p> <pre><code>FROM node:8.12-alpine RUN apk add g++ make python EXPOSE 8080 RUN mkdir /app WORKDIR /app COPY . /app RUN npm install CMD ["npm", "start"] </code></pre>
0non-cybersec
Stackexchange
Install Android M Launcher APK (Velvet) On Lollipop & KitKat.
0non-cybersec
Reddit
Postgres: query on huge (11gb ) index does not return. <p>Using Postgres 9.6, I have created a table with 435M rows which is 120GB in size and have added an index which is 11GB in size.</p> <p>I now want to iterate on the distinct values of the index, but the query fails with no error, it just does not complete. I can see no cpu usage or ram being used. Nb the server is on aws rds with 15GB of ram. </p> <p>How to best troubleshoot this? Trying to iterate through it with <code>LIMIT</code> and <code>OFFSET</code> fails after about 3 cycles. I haven't managed to get a number of the unique values in the index. </p> <p>I will try reindexing to see if there is indeed anything corrupted, but any suggestions on using a 11GB index would be great. </p> <p>Editing to add more info:</p> <p>This is the format of my table</p> <pre><code>id bigint, hit1 character varying(50), hit2 character varying(50), offset integer, year character varying(50) </code></pre> <p>Row estimate is at 431M rows, approx size at 115GB according to postgres. </p> <p>Index is on hit1 column with a size of 11GB. </p> <p>I am trying to calculate the counts of hits:</p> <pre><code>select hit1,hit2, count(distinct id) as total_count_of_ids, count(case when offset=-1 then 1 else null end) as prev_position, count(case when offset=0 then 1 else null end) as same_position, count(case when offset=1 then 1 else null end) as next_position, min(cast(substring(year,1,4) as int)) as min_year, max(cast(substring(year,1,4) as int)) as max_year, array_agg( id) as id_list from table where hit1='' group by hit1, hit2; </code></pre> <p>As the table is big, I have opted to do this one by one entity like so: </p> <pre><code>select distinct hit1 from table limit 250 offset x -- use above query to to store results into table. </code></pre> <p>This function is wrapped in another function which provides x from a loop. The function is run in a dblink context so that the results can be stored and I can audit as I go along. </p> <p>The cycle needs to run 1,000,000, I am yet to get a number for the count of distinct hit1 values as the query takes too long to come back. The first 750 values (3 iterations) come back on the iteration in under a minute each, but at the next iteration is where it keels over. I will provide log data when this iteration dies. </p> <p>While the query is running (at the time when the distinct list is calculated) there seems to be minimal cpu usage. There also seems to be some memory being unavailable. </p> <p><a href="https://i.stack.imgur.com/SP72Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SP72Q.png" alt="freeable memory graph"></a></p> <p><a href="https://i.stack.imgur.com/zdy5X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zdy5X.png" alt="CPU utilisation chart"></a></p> <p>Edit 2 to show results: In the functions I use dblink for auditing. After the first 3 cycles (0-2) it takes one hour to return results from select distinct hit1 from table limit 250 offset 750; compared to the previous hit1 order this one is no alphabetical and it seems to return or die only 77 results in. </p>
0non-cybersec
Stackexchange
Does anyone else have a hard time remembering names in anime?. So I’m not like a huge anime fan but my friend recently got me to watch My Hero Academia online and I have to say, I loved it. Idk something about those characters, the balance of humor and seriousness, overall world design just really appealed to me. But after talking to my friend about it I realized I only really remembered the name of Deku (because he’s the main character and it’s a relatively short name) and Tsu (because she shouts “I said call me Tsu” like all the time to Deku). And those aren’t even my favorite characters or anything it’s just by chance I remembered them, Raven bird guy and Robo legs are probably my favorite. I’m bad at memorizing names, even English names but for anime because a lot the the names (to me at least) sound extremely foreign and i’v never heard them before i guess they just go in one ear and out the other. I’v had this issue with other anime’s that I actually kind of enjoyed like Soul Eater (I only remember the names of Makah? And Kid death) even though I watched that entire series. Same with the Devil is a Part Timer, fucking loved the series, watched every episode but as of right now, I can’t remember the names of anyone. (Which is embarrassing because I think there’s only like 5 important characters) Out of all the anime’s I’d watched, the only one where I didn’t have this issue with was Full Metal Alchemist, I think it might be the names are western are maybe they just shout them more? Idk I’m just asking if anyone else has this issue when watching anime.
0non-cybersec
Reddit
Keyboard doesn&#39;t work in certain applications when using an external monitor. <p>When connect to external monitor and extend display to ext minitor, keyborad input does not work for certain application(Java UI, eg username, password input dialog).</p> <p>In single monitor mode, never has this type of problem.</p> <p>Any suggestions?</p>
0non-cybersec
Stackexchange
It seemed like a good idea when we were drunk..
0non-cybersec
Reddit
Buying the War: How Big Media Failed Us (2007)...When Fake News was served up by The New York Times, NBC, CBS, CNN, Fox, et al..
0non-cybersec
Reddit
how to unzip same file name without override (capitalization differ). <p>I have 2 files named xt_DSCP.h and xt_dscp.h in the same directory, in a zip file. I am trying to unzip them on my pendrive but I only have 2 options: skip or override. </p> <p>I was searching for a solution but only found how to force override but I am actually trying to do the exact opposite. </p> <p>File system is FAT32. I know that on NTFS it is not possible but FAT32 should allow it. I already unzipped the folder successfully in linux OS. Main goal is to use it in windows, however, which is why I am trying to pass it to pen drive on linux. Any attempt always resulted in overwritten files :(</p> <p>can someone help? </p>
0non-cybersec
Stackexchange
To gently put toys away.
0non-cybersec
Reddit
Guys, today is the last day we can discuss the Banned Books here at r/books! Let's make it count :D. For your reference: The List of Banned Books, and a link to [the original modpost](http://www.reddit.com/r/books/comments/21kiwz/announcement_we_are_banning_certain_books_from/). --- > > Banned Books: > 1. *1984* by George Orwell > 2. *American Gods* by Neil Gaiman > 3. *Brave New World* by Aldous Huxley > 4. *Catch-22* by Joseph Heller > 5. *The Catcher in the Rye* by J.D. Salinger > 6. *Dune* by Frank Herbert > 7. *Ender's Game* by Orson Scott Card > 8. *Fight Club* by Chuck Palahniuk > 9. *Gravity's Rainbow* by Thomas Pynchon > 10. *The Great Gatsby* by F. Scott Fitzgerald > 11. *Harry Potter series* by J.K. Rowling > 12. *Hitchhiker's Guide to the Galaxy* by Douglas Adams > 13. *House of Leaves* by Mark Z. Danielewski > 14. *The Hunger Games series* by Suzanne Collins > 15. *Infinite Jest* by David Foster Wallace > 16. *Kafka On the Shore* by Haruki Murakami > 17. *Lolita* by Vladimir Nabokov > 18. *The Lord of the Rings Trilogy* by J. R. R. Tolkien > 19. *The Name of the Wind* by Patrick Rothfuss > 20. *Necronomicon* by H. P. Lovecraft > 21. *The Road* by Cormac McCarthy > 22. *Slaughterhouse V* by Kurt Vonnegut > 23. *Snow Crash* by Neal Stephenson > 24. *A Song of Ice and Fire* by George R. R. Martin > 25. *The Stand* by Stephen King --- To start the discussion: Is anyone getting a Fahrenheit 451 vibe from these? --- Edit: [April Fools everyone! Here's the official modpost~](http://www.reddit.com/r/books/comments/21x1n8/announcement_the_banned_books_rule_is_now_not_in/)
0non-cybersec
Reddit
Hate everything right now.
0non-cybersec
Reddit
Integration of $I_n=\int_{0}^{1} \frac{x^n}{\sqrt{x^3+1}}dx$. <p>Let $I_n=\int_{0}^{1} \frac{x^n}{\sqrt{x^3+1}}dx$. Show that $(2n−1)I_n+2(n−2)I_{n-3}= 2\sqrt{2}$ for all $n\geq3$. Then compute $I_8$.</p> <p>How do I compute that integral? My idea was to reduce it to some known forms, as $\int\frac{1}{\sqrt{1-x^2}}dx$... Is there any way to solve the problem without computing the integral though?</p>
0non-cybersec
Stackexchange
how to specify session to connect to when xrdp has spawned multiple sessions?. <p>I have installed xrdp on Debian 7 like so:</p> <p><code>apt-get install xrdp vnc4server </code></p> <p>I have been connecting using Microsoft Remote Desktop Connection. I have noticed that sometimes, my existing session doesn't connected if my connection drops and I reconnect, instead I get a new connection. My <code>ps</code> output shows this:</p> <p><code>vagrant@devcloud:~$ ps x | grep -i vnc 11233 ? S 0:03 Xvnc :11 -geometry 1440x900 -depth 16 -rfbauth /home/vagrant/.vnc/sesman_vagrant_passwd -bs -ac -nolisten tcp 12404 pts/5 S 0:01 Xvnc :12 -geometry 1440x900 -depth 16 -rfbauth /home/vagrant/.vnc/sesman_vagrant_passwd -bs -ac -nolisten tcp 12855 ? S 6:13 Xvnc :10 -geometry 1600x900 -depth 16 -rfbauth /home/vagrant/.vnc/sesman_vagrant_passwd -bs -ac -nolisten tcp </code></p> <p><strong>Question:</strong> Is it possible to specify the session to connect to, rather than a new session being spawned?</p>
0non-cybersec
Stackexchange
What if Sightstone increases the XP gained from clearing wards?. Riot talked about Problems with XP from Supports. When they leave the lane, they immediately become underleveled. Riot added XP gaining for Clearing wards, but it seems it isnt enough. SO let Sighstone increase the XP you gain from Clearing wards. PS: Sry for my english :c
0non-cybersec
Reddit
AITA for not allowing my 11-year-old daughter to have a boy sleep over our house?. As I said, my daughter’s 11 and her friend group ranges 11-12. It’s mainly girls but there is one boy that I have seen around. She’s having a sleepover to celebrate her birthday this weekend. She invited the boy to the party but the plan was (or so I thought) that he would leave around 10 pm. The boy’s mom called me last night to confirm that the boy (I’ll call him Tom) could sleep over. I said there must have been some miscommunication and I thought that she was picking up Tom at 10. I told her that if transportation was a problem my husband or I could drive Tom home. Tom’s mom said that the issue was Tom wanted to stay over and would be let down if he had to go home. (Again, I don’t know why she thought he was sleeping over, since I made it clear on the invitation what was expected. We will have a couple other boys over who are the kids of family friends and they will also be leaving at 10 pm!). It was a sort of awkward conversation to say the least. But she ended up saying she would come to pick up Tom after the party. To be honest, even if I was inclined to have Tom sleep over, I doubt husband would go for it. But I’m starting to wonder if I did something wrong here?
0non-cybersec
Reddit
Locked out by permissions on an internal 4TB drives problem. <p>This is my 2nd time around with an internal 4 TB drive or greater. And I seem to have continuous problems with permissions. I also had as problem with an external 6 TB drive and permissions. This has been happening on different computers. All were all running a Linux system. All drives were running an EXT4 system. I seems to have solved the problem with the external drive by formatting it as a NTFS files system.</p> <p>However, on internal drives, I should be able to run them as a EXT4 files system. What happens is that I format them, then loose permissions to them after I re-boot. I can access them, but can not do anything else. I can not post files to them or create internal directories.</p> <p>I've had the same problem with Ubuntu Gnome and Mint. What do I need to do, format them as NTFS drives?</p> <p>I have tried the various 'chrown' and 'chmod' commands with various settings. No help. I get the message that permissions have been changed, then I access the drive. No change.</p> <p>On one computer, my home directory was encrypted. On the other computer, it was not.</p> <p>All hardware has been replaced and updated. New CPU. New motherboard. New power supply. New memory. Etc.</p> <p>Tried: cd /media/lloyd/SyS_10</p> <pre><code> sudo chmod -R -v 777 * </code></pre> <p>No help</p> <p>Tried: cd /media/lloyd/SyS_10</p> <pre><code> sudo chown -R -v lloyd:lloyd * </code></pre> <p>Again, no help.</p> <p>Also tried some other things, which did not help. But can't remember the sequence.</p> <p>Common points between them:</p> <ol> <li><p>Running a Linux system. Different flavors and different computers. (Ubuntu Gnome 17.10 and Mint 18.3.)</p></li> <li><p>Drives formatted as EXT4 (BIOS supports large drives.)</p></li> <li><p>Drives were equal or greater than 4 TB.</p></li> </ol> <p>Common problems:</p> <ol> <li><p>Assigned all permissions to these drives to ROOT.</p></li> <li><p>All stated that I did not have ROOT Permissions.</p></li> </ol> <hr> <p>It appears to me as if there is a bug in either Ubuntu or EXT4 when using multiple drives and those additional drives are larger than 2 TB. (I am leaning towards thinking that the bug is in EXT4 where the additional drives are larger than 2 TB.) This bug does not seem to affect the main drive. Sda1 or sda2 drive.</p>
0non-cybersec
Stackexchange
Uber driver cancels ride, drunk passenger assaults him and gets pepper sprayed.
0non-cybersec
Reddit
/r/Croatia vs /r/Serbia.
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
Farmville request - WHAT'S MEME ?.
0non-cybersec
Reddit
ᴮʳᵘˢʰᶦᵉ ᴮʳᵘˢʰᶦᵉ FLOOF.
0non-cybersec
Reddit
[Homemade] B.A.T. protein wrap.... bacon, avocado, turkey.
0non-cybersec
Reddit
How to add sticky bit to a directory in exFAT?. <p>I get this error from <code>Homebrew</code> when trying to build an application on MacOS 10.10.5, on an exFAT filesystem</p> <pre><code>Error: parent directory is world writable but not sticky </code></pre> <p>I use this command to enable sticky-bit, but there does not seem to have any effect</p> <pre><code>$ chmod +t /Volumes/exFAT/tmp </code></pre>
0non-cybersec
Stackexchange
Mayflash Gamecube Adapter for Wii U Review [Better Than The Original].
0non-cybersec
Reddit
What happened to the boy [Part 3]. [PART 1](https://www.reddit.com/r/nosleep/comments/56iuya/is_any_of_this_normal/) [PART 2](https://www.reddit.com/r/nosleep/comments/58d70e/mother_left_the_corner_part_2/) ~Dear reader, I am the one you’ve come to know as Uncle. I have been posting the Nephew stories to you over the past month or so. What follows is what would become Nephew’s last account of his time within the domicile. The boy was too kind for the world he was brought up in. Kindness leads to destruction in a place like this, as I know too well myself. I hope this last piece of the story brings peace of mind and understanding.~ It has been so long since I last reached out to you in your other world. Uncle returned immediately after I finished my last message but he would not look at me. His eyes remained fixated on the thing in the corner. I tried to ask him about it but he wouldn’t listen. A profound sadness welled up in his eyes as he stared. After a short while he reached out towards me with his hand, imploring me to share my note with him. I did and he took his leave. I have not seen Uncle since. I want to believe he’ll return but I can’t be certain. Everyone has left now. I almost thought Father would never leave me. My constant captor. But he did. First Mother, then Father, now Uncle. All there is left is me and the thing in the corner. Although I don’t think I could call it that anymore, it has grown to fill the domicile almost entirely. It is everywhere, on the ceiling, across the floor, over the window. The only place it isn’t is Father Corner, where I sit wedged in the spot where Father once vigilantly watched over me. I can’t know for sure where Father went. He just disappeared one day. I woke up and he was gone. That was the moment the whole situation sunk in. I may have been living with a faceless, writhing creature slowly oozing out of the corner that Mother once stood in but at least I wasn’t facing it alone. The true horror lies in the loneliness. Although Father frightened me at the best of times I always believed he would protect me from the thing. He may not have been able to see it but I believed his presence was enough to keep it at bay. Maybe I was right, but now I’ll never know. I believe that seven days have past since I last saw the face of Father. I hold no hope of seeing him again. As for Uncle, the thing is stretched across the window where he once stood. I once thought I saw his silhouette peering through the thing’s fleshy mass of veins and cartilage but I can’t know for sure. He too has abandoned me. I write this note not for his sake but for my own. I don’t expect him to find it once this is all over and I don’t expect anyone to read it. I am only keeping up this charade in order to stop myself from looking directly into the thing that now surrounds me at every side. For if I did I would surely go mad. To write is to keep my mind active, to keep my eyes away from the thing that even now I can hear pleading with me to look in its direction. It’s speaking to me, but not quite. There are no spoken words, only pulses of thoughts. It’s in my head, whispering to me slowly and rhythmically so that I look at it. I don’t want to, but I will eventually. I know it. I’ll try to fight it as best I can for now but It won’t be long I’m sure. Mother is gone, Father and Uncle were close behind. Nobody is coming to save me from this thing. I’ll either die writing in this corner or do as it wants. Then I’ll probably die anyway, or worse. I can see it peripherally, bending about the room with its limbs broken around every corner. I dare not look into its core. That bloated centre mass in the corner hanging like a mutated shadow of the woman who once stood there. How could she leave me? Did she ever even love me? I’m her son. The thing in the corner is shifting, those mangled branches inching ever closer to where I sit and write this note. The only way I can truly describe it is to call it wrong. A thing that belongs neither in this world or the other. I dare not wonder what lies beneath its bubbling and twitching skin. When I think of it I imagine the ways in which it could take me. At any moment one of those horrible extremities could reach down from anywhere and snatch me up. But it hasn’t. I’m not certain why, possibly because it likes taunting me with its disfigured shape. Playing with me. Maybe I could peek at the thing very quickly. So fast that it won’t even notice I was ever looking. Yes, I think that might work. I’ll look and immediately look back to the page to jot down what I see. This will work. It cannot know I looked. But I will. I looked. I remember the day I was brought here. I remember my birth. The thing told me. As soon as I looked, I knew. The thing has a name, one I cannot write. It is too long and too old, but I know that the thing is not just a thing. It is no more a thing than you or I could be considered a thing. It has consciousness, a mind, a capacity for complex thought, a family, a lineage, a home, a domicile, a name. It was January 8th. The moon was indeed pale but I was not born under it. It was visible through the window. The window where nobody stood, no Uncle. This domicile was different, it was wholly white and clean. The creatures around me were not shrouded in shadow, they were in the light, staring down at me with happy faces. Except for Mother. Mother was there in the shadows under every bed, behind every door and in every corner. The thing with a name was there too. I remember it as a happy place. I know that changed once I left. Once Mother stepped forward to carry me across the fields and into the domicile. Mother and the thing with a name robbed the place of its happiness, they robbed it of me. Mother took me back to the domicile where I now sit and write this note. I do not know how different my life would have been if the happy people had kept me in their bright, beautiful domicile, but something about the memory of that place feels right. It feels like home. Father didn’t know about Mother’s plan to take me, to raise me in the domicile. When Mother entered with me in her arms he initially tried to return me to the happy people. That's when the thing with a name made itself known, he knew he couldn’t fight it. So he made the decision to keep me, for that is what Mother wanted, or what the thing with a name made her want. He decided to raise a son he knew was not his own, a son who was not even from his own world. He was forced to serve the thing with a name. The thing that has had many names over its long life. The thing I knew as Mother. Mother didn’t leave the domicile, she only turned her back to it. She’s still here. Behind the thing with a name that grew inside her for so many years. The thing that told her to take me from the loving arms of the happy people. The thing that Father tried to protect me from, the thing that stole him away into the contorted lump of flesh it calls a body. The thing that scared Uncle so much that he fled, abandoned me to the mercy of this thing. This thing that has a name. I must go to it now. I saw into the eye of the thing and it showed me my past, but it also showed me my future. In it I join Mother and Father inside the thing. So that is what I must do. I don’t expect Uncle to ever return to the domicile, so my tale will go untold. But if he should, I’d like him to know that I understand why he did it. His cowardice has spared his life. In exchange for mine. I forgive you Uncle. And to you my friend from another world, I expect you are worried for me but you should not be. The thing with a name knows all and this is the way it should be, the way it has always been. Maybe we will meet one day, when the thing with a name comes to you. Until that day, I wish you the best. Now I must join my family. ~This is where the boy’s note ends. I retrieved it from what was left of the domicile. I am deeply sorry. Sincerely, The one you know as Uncle.~
0non-cybersec
Reddit
Recovering broken Ubuntu installation. <p>I have not updated Ubuntu for quite some time and then I went from version 15.04 to 16.04 (which succeeded) and then immediately I tried to go to 16.10. This however failed mid-upgrade and the installation got corrupted (I can "log in" but do nothing, recovery mode does not work).</p> <p>Using USB boot, I managed to get to the filesystem with the intention to recover my date, however I encountered the problem that some of them are apparently protected and I do not have the rights to do basically anything with them. Is there a way to:</p> <p>1) Copy them using live USB to a backup, so that I can simply format the partition and reinstall the system? Of course I do remember the login/password to the previous installation?</p> <p>2) Install Ubuntu over the previous one without formatting, thus preserving the old data and be able to access them (even though they originate from a previous instance)?</p> <p>Also please bear in mind that I am just a regular user with regards to Ubuntu, so any instruction will have to be probably fairly specific:)</p>
0non-cybersec
Stackexchange
Emancipator - Lionheart [DnB Remix - Live at Red Rocks] (2017).
0non-cybersec
Reddit
Our cat (previously named Pickle) has formally requested a name change to “Baron Pickle von Murder Mittens the First”. So shall he be known....
0non-cybersec
Reddit
Bernie Sanders now leads Hillary Clinton by 14 points in New Hampshire.
0non-cybersec
Reddit
How to use takeWhile with an Iterator in Scala. <p>I have a Iterator of elements and I want to consume them until a condition is met in the next element, like:</p> <pre><code>val it = List(1,1,1,1,2,2,2).iterator val res1 = it.takeWhile( _ == 1).toList val res2 = it.takeWhile(_ == 2).toList </code></pre> <p><code>res1</code> gives an expected <code>List(1,1,1,1)</code> but <code>res2</code> returns <code>List(2,2)</code> because iterator had to check the element in position 4. </p> <p>I know that the list will be ordered so there is no point in traversing the whole list like <code>partition</code> does. I like to finish as soon as the condition is not met. Is there any clever way to do this with Iterators? I can not do a <code>toList</code> to the iterator because it comes from a very big file.</p>
0non-cybersec
Stackexchange
Love is Rewatch! The Series Finale for the Kaguya-Sama: Love is War Rewatch - EPISODE 12 DISCUSSION. &#x200B; https://preview.redd.it/djtuhosukur41.jpg?width=1242&format=pjpg&auto=webp&s=54c7796265a8090859f2bd189d43b138538e5507 # [12 - I Can’t Hear the Fireworks Part 2, Kaguya Doesn’t Want to Avoid Him](https://imgur.com/8pgvlYF) [<< Previous Episode](https://www.reddit.com/r/anime/comments/fxdrcp/love_is_rewatch_a_rewatch_for_kaguyasama_love_is/?utm_source=share&utm_medium=ios_app&utm_name=iossmf) | [Index Thread](https://www.reddit.com/r/anime/comments/fql4ej/kaguyasama_love_is_rewatch_24_hour_reminder_and/?utm_source=share&utm_medium=ios_app&utm_name=iossmf) | [Overall Series Discussion >>](https://www.reddit.com/r/anime/comments/fynl9i/love_is_rewatch_a_rewatch_for_kaguyasama_love_is/) **Show Information:** [MAL](https://myanimelist.net/anime/37999/Kaguya-sama_wa_Kokurasetai__Tensai-tachi_no_Renai_Zunousen) | [ANN](https://www.animenewsnetwork.com/encyclopedia/anime.php?id=21401) | [AniDB](https://anidb.net/anime/14111) | [AniList](https://anilist.co/anime/101921/Kaguyasama-wa-Kokurasetai-Tensaitachi-no-Renai-Zunousen) **Subreddit:** r/Kaguya_sama **Discord:** [Invite Link](https://discordapp.com/invite/skEjP4u) &#x200B; https://preview.redd.it/w4c0bqyhjur41.jpg?width=1242&format=pjpg&auto=webp&s=8fea7ef5577c3808cfbb0312cd4bab8d604a9b58 u/Regular_N-Gon for his great comment and and question about one of the episode title >Hayasaka continues to be fantastic. I kinda feel bad for her, but she must get paid a lot to deal with Kaguya's insanity. And, by the end of the episode, it's clear she does care at least a little for Kaguya despite the amount of work she is. [Read the rest of the comment here!](https://www.reddit.com/r/anime/comments/fxdrcp/love_is_rewatch_a_rewatch_for_kaguyasama_love_is/fmtqsdu/?utm_source=share&utm_medium=ios_app&utm_name=iossmf) &#x200B; u/NicDwolfwood for his thoughts and reaction to yesterday’s episode >Kaguya being terrible with tech is hilarious, she barely knew what Twitter is lol and how it works. Hayasaka puts up with alot dealing with Kaguya, she couldn't even enjoy her bath in peace. [Read the rest of the comment here!](https://www.reddit.com/r/anime/comments/fxdrcp/love_is_rewatch_a_rewatch_for_kaguyasama_love_is/fmtskod/?utm_source=share&utm_medium=ios_app&utm_name=iossmf) &#x200B; https://preview.redd.it/xeidrqvljur41.jpg?width=1242&format=pjpg&auto=webp&s=0ab99754d04f7b0486eb0b3bc7af00e00a3711e2 **QUESTIONS:** **1.** **Do you perceive the things Shirogane said as cool or cringe?** **2. What about that ED though?** **3. Not a question, but I’d like to get an estimate on how many people were in the rewatch. People who commented on threads and people who followed along too. Please do the poll:** [**https://www.strawpoll.me/19735930**](https://www.strawpoll.me/19735930) &#x200B; [Hanabi?](https://preview.redd.it/gx0qffqnjur41.jpg?width=1242&format=pjpg&auto=webp&s=40c8431b94425592b63a58195c7ccfe297dab733) [Source: https:\/\/imgur.com\/8pgvlYF](https://preview.redd.it/kxby5sdyjur41.jpg?width=600&format=pjpg&auto=webp&s=5e2c0108b77e23a0edd3c9f40b6fc7874560adee) &#x200B; https://preview.redd.it/hbrxtqj2kur41.jpg?width=1242&format=pjpg&auto=webp&s=4914c3a479e56cb8ca165cf6893192f9c7e370d5 **NEWS** **Two days until Season 2 releases!** [Source: Official Art by Character Designer, Yūko Yahiro. Check out her twitter!](https://preview.redd.it/xh4xor6dkur41.jpg?width=1919&format=pjpg&auto=webp&s=bb32695bc9256a2edf0893af8a2aa934a02d0fc8) &#x200B; **Rewatchers, please be mindful of first-timers reading these threads. If discussing any future events or anything, please mark them as spoilers. Thank You!**
0non-cybersec
Reddit
[WP] After death, you become a poltergeist. A smarmy, smug rich family in the suburbs catches your eye. At best, you inconvenience them; at worst, you terrorize them..
0non-cybersec
Reddit
Ubuntu server 12.04 having 7GB disk usage discrepancy. <p>I did a fresh install of ubuntu server 12.04 as a KVM virtual guest. I used a kickstart file to automate the installation, I've included the command to create the guest as well as the partitioning section of the kickstart file. These numbers were taken right after a fresh installation the only main service that is running is an ssh server. There is 7GB of disk usage that I can't account for. </p> <p><strong>Kickstart partitioning section</strong></p> <pre><code>part /boot --fstype ext4 --size 200 part / --fstype ext4 --size 1 --grow </code></pre> <p><strong>KVM installation command</strong></p> <pre><code>virt-install -n bigtest -r 4096 --disk path=/var/lib/libvirt/images/bigtest.img,bus=virtio,size=500 \ -c ubuntu-12.04.1-server-amd64.iso --accelerate --network=bridge:br0 --connect=qemu:///system \ --vnc --noautoconsole -v --os-type linux </code></pre> <p><strong>disk usage</strong></p> <p>Running df and du reports different disk usages, which I understand can happen. The difference though of 8G vs 512M is about 7G. </p> <pre><code>root@ubuntu:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda5 500G 8.0G 467G 2% / udev 2.0G 4.0K 2.0G 1% /dev tmpfs 792M 220K 791M 1% /run none 5.0M 0 5.0M 0% /run/lock none 2.0G 0 2.0G 0% /run/shm /dev/vda1 188M 34M 146M 19% /boot root@ubuntu:~# du -hs / 512M / </code></pre> <p><strong>Small Guest Test</strong></p> <p>In the guest called bigtest the virtual disk was 500GB. When I create another guest called smalltest with a virtual disk of size 10GB, the numbers for df and du are 764M and 512M.</p> <p><strong>KVM host reports</strong></p> <p>Now if we look at the size of the kvm image files on the host file system we get another interesting story.</p> <pre><code>root@vbox1:/var/lib/libvirt/images# du -hs * 753M bigtest.img 744M smalltest.img </code></pre> <p><strong>Reserved filesystem blocks</strong></p> <p>Just to rule out other stuff as much as possible all these numbers were taken after I set the reserved blocks percentage to 0%.</p> <pre><code>root@ubuntu:~# tune2fs -m 0 /dev/vda5 tune2fs 1.42 (29-Nov-2011) Setting reserved blocks percentage to 0% (0 blocks) </code></pre> <p><strong>The Question</strong></p> <p>What is taking up this 7GB of physical space. If it is used why isn't that being reflected in the host file system disk usage. </p> <p><strong>UPDATE 1</strong></p> <p>I discovered something very interesting. If you I run the following commands and reboot the new numbers for df and du are 1.1G and 875M! which are within normal expectations.</p> <pre><code>apt-get update apt-get upgrade apt-get dist-upgrade </code></pre> <p>Here are a few observations I made about this:</p> <ol> <li>After a fresh install I tried rebooting many times it didn't change the 8GB usage</li> <li>running apt-get update and upgrade don't reduce the disk usage, even with reboots.</li> <li>only when the kernel is updated with apt-get dist-upgrade, and even then only after the system has rebooted with the new kernel will the usage drop back to normal levels.</li> </ol> <p><strong>UPDATE 2</strong></p> <p>I've tested this independently in virtualbox and this same exact behaviour happens. So this issue is related to Ubuntu Server and not anything specifically related to KVM or virtualbox.</p> <p><strong>UPDATE 3</strong></p> <p>Some additional commands run on the machine as suggested in an answer below.</p> <pre><code>root@ubuntu:/# du --apparent-size -sh --exclude=/proc / 963M / </code></pre> <p>using ncdu</p> <pre><code>ncdu 1.8 ~ Use the arrow keys to navigate, press ? for help --- / ---------------------------------------------------------------- 230.6MiB [##########] /usr 202.4MiB [######## ] /lib 193.0MiB [######## ] /var 23.7MiB [# ] /boot 8.6MiB [ ] /bin 6.7MiB [ ] /sbin 4.9MiB [ ] /etc 220.0KiB [ ] /run 28.0KiB [ ] /root 20.0KiB [ ] /opt e 16.0KiB [ ] /lost+found 8.0KiB [ ] /media 4.0KiB [ ] /dev 4.0KiB [ ] /lib64 e 4.0KiB [ ] /tmp e 4.0KiB [ ] /srv e 4.0KiB [ ] /selinux e 4.0KiB [ ] /mnt e 4.0KiB [ ] /home 0.0 B [ ] /proc 0.0 B [ ] /sys @ 0.0 B [ ] initrd.img @ 0.0 B [ ] vmlinuz Total disk usage: 670.2MiB Apparent size: 128.0TiB Items: 54464 </code></pre> <p>The Linux kernel versions before and after the dist-upgrade are as follows:</p> <pre><code>Linux ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 Linux ubuntu 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 </code></pre>
0non-cybersec
Stackexchange
Locking down external drive reads in a permanent fashion on Linux?. <p>Is there any way to alter the way a Linux distribution handles external drives to only allow read-only unless additional credentials are provided, or at least permanently disable it?</p> <p>Basically need it such that if someone plugs a drive into a system with sensitive data, they cannot copy anything off, even with admin rights. </p> <p>I'm working with Ubuntu 16.04 specifically, and ideally I'd need to do a bunch of setup on the system before disabling this functionality, so I'm not sure if say, modifying and recompiling the OS is possible. Ideally this needs to be a fairly difficult thing to overcome on the machine. </p>
0non-cybersec
Stackexchange
Failed to load unity-gtk-module. <p>I have some issues with unity GTK on CentOS Linux release 7.4.1708 (Core) with Gnome 3.</p> <pre><code>$ emacs Gtk-Message: Failed to load module "unity-gtk-module" Gtk-Message: Failed to load module "unity-gtk-module" $ evince Gtk-Message: Failed to load module "unity-gtk-module" Gtk-Message: Failed to load module "unity-gtk-module" </code></pre> <p>I tried installing gtk2-engines packages but it did not fix it.</p> <pre><code>$ sudo yum install gtk2-engines* Package gtk2-engines-2.20.2-7.el7.x86_64 already installed and latest version Package gtk2-engines-devel-2.20.2-7.el7.x86_64 already installed and latest version </code></pre> <p>and reinstalling them:</p> <pre><code>$ sudo yum reinstall gtk2-engines* [sudo] password for klaus: [...] Resolving Dependencies --&gt; Running transaction check ---&gt; Package gtk2-engines.x86_64 0:2.20.2-7.el7 will be reinstalled ---&gt; Package gtk2-engines-devel.x86_64 0:2.20.2-7.el7 will be reinstalled --&gt; Finished Dependency Resolution Dependencies ====================================================================== Package Arch Version Repository Size ====================================================================== Reinstalling: gtk2-engines x86_64 2.20.2-7.el7 epel 301 k gtk2-engines-devel x86_64 2.20.2-7.el7 epel 17 k Transaction Summary ====================================================================== Reinstall 2 Packages Total download size: 318 k Installed size: 1.2 M Is this ok [y/d/N]: y Downloading packages: (1/2): gtk2-engines-2.20.2-7.el7.x86_64.rpm | 301 kB 00:00:00 (2/2): gtk2-engines-devel-2.20.2-7.el7.x86_64.rpm | 17 kB 00:00:00 ---------------------------------------------------------------------- Total 2.7 MB/s | 318 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : gtk2-engines-2.20.2-7.el7.x86_64 1/2 Installing : gtk2-engines-devel-2.20.2-7.el7.x86_64 2/2 Verifying : gtk2-engines-2.20.2-7.el7.x86_64 1/2 Verifying : gtk2-engines-devel-2.20.2-7.el7.x86_64 2/2 Installed: gtk2-engines.x86_64 0:2.20.2-7.el7 gtk2-engines-devel.x86_64 0:2.20.2-7.el7 Complete! </code></pre> <p>... but I still have the error</p>
0non-cybersec
Stackexchange
How to C (as of 2016).
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
I just got 98/100 for my essay at uni!!!!. Just really wanted to get it out there! Hope you're all having a great day :) E: Turns out it was the highest in the class!!!
0non-cybersec
Reddit
[WP] A lot of kids have imaginary friends growing up. Yours showed up for three months when you were six, a benevolent companion you played hide and seek with that summer. But now, years later yours has returned, decidedly less friendly. The reason behind its reappearance is terrifying....
0non-cybersec
Reddit
Foilum map module, trying to get more options for marker colors. <p>I am playing with Folium a lot right now and its really great to have something so easy to use in Python. But their documentation is seriously behind, which I understand. So I have 2 questions.</p> <ol> <li>What am I doing wrong in how I am trying to get more marker colors? Here is what I have tried:</li> </ol> <p><code>map.simple_marker(each_coord, popup=v[0], marker_color='#FFFF00')</code> <code>map.simple_marker(each_coord, popup=v[0], marker_color='yellow')</code> <code>map.simple_marker(each_coord, popup=v[0], marker_color='Yellow')</code></p> <p>They should all make the marker yellow, instead it stays default red. The only colors I can actually change to are red, green, and purple. In an example from the folium documentation it looks like we should be able to use html color codes:</p> <pre><code>folium.CircleMarker([45.5215, -122.6261], radius=500, popup='Laurelhurst Park', color='#3186cc', fill_color='#3186cc', ).add_to(map_2) </code></pre> <p>But it doesn't work for me. Hope someone knows a way around this because I need at least 12 different colors for my project.</p> <ol start="2"> <li>The way I am adding markers seems to be deprecated. It works, but I always get this warning: <code>FutureWarning: simple_marker is deprecated. Use add_children(Marker) instead</code> which I think might be related to why I can't get the colors to work. But their is nothing in any of the documentation or open discussions about how to use <code>add_children</code> Maybe someone with knowledge can clarify?</li> </ol> <p>Thanks</p>
0non-cybersec
Stackexchange
What are some recipes/foods that doesn't become disgusting after 5 ~ 11 hours?. I'm looking to bring my own lunch/dinner to school now due to buying food costs $12 everyday. However , my biggest concern is coming up with a meal/recipe that won't become disgusting or not edible after certain hours. Usually I would take out the food at 7:30AM with me and I will be at school until usually 8:00PM. around 10:30AM I usually eat almond or cheese string , at 1:00PM I grab lunch , then at 6:00PM I eat dinner. So , if I were to pack my lunch/dinner , it would be consumed after 5 ~ 11 hours , but is it safe to eat foods that has been out for that long at room temperature(I have a locker where I can store them)? We also have microwaves/hot water at school , so if these can of any use to improvise any recipes that would be appreciated as well. Thank you in advance.
0non-cybersec
Reddit