text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Fastest method for adding/summing the individual digit components of a number. <p>I saw a question on a math forum a while back where a person was discussing adding up the digits in a number over and over again until a single digit is achieved. (i.e. "362" would become "3+6+2" which would become "11"... then "11" would become "1+1" would would become "2" therefor "362" would return 2... I wrote some nice code to get an answer to this and posted it only to be outdone by a user who suggested that any number in modulo 9 is equal to this "infinite digit sum", I checked it an he was right... well almost right, if zero was returned you had to switch it out with a "9" but that was a very quick fix...</p> <p>362 = 3+6+2 = 11 = 1+1 = 2</p> <p>or...</p> <p>362%9 = 2</p> <p>Anways, the mod9 method works fantastic for infinitely adding the sum of the digits until you are left with just a single digit... but what about only doing it once (i.e. 362 would just return "11")... Can anyone think of fast algorithms?</p>
0non-cybersec
Stackexchange
Datepicker-popup formatting not working when value set initially in scope. <p>I am using the Angular UI bootstrap date picker popup using this custom directive on Plunker (<a href="http://plnkr.co/edit/053VJYm1MpZUiKwFTfrT?p=preview" rel="noreferrer">http://plnkr.co/edit/053VJYm1MpZUiKwFTfrT?p=preview</a>):</p> <pre><code>//Module var userModule = angular.module("userModule",['ui.bootstrap']); //Controller userModule.controller("sampleController", ['$scope', function ($scope) { $scope.minDate = new Date(); }]); //Directive code userModule.directive('datePicker', [function (dateFilter) { return { restrict: 'E', require: 'ngModel', scope: { ngModel: '=', ngReadonly: '=?', minDate: '=?', maxDate: '=?', dtpRequired: '=?', dateOptions: '=?' }, template: '&lt;p class="input-group"&gt;' + '&lt;input type="text" style="cursor:pointer" class="form-control" datepicker-popup="{{format}}"' + 'ng-model="ngModel" is-open="opened"' + 'min-date="minDate" max-date="maxDate"' + 'datepicker-options="dateOptions" date-disabled="disabled(date, mode)"' + 'ng-required="dtpRequired" close-text="Close" ng-readonly="ngReadonly" ng-click="openPopup()" /&gt;' + '&lt;span class="input-group-btn"&gt;' + '&lt;button type="button" class="btn btn-default" ng-click="openPopup($event)"&gt;' + '&lt;i class="fa fa-calendar"&gt;&lt;/i&gt;&lt;/button&gt;' + '&lt;/span&gt;' + '&lt;/p&gt;', controller: function ($scope) { // check if it was defined. If not - set a default $scope.dateOptions = $scope.dateOptions || { formatYear: 'yy', startingDay: 1, showWeeks: false }; $scope.openPopup = function ($event) { if ($event !== undefined) { $event.stopPropagation(); } $scope.opened = true; }; $scope.format = 'dd MMMM yyyy'; }, link: function ($scope, element, attrs, controller) { //remove the default formatter from the input directive to prevent conflict controller.$formatters.shift(); } }; }]); </code></pre> <p>This is working fine and the date is formatted fine when selecting a date from the calendar popup. However if I set a date of the ng-model in the controller, the date isn't formatted as 'dd MMMM yyyy' and is returned as a date string like Sat Oct 01 2016 01:00:00 GMT+0100 (GMT Daylight Time). However in the Plunker, I am able to set a date in the controller and it is formatted fine. Here is my HTML for the date picker:</p> <pre><code>&lt;date-picker ng-model="startDate.value" datepicker-options="dateOptions" min-date="minDate" ng-readonly="true"&gt;&lt;/date-picker&gt; </code></pre> <p>In my controller <code>startDate.value = new Date();</code></p> <p>I'm not sure where the problem could be. The image below shows what I'm getting back.</p> <p><a href="https://i.stack.imgur.com/bRVL4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bRVL4.png" alt="Wrong Date"></a></p>
0non-cybersec
Stackexchange
Enforcing directory space limits in an OpenVZ system. <p>I have some programs on a server (Centos4-OpenVZ) that use a directory as temp directory - but pay no attention to the size as it grows.</p> <p>I want to enforce a limit, such as that this folder cannot exceed 300MB.</p> <p>I would use quota but OpenVZ does not support loop devices, that could be used to mount a file as a device.</p> <p>Any other solutions? (Apart from scripting a periodic delete of files in the directory).</p> <p>Editing the application's code to implement this functionality is not entirely out of the question (if it can be done easily and no other ways exist it's written in cpp) but I don't know where I would start if going that route.</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
It may be slow junk, but I'm happy with my first ever V8!. So my dad saw this Mustang while driving home from work. I had been looking to get my first car independent of help from my parents, so the budget was not very high. I personally was in the market for a Golf GTi, but finding one in manual that wasnt too expensive or in good shape was fairly difficult. When he told me there was a Mustang in my price range I wasn't really interested at first. He kept pushing me to test drive it, but I kept saying no. I finally relented to just stop the nagging. We drove to the dealership and I got in the car, and drove it around. It might not be fast in the modern standard, but Ive never really driven a car that was newer than 2005, so comparing it to my previous cars it's a lot faster! A v8 makes such a good noise too. Coming from a 2002 SVT Focus, and before that an FB RX7, I have never really experienced torque either. It came with the optional Mach 1000 audio system and 40th anniversary package. I finally got my summer wheel setup put on ( weather in Ohio is a bit... random at best, we have had 60s and 30s within 1 day) and the wide setup makes a world of difference. Anyway, here she is, my [2004 Mustang GT](https://imgur.com/gallery/3ijuV)
0non-cybersec
Reddit
Simple Poker Simulation - How to design it well. <p>I trying to create a little poker Texas Holdem simulator .. </p> <p>In my solution have some class : <a href="https://i.stack.imgur.com/QiRMI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QiRMI.jpg" alt="enter image description here"></a></p> <p>Premise : I know about <em>Fisher Yates algorithm.</em> I will implement it later</p> <p>Keep in mind that the next step I would like to implement a </p> <ul> <li><em>Hands Evaluator</em> for compare Players <em>Hands</em></li> <li><em>Odds Calculator</em> for some odds like <em>Hand vs Hand</em> or when player go all in before river coming..</li> <li>so on .. </li> </ul> <p>I ask myself if have sense to implements a Class <em>Hand</em> which contains logic about <em>compare Player Hands</em> or continue to use a <em>List</em>.</p> <p>Working with a List it's very comfortable but I think it's a little out of context of problem. </p> <p>In poker world I talk about <em>Hand</em> , best <em>Hand</em> and so on .. </p> <p>There is to implement also a CommunityCard/Board That we have <em>Flop</em> with 3 community Card , <em>Turn</em>: one card and <em>River</em>: one card.. </p> <p>And how this could interact with the eventual class <em>Hand</em> or other , for implements a <em>Hand Evaluator</em> ..</p> <p>Does it make sense to create a <em>Board</em> or <em>CommunityCard</em> class? How would you implement it? With a <em>List(5)</em>? Would you use interfaces? How ?</p> <p>My idea is to create a <em>Hand</em> and <em>Board</em> class. <em>Hand</em> class with a two private member Card. </p> <p><em>Board</em> class probably with a List. I don't know yet. </p> <p>In <em>Hand</em> I know How to compare two different <em>Hand</em> but I don't know how compare 6 different <em>Hand</em> .. Have an idea ? Compare two by two and create a Class ranking that have a List with a ranking about 6 <em>Hands</em>?</p> <p>The alternative without <em>Hand</em> class is continue to use a <em>List</em> and write all the logic about compare hand in a module Hand Evaluation. </p> <p>So I wonder, How to best model the problem now?</p> <p>I have some confusion about .. </p> <p>I have particular difficulty thinking about using the <em>interface and delegate</em> when modeling the problem. Do you have any other suggestions on how to design well and useful tools in addition to the class diagram, I listen to all the advice ..</p>
0non-cybersec
Stackexchange
[OC] Fighting communism 101.
0non-cybersec
Reddit
Banana Republic leather belt for $12.
0non-cybersec
Reddit
How to install linux lmms multimedia studio. <p>I have Linux <a href="http://www.zorin-os.com/" rel="nofollow">Zorin OS</a> and I'm trying to install the newest version Multimedia Studio. I get a tar file when downloaded but don't know where to go from there. Any suggestions for an old man trying to learn new tricks?</p>
0non-cybersec
Stackexchange
AWS SNS : Why is my &quot;ghost&quot; subscription not showing in Topic. <p>I'm having a weird issue with Amazon AWS SNS : When creating subscriptions and topics using <code>aws-php-sdk</code> (3.112.7), there is always a "ghost" or "invisible" subscription.</p> <p><a href="https://i.stack.imgur.com/Km3ur.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Km3ur.png" alt="AWS Console screenshot"></a></p> <p>As you can see, this <strong>subscription exists in "subscriptions" tab</strong>. However, when I click on the topic link (here <code>cav_56826</code>), <strong>I can't see any subscription</strong>.</p> <p><a href="https://i.stack.imgur.com/X3pK8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X3pK8.png" alt="AWS Topic screenshot"></a></p> <p>Do you guys already had a similar issue ? How can this happen ?</p> <p><strong>Here is a my simplified code :</strong></p> <pre><code> try { $arn = "arn:aws:sns:eu-west-1:XXXXXXXXXXXXXXXXX:app/APNS_VOIP_SANDBOX/ios_cav"; $topics = array("allUsers", "cav_56826"); $topicsToSubcribe = array(); foreach ($topics as $topic) { $res = $this-&gt;snsClient-&gt;createTopic(['Name' =&gt; $topic]); if ($res-&gt;get('@metadata')['statusCode'] == 200) { array_push($topicsToSubcribe, $res-&gt;get('TopicArn')); } else { throw new Exception("An error occured during Amazon SNS createTopic", $res-&gt;get('@metadata')['statusCode']); } } $SNSEndPointData = $this-&gt;snsClient-&gt;createPlatformEndpoint([ 'PlatformApplicationArn' =&gt; $arn, 'Token' =&gt; $token ]); foreach ($topicsToSubcribe as $topic) { $this-&gt;snsClient-&gt;subscribe([ 'Protocol' =&gt; "application", 'Endpoint' =&gt; $SNSEndPointData-&gt;get('EndpointArn'), 'TopicArn' =&gt; $topic ]); } } catch (\Exception $e) { // Logs some errors } </code></pre>
0non-cybersec
Stackexchange
[Discussion] Nay or yay.
0non-cybersec
Reddit
What do singular complexes look like?. <p>In the construction of singular homology (from Hatcher), we can reduce it to a case of simplicial homology by defining the singular homology groups as the simplicial homology groups of its singular complex. I know a singular complex consists of an $n-$simplex for every possible continuous image of an $n-$simplex. So clearly the singular complex has an extremely large number of simplices of all dimensions. My question is what exactly do singular complexes look like, and how can we be sure its homology groups line up with those of our initial space?</p>
0non-cybersec
Stackexchange
What screams "I'm insecure in my relationship"?.
0non-cybersec
Reddit
Made this for a friend....
0non-cybersec
Reddit
Google translate, placeholder text in input type=&#39;text&#39;. <p>Problem translating placeholder text in <code>input type="text"</code></p> <p>This is my sample code:</p> <p><strong>Html:</strong></p> <pre><code>&lt;div id="google_translate_element" style="float:left; padding-left:15px"&gt;&lt;/div&gt; &lt;!-- Need to translate this placeholder text --&gt; &lt;form&gt;&lt;input type="text" placeholder= "Enter your name" /&gt; &lt;input type="submit" value="Submit" /&gt; &lt;/form&gt; </code></pre> <p><strong>JavaScipt:</strong></p> <pre><code>&lt;script type="text/javascript"&gt; function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'ca,da,de,el,en,es,fr,it,ja,ko,nl,pl,pt,ru,sv,tl', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); } &lt;/script&gt; &lt;script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"&gt;&lt;/script&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>&lt;style&gt; div#google_translate_element div.goog-te-gadget-simple{background-color:green;} div#google_translate_element div.goog-te-gadget-simple a.goog-te-menu-value span{color:yellow} div#google_translate_element div.goog-te-gadget-simple a.goog-te-menu-value span:hover{color:#ffffff} &lt;/style&gt; </code></pre> <p>translater example is in</p> <p><strong>JSFiddle:</strong></p> <p><a href="http://jsfiddle.net/ulak/zDUYL/" rel="nofollow">http://jsfiddle.net/ulak/zDUYL/</a></p> <p>Please mention any other way to translate placeholder text using google translate</p>
0non-cybersec
Stackexchange
Are there any non-naive parallel sparse matrix multiplication algorithms?. <p>I was wondering about a problem in analyzing a social network (counting friends-in-common between all pairs of members) that requires squaring its adjacency matrix, and started reading up on algorithms for multiplying sparse matrices.</p> <p>However, all I found so far were different ways of arranging the more or less naive "outer product" algorithm between processors - the same total number of multiplications/additions with different amounts of communication and additional algorithmic overhead (which, though, is undoubtedly important).</p> <p>The most non-trivial algorithm I found was the Yuster-Zwick algorithm described in <a href="http://cs.tau.ac.il/~zwick/papers/sparse.pdf">Fast sparse matrix multiplication</a>, which is basically a combination of the same old naive algorithm and using a fast dense method for the dense part of the problem.</p> <p>I looked at how sparse matrix multiplication is implemented in <a href="https://spark.apache.org/mllib/">MLLib</a> and it, too, appears to use the simple block-based algorithm.</p> <p>Are there any parallel algorithms for multiplying sparse matrices that are substantially different from the naive one - as different as Strassen's or Coppersmith-Winograd's algorithms are from the naive algorithm for multiplying dense matrices?</p> <p>For concreteness, let us assume that the matrices are sparse enough that number of non-zeros in the arguments and in the result are both $O(N)$.</p>
0non-cybersec
Stackexchange
Rattlesnake carved from a single piece of cherry - moveable sections and ball within a chamber..
0non-cybersec
Reddit
Prove that a circle can be inscribed in the hexagon. <p>Given a convex hexagon $ABCDEF$. All its sides are equal (it can be irregular). Furthermore, $AD = BE = CF$. How can I prove that a circle can be inscribed in this hexagon?</p> <p><a href="https://i.stack.imgur.com/NKgWC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NKgWC.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
What causes red giants to expand?. When a (small) star is near its death, it expands hundreds of times, forming a red giant. What causes this fenomena? When the fusion stops, the most logical thing that would happen is for gravity to take over, which should make it decrease in size, not increase.
0non-cybersec
Reddit
Why do cars have timing belt?. I know it's a stupid question (right sub? check.) but why do majority of cars use timing belt design? From my understanding, if that belt breaks the engine is totally ripped apart (if it's interference type). Watching lot of videos on youtube on how they work, it's single purpose is to keep all parts of the engine in sync. So why not just use gears and levers that will last forever (like crankshaft which is a permanent fixture of the engine)? Why use belt system that needs replacing every so often? I know that some high end cars uses chains, but even that needs replacing. Is there some mechanical engineering reason or designed to simply keep the service shop in business? Replacing one of these are expensive and not your typical DIY project.
0non-cybersec
Reddit
Your ex is not the one you should be stalking (the mindset behind getting over her). *A little while ago I’ve had some great feedback on [this thread](http://www.reddit.com/r/socialskills/comments/2wn9xc/i_used_to_be_shy_had_very_low_self_confidence_and/) and hopefully also helped someone in the process. I wanted to go a little deeper into it so here it is, a (pretty long) post on how to get out of shitty situations in life. Hope you enjoy it.* **Your ex is not the one you should be stalking** **(the mindset behind getting over her)** Ever thought you’d found the only one girl capable of making you happy and some day out of the blue, she decided to break up with you? **Welcome to the “black hole”** You feel miserable, still can’t believe that happened, almost paralyzed. Nothing amuses you anymore and everything, every little thing you face in your day, whether it’s work, going out with friends, or even watching a freaking movie at home, is just too hard to do. What’s even worse is that you realize you feel like shit but apparently can’t do anything about that. Your self-worth is crushed and you’re almost crying. For a few seconds you may even start believing you are not a man anymore. If some of this resonates with you and I know all of this, it’s only because I lived it and hated every second of it. That’s why I also know what comes next, after you have been sucked in this mess I call the black hole. The next few days you think you got over all that. Suddenly, there it is, a Facebook update or a tweet from your now ex other half. Your reaction is probably along the lines of “Ha! I knew she would have missed me, this post is really about me (even though it’s nothing but a verse from a random song…)” or “She already got over me, I’m pathetic and it was definitely my fault if she left me”. This is just the beginning. The following days or even months are nothing but a race in which you can only keep up by reading and analyzing every single thing that person writes or posts online. Well my friend you’re on the verge of virtual stalking and trust me, it’s slowly eating you from the inside. At this point you may be wondering why the hell I’m emphasizing all this. Well it happens I got out of that black hole and I know what worked for me. I want to share it with you in hopes that you escape it too and become relationship material again, if you want to. **The turning point** When you can’t realize what a mess you’ve become, you probably just need someone else to tell you in order to wake the fuck up. That is why friends and family are there. You notice how they react to your pitiful condition, and it’s like a helping hand reaching from outside the black hole. Finally you are like “Wait, who the hell is this self-doubting, sad and unmotivated zero testosterone creature!? It can’t possibly be me!”. Yes! Good job! Welcome back man. Better late than never. Men are allowed to have feelings too, I know, but there’s a limit to the amount of girliness one can display. C’mon, the whiney bitch era is over, let’s get to work. Work is the perfect word for what you should be doing right now. I’m not talking about going to work at your job. What I mean is getting dirty with working on yourself. After all, if you don’t do it, who else is going to? No little magic fairy here to help you. **How do you work on yourself?** You go through a process. Call it self-development, call it however you like. What matters though it’s not only that you go through it, but the mindset you approach it with. This said, there are two ways you can work on yourself and I like to define them as: 1. Self-analysis 2. Self-stalking One of them is counterproductive when you are in the black hole. The other one has the potential to get you out of it once and for all. You want to think long-term here. You want to go with Self-stalking. What the hell does it mean? It simply means that you need to shift from stalking your ex to stalking yourself. Yes. You, the person you think you know so well but never dedicate much time to understand. **What’s the difference between stalking and analyzing yourself?** Analyzing yourself while you are stuck inside your own head (infamous black hole), is nothing but mental masturbation. What I did to get out of it, was exactly stalking myself. I stopped mentally masturbating and started watching my every move, thought and reaction BUT I did it from an “outsider” perspective. Almost like a paparazzi trying to catch a glimpse of that side boob poolside from the gate of some celebrity’s mansion. It does not give immediate results but with persistence the paparazzi gets his thousand dollars picture. You can do the same by observing yourself (sadly not the thousand bucks part). So here’s what I’ve done to “stalk” myself and how you can do it too: **1. Meditate** Simply sitting in silence for 2, 5 or 10 minutes a day and focusing on your breath, is extremely powerful IF done consistently. This is a skill and as such, it requires practice, so don’t get discouraged if it seems awkward and unnatural at the beginning. It does. It will all feel easier with practice, and the results will be disproportionate. *Action Step*: If you think this is all woo woo guru shit, check out [this video](https://www.youtube.com/watch?v=GZzhk9jEkkI) by a retired navy seal teaching his breathing and meditation technique. This is a guy who knows a thing or two about mental toughness and self-control. *Lesson*: The focus and clarity you will gain from meditating on a daily basis are exactly what you need in order to create some space in between YOU and the vision of yourself. They are two very different things. Understanding this alone can shift your mood from hyper-depressed to active and motivated; you learn that how you are thinking and reacting now to what happened in the past, is just a part of a long term process called “life”. It doesn’t define you. Instead, you will define yourself depending on how you respond to this situation. **2. Read** I guess it comes a time when, if you really want to overcome some obstacles and step to the next level, you really have to add fresh new knowledge to your arsenal. I’m not talking about fantasy, horror or thriller novels; those are great for bedtime. I wanted to think and then act like someone confident, successful and who didn’t need to whine about his ex every time he was hanging out with his friends. Books like “The power of now” by Eckhart Tolle or “Think and grow rich” by Napoleon Hill, helped me shift from a totally negative and passive mindset, to a proactive and positive one. I was reading almost one book every two or three weeks. It’s like having your own personal coach available 24/7. You may not internalize everything at first and that’s fine. Let it rest in the backburner of your mind and soon it will all start to click. *Action Step*: Go on Amazon and simply look for what you feel you need to get better at or learn. Most importantly, look for what resonates most with you to make everything more exciting and compelling. Kindle books are no more than $10 on average. *Lesson*: Learning to invest in yourself is a critical skill for success in every area of life. Less clothes and useless crap, more books. **3. Exercise** I’ve played basketball for 13 years but that was like playing videogames, it was not really meant to improve myself but to keep me entertained. I wanted to be like Kobe Bryant. I wanted the dream, not the process. After I stopped playing, I didn’t have anyone pushing me or screaming at me if I didn’t exercise. It was all on me. It was a matter of choices: Having the persistence to stick to something that I knew was good for me or Letting fast food and beer lead me on the fat route. Regularly going to the gym and then transitioning into a consistent home workout routine, was what I needed to step out of the comfort of having someone make the decisions for me. Try to see lifting weights, doing pushups and running, as a sort of meditation and it will help you enjoy exercising. *Action Step*: take a piece of paper, throw all excuses in the trash and schedule some time (it can be anything from 30 minutes to one or two hours), every day, when you will commit to exercise. If you’re not used to it, start small, but again, be consistent. You can find some pretty awesome and free workouts on this [website](http://darebee.com). *Lesson*: "Mens sana in corpore sano". This phrase from a Roman poet simply means “healthy mind in a healthy body”. Once you have the fuel, you can go for miles. The same goes for your mind and happiness. With a healthy body you are able to enjoy everything and do 20x more than you ever thought possible. **You have your own super power** At this point if you are implementing even one of these three simple but often overlooked habits in your daily routine, you are ahead of 80% of people who do absolutely nothing to improve themselves and keep complaining about their unhappiness. Most importantly now you have the ability to “stalk yourself”. You can see what’s wrong, what’s working and understand what you need to change to be happy and fulfilled or if you really want, to find someone else. By going through this process, you will have made sure, the next “someone” you find, is worth the time you invested in yourself. Remember, it all starts with you. You are the person you need to pay attention to, when you are not at your best. **One last thing, take responsibility** Even for the bad things, even if you think you had nothing to do with what happened to you. Take responsibility for it and be willing to course-correct. It’s what gives you confidence and gets you out of the swamps you end up in. *Ever been in the same situation? What’s your “black hole”?* EDIT: After the great feedback on this post and my first one, (http://www.reddit.com/r/socialskills/comments/2wn9xc/i_used_to_be_shy_had_very_low_self_confidence_and/), I've decided to creat a website where I'll be writing about mindset and unconventional ways of thinking. It's www.breakoutmindset.com, all free content and no BS :)
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
For which $k \in \mathbb{R}$ the vector $(1,k^2-k,k) \in Im(f)$ where $f$ is a linear map?. <p>Let $f:\mathbb{R^3}\to \mathbb{R^3} $ the map defined by $A_h$ $$ A_h= \begin{pmatrix} 2 &amp; 1 &amp; -1 \\ 1 &amp; 2 &amp; 1 \\ -1 &amp; 1 &amp; h \\ \end{pmatrix} $$ where $h \in \mathbb{R}$. $f(x,y,z)=(x-y-2z,x+2y+z,3y+3z)$</p> <p>I have found the value of $h$ for which $\dim(\ker(f))&gt;0$ which is $h=2$. Then a basis of $Im(f)$ is $\{(1,2,1),(-1,1,2)\}$.</p> <p>$$ A_2= \begin{pmatrix} 2 &amp; 1 &amp; -1 \\ 1 &amp; 2 &amp; 1 \\ -1 &amp; 1 &amp; 2 \\ \end{pmatrix} $$</p> <p>I have to determine for which $k \in \mathbb{R}$ the vector $v=(1,k^2-k,k) \in Im(f)$ (with $h=2$). </p> <p><strong>My attempt</strong> </p> <p>I tried to find $k$ such that $v$ is equal to the linear combination of the two vectors of $Im(f)$, but it does not work.</p> <p>I also tried to find $k$ such that $v$ is equal to $(x-y-2z,x+2y+z,3y+3z)$ and I got $k=1+\sqrt{2}$ or $k=1-\sqrt{2}$, but I think I am wrong.</p> <p>What is the right approach? </p>
0non-cybersec
Stackexchange
A Cow/Kitten.
0non-cybersec
Reddit
How to install gimp-GAP for gimp snap. <p>I have a fresh install of Ubuntu 20.04 and I've installed Gimp via Software Manager (so that it became a <strong>snap</strong>, located in <code>/snap/gimp/252/</code>). Now I want to install gimp-GAP. I see no other way than to use "gimp-gap-2.6.0.tar.bz2" from <a href="https://www.gimp.org/news/2009/06/05/gimp-animation-package-260-released/" rel="nofollow noreferrer">https://www.gimp.org/news/2009/06/05/gimp-animation-package-260-released/</a>. However, after unpacking, when running <code>./configure</code> it complains: </p> <pre> > No package 'gimp-2.0' found > No package 'gimpui-2.0' found > No package 'gimpthumb-2.0' found > > Consider adjusting the PKG_CONFIG_PATH environment variable if you > installed software in a non-standard prefix. </pre> <p>Apparently, this gimp-GAP package assumes Gimp has been installed the classical way (not as a snap). What should I do? <p> Edit:<br> <code>echo $PKG_CONFIG_PATH</code> gives the empty result and <code>PKG_CONFIG_PATH</code> (as one string) does not occur anywhere in the top-level files of the gimp-GAP installation files.<br> Searching for <code>gimp-2.0</code> and <code>gimpui-2.0</code> and <code>gimpthumb-2.0</code> gives these locations:</p> <pre> /snap/gimp/252/usr/lib/libgimp-2.0.so /snap/gimp/252/usr/lib/libgimp-2.0.so.0 /snap/gimp/252/usr/lib/libgimp-2.0.so.0.1000.18 /snap/gimp/252/usr/share/aclocal/gimp-2.0.m4 /snap/gimp/252/usr/lib/libgimpui-2.0.so /snap/gimp/252/usr/lib/libgimpui-2.0.so.0 /snap/gimp/252/usr/lib/libgimpui-2.0.so.0.1000.18 /snap/gimp/252/usr/lib/libgimpthumb-2.0.so /snap/gimp/252/usr/lib/libgimpthumb-2.0.so.0 /snap/gimp/252/usr/lib/libgimpthumb-2.0.so.0.1000.18 </pre> <p>Should I set <code>PKG_CONFIG_PATH</code> to <code>/snap/gimp/252/usr/lib/</code> and then again invoke <code>configure</code>?</p>
0non-cybersec
Stackexchange
How to fix an External 4TB HDD with HFSPlus Filesystem stuck on Read-Only. <p>I am running Ubuntu 19.10 with a 4TB External HDD attached with a HFSPlus Filesystem, non-journaled. At some point the HDD would become read-only despite all efforts to mount it at another location besides "/media", change permissions, or amend FSTAB. I used instructions found elsewhere on this very helpful askUbuntu forum.</p> <p>Finally, I came across some instructions to run DMESG to see the output. </p> <blockquote> <p>hfsplus: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. mounting read-only.</p> </blockquote> <p>After further reading I believe the HDD was improperly mounted and this is a textbook case of not properly and safely disconnecting the drive from Ubuntu. I understand that the solution is to run "fsck.hfsplus". However, I quickly learned that I don't have that command available. I tried to install it with apt-get, but there's no package by that name. </p> <p>I am missing something, but I just need to know how to repair the situation. </p> <p>I am someone who has been tinkering with Linux on a superficial level since University with a background in Arts. I set up Piholes and I use Ubuntu mainly to entertain family as a media centre. Thank you very much for your patience.</p>
0non-cybersec
Stackexchange
Random walk, probability of not return to the origin. <p>A man stands one step away from a cliff. With <span class="math-container">$2 \over 3$</span> probability, he steps to the right (away from the cliff), and with <span class="math-container">$1 \over 3$</span> probability, he steps towards the cliff. What is the probability that he escapes the cliff?</p> <p>The solution for this problem is as follows:</p> <p>Say <span class="math-container">$P_1$</span> is the probability of falling off the cliff from 1 step away. <span class="math-container">$P_2$</span> is the probability of falling off the cliff from 2 steps away.</p> <p><span class="math-container">$P_1 = {1 \over 3} + {2 \over 3}P_2$</span></p> <p>The solution states that from <span class="math-container">$2$</span>, the paths leading to the cliff (point <span class="math-container">$0$</span>) are going from <span class="math-container">$x=2$</span> to <span class="math-container">$x=1$</span>, and <span class="math-container">$x=1$</span> to <span class="math-container">$x=0$</span>. The probability of both of these paths is effectively <span class="math-container">$P_1$</span> each, as we are simply translating a step to the right. Therefore, <span class="math-container">$P_2 = P_1 \cdot P_1$</span>, because <span class="math-container">$P_2 = P( \text{particle goes from} \;x=2\; \text{to} \;x=1) \cdot P(\text{particle goes from} \;x=1\; \text{to} \;x=0)$</span>. Thus,</p> <p><span class="math-container">$P_1 = {1\over 3} + {2\over 3} P_1\cdot P_1$</span>.</p> <p>Here's my question: Why do we not consider that <span class="math-container">$P_2$</span> can also go from <span class="math-container">$x=2$</span> to <span class="math-container">$x=3$</span>? (Then from <span class="math-container">$x=3$</span>, we would also have another chance to go from <span class="math-container">$x=2$</span>, and/or <span class="math-container">$x=1$</span>). Shouldn't <span class="math-container">$P_2 = P(\text{particle goes from} \;x=2\; \text{to} \;x=1)\cdot P(\text{particle goes from}\; x=1\; \text{to}\; x=2) + {2\over 3}P(3)$</span>, or something like that?</p>
0non-cybersec
Stackexchange
Rock Band 3 Squier Stratocaster (Real! Guitar that can be used as a controller too) Pricing, Release Date, and Video.
0non-cybersec
Reddit
Dovecot (imap) not starting. <p>I'm running Ubuntu 14.10 installed postfix dovecot vimbadmin and roundcube.</p> <p>Everything works except dovecot.</p> <p>When I restart dovecot I get this:</p> <pre><code>stop: Unknown instance: dovecot start/running, proccess 6580 </code></pre> <p>In my <code>var/log/dovecot.log</code> file I get this:</p> <pre><code>Fatal: service(auth) Group doesn't exist: postifx (See service auth { unix_listener /var/run/dovecot/auth-userdb { group } } setting) </code></pre> <p>So i probably have some problems with the settings, i will post those two if its necessary, but i'm hoping maybe someone all ready had this problem and its a quick fix.</p>
0non-cybersec
Stackexchange
Simple way to save mothers from hemorrhage after birth in developing countries. .
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
Is the special case of Abhyankar&#39;s lemma is also considered as such?. <p>Consider the following statement:</p> <blockquote> <p>Assume $E$ and $F$ are unramified (over some fixed prime) finite separable extensions of a field $K$. Then $EF$ is also unramified.</p> </blockquote> <p>I always thought that it is called Abhyankar's lemma (and indeed it is a special case of it, see <a href="https://en.wikipedia.org/wiki/Abhyankar%27s_lemma" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Abhyankar%27s_lemma</a>).</p> <p>My question is whether this statement is indeed named after Abhyankar. If so, a reference would be appreciated, if not, how is it called? </p>
0non-cybersec
Stackexchange
ar X iv :0 80 2. 36 65 v1 [ cs .C Y ] 2 5 F eb 2 00 8 Outward Accessibility in Urban Street Networks: Characterization and Improvements Bruno Augusto Nassif Travençolo and Luciano da Fontoura Costa Institute of Physics at São Carlos, University of São Paulo, PO Box 369, São Carlos, São Paulo, 13560-970 Brazil (Dated: October 23, 2018) The dynamics of transportation through towns and cities is strongly affected by the topology of the connections and routes. The current work describes an approach combining complex networks and self-avoiding random walk dynamics in order to quantify in objective and accurate manner, along a range of spatial scales, the accessibility of places in towns and cities. The transition probabilities are estimated for several lengths of the walks and used to calculate the outward accessibility of each node. The potential of the methodology is illustrated with respect to the characterization and improvements of the accessibility of the town of São Carlos. The intrinsic relationship between structure and dy- namics seems to scaffold many dynamical processes in nature, from the flight of birds to the binding of proteins. Because of its inherent ability to represent and model the most diverse types of discrete structures, complex net- works have received growing attention. Having initially focused attention on the characterization and modeling of the topology of interconnectivities (e.g. [1, 2, 3]), complex network research progressed steadily to encompass the re- lationship between structure and dynamics in the most diverse systems (e.g. [2, 4]). Though the connectivity does not completely define dynamics, it strongly affects it. This has become clear through investigations of rela- tionships between structure and several types of dynam- ics, including diffusion (e.g. [5]), synchronization (e.g. [6]) and neuronal networks [7, 8]. Particularly, when the dy- namics is modeled in terms of random walks (e.g. [5, 9]), the displacements of the respective moving agents are strongly influenced by several topological factors such as the number of connections at each node and the short- est path lengths between nodes. This type of stochastic dynamics presents an intrinsic potential for modeling the displacement of people within towns or cities. However, because traditional linear random walks allow a moving agent to visit edges and nodes more than once, implying null average displacement in the long term, it becomes important to consider more purposive types of displace- ments. Self-avoiding walks (e.g. [10, 11, 12, 13]) represent a natural simplified choice for modeling urban displace- ments, implying the agents to move away from their ini- tial position in a more effective way while not repeating edges or nodes. Complex networks have been used to characterize im- portant topological, dynamical and spatial properties of cities (e.g., [14, 15, 16, 17, 18]). One important prac- tical application of the structure-dynamics relationship concerns the characterization, modeling and planning of urban displacements. In a previous study, Rosvall et al. [14] considered shortest path lengths in order to quan- tify and compare the information needed to locate spe- cific addresses in different cities. The current work ap- plies the recently introduced concept of accessibility [19] in order to quantify in an objective and comprehensive way the outward accessibilities of each node of a town (i.e. intersection or beginning of routes). The methodol- ogy is illustrated with respect to the specific application to the Brazilian town of São Carlos. Image processing and analysis methods were used to transform the plan of the town into a respective geographical planar net- work, where the nodes represent the crossings and the beginning of routes, while the edges correspond to the streets. Figure 1 shows the network derived from the central part of the town. Then, by simulating a series of self-avoiding walks starting at all nodes, transition prob- abilities from one node to another were estimated with respect to varying lengths of the walks. The outward accessibility of each node — expressing the diversity of routes between those points as well as the potential of the moving agent to visit a set of nodes in the short- est time — is quantified in terms of the entropy of the obtained transition probabilities, so that values close to 1 indicate maximum outward accessibility. One impor- tant property of the outward accessibility measurement is that self-avoiding walks initiating from nodes charac- terized by high accessibility for a given path length tend to visit all reachable nodes at that length in the short- est period of time. In addition, the outward accessibility intrinsically considers the number of alternative routes from the initial node to the reachable nodes. Nodes with high outward accessibility therefore have more balanced number of routes leading to the reachable nodes [19, 20]. We start by presenting the basic concepts about net- work representation. An unweighted and undirected complex network can be represented by a matrix K, called adjacency matrix. The dimension of this matrix for a network with N nodes and E edges is NxN . If the nodes i and j are connected through an edge, the ele- ments K(i, j) and K(j, i) of the adjacency matrix are set to 1; otherwise K(i, j) = K(j, i) = 0. Two nodes of the network are said to be adjacent if they share one edge. Two edges of the network are said to be adjacent if one extremity of each edge share the same node. The degree of a node i is the number of its immediate neighbors. A walk over the network is composed by a sequence of adjacent nodes, starting from an initial node and pro- ceeding through successive steps h. A self-avoiding walk is a walk where the nodes and edges do not appear more than once. http://arxiv.org/abs/0802.3665v1 2 FIG. 1: Network of urban streets of São Carlos, Brazil. The gray level of the nodes indicates their respective averaged outward accessibility accordingly to the legend at the right-hand side. The dashed lines represent the hypothetical additional edges aimed at improving the accessibility. After a real-world structure has been properly repre- sented as a complex network, a diversity of measures can be obtained, ranging from simple features such as the node degree and clustering coefficient, to more sophisti- cated such as shortest path lengths and betweeness cen- trality. These measures have allowed the comprehensive description and characterization of several complex sys- tems [3, 4]. The transition probability that a moving agent node reaches a node j after departing from a node i, through a self-avoiding walk after h steps, is henceforth expressed as Ph(i, j). In order to estimate this probability, a total of M self-avoiding random walks, starting from the node i and proceeding S steps, are performed. Note that these walks stop when one of the following three conditions is met: (i) the walk reaches the maximum pre-defined value of steps (S+1 nodes); (ii) the walk reaches an extremity node, i.e., a node with degree one; or (iii) the walk cannot proceed further because all of immediate neighbors of the node at step h were already visited. The probability Ph(i, j) can then be estimated in terms of the number of times that the walks departing from a node i reach the node j after h steps, divided by the number of walks, M . Note that Ph(i, j) is typically different of Ph(j, i). After the probabilities are estimated for each node, it is possible to calculate the diversity entropy signature Eh(i) of a node i after h steps as [20]: Eh(i) = − N ∑ j=1 { 0 if Ph(i, j) = 0 Ph(i, j)ln(Ph(i, j)) if Ph(i, j) 6= 0 (1) Although the diversity entropy provides an interesting 3 quantification of the accessibility of the nodes, the out- ward accessibility has been proposed as a normalization of the diversity entropy, allowing direct comparison with other measures regarding non-linear transient dynamics of the network (e.g. inward accessibility [19]). The out- ward accessibility OAh(i) of a node i after h steps can be immediately calculated from the diversity entropy as OAh(i) = exp(Eh(i)) N − 1 (2) The outward accessibility was estimated for the central part of the urban streets of São Carlos, which is repre- sented by a network with N = 2812 nodes and E = 4713 edges (Fig. 1). The total length of the self-avoiding ran- dom walks performed for each node was S = 60, and 10.000 walks were performed so as to obtain accuracy in probability estimations. In Fig. 1 the gray levels of the nodes corresponds to their respective accessibility, aver- aged over all the steps. An interesting result which is evident in this figure is that most part of the highly ac- cessible nodes corresponds to the downtown São Carlos, located at the central region of the map. Another im- portant property is the high spatial discriminative power provided by the outward accessibility measurement: it can be clearly seen from Fig. 1 that the nodes situated at the border of the network have the smallest outward values, while the inner nodes have the highest outward values. Interestingly, nodes with low outward accessibil- ity can be found even downtown. It is interesting to recall that the ability of the accessibility approach to identify the most central (against the borders) parts of a network is not restricted to geographical networks, but can be im- mediately applied to any other type of complex network. In order gain more insights regarding the accessibility of the different parts of the town, we also considered hy- pothetical new edges (i.e., new streets) connecting some nodes of the periphery and internal regions of the town (represented as dashed lines in Fig. 1). This new ar- rangement allowed a study of the potential impact of the new edges in the accessibility of their neighborhood. The mean accessibility was computed considering the nodes located up to seven blocks away from the nodes that re- ceived the new connections. Figure 2 shows these val- ues for the original network and for the enhanced net- work. Note an increase of 21% in the accessibility after approximately h = 15 steps for the place where the new edges were added. This result shows that major improve- ments of accessibility can be achieved by adding just a few streets at strategic locations. The authors thank the São Carlos town hall for provid- ing and granting the permission for using the city plan and Matheus P. Viana for the design of the image pro- cessing routines. Bruno A. N. Travençolo is grateful to FAPESP for financial support (2007/02938-5) and Lu- ciano da Fontoura Costa thanks to CNPq (301303/06-1) and FAPESP (05/00587-5) for financial support. [1] R. Albert and A. Barabási, Rev. Mod. Phys. 74, 47 (2002). [2] M. E. J. Newman, SIAM Rev. 45, 167 (2003). [3] L. da F. Costa, F. A. Rodrigues, G. Travieso, and P. R. Villas Boas, Adv. Phys. 56, 167 (2007). [4] L. da F. Costa, O. N. Oliveira Jr, G. Travieso, F. A. Rodrigues, P. R. V. Boas, L. Antiqueira, M. P. Viana, and L. E. C. da Rocha, eprint arXiv.org:0711.3199. [5] L. da F. Costa, O. Sporns, L. Antiqueira, M. G. V. Nunes, and O. N. Oliveira Jr., Appl. Phys. Lett. 91, 054107 (2007). [6] S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, and D. Hwang, Phys. Rep. 424, 175 (2006). [7] L. da F. Costa and D. Stauffer, Physica A 330, 37 (2003). [8] L. da F. Costa and O. Sporns, Int. J. Bifurcat. Chaos 17, 2387 (2007). [9] J. Gomez-Gardenes and V. Latora, eprint arXiv:0712.0278. [10] C. P. Herrero and M. Saboyá, Phys. Rev. E 68, 026106 (2003). [11] C. P. Herrero, Phys. Rev. E 71, 016103 (2005). [12] S.-J. Yang, Phys. Rev. E 71, 016107 (2005). [13] O. Kinouchi, A. Martinez, G. Lima, G. Lourenço, and S. Risau-Gusman, Physica A 315, 665 (2002). [14] M. Rosvall, A. Trusina, P. Minnhagen, and K. Sneppen, Phys. Rev. Lett. 94, 028701 (2005). [15] P. Crucitti, V. Latora, and S. Porta, Chaos 16, 015113 (2006). [16] A. Cardillo, S. Scellato, V. Latora, and S. Porta, Phys. Rev. E 73, 66107 (2006). [17] S. Lämmer, B. Gehlsen, and D. Helbing, Physica A 363, 89 (2006). [18] S. Porta, P. Crucitti, and V. Latora, Physica A 369, 853 (2006). [19] L. da F. Costa, eprint arXiv.org:0801.1982. [20] L. da F. Costa, eprint arXiv.org:0801.0380. http://arxiv.org/abs/0712.0278 4 FIG. 2: Mean accessibility of the original network and the enhanced network. In both cases, only the nodes with up to seven edges of distance from the nodes that received the new connections were taken into account. Note the substan- tial increase in the accessibility as a consequence of the new connections.
0non-cybersec
arXiv
Sky whales floating by..
0non-cybersec
Reddit
I just can't handle the madness.
0non-cybersec
Reddit
E.T. + Nic Cage? [pic].
0non-cybersec
Reddit
Getting a Vbscript to run in Task Scheduler. <p>I have a VBSCRIPT file that is used to backup a database once every day at a particular time, this was done using task scheduler but my problem now is this script requires you to press ok or cancel to complete the operation.</p> <p>In the run command line of the Scheduler is there any switch that I can use so that it does not sit and wait for me to click ok to complete the task?</p>
0non-cybersec
Stackexchange
A Question about the Intersection Multiplicity. <p>In a recent lecture the lecturer defined the <strong>local ring</strong> of an irreducible affine variety $V$ at $P\in V$ as $$ \mathcal{O}_{V,P}=\{\phi\in K(V)\mid\phi\text{ is defined at }P\}. $$ Then he defined the <strong>intersection multiplicity</strong> of two polynomials $f,g\in K[x,y]$ to be $$ I_P(f,g)=\dim\mathcal{O}_{\mathbb{A}^2,P}/\langle f,g\rangle, $$ where $\langle f,g\rangle$ is the ideal of $\mathcal{O}_{\mathbb{A}^2,P}$ generated by $f,g$. </p> <p>My question is that what the above definition means? It is a 'dimension', but of what object? A vector space or an affine space or something else? And if the definition is clear, what does the phrase 'intersection multiplicity' mean? I mean, how does this definition relate to the actual meaning of 'intersection'? This quite confuses me so could anyone help me with this? </p>
0non-cybersec
Stackexchange
How do I draw line with TikZ showing 3 point A,B.C?. <p>I want to draw a line showing end points A and B with a Point C between using TikZ.</p>
0non-cybersec
Stackexchange
Migrating existing Debinan installation to LVM on LUKS with encrypted /boot. <p>I have a VirtualBox with Debian Jessie. After some point I decided to create new virtual drive, encrypt it with LUKS, and copy old system to it without reinstalling. I've used several guides (<a href="http://www.pavelkogan.com/2014/05/23/luks-full-disk-encryption/" rel="nofollow noreferrer" title="Pavel Kogan: Full disk encryption with LUKS (including /boot)">1</a>,<a href="http://ada.adrianlang.de/existing-debian-luks" rel="nofollow noreferrer">2</a>,<a href="http://www.finnie.org/2009/07/26/howto-encrypt-an-existing-debian-installation/" rel="nofollow noreferrer">3</a>,<a href="https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system" rel="nofollow noreferrer">4</a>) to do this, but something goes wrong - when I'm trying to boot from the second drive, I'm getting black screen with cursor (not even sure if it blinks). Looks like that is some kind of a grub related problem.</p> <p>What was before is just a system on a single partition:</p> <pre><code>Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 40136703 40134656 19,1G 83 Linux /dev/sda2 40138750 41940991 1802242 880M 5 Extended /dev/sda5 40138752 41940991 1802240 880M 82 Linux swap / Solaris </code></pre> <p>New disk is /dev/sdb 40Gb. I've prepared this drive as in <a href="http://www.pavelkogan.com/2014/05/23/luks-full-disk-encryption/" rel="nofollow noreferrer" title="Pavel Kogan: Full disk encryption with LUKS (including /boot)">1</a>, then mounted this drive and copied everything from the old system:</p> <pre><code># mount /dev/mapper/vg-root /mnt/ # mount /dev/mapper/vg-home /mnt/home # cp -a /bin /boot /etc /home /lib /root /sbin /usr /var /mnt </code></pre> <p>Then chrooted into the new system:</p> <pre><code># mount -t proc none /mnt/proc # mount -t sysfs none /mnt/sys # mount --bind /dev /mnt/dev # chroot /mnt </code></pre> <p>Modified fstab:</p> <pre><code>/dev/mapper/vg-root / ext4 errors=remount-ro 0 1 /dev/mapper/vg-home /home ext4 errors=remount-ro 0 1 /dev/mapper/vg-swap none swap sw 0 0 </code></pre> <p>Added changes to crypttab, initramfs and grub:</p> <pre><code># echo 'lvm /dev/sda2 none luks' &gt;&gt; /etc/crypttab # echo 'lvm2 dmcrypt' &gt;&gt; /etc/initramfs-tools/modules # update-initramfs -k all -u </code></pre> <p>Added options to /et/default/grub:</p> <pre><code>GRUB_CMDLINE_LINUX="cryptdevice=UUID=3bd9c402-92aa-4bf8-9644-7c7a079e1cf6:lvm" GRUB_ENABLE_CRYPTODISK=y </code></pre> <p>then installed grub <code># dpkg-reconfigure grub-pc</code> and verified /boot/grub/grub.cfg (<a href="http://pastebin.com/Vgb7hpHH" rel="nofollow noreferrer">pastebin</a>)</p> <hr> <p>After trying to boot from this second drive I'm getting black screen with cursor. No errors, not texts of any kind. I think that even grub wasn't started...</p> <p>Any ideas except to reinstall?</p>
0non-cybersec
Stackexchange
Brexit Party leads Westminster poll for first time.
0non-cybersec
Reddit
SSH connection gets lost, but not when logged in to MySQL. <p>When I open an SSH connection to our database server and leave it open for a longer time, the connection gets lost at some point. I don't know why or how, but this happens a lot. I still see the prompt, but can't enter anything. I usually kill the terminal and open a new one. If I wait much longer, I get an error message. </p> <p>However, when I login to MySQL after logging in with SSH, this doesn't happen. The connection stays open. If this is possible, I guess it's a matter of keeping the connection alive. </p> <p><strong>How does this work and can I set SSH to do better?</strong></p>
0non-cybersec
Stackexchange
PlayStation 4's Price and Policies Humiliate Microsoft's Xbox One at E3 - Forbes article.
0non-cybersec
Reddit
$\lvert c_n \rvert = \frac {\max_{\lvert z \rvert = r} \vert f(z) \rvert} {r^n} (0 \lt r \lt R)$ then, $f(z)$ is of this form $f(z) = c_n*z^n$.. <p>$f(z) = \sum_{n = 0}^\infty c_nz^n$, $ \lvert z \rvert \lt R$. If at least one $c_n$ satisfies the following equation: $$\lvert c_n \rvert = \frac {\max_{\lvert z \rvert = r} \vert f(z) \rvert} {r^n} (0 \lt r \lt R)$$</p> <p>then, $f(z)$ is of this form $f(z) = c_n*z^n$.</p> <p>From <a href="http://en.wikipedia.org/wiki/Cauchy%27s_integral_formula" rel="nofollow noreferrer">Cauchy's integral formula</a> we know $\lvert c_n \rvert \le \frac {\max_{\lvert z \rvert = r} \vert f(z) \rvert} {r^n}$, the only case in which the inequality becomes equality I think is when $\lvert f(z) \rvert$ is constant along $\lvert z \rvert = r$. Then I tried to <a href="https://math.stackexchange.com/questions/2455436/if-lvert-fz-rvert-remains-constant-along-a-circle-lvert-z-rvert-r-t">deduce the form from here</a>, but failed.</p>
0non-cybersec
Stackexchange
Software available only to root user?. <p>I am trying to install HP Fortify on RHEL 6.4. I installed it as the root user and can see on the PATH but when I login with a different user I can't see the software in the path. I have updated the permissions to 777.</p> <p>Is the solution to add the path to the etc/profile or is there a better recommended approach to install software for all users?</p>
0non-cybersec
Stackexchange
Proposition 3.10 from Conway&#39;s book. <blockquote> <p><strong>Definition:</strong> If <span class="math-container">$z_1\in \mathbb{C}_{\infty}$</span> then <span class="math-container">$(z_1,z_2,z_3,z_4)$</span> (the <em>cross ratio</em> of <span class="math-container">$z_1,z_2,z_3$</span> and <span class="math-container">$z_4$</span>) is the image of <span class="math-container">$z_1$</span> under the unique Mobius transformation which takes <span class="math-container">$z_2$</span> to <span class="math-container">$1$</span>, <span class="math-container">$z_3$</span> to <span class="math-container">$0$</span> and <span class="math-container">$z_4$</span> to <span class="math-container">$\infty$</span>.</p> <p><strong>Proposition:</strong> Let <span class="math-container">$z_1,z_2,z_3,z_4$</span> be four distinct points on <span class="math-container">$\mathbb{C}_{\infty}$</span>. Then <span class="math-container">$(z_1,z_2,z_3,z_4)$</span> is a real number <em>iff</em> all four points lie on a circle.</p> <p><em>Proof:</em> Let <span class="math-container">$S:\mathbb{C}_{\infty}\to \mathbb{C}_{\infty}$</span> be defined by <span class="math-container">$Sz=(z,z_2,z_3,z_4) $</span>; then <span class="math-container">$S^{-1}(\mathbb{R})=$</span>the set of <span class="math-container">$z$</span> such that <span class="math-container">$(z,z_2,z_3,z_4)$</span> is real. So it is enough to show that the image of <span class="math-container">$\mathbb{R}_{\infty}$</span> under a Mobius transformation is a circle.</p> </blockquote> <p>This is the excerpt from Conway's book on Complex Analysis of one variable.</p> <p>Can anyone please explain why it is enough to show that <span class="math-container">$S(\mathbb{R}_{\infty})=\Gamma$</span> - circle? I have spent about one hour trying to understand it and write down something but I failed to understand it.</p> <p>Would be very grateful for detailed help, please!</p>
0non-cybersec
Stackexchange
dexexception: not support version. <p>I was trying to convert apk to source code. When I entered below command </p> <pre><code>./d2j-dex2jar.sh classes.dex </code></pre> <p>I got this exception:</p> <pre><code>com.googlecode.d2j.DexException: not support version. at com.googlecode.d2j.reader.DexFileReader.&lt;init&gt;(DexFileReader.java:151) at com.googlecode.d2j.reader.DexFileReader.&lt;init&gt;(DexFileReader.java:211) at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:104) at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288) at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32) </code></pre> <p>Version of my apk is Oreo and dexcompiler is dex2jar-2.0. As much as I Know this dexcompiler supports upto N version (correct me if I am wrong). I have searched about this exception, but I didn't find any answers.</p> <p>Please help me to resolve this exception</p>
0non-cybersec
Stackexchange
Your e-books are about to get a big IQ boost.
0non-cybersec
Reddit
My best buds <3.
0non-cybersec
Reddit
This giant Squirtle was being displayed at SDCC!! (San Diego Comic-Con).
0non-cybersec
Reddit
Swatches and Review of Huda Beauty Liquid Matte Lipsticks.
0non-cybersec
Reddit
java.lang.IllegalArgumentException: already added Lokio/AsyncTimeout. <p>I am trying to get the MapBox component working in my Xamarin app.</p> <p>At first I was just referencing a mapbox.dll in my references in my Android project. Using that method, the app would crash when trying to inflate a layout containing mapbox.</p> <p>I dereferenced the mapbox.dll and added the mapbox component to my Android project in hopes that it will fix my problem. However, at compile time I am now getting this error:</p> <pre><code>/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: java.lang.IllegalArgumentException: already added : Lokio/AsyncTimeout; (IM.Droid) </code></pre> <p>I have dereferenced the previous mapbox.dll, deleted it, cleaned, deleted all the obj and bin directories... still getting the same error.</p> <p>Any help would be appreciated.</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
Help with vegetarian meal planning! Please!. Hi all, I became vegetarian in October last year and have been living off mostly pre prepared vege burgers, pies and nuggets and inbred some help in getting some healthier options. I’m not a fan of quorn chicken or any meat substitutes as the texture isn’t appealing but I need some ideas for lower calorie meals to be able to prep 2-4 days in advance that can carry in a Tupperware for work as I’m wanting to lose weight. I’m working out but obviously you can’t out train a bad diet ☹️ Thanks in advance!
0non-cybersec
Reddit
Independence of order of insertion hashtable with open addressing. <p>I'm taking a data-structure class, and the lecturer made the following assertion:</p> <blockquote> <p>the number of attempts needed to insert n keys in a hash table with linear probing is independent of their order.</p> </blockquote> <p>No proof was given, so I tried to get one myself. However, I'm stuck.</p> <p>My approach at the moment: I try to show that if I swap two adjacent keys the number of attempts doesn't change. I get the idea behind it, and I think it's going in the right direction, but I can't manage to make it into a rigorous proof.</p> <p>Aside, does this fact also hold for other probing techniques such as quadratic or double hashing?</p>
0non-cybersec
Stackexchange
Why should ViewModel route actions to Controller when using the MVCVM pattern?. <p>When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing:</p> <pre><code>public class FooViewModel : BaseViewModel { public FooViewModel(FooController controller) { Controller = controller; } protected FooController Controller { get; private set; } public void PerformSuperAction() { // This just routes action to controller... Controller.SuperAction(); } ... } </code></pre> <p>and then for the view:</p> <pre><code>public class FooView : BaseView { ... private void OnSuperButtonClicked() { ViewModel.PerformSuperAction(); } } </code></pre> <p>Why do we not just do the following?</p> <pre><code>public class FooView : BaseView { ... private void OnSuperButtonClicked() { ViewModel.Controller.SuperAction(); // or, even just use a shortcut property: Controller.SuperAction(); } } </code></pre>
0non-cybersec
Stackexchange
Picture I found if my dad from the late '80s/'90s. Looking like Julian from Trailer Park Boys..
0non-cybersec
Reddit
Best practice to recover an CRUD statement to a linked server if connection is lost. <p>I am looking for the best practice for the following scenario.</p> <p>We have a CRM in our company. When an employee updates the record of a company, there is trigger that fires a stored procedure which has a CRUD statement to the linked server hosting the SQL DB of our website.</p> <hr> <p>Question:</p> <p>What happens when the connection is lost in the middle of the CRUD and the SQL DB of the website did not get updated? <strong>What would be the best way to have the SQL statement processed again when the connection is back?</strong></p> <p>I read about Service Broker or Transactional Replication. Is one of these more appropriate for that situation?</p> <hr> <p>The configuration:</p> <p>Local: SQL server 2008 R2</p> <p>Website: SQL server 2008</p>
0non-cybersec
Stackexchange
Malware Uses Blinking Hard LEDs to Transmit Data to Nearby Cameras.
1cybersec
Reddit
bash: brew: command not found. <p>I am new to mac and was following a video and typed export <code>PATH="$HOME/opt/git/bin:$PATH"</code> I believe this messed up my path and I am not able to install MySQL now. When I tried to install homebrew I get <code>-bash: brew: command not found</code>. I tried restarting the terminal and I am still getting this error.</p>
0non-cybersec
Stackexchange
How can I get the sender email address using Outlook.MailItem in VB.NET?. <p>I have tried using <code>mailItem.SenderEmailAddress</code> and <code>mailItem.Sender.Address</code> but they both return a string that looks like this: </p> <p><code>/O=DOMAINNAME/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHI43SPCLT)/CN=RECIPIENTS/CN=JOE BLOGGS8C3</code></p> <p>Where in reality I want <code>[email protected]</code> to be retrurned.</p> <p>Anyone have any ideas?</p> <p>Thank you very much.</p> <p>Edit: I have done some digging; it works perfectly for email addresses of the 'SenderEmailType' SMTP, it just doesn't work for Exchange email addresses.</p> <p>Edit 2: I have tried the code specified <a href="http://forums.codeguru.com/showthread.php?441008-Extract-sender-s-email-address-from-an-Exchange-email" rel="noreferrer">here</a>, but I assume it is outdated because it throws a "Cannot create Active-X component" error.</p> <p><strong><em>EDIT 3:</em></strong> For anyone who ever has the same problem as me, I found the answer (in C#, converted to VB.NET, still works though):</p> <pre><code>Private Function GetSenderSMTPAddress(mail As Outlook.MailItem) As String Dim PR_SMTP_ADDRESS As String = "http://schemas.microsoft.com/mapi/proptag/0x39FE001E" If mail Is Nothing Then Throw New ArgumentNullException() End If If mail.SenderEmailType = "EX" Then Dim sender As Outlook.AddressEntry = mail.Sender If sender IsNot Nothing Then 'Now we have an AddressEntry representing the Sender If sender.AddressEntryUserType = Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry OrElse sender.AddressEntryUserType = Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry Then 'Use the ExchangeUser object PrimarySMTPAddress Dim exchUser As Outlook.ExchangeUser = sender.GetExchangeUser() If exchUser IsNot Nothing Then Return exchUser.PrimarySmtpAddress Else Return Nothing End If Else Return TryCast(sender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS), String) End If Else Return Nothing End If Else Return mail.SenderEmailAddress End If End Function </code></pre>
0non-cybersec
Stackexchange
My son as Jack Cooper from Titanfall 2DAYZ STANDALONE - FIRST TIME PLAYING DAYZ 2017!.
0non-cybersec
Reddit
The Sushi Hall Of Fame! (all made by me).
0non-cybersec
Reddit
Local Computer drives are not visible when creating backup through wizard. <p>When I connect to a database on a remote server through SSMS running on my own computer and I follow the backup wizard for a database, none of my local computer drives are listed. All I can see are drives on the remote server and I can't get access to them since I do not have enough permissions.</p> <p>It seems weird, why I can't see my own computer drive volumes when creating a backup file?</p> <p>Here's what I do:</p> <p>On <code>Object Explorer</code>, right click on database then click on <code>Tasks &gt; Backup</code>, <code>Add &gt; ...</code></p> <p>Part of error message: <code>Can not access the specified path on server</code>.</p>
0non-cybersec
Stackexchange
OfflineUncorrectableSector &amp; CurrentPendingSector emails - what should I do?. <p>Running Centos 7:</p> <p>I've just done a <code>yum update</code> followed by a <code>reboot</code> on one of my servers, and when it came back up I got two emails:</p> <p>First: </p> <pre><code>OfflineUncorrectableSector Device: /dev/sdb [SAT], 28 Offline uncorrectable sectors </code></pre> <p>Second:</p> <pre><code>CurrentPendingSector Device: /dev/sdb [SAT], 24 Currently unreadable (pending) sectors </code></pre> <p>Here's <code>smartctl -x /dev/sdb</code>:</p> <pre><code>smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.1.3.el7.x86_64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: HGST Ultrastar 7K6000 Device Model: HGST HUS726060ALE610 Serial Number: K1KLXSNN LU WWN Device Id: 5 000cca 255f2e12a Firmware Version: APGNT907 User Capacity: 6,001,175,126,016 bytes [6.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Thu Dec 13 14:58:00 2018 CET SMART support is: Available - device has SMART capability. SMART support is: Enabled AAM feature is: Unavailable APM level is: 254 (maximum performance) Rd look-ahead is: Enabled Write cache is: Enabled ATA Security is: Disabled, NOT FROZEN [SEC1] Wt Cache Reorder: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x82) Offline data collection activity was completed without error. Auto Offline Data Collection: Enabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 113) seconds. Offline data collection capabilities: (0x5b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. No Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 898) minutes. SCT capabilities: (0x003d) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE 1 Raw_Read_Error_Rate PO-R-- 100 100 016 - 0 2 Throughput_Performance P-S--- 062 062 054 - 2796 3 Spin_Up_Time POS--- 100 100 024 - 0 4 Start_Stop_Count -O--C- 100 100 000 - 3 5 Reallocated_Sector_Ct PO--CK 100 100 005 - 25 7 Seek_Error_Rate PO-R-- 100 100 067 - 0 8 Seek_Time_Performance P-S--- 128 128 020 - 18 9 Power_On_Hours -O--C- 100 100 000 - 5790 10 Spin_Retry_Count PO--C- 100 100 060 - 0 12 Power_Cycle_Count -O--CK 100 100 000 - 3 192 Power-Off_Retract_Count -O--CK 099 099 000 - 1257 193 Load_Cycle_Count -O--C- 099 099 000 - 1257 194 Temperature_Celsius -O---- 120 120 000 - 50 (Min/Max 25/61) 196 Reallocated_Event_Count -O--CK 100 100 000 - 25 197 Current_Pending_Sector -O---K 100 100 000 - 24 198 Offline_Uncorrectable ---R-- 100 100 000 - 28 199 UDMA_CRC_Error_Count -O-R-- 200 200 000 - 0 ||||||_ K auto-keep |||||__ C event count ||||___ R error rate |||____ S speed/performance ||_____ O updated online |______ P prefailure warning General Purpose Log Directory Version 1 SMART Log Directory Version 1 [multi-sector log support] Address Access R/W Size Description 0x00 GPL,SL R/O 1 Log Directory 0x01 SL R/O 1 Summary SMART error log 0x02 SL R/O 1 Comprehensive SMART error log 0x03 GPL R/O 1 Ext. Comprehensive SMART error log 0x04 GPL,SL R/O 8 Device Statistics log 0x06 SL R/O 1 SMART self-test log 0x07 GPL R/O 1 Extended self-test log 0x08 GPL R/O 2 Power Conditions log 0x09 SL R/W 1 Selective self-test log 0x10 GPL R/O 1 SATA NCQ Queued Error log 0x11 GPL R/O 1 SATA Phy Event Counters log 0x12 GPL R/O 1 SATA NCQ NON-DATA log 0x15 GPL,SL R/W 1 SATA Rebuild Assist log 0x21 GPL R/O 1 Write stream error log 0x22 GPL R/O 1 Read stream error log 0x24 GPL R/O 256 Current Device Internal Status Data log 0x25 GPL R/O 256 Saved Device Internal Status Data log 0x30 GPL,SL R/O 9 IDENTIFY DEVICE data log 0x80-0x9f GPL,SL R/W 16 Host vendor specific log 0xe0 GPL,SL R/W 1 SCT Command/Status 0xe1 GPL,SL R/W 1 SCT Data Transfer SMART Extended Comprehensive Error Log Version: 1 (1 sectors) Device Error Count: 66 (device log contains only the most recent 4 errors) CR = Command Register FEATR = Features Register COUNT = Count (was: Sector Count) Register LBA_48 = Upper bytes of LBA High/Mid/Low Registers ] ATA-8 LH = LBA High (was: Cylinder High) Register ] LBA LM = LBA Mid (was: Cylinder Low) Register ] Register LL = LBA Low (was: Sector Number) Register ] DV = Device (was: Device/Head) Register DC = Device Control Register ER = Error register ST = Status register Powered_Up_Time is measured from power on, and printed as DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days. Error 66 [1] occurred at disk power-on lifetime: 5009 hours (208 days + 17 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER -- ST COUNT LBA_48 LH LM LL DV DC -- -- -- == -- == == == -- -- -- -- -- 40 -- 53 00 38 00 00 14 e0 43 c8 40 00 Error: UNC 56 sectors at LBA = 0x14e043c8 = 350241736 Commands leading to the command that caused the error were: CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name -- == -- == -- == == == -- -- -- -- -- --------------- -------------------- 25 00 00 00 38 00 00 14 e0 43 c8 e0 08 7d+20:36:03.771 READ DMA EXT 25 00 00 00 70 00 00 14 e2 10 00 e0 08 7d+20:36:00.941 READ DMA EXT 25 00 00 04 00 00 00 14 e2 0c 00 e0 08 7d+20:36:00.938 READ DMA EXT 25 00 00 04 00 00 00 14 e2 08 00 e0 08 7d+20:36:00.936 READ DMA EXT 25 00 00 04 00 00 00 14 e2 04 00 e0 08 7d+20:36:00.934 READ DMA EXT Error 65 [0] occurred at disk power-on lifetime: 5009 hours (208 days + 17 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER -- ST COUNT LBA_48 LH LM LL DV DC -- -- -- == -- == == == -- -- -- -- -- 40 -- 53 00 38 00 00 14 e0 43 c8 40 00 Error: UNC 56 sectors at LBA = 0x14e043c8 = 350241736 Commands leading to the command that caused the error were: CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name -- == -- == -- == == == -- -- -- -- -- --------------- -------------------- 25 00 00 04 00 00 00 14 e0 40 00 e0 08 7d+20:36:00.421 READ DMA EXT 25 00 00 04 00 00 00 14 e0 3c 00 e0 08 7d+20:35:57.616 READ DMA EXT 25 00 00 04 00 00 00 14 e0 38 00 e0 08 7d+20:35:57.609 READ DMA EXT 25 00 00 04 00 00 00 14 e0 34 00 e0 08 7d+20:35:57.601 READ DMA EXT 25 00 00 04 00 00 00 14 e0 30 00 e0 08 7d+20:35:57.593 READ DMA EXT Error 64 [3] occurred at disk power-on lifetime: 5009 hours (208 days + 17 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER -- ST COUNT LBA_48 LH LM LL DV DC -- -- -- == -- == == == -- -- -- -- -- 40 -- 53 03 60 00 00 13 f9 4b 10 40 00 Error: UNC 864 sectors at LBA = 0x13f94b10 = 335104784 Commands leading to the command that caused the error were: CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name -- == -- == -- == == == -- -- -- -- -- --------------- -------------------- 25 00 00 03 60 00 00 13 f9 4b 10 e0 08 7d+20:35:00.738 READ DMA EXT 25 00 00 00 d0 00 00 13 fa f2 70 e0 08 7d+20:34:57.902 READ DMA EXT 25 00 00 04 00 00 00 13 fa ee 70 e0 08 7d+20:34:57.900 READ DMA EXT 25 00 00 04 00 00 00 13 fa ea 70 e0 08 7d+20:34:57.898 READ DMA EXT 25 00 00 04 00 00 00 13 fa e6 70 e0 08 7d+20:34:57.896 READ DMA EXT Error 63 [2] occurred at disk power-on lifetime: 5009 hours (208 days + 17 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER -- ST COUNT LBA_48 LH LM LL DV DC -- -- -- == -- == == == -- -- -- -- -- 40 -- 53 03 60 00 00 13 f9 4b 10 40 00 Error: UNC 864 sectors at LBA = 0x13f94b10 = 335104784 Commands leading to the command that caused the error were: CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name -- == -- == -- == == == -- -- -- -- -- --------------- -------------------- 25 00 00 04 00 00 00 13 f9 4a 70 e0 08 7d+20:34:57.413 READ DMA EXT 25 00 00 04 00 00 00 13 f9 46 70 e0 08 7d+20:34:54.625 READ DMA EXT 25 00 00 04 00 00 00 13 f9 42 70 e0 08 7d+20:34:54.622 READ DMA EXT 25 00 00 04 00 00 00 13 f9 3e 70 e0 08 7d+20:34:54.619 READ DMA EXT 25 00 00 04 00 00 00 13 f9 3a 70 e0 08 7d+20:34:54.614 READ DMA EXT SMART Extended Self-test Log Version: 1 (1 sectors) No self-tests have been logged. [To run self-tests, use: smartctl -t] SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay. SCT Status Version: 3 SCT Version (vendor specific): 256 (0x0100) SCT Support Level: 1 Device State: Active (0) Current Temperature: 50 Celsius Power Cycle Min/Max Temperature: 44/61 Celsius Lifetime Min/Max Temperature: 25/61 Celsius Under/Over Temperature Limit Count: 0/0 SCT Temperature History Version: 2 Temperature Sampling Period: 1 minute Temperature Logging Interval: 1 minute Min/Max recommended Temperature: 0/60 Celsius Min/Max Temperature Limit: -40/70 Celsius Temperature History Size (Index): 128 (100) Index Estimated Time Temperature Celsius 101 2018-12-13 12:51 50 ******************************* ... ..(126 skipped). .. ******************************* 100 2018-12-13 14:58 50 ******************************* SCT Error Recovery Control: Read: Disabled Write: Disabled Device Statistics (GP Log 0x04) Page Offset Size Value Flags Description 0x01 ===== = = === == General Statistics (rev 2) == 0x01 0x008 4 3 --- Lifetime Power-On Resets 0x01 0x018 6 6820807272 --- Logical Sectors Written 0x01 0x020 6 20477840 --- Number of Write Commands 0x01 0x028 6 444004265414 --- Logical Sectors Read 0x01 0x030 6 448331816 --- Number of Read Commands 0x01 0x038 6 20846500900 --- Date and Time TimeStamp 0x03 ===== = = === == Rotating Media Statistics (rev 1) == 0x03 0x008 4 5586 --- Spindle Motor Power-on Hours 0x03 0x010 4 5586 --- Head Flying Hours 0x03 0x018 4 1257 --- Head Load Events 0x03 0x020 4 25 --- Number of Reallocated Logical Sectors 0x03 0x028 4 1610568 --- Read Recovery Attempts 0x03 0x030 4 0 --- Number of Mechanical Start Failures 0x04 ===== = = === == General Errors Statistics (rev 1) == 0x04 0x008 4 66 --- Number of Reported Uncorrectable Errors 0x04 0x010 4 18 --- Resets Between Cmd Acceptance and Completion 0x05 ===== = = === == Temperature Statistics (rev 1) == 0x05 0x008 1 50 --- Current Temperature 0x05 0x010 1 49 N-- Average Short Term Temperature 0x05 0x018 1 50 N-- Average Long Term Temperature 0x05 0x020 1 61 --- Highest Temperature 0x05 0x028 1 25 --- Lowest Temperature 0x05 0x030 1 58 N-- Highest Average Short Term Temperature 0x05 0x038 1 25 N-- Lowest Average Short Term Temperature 0x05 0x040 1 53 N-- Highest Average Long Term Temperature 0x05 0x048 1 25 N-- Lowest Average Long Term Temperature 0x05 0x050 4 34 --- Time in Over-Temperature 0x05 0x058 1 60 --- Specified Maximum Operating Temperature 0x05 0x060 4 0 --- Time in Under-Temperature 0x05 0x068 1 0 --- Specified Minimum Operating Temperature 0x06 ===== = = === == Transport Statistics (rev 1) == 0x06 0x008 4 71 --- Number of Hardware Resets 0x06 0x010 4 28 --- Number of ASR Events 0x06 0x018 4 0 --- Number of Interface CRC Errors |||_ C monitored condition met ||__ D supports DSN |___ N normalized value SATA Phy Event Counters (GP Log 0x11) ID Size Value Description 0x0001 2 0 Command failed due to ICRC error 0x0002 2 0 R_ERR response for data FIS 0x0003 2 0 R_ERR response for device-to-host data FIS 0x0004 2 0 R_ERR response for host-to-device data FIS 0x0005 2 0 R_ERR response for non-data FIS 0x0006 2 0 R_ERR response for device-to-host non-data FIS 0x0007 2 0 R_ERR response for host-to-device non-data FIS 0x0008 2 0 Device-to-host non-data FIS retries 0x0009 2 70 Transition from drive PhyRdy to drive PhyNRdy 0x000a 2 71 Device-to-host register FISes sent due to a COMRESET 0x000b 2 0 CRC errors within host-to-device FIS 0x000d 2 0 Non-CRC errors within host-to-device FIS </code></pre> <p>I find it curious that it says <code>PASSED</code>, but I guess it means the drive is still mostly OK, but that the <code>Reallocated_Sector_Ct</code> of 25 suggests it might fail soon?</p> <p>I've never had any such errors before (in 10 years of running a few dedicated boxes), and don't want to mess up. What should I do now?</p> <p>It's a Hetzner storage box, with 10 6GB drives which I have set up in RAID 6 to give ~48TB of space.</p> <p>Is the best thing just to message them and they'll take care of this for me, or is there something I should do first...</p> <p>I have a backup already, runs every night up to Google Cloud Services. I'd rather not have to use it as I know it'll be a slow job to restore.</p> <p>I've logged into Hetzner's support system and for a drive failure they give this advice (this is before submitting a ticket, which I've not done yet):</p> <pre><code>Please give us the following information so that we can better understand your HDD/SSD defect: * Serial number(s) of the defective and/or intact HDD(s)/SSD(s) * Evidence of the defect (entire SMART log, less than one week old) The following assistance is available: * [Instructions on establishing the serial numbers as well as information on defective HDDs/SSDs][1] * [Instructions on exchanging an HDD/SSD with software RAID][1] * [Instructions on creating a complete SMART log][1] Please note that we can only exchange your defective drive for an empty drive. We do not carry out any data exchange or backups. </code></pre> <p>The last line in particular caught my attention. What happens when they put the empty drive in, what do I need to do to rebuild it, or will that just happen automatically?</p> <p>Thanks!</p>
0non-cybersec
Stackexchange
"So no judgement, but you get to judge?". [A hilarious daily show bit on "The Plight of Muscled Americans".](http://lockerz.com/d/9411945) I hadn't seen this on /r/fitness before but if it's a repost, let me know and I'll delete it.
0non-cybersec
Reddit
Gauss formulas to decompose a prime in the sum of two squares. <p>I am looking for a demonstration of the formulas to decompose a prime $p\equiv 1$ $mod$ $4$ in the sum of two squares, cited in H. Davenport, The Higher Arithmetic. I have not found anything on the web. Thank you.</p> <p>If $p=4k+1$ , with $p$ prime,</p> <p>$p=x^2 + y^2$ , with</p> <p>$x\equiv\frac{(2k)!}{2(k!)^2}$ $mod$ $p$</p> <p>$y\equiv(2k)! x$ $mod$ $p$</p> <p>and</p> <p>$x &lt; \frac{p}{2},y &lt; \frac{p}{2}$</p>
0non-cybersec
Stackexchange
How to evaluate $\int_{-10}^{10}(8x^9+5x^5)\,dx$ using the fundamental theorem of calculus?. <p>Can you somebody help me to solve this question?</p> <blockquote> <p>Evaluate the intergral using the fundamental theorem of calculus.<br> $$\int_{-10}^{10}(8x^9+5x^5)\,dx$$</p> </blockquote>
0non-cybersec
Stackexchange
Apple still replaces all batteries for $29 for iPhone SE to iPhone X through December 31 2018.
0non-cybersec
Reddit
Which convergence test should be used for this series?. <p>The series is, $$\sum \limits_{n = 1}^\infty \frac{ \ln(1 + \frac{5}{n})}{\sqrt [3] {n+1}}.$$</p> <p>Using the asymptotic equivalence concept I came up with,</p> <p>$$\frac{ \ln(1 + \frac{5}{n})}{\sqrt [3] {n+1}} \sim \frac{ \ln(\frac{1}{n})}{\sqrt [3]{n}} (n \to \infty)$$</p> <p>But now, I can't figure out what test to use. I have tried the comparation test and the limit comparation test and I couldn't do it. Can you give me a hint? Thanks.</p>
0non-cybersec
Stackexchange
Best way to talk/not talk about miserable happenings over last few years to people?. Hi there, looking for some advice to this general issue. First a lot of background: In my life I started off very shy, not being vulnerable, mostly image oriented. Directly related to my upbringing where my parents meant well & wanted 'the best' for me, but this meant high pressure, some physical abuse but mainly emotional abuse and an unacceptance of me as I am, always expecting. Under this paradigm I wasn't the most social, but over time things open up, and one thing that gave me social confidence was that I was getting good grades & expected myself to do well for myself professionally. So this professional path changed when I was in graduate school & saw it wasn't actually for me after 2 years. I wasn't worried, I had good marks in undergrad, I could go in a different direction. There was stress behind the career confusion, as well as stress from an ending but lingering controlling relationship by my gf. Both factors weakened me, but I still felt strongly in my principles, still felt like myself, still felt like I could rationalize even though my thinking was a bit affected, and felt like I could survive the onslaught of moving back home & deciding my next schooling & how to apply & whatnot. It didn't really work like that when I moved home, even though I had some strength early on, the weakened state from the bad relationship, with no time to heal, and a home that pushed paranoia and fear, did eventually get to me & weaken me as a person. I was there for almost two years, working and 'trying to decide', but really being distracted by the abuse & having my mental state & confidence disintegrate. A lot of my life growing up was unlearning that process & learning a loving process that worked for someone sensitive like me. Moving back home brought back a lot of the negativity again, as well as actual abuse that accumulated stress that led to some mental weaknesses. I lost my ability to communicate my philosophical ideas with people, I would try but I would no longer have the same eloquance as before, the abuse changed my communications, life was no longer coherent like it once was. A lot of my beliefs were shifted, blah blah blah. Anyways I did eventually make myself move out to allow myself to recover, applied to a different grad school, and am there now. It's been a lot of processing emotions and building a new process, the old positive one is dead unfortunately, even after trying to revive those patterns, I just can't believe in the absolute goodness of all humans anymore. However I like my process, I think it's been refined & brings me some clarity & coherance again, and my mental incapacities have mostly been healed, and at some level i'm able to verbalize myself. So my concern is that now I'm 27, and when I am getting to know someone new, I don't really know how to deliver my life story ( if they're curious in it that is). I feel at 27, in the eyes of someone else, I 'should' be somewhere else with my life. I feel maybe some people can see me as a 'fuck up' , but I don't believe it knowing the lessons I learned, and the confusion of all that abuse at that time, and im proud that I got out of it, I feel good towards myself in general about it. But it's so hard to reach that understanding with people, and I don't even know if that's something I should aim for when I first meet them. Should I keep the misery aside? Should I continue to process it on my own & invest in more of the joys of my life, so that that's what I discuss with new people? I'm not looking necessarily for a one-size-fits-all approach, but I'd appreciate some perspectives of how I can approach this. There's the inner feeling of others seeing me as a mess-up for being 27 and still not officially starting my career since I'm in school, yet internally I know I've grown and now that I have hope for life again all the pain from the past may have some meaning in the learning I've done. I don't know, I guess I'm afraid of people judging me, I want to be honest with them, and I want to be understood, at the same time I don't want to be pushing people away with misery. I don't actually like to discuss miserable topics, but in this case it helps clear up why im in the position I am, I guess. What do you think?
0non-cybersec
Reddit
Tensor product algebra $\mathbb{C}\otimes_\mathbb{R} \mathbb{C}$. <p>I want to understand the tensor product $\mathbb C$-algebra $\mathbb{C}\otimes_\mathbb{R} \mathbb{C}$. Of course it must be isomorphic to $\mathbb{C}\times\mathbb{C}.$ How can one construct an explicit isomorphism?</p>
0non-cybersec
Stackexchange
multi-part numbers and units in siunitx. <p>I'm trying to type set something like this "4 x 5 x 6 mm^2". the following command using <em>siunitx</em> package does not generate what I wanted. </p> <pre><code>\SI{4 x 5 x 6}{mm^3} </code></pre> <p>Instead, it produces “4 mm^3 x 5 mm^3 x 6 mm^3". How do we correct this? </p> <p>Thanks.</p>
0non-cybersec
Stackexchange
How do I detect an iPhone user on my website?. <p>I want to forward my viewers on my site to a different place if they are using an iPhone. Is there a way to do that using iWeb?</p>
0non-cybersec
Stackexchange
My brother [29M] wants me [20F] to pick him up from an airport 5 hours away. I don’t want to. Am I being unreasonable?. The dates for our family reunion has been set since February. My brother hasn’t even looked at flights until last week despite nagging from my parents and other relatives. The flights have obviously gone up significantly in price, but he was able to find one landing 5 hours away for $200 less than what he would pay just flying into our town. He now wants me to drive him to and from the airport both ways. I’m annoyed because I feel like he’s asking me to bear the burden of his negligence in booking his flights. Am I being unfair? How do I tell him I don’t want to do this without putting a strain on our relationship right before the reunion? **TL;DR my brother was late booking flights and wants me to pick him up and drop him off at an airport 5 hours away so he can save some money. What do?** EDIT: Thank you everyone, I didn’t even realize that would add up to 20 hours driving even without accounting for gas, mileage on my car and all that. I didn’t even consider what times his flight might land — probably times that are not so ideal since he’ll be choosing the cheapest options. He is being even more ridiculous than I initially thought. I will try to find a way to (nicely?) tell him to shove it.
0non-cybersec
Reddit
Spring Boot Rest Controller how to return different HTTP status codes?. <p>I am using Spring Boot for a simple REST API and would like to return a correct HTTP statuscode if something fails.</p> <pre><code>@RequestMapping(value="/rawdata/", method = RequestMethod.PUT) @ResponseBody @ResponseStatus( HttpStatus.OK ) public RestModel create(@RequestBody String data) { // code ommitted.. // how do i return a correct status code if something fails? } </code></pre> <p>Being new to Spring and Spring Boot, the basic question is how do i return different status codes when something is ok or fails?</p>
0non-cybersec
Stackexchange
Python dictionary comprehension very slow. <p>I have a dictionary <code>d1</code> and a list <code>l1</code>.</p> <p>The dictionary keys are strings, and the values are Objects I have defined myself. If it helps, I can describe the Object in more detail but for now, the objects have a list attribute <code>names</code>, and some of the elements of <code>name</code> may or may not appear in <code>l1</code>. </p> <p>What I wanted to do was to throw away any element of the dictionary <code>d1</code>, in which the <code>name</code> attribute of the object in said element does not contain any of the elements that appear in <code>l1</code>.</p> <p>As a trivial example:</p> <pre><code>l1 = ['cat', 'dog', 'mouse', 'horse', 'elephant', 'zebra', 'lion', 'snake', 'fly'] d1 = {'1':['dog', 'mouse', 'horse','orange', 'lemon'], '2':['apple', 'pear','cat', 'mouse', 'horse'], '3':['kiwi', 'lime','cat', 'dog', 'mouse'], '4':['carrot','potato','cat', 'dog', 'horse'], '5':['chair', 'table', 'knife']} </code></pre> <p>so the resulting dictionary will be more or less the same but the elements of each list will be the key-value pairs from <code>1</code> to <code>4</code> excluding the fruit and vegetables, and will not contain a 5th key-value par as none of the furniture values appear in <code>l1</code>.</p> <p>To do this I used a nested list/dictionary comprehension which looked like this:</p> <pre><code>d2 = {k: [a for a in l1 if a in d1[k]] for k in d1.keys()} print(d2) &gt;&gt;&gt;&gt;{'1': ['dog', 'mouse', 'horse'], '3': ['cat', 'dog', 'mouse'], '2': ['cat', 'mouse', 'horse'], '5': [], '4': ['cat', 'dog', 'horse']} d2 = {k: v for k,v in d2.iteritems() if len(v)&gt;0} print(d2) &gt;&gt;&gt;&gt;{'1': ['dog', 'mouse', 'horse'], '3': ['cat', 'dog', 'mouse'], '2': ['cat', 'mouse', 'horse'], '4': ['cat', 'dog', 'horse'],} </code></pre> <p>This seems to work, but for big dictionaries, 7000+ items, it takes around 20 seconds to work through. In and of itself, not horrible, but I need to do this inside a loop that will iterate 10,000 times, so currently it's not feasible. Any suggestions on how to do this quickly?</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
Compiling external C++ library for use with iOS project. <p>I'm completely new to using C++ libraries, so appreciate this might be a bit specific for my case (let me know and I can provide more details). </p> <p>I have an external C++ library that I'm trying to use with an iOS project. The library follows a configure, make, make build pattern to output a .a library file. When I try and add this library file to Xcode, I get the following error:</p> <blockquote> <p>ignoring file /Users/Developer/iOS/TestProj/libpresage.a, file was built for archive which is not the architecture being linked (i386):</p> <p>/Users/Developer/iOS/TestProj/libpresage.a</p> </blockquote> <p>Based on <a href="https://stackoverflow.com/questions/24669336/librestkit-a-file-was-built-for-archive-which-is-not-the-architecture-being-li">this question</a>, I've tried turning Build Active Architecture Only to NO, and I get the same error. This makes me suspect that I've compiled the library for the incorrect architecture. </p> <p>Running lipo -info on the .a file gives: </p> <blockquote> <p>input file libpresage.a is not a fat file Non-fat file: libpresage.a</p> <p>is architecture: x86_64</p> </blockquote> <p>Given that this isn't armv7s, armv7, or arm64, I try and compile the C++ library again with the following parameters:</p> <p><strong>1)</strong> Try </p> <pre><code>./configure CC="gcc -arch armv7s" \ CXX="g++ -arch armv7s" \ CPP="gcc -E" CXXCPP="g++ -E" </code></pre> <p>Error in compiling, I get:</p> <pre><code>ld: library not found for -lcrt1.3.1.o clang: error: linker command failed with exit code 1 (use -v to see invocation) </code></pre> <p><strong>2)</strong> Try </p> <pre><code>./configure CC="gcc -arch arm64" \ CXX="g++ -arch arm64" \ CPP="gcc -E" CXXCPP="g++ -E" </code></pre> <p>Error in compiling, I get:</p> <blockquote> <p>ld: warning: ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libSystem.dylib, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libSystem.dylib (2 slices)ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libstdc++.dylib, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libstdc++.dylib (2 slices)</p> <p>ld: dynamic main executables must link with libSystem.dylib for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)</p> </blockquote> <p>Is there something obvious that I'm missing?</p> <p><strong>EDIT:</strong></p> <p>Thanks for the replies, so I've managed to get the library into Xcode as a custom build target, pointing the 'make' command to the libraries MakeFile. This build fine.</p> <p>My steps from here:</p> <ul> <li>Add a dependency from my Objective C iOS app target to the custom build target.</li> <li>Reference the library and make an Objective C++ wrapper. </li> <li>This seems fine until I need to call the external C++ library, then I get the error when compiling:</li> </ul> <blockquote> <p>Undefined symbols for architecture armv7: "Presage::Presage(PresageCallback*)", referenced from: -[PresageBridge init] in PresageBridge.o "Presage::~Presage()", referenced from: -[PresageBridge init] in PresageBridge.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)</p> </blockquote> <ul> <li><p>My objective C++ wrapper (linking the external C++ library header presage.h):</p> <pre><code>#import "PresageBridge.h" #include "presage.h" @implementation PresageBridge - (instancetype)init { if(self = [super init]) { Presage hello(&amp;callback); } return self; } </code></pre></li> <li><p>Based on the code above it doesn't seem like I'm missing the header, and what's interesting is that I've also tried creating an instance of other classes in the external library and they seem to be working, which suggests that Xcode can't link presage.h properly for some reason. </p></li> </ul>
0non-cybersec
Stackexchange
I don't know if this is right place, I'm anxious about where I am in life socially and I really just want some honest responses.. Alright, basically I'm extremely depressed and have a lot on my mind and I just want somebody to tell me what they think about it. So my entire life has been a disaster. I am 23 and yet feel like I'm about 10 emotionally and I probably come off that way. I spent my entire school years an outcast and victim of terrible bullying, and I've been majorly depressed for basically me entire life. I've never had anyone in my life who I'd really describe as a friend, its more like I had some bullies who would bring me along to bully after school and I was too afraid of loneliness to refuse them. I played football to try to earn a little respect from people, but I was the worst on the team and they basically just used it as an excuse to beat me up. Even the coaches would mock me to my face in front of everyone. Even though I've always had top test scores and my teachers always seemed to think I was some kind of genius, I failed every class in high school because by that time I was unable to motivate myself to do even the simplest homework. I always ended up with zeroes on every assignment but A's on the tests but they kept promoting me anyway. I became a pothead and alcoholic when I was 17 and I've been smoking and drinking away the pain every day ever since. When I was about to graduate high school my "friends" got caught with paintball guns they'd been vandalizing the town with and they blamed it on me even though I wasn't with them, and so I got charged. My dad made a deal with the court that if I left the country for 6 months they would drop the charges, and sent me to work at one of his outsourcing centers in China. The highschool gave me a diploma even though I left 3 months early, but they didn't read my name at graduation. To all those people who I'd spent my whole life trying to impress, all those girls I'd always been desperate to like me, it was like I didn't exist. Everyone I knew went to college, some went to Ivy Leagues and some went to party schools where they had even more exciting lives I was jealous of, while I spent months at a time crying alone in my apartment drinking constantly. I never really went to work at the outsourcing center, they hardly spoke english and I had nothing to contribute. I kept begging to come home but my Dad would only let me if I had a job or got in to a college. I couldn't muster the will to fill out a college application for 2 entire years, which I spent with hardly any human contact and never sober. Then when I was 21 I started university, and failed out at the end of the year. The whole time I didn't make a single friend, the only people I ever interacted with were drug dealers. I drank alone every night, trying to get myself to do work or make friends or find a girl to talk to, convinced that if I drank more I'd have the confidence to, but I never did. After that I'd already missed all the deadlines to apply anywhere for the next semester so I applied for the one after that. The next 8 months I spent lying in bed at home alone, staying up all night drinking and smoking and sleeping all day. I got a job at a restaurant early on, but got fired after 2 weeks because "being a restaurant host is a girls job". I couldn't bring myself to get another job after that. Finally it came time to start college again, and I ended up doing even worse, I failed every class, made no friends, met no girls, and now I was 22 lying to everyone about my age. I was desperate to be one of the cool fraternity kids but they all laughed at me just like everyone in high school had. Now I've been kicked out of there to. So now I've just turned 23 and I have no degree and hardly any credits, no experience, no skills, no friends, I'm a virgin, I'm an alcoholic and a weed addict, I'm depressed and have such low self esteem I can't even look anyone in the eyes, I can hardly speak coherently anymore and I talk to myself constantly from being completely alone for the majority the last 4 years. I'm so weak I'm practically atrophied. I have no plans, no future, nothing to live for at all. I'm more pathetic than I've ever been. And I still long for a social life so desperately, I want to fit in, to be included, to be respected, to have friends who like me and are proud of me and a girlfriend who loves me. And I'm at the point where I've felt exactly the same way for 13 years and have come no closer to it, and I am completely hopeless. Obviously writing that has just been a huge act of self-pity, which I know is revolting. I have so little social experience to compare myself to so basically I just want you to tell me what you think of me, how you would feel if you were me, and what I should do. Thank you.
0non-cybersec
Reddit
Anal Beads. I am a heterosexual man interested in anal, and I was wondering the difference in feelings from anal beads. I have a plug, but I want to get some beads to try them out. There is the kind that is on a string, and there is the kind that is like a dildo almost, but is slender and has the balls on it, essentially like the other kind, but all of it is made of the same material. I assumed that the kind w/ the string would just bunch up inside you, and I was wondering if the other kind is better because it wouldn't bunch up together and go deeper inside of you. Are there pros/cons to both? Thanks for your help, long time reddit member, but made a new account because it is embarrassing for me.
0non-cybersec
Reddit
Didn't bother to clean up, just how it always looks..
0non-cybersec
Reddit
How to display french accent in a beamer table?. <p>I have a table in french, it is correctly displayed with latex, but when I put it in beamer it does not display the accent, for example république in the first line</p> <pre><code>\documentclass[12pt]{beamer} \usepackage[frenchb]{babel} \usepackage{pdfpages} \usepackage{polyglossia} \setmainlanguage{french} \begin{document} \begin{frame}\frametitle{Extraction de CF bilingues} \begin{itemize} \begin{table} \caption{Exemple de CF en Italien et en Français} \centering \scriptsize \begin{tabular}{|c|c|} \hline CF_{it} &amp;CF_{fr} \\ \hline \left\{repubblica\right\}, \left\{7, 22,..., 48972\right\}&amp; \left\{ r\'{e} publique\right\}, \left\{6 98,..., 42558\right\}\\ \left\{regina, londra\right\}, \left\{36, 180,..., 48762\right\}&amp; \left\{reine, londres\right\}, \left\{785, 1368,..., 42572\right\}\\ \left\{dibattito\_politico\right\}, \left\{554, 1299,..., 48764\right\}&amp; \left\{débat\_politique\right\}, \left\{222, 995,..., 37942\right\}\\ \hline \hline \end{tabular} \label{tab\string:CC} \end{table} \end{frame} \end{document} </code></pre> <p>How can I show the accentuated character, the problem is caused by the { character</p>
0non-cybersec
Stackexchange
Visual Studio 2015 JavaScript debugging doesn&#39;t catch unhandled exceptions when &#39;Just my code&#39; is enabled. <p>Since the entire team has upgraded to Visual Studio 2015, the debugger no longer breaks on unhandled exceptions in JavaScript. However 1 of the 4 machines works fine and we're guessing this is because it's on IE10 and the rest of us are on IE11. </p> <p>Anyway, to cover the obvious stuff:</p> <ul> <li><p>All settings are identical between all machines, including the mycode.default.wwa.json in the JavaScript > JustMyCode folder in the Visual Studio 2015 installation directory</p></li> <li><p>The default settings on the new Exception Settings window match the Exception settings in the old modal window from 2012</p></li> </ul> <p>So to reproduce the problem, we just write any old bit of dodgy code in an external JS file (note that script blocks on the page itself are caught correctly):</p> <p>ViewModel.js:</p> <pre><code>function something() { foo(); } something(); </code></pre> <p>When JustMyCode is enabled, foo() will not be caught as an unhandled exception by the debugger. As soon as JustMyCode is disabled, the exception will be caught fine. So yeah, we can workaround this problem, but as soon as that's disabled, we lose actual .Net debugging.</p> <p>Has anyone experienced this problem and/or found a solution? I've tried adding *.js to the MyCode section inside of the mycode.default.wwa.json file and I've also <a href="https://connect.microsoft.com/VisualStudio/feedback/details/1743347/javascript-debugger-not-catching-unhandled-exceptions-in-external-js-files-when-just-my-code-is-enabled" rel="nofollow">logged a bug on Connect</a>, but I don't expect a fast answer from Microsoft on the matter.</p> <p><strong>Edit</strong>: So this only seems to happen when there's a query string on the end of the JS file, e.g. site.js?V=1234. If you remove the query string then the debugger catches exceptions as it did in Visual Studio 2012. Submitted a new repro and demo project to Microsoft.</p>
0non-cybersec
Stackexchange
file /dev/adm taking too much space disk. <p>I'm the admin of a VPS, and I saw that 65GB over my 100GB are taken by a file in /dev/adm</p> <p>I used "df -h" to see my disk space left, and make "du -h" in / folder. I found that this file "/dev/adm" is taking all the space. What is this file? Can I safely remove it? or Purge it?</p> <p>I'm on Debian 7.</p> <p>Thank you for your answers.</p> <p><strong>EDIT</strong> : /dev/adm is not a folder, it's a file.</p>
0non-cybersec
Stackexchange
More than 40 SUV vehicles are going to be out of the market in April, this is the reason.
0non-cybersec
Reddit
Millie.
0non-cybersec
Reddit
In search of DB Cooper - the 1971 skyjacker who jumped out of a Boeing 727 with over $200k in cash and was never seen again [21m] (1979).
0non-cybersec
Reddit
Hadoop (HDFS) - file versioning. <p>At the given time I have user file system in my application (apache CMIS). As it's growing bigger, I'm doubting to move to hadoop (HDFS) as we need to run some statistics on it as well. The problem: The current file system provides versioning of the files. When I read about hadoop - HDFS- and file versioning, I found most of the time that I have to write this (versioning) layer myself. Is there already something available to manage versioning of files in HDFS or do I really have to write it myself (don't want to reinvent the hot water, but don't find a proper solution either).</p> <p><strong>Answer</strong></p> <p><em>For full details: see comments on answer(s) below</em></p> <p>Hadoop (HDFS) doesn't support versioning of files. You can get this functionality when you combine hadoop with (amazon) S3: Hadoop will use S3 as the filesystem (without chuncks, but recovery will be provided by S3). This solution comes with the versioning of files that S3 provides. Hadoop will still use YARN for the distributed processing.</p>
0non-cybersec
Stackexchange
How to Install the app twice without interference in android?. <p>I have an Android app (let's called X), I want to create a second app X2 but based on the other app. So I changed the manifest application name property to X2 also I changed the package name...but still when I install X2, app X is erased!</p> <p>What properties should I change so I can install the two app independently on one devices. I'm working on eclispe.</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company.app1" android:versionCode="1" android:versionName="1.0" &gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name1" android:theme="@style/AppTheme" &gt; </code></pre> <p>after change.</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company.app2" android:versionCode="1" android:versionName="1.0" &gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name2" android:theme="@style/AppTheme" &gt; </code></pre>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
2 Bottles 3 kicks.
0non-cybersec
Reddit
Declare acronyms and abbreviations to automatically correct spaces after periods?. <p>If I understand correctly, (La)TeX assumes that a period after a lower-case letter ends a sentence while a period after an upper-case letter does not. Unfortunately, my documents usually contain plenty of acronyms and abbreviations. Unless I remember to use <code>\@</code>, the spacing after periods is wrong:</p> <pre><code>\documentclass[convert={density=150},varwidth]{standalone} \begin{document} \noindent \makebox[0.7in][l]{Incorrect:}% Your computer needs more RAM. I can give you some.\\ \makebox[0.7in][l]{Correct:}% Your computer needs more RAM\@. I can give you some.\\ \makebox[0.7in][l]{Incorrect:}% Colors (red, blue, etc.) are nice.\\ \makebox[0.7in][l]{Correct:}% Colors (red, blue, etc.\@) are nice. \end{document} </code></pre> <p><img src="https://i.stack.imgur.com/pw1Bq.png" alt="rendering of the above document"></p> <p>Is it possible to declare certain strings to be acronyms or abbreviations to invert this assumption? If so, this would reduce the number of spacing errors in my documents.</p> <p>For example:</p> <pre><code>\documentclass[convert={density=150},varwidth]{standalone} \usepackage{magicalacronymhelper} \declareacronym{RAM} \declareabbr{etc} \begin{document} \noindent \makebox[0.7in][l]{Correct:}% Your computer needs more RAM. I can give you some.\\ \makebox[0.7in][l]{Correct:}% Your computer needs more RAM\@. I can give you some.\\ \makebox[0.7in][l]{Correct:}% Colors (red, blue, etc.) are nice.\\ \makebox[0.7in][l]{Correct:}% Colors (red, blue, etc.\@) are nice. \end{document} </code></pre> <p><img src="https://i.stack.imgur.com/oJpmT.png" alt="enter image description here"></p>
0non-cybersec
Stackexchange
Can someone I.D. this anime for me? Appreciated!.
0non-cybersec
Reddit
Constructor overloading or allow null?. <p>Which is the preferred design to use, one constructor that allows null, or two constructors where one throws an <code>ArgumentNullException</code> on null?</p> <h1>Two constructors with exception throwing</h1> <pre><code>public class Foo { private IDictionary&lt;string, string&gt; _bar; public Foo() { _bar = new Dictionary&lt;string, string&gt;(); } public Foo(IDictionary&lt;string, string&gt; bar) { if (bar == null) { throw new ArgumentNullException(); } _bar = bar; } } </code></pre> <h1>One constructor that handles null</h1> <pre><code>public class Foo { private IDictionary&lt;string, string&gt; _bar; public Foo(IDictionary&lt;string, string&gt; bar = null) { if (bar == null) { _bar = new Dictionary&lt;string, string&gt;(); } else { _bar = bar; } } } </code></pre>
0non-cybersec
Stackexchange
Shadowland character customization wishlist. Before anything, I do want to say that english is not my native language so sorry if I make any mistakes. So, with all datamining and hype of character creation, I have seen many ideas of what we may get or not, I would admit I'm still VERY excited for what else it may come so as a way to vent out and make some discussion I decided to make this list. Mostly to see what others expect and make some conversation as we all wait twiddling with our thumbs. Now, a few notes to mention before I start the list. 1. Even thou I do try to follow some of the logic of what we may have seen I do not claim that my criteria is flawless. 2. While what I would want the most would be body variations, I would not mention it in the list as everything would be based on the options we have seen so far, so even I do wish for less buff males I would not add them as everything I would add would be based on stuff we have seen. 3. While is pretty much confirmed allied races will get something with the elf eyes post, I would assume blizz would focus on the main races first and either add less to the allied ones or add their options mid expansion, so I will focus on the non allied options. 4. Speaking of allied races, I will try to avoid giving options to classic races from the allied ones, I could refer similar stuff from one but I will try to add new ones. 5. Assume that even for the stuff we got I would always ask "more of it" as having more options is always nice. So no need to say "more hair options" in every section. Ok, lets go. &#x200B; **Human** Honestly, I wouldn't ask anything for humans, not because I think they don't need anything but because of what we have seen, is clear they're getting a lot of stuff. Humans are the most played race in alliance and with the idea of adding race diversity I do assume we will get a lot for humans. If there's anything specific I would ask for them but also for almost any race, it would be skin options to make your character be buff or soft, I do find eerie being a human mage and having biceps so big you can see the vein, same with women when they're suppose to be as strong as male characters but doesn't have abs or anything. &#x200B; **Orc** My mayor struggle in finding options for the orcs is trying to come up with options that don't apply on the mag'ar, of course stuff like jewelry and accessories could be used, I also considered the option of giving male orc mustaches but then I wonder, can they grow a mustache? Seriously, do orcs have the ability to grow hair over the upper lip? Well, blizz could decide they do and add that. A mayor idea that come up could be using the themes of other clans in their options, just like the mag'ar skin options are based on Draenor clans, maybe the orc could have options based in clans in Azeroth. Also maybe consider add options for those who look to play as a less fierce orc and more of a wise one, going for the soft skin options for those who go mage or shaman. In specific options, maybe we could go for fangs and teeth, or even jaws if they're willing to go there, making options to give you a bigger or smaller under bite to be more of a brute or less of one. Finally, while I liked the option of straight up orcs, maybe we could get a hunch version for females to make them look more scary. &#x200B; **Dwarf** Like humans, dwarf had been getting some nice options and most of my requests would go in "more please" section. If I had to add specific stuff, that would be maybe the addition of options like nose and eyebrows for more tweaks to the face, I want some bushy eyebrows for my dwarfs. Also, consider the option to give the females facial hair, no need to go as crazy as the males but still, anything that would make them more unique would add to it. &#x200B; **Forsaken** Same as human and dwarf, in fact I'm quite happy how they decided to experiment with stuff like the body horror and adding more options like stitches and bolts. If I had two mayor requests those would be add a bit from both extremes. Some people like the idea of their forsaken look more human, still dead but peaceful, the option to choose how rotten your body is does add a lot but we could play with it by adding some less creepy options, maybe even add some natural facial hair option. In the other side of the coin, there're those who love being a freak so we could add more stuff to look monstrous, maybe something they could do is give a two skins options, like your character has one large stitch cut through his body/head and like he was given the skin of two bodies. And lets not forger, straight up forsakens too, orcs ain't the only one who needed a chiropractor. &#x200B; **Night elf** Everything about soft and buff skin still apply here, but also we could add options thinking in two themes of the elfs, the sentinels and the druids. Currently, night elfs are either hippie nature buddies or angry forest killers getting angsty \*blatantly ignores the charred remains of Teldrassil\*. So maybe go with those option to add variety. For the druids, maybe go with more nature related ideas, earth color and maybe leafs in hair and beards, even going so far to add antlers to some extend. Also, give the male elf a more cheerful face option, most of them look either too serious, angry or constipated. For the sentinel side, take note of the WC3 military unit style, the black eyes of the night warriors and so for, maybe give some hints to the potential dark future of the night elfs. Maybe go for some twigs and leaves accessories for the first idea and some moon shape and angular one for the second. **Taurens** I'll admit I'm bias to taurens cause they're my favorite horde race, but if someone need more options they're the ones. The skin and tribal painting options are nice and we know we will get more horn options but I do think there's more to add. For starters, maybe taurens could get some hair options for the manes in top of their heads, the braids on the side do look cool but it limit the options, maybe add some mohawks or adornments with feathers, flower, stone and similar. Basically, give taurens some actual hair options on their actual head and not just the sides. Also their face options are laughable not only by the amount but by how little they change, if the idea of giving more jaw options to the orc is implemented something similar could be done to the taurens, if not, maybe think on better use of face texture to give more emphasis on nose, lips and/or eyes with the options. One final suggestion could be options to the tail, not only with length and type but also with accessories, some options being more thin, thick, bushy or even attach things like ornaments or a morning star (Saw that concept somewhere and I love it) &#x200B; **Gnome** Oof, ok this is a hard one. Partly because of the small size and also because of any outlandish idea I had it could be applied to the mechagnomes. I think they could add maybe nose and ears options seeing those elements are very prominent in the gnomes head. Maybe consider the idea of colorful tattoos on the face with magical symbols or mechanical themes, something I would find funny would be a tattoo option where is just their face burned with the outline of goggles around their eyes like something exploded in their faces. Still, gnomes due to their small size do need more prominent options that could be seen from afar, so maybe stick with those ideas. &#x200B; **Troll** Welp, another race that have been given a lot of options, so you do know the bulk of it. I have seen someone suggesting stuff like warpaint to match the one of trolls in WC2, I would add of course the jewelry and accessorize options to match the darkspear and the other new clans the race has added with the skin options. I don't know if I do want to ask for straight up males and hunch over females mostly because this troll model is REALLY tall when standing straight, so yeah, opinions here? &#x200B; **Draenei** Some people had sugested the idea of making red draenei but I do think that would be too much lore wise, but again, blizz could say fuck it and go for it. There was the panel where they say draeneis will get various tail options and so for, and to be honest I'm not really into this race so I would like to hear others suggestions. The one option I would add it would be the option to give female draenei the same kind of head crest and horns from the males. I know someone would claim that's a biological difference but hey, blizz make the rules here and I do think females don't get many crazy options with the horns. I guess if there's one request for me it would be go crazy with the alien heads. &#x200B; **Blood elf** Assuming everything we had seen in the datamining is going to be in the game, this race already seen to be getting some good options. The jewelry ideas while a bit much for my taste do fit the style, if I could ask for something extra maybe go for a more lets say corrupted option, like an option where they lose some of their control and had green veins around their eyes or something. Also, they could go even more crazy with the bling with this one too, maybe some golden chains dragging from the ears and some tiaras, heck go nuts. &#x200B; **Worgen** Let males walk straight and females walk hunch over, that one speak for itself. I would say that hairs do suffer similar issues as the taurens so maybe play around it to add something to their manes. Also even thou lore wise worgens don't have tails we could discuss the idea of giving the option. Also in the eye options we could give females more feral options without pupils and males option with pupils. We could also add the idea of unique options for the human form. Granted, that would be dead weight unless they give the option to worgen players to fight in human form, but still, maybe give options similar to what Genn looks in HotS, with prominent fangs, pointy ears and feral eyes. Finally, this is both a race option but also a transmog options, we could add options to the claws, giving them color and shape. But also give worgens to hide one handed weapons so they can claw their enemies to death. &#x200B; **Goblin** Mmmmh, well I guess I could say that most of the things in gnomes apply here due to the small size but also there's the fact we could go for a more clunky and unrefined version of it. I do imagine the idea of make up options being gaudy and too over the top or maybe some colorful tattoos in a trashy way, going for the kind of "classy" style of Gallywyx being that of goblins trying to look refine only to look more ugly. I also like the idea of adding stuff like pieces of jagged metal stuck in the skin or badly stitched scar to show how goblins while smart are not very safe even. Now the two mayor debates here would be gillygoblins and people who don't share my stand on goblins being as ugly as I portray them. In the first case, I'm on the fence, I do think that after the unshackles and all that gillygoblins are members of the horde, but I don't know if they're similar enough to regular goblins to just be a customization option, I mean, gillygoblins can literally breath underwater so maybe that's a deal breaker. As for the second point, well, not gonna claim I'm right but also not gonna claim I'm wrong, I do want to hear what others have to say so yeah, go for it. &#x200B; **Pandaren** Right out of the door, ears and tails are the easiest options to consider, everything else, more of it but also I do think pandaren could use some work to look more disting to each other. One idea is what I stated before for making bodies more soft or buff, granted, pandas do have fur but there could be a way to work around to make a pandaren actually look strong without having to make a massive change in their body. Also for both hair and facial hair we could consider the idea of using the fur rather than putting a wig on their head, maybe give them a mane in some options or some fluff around it, play with the resources to add more to it, even add fur to certain areas like the back of the head or around the limbs, would there be clipping? Sure but I think is better to have the option and let players choose. Also, I would love if there were some customization options exclusive to each side, as in, if you're a pandaren in the alliance or the horde, you get accessories representing either the tushui or the houjin. &#x200B; Oof, ok that was longer than I expected, not sure if everyone out there would take the time to read it but making it was fun, still, would love to read what you guys think, take care and thanks for your time.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
I made a fluffy 3D model of the bee!.
0non-cybersec
Reddit
Canadian Government silencing scientists on contentious issues.
0non-cybersec
Reddit
SQLAlchemy - Querying with DateTime columns to filter by month/day/year. <p>I'm building a Flask website that involves keeping track of payments, and I've run into an issue where I can't really seem to filter one of my db models by date.</p> <p>For instance, if this is what my table looks like:</p> <pre><code>payment_to, amount, due_date (a DateTime object) company A, 3000, 7-20-2018 comapny B, 3000, 7-21-2018 company C, 3000, 8-20-2018 </code></pre> <p>and I want to filter it so that I get all rows that's after July 20th, or all rows that are in August, etc.</p> <p>I can think of a crude, brute-force way to filter all payments and THEN iterate through the list to filter by month/year, but I'd rather stay away from those methods.</p> <p>This is my payment db model:</p> <pre><code>class Payment(db.Model, UserMixin): id = db.Column(db.Integer, unique = True, primary_key = True) payment_to = db.Column(db.String, nullable = False) amount = db.Column(db.Float, nullable = False) due_date = db.Column(db.DateTime, nullable = False, default = datetime.strftime(datetime.today(), "%b %d %Y")) week_of = db.Column(db.String, nullable = False) </code></pre> <p>And this is me attempting to filter <code>Payment</code> by date:</p> <pre><code>Payment.query.filter(Payment.due_date.month == today.month, Payment.due_date.year == today.year, Payment.due_date.day &gt;= today.day).all() </code></pre> <p>where <code>today</code> is simply <code>datetime.today()</code>.</p> <p>I assumed the <code>due_date</code> column would have all DateTime attributes when I call it (e.g. <code>.month</code>), but it seems I was wrong.</p> <p>What is the best way to filter the columns of <code>Payment</code> by date? Thank you for your help.</p>
0non-cybersec
Stackexchange