text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Lightning engulfs a volcanic eruption in Chile..
0non-cybersec
Reddit
How can I see whether tcp-offloading is enabled on a ubuntu server?. <p>I would like to find out if my Ubuntu VM uses tcp-offloading to increase the performance of VXLAN encapsulation. Where can I find this information on my machine?</p>
0non-cybersec
Stackexchange
Was DNA made first or the cell nucleus?. DNA is made inside the nucleus. However, can someone explain to me how the nucleus is made and where does DNA fit into it?
0non-cybersec
Reddit
Extracting lines around keys from a file. <p>I have a large file with around 15 million lines. The odd lines contains the keys (but not only the keys) and the even lines are the data. That is, the file is something like:</p> <pre><code>WRTZ Tyrosine 1287998798 ASDF Proline 9408654860 TYSR Serine 9809804090 ASDF Cytosine 4950409808 </code></pre> <p>The keys here are <code>ASDF</code>, <code>TYSR</code>, and <code>WRTZ</code>. </p> <p>I have a list of around 100000 keys. I want to extract the data (both lines) corresponding to these keys.</p> <p>One approach I tried was to <code>grep</code> the lines containing the keys to get the line numbers and then extract the line and the next line using <code>head</code> and <code>tail</code> in a loop. However, this seems to take a long time to run.</p> <p>Is there a more efficient way to do this?</p>
0non-cybersec
Stackexchange
Breakpoints in the argument-passing scheme of OCaml. <p>Today, I was going through the source code of <a href="https://www.janestreet.com/" rel="noreferrer">Jane Street</a>'s <code>Core_kernel</code> module and I <a href="https://github.com/janestreet/core_kernel/blob/master/lib/fn.ml#L23-L26" rel="noreferrer">came across</a> the <code>compose</code> function:</p> <pre class="lang-ml prettyprint-override"><code>(* The typical use case for these functions is to pass in functional arguments and get functions as a result. For this reason, we tell the compiler where to insert breakpoints in the argument-passing scheme. *) let compose f g = (); fun x -&gt; f (g x) </code></pre> <p>I would have defined the <code>compose</code> function as:</p> <pre class="lang-ml prettyprint-override"><code>let compose f g x = f (g x) </code></pre> <p>The reason they give for defining <code>compose</code> the way they did is &ldquo;because <code>compose</code> is a function which takes functions <code>f</code> and <code>g</code> as arguments and returns the function <code>fun x -&gt; f (g x)</code> as a result, they defined <code>compose</code> the way they did to tell the compiler to insert a breakpoint after <code>f</code> and <code>g</code> but before <code>x</code> in the argument-passing scheme.&rdquo;</p> <p>So I have two questions:</p> <ol> <li>Why do we need breakpoints in the argument-passing scheme?</li> <li>What difference would it make if we defined <code>compose</code> the normal way?</li> </ol> <p>Coming from Haskell, this convention doesn't make any sense to me.</p>
0non-cybersec
Stackexchange
VSCode editor - Restart NodeJs server when file is changed. <p>I am using Visual Studio Code as my editor for NodeJS project.</p> <p>Currently I need to manually restart server when I change files in my project.</p> <p>Is there any plugin or configuration change in VSCode that can restart NodeJS server automatically when I make change in files.</p>
0non-cybersec
Stackexchange
Android: how to make a view grow to fill available space?. <p>This seems straightforward, but I can't figure out how to do it. I have a horizontal layout with an EditText and two ImageButtons. I want the ImageButtons to be of a fixed size, and the EditText to take up the remaining space in the layout. How can this be accomplished?</p> <pre><code>&lt;LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"&gt; &lt;EditText android:layout_width="wrap_content" android:layout_height="wrap_content"&gt; &lt;/EditText&gt; &lt;ImageButton android:src="@drawable/img1" android:layout_width="50dip" android:layout_height="50dip"&gt; &lt;/ImageButton&gt; &lt;ImageButton android:src="@drawable/img2" android:layout_width="50dip" android:layout_height="50dip"&gt; &lt;/ImageButton&gt; &lt;/LinearLayout&gt; </code></pre>
0non-cybersec
Stackexchange
I'd be late for work every single day.
0non-cybersec
Reddit
The cuteness!.
0non-cybersec
Reddit
5 month old refusing all milk. Since a couple of nights ago, my 5 month old has been refusing all milk, breast or bottle. She has had maybe 3 full feeds, 1 4oz feed and 2 10 minute ish breast feeds in the last 2 days and we're getting quite concerned. She's not running a fever and is otherwise acting normally. We've seen a doctor and they said to wait and see. The doctor was not worried about dehydration as she has plenty of saliva and has tears when she cries (mostly when we try to feed her for extended periods) but wife and I are worried about her dryer than usual nappies. Is our baby going through a phase or is there something to be worried about? My wife and I are first time parents so we are extremely concerned and have no idea where to go from here. Edit: little update from the doctor for the curious. She says babies do go through a patch of eating very little at about 4 months old when the growth naturally slows down. As long as baby pass urine and has yellow poop, baby is taking enough. Weight gain slows down at this time. After 1-2 weeks they eat again. Natural way to prevent obesity.
0non-cybersec
Reddit
Raw data in lab report?. Should I put raw data in a lab report results section, I've been told that it's not exactly recommended and that I should just have graphs for the most part but I've only got 2 graphs for the assays I've carried out. Is it ever okay to have a relatively short set of results?
0non-cybersec
Reddit
These (ethically sourced) damselfly wing earrings.
0non-cybersec
Reddit
Bart Scott's Awesome Interview After Pats/Jets Game.
0non-cybersec
Reddit
A free music mood radio service that doesn't suck. Click "browse all" to pick an activity or mood..
0non-cybersec
Reddit
probability of an event occuring with numerous attempts. <p>If I have to pull ball out of a bag and I have a <span class="math-container">$4\%$</span> chance of picking the winning ball. I have <span class="math-container">$3$</span> attempts to pick out the winning ball (each time the odds are <span class="math-container">$4\%$</span> of success as the loosing ball is returned) What is my overall chance of picking out a winning ball? I would have believed it still to be <span class="math-container">$4\%$</span> overall but I am being told differently?</p>
0non-cybersec
Stackexchange
Deeply Understanding JavaScript Async and Await with Examples.
0non-cybersec
Reddit
To rest or not to rest?. I started the beginner routine last week, and had 2 session. This week I want to go for three, had the first on Monday, the second in Wednesday and today I should have the third. The thing is that I can feel my muscles still fatigued, not sore, but with not much strength in them. Should I work out no matter what and do what I can as the fatigue will go away with time or I should take another rest day? I really want to go outside and have fun doing my routine, but I'm scared that pressuring my body too much could harm.
0non-cybersec
Reddit
Which of the following conditions are necessary for the positive integer $n$ to be divisible by 6? Which of them are sufficient?. <p><strong>Question:</strong> Are my answers correct? I am particularly concerned with (ii) and (vii).</p> <blockquote> <p><strong>Which of the following conditions are necessary for the positive integer <span class="math-container">$n$</span> to be divisible by 6? Which of them are sufficient?</strong></p> <p>(i) 3 divides <span class="math-container">$n$</span>.</p> <p>(ii) 9 divides <span class="math-container">$n$</span>.</p> <p>(iii) 12 divides <span class="math-container">$n$</span>.</p> <p>(iv) <span class="math-container">$n =$</span> 12.</p> <p>(v) 6 divides <span class="math-container">$n^2$</span>.</p> <p>(vi) 2 divides <span class="math-container">$n$</span> and 3 divides <span class="math-container">$n$</span>.</p> <p>(vii) 2 divides <span class="math-container">$n$</span> or 3 divides <span class="math-container">$n$</span>.</p> </blockquote> <p><strong>Answers:</strong></p> <p>(i) necessary,</p> <p>(ii) none,</p> <p>(iii) sufficient,</p> <p>(iv) sufficient,</p> <p>(v) sufficient and necessary,</p> <p>(vi) sufficient and necessary,</p> <p>(vii) necessary.</p>
0non-cybersec
Stackexchange
My German Shepard/Golden Retriever Mix.
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
It Is Now Illegal To Discriminate Against Atheists In Madison, Wisconsin.
0non-cybersec
Reddit
Show view from non-view/viewmodel in mvvmcross. <p>What is the correct way to open a View in mvvmcross from a non-view? From within a viewmodel we would use ShowViewModel&lt;>(..).</p> <p>Specifically we are responding to a push notification opening the app (with a custom payload) which dictates a view that should be loaded. </p> <p>We have a hackety workaround just for proof of concept, just wanted to get an idea of the correct MVX approach</p>
0non-cybersec
Stackexchange
FBI pulls off hacker from flight who revealed aircraft can be hacked.
1cybersec
Reddit
eslint error : Cannot find any-observable implementation nor global.Observable. <p>I've installed latest <code>"rxjs": "6.2.2",</code> and <code>"redux-observable": "1.0.0",</code>.</p> <p>I have precommit hook that does eslint checks. </p> <p>After installation is started to throw this error:</p> <pre><code>C:\XXX\node_modules\any-observable\register.js:29 throw new Error('Cannot find any-observable implementation nor' + ^ Error: Cannot find any-observable implementation nor global.Observable. You must install polyfill or call require("any-observable/register") with your preferred implementation, e.g. require("any-observable/register")('rxjs') on application load prior to any require("any-observable"). at loadImplementation (C:\XXX\node_modules\any-observable\register.js:29:9) at register (C:\XXX\node_modules\any-observable\loader.js:32:18) at Object.&lt;anonymous&gt; (C:\XXX\node_modules\any-observable\index.js:2:39) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Module.require (module.js:579:17) at require (internal/module.js:11:18) husky &gt; pre-commit hook failed (add --no-verify to bypass) How can I fix it? Why eslint is doing stuff with files in `node_modules` anyway? </code></pre>
0non-cybersec
Stackexchange
Why is systemd&#39;s default target is graphical on AWS stock image. <p>I noticed that on stock AWS Debian image (both Stretch and Jessie), the default target as reported by <code>systemctl get-default</code> is <code>graphical.target</code>.</p> <p>AFAIK, systemd's <code>graphical.target</code> is equivalent to System-V runlevel 5. So my question is:</p> <p><strong>Shouldn't that be <code>multi-user.target</code> by default (runlevel 3), and what is the risk/benefit of setting it to <em>multi-user</em> with:</strong></p> <pre><code>sudo systemctl set-default multi-user.target </code></pre>
0non-cybersec
Stackexchange
Any good online wallets?. <p>I've used a lot of online wallets: xapo, wirex, cryptopay, blockchain, etc. But recently these wallets have started to disappoint with their fees (xapo), transaction time (blockchain), rates (wirex) and complex verification. So I was wondering are there any new good wallets with reasonable fees and their own debit cards? </p>
0non-cybersec
Stackexchange
Move &quot;if&quot; conditions to variables. <p>I am writting git hook file. I have following condition:</p> <pre><code>current_branch_name=$(echo $(git branch | grep "*" | sed "s;* ;;")) merged_branch_name=$(echo $(git reflog -1) | cut -d" " -f 4 | sed "s;:;;") release_branch_name="release" develop_branch_name="develop" master_branch_name="master" hotfix_branch_name="hotfix/*" if [[ ($current_branch_name == $release_branch_name &amp;&amp; $merged_branch_name == $develop_branch_name) || ($current_branch_name == $master_branch_name &amp;&amp; $merged_branch_name == $hotfix_branch_name) ]] ; then #do something fi </code></pre> <p>I would like to move conditions from <code>if</code> statement into a variable. I've done:</p> <pre><code>current_branch_name=$(echo $(git branch | grep "*" | sed "s;* ;;")) merged_branch_name=$(echo $(git reflog -1) | cut -d" " -f 4 | sed "s;:;;") release_branch_name="release" develop_branch_name="develop" master_branch_name="master" hotfix_branch_name="hotfix/*" is_merge_from_develop_to_release=$(($current_branch_name == $release_branch_name &amp;&amp; $merged_branch_name == $develop_branch_name)) is_merge_from_hotfix_to_master=$(($current_branch_name == $master_branch_name &amp;&amp; $merged_branch_name == $hotfix_branch_name)) if [[ $is_merge_from_develop_to_release || $is_merge_from_hotfix_to_master ]] ; then #do something fi </code></pre> <p>It gives me an error for <code>hotfix/*</code>, but it works if the entire condition is stuffed in the <code>if</code> statement. How can properly decouple conditions from <code>if</code> ?</p> <p><strong>EDITED</strong> (final version):</p> <pre><code>function checkBranches { local current_branch=$(echo $(git branch | grep "*" | sed "s;* ;;")) local merged_branch=$(echo $(git reflog -1) | cut -d" " -f 4 | sed "s;:;;") hotfix_branch_name="hotfix/*" [[ $current_branch == "release" &amp;&amp; $merged_branch == "develop" ]] &amp;&amp; return 0 [[ $current_branch == "master" &amp;&amp; $merged_branch == $hotfix_branch_name ]] &amp;&amp; return 0 return 1 } if checkBranches ; then #do something fi </code></pre>
0non-cybersec
Stackexchange
Google Chrome for macOS: How to bypass &quot;This type of file may harm your computer&quot; and save file automatically. <p>Every time I download a .DMG file using Google Chrome, I have to open the Downloads tab and manually keep it which is super annoying. It shows <strong>This type of file may harm your computer</strong> message. Is there any way to always keep them?</p> <p>Previously it can be configured in the settings but it seems there is no such setting in the latest version of Google Chrome.</p>
0non-cybersec
Stackexchange
Does anyone else agree with me on this book you probably don't care about?. In 7th grade, we were required to read *The Face on the Milk Carton* by Caroline B. Cooney. It was mediocre. Directly after that, we read the sequel, *Whatever Happened to Janie*. It was (and still is) the worst book I've ever read. A fun hobby I have taken up is purchasing bad books on iBooks and then, whilst reading them, use the note function to riff on the book. It's quite enjoyable. I even did one for the fifth book in the Milk Carton series. Me and my friend also made a 15 minute presentation for our english class briefly going over a few of the major problems of the book. I recently decided I would go through the previously mentioned first two books of the Milk Carton series, and possibly even the sequels. The first one was mediocre. The second one made me so angry I lost the ability to be angry for a couple of days. I'm only a third of the way in. It's worse than I remembered. Yet, whenever I look online for reviews, it seems to be rather well-recieved. Now, I have no problem with people having differing opinions, but this series focuses on the meanest, whiniest, most self centered, manipulative, rude, selfish, unloving, uncaring, idiotic, indecisive, untrustworthy, insufferable little bitch I've ever read about. AND WE'RE SUPPOSED TO LIKE HER! Please, just let me know if anyone agrees with me on this books quality. If you disagree, feel free to! But I would like to know your reasoning for liking it, if you wouldn't mind.
0non-cybersec
Reddit
ES6 module syntax: is it possible to `export * as Name from ...`?. <p>See question title. I found a <a href="https://stackoverflow.com/a/34842087/718180">great reference</a> for the forms of <code>export</code> available, but I have not seen what I'm looking for.</p> <p>Is it possible to do something like the following?</p> <pre><code>// file: constants.js export const SomeConstant1 = 'yay'; export const SomeConstant2 = 'yayayaya'; // file: index.js export * as Constants from './constants.js'; </code></pre> <p>I.e. this would provide a named export <code>Constants</code> inside of <code>index.js</code> containing all of the named exports from <code>module.js</code>.</p> <hr> <p><a href="https://stackoverflow.com/questions/42728140/is-it-possible-to-export-as-foo-in-typescript">This answer</a> seems to indicate it's not possible in TypeScript; is the same true for pure JavaScript?</p> <p>(This example is a bit contrived; in reality I'm trying to have a <code>prop-types.js</code> module that uses named exports for internal use within the React package, but also exports the prop type definitions under <code>PropTypes</code> for external consumption. I tried to simplify for the sake of the question.)</p>
0non-cybersec
Stackexchange
What is the security vunerability in this scenario?. <p>I saw this question:</p> <blockquote> <p>Suppose a university with address block 12.1.0.0/16 has a link connected to AT&amp;T, where the AT&amp;T router forwards packets destined to 12.1.0.0/16 to the university router. Suppose the university router has three forwarding entries: 12.1.1.0/24 out the link to the math department, 12.1.2.0/24 out the link to the CS department, and a “default route” for 0.0.0.0/0 pointing to the AT&amp;T router. Suppose a host in the rest of the Internet sends a packet destined to 12.1.57.109. What would happen to that packet? What could be done to prevent it?</p> </blockquote> <p>the answer is :</p> <blockquote> <p>The packets would loop between the AT&amp;T and university routers, because AT&amp;T would forward the packet to the university (using the route for 12.1.0.0/16) and the university would forward the packet back to AT&amp;T (using the default route 0.0.0.0/0). The university should configure a “null route” to drop all packets matching 12.1.0.0/16 to prevent this. See <a href="http://www.nanog.org/mtg-0602/gao.html">http://www.nanog.org/mtg-0602/gao.html</a> for details about this issue, and the security vulnerabilities associated with it.</p> </blockquote> <p>I can't understand what are the security vulnerabilities associated with it</p> <p>all above taken from <a href="http://www.cs.princeton.edu/courses/archive/spring11/cos461/exams.html">http://www.cs.princeton.edu/courses/archive/spring11/cos461/exams.html</a></p>
0non-cybersec
Stackexchange
Count non null fields in an object. <p>I have a <code>UserProfile</code> class which contains user's data as shown below:</p> <pre><code>class UserProfile { private String userId; private String displayName; private String loginId; private String role; private String orgId; private String email; private String contactNumber; private Integer age; private String address; // few more fields ... // getter and setter } </code></pre> <p>I need to count non <code>null</code> fields to show how much percentage of the profile has been filled by the user. Also there are few fields which I do not want to consider in percentage calculation like: <code>userId</code>, <code>loginId</code> and <code>displayName</code>.</p> <p>Simple way would be to use multiple <code>If</code> statements to get the non null field <code>count</code> but it would involve lot of boiler plate code and there is another class <code>Organization</code> for which I need to show completion percentage as well. So I created a utility function as show below:</p> <pre><code>public static &lt;T, U&gt; int getNotNullFieldCount(T t, List&lt;Function&lt;? super T, ? extends U&gt;&gt; functionList) { int count = 0; for (Function&lt;? super T, ? extends U&gt; function : functionList) { count += Optional.of(t).map(obj -&gt; function.apply(t) != null ? 1 : 0).get(); } return count; } </code></pre> <p>And then I call this function as shown below:</p> <pre><code>List&lt;Function&lt;? super UserProfile, ? extends Object&gt;&gt; functionList = new ArrayList&lt;&gt;(); functionList.add(UserProfile::getAge); functionList.add(UserProfile::getAddress); functionList.add(UserProfile::getEmail); functionList.add(UserProfile::getContactNumber); System.out.println(getNotNullFieldCount(userProfile, functionList)); </code></pre> <p>My question is, is this the best way I could count not <code>null</code> fields or I could improve it further. Please suggest.</p>
0non-cybersec
Stackexchange
Closed-form for $F(n) = \sum_{d|n} \omega_x(d) $. <blockquote> <p>Given <span class="math-container">$x\in \mathbb{C}$</span> let's define the function <span class="math-container">$$\cases { \omega_x(n)=1, \quad n=1 \\ \omega_x(n)=x^r, \quad n=p_1^{a_1}p_2^{a_2}\cdots p_r^{a_r}}$$</span></p> <p>a) Prove that <span class="math-container">$\omega_x(n) \colon \mathbb{N} \longrightarrow \mathbb{C} $</span> is multiplicative</p> <p>b) Develop a closed-form for <span class="math-container">$F(n) = \sum_{d|n} \omega_x(d) $</span></p> </blockquote> <p>I think I found a closed-form in order to solve the part b) but I am not sure if it is correct.</p> <p>I know that, given <span class="math-container">$\omega_x(n)$</span> multiplicative, <span class="math-container">$F(n)$</span> is multiplicative too, so I split it into the <span class="math-container">$r$</span> parts of the factorization of <span class="math-container">$n$</span> <span class="math-container">$$F(p_1^{a_1}p_2^{a_2}\cdots p_r^{a_r})= F(p_1^{a_1})F(p_2^{a_2}) \cdots F(p_r^{a_r})$$</span> <span class="math-container">$$F(p_1^{a_1})=\omega_x(1)+\omega_x(p_1)+\omega_x(p_1^2)+\cdots +\omega_x(p_1^{a_1})= 1+x+x+\cdots+x=1+a_1x$$</span></p> <p>So</p> <p><span class="math-container">$$F(p_1^{a_1}p_2^{a_2}\cdots p_r^{a_r})= \prod_{i=1}^r(1+a_ix)$$</span></p> <p>Is it correct? Thank you for your help.</p>
0non-cybersec
Stackexchange
Deploying .Net Core WebAPI project on IIS. <p>I have created a simple web API using .Net Core and trying to publish it to IIS. But getting HTTP 500.</p> <p>I followed <a href="https://docs.asp.net/en/latest/publishing/iis.html" rel="nofollow">https://docs.asp.net/en/latest/publishing/iis.html</a> article and did exactly whatever mentioned in that. </p> <p>I Installed only <a href="https://www.microsoft.com/net/download" rel="nofollow">https://www.microsoft.com/net/download</a> as </p> <blockquote> <p>DotNetCore.1.0.1-WindowsHosting.exe OPT_INSTALL_REDIST=0</p> </blockquote> <p><strong>NOTE :</strong> I am able to deploy and access MVC application successfully but cannot access WebAPI application with the same steps.</p> <p>In the IIS logs i am seeing below error.</p> <blockquote> <p>Failed to start process with commandline '"dotnet" .\Project-1.dll', ErrorCode = '0x80070002'.</p> </blockquote> <p>I am using the default web api template provided in Visual Studio 2015</p> <p>am i missing something. Is WebAPI deployment is different to MVC app deployment w.r.t .net core ?</p>
0non-cybersec
Stackexchange
Win/Lose ratios and selection strategies. <p>Imagine the following scenario: </p> <p>You're on a TCG tournament which allowed you to bring N decks with you. After each game, you might select another deck for your next game. You are allowed to keep score of each deck. Of course, some deck(s) will perform better in that day's meta than others. Your goal, after each match, is to try and select the best deck for the next one. </p> <p>No, this is not an assignment, just something I've been thinking of lately. </p> <p>For example, let's say I have 3 decks, A, B, and C. </p> <p>My 1st selection strategy would be something like this:<br> Switch to a random other deck each time you lose. Otherwise, keep playing with the same deck. </p> <p>Example: In my 1st game, I win with deck A, so I keep it for my 2nd game. I win again, and I keep it for my 3rd game. I lose my third game, so I get to pick randomly (50-50 chance) between deck B and C. </p> <p>So, then I decided to refine it a bit, so here's my 2nd attempt: If you win, keep playing with that deck. If you lose, do a roulette wheel selection of the remaining 2 deck, where weights are normalized win ratios of each deck. </p> <p>So, let's imagine this situation:<br> Deck A: 5W/5L => 0.5 ratio<br> Deck B: 3W/5L => 0.375 ratio<br> Deck C: 2W/5L => 0.286 ratio </p> <p>I'm currently playing with deck A and I lose. So, I get to pick between deck B and C. Their normalized weights are 0.567 for deck B and 0.433 for deck C. That means, on a selection, deck B has 56.7% chance to be selected, and deck C 43.3% chance. </p> <p>For my 3rd attempt, I asked myself this question: what if deck A is really superior in this meta, shouldn't I include it as well in selection? </p> <p>If so (using example from 2), the chances for each deck being selected: </p> <p>Deck A: 43.1%<br> Deck B: 32.3%<br> Deck C: 24.6% </p> <p>That makes sense, right, using overall win ratios? </p> <p>Well, not quite. It would work OK if we had the same amount of data for each deck. That made me go further. </p> <p>Again, some win/lose ratios: </p> <p>Deck A: 2W/1L = 0.67<br> Deck B: 20W/20L = 0.5<br> Deck C: 49W/51L = 0.49 </p> <p>Now, as you can see, the data is skewed. By our last method, here are the chances for selecting each deck: </p> <p>Deck A: 40.4%<br> Deck B: 30.1%<br> Deck C: 29.5% </p> <p>Now, I don't find that too good, because the amount of data on deck A is missing. Yes, it might be a great deck, but decks B and C have shown some good performance over much more games than deck A. </p> <p>So, what I really am looking for is a function that will take in consideration the amount of games played as well as win ratio. Here are the guidelines: </p> <p>If deck has high win ratio, and high play count relative to others, mark it good<br> If deck has high win ratio, but low play count relative to others, mark it possibly good<br> If deck has low win ratio, and high play count relative to others, mark it crap<br> If deck has low win ratio, but low play count relative to others, mark it unknown, but worse than high win ratio, low play count </p> <p>So, the function should use the relative play count to reinforce good win ratios, and discourage decks with low win ratios, but not exclude them entirely. Also, it should give decks with low relative play count a chance, but not over already proven deck. </p> <p>Is there a (simple) function for this kind of assessment? </p>
0non-cybersec
Stackexchange
Diagnosing random, temporary computer &quot;pauses&quot;. <p>My computer that I use every day has had the problem for over a year where periodically (between once and six times per day) it will become mostly unresponsive for a short period of time. This is characterized by:</p> <ul> <li>The mouse cursor moves.</li> <li>I can use the window manager (click to foreground a window/app, drag to move windows).</li> <li>iTunes music will continue to play (sometimes pausing, presumably when the buffer ran out).</li> <li>Asking any application to do most anything will result in that application becoming unresponsive - grey window, spinning cursor. I can't type in Sublime Text editor, I can't load a web page, I can't change volume on the computer using keyboard hardware keys. I can often change the selected message in Outlook, but the Preview pane will not actually load what I have selected.</li> </ul> <p>After about 10-30 seconds everything returns to normal, including processing most queued up actions.</p> <p>I just reformatted and re-installed the OS from scratch. Re-installed the most common apps, and during installation day noticed it happening. Now, days later, it's still going on.</p> <h2>Possibly Relevant Details</h2> <ul> <li>Windows 7x64</li> <li>On a corporate domain with group policy managed by IT</li> <li>Sophos Antivirus (forced by IT, cannot prevent it)</li> <li>8GB RAM; usually no more than 5GB physical in use when this happens</li> <li>Three hard drives, each with between 35-80GB free. <ul> <li>I ran a disk check on the C: drive, including checking for bad sectors - no issues reported</li> </ul></li> <li>I have left Process Explorer running today and after each system pause I frantically scanned through both the system graphs and a few per-process graphs (e.g. Sohpos, iTunes). I have not seen any spikes in CPU or IO when this occurs.</li> <li>I almost always have running: MS Outlook, iTunes, Skype, Google Chrome. (Just in case one of these apps might be the culprit.)</li> <li>I have two display cards—GeForce GTX 670 &amp; GeForce 9600GS—driving four monitors. Most recent GeForce driver.</li> <li>I cannot detect any activity on my part that triggers this. I will often be doing something as simple as typing text in Sublime Text, and have been typing for tens of minutes, when suddenly it will go non-responsive.</li> </ul> <p>Are there any OS-level software issues could cause these sorts or freezes, this mix of working and not? Are any of them ruled out by having re-installed the OS fresh? What diagnostic tools could help to detect these?</p> <p>Are there any hardware issues that would cause this sort of problem? What tools might I run to test these?</p>
0non-cybersec
Stackexchange
Connections and metrics on Riemannian manifolds. <p>In a lecture on connections it was claimed that a manifold "attains a shape" when it is equipped with a connection while there were no mentions of a metric.</p> <p>Is it correct to intuitively think that the connection determines the "shape" via how tangent spaces are "connected" or equivalently a rule how tangent vectors are moved in parallel manner between such spaces, while the metric only determines length of the same tangent vectors(and hence any curve). </p> <p>And therefore the metric structure and connection structure is completely independent in general, i.e two completely separate things, unless your connection is defined in terms of the metric by kind of brute force as in the Levi-Cevita case, which is a very special case yet very meaningful.</p> <p>Here's a link to the lecture <a href="https://www.youtube.com/watch?v=2eVWUdcI2ho" rel="nofollow noreferrer">https://www.youtube.com/watch?v=2eVWUdcI2ho</a>. The discussion starts at around 5:30 and lasts until about 9:00.</p>
0non-cybersec
Stackexchange
Seen on a walking trail in Fairmount Park in Philadelphia.
0non-cybersec
Reddit
Aubameyang wanted Milan but Dortmund wouldn’t sell..
0non-cybersec
Reddit
Unable to convert HDFS from non-HA to HA. <p><strong>Introduction</strong></p> <p><strong>Aim:</strong> Convert HDFS from non-HA to HA.</p> <p><strong>Method:</strong> According to <a href="http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-High-Availability-Guide/cdh4hag_topic_2_4.html" rel="nofollow noreferrer">this documentation</a> it should be possible to convert HFDS from non- to HA by implementing following configuration:</p> <p>/etc/hadoop/conf/hdfs-site.xml</p> <pre><code> &lt;property&gt; &lt;name&gt;dfs.ha.automatic-failover.enabled&lt;/name&gt; &lt;value&gt;true&lt;/value&gt; &lt;/property&gt; </code></pre> <p>/etc/hadoop/conf/core-site.xml</p> <pre><code> &lt;property&gt; &lt;name&gt;ha.zookeeper.quorum&lt;/name&gt; &lt;value&gt;localhost:2181&lt;/value&gt; &lt;/property&gt; </code></pre> <p>and executing following commands:</p> <p><code>sudo service hadoop-hdfs-journalnode start</code></p> <p><code>sudo service hadoop-hdfs-zkfc start</code></p> <p><code>hdfs namenode -initializeSharedEdits</code></p> <p><code>sudo -u hdfs hdfs namenode -bootstrapStandby</code></p> <p><code>sudo service hadoop-hdfs-namenode start</code></p> <p><strong>Results:</strong></p> <pre><code>14/06/09 15:37:15 FATAL namenode.NameNode: Exception in namenode join java.io.IOException: org.apache.hadoop.HadoopIllegalArgumentException: HA is not enabled for this namenode. at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:310) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1154) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1241) Caused by: org.apache.hadoop.HadoopIllegalArgumentException: HA is not enabled for this namenode. at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.parseConfAndFindOtherNN(BootstrapStandby.java:261) at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:92) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:305) ... 2 more 14/06/09 15:37:15 INFO util.ExitUtil: Exiting with status 1 14/06/09 15:37:15 INFO namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at localhost/127.0.0.1 ************************************************************/ </code></pre> <p><strong>Question</strong></p> <p>How to convert HDFS from non-HA to HA?</p>
0non-cybersec
Stackexchange
New ad campaign for MASP Art School.
0non-cybersec
Reddit
👌🏻 Friday..
0non-cybersec
Reddit
Need a Space themed Background? Here you go!.
0non-cybersec
Reddit
A 141-year-old guidebook to New York offers a glimpse into the nightlife of another time. .
0non-cybersec
Reddit
Two raid controllers in one HP ML350 G4 server. <p>Here's the situation: I have running HP Proliant ML 350 G4 server, which already has Adaptec AAC-RAID controller and 2 HDD built as Raid-1. Now, I want to add another 2 HDD but for them I have another controller (FastTrak TX2200). I connected the controller to the PCI slot and wired new HDDs. Then using FastTrak raid controller menu I created a new Raid and it shows me as one logical disk. However, my Ubuntu OS, does not recognize it as one drive - it shows me them both as different drives! I haven't partitioned the new drives yet, so maybe that might be the problem?</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
Definition of the Decryption oracle. <p>In the context of public-key encryption, what would be a formal definition of the decryption oracle? </p> <p>I know the informal definition (i.e., a function that is available to the adversary and that provides the decryption of any ciphertext of her choice, except for the challenge ciphertext), but I am looking for a <em>formal</em> definition. I have checked some reference textbooks and papers and it is usually defined informally, just before (formally) defining chosen-ciphertext attacks. I am specially interested in a multi-user setting, since I will later be working on definitions of security for proxy re-encryption, but I want first to fully understand the concepts for the case of PKE.</p> <p>The motivation behind this question is that I don't know if it is necessary to specify the underlying public-key in the oracle query or if it is something implicit. For instance, let us assume that the adversary creates ciphertext $c_1 = Enc(pk_1, m)$. Is it assumed that the decryption oracle should answer the query $\mathcal D(c_1)$, even if the public key used is not specified? In the case that the decryption oracle permits to specify the associated public key, would it be valid the query $\mathcal D(pk_2,c_1)$? That is, trying to "deceive" the decryption oracle into decrypting with a different key.</p>
0non-cybersec
Stackexchange
Billionaire who sold Minecraft to Microsoft is sad and lonely.
0non-cybersec
Reddit
Save the drama for your mama.
0non-cybersec
Reddit
Did any Jedi join the Separatists?. Let me be clear, I mean did any Jedi join the Separatists without knowing about/intending to become Sith? Surely there were Jedi who agreed with the Separatists regarding the corruption of the Senate and would have wanted to side with them prior to knowing that they're controlled by the Sith. I was just watching the "Carnage of Krell" episode of Clone Wars and one of the clones accused the General of being a Separatist, which got me thinking about this.
0non-cybersec
Reddit
Device stops receiving GCM pushes until network is switched. <p>I have an android app that relies on GCM push notifications, and sometimes, a user's device will stop receiving push notifications. The behavior is quite intermittent: on some devices, it will never fail and just keep working for weeks or months, while on other devices, it will work for a few days, and then just randomly stop receiving pushes. </p> <p>Every time the device has stopped working, I've verified that the device has a valid regId from GCM, and that my server is sending pushes to that regId. However, the logs show that the device is not receiving anything. Here is what the logs on a normal push receive looks like:</p> <pre><code>05-15 10:39:21.091: V/GCMBroadcastReceiver(13766): onReceive: com.google.android.c2dm.intent.RECEIVE 05-15 10:39:21.091: V/GCMBroadcastReceiver(13766): GCM IntentService class: com.medigram.v2.GCMIntentService 05-15 10:39:21.091: V/GCMBaseIntentService(13766): Acquiring wakelock 05-15 10:39:21.111: V/GCMBaseIntentService(13766): Intent service name: GCMIntentService-468134393228-13 05-15 10:39:21.131: V/GCMBaseIntentService(13766): Releasing wakelock 05-15 10:39:21.171: V/GCMBroadcastReceiver(13766): onReceive: com.google.android.c2dm.intent.RECEIVE 05-15 10:39:21.171: V/GCMBroadcastReceiver(13766): GCM IntentService class: com.medigram.v2.GCMIntentService 05-15 10:39:21.171: V/GCMBaseIntentService(13766): Acquiring wakelock 05-15 10:39:21.241: V/GCMBaseIntentService(13766): Intent service name: GCMIntentService-468134393228-14 05-15 10:39:21.271: V/GCMBaseIntentService(13766): Releasing wakelock </code></pre> <p>None of this shows up on the devices that have stopped receiving pushes, and as a result, neither is the onMessage() method of my GCMIntentService called.</p> <p><strong>The strange thing is, when I switch the device connection from 3G/4G to wifi or vice versa, it starts working again, and the device gets all the backlogged pushes at once.</strong> What exactly happens when the connection type changes? </p> <p>In case it helps, here are some things I've tried on devices where push is working to manually reproduce the problem, but to no avail:</p> <p>-I first thought it could be a context issue, but that was quickly ruled out when simply switching networks resolved the issue. I tried investigating further anyway by using the 'Dont keep activities' developer option and then backgrounding the app, but this had no effect on push.</p> <p>-I've tried force stopping the app to see if it would cause push to stop working, but the issue doesn't seem to have anything to do with the app being force stopped, as it keeps working.</p> <p>-I've tried putting the phone on airplane mode and coming back, but push kept working.</p> <p>I would greatly appreciate it if somebody could point me in the right direction, as I've pretty much exhausted all of the resources on stackoverflow and the google. I'm still just as clueless about this issue as when I started. </p>
0non-cybersec
Stackexchange
That new trend.
0non-cybersec
Reddit
How to perform atomic operations on Linux that work on x86, arm, GCC and icc?. <p>Every Modern OS provides today some atomic operations: </p> <ul> <li>Windows has <code>Interlocked*</code> API</li> <li>FreeBSD has <code>&lt;machine/atomic.h&gt;</code></li> <li>Solaris has <code>&lt;atomic.h&gt;</code></li> <li>Mac OS X has <code>&lt;libkern/OSAtomic.h&gt;</code></li> </ul> <p>Anything like that for Linux?</p> <ul> <li>I need it to work on most Linux supported platforms including: x86, x86_64 and <strong>arm</strong>.</li> <li>I need it to work on at least GCC and Intel Compiler.</li> <li>I need not to use 3rd par library like glib or qt.</li> <li>I need it to work in C++ (C not required)</li> </ul> <p>Issues:</p> <ul> <li>GCC atomic builtins <code>__sync_*</code> are not supported on all platforms (ARM) and are not supported by the Intel compiler.</li> <li>AFAIK <code>&lt;asm/atomic.h&gt;</code> should not be used in user space and I haven't successfully used it at all. Also, I'm not sure if it would work with Intel compiler.</li> </ul> <p><strong>Any suggestions?</strong></p> <p>I know that there are many related questions but some of them point to <code>__sync*</code> which is not feasible for me (ARM) and some point to <code>asm/atomic.h</code>.</p> <p>Maybe there is an inline assembly library that does this for GCC (ICC supports gcc assembly)?</p> <p><strong>Edit:</strong> </p> <p>There is a very partial solution for add operations only (allows implementing atomic counter but not lock free-structures that require CAS):</p> <p>If you use <code>libstc++</code> (Intel Compiler uses <code>libstdc++</code>) then you can use <code>__gnu_cxx::__exchange_and_add</code> that defined in <code>&lt;ext/atomicity.h&gt;</code> or <code>&lt;bits/atomicity.h&gt;</code>. Depends on compiler version.</p> <p>However I'd still like to see something that supports CAS.</p>
0non-cybersec
Stackexchange
Just kidding hope u have a good 2020.
0non-cybersec
Reddit
Does metrizability means only the inherit of topological properties?. <p>A topological space X is metrizable if it is homeomorphic to a metric space. So, while it has a homeomorphism between X and a metric space, it means that they have same topological properties. My question is: does all the importance of metrizability is the inherit of the topological property or it has to be more than that?</p>
0non-cybersec
Stackexchange
an Avocado Bomb, contains crab on the inside from Manteca, CA [2387x1534].
0non-cybersec
Reddit
$T(h)=\langle h,u\rangle v$ is a compact operator on Hilbert space $H$. <p>For a Hilbert space <span class="math-container">$H%$</span>, I'm trying to show that for fixed <span class="math-container">$u,v\in H$</span> the operator <span class="math-container">$T(h)=\langle h,u\rangle v$</span> is an element of <span class="math-container">$\mathcal{L}(H)$</span> and is compact. Clearly <span class="math-container">$T$</span> is a map from <span class="math-container">$H$</span> to itself and is linear. To show T is bounded, first thing I tried doing was expand out <span class="math-container">$\lVert Th\rVert $</span> and only got <span class="math-container">$\lVert Th\rVert^2=|\langle h,u\rangle |^2\langle v,v\rangle$</span> which doesn't seem to help. Any help is appreciated. </p>
0non-cybersec
Stackexchange
Simple query executing slowly, how to speed it up?. <pre><code>select json_agg(distinct (palette_color.id, ciel, ciea, cieb, weight, hex) ORDER BY (palette_color.id, ciel, ciea, cieb, weight, hex) ASC ) as colors, "palette"."loves" from ( select "palette_id" from "palette_color" where "ciel" between '22.5' and '27.5' and "ciea" between '-5' and '0' and "cieb" between '-22.3' and '-17.3' group by "palette_id" ) as "palettes" left join "palette_color" on "palette_color"."palette_id" = "palettes"."palette_id" left join "palette" on "palette"."id" = "palettes"."palette_id" where "palettes"."palette_id" is not null group by "palette"."id", "palette_color"."palette_id" ; </code></pre> <p>This simple query takes 1.1 seconds. The table palette_color 1.5M and palette with 300k rows, so I think it should be much faster (&lt;0.1 second). Can't seem to crack this nut.</p> <p><strong>Explain</strong></p> <pre><code>GroupAggregate (cost=102616.35..102619.18 rows=126 width=39) (actual time=856.686..865.843 rows=222 loops=1) Group Key: palette.id, palette_color.palette_id -&gt; Sort (cost=102616.35..102616.66 rows=126 width=39) (actual time=856.518..856.558 rows=1105 loops=1) Sort Key: palette.id, palette_color.palette_id Sort Method: quicksort Memory: 135kB -&gt; Hash Right Join (cost=59711.32..102611.95 rows=126 width=39) (actual time=524.110..855.694 rows=1105 loops=1) Hash Cond: (palette_color.palette_id = palette_color_1.palette_id) -&gt; Seq Scan on palette_color (cost=0.00..37366.18 rows=1475518 width=31) (actual time=0.002..161.160 rows=1484522 loops=1) -&gt; Hash (cost=59711.01..59711.01 rows=25 width=12) (actual time=524.085..524.085 rows=222 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 18kB -&gt; Nested Loop Left Join (cost=59499.68..59711.01 rows=25 width=12) (actual time=522.641..524.003 rows=222 loops=1) -&gt; HashAggregate (cost=59499.26..59499.51 rows=25 width=4) (actual time=522.610..522.662 rows=222 loops=1) Group Key: palette_color_1.palette_id -&gt; Seq Scan on palette_color palette_color_1 (cost=0.00..59498.95 rows=122 width=4) (actual time=0.024..522.059 rows=222 loops=1) Filter: ((palette_id IS NOT NULL) AND (ciel &gt;= '22.5'::real) AND (ciel &lt;= '27.5'::real) AND (ciea &gt;= '-5'::real) AND (ciea &lt;= '0'::real) AND (cieb &gt;= '-22.299999'::real) AND (cieb &lt;= '-17.299999'::real)) Rows Removed by Filter: 1484300 -&gt; Index Scan using palettes_pkey on palette (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=222) Index Cond: (id = palette_color_1.palette_id) </code></pre> <p><strong>Tables</strong></p> <pre><code>CREATE TABLE public.palette_color ( id integer NOT NULL DEFAULT nextval('palette_color_id_seq'::regclass), hex text, weight real, palette_id integer, ciel real, ciea real, cieb real, raw_weight integer, CONSTRAINT palette_color_pkey PRIMARY KEY (id), CONSTRAINT palette_color_palette_id_fkey FOREIGN KEY (palette_id) REFERENCES public.palette (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) CREATE TABLE public.palette ( id integer NOT NULL DEFAULT nextval('palettes_id_seq'::regclass), loves integer, comments integer, num_colors integer, link text, views integer, favorites integer, title text, CONSTRAINT palettes_pkey PRIMARY KEY (id), CONSTRAINT palette_link_key UNIQUE (link) ) </code></pre> <p><strong>Edit:</strong> Thanks for the tips. The query is now running at 400 mili. Still seems slow. To clarify, I dont think I can make palette_color.palette_id a pkey because palette and palette_color have a one to many relationship. For example, 5 palette_colors per palette.</p> <pre><code>SELECT json_agg((palette_color.id, ciel, ciea, cieb, weight, hex)) as colors, palette.id, palette.loves, palette.comments FROM ( SELECT palette_id as id FROM palette_color WHERE ciel BETWEEN '22.5' AND '27.5' AND ciea BETWEEN '-5' AND '0' AND cieb BETWEEN '-22.3' AND '-17.3' GROUP BY palette_id ) AS p INNER JOIN palette_color ON palette_color.palette_id = p.id INNER JOIN palette ON palette.id = p.id GROUP BY p.id, palette.id, palette_color.palette_id; </code></pre>
0non-cybersec
Stackexchange
Cúpula civil y militar de Venezuela será acusada de Lesa Humanidad ante la Corte Penal Internacional -Vídeo-.
0non-cybersec
Reddit
[Article] 19-year old hungry for success student, striving to lead others to living a better, healthier and happier life!.
0non-cybersec
Reddit
Interview: Hubris (of early beta tournament fame) signed by EnVyUs for pro Overwatch team.
0non-cybersec
Reddit
DDD referencing child entities across bounded contexts. <p>Say I have a "Directory" bounded context with 2 aggregate roots. Company and Person. Company has a collection of child entities "Position" that hold the IDs of a person aggregate with some extra value data.</p> <p>All good.</p> <p>Now we go and add a "Article" bounded context with an aggregate root JobAriticle. This needs a Contact value object which is mapped from a company position.</p> <p>So knowing that you should only reference aggregate roots what should I do? Assume there are invariants on the Company to Position relationship so I don't want to split the aggregate. Is it OK to map a Position through the anti corruption layer with both the company and position ids? Or do I need to try and break apart the company aggregate.</p>
0non-cybersec
Stackexchange
Sylow Subgroups of a Dihedral Group. <p>Let $G = D_{2n}$ and $p$ an odd prime dividing $2n$, i.e. $2n = 2m\cdot p^{\alpha}$ with $p \nmid 2m$. I need to show that $P \in \operatorname{Syl}_p(G)$ is normal in $G$ and cyclic. </p> <p>As far as normal goes, I know that to show $P$ is normal, I should show that $n_p = 1$. So as such, I know $n_p \equiv_p 1$ and thus $n_p = 1+kp$ for some $k \in \mathbb{Z}^{\ge 0}$. Further, I know $n_p \mid 2m$, and so $a\cdot n_p = 2m$, and substitution gives $a\cdot (1+kp) = 2m \Rightarrow a + akp = 2m$. I'm not sure how to continue with this identity however.</p> <p>I'm looking for a gentle hint in the right direction. Should I try more divisibility tricks with $n_p$ or is there a nicer way to go about the whole deal?</p> <p>For the record, this problem is Dummit and Foote, 6.5.5.</p>
0non-cybersec
Stackexchange
Where is alsa-base.conf located in Debian 10?. <p>So....I need to add some configuration (<code>options snd-hda-intel model=</code>) to the <code>alsa-base.conf</code> as I did in my previous installation of Ubuntu.</p> <p>Unfortunately, it seems like I have no <code>alsa-base.conf</code> file (or at least not in the same location as in ubuntu <code>/etc/modprobe.d</code>).</p> <p>Where should I add my options when using Debian 10? </p>
0non-cybersec
Stackexchange
The Babysitter | Official Trailer [HD] | Netflix.
0non-cybersec
Reddit
Open Analysis Live: Reverse Engineering a DGA (Domain Generation Algorithm).
1cybersec
Reddit
Iron Maiden's Eddie makeup!.
0non-cybersec
Reddit
Sorry.
0non-cybersec
Reddit
The Worst Storm of My Life. I didn’t always live in the lap of luxury like I do now, in a dingy studio apartment on the second floor of a dilapidated apartment building where, in the summer, the air conditioners do little more than blow hot air. It’s actually a summer night as I write this, with a shitty box fan rattling away but cooling me down in the absence of adequate AC. I can hear my neighbors going at it through the paper thin walls and I’m honestly not sure if they’re fucking or getting murdered. Maybe both. I can’t complain too much, though. My apartment has never been broken into, despite living on the edge of the ghetto, and I’ve never come home to a homeless man masturbating in my bathtub. So that’s a plus. However, for all you Redditors awake tonight (or today, whenever you are reading this), I have a tale to tell you. A tale of evil land, a shitty trailer, and things most foul. Everything in here is 100% true in that it actually happened, although my imagination may exaggerated the actual events as I moved away from the land nearly 8 years ago. Shit, it’s been nearly a decade and still it feels like yesterday. Sometimes I still feel like a child thrown to the wolves, subjected to terrible things. Sorry, I’m a bit too wordy for my own good sometimes. Without further ado, let us begin. The events which are about to be disclosed occurred in north central Arkansas in 1998. The location, names, and ages of certain characters have been changed or left ambiguous to remain anonymous. We moved to Arkansas from an eastern state in the spring of 1997. For a year, we lived with my grandfather. Nothing really exciting happened during this time, other than that one time my brother and I got chased by my grandfather’s bull whilst looking for our basketball that had bounced away from us. We were able to slip through some fence and escape the raging beast, but that’s about all that happened there. It was April 1st, 1998 (yeah, we should’ve known) when we moved to our trailer in the middle of nowhere. When you think of Arkansas, you may think of civilization, like Little Rock or Hot Springs, but you probably also think of little backwoods towns like Highland or Light. Well, as I just moved from the former about five years ago, I can tell you it hosts no more than 1200 people. The ‘town’ our trailer resided in was home to about 100. Yeah, extremely backwoods, extremely tiny. To get to the trailer, you had to follow a dirt road off the main highway for about 15 miles, so going to the store was a once a week thing. The road was super creepy at night and, as a child, I would often see figures standing in the woods as our van rushed passed, leaving a cloud of dust in its wake. Anyway, I digress. The first few months went great. My brother and I played in the woods, my dog Muzzy was my best friend, and all was well. Then it happened. While playing in the woods one day, my brother found a skeleton. Not a dog or mountain lion, but a human. I didn’t learn of this until years later when he told me and my dad confirmed it, but I could tell something was off when my brother came back, tears in his eyes, and tugging on my dad’s arm to come with him. My dad came back looking disturbed and angry and, in a hushed tone, told my mum what they had found. I asked what they were talking about and my mum said “Never you mind, go play,” quite sternly. Me, being the naive five year old that I was, decided that indeed nothing was wrong and my dad and brother had just found something gross. My mum never spoke of it to me, even years later. Not too long after, we found tridents carved into trees around our property that had not been there before. Now, I myself am a Satanist and I don’t dabble in occult stuff (it’s actually two different things altogether), but the appearance of these tridents was a harbinger for all the wicked things to come. First, there was the storm. The storm was unlike any I have ever since experienced. It was late July of ‘98 and the thunderclouds had ushered the sun to an early rest. My mum had a love of storms (she used to sit on the beach in Florida in her youth and watch hurricanes come in over the ocean) and I had a rather opposite outlook on them. Nonetheless, she dragged me outside to our lawn chairs with a tall pitcher of kool-aid and some crackers and cheese. My brother joined us but my dad worked night shift at a 24-hour pizza place roughly an hour away. Anyway, we sat opposite the sunset, facing the roiling clouds of the storm as the final streaks of crimson illuminated them, making them appear to have come out of a volcano rather than out of lakes and rivers. We sat outside as the thunder rattled and rasped and boomed around us. This was way out in the boonies, so every bit of thunder bounced off every bit of tree and seemed to echo into eternity. It was terrifying to my five year old self while my brother, who was three years my elder, cackled alongside my mom at the rolling thunder. Lightning seemed to worship the roiling blackness as it struck down in swiggly and jagged arcs, followed by a loud clash or a crescendo of thunder. Finally, once the rain started and quickly became too heavy, my mum ushered us into the trailer. I was bawling at this point, crying because I had such a fear of storms. My brother jabbed at me like brothers do, but my mum held me and cooed me to where my rattling sobs became only sniffles. We watched Arthur and Dragon Ball Z for an hour or so, all the while the winds were picking up and shaking the trailer. Then, without any warning of any sort, the power cut out and, to my horror, our ears and eyes were subject to the full wrath of the storm. The winds howled like banshees and the trailer rocked back and forth atop its cinderblock foundation. We lived atop a steep hill which played host to our front yard, so my imagination had already shattered the cinderblocks and sent us tumbling down the hill, leaving us as pulp for my father to find when he returned. Clearly, that didn’t happen. But something much more terrifying did. The winds had picked up to impossibly high speeds and screeched around corners and moaned through the woods surrounding the trailer. Hail hammered the tin exterior of the home and pinked against the glass, causing my mum to cover us all in thick blankets should the glass give way to the brutality it held at bay. We just sat in the floor of the living room, staring out the large windows that looked out over the over-grown back yard. We stayed in the den because it was the centermost room in the house and I had insisted that we would cause the aforementioned fear of sending us tumbling to our doom should we move to a bedroom. My mum went to the kitchen and retrieved a candle and lit it. It was a single Christmas candle with Santa’s face emblazoned on it, but it lit up the whole living room. The outside world did not seem to exist; the only things that were real were illuminated by the candle. I saw the reflection of all three of us huddled together in the large bay window. Our gaunt faces seemed to bleed out of the shadows, like light pouring through a crack in the abyss and forming abstractions of people. I shivered in the dark and moved toward the candle, but my mum drew it away a bit as I had already developed an affinity for fire and she knew it. For another hour the storm raged on, and for another hour we stayed awake, listened to our mother hum and sing us our favourite nursery rhyme: Winkin’, Blinkin’, and Nod. Just as she was nearing the end of the rhyme, everything stopped. The rolling thunder that had been building to a thunderous clap was interrupted, the hail stopped falling along with the rain, and the winds died as if they had never howled through our neck of the woods in the first place. I remember looking at my mum’s face, illuminated by the orange flare of the candle, and she looked terrified. Not outright filled with terror, but the kind that gnaws at your soul, the kind where you know something is terribly wrong but can’t do anything about it. KNOCK KNOCK KNOCK Three loud, rapid knocks erupted from the back door. My mu’s face went pale, her eyes falling wide and jaw slack. She handed my brother the candle. “Stay here, Andy. Stay here and don’t move.” My mum has always been a momma bear, always fought for my brother and I, and always won. But this next moment was the most scared I have ever heard her. I couldn’t see her as she had walked down the hall, which was pitch black past the glow of the candle flame, which flickered in and out as if it threatened to snuff itself out. I heard her shoes thud on the hollow floor of the trailer, heard the whole thing creak and groan as she moved through it as if it were living and she a parasite wiggling her way through. I heard her footsteps stop, she was at the door. KOCK KNOCK KNOCK She gasped and I clung harder to my brother, who didn’t try to push me away. He must have been as scared as I was. “MAY!” a voice erupted from outside, filling the stifling air of the trailer. I heard the scuffle of my mum’s shoes as she jumped back. I knew that voice, we all knew that voice. It was my dad. “May! Let me in!” The knocking resumed, and with it came a smell. I didn’t know it at the time because I had never encountered it before, but I later connected it to the smell of dead flesh. Not rotting flesh, but dead flesh. There’s quite a difference. “Jack!” my mum whispered from down the hall, “Jack come here!” I whined in horror as she called me, the darkness around me setting in my mind as the smell sat in my nose. “Jack I need you to come here! NOW!” she whispered loudly. Andy held the candle as I let go. “Leave the candle with your brother!” she said softly as if she had read my mind. I tiptoed down the black hall, past The Room (what we called our storage room) and it’s open door and gaping black maw. I crept past the open bathroom, waiting for something to snatch me. The whole transition from den to door took about ten seconds, but the dread imposed upon me by the dark made it feel like hours. It was all the cliches: draining, suffocating, thick. Finally I spotted white on the floor and realized I had found my mom’s shoes. As I reached her, another series of knocks rang out. “May let me iiiin! It’s cold and wet and I’ve been standing on my feet for the last five hours!” She ignored it and crouched down to meet my face. She was pale and the darkness made her features gaunt, her eyes looked hollow. “Jack, I need you to go to your room, look out the window, and see if the car is in the driveway. Can you do that for me?” I cried and gulped, nodding as she planted a kiss on my sweaty forehead. I stumbled past my mum and into my bedroom and made my way to the window, which was covered by a heavy curtain. I kicked objects scattered across the floor, causing them to clatter and skid on the hard wood. I hoped they were toys, but my mind told me that they were bones, dried and picked clean by a hungry monster than lived under my bed, waiting for me to get to close to the mattress so that it could reach out and snatch me. Finally, feeling with my arms, I reached the window. I pulled in open and what greeted me was what surrounded me. Darkness. KNOCK KNOCK KNOCK As I kept staring through the wet glass, trying to get my eyes to adjust to the abyss, a flash of lighting caught me off guard and I stumbled back, falling to the floor as a clap of thunder rang out. But it had been enough for me to see that the driveway was barren, that the voice at the door who sounded just like my father was, in fact, not my father. Having seen what I needed to, I scurried out of the room, using the dim glow of the candle at the end of the hall to guide my. I tripped over a pair of shoes but that didn’t stop me as I ran toward my mother. “It’s not there,” I whined in a whisper as tears filled my eyes. “Go back with your brother, Jack, he’ll keep you safe.” I stumbled back down the hall to the den and cuddled up next to my brother. The candle was still lit strong. “You’re not my husband! Get out of here before I shoot you!” She wasn’t bluffing; there was a loaded .22 by the door just in case things like this happened. “Mommy? Mommy please let us in!” I froze. It was my brother’s voice and this time it came from the wide window in front of us. Whatever it was, it tapped on the glass. Thankfully it was so dark that I was spared seeing the source of the voice before I stuffed my face in my hands. My brother, however, was not. He screamed, the scream of a dying animal as his voice cried out again. KNOCK KNOCK KNOCK The knocking on the door was louder and and the tapping on the glass resumed. “May LET ME IN GODDAMMIT LET ME IN LET ME IN LET ME IN!!!” “Mommy please! It’s so cold out here and it’s dark! Mommy!” My brother kept screaming, his bloodcurdling cries causing me to rock back and forth, sobbing into my hands, not daring to look up for I knew I would see something that I shouldn’t. The smell of dead meat intensified, so much to the point where I could taste it through my drooling mouth as sobs racked my chest. Then the whole trailer began to shimmy. Not shake like it had in the wind, but shimmy like it was on a paint mixer. Glasses in the kitchen rattled, statuettes that my mum collected fell to the hard wood floor and shattered. The terror grew to a knot in my gut and I tasted stomach acid in the back of my throat. As the trailer quivered so did I, my face turning cold and pasty in my snotty hands. Andy kept screaming as the thing… god whatever it was… as the thing outside kept tapping and crying out in his voice. “Mommy please, I’m so scared!” “May I swear to god if you don’t let me in, I’m gonna kill you, Andy, Jack, and then burn this whole fucking place down,” the voice at the door demanded. “Jack… Jack please get mom,” Andy’s voice cried, muffled, through the window. “Please Jack. Tell her I’m sorry for breaking the window earlier. Tell her I’m sorry I tried to get you trampled by that bull. Tell her I’m sorry I tried to kill you when you were born. Please, apologise to her for me, Jack. I’m so cold…. I’m so scared.” The real Andy had stopped screaming and was rocking next to me, sniffling as much as I was. I dared to peak through my soaked fingers at him and saw that his gaze was still stuck on the window. The candle had been snuffed out but a hellish red glow emanated from the window. I didn’t dare look. “Did you try to… did you try to kill me, Andy?” He started sobbing, wailing. I had my answer. Tears returned to my eyes, but now for a different reason. My mother was in a screaming fit the thing at the door, her voice hoarse and hellish as it erupted from the maw of the dark hallway. “May please let me in… Please. I’m sorry, god I’m so sorry I’m just so scared ya know?” the thing spoke in a single run with no punctuation. It too began wailing, crying. My father is an extraordinary man, a man I look up to even to this day and is one of the strongest people I have ever met. Even back then, before I knew him as well as I do now, his crying unnerved me. To hear a man of such power and strength cry… It’s not natural. The moans and utterances sent shivers down my spine. The trailer had stopped quivering like an animal in its death throws. “Please… Please just go the fuck away” my mum pleaded to the thing behind the door. And just like that, it stopped. The storm resumed its tantrum for the rest of the night, and for the rest of the night we sat huddled in the middle of the den, shivering as the wind moaned and screamed around the trailer, rocking it. The odor of death lingered for a little while longer, even after the lights came back on. My brother and I watched Star Wars on VHS as the TV service was lacking due to the storm. Neither of us brought up what the thing outside the window had said, but we didn’t talk for about a month afterward. We were still inseparable up to our teen years, but this was just a rough spot. Dad came home around six the next morning, unlocking the back door with his keys and wearily stomping in. He saw us in a pile, sleeping like the dead. “May, boys?” he woke us up in strong, yet gentle tone. With him had come a clear blue sky, void of any remnants of the storm before. Or perhaps his presence had made the storm go away. I like to think that it was the latter. “I have to show you something. Jack, you can come if you want, but it’s kinda scary.” Of course I went, I couldn’t look scared in front of my dad. Even back then I had my pride. We followed our tired dad down the hall with mum in tow, groggily stumbling over pictures and ornaments that had fallen in the shaking. We all exited out the backdoor, where the horror had began. On the wet wooden porch, which was admittedly in a state of disrepair, laid a rotting carcass of a buck. His antlers were strewn with ribbons of crimson flesh and stained with blood. Later in life I read about antler molting and how bloody it could be, but this definitely was not that. The corpse looked to be at least a week old, as the abdomen had collapsed and maggots were nestled in the eye sockets. The tongue of the deer hung out almost comically. I grabbed hold of my mum’s hand and squeezed. The scariest thing about it, however, was that the deer had human teeth. The face had been eaten away by scavengers and beneath the tatters of flesh that remained, perfectly white teeth grew from the skull. “There’s more…” dad said softly, looking concerned at my mum. This… I have never told anyone this next part. There was a reason I wanted to remain anonymous and have names changed and everything. It’s not exactly… legal. We followed my dad off the porch and around the side of the trailer where the bay window looked into the den. Laying there…. laying there was the corpse of a small child, about the same age as Andy. My young mind couldn’t comprehend what I was looking at, so I just stared, absorbing the details. The stench was like old meat that had been sitting in water too long, like if you leave your dishes in a sink of water for a month (don’t judge me, I live alone). The skin of the boy was as grey as the thunderclouds before the storm. Cracks and splits riddled the surface and from it oozed a tan substance that appeared to have the consistency of apple sauce. The child’s stomach was bloated, his eyes half eaten by the fauna. His black hair was sparse, as if someone, or something, had ripped it out. A look of placated acceptance sat upon the boy’s face, as if he was okay with death as he was passing from this world. His chest… gods his chest was split open, his ribs gaping and tearing through the decaying flesh like shark teeth. Between his lungs, where his heart should have been, lay a dead, coiled snake. It too had been partially feasted upon and it seemed to have bored holes through the child’s body before it’s eventual death, as gaping wounds could be seen throughout the child’s torso. My mum stifled a cry and my dad stared on blankly. “We have to bury him,” my dad finally said in a stone cold tone. “We can drag the deer to the woods, but we have to bury this child.” None of us argued. None of us questioned why we shouldn’t call the police. As my mum and brother drug the deer to the woods, my father and I started digging. He used a large shovel and I used a trench tool as it fit my size. The earth was riddled with rocks and roots, so digging the five foot hole took about as many hours. After three feet in, my dad wouldn’t let me dig anymore, instead having me take all the removed dirt and put it in a nice pile. Once that was done and the sun had reached midday, we moved the boy. The air was hot and muggy after the storm, so the smell of decay was even more prominent. My dad stopped himself from throwing up twice as he rolled the body onto a blue utility tarp, but I wasn’t so lucky. I puked, then dry heaved for at least ten minutes. The body landed at the bottom of the grave with a very dull th-thud and we began to cover it back up. We washed up and went to a friends house for the rest of the week. We told them that we had a mild leak from the storm that was patched now, but we had to let the house “air out.” They saw us as good folk so they didn’t question us, though surely they noticed the air of despair and surrender surrounding us, the screams in the night from my brother and mum, the blank coldness of my father, and my staring into nothingness. We had marked the grave with a cross made of tree branches and vine. The funny part, about all of this, is that years later, we placed a raised garden over the grave and the flowers grew so beautifully, the fruits and vegetables grew to large sizes without fertilizers or treatment and, after getting past the stigma of the plot, tasted delicious. None of us ever talked about that night after my mum divulged to my father what had happened. We all knew it had happened, but we decided to treat it like a bad dream. I remember that for the remainder of my time at that trailer, as I would wait for the school bus at the bottom of the hill in the early mornings, I would hear Andy humming. He was humming from beneath a cedar tree. Sometimes he would try to get me to come over, sometimes he would cry. But usually he just hummed a merry tune, a happy melody. It was unsettling because, until he moved out, my brother always stood right next to me as we both waited for the bus, not beneath the large cedar tree.
0non-cybersec
Reddit
a question about the evaluation of integral. <p>Let $\alpha:[0,1] \to R$ be the <a href="https://en.wikipedia.org/wiki/Cantor_function" rel="nofollow">Cantor function</a>. Evaluate $$\int_{0}^{1}xd\alpha $$and $$\int_{0}^{1}x^2d\alpha.$$</p> <p>I know that the Cantor function is continuous and monotone increasing, how can I evaluate the integral above using the properties of $\alpha$? Can someone help me solve this question? </p>
0non-cybersec
Stackexchange
Field extensions of $\mathbb{Q}$, $\mathbb{Q}(\xi_7)$ and $\mathbb{Q}(\xi_7+\xi_7^{-1})$. <p>Let $\xi_7$ denote the complex number $e^{2\pi i/7}$ and let $\beta = \xi_7+\xi_7^{-1}$, consider the field extensions $\mathbb{Q} \subset \mathbb{Q}(\beta) \subset \mathbb{Q}(\xi_7) $. </p> <p>Determine the minimal polynomials of $\xi_7$ over $\mathbb{Q}$, $\mathbb{Q}(\beta)$ and the minimal polynomial of $\beta$ over $\mathbb{Q}$. </p> <p>For the first question, we know that $x^7-1 = 0 \implies (x-1)(x^6+x^5+x^4+x^3+x^2+x+1) =0 \implies \xi_7$ is a root of $x^6+x^5+x^4+x^3+x^2+x+1$, which is the minimal polynomial, given that this polynomial is irreducible in $\mathbb{Q}$. </p> <p>However, I'm finding the other questions quite difficult to answer. </p> <p>Thanks</p>
0non-cybersec
Stackexchange
different results for the same code with tf.control_dependencies. <p>I run a piece of code twice and get two different results</p> <p>The code:</p> <pre><code>import tensorflow as tf x = tf.placeholder(tf.int32, shape=[], name='x') y = tf.Variable(2, dtype=tf.int32) assign_op = tf.assign(y, y + 1) out = x * y with tf.control_dependencies([assign_op]): out_ = out+2 with tf.Session() as sess: sess.run(tf.global_variables_initializer()) for i in range(3): print('output:', sess.run(out_, feed_dict={x: 1})) </code></pre> <p>First output:</p> <pre class="lang-none prettyprint-override"><code>output: 4 output: 5 output: 6 </code></pre> <p>Second output:</p> <pre class="lang-none prettyprint-override"><code>output: 4 output: 6 output: 6 </code></pre> <p>Can someone please explain why does it happen?</p>
0non-cybersec
Stackexchange
All three thresher shark species have been listed as vulnerable to extinction by the Worlds Conservation Union since 2007 (IUCN). All are popular sport fish. In addition, they are hunted for their meat, livers (for shark lover oil), skin (for leather), and fins for use in shark-fin soup..
0non-cybersec
Reddit
ar X iv :0 70 9. 14 49 v2 [ qu an t- ph ] 1 8 N ov 2 00 7 Supervised secure entanglement sharing for faithful quantum teleportation via tripartite W states Yue Li∗ School of Computer Science and Technology and Department of Electronics and Information Engineering, Huazhong University of Science and Technology, Wuhan 430074, China Yu Liu† Department of Electronics and Information Engineering and Institute of National Defense Science and Technology, Huazhong University of Science and Technology, Wuhan 430074, China (Dated: November 18, 2007) We present a supervised secure entanglement sharing protocol via tripartite W states for faithful quantum teleportation. By guaranteeing a secure entanglement distribution in the charge of a third believed supervisor, quantum information of an unknown state of a 2-level particle can be faithfully teleported from the sender to the remote receiver via the Bell states distilled from the tripartite W states. We emphasize that reliable teleportation after our protocol between two communication parties depends on the agreement of the supervisor to cooperate via taking the W states as both the quantum channel and eavesdropping detector. The security against typical individual eavesdropping attacks is proved and its experimental feasibility is briefly illustrated. PACS numbers: 03.67.Hk, 03.65.Ud Quantum teleportation (QT)[1] turns out to be incredibly successful in a wide variety of quantum information science, it achieves a different way for quantum state transmission, where arbitrary unknown quantum state collapses on the sender side and reborns on the receiver side via one way local operation and classical communication(LOCC) and previously shared pairs of maximal entanglement states. To experimentally implement the QT, however, practical obstacles will be encountered. One is the decoherence and the absorption happen in the imperfect quantum channel[2], in which particles from entanglement pairs may get lost or entangled with the environment thus the entanglement decreases exponentially with the extension of the distribution distance. To address this, Zukowski et al. put forward the entanglement swapping to shorten the direct entanglement distribution[3], Bennett et al. introduced the entanglement distillation to refine the quality of entanglement effected by the decoherence after transmission[2]. Based on these two contributions, quantum repeater(QR), which was proposed by Briegel et al., was constructed for long distance entanglement distribution in noisy and lossy quantum channel[4], the invention of QR makes long distance entanglement distribution possible and because the maximal entanglement pairs can be distilled from the imperfect entanglement ones, the assumption that entanglement distributions happen in a noise free environment becomes reasonable for QT-based quantum communication protocol design. Another considerable obstacle is the security — the potential eavesdropping. Recently, various quantum communi- cation protocols have been proposed based on the QT, most of which, however, are constructed under the popular hypothesis that the well known “third trustable party”(TTP) distributes the particles to the communication atten- dants without any interruption from the eavesdropper who may want to stole the sender’s quantum information by recovering the qubits at her own hand, therefore, the protocol may not work well or even fail when the quantum channels are unauthenticated. To be more general, the QT requires a secure enough quantum channel — for the direct quantum transmission to achieve the previous sharing of the entanglements — yet available channels are typically with evil quantum scientist who owns unlimited computing power. Through such considerations, we propose a supervised secure entanglement sharing protocol, the “Wuhan” protocol, for QT, in which a third supervisor Charlie is included to take in charge of the entanglement distribution and eavesdropping detection with classical communication and sequence of tripartite W states[5]. Under the help of this protocol, quantum information of an unknown state of a 2-level particle can be faithfully teleported. The “Wuhan” protocol (see Fig. 1) enables faithful QT between Alice and Bob only when the TTP Charlie agrees to provide them the needed Bell states. The interesting scenario perfectly suits the bridge building rule in the Wuhan city. If a new Yangtse River bridge was going to be built between Wuchang(WC) and Hanyang(HY), two of the three member towns of the Wuhan city, should be approved by the governing town Hankou(HK) after which HK sends hardhats to WC and HY using HK-WC and HK-HY bridges respectively. Back from the tale, in this protocol we ask a believed supervisor Charlie to help the two parties Alice and Bob for distilling the “hardhat” — the Bell state http://arxiv.org/abs/0709.1449v2 2 which is nondeterministically “hidden” in the following tripartite W state |W 〉 = 1√ 3 (|100〉+ |010〉+ |001〉)abc = √ 2 3 [ 1√ 2 (|10〉+ |01〉)ab]|0〉c + 1√ 3 |00〉ab|1〉c = 1√ 3 (|++〉 − | − −〉)ab|0〉c + 1 2 √ 3 (|++〉+ |+−〉+ | −+〉+ | − −〉)ab|1〉c, (1) where |+〉 = 1√ 2 (|0〉+ |1〉) and |−〉 = 1√ 2 (|0〉 − |1〉). Note that when measuring either of the three qubits, say particle c, Bell state |ψ+〉 = 1√ 2 (|01〉+ |10〉), (2) made up of particles a and b can be obtained with a probability P (|ψ+〉) = 2 3 , then the two communication parties cooperate with Charlie to execute two fundamental progresses, the entanglement distribution(ED) and teleportation confirmation(TC), in sequence. The ED helps to perform secure distribution of entanglement states to Alice and Bob; the TC, if Charlie permits, distills the “hidden” entanglement states for Alice and Bob by Charlie’s local measurements. Here we give an explicit algorithm for “Wuhan” protocol, after which its security is discussed by examing several typical attacks. Quantum Channel Classical Channel Alice Bob Charlie FIG. 1: The scenario of the “Wuhan” protocol. (ED. 0) Protocol is initialized, t = 0. Charlie announces the switch to transmission mode and prepares three-qubit W states in EQ. 1, forming the sequence wN = (w1, w2, ..., wi, ..., wn), where wi = (ai, bi, ci) are the three qubits of the ith W state. Here we assume the quantum state that Alice wants to teleport is |ψ〉m = a|0〉+ b|1〉, (3) where |a|2 + |b|2 = 1. (ED. 1) t = t + 1. Charlie reserves qubit ct from wt as home qubit, sending the other two particles at and bt to Alice and Bob respectively as the travel qubits. Repeat step (ED.1) until t reaches n+ 1. As result, Charlie obtains a home qubit sequence cN = (c1, c2, ..., ci, ..., cn), and the two communicators are expected to obtain travel sequences aN = (a1, a2, ..., ai, ..., an) and b N = (b1, b2, ..., bi, ..., bn) respectively. (ED. 2) Charlie announces the switch to detecting mode, initializing m = 1. Starting from his particle cm in c N , Charlie performs a nondeterministic single qubit measurement using basis Bz = {(|0〉, |1〉)}, that is, the particle cm owns a probability d to be measured and the whole W state collapses(also, 1 − d to be passed by without any operation). m = m + 1, repeat (ED. 2) until m = n + 1. Charlie takes down the locations of the particles measured, forming the location information sequence kV = (k1, k2, ..., ki, ..., kv) and related result sequence Rc V = (Rc1, Rc2, ..., Rci, ..., Rcv) where ki is the location of the ith measured particle in c N satisfying max(kV ) ≤ n, and Rci is the measurement result for the home qubit cki . Also, Charlie selects v local measurement basises, each of which is in the Bx with probability p and Bx with 1− p, then he integrates the kV and the basises into the sequence 3 kbV = ((k1, b1), (k2, b2), ..., (ki, bi), ..., (kv, bv)) where ki ∈ kV and bi ∈ {Bx, Bz}, he then sends the kbV to the classical channel, keeping the sequence RcV himself. (ED. 3) Following the kbV , Alice and Bob both perform local measurements on their own travel qubit sequences using the combined basis in kbV , giving two measurement result sequences RaV = (Ra1, Ra2, ..., Rai, ..., Rav) for Alice and RbV = (Rb1, Rb2, ..., Rbi, ..., Rbv) for Bob. Unlike Charlie’s keeping on Rc V in Step (ED. 2), they send the two result sequences to the public classical channel. (ED. 4) On receiving the two result sequences, Charlie performs the following checking algorithm for all elements of the two sequences: (Alg. 0) If bi = Bz, let C[0] and C[1] be the two checking flags for Ra V and RbV respectively; (Alg. 1) C[0] = 0 if Rai ⊕Rbi = 0 for all Rci s which are |0〉 in Rc V , else C[0] = 1; (Alg. 2) C[1] = 0 if Rai ⊕Rbi = 1 for all Rci s which are |1〉 in Rc V d , else C[1] = 1; (Alg. 3) (C[0]&&C[1]) = 0: Eve is detected, Charlie announces the abortion of this distribution and goes to step (ED. 0); (C[0]&&C[1]) = 1: proceeds (TC. 0); (Alg. 4) Else, let C[2] be the checking flag; (Alg. 5) C[2] = 0 if Rai 6= Rbi for all Rci s which are |0〉 in Rc V , else C[2] = 1; (Alg. 6) C[2] = 0: Eve is detected, Charlie announces the abortion of this distribution and goes to step (ED. 0); C[2] = 1: proceeds (TC. 0). (TC. 0) Charlie ticks out all his measured home qubits, leaving the new home qubit sequence c′N−V = (c′1, c ′ 2, ..., c ′ i , ..., c′ n−v) which are particles not selected in the detecting mode, if Charlie agrees with Alice and Bob’s QT requirement, he performs local measurements on all the home qubits in c′N−V , obtaining result sequence Rc′N−V = (Rc′1, Rc ′ 2, ..., Rc ′ i , ..., Rc′ n−v). Note that after his measurements, the joint state of particles m, a and b may become one of the following states |φ0〉 = |ψ〉m ⊗ c〈0|W 〉abc = (a|0〉+ b|1〉)m ⊗ |00〉ab (4) |φ1〉 = |ψ〉m ⊗ c〈1|W 〉abc = (a|0〉+ b|1〉)m ⊗ 1√ 2 (|10〉+ |01〉)ab, (5) Charlie runs a selection to produce another location information sequence k′S = (k′1, k ′ 2, ..., k ′ i , ..., k′ s ) satisfying max(k′S) ≤ (n− v) and Rc′ k ′ i in Rc′N−V is |0〉, then he publishes the sequence k′V . (TC. 1) According to k′V , Alice and Bob locate and extract their own particles from aN and bN , taking particles ak′ i , bk′ i as a whole, maximal entanglement pairs in Bell state |φ+〉 are successfully distilled and the required previous sharing is achieved, therefore further faithful QT between Alice and Bob can be pushed forward. We now consider the security of the protocol and first take account of the intercept attack. Suppose the direction of the final QT are from Alice to Bob, it is sure that if Eve proposes only naive interceptions without appending fake particles, she may soon be detected when the three parties do the particle number comparison, therefore one consid- erable approach for Eve is the intercept-resend attack (IRA, see Fig. 2) which may include two different strategies, the intercept-measure-resend attack (IMRA) and the intercept-store-resend attack (ISRA), here we show the robustness of our protocol in case of these two IRA. In the IMRA, Eve intercepts the particle which is going to the Bob side from Charlie and performs immediate single qubit measurement, then she appends fake particle which is identical with the measurement result to Bob which establishes fake quantum channel between Eve and Bob. To be more specific, because the initial state is |W 〉, the evaesdropping may turns out to be in state |0〉 with probability P (0) = 2 3 , she then sends a fake particle in state |0〉 to Bob, thus joint state for Alice, Bob and Charlie’s system becomes |w1〉 = 1√ 2 (|10〉+ |01〉)ac ⊗ |0〉b = 1√ 2 (|100〉+ |001〉)abc; (6) or she may obtain state |1〉 with probability P (|1〉) = 1 3 , sending another particle in state |1〉 to Bob, leaving the 4 Alice Bob Charlie Eve Quantum Channel Classical Channel Fake Quantum Channel FIG. 2: Eavesdropping by the intercept-resend attack. collapsed fake state |w2〉 =|00〉ac ⊗ |1〉b =|010〉abc. (7) In either case, we conclude that Eve can be detected with probability during the detecting mode of this protocol, however, we are going to ignore the calculations for these probabilities since the principals of the QT do not allow the collapsed but unentangled states |w1〉 and |w2〉 being the appropriate sources between Eve and Alice to recover Alice’s quantum states, in other words, the IMRA can not bring Eve any quantum information. Coming to the other IRA strategy, the ISRA, where Eve protects the intercepted particle by just storing without measurement to wait for a later impersonating teleportation. In order to hide her existence, Eve then sends a fake qubit from herself to Bob, different from the IMRA, Eve does not know the exact state of the particle, thus she can only send a particle in state |φ〉b(e) = (x|0〉 + y|1〉)b(e) in which x, y are random coefficients satisfying x2 + y2 = 1, then the joint state of the quad-party system turns to |Υ〉 =|φ〉b ⊗ |W 〉aec =(x|0〉+ y|1〉)b ⊗ 1√ 3 (|100〉+ |010〉+ |001〉)aec = 1√ 3 (x|1000〉+ y|0101〉)aecb + 1√ 3 (x|0100〉+ y|1001〉)aecb + 1√ 3 (x|0010〉+ y|0011〉)aecb (8) For convenience, we ignore the intercepted particle e, and write the Eq. (8) into |Υ′〉 = 1√ 3 (x|100〉+ y|010〉)abc + 1√ 3 (x|000〉+ y|110〉)abc + 1√ 3 (x|001〉+ y|011〉)abc, (9) according to the checking algorithm in (ED. 4): Case 1. If Charlie’s measurement obtains state |1〉, combining the basis Bz with probability p, Eve may be detected due to the introduced state |Rej1〉 = |011〉abc with probability P (d1) = 1 3 · p · d · y2 = pdy 2 3 ; (10) 5 Case 2. If Charlie obtains state |0〉 combining Bz , Eve may be detected by the state |Rej2〉 = x|000〉+ y|110〉 with the probability P (d2) = 1 3 · p · d = pd 3 ; (11) Case 3. If Charlie combines the basis Bx, the eavesdropping attack succeeds no matter what Charlie’s measurement results. Therefore, the probability of a successful ISRA eavesdropping for one particle is S(y, p, d, 1) =1− P (d1)− P (d2) =1− pd 3 − pdy 2 3 =1− pd(1 + y 2) 3 , (12) and the rate for whole sequence wN is S(y, p, d, n) =S(y, p, d, 1)n =[1− pd(1 + y 2) 3 ]n. (13) For 0 ≤ y, p, d ≤ 1, S(y, p, d, n) decreases exponentially but is always nonzero. In the limit n → ∞, we have S(y, p, d, n) → 0, thus the protocol is quasi-secure. Here we give the curves for S(y, p, d, n) in Fig. 3 as examples for cases of different y, p, d selections. 0 2 4 6 8 10 12 14 16 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 y = 0 y = 0. 5 y = 1 d = 0. 5, p = 0. 5 (a) 0 2 4 6 8 10 12 14 16 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 d = 0. 1 d = 0. 25 d = 0. 5 y = 0. 5, p = 0. 5 (b) 0 2 4 6 8 10 12 14 16 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 p = 0. 25 p = 0. 5 p = 1 d = 0. 5, y = 0. 5 (c) FIG. 3: Successful eavesdropping rates, plotted for (a) specified probability d and p with different state coefficients y; (b) specified y and p with different d; (c) specified d and y with different p Another typical attack different from the IRA is the entangle-measure attack(EMA, see Fig. 4), i.e. Eve may uses her own ancillar qubit which is in state |0〉 to entangle with the travel qubit b being sent to Bob by utilizing a CNOT 6 gate Ube (let Bob’s particle be the controller and Eve’s be the target)[6], then the joint state of the four particles becomes Ube|Wabc0e〉 = 1√ 3 (|1000〉+ |0101〉+ |0010〉)abce, (14) since the EMA never modifies the original state of the three-qubit W state, this kind of attack can not be sensed during the protocol, however, Eve can still be found during the final QT, the reason is that after Eve’s CNOT operation, the extracted Bell state used for QT actually becomes |φ′〉 = 1√ 2 (|100〉+ |011〉)abe, with the state |ψ〉m, we have the joint state |ψ〉m|φ′〉abe =(a|0〉+ b|1〉)m ⊗ 1√ 2 (|100〉+ |011〉)abe = 1√ 2 (a|0100〉+ a|0011〉+ b|1100〉+ b|1011〉)mabe = 1 2 |ψ+〉ma|ε+〉be + 1 2 |ψ−〉ma|ε−〉be + 1 2 |φ+〉ma|ξ+〉be + 1 2 |φ−〉ma|ξ−〉be, (15) where |ψ±〉 = 1√ 2 (|01〉±|10〉),|φ±〉 = 1√ 2 (|00〉±|11〉),|ε±〉 = (a|00〉±b|11〉) and |ξ±〉 = (a|11〉±b|00〉), Eve may recover the state that Alice teleports on the first particle of her ancillar qubit sequence, however if Eve continues to perform measurement for specifying the coefficients a and b, the entanglement state made up from particles b and e collapses, therefore Bob’s measurement on his particle thus only gives deterministic result, which implies Eve’s existence. Quantum Channel Classical Channel Alice Bob Charlie Eve U FIG. 4: The entangle-measure attack. The “Wuhan” protocol is experimentally feasible. The tripartite W states can be produced by the parametric down-conversion method[7]; the storage of photons is necessary only for a duration corresponding to the distance of Charlie’s distributions and the quantity of qubits that Alice wants to teleport and the entanglement sharing efficiency depends on Charlie’s checking parameters d and p; the local measurements and the QT have been already experimentally implemented. Altogether, the realization of the “Wuhan” protocol should be reachable using current quantum information technology. Y. Li would like to thank Qing-yu Cai for fruitful discussion. This research is supported by the Innovation Founda- tion of Aerospace Science and Technology of the China Aerospace Science and Technology Corporation (CASC) under Grant No. 20060110 and the National Foundation for Undergraduate Novel Research from the Ministry of Education of P. R. China. ∗ Electronic address: [email protected] mailto:[email protected] 7 † Electronic address: [email protected] [1] C. H. Bennett, G. Brassard, C. Crpeau, R. Jozsa, A. Peres, and W. K. Wootters, Phys. Rev. Lett. 70, 1895 (1993). [2] C. H. Bennet, G. Brassard, S. Popescu, B. Schumacher, J. A. Smolin, W. K. Wootters, Phys. Rev. Lett. 76, 722 (1996). [3] M. Zukowski, A. Zeilinger, M. A. Home, A. Ekert, Phys. Rev. Lett. 71, 4287 (1993). [4] H. J. Briegel, W. Dür, J. I. Cirac, P. Zoller, Phys. Rev. Lett. 81, 5933 (1998). [5] W. Dür, G. Vidal, J. I. Cirac, Phys. Rev. A 62, 062314 (2000). [6] M. A. Nielsen, I. L. Chuang, Quantum Information and Computation (Cambridge University Press, Cambridge, 2000). [7] D. Bouwmeester, A. Ekert, A. Zeilinger, The Physics of Quantum Information (Springer, New York, 2000). mailto:[email protected] Acknowledgments References
1cybersec
arXiv
bruh thats so dumb.
0non-cybersec
Reddit
Is the hitting time for a Continuous Markov Chain and a discrete Markov Chain the same?. <p>I am not that familiar with Markov Chains, so forgive me if i say something out of line or use wrong terminology!</p> <p>I know that the expected hitting time for a set $S$ for a discrete a markov chain can be obtained by solving the following!</p> <p>\begin{equation} \textbf{E}_{o}[T_{S}] = \textbf{1} + \sum_{ij}P_{ij}\textbf{E}_{j}[T_{S}] \end{equation}</p> <p>Where $P$ denotes the transition rate matrix (or the transposed normalized adjacency matrix of the graph). $S$ is the subset of nodes we are interested in and $o$ is an arbitrary node we start from. Of course if $o$ is a member of $S$ then we get the hitting time to be zero. How does this compare to a continuous time Markov Chain? Can i still use the same expression to get a hold of the hitting time?</p>
0non-cybersec
Stackexchange
So an old Jewish man dies. So an old Jewish man dies and as per his last wish, his son goes to the newspaper publisher and asks, "How much for an obituary in your newspaper?" Publisher says, "$5 per word". The son says, "Publish 'Jacob Goldberg Dead' ". The publisher says, "We require minimum 6 words". So the son says, "In that case make it 'Jacob Goldberg Dead, Wheelchair For Sale' ".
0non-cybersec
Reddit
nginx default error page stopped working for some reason. <p>This used to work:</p> <pre><code>server { server_name example.com; location / { proxy_pass http://localhost:8888; error_page 502 /502.html; } location = /502.html { root /var/www/example; } } </code></pre> <p>Now suddenly it doesn't anymore... I don't know what changed ?</p> <p>I get 404 instead of displayed <code>/var/www/example/index.html</code> in case port 8888 doesn't respond...</p> <p>How to make this work again? thank you</p>
0non-cybersec
Stackexchange
Checking Bash exit status of several commands efficiently. <p>Is there something similar to pipefail for multiple commands, like a 'try' statement but within bash. I would like to do something like this:</p> <pre><code>echo "trying stuff" try { command1 command2 command3 } </code></pre> <p>And at any point, if any command fails, drop out and echo out the error of that command. I don't want to have to do something like:</p> <pre><code>command1 if [ $? -ne 0 ]; then echo "command1 borked it" fi command2 if [ $? -ne 0 ]; then echo "command2 borked it" fi </code></pre> <p>And so on... or anything like:</p> <pre><code>pipefail -o command1 "arg1" "arg2" | command2 "arg1" "arg2" | command3 </code></pre> <p>Because the arguments of each command I believe (correct me if I'm wrong) will interfere with each other. These two methods seem horribly long-winded and nasty to me so I'm here appealing for a more efficient method.</p>
0non-cybersec
Stackexchange
How do you pass file_system_blacklist arg to Datadog Docker Agent run command?. <p>I want to exclude a path to avoid getting my logs spammed like so:</p> <pre><code> (disk.py:75) | Unable to get disk metrics for /host/proc/sys/fs/binfmt_misc: [Errno 40] Too many levels of symbolic links: '/host/proc/sys/fs/binfmt_misc'\n","stream":"stdout","time":"2020-03-12T23:01:38.424330408Z"} </code></pre> <p>I'm running datadog as a docker agent using the command here: <a href="https://docs.datadoghq.com/agent/docker/?tab=standard#installation" rel="nofollow noreferrer">https://docs.datadoghq.com/agent/docker/?tab=standard#installation</a></p> <p>how do I specify files to exclude in the docker run command? is it an environment variable?</p>
0non-cybersec
Stackexchange
Windows 10 stuck on boot. <p>Today when i started my computer it got stuck on the windows 10 boot logo. The dotted circle stopped spinning after a few times and freezed. I to shut it down using the power button and when i started it automatic repair began. After the repair it showed a blue screen WHEA_UNCORRECTABLE_ERROR. I tried to boot it up and again the same thing happened (freezed at the boot logo). However I was able to access the safe mode. It worked fine in the safe mode but it still freezes at the boot logo.</p>
0non-cybersec
Stackexchange
I was bored in class, so I made a crappy TSM logo for superweek.. http://i.imgur.com/tFxC8qe.jpg
0non-cybersec
Reddit
Did you say, ALL YOU CAN EAT!!!!.
0non-cybersec
Reddit
To look at TVs.
0non-cybersec
Reddit
Difference between &quot;ls -l&quot; and &quot;dir -l&quot;. <p>What is the difference between <code>ls -l</code> and <code>dir -l</code>?</p> <p>I always use <code>ls -l</code>, but my colleague (who is slightly colour blind) uses <code>dir -l</code>. Is this the only difference: <code>ls -l</code> has colour and <code>dir -l</code> not have colour? Or is there a benefit of using <code>dir</code> instead of <code>ls</code>?</p>
0non-cybersec
Stackexchange
Need advice for a research project. Hi, I'm a student in the UK and I have been put up to do a [CREST Gold award](http://www.britishscienceassociation.org/crest-gold). The reason I was put up for the award was I gave a 1 day workshop on encryption and programming for beginners (Teaching about the basics of programming with python and some cryptographic concepts). Because of this I want to do my project for the award around NETSEC or INFOSEC. However, since I need to come up with something I can contribute to the NET/INFOSEC field I'm all out of ideas. I enjoy programming and I plan on getting certifications such as OSCP and others and working in computer security, however I can't come up with anything to do my project on. I also need something that is within the reach of a student, trying to crack properly used AES efficiently is very much out of my league, is there anyway that the good computer security professionals of reddit could help me come up with an idea?
1cybersec
Reddit
love quote gif movie love quotes 4 | APrinter4U.
0non-cybersec
Reddit
EDGE OF TOMORROW 2 Teased by Tom Cruise; Emily Blunt May Return.
0non-cybersec
Reddit
Grunt wiredep not injecting font-awesome. <p>I'm currently working on a project that had already been started using <code>yeoman</code>.</p> <p>For some reason, when I run <code>grunt-wiredep</code> all dependencies are correclty injected in my <code>index.html</code> except for <code>font-awesome</code>.</p> <p>Here's my <code>bower.json</code> file:</p> <pre><code>{ "name": "watermelon", "version": "0.0.0", "dependencies": { "angular": "^1.3.0", "angular-animate": "^1.3.0", "angular-bootstrap": "~0.13.3", "angular-cookies": "^1.3.0", "angular-google-maps-native": "~2.0.0", "angular-mocks": "~1.3.0", "angular-resource": "^1.3.0", "angular-route": "^1.3.0", "angular-sanitize": "^1.3.0", "angular-scenario": "~1.3.0", "angular-touch": "^1.3.0", "angular-ui-router": "~0.2.15", "bootstrap": "^3.2.0", "bootstrap-switch": "~3.3.2", "eonasdan-bootstrap-datetimepicker": "~4.15.35", "es5-shim": "^4.0.0", "font-awesome": "~4.4.0", "json3": "^3.3.0", "moment": "~2.10.6", "ng-tags-input": "3.0.0", "requirejs": "latest", "requirejs-domready": "latest", "stacktrace-js": "~0.6.4", "underscore": "~1.8.3" }, "appPath": "." } </code></pre> <p>And a link to <code>Gruntfile.js</code>: <a href="http://pastebin.com/xxZwAYRW" rel="noreferrer">http://pastebin.com/xxZwAYRW</a></p> <p>When I run <code>grunt-wiredep</code> only these css dependencies get injected:</p> <pre><code>&lt;!-- bower:css --&gt; &lt;link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /&gt; &lt;link rel="stylesheet" href="bower_components/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.css" /&gt; &lt;link rel="stylesheet" href="bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" /&gt; &lt;link rel="stylesheet" href="bower_components/ng-tags-input/ng-tags-input.min.css" /&gt; &lt;!-- endbower --&gt; </code></pre>
0non-cybersec
Stackexchange
Should I say anything?. On a exchange to Denmark at the moment from Canada and one of my Italian roomates [23 M] who I know quite well is engaged. The only problem is that he is constantly hooking up with other women as much as he can on a daily basis. I called him out on it asking why and he says "he needs to be a man" but he will always love his gf and it would break her heart if she knew what he is doing. No one else in the house is going to say anything. Advice? Never seen the girlfriend before
0non-cybersec
Reddit
Spark History Server on S3A FileSystem: ClassNotFoundException. <p>Spark can use Hadoop S3A file system <code>org.apache.hadoop.fs.s3a.S3AFileSystem</code>. By adding the following into the <code>conf/spark-defaults.conf</code>, I can get spark-shell to log to the S3 bucket:</p> <pre><code>spark.jars.packages net.java.dev.jets3t:jets3t:0.9.0,com.google.guava:guava:16.0.1,com.amazonaws:aws-java-sdk:1.7.4,org.apache.hadoop:hadoop-aws:2.7.3 spark.hadoop.fs.s3a.impl org.apache.hadoop.fs.s3a.S3AFileSystem spark.eventLog.enabled true spark.eventLog.dir s3a://spark-logs-test/ spark.history.fs.logDirectory s3a://spark-logs-test/ spark.history.provider org.apache.hadoop.fs.s3a.S3AFileSystem </code></pre> <p>Spark History Server also loads configuration from <code>conf/spark-defaults.conf</code>, but it seems not to load <code>spark.jars.packages</code> configuration, and throws <code>ClassNotFoundException</code>:</p> <pre><code>Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hadoop.fs.s3a.S3AFileSystem at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.apache.spark.util.Utils$.classForName(Utils.scala:225) at org.apache.spark.deploy.history.HistoryServer$.main(HistoryServer.scala:256) at org.apache.spark.deploy.history.HistoryServer.main(HistoryServer.scala) </code></pre> <p>The Spark source code for loading configuration is different in <a href="https://github.com/apache/spark/blob/39e2bad6a866d27c3ca594d15e574a1da3ee84cc/core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala#L82-L125" rel="noreferrer">SparkSubmitArguments.scala</a> and in <a href="https://github.com/apache/spark/blob/39e2bad6a866d27c3ca594d15e574a1da3ee84cc/core/src/main/scala/org/apache/spark/deploy/history/HistoryServerArguments.scala#L67" rel="noreferrer">HistoryServerArguments.scala</a>, in particular the HistoryServerArguments does not seem to load packages.</p> <p>Is there a way to add the <code>org.apache.hadoop.fs.s3a.S3AFileSystem</code> dependency to the History Server?</p>
0non-cybersec
Stackexchange
A HUGE thank you to anabellee83, she sent me my first ever MAC product! Some loose shadows! I love this chick and this shadow!.
0non-cybersec
Reddit
Question about seedling lights.
0non-cybersec
Reddit
Grails 2.0.3 error starting from command line in Windows7. <p>Hoping a kindred soul can assist with this odd windows problem</p> <p>I am attempting to run a grails app on windows and am unable to get grails to start.</p> <p>I have both downloaded the 2.0.3 distro from grails.org and pulled and built the source off of github. </p> <p>The error I receive is as follows:</p> <pre><code>Error: Could not find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter </code></pre> <p>The searching I've done to find solutions to this problem (which some people have had) have yielded no help: All I've found is suggestions that my environment variables are improperly set up. (e.g. <a href="http://grails.1312388.n4.nabble.com/Grails-2-0-Milestone-1-Released-td3704476.html" rel="noreferrer">here</a>)</p> <p>I felt I was quite careful in setting up my variables though. I have the following configured, all under System Variables:</p> <pre><code>JAVA_HOME C:\java\jdk7 GRAILS_HOME C:\grails\2.0.3 // also set it to C:\grails\source\grails-core when dlded from source GROOVY_HOME C:\groovy\1.8.6 PATH %JAVA_HOME%\bin;%GRAILS_HOME%\bin;%GROOVY_HOME%\bin;$PATH </code></pre> <p>I've tried things both before and after downloading groovy and setting that environment variable, and I'm afraid I'm quite lost at this point. Groovy starts just fine, java starts just fine, but grails is unable to start.</p> <p>Is anyone else in Windows having this issue with the latest grails version? </p>
0non-cybersec
Stackexchange
Run a script every time a shell is spawned. <p>I need a way to make a script run at all times under all users and to automatically start if any new shell is spawned. Any ideas?</p>
0non-cybersec
Stackexchange
Harden gets caught dancing his heart out on the big screen, much to his embarrassment.
0non-cybersec
Reddit
Danny Trejo joins From Dusk Till Dawn Cast as The Regulator.
0non-cybersec
Reddit
ARAM Tournament LFG Thread. **This thread is for anyone who is looking for teammates to play in the All Random, All Mid Tournament.** Formats: **Personal LFG:** *Summoner Name* *Extra Notes* **Teams Looking for Subs/Others:** *Team Name* *Team in-game names* *Looking for __________* *Extra Notes* I stole this format from the original Summoner's Rift LFG Thread by Taurath. Once you think you have a team that's ready to sign-up, do so over [here](http://www.reddit.com/r/leagueoflegends/comments/ggtpp/all_random_allmid_tournament_signup_thread/) Keep in mind that 3 out of your 5 regular teammates must have been redditors for at least 5 months (since the very first sign-up thread) in order to compete in the tournament. Your sub's membership is irrelevant for having an eligible team, but they will only be able to replace non-reddit full-time players if they are non-reddit. You might want to mention whether or not you pass the requirement in personal posts EDIT 1: Ozy had to remind me that in ARAM, champ prefers you.
0non-cybersec
Reddit
Manuel Neuer nearly conceding a goal after being miles of his line.
0non-cybersec
Reddit