text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
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
Ceramic Barnaby Barford boners..
0non-cybersec
Reddit
Prove that $X^2$ and $Y^2$ are independent if $X$ and $Y$ are independent - am I right?. <p>$X$ and $Y$ are independent r.v's. </p> <p>I want to prove that $X^2$ and $Y^2$ are also independent. Here's my reasoning:</p> <p>$P(X=x)=P(X=x|Y=y)=&gt;P(X=x)=P(X=x|Y=y^2)=&gt;P(X=x^2)=P(X=x^2|Y=y^2)$ </p>
0non-cybersec
Stackexchange
Taking a Tram Tour at the San Diego Zoo Safari Park while a Gran'dad. While taking the [Tram Tour](http://sdzsafaripark.org/safaritickets/africa_tram_safari.html) around the Africa enclosure at the Safari Park we passed a group of Wildebeest. I turned to my wife and said "I don't remember this group of Wildebeest, they must be Gnu."
0non-cybersec
Reddit
Mr Oizo - Flat beat [Electro House].
0non-cybersec
Reddit
Why limit commands and events to one aggregate? CQRS + ES + DDD. <p>Please explain why modifying many aggregates at the same time is a bad idea when doing CQRS, ES and DDD. Is there any situations where it still could be ok?</p> <p>Take for example a command such as PurgeAllCompletedTodos. I want this command to lead to one event that update the state of each completed Todo-aggregate by setting IsActive to false.</p> <p>Why is this not good?</p> <p>One reason I could think of:</p> <p>When updating the domain state it's probably good to limit the transaction to a well defined part of the entire state so that only this part need to be write locked during the update. Doing so would allow many writes on different aggregates in parallell which could boost performance in some extremely heavy scenarios.</p>
0non-cybersec
Stackexchange
Biiiiiiiitch.
0non-cybersec
Reddit
ERR_SSL_PROTOCOL_ERROR in Chrome but not Edge. <p>I temporarily changed the DNS pointer to a website and then changed it back. Since doing this the link no longer works in Chrome on my computer. It does work on another computer at this location. The link also works in Edge on my computer.</p> <p>I have tried clearing the browsing history in Chrome. I have also tried <a href="https://superuser.com/questions/1077503/chrome-err-ssl-protocol-error-on-known-working-site">chrome://net-internals/#dns and ipconfig /flushdns</a></p>
0non-cybersec
Stackexchange
How do I do a group count on two fields, to summarise colour and size choices?. <p>I have a spreadsheet where each row is a person's choice of colour and size of a T-Shirt. It looks something like this:</p> <pre><code>β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Large β”‚ Red β”‚ β”‚ Small β”‚ Blue β”‚ β”‚ Medium β”‚ Red β”‚ β”‚ Small β”‚ Red β”‚ β”‚ Medium β”‚ Red β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜ </code></pre> <p>I'd like to be able to summarise that in a form I can give to a supplier, ideally like this:</p> <pre><code>β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β” β”‚ Large β”‚ Red β”‚ 1 β”‚ β”‚ Medium β”‚ Red β”‚ 2 β”‚ β”‚ Small β”‚ Blue β”‚ 1 β”‚ β”‚ Small β”‚ Red β”‚ 1 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”˜ </code></pre> <p>How can I do this?</p>
0non-cybersec
Stackexchange
[META] Want to watch Netflix no matter where you are (with region switching)? Here's a cool new smart DNS service doing just that. First 14 days are FREE with NO Credit Card required. I hope you guys like it, cause it was a lot of work! :).
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
Harry Squatter & The 300kg/661lbs Backsquat.
0non-cybersec
Reddit
Appending data to file with a single open/close from a shell script. <p>I need to adjust my shell script and write to <code>$log</code> multiple times. Opening and closing the file repeatedly will cause an increase in runtime. </p> <p>How can I write everything at once to the file, including all <code>echo</code> statements defined in my script?</p> <pre><code>#!/bin/sh log="loadlog.log" for i in {1..10} do n=$((100*$i)) echo "## Users=$i requests=$n ##" &gt;&gt; $log ab -n $n -c $i http://mainserver.com/index.html &gt;&gt; $log ssh root@mainserver cat /proc/loadavg &gt;&gt; $log echo "======" &gt;&gt; $log done </code></pre>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
1920x1080 Scrolling. <p>This is about to drive me up the wall. After an update last week my Ubuntu 12.10 machine has a scrolling screen when I switch it to 1920x1080 (16:9). I can't seem to find anyone who has the same problem. Does anyone have an idea what is going on?</p>
0non-cybersec
Stackexchange
[News] "Toaru Kagaku no Railgun S" Confirmed for Spring 2013 ~ Premiere in April, OP: fripSide.
0non-cybersec
Reddit
OLIVER SPENCER - SS19 Lookbook.
0non-cybersec
Reddit
How to setup a vue-cli with vuetify project to run with IE 11?. <p>I spend a few days to setup a <strong>vue.js + vue-cli + typescript + vuetify</strong> project to run with IE 11 without success? </p> <p>I found many posts on the net that explain how it should be done but without success. I tried to combine in almost all the ways possible the setup explained below without success, endind with many different errors up to a blank page</p> <p>The application runs fine wit Chrome or FF</p> <p><strong>If someone has such an application running in IE 11 it would be greatly appreciated</strong></p> <p><strong>Context</strong> (all the latest versions):</p> <ul> <li>vue-cli</li> <li>typescript</li> <li>vue.js + vue-router + vuex + vuex-persistedstate</li> <li>vuetify + vue-i18n + vuelidate </li> <li>axios</li> </ul> <p>Pardon me if some question seems stupid as I'm quite a newbie on babel/webpack dev..</p> <p><strong>What I've tried and questions</strong> : (i've tried almost all the combinations the following)</p> <ul> <li>Should I use <code>npm install babel-polyfill --save</code>as explained in the <a href="https://vuetifyjs.com/en/getting-started/quick-start" rel="noreferrer">vuetify setup for IE 11 here</a>?</li> <li>Should I add<code>import 'babel-polyfill'</code>in<code>main.ts</code>as explained in the <a href="https://vuetifyjs.com/en/getting-started/quick-start" rel="noreferrer">vuetify setup for IE 11 here</a>?</li> <li>Or should I add<code>import '@babel/polyfill'</code>in<code>main.ts</code><a href="https://stackoverflow.com/questions/53420392/vue-cli-3-vuetify-not-working-on-ie-11-babel-does-not-transpile">as explained here </a></li> <li>Should I use <code>npm install @babel/preset-env --save-dev</code>as explained in the <a href="https://vuetifyjs.com/en/getting-started/quick-start" rel="noreferrer">vuetify setup for IE 11 here</a> or is it unnecessary due to<code>vue-cli</code> being used?</li> <li><p>in<code>babel.config.js</code>, should I replace the content initially created by vue-cli </p> <pre><code>presets: [ '@vue/app' ] </code></pre> <p>by <a href="https://stackoverflow.com/questions/53420392/vue-cli-3-vuetify-not-working-on-ie-11-babel-does-not-transpile">as explained here </a> </p> <pre><code>presets: ['@babel/preset-env'] </code></pre> <p>or (as seen in many places)?</p> <pre><code>presets: [['@vue/app', useBuiltIns: 'entry' }]] </code></pre> <p>or add the 2 presets?</p> <pre><code>presets: [ ['@babel/preset-env'], ['@vue/app', useBuiltIns: 'entry' }] ] </code></pre> <p>Should I add some plugins like <a href="https://stackoverflow.com/questions/53885552/how-to-make-a-vuejs-application-work-with-ie-11-when-using-feathersjs/53908771#53908771">explained here</a>?</p> <pre><code>presets: ['@vue/app'], plugins: ['@babel/transform-modules-commonjs'] </code></pre> <p>Or change it like this <a href="https://cli.vuejs.org/guide/browser-compatibility.html" rel="noreferrer">as explained in the vue doc here</a>?</p> <pre><code>presets: [ ['@vue/app', { polyfills: [ 'es6.promise', 'es6.symbol' ] }] ] </code></pre></li> <li><p>in<code>vue.config.js</code>, should I add?</p> <pre><code>transpileDependencies: [ 'vuetify', 'vue-i18n', 'vuelidate', 'axios' ] </code></pre></li> </ul> <p><strong>[SOLUTION 2019-06-25]</strong><br> We finally got it to work, the answer from @blackening was very helpful It happened also that we had javsacript errors in IE 11 with google<code>"reCaptcha"</code>that disappeared after the following setup:</p> <p>As a prerequisite,<code>vue-cli</code>is installed and the project is created by selecting`'Use Babel alongside TypeScript for auto-detected polyfills'</p> <p>1) install<code>core-js@3</code></p> <pre><code> npm install core-js@3 </code></pre> <p>2) edit<code>main.ts</code>like this:</p> <pre><code> import 'core-js/stable' import Vue from 'vue' import '@/plugins/vuetify' {...} </code></pre> <p>3) edit<code>babel.config.js</code></p> <pre><code> module.exports = { presets: [ ['@vue/app', { useBuiltIns: 'entry' }] ] } </code></pre> <p>And that's it !<br> Now we are fighting with IE 11 CSS, but that's a know story... As a nexample, in<code>vue</code> to apply a style only to IE, just code it like this</p> <pre><code> &lt;style scoped&gt; /* Only for IE 11, wrap div text */ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .ieMaxWidth90 { max-width: 90vw; /* 90% view width */ } } &lt;/style&gt; </code></pre>
0non-cybersec
Stackexchange
Pfizer recalls birth control pills but apeases women saying though the medication may not prevent pregnancy, they do not pose an immediate health risk..
0non-cybersec
Reddit
windows 10 on core 2 duo with 2 GB ram. <p>I am using pc with core 2 duo e7300 processor with 2 GB ram will I be able to use Windows 10(64 bit) properly on this pc or I need to increase my ram</p>
0non-cybersec
Stackexchange
Achieving FTP/SFTP without 3rd party dll with FtpWebRequest if possible in C#. <p>I am trying to achieve the ftp/sftp through FtpWebRequest class in C# but not succeeded till now.</p> <p>I dont want to use any 3rd party free or paid dll.</p> <p>credentials are like</p> <ol> <li>hostname = sftp.xyz.com</li> <li>userid = abc</li> <li>password = 123</li> </ol> <p>I am able to achieve the ftp with Ip address but unable to acheive sftp for above hostname with credentials.</p> <p>For sftp I have enabled the EnableSsl property of FtpWebRequest class to true but getting error unable to connect to remote server.</p> <p>I am able to connect with Filezilla with the same credentials and hostname but not through code.</p> <p>I observed filezilla, it changes the host name from sftp.xyz.com to sftp://sftp.xyz.com in textbox and in command line it changes the userid to [email protected]</p> <p>I have done the same in code but not succeeded for sftp.</p> <p>Please need urgent help on this. Thanks in advance.</p> <p>Below is my code so far:</p> <pre><code>private static void ProcessSFTPFile() { try { string[] fileList = null; StringBuilder result = new StringBuilder(); string uri = "ftp://sftp.xyz.com"; FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(new Uri(uri)); ftpRequest.Method = WebRequestMethods.Ftp.ListDirectoryDetails; ftpRequest.EnableSsl = true; ftpRequest.Credentials = new NetworkCredential("[email protected]", "123"); ftpRequest.UsePassive = true; ftpRequest.Timeout = System.Threading.Timeout.Infinite; //ftpRequest.AuthenticationLevel = Security.AuthenticationLevel.MutualAuthRequested; //ftpRequest.Proxy = null; ftpRequest.KeepAlive = true; ftpRequest.UseBinary = true; //Hook a callback to verify the remote certificate ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate); //ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) =&gt; true); FtpWebResponse response = (FtpWebResponse)ftpRequest.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string line = reader.ReadLine(); while (line != null) { result.Append("ftp://sftp.xyz.com" + line); result.Append("\n"); line = reader.ReadLine(); } if (result.Length != 0) { // to remove the trailing '\n' result.Remove(result.ToString().LastIndexOf('\n'), 1); // extracting the array of all ftp file paths fileList = result.ToString().Split('\n'); } } catch (Exception ex) { Console.WriteLine(ex.Message.ToString()); Console.ReadLine(); } } public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { if (certificate.Subject.Contains("CN=sftp.xyz.com")) { return true; } else { return false; } } </code></pre>
0non-cybersec
Stackexchange
Prove that $X_n=\frac{1}{n}$ is not a contractive sequence.. <p>So I was trying to prove this using a contradiction. I started by stating the definition of contractive which is that there exist r in (0,1) such that for all n in N, |$X_{n+2}$-$X_{n+1}$|$\leq$ r|$X_{n+1}$-$X_n$|. But I'm not really sure where to go from there. Any ideas?</p>
0non-cybersec
Stackexchange
Reimann sum and summation - Khan Academy. <p>From <a href="https://www.khanacademy.org/math/calculus-1/cs1-integrals/cs1-riemann-sums-in-summation-notation/a/riemann-sums-with-summation-notation" rel="nofollow noreferrer">Khan Academy</a>, we want to approximate the area in the interval $[1,7]$ using a right Riemann sum with $9$ equal subdivisions. Only 1 answer is correct:</p> <p><a href="https://i.stack.imgur.com/0To6Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0To6Z.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/0wd0W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0wd0W.png" alt="enter image description here"></a></p> <p>My question is, equation $y = \frac5x + 2$ is already given and we can use right Reimann sum and add the areas of different rectangles each of $\frac{7-1}{9} = \frac23$ width. We only need 3 things: $x, \Delta x, y$ and we got all of them, then from where this 2nd equation (the answer with strange interval of $[1,9]$) came up ? Does some 3rd equation exist too with another strange interval $[2,10]$ e.g. ?</p> <p>Let me be clear:</p> <p>$$y = \frac 5x + 2, \Delta x = \frac23$$</p> <p>Hence the $9$ intervals are:</p> <p>$$[1,\frac53], [\frac53, \frac73], [\frac73, 3], [3, \frac{11}{3}], [\frac{11}{3}, \frac{13}{3}] $$ $$ [\frac{13}{3}, 5], [5, \frac{17}{3}], [\frac{17}{3}], \frac{19}{3}], [\frac{19}{3}, 7]$$</p> <p>Now we can calculate right Reimann sum using right-end values of each interval for $y$ is already given:</p> <p>$$ y(\frac53) = \frac{5}{\frac{5}{3}} + 2 \iff 3 + 2 \iff 5 $$</p> <p>Similarly we can calculate all and add them.</p> <p>$$ y(\frac73) = \frac{29}{7}, y(3) = \frac{11}{3}, y(\frac{11}{3}) = \frac{37}{11}, y(\frac{13}{3}) = \frac{41}{13} $$</p> <p>$$ y(5) = 3, y(\frac{17}{3}) = \frac{49}{17}, y(\frac{19}{3}) = \frac{53}{19}, y(7) = \frac{19}{7} $$</p> <p>Hence, we got the length and width of all the rectangles and we can dot he summation:</p> <p>$$Area = \frac23 (5 + \frac{29}{7} + \frac{11}{3} + \frac{37}{11} + \frac{41}{13} + 3 + \frac{49}{17} + \frac{53}{19} + \frac{19}{7}) $$</p> <p>$$ Area = 20.475 $$</p> <p>Like I said, we already have $x, \Delta x, y$ and we know how to do summation, then why we need this 2nd equation that shows up as answer ?</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
5e Starting a Viking-ish campaign this week. Thought I'd write a song for my group.. Those that know me, not many let's be honest here, know I'm a Bard at heart but first a DM. I've homebrewed like crazy and I'm doing a fantasy world D&D campaign where my players are part of a clan that becomes quite unpopular and they become exiles. I felt this song worked perfectly. As for the artwork. All can be found on deviant art or Pinterest. I do hope any find inspiration from the images or song. Cheers. https://www.youtube.com/watch?v=j7nBQIcb9FQ
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
Anybody remember this hero.
0non-cybersec
Reddit
Possible to get the V8 JavaScript engine version number in JavaScript in Chrome. <p>I see that the most <a href="https://code.google.com/p/v8/source/browse/trunk/ChangeLog">stable release</a> for V8 is 3.26.9 I'm wondering if it is possible to get this version number in JavaScript directly, or even find the version number that Chrome is using somehow. Any way to do this?</p>
0non-cybersec
Stackexchange
Why are harmonic functions called harmonic functions?. <p>Are they related to harmonic series in any way? Or something else? Wikipedia didn't help.</p>
0non-cybersec
Stackexchange
Joan River’s most controversial moments.
0non-cybersec
Reddit
In 1956 Adorno & Horkheimer sat down to write a new Communist Manifesto. Previously unpublished notes from their discussion..
0non-cybersec
Reddit
Existence of inverse limit in an arbitrary category. <p>According to Wikipedia article</p> <p><a href="http://en.wikipedia.org/wiki/Inverse_limit" rel="nofollow">http://en.wikipedia.org/wiki/Inverse_limit</a></p> <p>"Unlike for algebraic objects, the inverse limit might not exist in an arbitrary category."</p> <p>But when constructing the inverse limit of $(M_\alpha)_\alpha$ as a coherent subset of $\prod_{\alpha}M_\alpha$ and checking if it satisfies the universal property, the algebraic structure doesn't seem necessary. Is it referring to more general category where the objects are not even sets?</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
How to use customized describe function with a grouping variable to get statistics by group?. <p>I was trying to get descriptive stats for a particular variable, by a grouping variable. I wanted more percentile values in the output than the describe function gives by default.</p> <p>I tried the following code:</p> <p><code>df.groupby('city')['population'].describe([0.01,0.05,0.25,0.50,0.75,0.90,0.95,0.99])</code></p> <p>It gives an error: <code>describe() takes 1 positional argument but 2 were given</code></p>
0non-cybersec
Stackexchange
Morsi Overthrown.
0non-cybersec
Reddit
reverse proxy that caches post requests. <p>I understand that varnish caches "GET" and "HEAD" requests by default. </p> <p>My backend servers fail when I do a get request that is too long, so I made them respond to POST instead of GET. This works great, but I need a reverse proxy which can be configured to cache POST responses just like GET. </p> <p>Are there any reverse proxies that can cache these post requests?</p>
0non-cybersec
Stackexchange
why I have 2 swap paritions?. <p>I'm new in using Ubuntu, I just installed ubuntu 12.10 and everytime I start up the pc, a message tell me that </p> <blockquote> <p>the drive /dev/mapper/ubuntu-swap_1 is not ready yet or not present</p> </blockquote> <p>.</p> <p>This is my current situation:</p> <pre><code>sudo blkid /dev/sda1: UUID="fa675e68-de82-4257-8960-bb312d08e113" TYPE="ext2" /dev/sda5: UUID="NLQ7rm-qbYa-QS4y-If3b-nLaY-FHZq-Dklhr8" TYPE="LVM2_member" /dev/mapper/ubuntu-root: UUID="bf5875d5-5cdd-4b08-a16e-168f75e535e9" TYPE="ext4" /dev/mapper/cryptswap1: UUID="1acc7002-dc75-452d-b46f-034c03c00f5e" TYPE="swap" </code></pre> <p>in the <code>etc/fstab</code>:</p> <pre><code># /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # &lt;file system&gt; &lt;mount point&gt; &lt;type&gt; &lt;options&gt; &lt;dump&gt; &lt;pass&gt; /dev/mapper/ubuntu-root / ext4 errors=remount-ro 0 1 # /boot was on /dev/sda1 during installation UUID=fa675e68-de82-4257-8960-bb312d08e113 /boot ext2 defaults 0 2 /dev/mapper/ubuntu-swap_1 none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0 </code></pre> <p>in the forum there are suggestions to change the name with uuid,but in my case in fstab there are 2 swap.</p> <p>should I change it anyway?</p>
0non-cybersec
Stackexchange
Its not much, but it was a fun little project for me to attempt my first through-mortise and half-lap with hand tools..
0non-cybersec
Reddit
A question from my high school Olympiad.. <blockquote> <p>A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are <span class="math-container">$189, 320, 287, 264, x, y$</span>. Find the greatest possible value of: <span class="math-container">$x + y$</span>.</p> </blockquote> <p>By assuming the elements to be <span class="math-container">$a, b, c, d$</span> and by making <span class="math-container">$6$</span> different equations, I solved for <span class="math-container">$x+y$</span>. The result came to be <span class="math-container">$793$</span>. I am not sure if this is correct or not. Can anyone help me out?</p>
0non-cybersec
Stackexchange
How can i get list of all the orders place by user in Magento2 using rest api. <p>Iam developing react-native application and using Magento2 REST API, How can i get list of all the orders place by user. </p>
0non-cybersec
Stackexchange
Sichere Methode, Der Instantupdatapp.com Loswerden - LΓΆschen Malware Von Windows.
1cybersec
Reddit
Reflexive vs. pseudo-coherent abelian groups. <p>Recall that a module M over some ring R is <em>pseudo-coherent</em> if it admits a resolution whose terms are <em>finitely generated</em> projective R-modules. Such a module is reflexive when regarded as an object in the derived category <span class="math-container">$D(Mod_R)$</span>, i.e., <span class="math-container">$$M \to RHom(RHom(M, R), R))$$</span> is a quasi-isomorphism, where RHom denotes the derived functor of the usual homomorphisms of R-modules.</p> <p>Does the converse hold? (Maybe for nice rings, even for the integers?), i.e., are reflexive modules (where reflexivity is always understood in the derived sense) pseudo-coherent?</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
Onion Bhaji. I cooked some onion bhaji from scratch yesterday for the first time and I was impressed with how easy they were to do. However, whilst they were reasonably tasty they had nothing on the local Indian takeaway restaurants near me. Any tips on how to elevate the flavour? Roughly speaking my recipe was: Chopped onion, soak in water and then dry with paper towel. Batter was plain flour, turmeric, salt, chilli powder and baking soda. Add 100ml water to mixture. Drop heaped spoons of mixture into oil. Fry for 1 minute either side then flip. My oil was at 170C or thereabouts throughout cooking time but needed 2/3 minutes to become golden and crispy.
0non-cybersec
Reddit
How to order desktop icons by name in XFCE?. <p>I'm using Xfce 4.8 installed on Ubuntu 12.04.2 LTS and I'm wondering what's the alternative for <em>Right-click -> Order by name</em> on XFCE. Right now, when I right click on my desktop, it looks like this:</p> <p><img src="https://i.imgur.com/2bI8bGU.png" alt="right click menu on desktop in Xfce"></p> <p>As you can see, there's no option for rearranging the icons. If my assumption is correct, it can't be done directly via GUI. I saw <a href="http://forums.fedoraforum.org/archive/index.php/t-197861.html" rel="nofollow noreferrer">this</a> thread, but that doesn't really explain how to achieve the same result. Any ideas?</p>
0non-cybersec
Stackexchange
Method of creating html files question. I’m learning HTML and as far as organization of elements and the elements themselves go I understand the materials. Now I’m wondering when creating your own pages do people lay out the major elements first and then fill in the details or do people work on each division/container fully then move on to the next? Maybe it doesn’t matter but since I’m new I figured I might not be seeing a difference other than personal preference. My work is obviously basic so far so would incorporating CSS and JS make any difference to that too?
0non-cybersec
Reddit
part of the screen (Desktop) is black [Pic inside] (happens with 17.10s on Atom n270 laptops). <p>The mouse is visible on the black part, and i can drag windows from there. Print screen produces a normal pic with all the desktop as it should look like.</p> <p>I have this problem with 2 atom n270 laptops, With the first one I could "fix" it temproary by connecting an external screen, then switching to CLI (Ctrl+Alt+F1) and back to the gui (Ctrl+Alt+F7). It might be a temporary fix for the second laptop too, just didn't check it.</p> <p>It happens only in 17.10 versions (Ubuntu, Ubuntu mate, Lubuntu). Previous versions of Ubuntu are fine. Also Windows and Manjaro are fine.</p> <p>Pic of second laptop having this: <a href="https://imgur.com/b6iTmFi" rel="nofollow noreferrer">https://imgur.com/b6iTmFi</a></p> <p><img src="https://i.imgur.com/b6iTmFi.jpg" alt="enter image description here"></p> <p>Possible tags: screen, screen black, monitor, laptop, monitor and laptop, monitor display, 17.10, atom, atom n270, n270, intel atom, </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
pytest how to use both getoption and parameterize. <p>I have test which run subprocess on certain executable and test the stdout result. </p> <p>So I use </p> <pre><code>#conftest.py def pytest_addoption(parser): parser.addoption("--executable", action="store") @pytest.fixture(scope="session", autouse=True) def pass_executable(request): try: return request.config.getoption("--executable") except AttributeError: pass </code></pre> <p>So that I can use command line arg to set the pass the executable. I wish to use this as a global variable across all my tests. However, I have trouble with the tests which requires @pytest.mark.parametrize decorator. So my solution is to create a <code>test_update_path(pass_executable)</code> to update a global variable PATH, which works. </p> <pre><code># test.py PATH = 'defaultpath/app' def test_update_path(pass_executable): global PATH PATH = pass_executable print("Gloabl path is update to: ") print(PATH) def test_1(): # This will work print("Now next") print(PATH) cmd = [PATH] stdout, stderr = run_subprocess(cmd) assert stdout == 'some expected result' @pytest.mark.parametrize("args", [1, 2, 3]) def test_2(path, args): print("Now next") print(PATH) cmd = paramparser(PATH, args) stdout, stderr = run_subprocess(cmd) assert stdout == 'some expected result' if __name__ == '__main__': pytest.main() </code></pre> <p><code>pytest --executable=newpath/app -s</code> will work fine, but it is an ugly hack. More importantly, it ran a test which was not doing any actual testing. It is also problematic as the argument is not an optional. Without setting --executable. The path will be an <code>NoneType</code> rather than the original default path .</p> <p>Any suggestion please?</p> <p>Appreciated. </p>
0non-cybersec
Stackexchange
Server running but not serving. <p>I have a simple python flask server that is started by start-stop-daemon. It was running well last week, and this monday I see that it is not serving anymore (<code>curl http://localhost/mypage</code> takes forever and never returns). Last log is from friday.</p> <p>The strange thing is that <code>sudo service myService status</code> is "running" and I see that the process is indeed running (<code>ps aux | grep $(cat /var/run/myservice.pid)</code>)</p> <p>Is there a way to know what could have happened? I have no idea where to go next from here.</p>
0non-cybersec
Stackexchange
Did I screw up royally? (401k transfer to Roth IRA after I quit my job). So I had about $5k in a traditional IRA w/ Fidelity (rollover from first job) and $25k in a 401k with Wells Fargo. I quit back in April and Wells Fargo started charging fees soon thereafter, so I opted to roll it to Vanguard. When I talked to the guy on the phone, he said most people don't roll their 401ks into Roth IRAs bc of the tax hit. He said it might not be a bad idea for me since I am not working (I quit my job to go to school full time) and it would be the majority of my 2012 "income" aside from what I earned Jan-March. I assumed when it rolled into the Roth IRA, all the taxes would be taken out of it, but that didn't happen. So when I do my taxes in a couple months, what should I expect? I am really worried I'll be looking at like an $8k tax bill. I obviously don't want to spend that money from my savings since it's keeping me afloat during this year-long degree program. Thanks in advance for your help!
0non-cybersec
Reddit
XPostFacto1776 lies profusely to cop to evade a ticket. Mysteriously succeeds..
0non-cybersec
Reddit
Nothing like a book on a hot day....
0non-cybersec
Reddit
Pass a parameter from SSRS to MySQL. <p>Here is the query for the dataset:</p> <pre><code>SELECT DISTINCT CompanyId, Company FROM User_Hierarchy_Mapping WHERE UserId = @FieldManager </code></pre> <p><code>FieldManager</code> is the parameter name. It's not taking the value of the parameter. </p> <p>Please help me with the syntax to pass a parameter to a MySQL query.</p>
0non-cybersec
Stackexchange
Scripting Local Policy Perform Volume Maintenance Tasks. <p>I am working on an automated SQL 2012 install process on Windows 2012 R2 and have everything complete except for one task. My process launches secpol.msc but I am still required to drill in and manually assign access to Perform Volume Maintenance Tasks to the SQL service account. Once I close the window the process takes over and installs and configures everything else without user intervention.</p> <p>I have done extensive internet searching and the closest I have found is this article from 5 years ago by Kendra Little: <a href="http://www.littlekendra.com/2009/11/12/automating-sql-local-security-policy-rights-posh-and-ntrights/" rel="nofollow">http://www.littlekendra.com/2009/11/12/automating-sql-local-security-policy-rights-posh-and-ntrights/</a>.</p> <p>Is there a means via scripting to set Local Security Policies?</p> <p>Thank You, Scott</p>
0non-cybersec
Stackexchange
arduino powered robot vacuum virtual wall.
1cybersec
Reddit
Chase Freedom: limitations on combining cashback rewards?. I'm planning on making a large electronics purchase this holiday season and wanted to a credit card to take advantage of a period of 0% APR to pay it off. I have excellent credit and was looking into the Chase Freedom card. Here's what I know: -Earn $100 if you spend > $500 in the first 3 months - My purchase will cover this -5% cash back on rotating categories up to $1500 (this quarter is department stores) - I plan on making this purchase at Sears, which is considered a dept. store -7% cashback for shopping Sears.com via their Rewards Mall -1% on all purchases My question: is anyone aware of any limitations of stacking these rewards?
0non-cybersec
Reddit
Coheed and Cambria - Time Consumer [5:47].
0non-cybersec
Reddit
Press on!.
0non-cybersec
Reddit
File download using Paperclip. <p>I am using Rails to make a small file upload app. For file attachment I am using the wonderful Paperclip but I can't work out how to do downloads. </p> <p>How would I create a link in my show view, that is passed the file id, for instance that would allow the user to download a file on my server?</p>
0non-cybersec
Stackexchange
Luke. I was well into my senior year of high school when my mom married again. I don't remember went my parents split, so I was okay with the change. He was tall, blonde, and very talkative. He worked extremely hard to make everyone laugh whenever possible. You could say he wouldn't hurt a fly, but I didn't get to know him enough to confirm that. For the sake of this retelling, all names will be changed, my step-dad will be Luke, my mom will be Lisa, and I will call myself Penelope. After the marriage, my mother and I moved in with Luke. I was hesitant, but his three bedroom house seemed much more appealing than our cramped one bedroom apartment. It was only a couple miles farther from my school and I was promised Luke's old car everyday for school. The new house was beautiful. It was in a quiet neighborhood. The bedrooms were average size, but I didn't have enough stuff to care. Luke also owned a dog, who barked at anything that moved. After a few weeks of living there, I noticed a strange amount of doors locked. Every cupboard had a child lock on it, as well. I brought this up to Luke once, but only once. We were eating dinner and laughing at a clever joke my mom pulled on Luke. Once the laughter subsided, I turned to Luke and asked, "So, Luke, did you ever have kids?" His smile quickly left his face and a look of hate crossed his eyes. The faint smile I had slowly lowered as he stared at me. My mother conveniently broke the silence with another joke. No one would be home when I returned from school every day. I enjoyed it and would play my music as loud as I pleased. I would commonly be in my boyfriend's shirt and my panties during these times. One day, no different from the rest, I got home, unloaded my backpack, and changed. I was downstairs making a snack, playing music when I heard a strange, rhythmic tapping under the music. I turned off my music and listened. It seemed to stop, so I tried to write it off as the music, but right before I turned it back on, I heard the sound again. tap tap tap It was a muffled, metal on metal rhythm. I walked towards it and discovered it coming from the basement. *tap tap tap* I grabbed a flashlight and slowly opened the door with trembling fingers. *TAP TAP* It stopped. I shined the light down the stairs and, seeing nothing, searched for a light switch. I found it and the basement was illuminated by a single bulb, the rest burnt out. I cautiously walked down into the dimly lit room. I started hearing a faint mechanical noise once I reached the bottom of the stairs. I scanned the room and found nothing except some boxes and the washer and dryer. TAP I spun around as I heard it again under the stairs. The mechanical noise was louder here. I bent forward and reached to move the box. "Penelope? Are you down there?" My mom called for me and I ran up to speak with her. I didn't tell her what happened and I was glad for the interruption. I deemed the basement a no entry zone after that. We had been living in Luke's house for two months now. My mom was going out of town for business for a night and Luke went to a friend's house for a guy's poker night. I was left alone for most of the night. I spent most of it watching TV. At about 10 p.m. I heard what sounded like a car pulling up and ran upstairs to put on pants, thinking Luke came home early. I looked out the window from my room and saw only my second hand car in the driveway. Maybe someone had to turn around, I thought. A random sense of paranoia urged me to search the trees across from my window. A shadowed figured stood directly across from my window. As soon as my eyes met the figure a bright flash came from it. I blinked hard and the figure was gone. Shivers ran down my arms and I decided to call my boyfriend to distract myself. I was back on the couch, talking and laughing while on the phone. My nerves had just calmed by then. However, something in the window caught my eye and I turned my head towards it. I didn't see anything, but I got up for a closer look. I was four or five feet back when another flash lit up the glass. I screamed and told my boyfriend I had to call the police. I locked myself in the bathroom until they arrived. They didn't find anyone around. Luke was called to come home early and my mom was notified of the incident. I called her to let her know I was okay. She asked me if I saw the person in the window. "I think he was blonde, kinda tall." "Similar to Luke?" she replied. "Exactly like Luke." You can find [Part 2](http://www.reddit.com/r/nosleep/comments/x43xo/luke_part_2/) here.
0non-cybersec
Reddit
Script stuck writing to pipe, continues if attached to strace. <p>I have an old set of bash scripts that communicate via a named pipe, that until recently, seemed to always work fine. This is the basic setup:</p> <pre><code># Script #1 $ mkfifo myfifo $ exec 3&lt;&gt;myfifo $ yad --notification --listen &lt;&amp;3 </code></pre> <pre><code># Scripts #2 and #3 $ echo icon:name &gt;myfifo </code></pre> <p>Script #1 keeps running until yad receives a SIGTERM, and scripts #2 and #3 pass information to yad.</p> <p>Since a few days ago, I started noticing dozens of processes from scripts #2 and #3, which are sometimes getting stuck. I tried attaching one of them to strace to see what's happening, after script #1 had already finished running, but then the script just created a file named fifo, wrote to it, and exited successfully:</p> <pre><code>strace: Process 9396 attached openat(AT_FDCWD, "/run/user/1000/myfifo", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 fcntl(1, F_GETFD) = 0 fcntl(1, F_DUPFD, 10) = 10 fcntl(1, F_GETFD) = 0 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 dup2(3, 1) = 1 close(3) = 0 write(1, "icon:tabletdisconnected\n", 24) = 24 dup2(10, 1) = 1 fcntl(10, F_GETFD) = 0x1 (flags FD_CLOEXEC) close(10) = 0 ... </code></pre> <p>I have done many tests and couldn't figure out: what could be the reasons for scripts #2 and #3 to get randomly stuck, when they were supposed to just write to the named pipe and exit?</p>
0non-cybersec
Stackexchange
ELI5: The friendship paradox. I've read the [Wikipedia page](http://en.wikipedia.org/wiki/Friendship_paradox) and other articles, but I still don't understand it.
0non-cybersec
Reddit
What is your favorite set for a given exercise? First, second, third?. For pull ups, my favorite set is the second because the first one feels almost too easy, and the third one is when I begin to struggle, lol. The second one is just right because it's hard enough that there is a challenge, but it's not too hard to the point where I begin to lose explosiveness. Pull ups are my favorite exercise, btw. For every other exercise, my favorite set is the first one.
0non-cybersec
Reddit
Building Web Apps with Go.
0non-cybersec
Reddit
Cherry Blossom Panna Cotta Jelly.
0non-cybersec
Reddit
Xcode 9.0.1 Interface Builder 100% CPU opening iOS Storyboard. <p>Last night Xcode automatically updated to Version 9.0.1 (9A1004). Today, I tried to open an existing project and my iOS storyboard file gets stuck with a never ending spinner and Activity Monitor reports Interface Builder using 100% CPU. I have a second MacBook Pro that still has Xcode 9.0.0 and it opens the storyboard without any issue. I'm running macOS High Sierra on both. Anyone else seen this or know of a workaround.</p>
0non-cybersec
Stackexchange
That's Racist .
0non-cybersec
Reddit
Forgotten Watering Hole Attacks On Space Foundation and RSF Chinese.
1cybersec
Reddit
My grandma had to give up her kitten when she went to a nursing home, 7yrs ago. We got permission and he was allowed to visit. He never forgot his mom..
0non-cybersec
Reddit
Common Lisp: Why progn is a special form?. <p>Since Common Lisp's function arguments evaluate in left-to-right order, why wouldn't use an ordinary function:</p> <pre><code>(defun progn2 (&amp;rest body) (first (last body))) </code></pre> <p>instead of special form?</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
A Pokemon bucket hat. Saw this on Twitter and had to share it..
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
Phase dislocations and numerical accuracy. <p>I am solving the nonlinear Schrodinger equation (NLSE), $$A_t+iA_{xx}+i|A|^2A=0$$ where $A$ is a complex valued function, which can be written as $A=ae^{i\theta}$ for $a,\theta$ real. Now, for particular sets of initial conditions, I find that phase dislocations occur, and hence there are singularities in the frequency, $\omega=-\theta_t$. </p> <p>My question is, do phase singularities effect the accuracy of the model? Furthermore, physically, why can rapid variations in the phase occur in an equation that is derived under the WKB assumption? Does this mean the equation is not uniformly valid? </p> <p>An example will be provided below. </p> <p>I am using a split-step pseudo spectral method. My code is written in Fortran but I have found I can reproduce the results with a Matlab code I found online, which is provided below. </p> <p>The initial condition takes the form $$A=sech(x)e^{iCx^2}$$</p> <p>for $C$ a constant representing a chirp to the signal, which can lead to packet focusing due to dispersion. The evolution of the packet is shown in figure 1. <a href="https://i.stack.imgur.com/y5e1M.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y5e1M.jpg" alt="enter image description here"></a> </p> <p>Now, the phenomena in question occurs around $t=0.20$ when the amplitude $a$ goes to 0, and hence the phase is not well defined. This leads to singularities in $\omega$. A better picture of this is shown in figure 2. </p> <p><a href="https://i.stack.imgur.com/mU2yZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mU2yZ.jpg" alt="enter image description here"></a></p> <p>We see that as the amplitude goes towards 0 at the front and rear of the group, i.e. the packet splits, the phase starts to become singular. Note, I've decimated $\omega$ by a factor 10 to make my point. </p> <p>Note, the amplitude $a$ heuristically seems to vary slowly, but the phase clearly has rapid variations where the packet amplitude becomes small. Does this mean my results are no longer physically? Finally, and this is off topic, what sets the sign of $\omega$ at these singularities? </p> <p>Note, to check the numerical accuracy of the scheme I confirm the energy is conserved to one part in $10^6$. Furthermore, there exist exact solutions to the NLSE, which I confirm stay solutions for long times with the resolution and step size used. Finally, the CFL condition for linear wave speeds ($u=1$ here) is obeyed. I have played around with the resolution and time steps, and find they give the same results. </p> <p>Matlab script: </p> <pre><code> % This Matlab script file solves the nonlinear Schrodinger equation % with the first order split-step Fourier method due to Hardin and Tappert. % Andre Weideman, 1995 % N=512; %number of fourier modes dt = 0.001; %time step M=300; % number of time steps t=0:dt:M*dt-dt; L=4*pi; % size of the domain I=sqrt(-1); % J=100; h = L/N; % Space step n = [-N/2:1:N/2-1]'; % Indices x = n*h; % Grid points %---------------------------------------- % IC: Chirped sech packet u=sqrt(2)*sech(x).*exp(-I*x.^2); %---------------------------------------- U = u; % Compute initial condition; save it in U e = -4*n.*n*pi*pi/L/L; % Squares of wavenumbers. for m = 1:1:M % Start time evolution u = exp(dt*I*(abs(u).*abs(u))).*u; % Solve nonlinear part of NLS c = fftshift(fft(u)); % Take Fourier transform c = exp(dt*I*e).*c; % Advance in Fourier space u = ifft(fftshift(c)); % Return to physical space U = [U u]; end </code></pre>
0non-cybersec
Stackexchange
FLUFFY OVEN PANCAKES WITH STRAWBERRY HONEY SAUCE | recipeseating.
0non-cybersec
Reddit
TIL that Hippocrates discovered that heating his testicles to the equivalent of 116 degrees F for 45 minutes was an effective male contraceptive. Today I also learned that I belong to a species that kept track of this information for over 2,300 years..
0non-cybersec
Reddit
Andy Gipson vs. Islamic Extremists.
0non-cybersec
Reddit
If you could have your dick make any noise when you ejaculate, what would it be? nsfw.
0non-cybersec
Reddit
Scrape table from each option in drop down menu python. <p>I'm trying to scrape all the data from this website:<br> <a href="http://www.dartsdatabase.co.uk/PlayerStats.aspx?statKey=1&amp;pg=7" rel="nofollow noreferrer">http://www.dartsdatabase.co.uk/PlayerStats.aspx?statKey=1&amp;pg=7</a></p> <p>However, I do not know how to iterate through the <strong>'stat'</strong> drop-down menu. Each of these options contains a table I need to scrape. </p> <p>So far I have the following code which lists the options and values associated with each element in the drop-down list: </p> <pre><code>url = 'http://www.dartsdatabase.co.uk/PlayerStats.aspx' response = requests.get(url).text soup = BeautifulSoup(response,"lxml") drop = soup.find('select',{'name':'stat'}).findAll("option") options = [] val = [] for i in range(0,len(drop)): options.append(drop[i].text) val.append(drop[i]['value']) </code></pre> <p>Any help would be greatly appreciated!</p>
0non-cybersec
Stackexchange
Diagonal matrices are not necessarily square?. <p>I have seen it implied, in the context of singular value decomposition, that diagonal matrices are not necessarily square. Is this true? How can it be true? Can someone please explain this in more detail?</p>
0non-cybersec
Stackexchange
Retailer gives away HDMI cables, calling rivals' bluff on "HDMI scam" .
0non-cybersec
Reddit
Giant 3D printed twist container.
0non-cybersec
Reddit
Balls on Stairs. <p>Recently I realized that lost all computing skill in probability. Please take a look at the following problem.</p> <p>There are $b$ balls that are thrown one by one and bounce from top to bottom on the $n$ steps of stairs. The balls are thrown one by one with one unit of time interval when the previous ball touches the first step the next ball is thrown. Reaching the next step takes the same one unit of time. The probability that the ball miss the step is $p$. The goal is achieved when at least one ball touches the last step. </p> <blockquote> <p>What is the maximum running time of the process till the success in the worst case?</p> </blockquote> <p>I think the worst case is when we lost first $b-1$ balls on the first step, all $b-1$ balls missed the first step and the last $b$th last successfully reached the last step, therefore the worst running time is $b-1+n$.</p> <blockquote> <p>What is the probability of a success (at least one ball reached the last step)?</p> </blockquote> <p>$P(success)=1-p^b$</p> <blockquote> <p>What is the smallest number of balls should be thrown to guarante that the probability of success is at least $1 - \frac{1}{n}$.</p> </blockquote> <p>$$1-p^b \geq 1 - \frac{1}{n}$$</p> <p>$$p^b \leq \frac{1}{n}$$</p> <p>$$b \cdot \log p \leq - \log n$$</p> <p>$$b \leq - \frac{\log n}{\log p}$$</p> <p>I am not sure if I get it correct.</p> <blockquote> <p>Give an upper bound on the expected running time.</p> </blockquote> <p>Let try to use a Geometric distribution</p> <p>$$E=\sum_{i=1}^{b-1} i \cdot p^i \cdot (1-p)^n$$</p> <p>I still not sure if I get it right with expected running time</p>
0non-cybersec
Stackexchange
Irreducible component of a scheme over a dvr. <p>Let $\mathcal M$ be a (reduced) quasi-projective scheme over a dvr (of mixed caracteristics), $R$. Suppose that the generic fiber $\mathcal M_{\eta_R}$ is (nonempty) smooth and irreducible of dimension $n&gt;0$ and that the special fiber $\mathcal M_{x}$ is (nonempty) smooth of dimension $n$ also. Can one find a irreducible component $\mathcal M'\subset \mathcal M$ such that $\mathcal M'_{\eta_R}$ contains an nonempty open subscheme of $\mathcal M_{\eta_R}$ and $\mathcal M'_x$ contains also an nonempty open subscheme of $\mathcal M_x$. </p>
0non-cybersec
Stackexchange
Best Telescopes Under $250 ?. Hi, I would like to get into stargazing/observing planets/other celestial bodies and I don't know much about telescopes. What I do know is that there are a few different kinds (reflector, refractor, hybrid, etc.) but not sure what each do that are different from one another. So my question is, what is a great telescope under $250 that would suit my needs? Any input welcome! :)
0non-cybersec
Reddit
Looking for a web host that can handle Haskell. <p>I'm looking for a web host that will let me run a Haskell web application. VPS's seem attractive to me because you can run essentially anything you want. But some of the cloud hosts offer really nice scalability in terms of hard disk space and bandwidth.</p> <p>Does anyone know of a host that will let me run exotic languages like Haskell but can also seamlessly scale up the hard disk space/RAM/bandwidth/CPU available to my host?</p>
0non-cybersec
Stackexchange
Conflict: TikZ externalisation, local bounding box with empty name, forked edges and multi-line nodes in Forest. <p>What is the cause of the following conflict and how should I resolve it?</p> <p>The conflict involves a compilation error when a document includes the following elements:</p> <ul> <li>Ti<em>k</em>Z externalisation;</li> <li>a Ti<em>k</em>Z picture which uses <code>local bounding box/.expanded=\macro</code>, where <code>\macro</code> is empty;</li> <li>a Forest tree using the <code>forked edges</code> style which includes a multi-line node.</li> </ul> <p>If the tree is commented out, the <code>tikzpicture</code> is successfully externalised. If the tree is then uncommented, the code compiles as expected.</p> <p>However, if the tree is uncommented before the <code>tikzpicture</code> has been externalised, externalisation of the <code>tikzpicture</code> fails. If compilation is allowed to proceed, numerous errors including the term <code>forest</code> result.</p> <p>Is it simply expected that this will fail if <code>\macro</code> is empty? Why does it matter whether the tree is uncommented or not? Or what the style and content of that tree is?</p> <p>MNME (compile with <code>pdflatex --shell-escape</code>):</p> <pre><code>\documentclass{article} \usepackage[edges]{forest} \usetikzlibrary{external} \tikzexternalize \tikzset{% person name/.store in=\personname, person name=, } \begin{document} \begin{tikzpicture} \begin{scope}[local bounding box/.expanded=\personname] \node (-pen) [circle, minimum size=40mm] {}; \end{scope} \end{tikzpicture} \begin{forest} forked edges, for tree={ align=center, }, [Root Starts Here [Something Else [All\\Other\\Things ] ] ] \end{forest} \end{document} </code></pre> <p>Initial failure of externalisation and first couple of <code>forest</code> related errors:</p> <pre><code>==== 'mode=convert with system call': Invoking 'pdflatex -shell-escape -halt-o n-error -interaction=batchmode -jobname "prawf-figure0" "\def\tikzexternalrealj ob{prawf}\input{prawf}"' ======== This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex) \write18 enabled. entering extended mode system returned with code 256 ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e rror -interaction=batchmode -jobname "prawf-figure0" "\def\tikzexternalrealjob{ prawf}\input{prawf}"' did NOT result in a usable output file 'prawf-figure0' (e xpected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled syst em calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Er ror messages can be found in 'prawf-figure0.log'. If you continue now, I'll try to typeset the picture. See the tikz package documentation for explanation. Type H &lt;return&gt; for immediate help. ... l.16 \end{tikzpicture} ? ! Argument of \forest@referencednodename@stripafter has an extra }. &lt;inserted text&gt; \par l.29 \end{forest} ? Runaway argument? \relax \fi \if \relax \relax \fi \endcsname ! Paragraph ended before \forest@referencednodename@stripafter was complete. &lt;to be read again&gt; \par l.29 \end{forest} </code></pre> <p>&lt;... and so on ...> </p>
0non-cybersec
Stackexchange
Using @MockBean in tests forces reloading of Application Context. <p>I have several integration tests running on Spring Framework that extend the base class called <em>BaseITCase</em>.<br> Like this:</p> <pre><code>@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {AppCacheConfiguration.class, TestConfiguration.class}, loader = SpringBootContextLoader.class) @Transactional @WebMvcTest public abstract class BaseITCase{...} ... public class UserControllerTest extends BaseITCase {...} </code></pre> <p>The problem is that one of the test has several declarations of: @MockBean inside of it and the moment this test executed, Spring recreates context and the tests that follows this one sometimes use wrong beans(from the context created exactly for the test with @MockBean). I found out about that just by checking that beans have different hashcodes. </p> <p>It becomes really critical when I use @EventListener. Because listeners for wrong context(context of the test class that has already finished execution) are invoked and I have wrong beans there. </p> <p>Is there any workaround for that?</p> <p>I tried to move all @MockBean declarations to basic class and it worked fine because new context is not created. But, it makes basic class too heavy. Also, I tried to make a dirty context for this test, but then the next test fails with message that context has already been closed. </p>
0non-cybersec
Stackexchange
TIL Napoleon Bonaparte thought torture should be abolished because the information obtained from it is worthless..
0non-cybersec
Reddit
How to Reduce Values in a List in R. <p>New R learner here. I have a list of odd numbers that I produced in R. I have 1. . .23 odd. "Three" is supposed to be spelled out. I only need the rows with the values of 1-11 odd not 13-23 odd. I am unable to reduce the list to be 1-11. How can I get rid of the values that are not needed?</p> <pre><code>for (i in 0:11) { i&lt;-(i*2+1) { if (i &lt;= 11) { if (i == 3) ("three") } } print(i) } [1] 1 [1] 3 [1] 5 [1] 7 [1] 9 [1] 11 [1] 13 [1] 15 [1] 17 [1] 19 [1] 21 [1] 23 </code></pre>
0non-cybersec
Stackexchange
β€˜Good Will Hunting’ Bench in Boston Public Garden Becomes Robin Williams Memorial.
0non-cybersec
Reddit
Slow Internet Mac Yosemite Recovery Doom (MacBook Air, Early 2015). <p>Product: MacBook Air(early 2015) with OS X Yosemite.</p> <p>The issue is, that I happen to have my Yosemite reinstalled, so I restarted my MacBook and at the sound of the chime(startup sound of Yosemite), I pressed <kbd>βŒ₯ Opt</kbd>+<kbd>R</kbd> and subsequently selected the Disk Utility. Once into that, I erased my whole Macintosh HD and then restarted the computer after which I was expecting the reinstall to be done automatically.</p> <p>I am a novice in the Mac world.</p> <p>Now once after the reinstall, I was forced into a screen with 4 options of reinstalling, Disk Utility, Time Machine and help from Apple.</p> <p>I tried to reinstall, but due to a slow internet connection, I wasn't able to reinstall using Internet Recovery.</p> <p>Now I created a bootable disk with "InstallESD.dmg" (using tansmac on windows) This copy of installed is the one downloaded from macworld torrents. It was after that I restarted the computer this time pressing only the <kbd>βŒ₯ Opt</kbd> key and then all I had was this black screen with a box that asked me for the network I had.</p> <p>I selected mine in a hope it might work with my USB but it just shows an Internet Recovery option with a globe which I cannot afford due to my slow internet connection. Is there any specific key to select the bootable image because it isn't appearing there?</p>
0non-cybersec
Stackexchange
First slow cooked meal living in my new place!.
0non-cybersec
Reddit
Found a new village. I think making it into a tropical resort would be swell!.
0non-cybersec
Reddit
Author affiliations in achemso class. <p>I am trying to enter a list of authors and affiliations in a document with achemso class, but I am new to LaTeX and can't figure how for to get the right affiliation with the right person... There are 5 authors and 6 affiliations:</p> <p>Author1 (affiliation 1,2,3), Author 2 (affiliation 4,5), Author 3 (affiliation 2,6), Author 4 (affiliation 2,6), Author 5 (affiliation 1,2,3,4)</p> <p>The list is quite complex and I don't know how to include all of them properly. Any suggestions?</p>
0non-cybersec
Stackexchange
Can&#39;t disable NMI watchdog on Debian Buster in vmware context - couldn&#39;t write to kernel, unknown error 524. <p>Following <a href="https://www.pcsuggest.com/disable-nmi-watchdog-linux/" rel="nofollow noreferrer">instructions</a>, I want to disable the NMI watchdog on boot.</p> <pre><code>sudo sh -c "echo '0' &gt; /proc/sys/kernel/nmi_watchdog" </code></pre> <p>However:</p> <pre><code>Couldn't write '0' to 'kernel/nmi_watchdog': Unknown error 524 </code></pre> <p>How to proceed?</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
Why does integration of a power series introduce an $(x-a)$ and not an $x$?. <p>Given power series, say:<span class="math-container">$$f(x)= c_0+c_1(x-a)+c_2(x-a)^2+...= \sum_{n=0}^{\infty}c_n(x-a)^n $$</span></p> <p>and when we integrate it we get the following:</p> <p><span class="math-container">$$\int f(x) dx=C+c_0(x-a)+\frac{c_1(x-a)^2}{2}+.... $$</span></p> <p>My question is:</p> <p>Why do we get "<span class="math-container">$c_0(x-a)$</span>" instead of <span class="math-container">$c_0x$</span> given that we've differentiated with respect to x?</p>
0non-cybersec
Stackexchange
MacBook 15&quot; (2017) - Battery Charging Problem. <p>Since yesterday my MacBook charges really slow, so I gave <a href="https://www.coconut-flavour.com/coconutbattery/" rel="nofollow noreferrer">coconutBattery</a> a try, and it showed that my MacBook is only charging with around 14 Watts. I am charging with an Apple 86W Power Supply.</p> <p><img src="https://i.stack.imgur.com/ZVBPf.png" width="320"></p> <p>So my question is with how much Watt are batteries supposed to charge?</p>
0non-cybersec
Stackexchange