text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
How to mount the EFI system partition using Ubuntu 16.04 Live CD. <p>My Hard drive has the GRUB boot loader on there from a leftover Ubuntu installation and I want to delete it but I need to mount the EFI system partition first. So how can I mount it from the Live CD? Help appreciated, Bondy.</p>
0non-cybersec
Stackexchange
This just about sums it all up....
0non-cybersec
Reddit
How to use std::optional in C++. <p>In C++17 <code>std::optional</code> is introduced, I was happy about this decision, until I looked at the <a href="http://en.cppreference.com/w/cpp/utility/optional" rel="noreferrer">ref</a>. I know <code>Optional</code>/<code>Maybe</code> from Scala, Haskell and Java 8, where optional is a monad and follows monadic laws. This is not the case in the C++17 implementation. How am I supposed to use <code>std::optional</code>, whithout functions like <code>map</code> and <code>flatMap</code>/<code>bind</code>, whats the advantage using a <code>std::optional</code> vs for example returning <code>-1</code>, or a <code>nullptr</code> from a function if it fails to compute a result? And more important for me, why wasn't <code>std::optional</code> designed to be a monad, is there a reason?</p>
0non-cybersec
Stackexchange
Most efficient way to clamp values in an OpenCv Mat. <p>I have an OpenCv <code>Mat</code> that I'm going to use for per-pixel remapping, called <code>remap</code>, that has <code>CV_32FC2</code> elements.</p> <p>Some of these elements might be outside of the allowed range for the remap. So I need to clamp them between <code>Point2f(0, 0)</code> and <code>Point2f(w, h)</code>. What is the shortest, or most efficient, way of accomplishing this with OpenCv 2.x?</p> <p>Here's one solution:</p> <pre><code>void clamp(Mat&amp; mat, Point2f lowerBound, Point2f upperBound) { vector&lt;Mat&gt; matc; split(mat, matc); min(max(matc[0], lowerBound.x), upperBound.x, matc[0]); min(max(matc[1], lowerBound.y), upperBound.y, matc[1]); merge(matc, mat); } </code></pre> <p>But I'm not sure if it's the shortest, or if split/merge is efficient.</p>
0non-cybersec
Stackexchange
Printing p-values with &lt;0.001. <p>I wonder how to put <code>&lt;0.001</code> symbol if p-value is small than <code>0.001</code> to be used in Sweave.</p> <pre><code>ctl &lt;- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt &lt;- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group &lt;- gl(2, 10, 20, labels = c("Ctl","Trt")) weight &lt;- c(ctl, trt) lm.D9 &lt;- lm(weight ~ group) summary(lm.D9)$coef Estimate Std. Error t value Pr(&gt;|t|) (Intercept) 4.8465 0.1557174 31.12368 4.185248e-17 group1 -0.1855 0.1557174 -1.19126 2.490232e-01 </code></pre> <p><strong>Desired Output</strong></p> <pre><code> Estimate Std. Error t value Pr(&gt;|t|) (Intercept) 4.8465 0.1557174 31.12368 &lt;0.001 group1 -0.1855 0.1557174 -1.19126 0.249 </code></pre>
0non-cybersec
Stackexchange
Is Fortigate-60D a fanless model?. <p>I would like to know if Fortigate-60D is a fanless model or not. However, neither <a href="http://www.fortinet.com/sites/default/files/productdatasheets/FortiGate-60D.pdf" rel="nofollow">Fortigate-60D datasheet</a> nor <a href="http://www.fortinet.com/sites/default/files/basicfiles/ProductMatrix.pdf" rel="nofollow">Fortinet Product Matrix</a> provide any information about this topic. </p> <p>Could you please confirm, either by your own experience or referencing any other document?</p>
0non-cybersec
Stackexchange
microtype tracking disables small caps in luaLaTeX. <p>Normall <code>microtype</code> tracking loosens the tracking of small caps. However, with <code>fontspec</code>'s <code>\setmainfont{</code>ebgaramond<code>}</code>, small caps are completely disabled and I get a loose normal text, </p> <p><img src="https://i.stack.imgur.com/UpX0C.png" alt="enter image description here"> </p> <p>as opposed to </p> <p><img src="https://i.stack.imgur.com/2AvYp.png" alt="enter image description here"> </p> <p>with the corresponding font package and normal pdfLaTeX. I want to use LuaLaTeX for some fancy ligatures, and XeLaTeX messes everything up.</p> <p>Using the <code>ebgaramond</code> package in LuaLaTeX doesn't help.</p>
0non-cybersec
Stackexchange
Rank function in MySQL. <p>I need to find out rank of customers. Here I am adding the corresponding ANSI standard SQL query for my requirement. Please help me to convert it to MySQL .</p> <pre><code>SELECT RANK() OVER (PARTITION BY Gender ORDER BY Age) AS [Partition by Gender], FirstName, Age, Gender FROM Person </code></pre> <p>Is there any function to find out rank in MySQL?</p>
0non-cybersec
Stackexchange
upmoney is on the left.
0non-cybersec
Reddit
Evaluating $\int_a^{2a}\sqrt{2ax-x^2}\:dx$ where $a$ is a constant.. <p>definite integrate $(2ax-x^2)^{\frac12}$, upper limit $2a$, lower limit $a$. </p> <p>I used substitution, $x=a(1-\sin k)$</p> <p>This is my working <a href="https://i.stack.imgur.com/8kCi6.jpg" rel="nofollow noreferrer">enter image description here</a></p> <p>But I think i did something wrong, the answer is not correct... Please help.</p>
0non-cybersec
Stackexchange
Is Python a weakly typed language as variables can switch types?. <p>The way I understand it, the following is allowed in PHP because it's a weakly-typed language.</p> <pre><code>$var = 'Hello'; $var = 5; </code></pre> <p>I just installed a Windows version of Python 2.6 and I was expecting it NOT to let me change type just like that, but the Python equivalent of the above code works just like in PHP yikes!</p> <pre><code>&gt;&gt;&gt; var = "Hello" &gt;&gt;&gt; type(var) &lt;type 'str'&gt; &gt;&gt;&gt; var = 5 &gt;&gt;&gt; type(var) &lt;type 'int'&gt; </code></pre> <p>Is my understanding of weak/strong typing flawed?</p>
0non-cybersec
Stackexchange
[Homemade] Week 2 of learning to cook! Burned a hole in the ground, and made this..
0non-cybersec
Reddit
Make big and small numbers human-readable. <p>I would like to print my very small numbers in C# in a human friendly way, such as:</p> <p><code>30µ</code> for <code>3E-5</code> or <code>456.789n</code> for <code>0.000000456789</code>.</p> <p>I know of the <a href="http://www.unix.com/man-page/FreeBSD/3/humanize_number/" rel="nofollow noreferrer">Humanize_number</a>() function from BSD in C, but only compatible with bit ints, not floats and doubles. Is there the equivalent in C# that supports those?</p> <p>Also, it should keep a certain amount of precision when displaying numbers, like:</p> <p><code>0.003596</code> should be displayed as <code>3.596µ</code>, not <code>3.6µ</code> (or worse, <code>4µ</code>). </p> <p>The possible answer here: <a href="https://stackoverflow.com/questions/1555397/formatting-large-numbers-with-net">Formatting Large Numbers with .NET</a> but adapted for negative log10 is truncating the numbers to 1 digit after the comma. That's far from complete in my opinion.</p> <p>Examples of how I'd like to present things:</p> <pre><code>3000 3K 3300 3.3K 3333 3.333K 30000 30k 300000 300k 3000000 3M 3000003 3.000003M // or 3M if I specify "4 digits precision" 0.253 253m 0.0253 25.3m 0.00253 2.53m -0.253003 -253.003m </code></pre> <p>I couldn't formulate my question to find relevant answers in SO, so if the question has been already answered, fire away!</p>
0non-cybersec
Stackexchange
Cannot see certain files on USB mounted device (MTP Android Xperia Play). <p>I'm using an emulator for PS2 and I was going to transfer my <code>.iso</code> files from my Xperia Play to Ubuntu 12.04. </p> <p>So I look for my <code>.iso</code>'s in the folder through file manager and it looks as it's empty, but there is a notification on the top asking to the open picture viewer, because there are pictures in this folder.</p> <p>I cannot see or interact with anything and there are no files are hidden.</p> <p>PS: To the forum mods: I am dyslexic and I find your requirement for exacting grammar and spelling unfair. It took a whole half hour just to get past your blocks.</p>
0non-cybersec
Stackexchange
NYPD cops rape teen after marijuana arrest.
0non-cybersec
Reddit
People in the service industry, what are some really dumb ways you've caught someone trying to cheat the system?.
0non-cybersec
Reddit
Women, do you prefer clit stimulation through your clit hood or directly on clit?. Women, do you prefer clit stimulation through your clit hood or directly on clit? If you prefer direct, do you need to pull your clit hood back or does it stick out already? Does your clit have a "favorite" side? My wife seems to prefer the right side and towards the top. Her clit sticks out from her hood, but she still likes to use her hood for buffer.
0non-cybersec
Reddit
How do I use a theme color from Angular Material prebuilt themes. <p>I would like to use a specific color from the material theme in my css. </p> <p>For example</p> <pre><code>.my_tab_group { border: 1px solid $some_color_from_theme; } </code></pre> <p>Does Angular Material expose different color shades via some variable, so that I can use in my own .scss file (e.g., like using $some_color_from_theme above)?</p>
0non-cybersec
Stackexchange
IAMA girl who has had ADD/ADHD her whole life. AMA. Hey reddit, I've noticed a lot of posts regarding ADD/ADHD (parents asking for advice, people wanting to know about the drugs involved, general question, etc...) and I wanted to offer the chance for people to ask questions about ADD/ADHD. I've pretty much had ADD my whole life (had ADHD when I was a kid), and I've been on medication since I was about 4 years old. Feel free to ask me anything! And if you have parenting questions that I can't answer (I don't remember everything my mum did when I was a kid), I'll even give my mum a ring to get the answer for ya! Ask away :)
0non-cybersec
Reddit
Snowflake on a feather.
0non-cybersec
Reddit
Nginx to allow only POST requests for certain URL&#39;s. <p>I have an application which will be served using GET &amp; POST method's. For better security, I have configured Nginx to serve the pages using only POST requests. Below is the config I have used in Nginx.</p> <p><strong>Config in Nginx:</strong> if ($request_method !~ ^(POST)$ ){ return 404; }</p> <p>This is working perfectly. Now, I wanted to change above configuration in Nginx to serve certain pages with both GET &amp; POST requests. But, I am unable to do it.</p> <p>I have used lot of combinations, but no luck.</p> <p>Can some one please help me in configuring nginx for the same.</p> <p>Below is my Nginx configuration file.</p> <p>Note: I am using Nginx (at front end) as a webserver and apache (at back end) for serving application. I have configured nginx to redirect the web pages requested to apache successfully.</p> <pre><code>#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 8081; server_name localhost; #charset koi8-r; access_log /logs/host.access.log; location /WebGoat { #root html; #index index.html index.htm; proxy_pass http://localhost:8080/WebGoat/; } location /application { ##sample project #root html; #index index.html index.htm; if ($request_method !~ ^(POST)$){ return 404; } proxy_pass http://localhost:8080/application/; } location ~ ^register\.html {##register.html page should be served with GET &amp; POST requests if ($request_method !~ ^(GET|POST)$){ return 500; } } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols SSLv2 SSLv3 TLSv1; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } </code></pre> <p>Thanks in Advance, Sandeep</p>
0non-cybersec
Stackexchange
Best blog/newspaper/newsletter about nation state malware?. Hi all, what would you recommend to stay updated on the dynamics of nation state malware that are used every day by governments to target other governments? For example this article explains how attacks from North Korea and china have been detected this week: [https://bushidotoken.blogspot.com/2020/05/this-week-in-malware-4-may-2020.html](https://bushidotoken.blogspot.com/2020/05/this-week-in-malware-4-may-2020.html)
1cybersec
Reddit
Raptor! Gosh I love this game!. So I had a $20 credit at a local hobby shop and was looking to pick up something good at a reasonable price (looking to minimize that mark-up cost). Ended up deciding between Forbidden Desert and Raptor and ended up going with the latter because I already have Forbidden Island and I'm only luke-warm on co-op games. I realize Desert seems to be vastly superior to Island, but I digress. Just played two games of this today, one as the raptor and the other as the scientists. I love it! I want to keep playing at least like another 4 times today (although alas, I've lost a willing opponent). I love the a-symmetry, trying to read what you think the opponent is going to do, preparing yourself for multiple win conditions. Anywho, just needed to shout out some love for what seems to be a not very well-known game.
0non-cybersec
Reddit
Telepresence Internet Controlled 4G/LTE Long Range Robot Car with Raspberry Pi.
0non-cybersec
Reddit
[Troubleshooting]Electrical Fire?!. [Troubleshooting]Okay so yesterday I did my first build. This morning when I turned it on I got a CPU Tempeture error and I realised that my case fans were not on. I found the wire, plugged them in and when I turned it on again there was a smell of an electrical fire. I immediately turned it off and plugged everything out and opened the case. As I opened the case a small bit of smoke rised from the area of the CPU and one of the other fans. My case is a CM Silencio 550, My MOBO is an ASUS Maximus VI, Intel i5 4670k, CM CX750 PSU, and a ASUS GeForce GTX770 GPU. Anybody know what it could be? It has been off for a bout a hour now. I can give any other info if needed. Thanks. Also is it safe to turn back on?
0non-cybersec
Reddit
Fear of friends making a plan without me?. Every time I ask my friends to hang out some time in the weekend and I get a pretty vague answer (like "I'm not sure" or just no reply at all) I suddenly have the fear that this group of friends has been making plans together and ignoring me. I'm not sure if it is actually happening or not, but I am mostly sure that it is not happening and that I am just being scared that people make plans without me. What can I do to overcome the fear that my friends are doing things without me (when most of the time it doesn't happen) just because they say "I'm not sure" or don't reply after I ask them to hang out?
0non-cybersec
Reddit
Recomendation for Math books related to computer science. <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://softwareengineering.stackexchange.com/questions/85506/is-there-a-canonical-book-on-mathematics-for-programmers">Is there a canonical book on mathematics for programmers?</a> </p> </blockquote> <p>I need your recommendation for math books related to computer science in these areas:</p> <ul> <li>Boolean Algebra (Boolean logic, gates, state machines, etc.) </li> <li>Discrete Mathematics </li> <li>Probability &amp; Basic Statistics</li> </ul> <p>Please take note that i am self-learner, so please don't put books that is very hard to read or finish, i prefer book that is 300-500 pages more like an introductory book, also any recommendation whether or not the above list priority is correct, is highly appreciated.</p> <p>-note: i am a self-taught programmer, so the materials in the first item in the list are very familiar to me, but i never took any formal course in it.</p> <p>Thanks</p>
0non-cybersec
Stackexchange
Viable to dual boot Windows alongside OS X for games?. <p>I need some advice. I'm currently running OS X Mountain Lion on my computer on an old HDD. Now there's some games I want to play on Windows, and I'm thinking of getting a big SSD and dual booting OS X ML and Windows 8. Is this possible to even do on a single drive? How long time can I expect to switch OSes on a modern SSD? I would probably prefer to have a switch time of less than, say 20 seconds. Is this realistic to pursue with an SSD?</p>
0non-cybersec
Stackexchange
Calculate the area made with the quarter arcs of circles without Integration. <p>Is there any simple solution to find the area made with the quarter arcs of the circles <strong>BLUE AREA</strong> without using calculus(integrating!)?<br/> <a href="https://i.stack.imgur.com/mLDxG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mLDxG.png" alt="enter image description here" /></a></p>
0non-cybersec
Stackexchange
So Majestic.
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
TIME's Best Photobooks of 2018.
0non-cybersec
Reddit
Four men and a turtle..
0non-cybersec
Reddit
Color string in terminal in zsh. <p>I'm trying to convert this string that I had in .bash_profile</p> <p>PS1="[\e[37;1m][\u:\w]$ [\e[0m]"</p> <p>to an equivalent string in .zprofile in zsh. I've read the guide in </p> <p><a href="https://wiki.archlinux.org/index.php/Zsh#Colors" rel="nofollow noreferrer">https://wiki.archlinux.org/index.php/Zsh#Colors</a></p> <p>but I actually didn't manage to understand the new syntax to color my terminal and, in my case, show the full path where I am actually working. I understand it's a trivial questions but also looking at related post I didn't manage to fix my issue. Any hint would be more than welcome :)</p> <p>Thanks </p> <p>Daniele</p>
0non-cybersec
Stackexchange
Why are we so reserved in regards of colours of our jeans/pants but we wear any colour t-shirts and upper body clothing?.
0non-cybersec
Reddit
My Hive-mind Team: 19 heads are better than one.
0non-cybersec
Reddit
Repeating Microsoft Word VBA until no search results found. <p>I've created a MS Word macro that searches for certain text (indicated by markup codes), cuts the text and inserts it into a new footnote, and then deletes the markup codes from the footnote. Now I want the macro to repeat until it doesn't find any more markup codes in the text.<br> Here's the macro below</p> <pre><code>Sub SearchFN() 'find a footnote Selection.Find.ClearFormatting With Selection.Find .Text = "&amp;&amp;FB:*&amp;&amp;FE" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchByte = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchFuzzy = False .MatchWildcards = True End With Selection.Find.Execute 'cut the footnote from the text Selection.Cut 'create a proper Word footnote With Selection With .FootnoteOptions .Location = wdBottomOfPage .NumberingRule = wdRestartContinuous .StartingNumber = 1 .NumberStyle = wdNoteNumberStyleArabic End With .Footnotes.Add Range:=Selection.Range, Reference:="" End With 'now paste the text into the footnote Selection.Paste 'go to the beginning of the newly created footnote 'and find/delete the code for the start of the note (&amp;&amp;FB:) Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "&amp;&amp;FB:" .Replacement.Text = "" .Forward = False .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchByte = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchFuzzy = False .MatchWildcards = True End With Selection.Find.Execute With Selection If .Find.Forward = True Then .Collapse Direction:=wdCollapseStart Else .Collapse Direction:=wdCollapseEnd End If .Find.Execute Replace:=wdReplaceOne If .Find.Forward = True Then .Collapse Direction:=wdCollapseEnd Else .Collapse Direction:=wdCollapseStart End If .Find.Execute End With 'do same for ending code (&amp;&amp;FE) With Selection.Find .Text = "&amp;&amp;FE" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchByte = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchFuzzy = False .MatchWildcards = True End With Selection.Find.Execute With Selection If .Find.Forward = True Then .Collapse Direction:=wdCollapseStart Else .Collapse Direction:=wdCollapseEnd End If .Find.Execute Replace:=wdReplaceOne If .Find.Forward = True Then .Collapse Direction:=wdCollapseEnd Else .Collapse Direction:=wdCollapseStart End If .Find.Execute End With Selection.HomeKey Unit:=wdStory 'now repeat--but how?? End Sub </code></pre>
0non-cybersec
Stackexchange
An Elementary Inequality Problem. <p>Given $n$ positive real numbers $x_1, x_2,...,x_{n+1}$, suppose: $$\frac{1}{1+x_1}+\frac{1}{1+x_2}+...+\frac{1}{1+x_{n+1}}=1$$ Prove:$$x_1x_2...x_{n+1}\ge{n^{n+1}}$$</p> <p>I have tried the substitution $$t_i=\frac{1}{1+x_i}$$ The problem thus becomes: </p> <p>Given $$t_1+t_2+...+t_{n+1}=1, t_i\gt0$$ Prove:$$(\frac{1}{t_1}-1)(\frac{1}{t_2}-1)...(\frac{1}{t_{n+1}}-1)\ge{n^{n+1}}$$ Which is equavalent to the following: $$(\frac{t_2+t_3+...+t_{n+1}}{t_1})(\frac{t_1+t_3+...+t_{n+1}}{t_2})...(\frac{t_1+t_2+...+t_{n}}{t_{n+1}})\ge{n^{n+1}}$$ From now on, I think basic equality (which says arithmetic mean is greater than geometric mean) can be applied but I cannot quite get there. Any hints? Thanks in advance.</p>
0non-cybersec
Stackexchange
Lions and Gazelles: A new sci-fi short story by the author of The Quantum Thief and Summerland..
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
Remove page numbering for BEAMER&#39;s bibliography being out of frames. <p>I want a beamer presentation with my bibliography at the end. It should have a two-columns layout and a page number that, preferably, is inexistant (or that follows the page numbering from the last slide before the bibliography, even if a long bibliography is written over several slides).</p> <p>I can get the bibliography to be written over several slides in the desired layout only if the <code>\bibliography</code> argument is written outside of a <code>\frame</code> (or <code>\begin{frame}</code>) argument. </p> <p>The problem is that I obtain a bibliography with a page number that is repeated all along the bibliography and is all the same (i.e., is blocked) since the last <code>\frame</code>. I have unsuccessfully tried several commands (e.g., <code>\nopagenumbering</code> or <code>\pagenumbering{gobble}</code> or <code>\pagestyle{empty}</code> or <code>\renewcommand{\thepage}{}</code> ).</p> <p>Does someone has a solution or an idea ? Many thanks in advance !!</p> <p>SkyR</p> <p>Here is a reproducible example: First the file called "refs.bib":</p> <pre><code>@article{a, author = { Anat Freund PhD }, title = {Commitment and Job Satisfaction as Predictors of Turnover Intentions Among Welfare Workers}, journal = {Administration in Social Work}, volume = {29}, number = {2}, pages = {5-21}, year = {2005}, publisher = {Routledge} } @article{b, author = { Louis A. Penner and Alison R. Midili and Jill Kegelmeyer }, title = {Beyond Job Attitudes: A Personality and Social Psychology Perspective on the Causes of Organizational Citizenship Behavior}, journal = {Human Performance}, volume = {10}, number = {2}, pages = {111-131}, year = {1997}, publisher = {Routledge} } @article{c, title = "The influence of job satisfaction on child welfare worker's desire to stay: An examination of the interaction effect of self-efficacy and supportive supervision", journal = "Children and Youth Services Review", volume = "32", number = "4", pages = "482 - 486", year = "2010", issn = "0190-7409", author = "Szu-Yu Chen and Maria Scannapieco", keywords = "Child welfare, Worker retention, Job satisfaction, Supervisor's support, Work related self-efficacy" } @article{d, title = "Job conditions, unmet expectations, and burnout in public child welfare workers: How different from other social workers?", journal = "Children and Youth Services Review", volume = "33", number = "2", pages = "358 - 367", year = "2011", issn = "0190-7409", author = "Hansung Kim", keywords = "Child welfare, Job stress, Depersonalization, Social workers" } @article{e, author = {Petersen, Michael Bang and Sznycer, Daniel and Cosmides, Leda and Tooby, John}, title = {Who Deserves Help? Evolutionary Psychology, Social Emotions, and Public Opinion about Welfare}, journal = {Political Psychology}} </code></pre> <p>Second, the main file:</p> <pre><code>\documentclass[12pt]{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{color} \usepackage{multicol} \usepackage{natbib} \usepackage{pstricks} \usepackage[absolute,overlay]{textpos} \usepackage{tikz} \usepackage{array} \usepackage{amsmath} \usepackage{xcolor} \usepackage{graphics} \setbeamertemplate{items}[ball] \usepackage{appendixnumberbeamer} \mode&lt;presentation&gt;{} \usetheme{Warsaw} \addtocontents{toc}{\protect\thispagestyle{empty}} \pagenumbering{gobble} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \vspace*{0.6cm} \title[small title]{{\large{Big title}}} \author[J. Deuf]{John Deuf} \vspace{1cm} \institute{ \Large{National center of research} } \date{1st of january 2043} \setbeamertemplate{navigation symbols}{} \addtobeamertemplate{footline} {\hfill\insertframenumber/\inserttotalframenumber\hspace{2em}\null} \begin{document} { \setbeamertemplate{headline}{} \begin{frame}[plain] \vspace{-1cm} \maketitle \end{frame} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \section{Part1} \frametitle{Title1} \nocite{ a,b,c,d,e} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \section{Part2} \frametitle{Title2} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \section{Part3} \frametitle{Title3} \end{frame} { \begin{multicols}{2} \color{black} \frametitle{} \bibliographystyle{alpha} \small \bibliography{refs} \end{multicols} } \end{document} </code></pre>
0non-cybersec
Stackexchange
Gorilla Runtz 🦍- FL.
0non-cybersec
Reddit
"I-Pledge Challenge".
0non-cybersec
Reddit
GCLOUD Kubernetes in f1-micro results in (Node pools of f1-micro machines are not supported due to insufficient memory). <p>I tried to start a new f1-micro node in my cluster using Googles UI and it silently fails. So I decided to run it using gcloud to see if that one provides more details</p> <p>And so I ran the following</p> <pre><code>gcloud container node-pools create my-f1-pool --image-type ubuntu --machine-type=f1-micro --cluster bcomm-sg-cluster --disk-size=10GB --enable-autoscaling --min-nodes=2 --max-nodes=6 --zone=asia-southeast1-a --enable-autorepair </code></pre> <p>This is the result I got instead</p> <pre><code>WARNING: Modifications on the boot disks of node VMs do not persist across node recreations. Nodes are recreated during manual-upgrade, auto-upgrade, auto-repair, and auto-scaling. To preserve modifications across node recreation, use a DaemonSet. WARNING: Newly created clusters and node-pools will have node auto-upgrade enabled by default. This can be disabled using the `--no-enable-autoupgrade` flag. WARNING: Starting in 1.12, new node pools will be created with their legacy Compute Engine instance metadata APIs disabled by default. To create a node pool with legacy instance metadata endpoints disabled, run `node-pools create` with the flag `--metadata disable-legacy-endpoints=true`. This will enable the autorepair feature for nodes. Please see https://cloud.google.com/kubernetes-engine/docs/node-auto-repair for more information on node autorepairs. ERROR: (gcloud.container.node-pools.create) ResponseError: code=400, message=Node pools of f1-micro machines are not supported due to insufficient memory. </code></pre> <p>What does it mean by "Node pools of f1-micro machines are not supported due to insufficient memory". if its not allowed, then why does the option exist? also previously when I started toying with GCP, the first code pool I created was 3 f1-micro before I added an N1. but now I cannot add the f1-micro and get this error instead</p>
0non-cybersec
Stackexchange
Prove $(a, b) \mid ((a + b), (a - b))$. <p>I tried this:</p> <p>Suppose $(a, b) = d$. Then $ax + by = d$. </p> <p>Let $((a + b), (a – b)) = e$. </p> <p>Then $$\begin{align}e&amp; = (a + b)u + (a – b)v\\ &amp;= au + bu + av – bv\\ &amp;= a(u + v) + b(u – v)\end{align}$$</p> <p>Let $u + v = x$ and $u – v = y$, then $d = e$. So, $d \mid e$. </p> <p>What are the possible errors?</p>
0non-cybersec
Stackexchange
Redirect website after certain amount of time. <p>What do I have to do to have a function on a website where it says it will redirect you to the site in 3 seconds or so? </p>
0non-cybersec
Stackexchange
How do I get my music back on Banshee?. <p>My Banshee Media Player on my laptop deleted all my songs. I pressed "Remove from Library" on one song and it deleted all my songs. How do I get them back? I need help ASAP.</p>
0non-cybersec
Stackexchange
Las reacciones europeas frente a la muerte de Osama bin Laden.
0non-cybersec
Reddit
London Approves Bike Superhighway: Europe's first city-spanning system of safely-separated bicycle lanes for young and old alike - "if you create safer cycling you necessarily create more inclusive cycling.”.
0non-cybersec
Reddit
Does GarageBand iOS 1.2 support AirPlay?. <p>Does GarageBand iOS 1.2 support AirPlay? I see reports from Google searches that AirPlay was added to an earlier version but had lag-related performance issues. With 1.2, I see no way to select audio output. If I already have a Jambox connected, GarageBand will use it, but so far I can't get it to use AirPlay.</p>
0non-cybersec
Stackexchange
I installed under cabinet lighting in my kitchen too!.
0non-cybersec
Reddit
[Pickup] All reflective everything.
0non-cybersec
Reddit
Probability density from standard domain - I. <p>Pick <span class="math-container">$x+iy$</span> at random with respect to hyperbolic measure from <span class="math-container">$\{z:|z|\geq1,|\mathcal R(z)|\leq\frac12\}$</span>. What does the probability distribution function of <span class="math-container">$\frac1{\sqrt y}$</span> look like?</p>
0non-cybersec
Stackexchange
roll a dice repeatedly until the sum goes above 63. <p>I saw this question online but I don't know if my solution is right or not. Here is the original question:</p> <p>Roll a die repeatedly. Say that you stop when the sum goes above 63. What is the probability that the second to last value was X. Make a market on this probability. Ie what is your 90 percent confidence interval.</p> <p>This is my solution:</p> <p>X=63, 6 possible last roll as 1,2,3,4,5,6;</p> <p>X=62, 5 possible last roll as 2,3,4,5,6;</p> <p>X=61, 4 possible last roll as 3,4,5,6;</p> <p>X=60, 3 possible last roll as 4,5,6;</p> <p>X=59, 2 possible last roll as 5,6;</p> <p>X=58, 1 possible last roll as 6.</p> <p>BUT I don't know if it's right to think backward instead of considering the possible second to last value first? i.e. how many possibility to get a 63 regardless of last roll.</p> <p>Thank you very much!</p>
0non-cybersec
Stackexchange
A very important rescue.
0non-cybersec
Reddit
High Quality Models Wallpapers.
0non-cybersec
Reddit
Find distance from line k given parametric equation of: $x=2+t, y=-3+2t, z=2-t, t\in\mathbb{R}$ from plane $\pi:2x+y+4z=0$.. <p>My solution:</p> <p><span class="math-container">$$2(2+t)+(-3+2t)+4(2-t)$$</span> <span class="math-container">$$4+2t-3+2t+8-4t$$</span> <span class="math-container">$$9=0$$</span> Contradiction, so no solutions, line and plane are parallel.</p> <p>Its first time where I have such an example where equation is contradiction, I followed some example from internet and those are my next steps:</p> <p><span class="math-container">$$d(l,\pi)=\frac{|9|}{\sqrt{1+2^2+1}}=\frac{9\sqrt{6}}{6}$$</span></p> <p>I am not sure about this method, is this distance value right? Maybe there's better way to calculate it?</p>
0non-cybersec
Stackexchange
.NET GUID uppercase string format. <p>I need to format my GUIDs in the dashed format, all uppercase. I know using <code>myGuid.ToString("D")</code> or <code>String.Format("{0:D}", myGuid)</code> gives the dashed format, but using an uppercase <code>D</code> as opposed to a lower-case <code>d</code> doesn't give me an uppercased GUID like I thought it would. Is there a way to do this without doing anything crazy, or do I just need to call <code>myGuid.ToString().ToUpper()</code>?</p>
0non-cybersec
Stackexchange
What&#39;s the best way to test delayed_job chains with rSpec?. <p>Currently when I have a delayed method in my code like the following:</p> <pre><code>CommentMailer.delay.deliver_comments(@comment, true) </code></pre> <p>I write something like this in my spec:</p> <pre><code>dj = mock("DelayProxy") CommentMailer.should_receive(:delay).and_return(dj) dj.should_receive(:deliver_comments).with(comment, true) </code></pre> <p>Is there a better way to handle this and/or chained methods like that in rSpec in general?</p>
0non-cybersec
Stackexchange
SSD disk not showing up in BIOS. <p>My system disk, a Corsair GT 120, suddenly stopped showing up in BIOS. It has been working without issues before. I've checked the cables, the SATA port on the motherboard, the power cable. Tried connecting the disk to a different computer, but it didnt show up in bios there either. Nothing made any difference. </p> <p>Is there any other steps I can try to check the disk or try to get data from it before I go and buy a new one?</p>
0non-cybersec
Stackexchange
'91 Gulf War protest at my local High School.
0non-cybersec
Reddit
Sister won't eat anything but my food.. My mom bought some packs of my favourite instant noodles for my sister and I and she already ate all of hers while I saved two of mine. These are my favourite type and my mom doesn't buy instant noodles very often. **I'm not mad at her eating instant noodles, I'm just pissed because she does this about everything and complains and makes up lies about me to my mom if I don't do what she wants.** &#x200B; One day, when I was home with my little sister, my mom had left and told me to make some dinner for my sis and myself. So, me being lazy, decided to eat one of the instant noodles I had saved for myself and offered my sister another kind of instant noodles. She didn't want them and said she wanted my extra pack I told her that she couldn't have it as she had already eaten hers and offered to cook up the other kind instead. She said no and went back to doing whatever she was doing. &#x200B; Couple minutes later, she starts whining and complaining about being hungry, so I naturally offered her the other type, which she rejected. I had asked her what she wanted to eat and she said anything but that kind of noodles. SO I offered to make some pasta or cook up something else for her. She said that she only wanted my mom's cooking and not mine. I reminder her that our mom is out and won't be back for a couple hours. She continues whining about being hungry so I asked if she wanted some crackers or something and she said that she only wanted my extra pack of instant noodles &#x200B; At this point, I was getting really annoyed and just ignored her continuous whining, but she started having a full-on **TANTRUM** and saying how she'll tell our mom that I won't give her any food and let her be hungry. She's 10. I keep giving her food suggestions and she keeps screaming and says she only wants my instant noodles. I had to calm her down because we've had noise complaints before because of my sister's loud yells and screams. So I give in and give her my extra and she stops having a tantrum and happily eats MY food. &#x200B; When my mom came back, I told her about what happened and my sister had to nerve to deny that it ever happened.
0non-cybersec
Reddit
Galerkin approximation for an elliptic BVP. <p>What is the process for deducing Galerkin approximation for an elliptic boundary value problem? For example, for a problem like--</p> <p><span class="math-container">$$ -\Delta u + cu = f\ \ \mathrm{in}\ Ω $$</span></p> <p><span class="math-container">$$ u = g\ \ \mathrm{on}\ \ \Gamma_1 $$</span></p> <p><span class="math-container">$$ \frac{∂u}{∂n} + pu = h\ \ \mathrm{on}\ \ \Gamma_2 $$</span></p> <p>here, <span class="math-container">$∂Ω = \Gamma_1 \cup \Gamma_2$</span> and <span class="math-container">$\Gamma_1\cap \Gamma_2 = \phi$</span> and <span class="math-container">$c \geq 0.$</span></p> <p><span class="math-container">$f, g, h, p$</span> are sufficiently smooth functions.</p> <p>I’ve calculated the weak solution of this problem to be </p> <p><span class="math-container">$$ \int_\Omega (\nabla u\cdot \nabla \phi + cu\phi)dw + \int_{\Gamma_2} (pu-h)\phi ds = \int_{\Omega} (f\phi) dw $$</span></p> <p>here <span class="math-container">$\Omega, \Gamma_2$</span> with the integral sign <span class="math-container">$\int$</span> are the domain identifier.</p> <p>So how can I propose a galerkin approximation from this weak form of the PDE</p>
0non-cybersec
Stackexchange
Did a backpacking trip before staring work full time. https://vimeo.com/145106384 When I found out I only had 2 weeks PTO, I decided to book a ticket to singapore and go from there. My first time going solo abroad and it was an interesting experience. I hope you enjoy my quick little video :) camera: sony a7s lens: zeiss 55mm 1.8 Cheers!
0non-cybersec
Reddit
Parents of the year?.
0non-cybersec
Reddit
Should I pay quarterly self-employment taxes from my business checking account or my personal checking account?. Hello, all. Quick tax question regarding my freelance side hustle. Should self-employment taxes be paid from a personal checking account or a business checking account? Which option makes more sense for record keeping purposes? Does it even matter? I'd appreciate any insight on the topic. Thanks!
0non-cybersec
Reddit
Styling default JavaFX Dialogs. <p>I'm looking for a way to style the default JavaFX Dialog (<code>javafx.scene.control.Dialog</code>). </p> <p>I tried to get the DialogPane and add a stylesheet, but it covers only a small piece of the dialog. I would prefer to style only with an external css file and without to add styleClasses over the code. This would look messy (header, content, own content on the content and more..)</p> <p>I googled already alot and only found examples for ControlsFX, but since jdk8_40 JavaFX has it's own Dialogs i use them now. </p> <p>Any suggestions?</p> <p><strong>Edit:</strong></p> <p>Since José Pereda posted the solution i created my own dialog.css. I'll post it here because it covers the whole dialog and maybe someone want's to copy&amp;paste it. Note .dialog-pane is already a given styleClass name so you don't need to apply your own. Of course, Josés is more fine detailed.</p> <pre><code>.dialog-pane { -fx-background-color: black; } .dialog-pane .label { -fx-text-fill: white; } .dialog-pane:header .header-panel { -fx-background-color: black; } .dialog-pane:header .header-panel .label { -fx-font-style: italic; -fx-font-size: 2em; } </code></pre>
0non-cybersec
Stackexchange
Interfacing strace with Process Name instead of PID. <p>How do I implement a wrapper script <code>pstrace</code> in bash that changees the interface of</p> <pre><code>[sudo] strace -c -p [PID] </code></pre> <p>to </p> <pre><code>[sudo] pstrace -c -p [PROCESS-NAME] </code></pre> <p>similar to how</p> <pre><code>killall [PROCESS-NAME] </code></pre> <p>is used. With completion and everything.</p>
0non-cybersec
Stackexchange
network device name is changed by itself. <p>I use a Ubuntu-arm, <code>uname -a</code></p> <pre><code>Linux arm 3.7.8-x8 #1 SMP Sat Feb 16 04:15:13 UTC 2013 armv7l armv7l armv7l GNU/Linux </code></pre> <p>I have two USB WiFi interfaces that are named wlan0 and wlan1 on <code>/etc/udev/rules.d/70-persistent-net.rules</code> </p> <p>I run a script on each start-up that does:</p> <pre><code>ifdown wlan0 rm /var/run/wpa_supplicant/wlan0 ifup wlan0 wpa_supplicant -B -Dnl80211 -iwlan0 -c/etc/w.conf ifdown wlan1 rm /var/run/wpa_supplicant/wlan1 ifup wlan1 wpa_supplicant -B -Dnl80211 -iwlan1 -c/etc/w2.conf </code></pre> <p>sometimes one of the interface is named as <code>rename5</code> whereas the other interface is named according to the <code>70-persistent-net.rules</code>.</p> <p>Could anyone explain why it is named rename5 instead of wlan0 or wlan1 and how can I prevent that thing to happen?</p>
0non-cybersec
Stackexchange
Elementary question about quiver. <p>How do we add elements in a quiver?</p> <p>Please see here:</p> <p><a href="http://planetmath.org/encyclopedia/AdmissibleIdealsBoundQuiverAndItsAlgebra.html" rel="nofollow">http://planetmath.org/encyclopedia/AdmissibleIdealsBoundQuiverAndItsAlgebra.html</a></p> <p>I know how to multiply this (by concatenation) but how do we add them, i.e how do we interpet ab - c ? I don't understand why ab- c is not an element of $R^{2}$.</p>
0non-cybersec
Stackexchange
Petting an eel underwater.
0non-cybersec
Reddit
Intense snake chase.
0non-cybersec
Reddit
bad ownership or modes for chroot directory component. <p>I created the user MY_USER. Set his home dir to /var/www/RESTRICTED_DIR, which is the path he should be restricted to. Then I edited sshd_config and set:</p> <pre><code>Match user MY_USER ChrootDirectory /var/www/RESTRICTED_DIR </code></pre> <p>Then I restarted ssh. Made MY_USER owner (and group owner) of RESTRICTED_DIR, and chmodded it to 755. I get</p> <pre><code>Accepted password for MY_USER session opened for user MY_USER by (uid=0) fatal: bad ownership or modes for chroot directory component "/var/www/RESTRICTED_DIR" pam_unix(sshd:session): session closed for user MY_USER </code></pre> <p>If I removed the 2 lines from sshd_config the user can login successfully. Of course it can access all the server though. What's the problem? I even tried to chown RESTRICTED_DIR to root (as I read somewhere that someone solved this same problem doing it). No luck..</p>
0non-cybersec
Stackexchange
Joint distribution of residuals in a simple linear regression model with iid normal errors. <p>In a simple linear regression $Y=X\beta + \varepsilon$, residuals are given by $\hat\varepsilon = M\varepsilon$, where $M = I_n - P$ is the annihilator matrix, and $P = X(X^TX)^{−1}X^T$ is the projection matrix, and $X$ is the design matrix. Assuing that the errors $\varepsilon$ are iid normal with mean $0$ and standard deviation $\sigma$, what is the joint (conditional on $X$) distribution of the residuals $\hat\varepsilon$? It seems to me that it should be multivariate normal, but what is the covariance matrix $\Sigma$?</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
Solving $\int_0^\infty \left(1+\frac{y^{2}_{1}+y^{2}_{2}+\cdots+y^{2}_{n})}{\nu}\right)\mathrm dy_{1}\mathrm dy_{2}\cdots \mathrm dy_{n}$. <p>Interesting integral here:</p> <p>$$\int_0^\infty \frac{\Gamma(D/2+\nu/2)}{\Gamma(\nu/2)}\frac{|\Lambda|^{1/2}}{(\pi \nu)^{D/2}}\left(1+\frac{(x-\mu)^{T}\Lambda(x-\mu)}{\nu}\right)^{-D/2-\nu/2}\mathrm dx$$</p> <p>I tried to write $\Lambda$ as $\Lambda^{1/2}\Lambda^{1/2}$ and changing variables with $y =\Lambda^{1/2}(x-\mu)$ in order to get:</p> <p>$$\int_0^\infty \frac{\Gamma(D/2+\nu/2)}{\Gamma(\nu/2)}\frac{|\Lambda|^{1/2}}{(\pi \nu)^{D/2}}\left(1+\frac{y^{T}y}{\nu}\right)^{-D/2-\nu/2}|\Lambda|^{-1/2}\mathrm dy_{1}\mathrm dy_{2}\cdots \mathrm dy_{n}$$</p> <p>The integral in the form:</p> <p>$$\int_0^\infty \left(1+\frac{y^{2}_{1}+y^{2}_{2}+...+y^{2}_{n})}{\nu}\right)^{-D/2-\nu/2}\mathrm dy_{1}\mathrm dy_{2} \cdots \mathrm dy_{n}$$</p> <p>seems to generate a product of Gamma function but I can't get a closed form.</p> <p>Any help is appreciated. By the way, this question is somewhat related to <a href="https://math.stackexchange.com/questions/324351/simplifying-covariance-matrices-in-distributions">Simplifying covariance matrices in distributions</a>, so maybe one can help the other.</p>
0non-cybersec
Stackexchange
What is the intuition behind symmetric trees in catboost algorithm?. <p>I have been going through the catboost algorithm and it is hard for me to see the point of using symmetric trees. On this regard, i found in their github:</p> <blockquote> <p>An important part of the algorithm is that it uses symmetric trees and builds them level by level. Symmetric tree is a tree where nodes of each level use the same split. This allows to encode path to leaf with an idex. For example, there is a tree with depth 2. Split on the first level is f1&lt;2, split on the second level is f2&lt;4. Then the object with f1=5, f2=0 will have leaf with number 01b.</p> </blockquote> <p>They say it helps to be less prone to overfitting and to have a much quicker inference but, intuitively for me, it is like you need twice the depth to explore the same amount of splits. </p> <p>So, can anybody explain which is actually the advantage of using this types of trees??</p> <p>Many thanks.</p>
0non-cybersec
Stackexchange
How do I change the default program for Preview in the context menu when uploading images to websites in Windows 7?. <p>I'm not asking how to change the default program for a certain file extension, but how do I change the behavior of this particular context menu item? I've gone through various answers and search results that recommended context menu editors and various registry edits, but none of them address this particular item. I want to be able to preview certain gifs that I upload, but Windows Photo Viewer doesn't animate gifs. </p> <p><img src="https://i.imgur.com/N5m49vq.png" alt="Screenshot"></p>
0non-cybersec
Stackexchange
Copy null terminated char array to std::string respecting buffer length. <p>Maybe it's just the lack of coffee, but I'm trying to create a <code>std::string</code> from a null-terminated <code>char</code> array with a known maximum length and I don't know, how to do it.</p> <pre><code>auto s = std::string(buffer, sizeof(buffer)); </code></pre> <p>.. was my favorite candidate but since C++ strings are not null-terminated this command will copy <code>sizeof(buffer)</code> bytes regardless of any contained '\0'.</p> <pre><code>auto s = std::string(buffer); </code></pre> <p>.. copies from <code>buffer</code> until <code>\0</code> is found. This is almost what I want but I can't trust the receive buffer so I'd like to provide a maximum length.</p> <p>Of course, I can now integrate <code>strnlen()</code> like this:</p> <pre><code>auto s = std::string(buffer, strnlen(buffer, sizeof(buffer))); </code></pre> <p>But that seems dirty - it traverses the buffer twice and I have to deal with C-artifacts like <code>string.h</code> and <code>strnlen()</code> (and it's ugly).</p> <p>How would I do this in modern C++?</p>
0non-cybersec
Stackexchange
Is this a valid proof for ${x^{x^{x^{x^{x^{\dots}}}}}} = y$?. <p>So I got this challenge from my teacher.</p> <p><strong>Solve ${x^{x^{x^{x^{x^{\dots}}}}}} = y$ (eq. 1) for $x$.</strong></p> <hr> <p>My attempt:</p> <p>As $x^{y^z}$ per definition equals $x^{y \cdot z}$, then $x^y = y$ from (eq. 1). Thus, <strong>$x = \sqrt{y}$.</strong></p> <p>Is this a valid proof?</p>
0non-cybersec
Stackexchange
Help showing Frenet-Serret Formulas with respect to $t$. <p>The Frenet-Serret Formulas involve a unit tangent vector, <span class="math-container">$$\hat T = \frac{\vec r’(t)}{||\vec r’(t)||}$$</span> and a unit normal vector (differentiating with respect to <span class="math-container">$t$</span>) <span class="math-container">$$\hat N = \frac{\vec T’(t)}{||\vec T’(t)||}$$</span> and a unit binormal vector, the cross product of the two above: <span class="math-container">$$\hat B = \hat T \times \hat N$$</span> </p> <p>Normally, they are written with respect to the arclength parameter <span class="math-container">$s$</span>, but I’ve seen formulas with respect to <span class="math-container">$t$</span> that look way more complicated, such as these from wikipedia:<a href="https://i.stack.imgur.com/wvnFv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wvnFv.jpg" alt="enter image description here"></a></p> <p><strong>How do you derive these from the definitions above?</strong></p> <p>So far, I've gotten that <span class="math-container">$$\hat N = \frac{||\vec r’(t)|| r''(t) - r'(t) \frac{r'(t) \cdot r''(t)}{||\vec r’(t)||}}{\Big|\Big|||\vec r’(t)|| r''(t) - r'(t) \frac{r'(t) \cdot r''(t)}{||\vec r’(t)||}\Big|\Big|}$$</span> just from quotient rule, but I'm not even sure I differentiated <span class="math-container">$||\vec r’(t)||=\sqrt{\vec r'(t) \cdot \vec r'(t)}$</span> right. I'm not sure how to proceed -- any help with the <span class="math-container">$\hat N$</span> case or <span class="math-container">$\hat B$</span>, or with the curvature <span class="math-container">$\kappa$</span> or torsion <span class="math-container">$\tau$</span> is much appreciated. </p>
0non-cybersec
Stackexchange
This is why you should always pay attention to "No Skateboarding" signs.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
How 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
Speed up plot() function for large dataset. <p>I am using <code>plot()</code> for over 1 mln data points and it turns out to be very slow.</p> <p>Is there any way to improve the speed including programming and hardware solutions (more RAM, graphic card...)?</p> <p>Where are data for plot stored?</p>
0non-cybersec
Stackexchange
Monitoring Dell/HP Servers Running ESXi (Free). <p>What are you all doing to monitor ESXi servers that run the free edition? With the lack of SNMP support, it seems fairly limited to me. What'd I'd like to be able to do is get some type of alert when a drive or other hardware fails. I've seen a few articles on getting OpenManage installed on an ESXi box (to rebuild an array), but it seems to be quite a pain as well. Even if I get OpenManage working, I won't have alerts without SNMP.</p> <p>Any comments, input, or guidance would be greatly appreciated.</p>
0non-cybersec
Stackexchange
A notation to represent that all elements of a vector must be less than zero?. <p>I am defining an optimization algorithm. One of the constraints of the length <span class="math-container">$p$</span> vector <span class="math-container">$\boldsymbol{\theta}^-$</span> is that all elements in that vector must be less than or equal to zero. </p> <p>I could say that <span class="math-container">$$ \theta^+_j \leq 0\quad \forall j\in\{1 ... p\}.$$</span></p> <p>Is there any way to express this in the form</p> <p><span class="math-container">$$\boldsymbol{\theta}^+ \leq 0?$$</span> </p> <p>That doesn't make a lot of sense, but is there some alternate symbol or notation I could replace for <span class="math-container">$\leq$</span> to express that I want the vector to be element-wise less than or equal to zero?</p>
0non-cybersec
Stackexchange
No sound on Firefox and Opera, but works on Chrome. <pre><code>Ubuntu 18.04.2 Firefox Quantum 65.0.1 </code></pre> <p>There is no sound from Firefox or Opera browsers when playing youtube videos etc. Chrome works fine. Desktop music/video player apps also work without any issues. Neither inbuilt speakers nor headphones work for the problematic browsers.</p> <p>I've gone through the other posts that reported the same problem and tried all the solutions; didn't solve the issue.</p> <ul> <li><strong>Pulse-audio</strong> is installed by default. Firefox and Opera show up in the list of applications under sound settings with their respective volume control though.</li> </ul> <p><a href="https://i.stack.imgur.com/SWPLq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SWPLq.png" alt="Sound settings showing browser playback streams"></a></p> <ul> <li>Installing <code>ubuntu-restricted-extras</code> didn't help. I don't think it's a codec issue. Playing ogg/flac from wikipedia also makes no sound on firefox.</li> <li>Clearing cache as mentioned in firefox faq didn't help either.</li> </ul>
0non-cybersec
Stackexchange
A polish man walks into a police station.. Polish man: help me! Help me! My wife is trying to kill me! Police man: calm down sir, do you have any evidence that your wife is trying to kill you? Polish man: Yes! I opened our medicine cabinet and found Polish Remover!
0non-cybersec
Reddit
Idempotents in compact semigroups. <p>Hi, I've read somewhere that a compact (Abelian) topological semigroup has at least one idempotent and if it contains identity and is not a group then it has one extra idempotent apart from the identity. Could you please give me some reference, where I could find this? Thanks in advance for any help. </p>
0non-cybersec
Stackexchange
My fortune cookie tonight.
0non-cybersec
Reddit
[Link] Star Wars Jedi: Fallen Order gameplay reveal will be shown at this EA Play/E3.
0non-cybersec
Reddit
Stirling numbers of the second kind formulae. <p>We want to determine the number of ways that 10 distinct pieces of candy can be placed into 2 identical bags with each bag getting at least 1 piece.<br> As we know the answer is <span class="math-container">$S(10,2)$</span>, where <span class="math-container">$S$</span> stands for Stirling number of the second kind.<br> I thought that we can start by choosing two candies out 10 to put each one in a bag, so we will have that each bag is nonempty. Then, the remaining 8 candies will either be put in a single bag or put in the two bags (meaning each bag gets at least one candy out of 8) and that can be done in <span class="math-container">$S(8,2)$</span> ways. And finally, I get <span class="math-container">$S(10,2)= \binom {10}{2} \left( S(8,1) + S(8,2) \right) $</span>.<br />I know that the result I get is wrong, because from the tables of the Stirling numbers <span class="math-container">$S(10,2)$</span> is <span class="math-container">$511$</span>. But the reasoning seems to me correct!!! Where is the problem with my reasoning?</p>
0non-cybersec
Stackexchange
What does Preserve sharing means in lazy Streams?. <p>I'm following the Functional Programming in Scala book. Here is the code snippet from Stream definition and functions to construct <code>constant</code> using smart constructor and using <code>unfold</code>:</p> <pre><code>sealed trait Stream[+A] case object Empty extends Stream[Nothing] case class Cons[+A](h: () =&gt; A, tl: () =&gt; Stream[A]) extends Stream[A] object Stream { def cons[A](h: =&gt; A, tl: =&gt; Stream[A]): Stream[A] = { lazy val head = h lazy val tail = tl Cons(() =&gt; head, () =&gt; tail) } def empty[A]: Stream[A] = Empty def constant[A](a: A): Stream[A] = cons(a, constant(a)) def unfold[A, S](z: S)(f: S =&gt; Option[(A, S)]): Stream[A] = f(z).fold(empty[A])(x =&gt; cons(x._1, unfold(x._2)(f))) def constantViaUnfold[A](a: A): Stream[A] = unfold(a)(x =&gt; Some((x, x))) } </code></pre> <p>There is a footnote saying that:</p> <blockquote> <p>Using <code>unfold</code> to define <code>constant</code> means that we won't get sharing as in the recursive definition. The recursive definition consumes constant memory even if we keep a reference to it around while traversing it, while the unfold-based implementation does not. Preserving sharing isn’t something we usually rely on when programming with streams, since it’s extremely delicate and not tracked by the types. For instance, sharing is destroyed when calling even <code>xs.map(x =&gt; x).</code></p> </blockquote> <p>What do the authors mean when saying that we are not getting <em>sharing</em>? What exactly is shared and why it's not preserved in <code>unfold</code> version? Also the sentence about constant memory consumption is not clear as well.</p>
0non-cybersec
Stackexchange
How can I store each separate entire line in a text file into an array?. <p>I have a file called "threewords". It contains the information:</p> <pre><code>\#gray speedy bee gr-A | sp-E-d-E | b-E \#gray greedy pea gr-A | gr-E-d-E | p-E </code></pre> <p>When I run the command:</p> <pre><code>cat threewords | grep ^# | cut -c2- </code></pre> <p>The command pulls the two lines beginning with #. It then removes the # and returns this as output:</p> <pre><code>gray speedy bee gray greedy pea </code></pre> <p>When I run my command:</p> <pre><code>array=($(cat threewords | grep ^# | cut -c2-)) </code></pre> <p>It creates the array but it separates all the words into separate array positions like this:</p> <pre><code>array[0] = gray, array[1] = speedy, array[2] = bee, array[3] = gray, array[4] = greedy, array[5] = pea </code></pre> <p>I can figure out the code to make it put the output of each line into an array like so:</p> <pre><code>array[0] = gray speedy bee, array[1] = gray greedy pea </code></pre>
0non-cybersec
Stackexchange
Sony Employees Respond to 'PS4 No DRM' Campaign.
0non-cybersec
Reddit
My 3 year old daughter is being called a baby by another kid at daycare because of how she speaks. She does have difficulty pronouncing words but it hurts to see her embarrassed by it.. It does bother her to be called a baby and I've mentioned this to one of the teachers at her daycare (though she claimed she'd never heard any of the other kids say this though my husband heard it firsthand himself). Anyways, she said she would intervene if she ever heard any of the kids calling her that. But I guess my question is, will she just grow out of it or should we get her to see a Speech Therapist?
0non-cybersec
Reddit
Second screen not disconnecting (HDMI). <p>I have an HP Pavilion TouchSmart laptop running Ubuntu 14.04.1 </p> <p>I usually connect a second display via HDMI which worked fine until today. I can connect the display fine and everything auto-configures properly. However, disconnecting the display has no effect most of the times - the desktop stays in extended mode and I can move the mouse / windows off the screen to where the second screen used to be. There is no short black-out that usually indicates a screen has been (dis)connected. </p> <p>I found out that just opening display settings under Ubuntu system settings fixes the issue and the system detects that I have in fact disconnected the second screen. The same happens when running xrandr from terminal - I'm using this as a workaround at the moment. </p> <p>There is one more strange thing - normally Super+P toggles between extended, clone, first screen only and second screen only modes. This works fine for me when the second screen is actually connected. After disconnecting the screen (and when the system doesn't register the disconnection), using this shortcut breaks all video output, I see fragments of the desktop on laptop screen, nothing seems to fix this problem except hard reset. </p> <p>I also have Windows 8.1 installed (dual boot) and everything works fine there, so it's not a hardware problem. The laptop has switchable graphic cards (Intel Haswell integrated CPU + AMD Radeon 8670M). I am using the default drivers and have never installed the proprietary ones.</p> <h1>[Edit - xrandr output]</h1> <p>HDMI Connected and working</p> <pre><code>Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 32767 x 32767 eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm 1366x768 60.1*+ 40.0 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 HDMI1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0*+ 1680x1050 59.9 1600x900 60.0 1280x1024 75.0 60.0 1280x960 60.0 1152x864 75.0 1280x720 60.0 1152x720 60.0 1024x768 75.1 60.0 832x624 74.6 800x600 75.0 60.3 640x480 75.0 60.0 720x400 70.1 VIRTUAL1 disconnected (normal left inverted right x axis y axis) </code></pre> <p>HDMI Properly disconnected</p> <pre><code>Screen 0: minimum 320 x 200, current 1366 x 768, maximum 32767 x 32767 eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm 1366x768 60.1*+ 40.0 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 HDMI1 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis) </code></pre> <p>HDMI Disconnected but still being detected as connected (running xrandr produces this and then fixes the problem). Notice the strange output at the end.</p> <pre><code>Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 32767 x 32767 eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm 1366x768 60.1*+ 40.0 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 HDMI1 disconnected 1920x1080+1366+0 (normal left inverted right x axis y axis) 0mm x 0mm VIRTUAL1 disconnected (normal left inverted right x axis y axis) 1920x1080 (0x68) 148.5MHz h: width 1920 start 2008 end 2052 total 2200 skew 0 clock 67.5KHz v: height 1080 start 1084 end 1089 total 1125 clock 60.0Hz </code></pre>
0non-cybersec
Stackexchange
Can I download other software via TBB safely?. <p>I use the Tor Browser Bundle for software downloads because I can not use the internet for this without Tor. Windows and Linux software download sites often do not use HTTPS, so I run the risk of having my downloads modified by the exit node without my knowledge. What is the correct way to verify my downloads are safe?</p>
0non-cybersec
Stackexchange
New Earring. John is at work one day when he notices that his co-worker, Zach, is wearing an earring. This man knows his co-worker to be a normally conservative fellow, and is curious about his sudden change in "fashion". "Hey Zach" he yells out "I didn't know you were into earrings." "Don't make such a big deal out of it, ..it's only an earring." Says Zach sheepishly. "No really," probes John, "How long have you been wearing one?" ... "Ever since my wife found it in our bed."
0non-cybersec
Reddit