text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
If Spurs win Patty Mills will become first indigenous Australian to win an NBA title.
0non-cybersec
Reddit
Is there a way to reduce the amount of ocean in a random seed?. I love playing new games of survival but I hate it when the seed seems to be a few small islands in a world that's like 90% open water. Edit: I'm on Java
0non-cybersec
Reddit
What is the most wicked thing a person ever did?.
0non-cybersec
Reddit
Changing tmux prefix on Mac (Mojave) to C+a captures Cmd+left. <p>I'm relatively new to Mac (coming from Linux) and in my tmux.conf file, I have the following:</p> <pre><code>unbind C-b set -g prefix C-a bind C-a send-prefix </code></pre> <p>which works as you would expect with one hick-up. Command+left-arrow, which performs the same function as 'Home' on Windows/Linux, is somehow treated like the tmux prefix.</p> <p>If I type:</p> <pre><code>command + left-arrow command + left-arrow </code></pre> <p>Then it works, but just a single press of cmd+left acts as the prefix.</p> <p>If I remove those lines entirely, cmd+left works fine, so I may just go back to ctrl+b as the prefix (I came from using screen, thus opting for ctrl+a)</p> <p>Any possible ideas on what might be causing this or is this perhaps just a bug with tmux?</p>
0non-cybersec
Stackexchange
Problem in figure environment in article. <pre><code>\documentclass{article} \usepackage{graphicx,amsmath,tikz} \begin{document} \begin{figure} \includegraphics{1.2.jpg} \caption{d} \end{figure} \end{document} </code></pre> <p>By using the above code I am getting the following error..</p> <blockquote> <p>Unknown graphics extension: .2.jpg. \includegraphics{1.2.jpg}</p> </blockquote> <p>How to fix that??</p>
0non-cybersec
Stackexchange
What is another way to approach this inequality?. <p>I was given this inequality to solve today and then somebody showed me a very clever and simple way to solve it. They made two assumptions and with both of those assumptions, they deduced the proper interval of the inequality. I tried to replicate their method, but I was not successful. </p> <p>This is how I solved it, but I would like to see that "assumptions" method again. It seemed more efficient. </p> <p>Steps I took:</p> <p>$$\frac { 2x }{ x-3 } &lt;1\\ $$</p> <p>Finding the critical points: $$\frac { 2x }{ x-3 } =1\\ $$</p> <p>$$2x=x-3$$</p> <p>Critical points are: $$x=3\quad or\quad x=-3$$</p> <p>Testing around the critical points shows that the interval is $(-3,3)$</p> <p>Can someone show me the "two assumptions" method?</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 is only ) a special character and not } or ]?. <p>I'm reading <a href="https://rads.stackoverflow.com/amzn/click/com/1411677609" rel="nofollow noreferrer" rel="nofollow noreferrer">Jan Goyvaerts' "<em>Regular Expressions: The Complete Tutorial and Reference</em>"</a> to touch up on my Regex.</p> <p>In the second chapter, Jan has a section on "special characters:"</p> <blockquote> <h3>Special Characters</h3> <p>Because we want to do more than simply search for literal pieces of text, we need to reserve certain characters for special use. In the regex flavors discussed in this tutorial, there are 12 characters with special meanings: the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, <strong>the opening parenthesis (, the closing parenthesis ), the opening square bracket [, and the opening curly brace {</strong>, These special characters are often called “metacharacters”. Most of them are errors when used alone.</p> <p><sup>(emphasis mine)</sup></p> </blockquote> <p>I understand that only open square bracket and open curly brace are special since a close brace or bracket is clearly a literal if there's no preceding open. <strong>However, why does Jan specify that close parenthesis <em>is</em> a special character if the other two close's aren't?</strong></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
Is the natural map $\Omega^*(M)\otimes \Omega^*(F) \rightarrow \Omega^*(M\times F)$ injective?. <p>As I self-study Bott and Tu 's Differential Forms in Algebraic Topology, I am stopped by some quite basic questions:</p> <p>1) Let $M$ and $F$ are real manifolds, and let $\pi : M\times F \rightarrow M$ and $\mu: M\times F \rightarrow F$ to the projection maps. Let $\psi :\Omega^*(M)\otimes \Omega^*(F) \rightarrow \Omega^*(M\times F)$ be the map given by $\omega\otimes\phi \mapsto \pi^*(\omega)\wedge \mu^*(\phi)$. Is the map $\psi$ injective?</p> <p>2) What exactly is the distinction bewteen $\omega\otimes\phi$ and $\pi^*(\omega)\wedge \mu^*(\phi)$? Before I really start thinking about the first question, I tend to think them as one same thing. Appreciated for any help.</p>
0non-cybersec
Stackexchange
Is ubuntu gamepack worth it? Compared to kubuntu 18.04?. <p>I'm a gamer but on my PC with kubuntu 18.04 lts kernel 5.4 I cant get tethering to work. The libraries and programs I need are said to be on this os. Is it wise to grab this os and use it since my method of downloading is to my phone and then transferring files to PC via mtp? So many problems with easy tether. </p> <p>To save forum space would it be wise to install the grub 2 efi bootloader to the iso? It only boots via legacy for me. </p> <p>My system is the Lenovo thinkcentre m73 10ax. </p>
0non-cybersec
Stackexchange
Seriously though, don't..
0non-cybersec
Reddit
How can you tell the difference between a milk intolerance and a milk allergy? .
0non-cybersec
Reddit
Texila Digipedia |Biology.
0non-cybersec
Reddit
This needs another pen.
0non-cybersec
Reddit
Leaked Document: German Government suspects Turkey to support terror groups in Middle East.
0non-cybersec
Reddit
Power Supply Question.... Hey guys - I'm curious what you all think about buying a 2018 power supply vs a newer one. Do you think the technology has increased to warrant going for a 2019 or 2020 one vs the one below? Let me know, thanks! &#x200B; **CORSAIR RMX Series (2018), RM650x, 650 Watt, 80+ Gold Certified, Fully Modular Power Supply** [https://www.amazon.com/gp/product/B079H6111J/ref=ox\_sc\_act\_title\_1?smid=ATVPDKIKX0DER&psc=1](https://www.amazon.com/gp/product/B079H6111J/ref=ox_sc_act_title_1?smid=ATVPDKIKX0DER&psc=1)
0non-cybersec
Reddit
Visited a historical place today.
0non-cybersec
Reddit
Colorbar from custom colorRampPalette. <p>I have defined a colorRampPalette:</p> <pre><code>my.colors = colorRampPalette(c("light green", "yellow", "orange", "red")) </code></pre> <p>How can I plot a colorbar "legend" item for it, preferably using only the base packages? I am after a rectangle filled with that color gradient.</p> <p>What I am really after is a way to produce the same type of legend (color bar) that is plotted with a "raster" raster:</p> <pre><code>require(raster) plot(raster("myfile.tif"), legend=T) </code></pre> <p>I need to be able to place this on top of another plot.</p>
0non-cybersec
Stackexchange
LaTeX does not generate the aux file. <p>I am executing the following command in the terminal, but that does not generate the <code>*.aux</code> file:</p> <pre><code>pdflatex main.tex </code></pre> <p>Why is it not generating the <code>main.aux</code> file?</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
ISCSI and SAN scaling. <p><strong>The Problem:</strong> I have a photography studio, and I ran into a problem when I just ran out of space on a monthly basis. Every month I just purchased additional HDD for a file server. now I have approx 120 TB of data, and 120 TB for backup. I am looking for a solution that scales well since this storage will double almost every week from now on due to adding a 16-bit 8k video to the storage which takes up a lot of space.</p> <p><strong>My theoretical solution:</strong> I looked at NAS devices and one thing that i don't like is if it fails - the business fails. So then I started researching an alternative and found SAN. which is a bit more complicated and sound like it is a lot pricier then NAS solution. The reason I want to go with SAN is that if one block of the storage fails I have other blocks still available (with mirroring backups).</p> <p><strong>The Question:</strong> So after reading on how to set up SAN with ISCSI, I got very confused. SAN is a network of storage devices that runs ISCSI software. A target is a storage unit and initiator is a client. Target appears to be mounted like a local hard drive. that is a simple part of it, but What about scaling this whole thing. for example, if I have 5 servers that ran ISCSI target software can I merge them all together to be seen as 1 storage block.</p> <p>2) Can I partition that storage?</p> <p>3) if yes, can I manage accpartitions?partitions ?</p> <p>or I completely didn't get an idea about SAN and ISCSI protocol.</p> <p>And yes, I don't have money for fibre channel sadly. just yet :) Thanks for your attention</p>
0non-cybersec
Stackexchange
Superhero Cakes!.
0non-cybersec
Reddit
Hardening Virtual Machine. <p>I have a CentOS based product I'm looking to distribute it as a virtual machine (VMWare, XEN and KVM) and I have been lately assessing the steps needed to protect the VM. The VM's data shouldn't be accessible to anyone other than authorized people as it contains sensitive data, by this I mean a root password should always be requested or access denied.</p> <p>Using XEN it was possible to have access to the machine via the following ways:</p> <ul> <li>By editing the bootloader using the Dom0, therefore defeating any bootloader protections: xe-edit-bootloader -u -p 1</li> <li>By adding init=/bin/sh to the VM startup options</li> </ul> <p>Using VMWare you can mount the image on an other system and access the files.</p> <p>Possibly there are other ways of accessing the machine, my question here is, what are these other ways I should take into consideration and how can I prevent them including the ones I listed above?</p>
0non-cybersec
Stackexchange
For those of you who haven't watched it in a while and forgotten about 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
I work as an arcade game technician, and this game had a really creepy error screen....
0non-cybersec
Reddit
Keyboard shortcuts for switching Spaces?. <p>I have a laptop and a desktop both running 10.11.1; on the laptop I found a way to set up Spaces so that CTRL-1 would take me immediately to screen 1 and similarly for all the other screens. I rely on that convenience. But on my desktop I am still stuck with this stupid Mission Control 2-step procedure. I KNOW it's possible, but I have been unable to reproduce this convenience on the desktop. Can anyone remind me how it's done? </p>
0non-cybersec
Stackexchange
how to append string to &lt;a href=&quot; with jQuery or Javascript?. <p>I've the elements as follows,</p> <pre><code>&lt;div id="pager"&gt; &lt;a href="/somepath/1"&gt;First&lt;/a&gt; &lt;a href="/somepath/1"&gt;Previous&lt;/a&gt; &lt;a class="" href="/somepath/1"&gt;1&lt;/a&gt; &lt;a class="Current" href="/somepath/2"&gt;2&lt;/a&gt; &lt;a class="" href="/somepath/3"&gt;3&lt;/a&gt; &lt;a href="/somepath/3"&gt;Next&lt;/a&gt; &lt;a href="/somepath/20"&gt;Last&lt;/a&gt; &lt;/div&gt; </code></pre> <p>and I want it to be changed as follows within browser.</p> <pre><code>&lt;div id="pager"&gt; &lt;a href="/somepath/1?a=text"&gt;First&lt;/a&gt; &lt;a href="/somepath/1?a=text"&gt;Previous&lt;/a&gt; &lt;a class="" href="/somepath/1?a=text"&gt;1&lt;/a&gt; &lt;a class="Current" href="/somepath/2?a=text"&gt;2&lt;/a&gt; &lt;a class="" href="/somepath/3?a=text"&gt;3&lt;/a&gt; &lt;a href="/somepath/3?a=text"&gt;Next&lt;/a&gt; &lt;a href="/somepath/20?a=text"&gt;Last&lt;/a&gt; &lt;/div&gt; </code></pre> <p>So that I can use the "a" data values to next page. Can any one give me the code, which does the appends inside </p> <blockquote> <p><code>div id="pager"</code> -> <code>&lt;a&gt;</code> -> <code>href="</code></p> </blockquote> <p>and i wants to remove the added text with another onChange event.</p> <p>Thanks in advance</p>
0non-cybersec
Stackexchange
My internet service provider spying on me?. <p>I have found when I ping "www.google.com" the response is an ip address of my country location, not Google. The strange thing is the site opens normally. Anyone have an explanation?</p>
1cybersec
Stackexchange
Why cant i remake while having a afk?. Like, why? %80 of in my afk games i cant remake. Is this a bug? Even when score is 0-0, i just cant and its not up to me or my teammates. We literally cant. Same thing happened to my enemies too, they had afk jungler who cames after 5 minutes but they said "wtf cant remake" after 3 minutes. &#x200B; Is this a bug?
0non-cybersec
Reddit
ITP the inside of a straw.
0non-cybersec
Reddit
jQuery plugin template - best practice, convention, performance and memory impact. <p>I've started to write few jQuery plugins and figured it'd be nice to setup my IDE with a jQuery plugin template. </p> <p>I have been reading some articles and posts on this site related to plugin convention, design, etc.. and thought I'd try and consolidate all of that.</p> <p>Below is my template, I am looking to use it frequently so was keen to ensure it generally conforms to jQuery plugin design convention and whether the idea of having multiple internal methods (or even its general design) would impact performance and be prone to memory issues.</p> <pre><code>(function($) { var PLUGIN_NAME = "myPlugin"; // TODO: Plugin name goes here. var DEFAULT_OPTIONS = { // TODO: Default options for plugin. }; var pluginInstanceIdCount = 0; var I = function(/*HTMLElement*/ element) { return new Internal(element); }; var Internal = function(/*HTMLElement*/ element) { this.$elem = $(element); this.elem = element; this.data = this.getData(); // Shorthand accessors to data entries: this.id = this.data.id; this.options = this.data.options; }; /** * Initialises the plugin. */ Internal.prototype.init = function(/*Object*/ customOptions) { var data = this.getData(); if (!data.initialised) { data.initialised = true; data.options = $.extend(DEFAULT_OPTIONS, customOptions); // TODO: Set default data plugin variables. // TODO: Call custom internal methods to intialise your plugin. } }; /** * Returns the data for relevant for this plugin * while also setting the ID for this plugin instance * if this is a new instance. */ Internal.prototype.getData = function() { if (!this.$elem.data(PLUGIN_NAME)) { this.$elem.data(PLUGIN_NAME, { id : pluginInstanceIdCount++, initialised : false }); } return this.$elem.data(PLUGIN_NAME); }; // TODO: Add additional internal methods here, e.g. Internal.prototype.&lt;myPrivMethod&gt; = function(){...} /** * Returns the event namespace for this widget. * The returned namespace is unique for this widget * since it could bind listeners to other elements * on the page or the window. */ Internal.prototype.getEventNs = function(/*boolean*/ includeDot) { return (includeDot !== false ? "." : "") + PLUGIN_NAME + "_" + this.id; }; /** * Removes all event listeners, data and * HTML elements automatically created. */ Internal.prototype.destroy = function() { this.$elem.unbind(this.getEventNs()); this.$elem.removeData(PLUGIN_NAME); // TODO: Unbind listeners attached to other elements of the page and window. }; var publicMethods = { init : function(/*Object*/ customOptions) { return this.each(function() { I(this).init(customOptions); }); }, destroy : function() { return this.each(function() { I(this).destroy(); }); } // TODO: Add additional public methods here. }; $.fn[PLUGIN_NAME] = function(/*String|Object*/ methodOrOptions) { if (!methodOrOptions || typeof methodOrOptions == "object") { return publicMethods.init.call(this, methodOrOptions); } else if (publicMethods[methodOrOptions]) { var args = Array.prototype.slice.call(arguments, 1); return publicMethods[methodOrOptions].apply(this, args); } else { $.error("Method '" + methodOrOptions + "' doesn't exist for " + PLUGIN_NAME + " plugin"); } }; })(jQuery); </code></pre> <p>Thanks in advance.</p>
0non-cybersec
Stackexchange
Latency spikes on wifi - power saving measure?. <p>I'm seeing intermittent latency spikes when on wifi, but only when pinging my MBP from another machine and not when pinging from the MBP to another machine. It seems to be causing stuttering with Steam In-Home Streaming. Any suggestions are greatly appreciated!</p> <p>I feel strongly that this is the Mac and not the networking hardware. I've seen it on multiple access points across different vendors and channels. 2.4G and 5G are both affected.</p> <p>With wifi logging enabled, nothing is logged in <code>/var/log/wifi.log</code> during the ping test. Location services are disabled, and I'm not clicking on the wifi icon during the test. I have tried resetting the SMC.</p> <p><strong>Update</strong>: Shown below is the minimal example. I have run this test many times and for long durations. I have been constantly ingesting ping data into InfluxDB using Telegraf. <a href="https://imgur.com/a/SsQ29UD" rel="nofollow noreferrer">Here</a> is the last 7 days, where the orange is my MacBook. There are a couple other anomalies present, but it's clear the high latency has been occurring for a while.</p> <p><strong>Update 2</strong>: Wireshark on the MBP shows ICMP "Response Time" as consistently &lt; 0.1ms during the test. I believe it's looking at the time between when it sees the request come in from the reply go out.</p> <p>Here's the test. <code>192.168.1.242</code> is my MBP. After quitting (nearly) every application:</p> <pre><code>craig@pluto ~&gt; ping 192.168.1.242 -i 2 ... 22 packets transmitted, 22 received, 0% packet loss, time 78ms rtt min/avg/max/mdev = 1.037/*22.550*/*89.237*/28.546 ms </code></pre> <p>But outgoing pings are fine:</p> <pre><code>craig@Craigs-MBP ~&gt; ping 192.168.1.3 -i 2 ... 266 packets transmitted, 266 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.909/1.526/8.716/0.686 ms </code></pre> <p>Now here's something curious. If I rapidly send pings out, the inbound variance disappears!</p> <pre><code>craig@Craigs-MBP ~&gt; ping 192.168.1.3 -i 0.2 ... 417 packets transmitted, 417 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.984/1.469/3.799/0.290 ms </code></pre> <p>(while the above is running)</p> <pre><code>craig@pluto ~&gt; ping 192.168.1.242 -i 2 ... 38 packets transmitted, 38 received, 0% packet loss, time 147ms rtt min/avg/max/mdev = 1.001/*1.664*/3.758/0.767 ms </code></pre> <p>Given this, my best guess is there is some kind of power saving mechanism turning off the radio.</p> <pre><code>craig@Craigs-MBP ~&gt; pmset -g System-wide power settings: Currently in use: standbydelaylow 10800 standby 1 womp 0 halfdim 1 hibernatefile /var/vm/sleepimage powernap 1 gpuswitch 2 networkoversleep 0 disksleep 10 standbydelayhigh 86400 sleep 0 autopoweroffdelay 28800 hibernatemode 3 autopoweroff 1 ttyskeepawake 1 displaysleep 10 highstandbythreshold 50 acwake 0 lidwake 1 </code></pre> <p><a href="https://i.stack.imgur.com/Ocdh2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ocdh2.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/ltBIN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ltBIN.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/GHSXd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GHSXd.png" alt="enter image description here"></a></p> <p><strong>Update 3</strong>: Here are two simultaneous packet captures with the "same" ICMP packet highlighted. The left was captured using <code>tcpdump</code> on the Ubiquiti UniFi access point that my MBP is connected to, and the right was captured on the MBP. You can see the sequence number is the same. But the calculated response time from the access point's point-of-view is relatively high at 71 ms, while the MBP saw &lt; 1 ms between the request and the response.</p> <p><a href="https://i.stack.imgur.com/t1dDe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t1dDe.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
How to add placeholder text with search icon on jQuery data tables. <p>I'm using jQuery data tables and I want to display "search" text with search icon inside search input box as placeholder. I managed add the text. Please advice me how to add placeholder image</p> <pre><code>$(document).ready(function() { $('#example').DataTable({ oLanguage: { sSearch: '' }, "aoColumnDefs":[{ 'bSortable':false, 'aTargets':[3] } ] }); function InitComplete(oSettings) { $('#example_filter') .contents() .filter(function() { return this.nodeType == 3 }) .replaceWith('Refine search: '); } $('.dataTables_filter input').attr("placeholder", "Search"); </code></pre> <p>I need to know, how to add image something like <code>'&lt;i class='icon-search'&gt;&lt;/i&gt;'</code> </p>
0non-cybersec
Stackexchange
Oh.. That's how....
0non-cybersec
Reddit
jquery mobile, disable all button when loading overlay is showed. <p>Actually i can call this code</p> <pre><code>$(":input").attr("disabled",true); //Disable all input fields </code></pre> <p>to disable all buttons on my page. But i don't know how good is the performance when i have a lot of button on my page.</p> <p>I saw a trick that we create a loading indicator overlay, which is above all element on the page => user can not click on the buttons anymore</p> <p>is there any way to reuse the loading overlay of jquery mobile to archive the above trick? I'm not good at CSS so hopefully someone can help me.</p> <p>Thanks</p> <p><strong>Edited:</strong></p> <p>i ended up with using jquery.blockUI plugin for jQuery and it works as expected. And i added the default div with css from jquery mobile so that i still have the loading message of jquery mobile and the behaviour that i wanted</p> <p><a href="http://jsfiddle.net/peacemoon/rRKRr/3/" rel="noreferrer">Working sample here</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
iPhone 4 battery life on Wifi all day. <p>I want to ask what is the average life of your iPhone 4 running iOS 5, with Wifi turn on, and what you are doing is just surfing through Safari. I'm getting 1 percent decrease every 3 minutes. </p>
0non-cybersec
Stackexchange
Is there a specification for the &quot;BEGIN RSA PRIVATE KEY&quot; format?. <p>Until now I didn't find a specification (RFC or similar) for the file format that uses the BEGIN RSA PRIVATE KEY prefix and END RSA PRIVATE KEY suffix. Where is it defined? Is there an official name for it? It seems to be at least related to the series of PEM RFCs. </p> <p>I am looking for reference information about the details of whitespace handling, base64 details, joining of different keys in one file etc..</p> <p>This question is NOT about the ASN encoding of the payload.</p>
0non-cybersec
Stackexchange
A Quiet Place is great!. I was skeptical going in, but I loved it. Great sound. Perfect music. Good scares. Fantastic monsters. Family drama. A cringe-worthy scene or two. Can’t wait to go again this weekend.
0non-cybersec
Reddit
compute $P(XY\leq 3)$, $P(X+Y&gt;2)$ and $P(X/Y&gt;1)$. <blockquote> <p>The joint probability mass function of <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> is given by</p> <p><span class="math-container">$p(1,1)=\frac{1}{8}$</span> <span class="math-container">$p(2,1)=\frac{1}{8}$</span></p> <p><span class="math-container">$p(1,2)=\frac{1}{4}$</span> <span class="math-container">$p(2,2)=\frac{1}{2}$</span></p> <p>compute <span class="math-container">$P(XY\leq 3)$</span>, <span class="math-container">$P(X+Y&gt;2)$</span> and <span class="math-container">$P(X/Y&gt;1)$</span></p> </blockquote> <p>My attempt:</p> <p><span class="math-container">$P(XY\leq 3)=P(1,1)+P(1,2)+P(2,1)=\frac{1}{2}$</span></p> <p><span class="math-container">$P(X+Y&gt;2)=P(1,2)=P(2,1)+P(2,2)=\frac{7}{8}$</span></p> <p>But what about <span class="math-container">$P(X/Y&gt;1)$</span>? Is it <span class="math-container">$\frac{P(X=i,Y=2)}{P(y&gt;1)}$</span> ? where <span class="math-container">$u=1,2$</span></p>
0non-cybersec
Stackexchange
Whats the difference between newSlot and setSlot in the Io Language?. <p>In the Io Language, there are 2 methods for creating slots: newSlot and setSlot. Both seem to have similar behavior except newSlot also creates a setter. What cases are there for a needing a setter to be created at the same time as slot creation? What exactly is the purpose of the setter anyway?</p>
0non-cybersec
Stackexchange
[7?] I CAN TALK TO DOGS!!!!. Weed must have been some kind of magic!!!
0non-cybersec
Reddit
Deployments over Holidays. My current company seems to love scheduling major project deployments during holidays. To me this always seems like a bad idea, due to people wanting to be away from work or on vacation. I understand the desire on the management side to not interrupt normal business workflow, and holidays are essentially a free day in their calculus. What are your thoughts r/sysadmin? Are there good arguments to convince management to leave holidays alone without sounding like I'm "not a team player"? Are there strategies you use for deployments to reduce downtime or eliminate outages all together?
0non-cybersec
Reddit
Felt like doing a brown smokey-eye today. CCW!.
0non-cybersec
Reddit
Database Connection vs Raw TCP Connection. <p>I have some fundamental questions about how database clients &amp; database interact</p> <ol> <li>Do databases support multiple transactions simultaneously on a single database connection from client? If not, why not? (as multiplexing would save on resource overhead per connection &amp; connection pools are a source of contention when thousands of simultaneous queries needs to be executed simultaneously, which multiplexing for sure avoids)</li> <li>Whats the relationship between database client's level Connection vs physical raw TCP connection. Is it many-to-one[multuplexing] (or) one-to-one? If not multiplexed why not?</li> <li>If multiplexed, does the database server maintain a single logical connection from its end (or) multiple logical connections</li> </ol> <p>PS: I understand some of these details will vary from database to database, buit want to know in general how popular implementations such as Postgres, Mysql, Oracle, SQL server &amp; DB2 implement these</p>
0non-cybersec
Stackexchange
My image of the Deer Lick Group - a cluster of galaxies located over 50,000,000 light years away in true color.
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
Proof: $f(z)=Ce^{az}$. <p>Let $f$ be a holomorphic function with: $|f(z)|\leq Me^{aRe(z)},$ with $M,a$ positive real constants. It's obvious that $f$ is the complex exponential function , but to prove it, I assume: $$f(z)=Ce^{az}, \quad C\in \mathbb{C} $$ Then: $$\big|Ce^{az}\big| \leq Me^{aRe(z)} \iff \big|C\big|e^{aRe(z)} \leq Me^{aRe(z)} $$ So: $\big|C\big| \leq M.$</p> <p>Is this proved if I choose an arbitrary $C$ with its modulus less than M, or is it a bad way to handle this proof? Should I use <a href="https://en.wikipedia.org/wiki/Liouville%27s_theorem_(complex_analysis)" rel="nofollow noreferrer">Liouville's theorem</a>?</p>
0non-cybersec
Stackexchange
[Fanart][OC] Drew some characters!.
0non-cybersec
Reddit
How can I configure my shells to record all commands. <p>I am running ubuntu 12.04, how can I configure my shell/ubuntu so that 'history' commands will display all the previous command from different shells?</p> <p>Basically, I want to a list of my previous command regardless which shell I enter.</p> <p>Thank you.</p>
0non-cybersec
Stackexchange
Namedtuple like class. <p>I find myself writing this class often in my python code when I need a quick single use class.</p> <pre><code>class Struct(object): def __init__( self, **kwargs ): for k in kwargs: setattr(self,k,kwargs[k]) </code></pre> <p>The basic idea is so I can do quick things like this:</p> <pre><code>foo = Struct( bar='one', baz=1 ) print foo.bar foo.baz += 1 foo.novo = 42 # I don't do this as often. </code></pre> <p>Of course this doesn't scale well and adding methods is just insane, but even so I have enough data-only throw-away classes that I keep using it.</p> <p>This is what I thought <a href="http://docs.python.org/library/collections.html#collections.namedtuple" rel="noreferrer">namedtuple</a> was going to be. But the namedtuple's syntax is large and unwieldy.</p> <p>Is there something in the standard library I haven't found yet that does this as well or better?</p> <p>Is this bad bad style? or does it have some hidden flaw?</p> <h3>update</h3> <p>Two concrete example to show why I don't just use a dict. Both of these examples <em>could</em> be done with a dict but it obviously non-idiomatic.</p> <pre><code>#I know an order preserving dict would be better but they don't exist in 2.6. closure = Struct(count=0) def mk_Foo( name, path ): closure.count += 1 return (name, Foo( name, path, closure.count )) d = dict([ mk_Foo( 'a', 'abc' ), mk_Foo( 'b', 'def' ), # 20 or so more ] ) @contextmanager def deleter( path ): control = Struct(delete=True,path=path) try: yield control finally: if control.delete: shutil.rmtree(path) with deleter( tempfile.mkdtemp() ) as tmp: # do stuff with tmp.path # most contexts don't modify the delete member # but occasionally it's needed if keep_tmp_dir: tmp.delete = False </code></pre>
0non-cybersec
Stackexchange
How to check internet connection in alamofire?. <p>I am using below code for making HTTP request in server.Now I want to know whether it is connected to internet or not. Below is my code </p> <pre><code> let request = Alamofire.request(completeURL(domainName: path), method: method, parameters: parameters, encoding: encoding.value, headers: headers) .responseJSON { let resstr = NSString(data: $0.data!, encoding: String.Encoding.utf8.rawValue) print("error is \(resstr)") if $0.result.isFailure { self.failure("Network") print("API FAILED 4") return } guard let result = $0.result.value else { self.unKnownError() self.failure("") print("API FAILED 3") return } self.handleSuccess(JSON(result)) } </code></pre>
0non-cybersec
Stackexchange
Extension of a linear operator. <p>Let $T$ be a linear operator defined on the space of the algebraic polinomials in $[0,1]$ (polinomials with rational coefficients) such that for each $k \in \mathbb{N}, T[x^k]=0$. Is it possibile to extend the operator to the space of continuous functions in $[0,1]$? In that case, how would it value $T[sin(x)]$?</p> <p>I was thinking about using Hahn-Banach theorem. Actually, since the subspace is dense in $C([0,1])$ it is possible to have a unique extension (I read this through my notes...even if I don't have any proofs of it; if someone can send me a link about it, this would be really appreciated...is this just extending the operator to the closure of the domain where is defined?). </p> <p>After that, one corollary of Hahn-Banach theorem says: </p> <p>if $Y \subset X$ is a closed subspace and $x \notin Y$ then it exists $\Lambda \in X^*$ such that $\Lambda x=1$ but $\Lambda y=0$ for all $y \in Y$ (in this case I know the proof). </p> <p>This fact let me think that $T[sin(x)]=1$...am I right?</p>
0non-cybersec
Stackexchange
How does AppSync subscriptions handle resolver exceptions?. <p>I've noticed that throwing an exception in my subscription response mapping template results in the subscription not reaching the client. </p> <p>I am building a chat feature and need to ensure new messages are delivered to client devices consistently. What happens if there is throttling exception (as a result of not provisioning enough RCU for example)? The client will be unaware that a new message unsuccessfully attempted to reach them.</p> <p>Is there a way to retry the subscription, or at least inform the client so that they can pull new messages after a backoff period?</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
“We're born, we live a little while, we die. A spider's life can't help being something of a mess, with all this trapping and eating flies.“ RIP Charlotte ❤️ you inspired the younger generation.
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
Why older CPUs perform better?. <p>By "perform" I mean have better scores on websites like cpuboss.com or userbenchmark.com. Is that a bad metric, perhaps?</p> <p>An example: my old laptop has <a href="http://ark.intel.com/products/71670/Intel-Core-i7-3632QM-Processor-6M-Cache-up-to-3_20-GHz-BGA" rel="nofollow noreferrer">i7 3632QM</a>. New similarly priced laptops have [i7 6500U](i7 6500U). Here are the comparison: <a href="http://cpuboss.com/cpus/Intel-Core-i7-6500U-vs-Intel-Core-i7-3632QM" rel="nofollow noreferrer">cpuboss.com comparison for Intel Core i7 6500U vs. Intel Core i7 3632QM</a></p> <p>Note the advantage in the single core test.</p> <p>Then I compared it to a modern quad core (<a href="http://ark.intel.com/products/88967/Intel-Core-i7-6700HQ-Processor-6M-Cache-up-to-3_50-GHz" rel="nofollow noreferrer">i7 6700HQ</a>): <a href="http://cpuboss.com/cpus/Intel-Core-i7-6700HQ-vs-Intel-Core-i7-3632QM" rel="nofollow noreferrer">cpuboss comparison of Intel Core i7 6700HQ vs. Intel Core i7 3632QM</a></p> <p>Now the score is closer, but the new processor consumes even more energy, 14 nm notwithstanding.</p> <p>I'm quite confused, it makes it seem like there was no progress in 5 years.</p>
0non-cybersec
Stackexchange
How do you list all subgroups of D6 (which is of order 6)?. <p><span class="math-container">$G$</span> is the dihedral group <span class="math-container">$D_6$</span> of order 6. I need to find all subgroups of order 2 and order 3. I have found the cyclic group <span class="math-container">$\left&lt;b\right&gt; = \{e, b\}$</span>, but that's as far as I have come.</p> <p>How do you list all subgroups of eg. <span class="math-container">$D_6$</span>? and how would you present all subgroups of eg. order 2? </p>
0non-cybersec
Stackexchange
Colorado could ditch Obamacare for a single-payer system.
0non-cybersec
Reddit
Anyone use subscription boxes?. My Instagram feed is blowing up with keto stuff and a couple different subscription boxes have shown up. They mostly seem to be different mixed keto snacks. Has anyone tried them, does anyone have one they like?
0non-cybersec
Reddit
Replace space (&quot; &quot;) with no space (&quot;&quot;) in one column. <p>I have a table like this:</p> <pre> ID | Propinsi | Kota | _________________________ 1 | Aceh | Denpasar 2 | Aceh | Banda Aceh 3 | Sumatera | Asahan </pre> <p>This table has many rows. The problem is I want to replace the space before the text in column <code>Kota</code> for all rows like this:</p> <pre> ID | Propinsi | Kota | _________________________ 1 | Aceh |Denpasar 2 | Aceh |Banda Aceh 3 | Sumatera |Asahan </pre> <p>I searched Google, the function <code>replace</code> in MySQL only affects one row:</p> <pre><code>SELECT REPLACE(string_column, 'search', 'replace') as Kota </code></pre> <p>Can someone fix my problem?</p>
0non-cybersec
Stackexchange
Importing json from file into mongodb using mongoimport. <p>I have my json_file.json like this:</p> <pre><code>[ { "project": "project_1", "coord1": 2, "coord2": 10, "status": "yes", "priority": 7 }, { "project": "project_2", "coord1": 2, "coord2": 10, "status": "yes", "priority": 7 }, { "project": "project_3", "coord1": 2, "coord2": 10, "status": "yes", "priority": 7 } ] </code></pre> <p>When I run the following command to import this into mongodb:</p> <pre><code>mongoimport --db my_db --collection my_collection --file json_file.json </code></pre> <p>I get the following error:</p> <pre><code>Failed: error unmarshaling bytes on document #0: JSON decoder out of sync - data changing underfoot? </code></pre> <p>If I add the --jsonArray flag to the command I import like this:</p> <pre><code>imported 3 documents </code></pre> <p>instead of one document with the json format as shown in the original file. </p> <p>How can I import json into mongodb with the original format in the file shown above?</p>
0non-cybersec
Stackexchange
$\mathbb Q(\sqrt{5})$ contains infinitely many elements with a uniform bound on their partial quotients. <blockquote> <p>Show that <span class="math-container">$\mathbb Q(\sqrt{5})$</span> contains infinitely many elements with a uniform bound on their partial quotients, by checking that the numbers <span class="math-container">$\overline{[1^{r+1},4,2,1^r,3]}$</span> for <span class="math-container">$r\ge 0$</span> all lie in <span class="math-container">$\mathbb Q(\sqrt 5)$</span> (here <span class="math-container">$1^r$</span> denotes the string <span class="math-container">$1,1,...,1$</span> of length <span class="math-container">$r$</span>). Can you find a similar pattern in any real quadratic field <span class="math-container">$\mathbb Q(\sqrt d)$</span>?</p> </blockquote> <hr> <p>Since <span class="math-container">$u$</span> is a strictly periodic continued fraction, we know that <span class="math-container">$$ u=\frac{up_k+p_{k-1}}{uq_k+q_{k-1}}\quad\text{for}\quad u=\overline{[a_0;a_1,...,a_k]} $$</span> where <span class="math-container">$\frac{p_k}{q_k}=[a_0;a_1,...,a_k]$</span> and we have <span class="math-container">$$ u^2q_k+u(q_{k-1}-p_k)-p_{k-1}=0 .$$</span> <span class="math-container">$u$</span> has discriminant <span class="math-container">$\Delta=(q_{k-1}+p_k)^2-4(-1)^k$</span>. So it suffices to check whether <span class="math-container">$\Delta=5l^2$</span>, <span class="math-container">$l\in\mathbb Z$</span>.</p> <p>But how to show that for every <span class="math-container">$r$</span> this is true. I cannot come up with an induction.</p>
0non-cybersec
Stackexchange
Only just now noticed the alien in this picture, after seeing it countless times..
0non-cybersec
Reddit
The same Equifax exec who greenlit suspicious stock-sales was also in charge of cybersecurity.
1cybersec
Reddit
Minion management from salt server. <p>I have done salt server set up on ( ubuntu 12.04)and minion(windows server 2008 r2) as per <a href="http://salt.readthedocs.org/" rel="nofollow noreferrer">http://salt.readthedocs.org/</a> , Now i want to copy a folder includes .Exe files on it to minion in specific path and execute it, where my salt-minion(win 2008 r2) is having credentials ?</p>
0non-cybersec
Stackexchange
how to inline comment with eslint-prettier/prettier?. <p>i want to turn off the rule in prettier where it newlines an inline comment. my ESLint rule <code>no-inline-comments</code> is set to off or warn, so that is taken care of and works. turns out Prettier still wants to newline and inline comment:</p> <p><a href="https://i.stack.imgur.com/TReDN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TReDN.png" alt="enter image description here"></a></p> <p>i have a setup in my VSCode where ESLint is handling prettier for JS and the Prettier extension is handling all the other languages. im also using the <code>airbnb-base</code>. here are my relevant configs:</p> <p><code>.eslintrc.json</code>:</p> <pre><code>{ "extends": ["airbnb-base", "plugin:prettier/recommended"], "rules": { "no-console": 0, "no-plusplus": 0, "no-inline-comments": "off", "no-undef": "warn", "no-use-before-define": "warn", "no-restricted-syntax": [ "warn", { "selector": "ForOfStatement", "message": "frowned upon using For...Of" } ] // "line-comment-position": ["warn", { "position": "above" }] }, "env": { "browser": true, "webextensions": true } } </code></pre> <p>VSCode <code>settings.json</code>:</p> <pre><code> // all auto-save configs "editor.formatOnSave": true, // turn off for native beautifyjs "[javascript]": { "editor.formatOnSave": false }, "eslint.autoFixOnSave": true, "eslint.alwaysShowStatus": true, "prettier.disableLanguages": ["js"], "prettier.trailingComma": "es5" } </code></pre> <p>i know you can do <code>// eslint-disable-next-line prettier/prettier</code> above what you want ignored but i obviously wouldnt want to set that every time. you can see it commented out in my picture above.</p> <blockquote> <p>Generally, you get the best results when placing comments on their own lines, instead of at the end of lines. Prefer <code>// eslint-disable-next-line</code> over <code>// eslint-disable-line</code>.</p> </blockquote> <p><a href="https://prettier.io/docs/en/rationale.html#comments" rel="noreferrer">https://prettier.io/docs/en/rationale.html#comments</a></p> <p>im not sure if this is useful in this situation?:</p> <blockquote> <p>Note: While it is possible to pass options to Prettier via your ESLint configuration file, it is not recommended because editor extensions such as <code>prettier-atom</code> and <code>prettier-vscode</code> will read <code>.prettierrc</code>, but won't read settings from ESLint, which can lead to an inconsistent experience.</p> </blockquote> <p><a href="https://github.com/prettier/eslint-plugin-prettier#options" rel="noreferrer">https://github.com/prettier/eslint-plugin-prettier#options</a></p> <p>ive talked to a few people and it might not even possible? though, it is a rule somewhere and that should be able to be overridden. if there is any other information i can provide i will.</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
So this just happened in HeartGold.
0non-cybersec
Reddit
Large naked lady gets dragged (not far) by a truck NSFW.
0non-cybersec
Reddit
This moon lapse I made.
0non-cybersec
Reddit
How to properly apply open/closed principle on large code base for apparently unrelated features. <p>Let's say I have a class hierarchy like this:</p> <p><a href="https://i.stack.imgur.com/dhTmc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dhTmc.png" alt="enter image description here" /></a></p> <p>Now let's suppose I add later a new interface <code>Mechanic</code>, responsible for repairing a vehicle. Of course someone capable of repairing a car won't fix your broken bus. So you would have the BusMechanic and CarMechanic as implementations. My question would be, how do you create the right kind of mech ?</p> <p>I see either :</p> <h3>The Vehicle interface could instantiate the right mech</h3> <p>I could add a method to the vehicle interface <code>Mechanic createMechanic()</code> which would create a new Mechanic instance with the right class and parameters</p> <blockquote> <p>I find that it breaks SRP since that means that a vh has to handle its mech which is kinda nonsense.</p> <p>Also it clutters the interface.</p> </blockquote> <h3>The Vehicle interface could provide the factory</h3> <p>Another possibility would be to add a method <code>MechanicFactory getMechFactory()</code>. This would fix the SRP issue, but I still don't really like it.</p> <blockquote> <p>The Vehicle interface would still get cluttered</p> <p>The chain of calls could get really long and not really readable, like <code>customer.getVehicleFleet().getVehicleRegistry().getVehiculeForPlate(xxx).getMechanicFactory().createMechanic().getToolManager().getToolFactory().getRequiredTools()</code></p> <p>The vehicle providing the factory for the mechs is still a non-sense</p> </blockquote> <h2>Using a map/enum</h2> <p>I could also map the classes implementing Vehicle with the right mechanic implementation like :</p> <pre><code>Map.of(Car.class, CarMechanic.class, Bus.class, BusMechanic.class) </code></pre> <blockquote> <p>That would mean that someone subclassing a vehicle would also have to find all the relevant locations to map its class to the correct implementations</p> </blockquote> <p>So far, the 2nd approach seems the better one, albeit far from ideal</p>
0non-cybersec
Stackexchange
[NFLN] Antonio Brown Ranks 7th On NFL Network's Top 100 Players of 2019.
0non-cybersec
Reddit
15 Movies Defined By Amazing Song Choices.
0non-cybersec
Reddit
[No Regrets] My brother and I(f) masturbated next to each other in his bed Saturday night. I feel dirty, but I want to do it again..... ***Posted this to /r/sex last night, but it got removed.. Hopefully the mods here are a little more open-minded.*** Some context: I'm 32, he's 29. We live together. I was in his bed because he has a massive 55" TV on the wall at the foot of his bed so he can watch movies and TV shows while laying in bed. A while back I started joining him, then going to my room to sleep. Later staying his bed to sleep, and cuddle. Nothing sexual had ever happened; but we've always been super-close, so cuddling in bed is no big deal to us. We don't tell our friends about that part, though... Anyway, Saturday night I stayed in his bed. I awoke with a jolt from a nightmare in the early hours. It woke him up too and he got up to get me a glass of water. After settling back down, neither of us could sleep. After a while I could hear the fabric down there moving slightly. Then I started to feel movement. He was touching himself with the hand that wasn't around me..! He wasn't going at it hard, probably just rubbing the tip. Having a guy masturbate next to me was nothing new, but for some reason the thought of my little brother touching himself while I was cuddled up to him turned *me* on. I reached down and put my hand in my panties.... My movement made him stop and I think I heard him gasp quietly, then hold his breath. It couldn't have taken him long to figure out what I was doing; I was going real slow and gentle like he was. He resumed what he was doing and matched my speed. This made me quicken, which he in turn matched. We kept matching each other's speed until we were both flat on our backs with underwear off and legs spread (still completely under the covers), furiously fapping/schlicking.. Heaving breathing, moaning, grunting, wet slappy sounds... the works. I got off first, and he came just after. He cleaned himself up and we just lay there silently for ages before I snuggled back up to him and we went to sleep. The next day nothing was unusual. We talked, but not about what we did. In the silences during our conversations we would give each other cheeky smiles, but we couldn't bring ourselves to discuss it. Last night I slept in my own bed. We haven't talked yet today (it's currently midday Monday here in Australia); he went out early and I'm going out shortly. We won't see each other to dinner-time. The orgasm I had that night was the best I have ever given myself. Overall it was the most intimate experience I have ever shared with another human being. While I have no regrets, I feel dirty and naughty; but I very much want to do it again and I think he does too. ARGH! I can't stop thinking about it! I know we need to talk about it, but not sure how to bring it up. I also know it's something we *"shouldn't"* do, but we're adults and it's consensual, so I can't see any harm...
0non-cybersec
Reddit
Codenames rule question.. So my family got in a big argument about this one. Someone used MLK as the clue when king was on the board, and I said that was BS. What do yall think?
0non-cybersec
Reddit
What is the “Safety Tips” component present on chrome://components?. <p>I'm worried about a component I've seen on my <a href="http://chrome://components" rel="nofollow noreferrer">chrome://components</a> list. It's name is <strong>Safety Tips</strong> (see the <a href="https://i.stack.imgur.com/t6EZl.png" rel="nofollow noreferrer">Image description here</a>).</p> <p>Is it malware or a virus of any kind? How do I uninstall it?</p> <p>My operating System is Ubuntu Mate 18.04</p>
1cybersec
Stackexchange
Modal math font commands in modern LaTeX? (i.e. modal version of \mathrm etc.). <p>Is there a modern <em>modal</em> version of the math font commands?</p> <p>In modern LaTeX, the use of old font-commands like <code>\rm</code> is quite strongly discouraged, with the commands being removed from the Kernel, and therefore unavailable in modern versions of some document classes (the KOMA-script classes in particular).</p> <p>However, I always found them quite useful to make editing easier, as I find reading and writing</p> <pre><code>\int_{\rm BZ} \chi^{\rm(2D)} </code></pre> <p>much easier than</p> <pre><code>\int_{\mathrm{BZ}} \chi^{\mathrm{(2D)}} </code></pre> <p>primarily due to the smaller level of brace-nesting.</p> <p>In text-mode, there are modal commands like <code>\bfseries</code>¹, but these commands are forbidden in math-mode.</p> <p>It is easy enough to reenable the font commands if needed (e.g. for compiling an old document) with <code>\DeclareOldFontCommand</code>, but is there some modern replacement?</p> <p><strong>Note:</strong> I am primarily looking for comands that are supported without custom definitions or special packages, as </p> <ul> <li>Journals may require that submitted documents use no packages beyond the template, and don't include user-defined macros. </li> <li>Custom commands make copy/paste of text and equations across documents difficult. </li> </ul> <hr> <p>¹ Leaving other issues with using the modal commands asigde, in text-mode unlike math-mode, the word meant to be emphasized is rarely <em>already</em> in braces, so <code>Hello {\bfseries World}</code> provides no real advantage over <code>Hello \textbf{World}</code>, in the manner <code>a^{\rm stuff}</code> does compared to <code>a^{\rm stuff}</code> in math-mode.</p>
0non-cybersec
Stackexchange
Dropped my D7200 on the beach. Advice?. A few nights ago I dropped my D7200 in the sand. It landed mostly on the screen side, getting sand in buttons and around the screen borders. I cleaned as much sand as I could using a hand blower but still have some concerns and issues. There's some sand stuck under the on/off switch, it feels gritty when I use the switch. I also can't remove the sand around the screen borders and around the speaker border. I tried using compressed air, but the sand is still there. Should I take this to a camera repair shop and have everything disassembled and cleaned? If so, is there anything I should try before taking it to a shop? Are there any other potential problems that I should worry about? Thanks for the advice!
0non-cybersec
Reddit
Claim to the Dynasty in China's Three Kingdoms?. I know the topic's been done to death already, almost always concluding with the moral and political ambiguity of innumerable succeeding characters, but who really had the right to the Imperial throne in the very beginning? Amongst the three factions, who would be best justified to claim the throne in the beginning? Is it possible for the factors like popular opinion, royal lineage, economic policies, and etc. to be summed up in one group, and determine which individual of the three factions had the best claim?
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
Shenzhou-9 docks with Tiangong-1.
0non-cybersec
Reddit
How can I make my Mac accept a user password of less then 4 characters?. <p>I don't want secure password for my desktop. Instead I use just two letters for quick typing. I can change password in terminal by running:</p> <pre><code>passwd </code></pre> <p>But terminal gives me: <code>Failed global policy "com.apple.defaultpasswordpolicy" Password change failed because password does not meet minimum quality requirements</code></p> <p><a href="https://apple.stackexchange.com/questions/337468/how-to-set-short-user-password-macos-mojave">I believe if the password has less than 4 characters this is blocked.</a> The same limitation is when trying to set it by preference panel obviously.</p> <p>Until now in last versions of system, only solution I found was installing of Server application from Apple and basically modifying you osx by it to be a server, so you can access one setting for password characters policy and be able to set whatever password you like. So is there other option ?</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
Can we please skip the Battle For The Exodar scenario on alts?. We can completely and entirely skip the entire introduction plot to this expansion on any toon. But literally *everyone* has to sit through Prophet "Mopeypants" Velen bitch about the light dying. The scenario is dull, the Exodar is dull, listening to all the stupid RP between killing waves of demons is dull, and forcing every Tom Dick and Harry to sit through that diarrhea just to have him go " ¯\_(ツ)_/¯ sucks to suck I can't do anything with it!" is just super duper tedious. Please let us have a dialog option to skip this feces like we have to skip the broken shore invasion.
0non-cybersec
Reddit
End Java threads after a while statement has been run. <p>I am having an issue ending threads once my program my has finished. I run a threaded clock object and it works perfectly but I need to end all threads when the time ´==´ one hour that bit seems to work I just need to know how to end them. Here is an example of the code I have and this is the only thing that runs in the run method apart from one int defined above this code.</p> <pre><code> @Override public void run() { int mins = 5; while(clock.getHour() != 1) { EnterCarPark(); if(clock.getMin() &gt;= mins) { System.out.println("Time: " + clock.getTime() + " " + entryPoint.getRoadName() + ": " + spaces.availablePermits() + " Spaces"); mins += 5; } } } </code></pre> <p>But when you keep watching the threads that are running in the debug mode of netbeans they keep running after an hour has passed not sure how to fix this. I have tried the interrupt call but it seems to do nothing. </p> <p><img src="https://i.stack.imgur.com/jwiqx.png" alt="enter image description here"> </p>
0non-cybersec
Stackexchange
What are the best resources you know for ancient cooking and ingredients?. I am looking for any website, blog, book or manual. Ideally a blog where someone details their recreations with photos. Google has mainly brought me Roman or 19th century English/American. I was hoping for some more diversity, hence this post. Thanks!
0non-cybersec
Reddit
Iran's Space Monkey Trip Faked? - Business Insider.
0non-cybersec
Reddit
[Schefter] Patriots have won 50 games over the last four seasons and have had overlapping streaks of at least 50 wins over a 4-season span since 2013. Since 1990, only teams who won 50 games over a 4-season span were Pats, Colts, Broncos — teams that had Tom Brady or Peyton Manning at QB..
0non-cybersec
Reddit
Oh hey, it's the flying spaghetti mon...oh god..
0non-cybersec
Reddit
How to copy and paste selected text in nano on a Mac?. <p>I’m using <a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nano.1.html" rel="noreferrer"><code>nano</code></a> in <a href="https://www.iterm2.com" rel="noreferrer">iTerm2</a>, I can mark the text using <kbd>ctrl</kbd>+<kbd>^</kbd> but I'm not able to copy and paste the text. I know that <kbd>ctrl</kbd>+<kbd>k</kbd> can be used cut the entire line. What is the keyboard shortcut for copying only marked text in <code>nano</code>?</p>
0non-cybersec
Stackexchange
I'm getting more well known as a car photographer and I feel like my skills aren't up to par. Any advice?. I love cars and figured hey I have a DSLR might as well take some pictures of cars that would be fun! I've been taking my camera to car meets and sharing the photos but now people are adding me and saying that my work is really good and I even have an offer to be a car club's photographer. I'm obviously excited about it and didn't expect people to actually like them. The thing is I don't feel like my skills are all that great. Can anyone give me some feedback on how I can improve my shots and maybe just some other tips for a automotive beginner photographer? [Some of my favorite shots](http://imgur.com/a/Ffb7H) I'm shooting with a Canon T3 and have the kit lens as well as a 50mm 1.8
0non-cybersec
Reddit
Create a VirtualBox VM from an existing bare metal Windows installation. <p>I have Windows 8.1 installed on one computer. I want to use it as a VM under VirtualBox on another computer. Is this possible? If so then how?</p> <p>All I'm trying to do is save a ton of time going through the installation process of all the software I already have installed on the existing 8.1 machine. If there's another way to do a fresh 8.1 install on a VirtualBox VM and then clone all the software installations from the original machine to the new VM then that would also achieve my objectives.</p>
0non-cybersec
Stackexchange
Running RavenDB as an EmbeddableDocumentStore and accessing RavenDB Management Studio. <p>I'm playing with an embedded RavenDB => <code>RavenDB-Embedded.1.0.499</code> package installed via NuGet in Visual Studio 2010. It's being used in a current project that I started after reading this excellent MSDN article:</p> <p><a href="http://msdn.microsoft.com/pt-br/magazine/hh547101%28en-us%29.aspx" rel="nofollow noreferrer">Embedding RavenDB into an ASP.NET MVC 3 Application</a></p> <p>Now I'd like to access the <a href="http://ayende.com/blog/125953/peeking-behind-the-curtains-the-new-ravendb-management-studio" rel="nofollow noreferrer">RavenDB Management Studio</a> (Web UI).</p> <p>I followed the steps described here: <a href="https://stackoverflow.com/q/6947092/114029">Is it possible to connect to an embedded DB with Raven Management Studio</a> and here <a href="http://ravendb.net/faq/embedded-with-http" rel="nofollow noreferrer">Running RavenDB in embedded mode with HTTP enabled</a> but I didn't get the point.</p> <p>This is the code I'm using to initialize the <code>DocumentStore</code>:</p> <pre><code>_documentStore = new EmbeddableDocumentStore { ConnectionStringName = "RavenDB", UseEmbeddedHttpServer = true }; </code></pre> <p>and this is the <code>ConnectionString</code> present in <code>Web.config</code>:</p> <pre><code>&lt;add name="RavenDB" connectionString="DataDir = ~\App_Data\Database" /&gt; </code></pre> <p>I also read the steps described in <a href="http://www.gamlor.info/wordpress/2011/08/ravendb-embedded-mode/" rel="nofollow noreferrer">RavenDB: Embedded Mode</a>. I tried to start the server manually:</p> <pre><code>// Start the HTTP server manually var server = new RavenDbHttpServer(documentStore.Configuration, documentStore.DocumentDatabase); server.Start(); </code></pre> <p>but the above code seems outdated since I have no <code>RavenDbHttpServer</code>, <code>documentStore.Configuration</code> and <code>documentStore.DocumentDatabase</code>. I managed to find <code>Raven.Database.Server.HttpServer</code> but the other objects are missing in the <code>_documentStore</code>.</p> <p>So, the question is: </p> <p>How can I hit the Web UI to visualize my embedded database docs? What's the URL I should put in my browser address bar?</p> <p>Any advice is appreciated.</p> <p><strong>EDIT:</strong> I've found a way of getting it to work. As I described in my blog post it may not be the best approach but it does work:</p> <p><a href="http://www.leniel.net/2011/11/ravendb-embedded-management-studio-ui.html" rel="nofollow noreferrer">RavenDB Embedded with Management Studio UI</a></p> <p>Note: one downside of the above approach is that I'm not able to access the database in my app because once it has been opened by the server it gets locked. This way I have to stop the server and then reload my app in the browser.</p> <p>I hope RavenDB's gurus out there have a better/correct approach... just let us know.</p>
0non-cybersec
Stackexchange
Ant error after installing NetBeans 7.3 in Lubuntu. <p>I have NetBeans 7.01 from Debian repository - all works. I have problem with NetBeans 7.3 from official site (installed at the same machine) - I can't compile anything:</p> <blockquote> <p><strong>ERROR - Ant is misconfigured and cannot be run.</strong> java.lang.ClassNotFoundException: org.apache.tools.ant.module.bridge.impl.BridgeImpl at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.apache.tools.ant.module.bridge.AntBridge$MainClassLoader.findClass(AntBridge.java:647) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at org.apache.tools.ant.module.bridge.AntBridge.createAntInstance(AntBridge.java:299) at org.apache.tools.ant.module.bridge.AntBridge.getAntInstance(AntBridge.java:279) at org.apache.tools.ant.module.bridge.AntBridge.getInterface(AntBridge.java:268) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)</p> </blockquote> <p>Lubuntu x32, all updates. Nimbus plugin.</p> <p>In <strong>Options -> Java -> Ant -> ant Home</strong> I can't choose valid folder. I tried <strong>usr/share/ant</strong>, but <strong>Ant not found: java.lang.ClassNotFoundException: org.apache.tools.ant.module.brigge.impl.Bridgelmpl</strong>, but I have <em>ant.jar</em> in this directory.</p>
0non-cybersec
Stackexchange
What do I make of unlinked tables in the same database?. <p>Just a basic question here but it's been bothering me for a while. Do all tables have to be related to another? I'm trying to design a database so far I have 15 tables, 13 of them have relationships with each other creating a regular snowflake pattern, but I have two other tables that only relate to each other, meaning they don't have any relationship to the any of the other 13 tables. Does this mean I should review my design or is this considered OK? </p> <p>Thank you for your help in advance.</p>
0non-cybersec
Stackexchange
GOP Intensifies Pressure On Obama To End Dakota Access Pipeline Protests..
0non-cybersec
Reddit