text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Best practice privileges and roles for postgres schema migration. <p>I'm having a re-look at roles and privileges in postgres to minimise the damage that a compromised account can do.</p>
<p>Ownership and migrations is a part I'm having trouble getting my head around.</p>
<p>As I understand it, a table is initially owned by the role that creates it, and a table can only be dropped by the owner.
However, the owner of a table is effectively a super-user. They can grant themselves all permissions on that table, making any attempt to limit that user's access to the table fairly pointless.</p>
<p>I've a separate role that our application uses (application_role) to connect and that role is not the owner and does not have permission to alter the table or truncate.</p>
<p>Changes to the schema are automated as part of our build process with fairly high permission levels.
I'm looking at a couple of alternatives to see if they offer any practical additional security. But it seems like not really?</p>
<ol>
<li><p>One option would be to set up the migration user as <code>CREATE ROLE build_account NOINHERIT IN ROLE db_owner</code> and then <code>SET ROLE db_owner</code> before creating/dropping a table.</p>
</li>
<li><p>Have the build role do <code>ALTER TABLE new_table TO db_owner</code> after it creates a table. This does seem more robust than the above option, but means we'll have to intervene manually if we ever want to drop a table. That might be ok, since dropping tables is rare, but it eliminates some of the advantage of automated schema changes as it introduces more opportunity for user error.</p>
</li>
</ol>
<p>Is there anything I've missed? Is there a best practice for setting up the role that performs Postgres schema migrations in a build process?</p>
| 0non-cybersec
| Stackexchange |
So my Computer Shop is on the front page of Ars Technica right now..... | 0non-cybersec
| Reddit |
Supermarket Chains Selling Slave-Labour Prawns (2014) [1080p]. | 0non-cybersec
| Reddit |
HOLY CRAP YOU GUYS! I WAS JUST OFFERED A JOB!. I already work full-time (non cosmetic industry) but I was offered a seasonal job (which is perfect) doing makeup at Ulta on the weekends starting in September. By the freaking General Manager. I need extra cash so this is perfect. | 0non-cybersec
| Reddit |
Cesc Fabregas picks his PL Team of The Season. | 0non-cybersec
| Reddit |
Plopp the bunny eats a cherry. | 0non-cybersec
| Reddit |
MRW a case of the Coronavirus was confirmed here in northern Illinois. | 0non-cybersec
| Reddit |
Convergent or divergent series? Asymptotic of the series?. <p><span class="math-container">\begin{align}
A&=\sum_{n\ge 0} \frac{(-1)^n}{n!} \frac{b^n}{(n+1)^3}\\
&= \sum_{n=0}^{\infty}\frac{(-1)^{n}b^{n}}{n!}\frac{1}{(1+n)^{3}} = 1\,{}_{3}F_{3}(1,1,1;2,2,2;-b)
\end{align}</span>
The series is convergent or divergent when b ~ 10^6? Can we survey the asymptotic of this series when b large?
I have use the wolfarm alpha and see that it come to zero for b large! However it's not help for my problem. I need an approximation when b large for this series so any suggestions for me to do that? <span class="math-container">${}_{3}F_{3}(1,1,1;2,2,2;-b)$</span> is the generalized hypergeometric function.</p>
| 0non-cybersec
| Stackexchange |
Real estate people of Reddit! What's the dumbest reason why someone turned a house down?. | 0non-cybersec
| Reddit |
Geodesic completeness of the Poincare ball model without using Hopf-Rinow theorem. <p>A Riemannian manifold is said to be <em>geodesically complete</em> if every maximal
geodesic is defined for all $t\in \mathbb R$.</p>
<p>Poincare ball is a unit ball(open) in $\mathbb R^n$ with metric
$$g_{ij} = \frac{\delta_{ij}}{(1 - x_k x^k)^2}.$$</p>
<p>The geodesic equation is</p>
<p>$$\frac{d^2x^i}{ds^2} + \Gamma^{i}_{jk}\frac{dx^j}{ds}\frac{dx^k}{ds} = 0$$</p>
<p>where $\Gamma^i_{jk} = \frac{2}{(1 - x_\mu x^\mu)}[\delta^i_kx_{j} + \delta^i_jx_{k} - \delta_{jk}x^i]$(after <a href="https://math.stackexchange.com/questions/1583434/christoffel-symbols-for-the-poincar%C3%A9-ball-model">computation</a>).</p>
<p>Given $x(0)=0$ and $x'(0)=v$, I wonder how to solve this geodesic equation for the geodesic curve $x$. I know the locus of it is either a straight line or a circular arc that meets the boundary of the ball orthogonally. </p>
| 0non-cybersec
| Stackexchange |
How to make LINQ-to-Objects handle projections?. <p>I have implemented a basic (naive?) LINQ provider that works ok for my purposes, but there's a number of quirks I'd like to address, but I'm not sure how. For example:</p>
<pre><code>// performing projection with Linq-to-Objects, since Linq-to-Sage won't handle this:
var vendorCodes = context.Vendors.ToList().Select(e => e.Key);
</code></pre>
<p>My <code>IQueryProvider</code> implementation had a <code>CreateQuery<TResult></code> implementation looking like this:</p>
<pre><code>public IQueryable<TResult> CreateQuery<TResult>(Expression expression)
{
return (IQueryable<TResult>)Activator
.CreateInstance(typeof(ViewSet<>)
.MakeGenericType(elementType), _view, this, expression, _context);
}
</code></pre>
<p>Obviously this chokes when the <code>Expression</code> is a <code>MethodCallExpression</code> and <code>TResult</code> is a <code>string</code>, so I figured I'd <em>execute</em> the darn thing:</p>
<pre><code>public IQueryable<TResult> CreateQuery<TResult>(Expression expression)
{
var elementType = TypeSystem.GetElementType(expression.Type);
if (elementType == typeof(EntityBase))
{
Debug.Assert(elementType == typeof(TResult));
return (IQueryable<TResult>)Activator.CreateInstance(typeof(ViewSet<>).MakeGenericType(elementType), _view, this, expression, _context);
}
var methodCallExpression = expression as MethodCallExpression;
if(methodCallExpression != null && methodCallExpression.Method.Name == "Select")
{
return (IQueryable<TResult>)Execute(methodCallExpression);
}
throw new NotSupportedException(string.Format("Expression '{0}' is not supported by this provider.", expression));
}
</code></pre>
<p>So when I run <code>var vendorCodes = context.Vendors.Select(e => e.Key);</code> I end up in my <code>private static object Execute<T>(Expression,ViewSet<T>)</code> overload, which switches on the innermost filter expression's method name and makes the actual calls in the underlying API.</p>
<p>Now, in this case I'm passing the <code>Select</code> method call expression, so the filter expression is <code>null</code> and my <code>switch</code> block gets skipped - which is fine - where I'm stuck at is here:</p>
<pre><code>var method = expression as MethodCallExpression;
if (method != null && method.Method.Name == "Select")
{
// handle projections
var returnType = method.Type.GenericTypeArguments[0];
var expType = typeof (Func<,>).MakeGenericType(typeof (T), returnType);
var body = method.Arguments[1] as Expression<Func<T,object>>;
if (body != null)
{
// body is null here because it should be as Expression<Func<T,expType>>
var compiled = body.Compile();
return viewSet.Select(string.Empty).AsEnumerable().Select(compiled);
}
}
</code></pre>
<p>What do I need to do to my <code>MethodCallExpression</code> in order to be able to pass it to LINQ-to-Objects' <code>Select</code> method? Am I even approaching this correctly?</p>
| 0non-cybersec
| Stackexchange |
SVG tooltip z-index with html title. <p>I'm trying to use an HTML title with a very large tooltip. However I can't seem to get the tooltip background to appear above the title.</p>
<p>Here's my code:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var chart = new Highcharts.Chart({
"chart": {
"type": "gauge",
"renderTo": "chart-2-container",
"marginTop": 60
},
"series": [{
"data": [{
"y": 55.6,
"name": "Area",
"tooltip": "Area: 50.6 %<br/>Minimum: 50.6<br/>3rd quartile: 57.1<br/>2nd quartile: 59.4<br/>1st quartile: 64.7<br/>Maximum: 75.7"
}],
"name": "%"
}],
"tooltip": {
"borderColor": "#E2E2E2",
"borderRadius": 5,
"backgroundColor": "white",
"style": {
"color": "#454545",
"fontSize": 14,
"fontFamily": "Arial, sans-serif",
"zIndex": 9999,
"lineHeight": 14 * 1.4
},
"formatter": function() {
return this.point.tooltip;
}
},
"title": {
"floating": true,
"useHTML": true,
"style": {
"zIndex": 1,
},
"text": "<a href=\"http://www.google.com\">This is some link as a very long title which will probably wrap a couple of lines</a>"
},
"yAxis": {
"title": null,
"tickPixelInterval": 72,
"tickLength": 10,
"minorTickLength": 8,
"minorTickWidth": 1,
"min": 50.6,
"max": 75.7,
"plotBands": [{
"from": 50.6,
"to": 57.1,
"color": "#ee2c34",
"thickness": 15,
}, {
"from": 57.1,
"to": 59.4,
"color": "#f07627",
"thickness": 15,
}, {
"from": 59.4,
"to": 64.7,
"color": "#a88735",
"thickness": 15,
}, {
"from": 64.7,
"to": 75.7,
"color": "#2c876d",
"thickness": 15,
}]
},
"pane": {
"startAngle": -150,
"endAngle": 150
}
});</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id='chart-2-container' style="width: 400px; height: 300px;">
</div></code></pre>
</div>
</div>
</p>
<p>(also as a fiddle <a href="https://jsfiddle.net/d6q1gt4m/" rel="nofollow noreferrer">https://jsfiddle.net/d6q1gt4m/</a>) </p>
<p>The problem is that the background is always behind the title. I could switch to non-html title but then I have the problem that only the 1st line is actually a URL if the title is wrapping (and I need to reapply all my link styles). </p>
<p>Does anyone know how I can get the svg tooltip to appear on top of HTML ?</p>
<p>Note: I would like to avoid having to set <code>useHTML</code> for the tooltip if possible as that opens up another can of worms for me. </p>
| 0non-cybersec
| Stackexchange |
Losing Your Voice.
I, Jason DuBois, am keeping this journal in the event that… something… happens to me, and the reason as to why is unknown. I want my story out there. I’m sure it’s likely that whoever finds this assumes it to be the ravings of a lunatic, and it’s likely that they’re correct as well. But I just want to make it clear. It’s not the simple fact that I hear voices that makes me crazy, the voices drove me crazy.
It began two weeks ago, but it didn’t get really bad until a few days ago. The first time I heard them, I was lying awake in bed. I had just finished writing some of my dissertation for grad school, and I was sitting in bed surfing Youtube, the pale glow of my laptop the only light in my darkened room. I was flipping through random related videos, not really paying attention to where I was going. It got weird when I clicked a link advertising: “Call of Duty New Easter Eggz.” I’m not an intense player, but I played enough to be interested in what I would find.
It had nothing to do with Call of Duty. Instead, the video began with a dark screen. Then, out of nowhere, a small girl began approaching the front of the screen from a point in the distance. Her approach was accompanied by furtive whisperings, but I couldn’t quite make out what was being said. I desperately wanted to shut off my laptop, but a part of me wanted to see what was going to happen. The girl stopped walking, and by now her body took up the majority of the screen. Her face was empty and sorrowful. This close, I could see that she was whispering something along with the other voices. I strained my ears to match some phrase of whispering with the pattern of her moving lips. When I was successful, the blood left my face.
“Jason, Jason, Jason,” she was whispering. It had to be a coincidence. It had to be. All of a sudden her face snapped from one of sorrow into a giant grin stretching from ear to ear, literally, splitting her face in two. “We want to talk to you Jason.” That was enough for me. I slammed my laptop shut and dashed from my bed. My palm slammed up on the light switch on my wall. There was no way I was going to fall asleep without it on. I tried to brush the occurrence off as a coincidence, or maybe I had just fallen asleep. That was probably it I told myself, I had been up late working on my dissertation. Looking back at that now, I would laugh at my naiveté; unfortunately, laughing is difficult when you’re terrified every second of the day.
Regardless, my second of conviction that everything would be okay was short-lived. Because, when I climbed back into bed, I realized that even though I turned off my laptop, I could still hear the whisperings from the video.
The next week, I couldn’t shake the whisperings from my head. But there was something even more ominous accompanying the voices. Despite their incessant noise, there was still a hollow silence underlying them that I could almost hear. A lack of noise that was just as loud as their abundance of noise. I was terrified, but I was even more terrified to see a shrink and get locked up for schizophrenia. Not to mention, the voices weren’t the only strange things going on. I was watching an episode of House that I had watched a thousand times before, and at the beginning, when they introduce the first symptom of whoever is to be sick that episode, I knew that the man would be struck with severe muscle cramps and wouldn’t be able to move. Instead, the man went to speak, but couldn’t. It was as though he were choking on his own words. The worst part was though, in the background, I could see the little girl from the Youtube video, amongst a crowd of onlookers, but her focus wasn’t on the sick man. She was staring at me and whispering “Jason, Jason, Jason,” over and over again. I haven’t turned on the TV since.
I had almost grown accustomed to the voices about three days ago when something shook me anew. I had been having difficulty falling asleep because of the voices, but that night, I almost remember falling asleep as waking up. I was aware the second I fell asleep and fell into my dream. I was in my room, except it was a mirror image of my room, as though it had all been reflected over the wall with my door on it. And in the center of the room, the small girl, with her back turned on me, was sitting at a small square table with four other people. Two of them were adults, one a man, dressed smartly in a business suit, the other a woman, wearing a jogging uniform. But it was as though the color had faded from them. The man’s suit was gray, and his face pale white. The woman’s exercise clothes were a pale pink. Both of their faces were empty, their eyes focused on nothing.
And the fourth guest. Tall and lanky, with long arms. Clothed in a black long-sleeved shirt, black gloves covering his long, boney fingers, and long black pants. No face. No face at all. It filled me with a sense of dread watching him sitting there. Where his features should have been, there was just a flat face. I now understood the source of the noticeable silence that accompanied the voices.
The small girl was serving tea to all the guests. The entity with no face left his untouched, but the man and woman picked up theirs and began drinking. Then I noticed them. As they swallowed the tea, it poured out slits in their necks and all down the front of their clothing. A sob of fear escaped my mouth. It was the most realistic dream I ever experienced. The girl’s head began to swivel on her neck. I could hear it cracking as it slowly turned all the way around and locked eyes with me. A bright red slash split her neck open as well.
“I lost my voice Jason, she whispered, I lost my voice and I want a new one.”
“What the hell are you talking about,” I choked out. “You’ve been doing nothing but talk to me for the past few weeks, what the hell do you want.” This only seemed to enrage the girl.
Blood began seeping from the slit in her throat. She screamed. She screamed and screamed and screamed until her the line in her neck split almost all the way around and her head fell forward and began dangling by a little strip of flesh. This set the man and woman off screaming as well. I was thrown out of the dream and into the waking world. Away from the screams, but back to the whispers. I felt warm liquid in-between my legs.
“Shit,” I muttered to myself. I touched a hand to my throat. It felt like it was on fire.
“Shit.”
The next night was even worse. I tried to stay awake as long as possible, but despite the four cups of coffee and the five hour energy shot I took, I fell into sleep anyways. The little girl was standing next to my bed, her head still hanging by a thread, staring at me when I entered my dream. She told me she was irritated I had tried avoiding sleep. That I had tried avoiding her. The man and the woman were lying on the floor next to the table they had been sharing the night before. The tea cups were shattered and the pot was overturned next to them. The worst part was, the little girl was holding their heads in each of her hands.
“What the hell did you do?” I asked.
“I wanted their voices,” she whispered silently. Her voice rose, “But I couldn’t find them, they didn’t have any! I want my voice! He stole my voice!” She began slamming the heads into the ground, over and over, until they were nothing but bloody pulps in the girls hands. Her head was swinging precariously on her own neck. I almost expected it to fall off. As she finished her rampage, panting, I noticed that the face-less guest had swiveled its head towards me. It was a foot closer to my bed the night before. As I gazed into its empty features, a primal fear swelled in my chest. There was something about his silence that was more terrifying than the girl’s screaming ever would be. I awoke. I had pissed myself again.
That day, I reluctantly opened my computer again. I had to find out who this girl was, if she was anything. After an hour of pointless surfing on discussion boards discussing ghosts and spirits, I found my way onto a news site. It so happened, that there was a girl of about seven years old, that had been murdered a week and five days before. Her throat had been cut. But the worst part was, her larynx had been removed. It also just so happened that this was third death in a series of three similar murders. The other victims: a corporate executive and a mom from suburbia. There had been no murder weapon found on any of the occasions, and no evidence left behind. The murderer was nameless. Worse than that, I realized, he wasn’t just nameless, he was face-less. My heart skipped a beat. I should never have been terrified of the little girl. I knew there had been something more ominous about the silence of the other guest than the girl’s screaming. I didn’t want to sleep. I didn’t want to face whatever was sitting in that chair in my dream. The featureless monster. Last night I dreamt again.
Like the night before, nothing helped in preventing sleep. I fell into my dream again. As I lifted my head off my dream-pillow and turned my face, I met face to face with the fourth guest. His nothingness stared back at me, cutting deeper than any stare. This time, I noticed the three bloody lumps of cartilage hanging from his right hand. I couldn’t contain my scream. I openly shrieked as, starting from the left side of his face, the skin around where his mouth would have been began splitting open, tearing apart. What was left was a bloody mockery of a mouth, filled with bright red flesh and hanging skin. It opened its mouth as though screaming, but instead of noise, the silence in the room seemed to get louder. Press in on me.
I awoke this morning, bed wet once more, and began writing this account. I don’t want to fall asleep tonight. I know what’s going to happen. But I know I will. I know I’m going to lose my voice.
| 0non-cybersec
| Reddit |
How does a recently beheaded chicken manage to run around without a brain?. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
it could happen to your house at any moment. | 0non-cybersec
| Reddit |
Anandtech's GTX 670 Review - Bringing GK104 Down To $400. | 0non-cybersec
| Reddit |
Neon Genesis Evangelion . | 0non-cybersec
| Reddit |
Bungie In-Game punishment for over use of Well and Synthsceps Exploit?. At this point the exploit is confirmed to be fixed at a later date.
Thank you for that first of all.
Now to address the real issue at hand, continued use of a confirmed and clear exploit of game mechanics and ruining the game for the opposing team and in some cases your own.
Maybe people wanted to actually earn their wins? Maybe people wanted to get the high of winning a close match.
All together this strategy is not good for the game.
There should be repercussions for continued use of this exploit. Not bans, in-game repercussions.
Take away infamy, take away Dredgen, do something to make people who have consistently ruined the game for others be marked so everyone knows they are not a fair player.
This is the kind of thing games should have. Community wide visible in-game punishments for people who have ruined it for others.
Be better Bungie, Be Just, and do not tolerate or condone exploits in your game.
Very Soap Boxey I'm sorry. TL;DR In-game Repercussions for continued exploiters of Well and Synthoceps would be nice. | 0non-cybersec
| Reddit |
Must be those darn phones. | 0non-cybersec
| Reddit |
How to share OpenVPN internet via ethernet. <p>I want to install OpenVPN on my Raspberry Pi 3B Plus. Main problem is that I could not find any appropriate tutorial explaining how to share my built-in wireless internet via Wireless USB dongle and ethernet. You can assume that it is a kind of access point, but slightly different; I want to have this in my Ubuntu Server. Any help will be great.</p>
| 0non-cybersec
| Stackexchange |
Fedora command-line installation proposals. <p>How to force Fedora command-line to give me proposals for installation of package when a missing command is typed?</p>
<p>Now when I type <code>git</code> the command-line tells me :</p>
<pre><code>-bash: git: command not found
</code></pre>
<p>Before it gave me proposal (something like this):</p>
<pre><code>Command not found. Install package 'git' to provide command 'git'? [N/y]
</code></pre>
<p>I made a clean installation of Fedora 24 and obviously this feature is missing. I tried to <code>dnf install command-not-found</code> but it couldn't find the package. What should I do to bring this feature back?</p>
| 0non-cybersec
| Stackexchange |
Why is $\dim(W)=3$?. <p>I am teaching myself upper-division linear algebra for the moment, and I currently do not understand this example in my textbook. </p>
<p>This is from page 50 of Linear Algebra by Friedberg, Insel, and Spence - 4th edition.</p>
<blockquote>
<p>Let $W$ be defined by $$W=\{(a_1,a_2,a_3,a_4,a_5)\in F^5 : a_1+a_3+a_5=0,a_2=a_4\}.$$ It is easily shown that $W$ is a subspace of $F^5$ having $$\{(-1,0,1,0,0),(-1,0,0,0,1),(0,1,0,1,0)\}$$ as a basis. Thus $\dim(W)=3$.</p>
</blockquote>
<p>I understand that $\dim(W)=3$ because there are three elements listed in the basis of $W$. But how did the textbook come up with this basis, given the above definition of $W$? </p>
<p>Also, an even stupider question: what is $F^5$? I know that $F$ in my textbook is a field, and in linear algebra a field is typically seen as either $\mathbb{R}$ or $\mathbb{C}$, although there are others or $F$ can even be treated generally.</p>
| 0non-cybersec
| Stackexchange |
Looking for Pseudo-code for Fortune's algorithm. <p>I'd really appreciate if someone who ever dealt with Fortune's algorithm for generating Delaunay-triangulations presented me a rather low-level pseudo-code of the algorithm! I read the one on wikipedia but it's a bit confusing and looks high-level, and any piece of code I could find had the original C implementation's inconveniences.</p>
<p>I'd like to implement it in C++, but in a way that the output generated is in the form of (my own) classes I'm going to use (vertices, edges and triangles as objects). So I need to understand everything and implement it from scratch.</p>
<p>I also read the description of the algorithm, and I know what it does and how, but this is still to abstract for me right now. However, I'd also be happy with a similar description going into the (implementation) details, it doesn't have to be code-like!</p>
| 0non-cybersec
| Stackexchange |
Opinion: Apple's 2015 phone ($650) with 2GB RAM will be updated to the latest version of iOS but Samsung's 2018 phone ($1250) with 8GB RAM will disappoint you. | 0non-cybersec
| Reddit |
SQL injection with a URL separated with dashes. <p>I have have used sqlmap for a long time now. I have come across a this url pattern. <code>http://www.example.com/parameter-somethingid01-anotherthingid023</code></p>
<p>Where parameter is expendable meaning it doesn't matter if the it's available or not.
<code>http://www.example.com/somethingid01-anotherthingid023</code> is the same as the one above</p>
<p>if you change <code>somethingid01</code> to <code>somethingid012</code> or other id it will take you to a different resource that applies to <code>anotherthingid</code> too.</p>
<p>My question is how am I going to tell sqlmap to attack this kind of URL?</p>
| 1cybersec
| Stackexchange |
Calculate increment/decrement percentage from two values. <p>Hi all I got a very stupid question which I could not figure out how to solve it.</p>
<p>So basically I am trying to calculate how many percentage of increment/decrement for the expense and income of current from past month.</p>
<p>So let's say I got these data:</p>
<pre><code>Current Month Expense: 10454
Current Month Income: 2233
Last Month Expense: 15
Last Month Income: 1500
</code></pre>
<p>To calculate the income:</p>
<pre><code>if(thisMonthtotalIncome < lastMonthtotalIncome){
incomePercentage = Math.round(thisMonthtotalIncome/lastMonthtotalIncome * 100);
}else if(thisMonthtotalIncome > lastMonthtotalIncome){
incomePercentage = Math.round((thisMonthtotalIncome/lastMonthtotalIncome));
}
</code></pre>
<p>To calculate the expense:</p>
<pre><code>if(thisMonthtotalExpense < lastMonthtotalExpense){
expensePercentage = Math.round(thisMonthtotalExpense/lastMonthtotalExpense * 100);
}else if(thisMonthtotalExpense > lastMonthtotalExpense){
expensePercentage = Math.round((thisMonthtotalExpense/lastMonthtotalExpense));
}
</code></pre>
<p>I realized the percentage was somewhat wrong because from the data above, I get the expense increases by 697%. Is there any way or correct way to limit it to be in the range of 0% - 100%?</p>
<p>Also, I think that the formula is wrong as well cause I am so lousy at Maths.</p>
<p>Any suggestions? Thanks in advance!</p>
| 0non-cybersec
| Stackexchange |
❌❌❌ADULTS Gift ONLY!❌❌❌ Nine Uses for Cock Rings 50% OFF WITH CODE: 50OFFCRD. | 0non-cybersec
| Reddit |
Direct sum of subspaces using Cayley-Hamilton. <p><span class="math-container">$\renewcommand{\phi}{\varphi}\newcommand{\id}{\text{id}}$</span>Consider an endomorphism <span class="math-container">$\phi:V\to V$</span>, where <span class="math-container">$V$</span> is any finite dimensional <span class="math-container">$F$</span>-vector space. Assume the characteristic polynomial <span class="math-container">$\chi_\phi=fg\in F[x]$</span>, where <span class="math-container">$f,g$</span> are monic polynomials that are relatively prime. Set <span class="math-container">$W_1=\ker f(\phi)$</span> and <span class="math-container">$W_2=\ker g(\phi)$</span>. Show <span class="math-container">$V=W_1\oplus W_2$</span>.</p>
<p>Here is what I have done:</p>
<p>By Cayley-Hamilton, we have <span class="math-container">$\chi_\phi(\phi)=0$</span>, thus <span class="math-container">$f(\phi)g(\phi)=0$</span>. So either <span class="math-container">$f(\phi)=0$</span> or <span class="math-container">$g(\phi)=0$</span>. This means either <span class="math-container">$\ker f(\phi)=V$</span> or <span class="math-container">$\ker g(\phi)=V$</span>, so either <span class="math-container">$W_1=V$</span> or <span class="math-container">$W_2=V$</span>. Thus <span class="math-container">$V=W_1+W_2$</span>. We now show the sum is direct. From our previous work we know either <span class="math-container">$f(\phi)=0$</span> or <span class="math-container">$g(\phi)=0$</span>, so assume without loss of generality that <span class="math-container">$f(\phi)=0$</span>. Since <span class="math-container">$f$</span> and <span class="math-container">$g$</span> are relatively prime, there are polynomials <span class="math-container">$h_1,h_2\in F[x]$</span> such that <span class="math-container">$h_1f+h_2g=1$</span>. Thus <span class="math-container">$h_1(\phi)f(\phi)+h_2(\phi)g(\phi)=\id_V$</span>. But <span class="math-container">$f(\phi)=0$</span>, so <span class="math-container">$h_2(\phi)g(\phi)=\id_V$</span>. For any non-zero <span class="math-container">$x\in V$</span>, we have <span class="math-container">$h_2(\phi(x))g(\phi(x))=x$</span>, so <span class="math-container">$g(\phi(x))$</span> cannot be zero. Thus <span class="math-container">$\ker g(\phi)=W_2$</span> is trivial, so <span class="math-container">$W_1\cap W_2=0$</span>, hence <span class="math-container">$V=W_1\oplus W_2$</span>.</p>
<p>I am wondering if this line of reasoning holds, since I feel a bit weird about the fact that one of the summands ends up being the whole space and the other one ends up being empty. I also don't think I ever used the assumption that both polynomials are monic, but does this even matter?</p>
| 0non-cybersec
| Stackexchange |
There is something very strange going on with my wife...... [Part 2](http://www.reddit.com/r/nosleep/comments/33cfo3/part_2_what_exactly_is_it/)
[Part 3](http://www.reddit.com/r/nosleep/comments/33l41r/part_3_her_green_eyes/)
[Part 4]
(http://www.reddit.com/r/nosleep/comments/35da9g/part_4_there_is_something_even_stranger_going_on/)
[Part 5](http://www.reddit.com/r/nosleep/comments/36btic/part_5_i_finally_understand/)
This is my first post on nosleep, but I feel you guys should know about this. If you want to get to the ‘meat’ of the story, you can skip ahead to the 4th paragraph. Growing up I always feared monsters. Even in college, which most would consider to be the time when you can be called an adult, my greatest fears were the monsters under my bed, in the closet or at the window. I would always tell myself how silly this was seeing as I was an adult at this point and I was still afraid of something I knew did not exist. That was until……. I met my wife. But before I tell you what happened, let me elaborate on how I met my wife to be and how much she means to me.
I met Natalie in college. I was a nerdy guy, yet she saw in me something that no other girl in my life had. She was an extremely kind person, who always had the sweetest of intentions. As I spent more time with her, I realized how many things we had in common. To me she was the most beautiful girl in the world. I could stare into her green eyes for the rest of my life, and that’s what I chose to do when I proposed and we finally got married.
Fast forward to married life, I am working now, while she is working on an online masters degree. Life is good, life is actually perfect, too perfect. Ever since we got married, I’ve told her everything, my deepest secrets, my deepest feelings, and most importantly, my deepest fears. I remember when I first told her about my silly fear of monsters, at first she laughed it off. But over time, she noticed how I would sometimes shiver in bed, lying awake in fear. Being the sweet heart that she is, she would hold me, and tell me it would be alright. My wife became my protector, she became the one to keep my fears in check. Her face became that of an angel to me, one that would protect me from whatever scary things life had in store for me. I came to trust those beautiful green eyes, and every time I saw her, I knew I was safe.
Now to the more……weird things that have been happening of late. The first incident that I can recall that could be defined as strange happened at 3:00 am one night. I woke up feeling extremely thirsty, and being the fearful guy that I am, grabbed the flash light to go get some water. As soon as I turned on the flashlight I noticed my wife wasn’t in bed. I looked over to the bathroom and the light was on and I could hear the water running so I assumed she was there. Half asleep I walked downstairs to the kitchen and almost had a heart attack when I saw my wife standing in a corner drinking water. As soon as I saw her though, I felt safe. She smiled at me as she sipped the water from the glass. I was too tired and I mumbled something about how hot it is as I got some water. She continued to smile at me as I finished my water and headed upstairs. As I walked back upstairs I called out that she should come back to bed seeing as it’s so late. When I get back to my room, there she was, sound asleep. This was the moment I became wide awake. I could have sworn she was downstairs having water. Afraid to go back downstairs, I woke her up and told her what happened. Half asleep, half upset, she comforted me and told me to go back to bed. The next morning she joked about how I’m so afraid of the dark that I see her everywhere as my protector. “Besides, I was using the bathroom when you thought I was out of bed” she claimed. With that warm smile, how could I think otherwise?
A week later, another strange incident. This was in broad day light, while on a Saturday morning, Natalie woke me up at 11:00 am and told me she was going to get groceries. At around 11:30 am I finally got out of bed and dressed up for a late brunch with my beautiful wife. I went to the kitchen and found her drinking a glass of water. I smiled and said “Back so soon honey?” She didn’t reply, just smiled as she sipped on her water. Before I could approach her, the doorbell rang and I immediately went to go see who it was. I opened the door. Yes, it was my wife, back with all the groceries. “Oh help me with all of this will you?” she jokingly snapped as she put down the paper bags by the door. As soon as she saw my color drained face, she knew something was wrong. She sat me down, got me some water and I told her what happened. This time it was in broad daylight, and I knew what I saw. As much as I had come to adore her beautiful green eyes, for the first time, I saw in them a strange fear. My wife was the strong one, never afraid. She told me there is something she should have told me a long time ago. She said this happened to her as a kid, a lot. Where her parents and siblings would see her in places they knew she wasn’t. They could never explain these occurrences, but seeing as it caused no harm, they came to live with it without really questioning these encounters.
It took me a few months to process everything she had told me, but I started to live with it also. Like I said, my true perception of fear was monsters, not my beautiful wife. Several similar incidents happen, for instance I would see her sitting in bed, only to find her cooking in the kitchen downstairs. And in all these instances, when I would interact with this ‘entity’ that I still saw as my wife, she would smile and not say anything. I actually came to find comfort in seeing my wife all the time, always smiling, always happy, and always perfect. It is important to note, however, that in all of these incidents, there was never any overlap. Meaning I never saw her in two places simultaneously. I guess any sane person would have called out to their wife when they thought they were seeing the entity. But like I said, I found comfort in her green eyes, in her smiling face, so honestly I didn’t really care.
Then today, everything changed. My wife told me she was going to visit her grandparents who live an hour away from where we do. She invited me to go, but seeing as it was a Sunday and I just wanted to be lazy, I told her to go ahead without me. This is when it finally happened. The overlap. I was in my living room watching TV when I got up to get myself a coke. There she was, my wife again, sipping water from a glass and just smiling. I was so used to it by now, knowing this was the ‘entity’, I smiled and said “And it is nice to see you are still watching over me!” She smile and continued to look at me with those beautiful green eyes I had grown so fond of. That’s when the phone rang and I turned away from the ‘entity’ to pick it up. “Hey sweetie, I’m going to run a little late since granny insists on me staying for lunch!” It was my wife, and as soon as I heard her voice, I heard a glass shatter, which my wife on the phone also heard. I turned around and saw that the ‘entity’ was now glaring at me, the smile no longer there. But rather, a very disturbing grin. She was pointing at me, with her head tilted at a perfect 90 degree angle. But that wasn’t what disturbed me, it was her eyes. They were no longer the green that I found so much comfort in. They were pitch black, like those demons in the movies. I stared at her as I was at a complete loss of words. “Honey, is everything ok? Did you drop something?” my wife asked on the phone. I whispered back into the phone “I didn’t, she did…….” At this point my wife screamed into the phone “HANG UP AND LOOK AWAY!!!!” I don’t know how I found the strength to do so, but I did exactly what she said. When I opened my eyes a split second later, she was gone. Confused and scared, I called my wife back who said she was already on the way “It shouldn’t have happened, it shouldn’t have overlapped, they said it wouldn’t……..they said she was harmless………”
I am too scared to just sit around and wait, I still keep looking over my shoulder. My wife should be home anytime now. As soon as she gets back I will ask her who she meant by “they” and what the hell is going on. She knows something and I have to know what it is. Never did I think that the one I hold so near and dear to my heart, the one who protects me, could become the monster that I fear the most.
P.S. If enough of you are interested, I will continue my story and update when I find out more information.
| 0non-cybersec
| Reddit |
In 1931 William Randolph Hearst took apart and moved a 12th Century Spanish Monastery to California, to use as his pool house. He never rebuilt it. It sat in rubble for decades before being rebuilt in 2016 at a Cistercian Trappist Monastery in Vina, California.. | 0non-cybersec
| Reddit |
It just doesn't feel right.... | 0non-cybersec
| Reddit |
What is the point of `std::make_optional`. <p>All the <code>std::make_</code> are made redundant by C++17 with the introduction of <a href="https://en.cppreference.com/w/cpp/language/class_template_argument_deduction" rel="nofollow noreferrer">Class template argument deduction</a> (except <code>make_unique</code> and <code>make_shared</code>).</p>
<p>So what is the point of <a href="https://en.cppreference.com/w/cpp/utility/optional/make_optional" rel="nofollow noreferrer"><code>std::make_optional</code></a>? As far as I can tell it does the exact same thing as the <a href="https://en.cppreference.com/w/cpp/utility/optional/deduction_guides" rel="nofollow noreferrer">deduction guides for <code>std::optional</code></a>.</p>
<p>Is there a scenario where <code>std::make_optional</code> is preferred over deduction guides?</p>
| 0non-cybersec
| Stackexchange |
Kendo Grid: Getting widget instance in Angular. <p>I was trying to get an instance of the Kendo grid within my Angular Controller, so I can try and hook up to some events (and call methods) I know this is probably not best practice (and should probably use a custom directive), but according to the <a href="http://docs.telerik.com/kendo-ui/AngularJS/introduction" rel="noreferrer">documentation</a>, we should be able to use...</p>
<pre><code><div ng-app="app" ng-controller="MyCtrl">
<input kendo-datepicker="datePicker" k-on-change="onChange()">
</div>
<script>
angular.module("app", [ "kendo.directives" ]).controller("MyCtrl",
function($scope) {
$scope.onChange = function() {
alert($scope.datePicker.value());
};
</code></pre>
<p>});
</p>
<p>So, I was trying to do the same with the grid. I have the following markup...</p>
<pre><code><div ng-controller="Grid">
<div kendo-grid='grid' k-options="vm.gridOptions"></div>
</div>
</code></pre>
<p>and then in the controller js file..</p>
<pre><code> angular
.module("mygrid")
.controller("Grid", ['$scope', Grid]);
function Grid($scope) {
var gridInstance = $scope.grid;
...
</code></pre>
<p>as can be seen <a href="http://jsfiddle.net/peterjc/ocdhxxpv/2/" rel="noreferrer">here</a></p>
<p>However, gridInstance is always undefined. Does anyone know if I shoud be able to do this with the grid, and if so why the above always returns undefined?</p>
<p>Thanks in advance for any help</p>
<p>Peter</p>
| 0non-cybersec
| Stackexchange |
Chase Bank no longer supports third party budgeting software with syncing. Chase has not been loading lately on Mint and today, while looking through the message boards to figure out a timeline for the issue, I found this
"Thank you for contacting Chase about not being able to give Mint.com access to the financial information in your account.
Please be aware that we are no longer allowing third party websites or software to access your account. This is for your security and protection. I apologize for the inconvenience this may cause you.
I regret that you are disappointed in our decision to stop third party applications. Please understand, when an account is enrolled in such a service as Mint, the online login information must be given to the outside financial institution so their system may be able obtain billing information. Because protecting your information is our top priority, we have made the decision to only support the financially responsible person accessing their account.
If you need any other assistance, you can call the number on the back of your card or send us a secure message. We appreciate your business and thank you for choosing Chase.
Thank you,
Dana Knight
Customer Service Specialist
1-800-436-7927"
This can be found at
https://mint.lc.intuit.com/questions/1243101-chase-accounts-are-down
| 0non-cybersec
| Reddit |
improve speed of fuzzy search. <p>I have configured <a href="https://www.freecodecamp.org/news/fuzzy-string-matching-with-postgresql/" rel="nofollow noreferrer">trigram index</a> for fuzzy search in Postgres. I inserted 8500000 rows to this table with 4 words text.</p>
<pre><code>CREATE DATABASE people;
\connect people;
CREATE TABLE person
(
id bigserial NOT NULL,
name text NULL
);
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION pg_trgm;
CREATE INDEX name_trigram_idx ON person USING gin (name gin_trgm_ops);
INSERT INTO person (name)
SELECT CONCAT(g.name, ' ', g.name, ' ', g.name, ' ', (SELECT array_to_string(
array(select substr(
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
((random() * (36 - 1) + 1)::integer),
1)
from generate_series(1, 10)), '')))
FROM generate_series(1, 8500000) AS g (name);
</code></pre>
<p>Now I do a fuzzy search:</p>
<pre><code>SELECT * FROM person WHERE name % '1200000'
</code></pre>
<p>And have results:</p>
<pre><code> id | name
---------+------------------------------------
12000 | 12000 12000 12000 CLXBHQVEKC
120000 | 120000 120000 120000 CLXBHQVEKC
1200000 | 1200000 1200000 1200000 CLXBHQVEKC
1202000 | 1202000 1202000 1202000 CLXBHQVEKC
1212000 | 1212000 1212000 1212000 CLXBHQVEKC
(5 rows)
</code></pre>
<p>It takes about 1 second. That's good but I would like to have it faster (300ms).</p>
<p>What's are possible ways for optimization the speed?
Here is <code>explain-analyze</code> request:</p>
<pre><code>EXPLAIN (ANALYZE) SELECT * FROM person WHERE name % '1200000'
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on person (cost=201.87..24804.13 rows=8499 width=42) (actual time=45.135..972.583 rows=5 loops=1)
Recheck Cond: (name % '1200000'::text)
Rows Removed by Index Recheck: 147980
Heap Blocks: exact=25286
-> Bitmap Index Scan on name_trigram_idx (cost=0.00..199.74 rows=8499 width=0) (actual time=40.833..40.840 rows=147985 loops=1)
Index Cond: (name % '1200000'::text)
Planning Time: 1.538 ms
Execution Time: 973.046 ms
(8 rows)
</code></pre>
<p>And a link to my <a href="https://github.com/ypapax/fuzzy_postgres_speed" rel="nofollow noreferrer">test repo</a>.</p>
<p>Generally speaking, I would like to have a typo-proof search for a text with several words which has about 9 million rows and it shouldn't respond longer than 300ms.</p>
<p>P.S. for this experiment I'm running Postgres in docker with 6 CPUs, 8GB memory and 1GB of swap.</p>
| 0non-cybersec
| Stackexchange |
Weird jellyfish like animal found in Corsica, France. | 0non-cybersec
| Reddit |
difference between LC/PC and LC/APC couplers?. <p>i have to connect two LC/APC male connector plugs. Currently i only have blue LC-LC couplers on stock.
Due to analogue RF-Overlay signals that are transmitted via this link, the quality of the connection is important here.</p>
<p>Is there a difference between LC/APC and LC/PC couplers? In my understanding the "angled" part is only defined by the tip of the male LC connector, so it should be irrelevant if i use a green or a blue coupler. Am i right or is there a difference in real world?</p>
<p>Thanks for all replys!</p>
<p>//Andreas</p>
| 0non-cybersec
| Stackexchange |
TIL that Koko, the gorilla who was taught sign language, once lied to her trainers, blaming her kitten for tearing a sink out of the wall. . | 0non-cybersec
| Reddit |
Still the best smile in anime history. | 0non-cybersec
| Reddit |
How I got a $6k raise 3 months into my first job just by asking.. Using a throwaway to protect my main account. This will certainly not apply to everyone, but has been a huge boon to my wife and I.
I started my first job out of college 3 months ago, and just became eligible for my company's health insurance plan. However, we're both under 26 and can stay on our parents' family plans for at least two more years. I asked my employer if A) I could opt out of the plan and B) they would pay me what they otherwise would have had to pay on my behalf. They were completely fine with that, so I now make an extra $500/month.
Obviously this only applies to a small group of people, but it's already been a huge benefit to us and could be to others as well. We now have an extra $4k/year or so after taxes to put towards my student loans and saving for a house down payment. If you're under 26 and your parents need a family insurance plan anyway, ask your employer! It certainly can't hurt. | 0non-cybersec
| Reddit |
That's pretty convincing (PIC). | 0non-cybersec
| Reddit |
Git: cannot checkout branch - error: pathspec '...' did not match any file(s) known to git. <p>I'm not sure why I'm <strong>unable to checkout</strong> a branch that I had worked on earlier. See the commands below (note: <code>co</code> is an alias for <code>checkout</code>):</p>
<pre><code>ramon@ramon-desktop:~/source/unstilted$ git branch -a
* develop
feature/datts_right
feature/user_controlled_menu
feature/user_controlled_site_layouts
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/feature/datts_right
remotes/origin/master
ramon@ramon-desktop:~/source/unstilted$ git co feature/user_controlled_site_layouts
error: pathspec 'feature/user_controlled_site_layouts' did not match any file(s) known to git.
</code></pre>
<p>I'm not sure what it means, and I can't seem to find anything I can understand on Google. </p>
<p><strong>How do I checkout that branch, and what may I have done to break this?</strong></p>
<p><strong>UPDATE</strong>:</p>
<p>I found <a href="https://stackoverflow.com/questions/4181861/git-error-src-refspec-master-does-not-match-any">this post</a>, and running <code>git show-ref</code> gives me:</p>
<pre><code>97e2cb33914e763ff92bbe38531d3fd02408da46 refs/heads/develop
c438c439c66da3f2356d2449505c073549b221c1 refs/heads/feature/datts_right
11a90dae8897ceed318700b9af3019f4b4dceb1e refs/heads/feature/user_controlled_menu
c889b37a5ee690986935c9c74b71999e2cf3c6d7 refs/heads/master
c889b37a5ee690986935c9c74b71999e2cf3c6d7 refs/remotes/origin/HEAD
e7c17eb40610505eea4e6687e4572191216ad4c6 refs/remotes/origin/develop
c438c439c66da3f2356d2449505c073549b221c1 refs/remotes/origin/feature/datts_right
c889b37a5ee690986935c9c74b71999e2cf3c6d7 refs/remotes/origin/master
23768aa5425cbf29d10ff24274adad42d90d15cc refs/stash
e572cf91e95da03f04a5e51820f58a7306ce01de refs/tags/menu_shows_published_only
429ebaa895d9d41d835a34da72676caa75902e3d refs/tags/slow_dev
</code></pre>
<p><strong>UPDATE on <code>.git</code> directory</strong> (<code>user_controlled_site_layouts</code> is in the <code>refs/heads/feature folder</code>):</p>
<pre><code>$ ls .git/refs/heads/feature/
datts_right user_controlled_menu user_controlled_site_layouts
$ cat .git/refs/heads/feature/user_controlled_site_layouts
3af84fcf1508c44013844dcd0998a14e61455034
</code></pre>
<p><strong>UPDATE on <code>git show 3af84fcf1508c44013844dcd0998a14e61455034</code></strong></p>
<pre><code>$ git show 3af84fcf1508c44013844dcd0998a14e61455034
commit 3af84fcf1508c44013844dcd0998a14e61455034
Author: Ramon Tayag <[email protected]>
Date: Thu May 12 19:00:03 2011 +0800
Removed site layouts migration
diff --git a/db/schema.rb b/db/schema.rb
index 1218fc8..2040b9f 100755
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110511012647) do
+ActiveRecord::Schema.define(:version => 20110503040056) do
create_table "attachments", :force => true do |t|
t.string "name"
@@ -205,15 +205,6 @@ ActiveRecord::Schema.define(:version => 20110511012647) do
t.integer "old_id"
end
- create_table "site_layouts", :force => true do |t|
- t.string "name"
- t.text "description"
- t.text "content"
- t.integer "site_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
create_table "site_styles", :force => true do |t|
t.text "published"
t.datetime "created_at"
</code></pre>
| 0non-cybersec
| Stackexchange |
Verizon contacted me on Twitter and asked for my billing password. | 1cybersec
| 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 |
Does anyone else much prefer to poop while shirtless?. | 0non-cybersec
| Reddit |
What is an instance of NP complete problem?. <p>I don't understand this definition of an "instance" of a problem. Quoting from the CLRS book on page 1054 on abstract problems (Chapter 34.1):</p>
<blockquote>
<p>We define an abstract problem $Q$ to be a binary relation on a set $I$ of problem <strong>instances</strong> and set $S$ of problem <strong>solutions</strong>.</p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Read CSV in R and filter columns by name. <p>Let's say I have a CSV with dozens or hundreds of columns and I want to pull in just about 2 or 3 columns. I know about the <code>colClasses</code> solution as described <a href="https://stats.stackexchange.com/questions/16796/reading-only-two-out-of-three-columns-with-read-csv">here</a> but the code gets very unreadable.</p>
<p>I want something like <code>usecols</code> from <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html" rel="nofollow noreferrer">pandas' <code>read_csv</code></a>.</p>
<p>Loading everything and just selecting afterwards is not a solution (the file is super big, it doesn't fit in memory).</p>
| 0non-cybersec
| Stackexchange |
I have an unusual grandmother.. | 0non-cybersec
| Reddit |
New Cisco SG350X changing config of SG500 switches. <p>We have about 20 Cisco SG500 Switches in our network configured with various VLANs, trunks, ports etc.</p>
<p>We recently needed to install additional network capacity so purchased some SG350X switches as the SG500s are end-of-life.</p>
<p>Whilst getting the SG350X configured and ready to deploy, we noticed some weird network issues on our existing network, specifically Wifi access points and IP phones were broken and no longer.</p>
<p>Our investigation revealed that the configuration of the broken ports had been changed and we suspect that the new SG350X may have been the culprit. We did change the admin password of the switch to match that of our other switches so does the SG350X have the ability to manage other switches? And if not, any other ideas of how it couold have happened? Is their an audit of configuration changes?</p>
<p>An example of a change to a ports configuration is from:</p>
<pre><code>interface gigabitethernet1/1/19
loopback-detection enable
dot1x guest-vlan enable
dot1x port-control auto
description 115
switchport trunk native vlan 210
</code></pre>
<p>To</p>
<pre><code>interface gigabitethernet1/1/19
loopback-detection enable
dot1x guest-vlan enable
dot1x port-control auto
description 115
storm-control broadcast enable
storm-control broadcast level 10
storm-control include-multicast
port security max 10
port security mode max-addresses
spanning-tree portfast
macro description ip_phone_desktop
!next command is internal.
macro auto smartport dynamic_type unknown
</code></pre>
| 0non-cybersec
| Stackexchange |
At the time of birth, the Pangolin's scales are soft and white. After several days, they harden and darken to resemble those of an adult pangolin. During the vulnerable stage, the mother stays with her offspring in the burrow, nursing it, and wraps her body around it if she senses danger.. | 0non-cybersec
| Reddit |
New Sonic 4 Details. | 0non-cybersec
| Reddit |
This week I said goodbye to my best friend of the last 18 years. She was completely feral when I rescued her, and I was proud to earn her trust and love. I miss you Zumbi. | 0non-cybersec
| Reddit |
Always love doggo. | 0non-cybersec
| Reddit |
weird bug near ST. Louis??????. | 0non-cybersec
| Reddit |
My current favorite anime couple+my favorite anime couple as a child=awesome video. | 0non-cybersec
| Reddit |
Sign this petition to send an auto-email to Florida Speaker of the House Dean Cannon, who banned the word "uterus" from the House floor yesterday - He deserves a good uterine email flood.. | 0non-cybersec
| Reddit |
Ahi Tuna @ Seastar Seattle. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Why is fighting tolerated in hockey?. it just seems like hockey players can get away with a lot more open aggression than other professional athletes. | 0non-cybersec
| Reddit |
Non-American asking here: what do you regard as "Americana"?. For myself, a Finn, the first mental image when saying the word "Americana", is one of those diners, serving an all-around American breakfast.
Whether you're an American or anything else - shoot!
Edit: so, basically, [this painting.](http://i.imgur.com/irg8W.jpg) | 0non-cybersec
| Reddit |
Can't shrug it off. | 0non-cybersec
| Reddit |
Font-independent convention for multi-letter variables in math mode. <p>For several years now, I have always used <code>\mathit</code> to display variables that have more than one letter, to ensure proper kerning:</p>
<pre><code>\fbox{$foo = f(jazz)$} vs. \fbox{$\mathit{foo} = f(\mathit{jazz})$}
</code></pre>
<p><img src="https://i.stack.imgur.com/sXFlf.png" alt="first example"></p>
<p>I see that this has been suggested <a href="https://tex.stackexchange.com/questions/67109/how-to-use-suggestive-variable-names-in-math/67117">several</a> <a href="https://tex.stackexchange.com/questions/6087/two-letter-variable-names">times</a> here as well.</p>
<p>However I would now like to update my document and use the Euler math fonts. In this setup, the default mathematical font has upright letters, and suddenly, all my <code>\mathit</code> have become wrong. I do not even know how to fix it:</p>
<pre><code>\documentclass{minimal}
\usepackage{eulervm}
\begin{document}
\fbox{$foo = f(jazz)$} vs. \fbox{$\mathit{foo} = f(\mathit{jazz})$}
vs. \fbox{$\mathrm{foo} = f(\mathrm{jazz})$}
vs. \fbox{$\mbox{foo} = f(\mbox{jazz})$}
\end{document}
</code></pre>
<p><img src="https://i.stack.imgur.com/vQPkt.png" alt="second example"></p>
<p>Surely there must be a way to tell LaTeX "here is a block of text to treat as a single name", disabling the spacing for the implicit multiplication, and without forcing any particular font, so that the formula can be rendered nicely independently of the mathematical font I later decide to use?</p>
| 0non-cybersec
| Stackexchange |
Real analysis: Limit of sequence. <p>Question:
If $0<a<b$ determine the limit $\left(\frac{a^{n+1}+b^{n+1}}{a^n+b^n} \right)$</p>
<p>Attempt:
Well we cannot assume that any of them are convergent on their own as they could be greater then 1 and so they could all diverge individualy. I was thinking if I could show
$\lim \left(\frac{a^{n+1}}{a^n+b^n}\right)$ is convergent then the same with $b^{n+1}$ then their sum is convergent. I can only use simple theorems, no derivative. </p>
| 0non-cybersec
| Stackexchange |
Turkey captures rebel fighter who killed Russian Su-24 pilot. | 0non-cybersec
| Reddit |
Question on oft used notation. <p>What does $(\cdot)$ mean? I have seen this used often, but don't know what it means and when it is used, and I want to make sure I'm not making incorrect assumptions.
For example, I'm reading about copula functions in statistics. There is a function denoted as $c(F1(\cdot), F2(\cdot))$. So, how should this be read, in words?</p>
| 0non-cybersec
| Stackexchange |
Close Close. | 0non-cybersec
| Reddit |
Exchange 2010 queue viewer not working in Exchange Management console. <p>I recently agreed to help my works network admin with the exchange 2010 server (seeing as I have experience in 2016 which were migrating to at the end of the year), but when trying to administer it, <a href="https://i.stack.imgur.com/D7DZS.png" rel="nofollow noreferrer">I get this message</a>. This happens when I try to open queue viewer, or message viewer. I have the same exchange privileges that the network admin has but when he tries there is no issue. I also can not run a handful of cmdlets in the exchange management shell. Unless there is a certain privilege I do know about I don't know the issue. Any help?</p>
| 0non-cybersec
| Stackexchange |
Can you find an element of order 10 in $\mathbb{Z}_{31}^{*}$. <p>I'm stuck on that question, because I'm trying to find a simple way to solve it.</p>
<p>I'm pretty sure there exists such elements because the group is cyclic and $|\mathbb{Z}_{31}^{*}| = 30$, hence there exists a sub-group of any order dividing $30$. So I know there is a sub-group of order $10$ and it's cyclic because any sub-group of a cyclic group is cyclic, and it's generator is an elements of order $10$. </p>
<blockquote>
<p>Now, how can I proceed from here? How can one find the generator of this sub-group?</p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Winterberg reinvents Project Orion Nuclear Rocket with fallout free, cheaper pure fusion rocket with magnetic mirror instead of a pusher plate. | 0non-cybersec
| Reddit |
Debian 8, Apache 2.4.10: Scoreboard is full, not at MaxRequestWorkers. <p>Fresh install of Debian 8. After running my web server for a few minutes/hours, Apache2 stops working. I always get the error "Scoreboard is full, not at MaxRequestWorkers" from Apache2 error.log. </p>
<p><a href="https://support.plesk.com/hc/en-us/articles/213901685-Apache-crashes-scoreboard-is-full-not-at-MaxRequestWorkers" rel="nofollow noreferrer">This workaround</a> works for me, however - I do not want to change MPM mode to prefork. So is there any other solution to this? Like upgrading the Apache2 version? I'm relatively new to Linux/Debian, so I'm not sure what to do exactly whatsoever.</p>
| 0non-cybersec
| Stackexchange |
Why do dog feet smell like Fritos?. | 0non-cybersec
| Reddit |
Russian Traditional Folk Dresses from Olonets, Olonetsky District in the Republic of Karelia in Northern Russia.. | 0non-cybersec
| Reddit |
Long Division in Fractions. <p>In order to do long division on this problem, do I have to first do Foil? <span class="math-container">$$\frac{6x^2-3x}{(x-2)(x+4)}$$</span> How should I go about this long division?<br>
If I do FOIL first, do I end up with a problem like this? <span class="math-container">$$(x^2+4x-8)\overline { )6x^2-3x}$$</span>How should I do the division on it?</p>
| 0non-cybersec
| Stackexchange |
Optimal Stopping Theorem for UI Martingales. <p>In my notes, I was given that:</p>
<p>"Let $X_n$ be an $F_n$ (super,sub) martingale and $\tau$ an $F_n$ stopping time. Then $X_{n \wedge \tau}$ is a (super, sub) martingale wrt $F_n$ and $F_{n \wedge \tau}$"</p>
<p>However in the section about Uniformly Integrable Martingales it says:</p>
<p>"Let $X_n$ be a UI Martingale. Then for any $F_n$ stopping time $\tau$, $X_{n \wedge \tau}$ is Uniformly integrable."</p>
<p>Is it not true that if $X_n$ is a UI Martingale then $X_{n \wedge \tau}$ is a Uniformly integrable martingale?</p>
| 0non-cybersec
| Stackexchange |
Joaquin Phoenix's Joker Origin Movie a Go at Warner Bros.. | 0non-cybersec
| Reddit |
Introductory textbooks on Morse-Kelley set theory. <p>Are there simple textbooks on Morse-Kelley set theory for mathematicians who are not specialists in this field (like me)? </p>
<p>I know only <a href="http://rads.stackoverflow.com/amzn/click/0923891552" rel="nofollow">J.L.Kelley's "General topology"</a>, but it does not contain many important things, in particular, the notion of rank of a set, and everything connected to it. Can anybody suggest me some reading on this topic? </p>
| 0non-cybersec
| Stackexchange |
Loggers in a Great Smoky Mountain chestnut tree forest. Over three billion trees like this existed in eastern North America, comprising 25-30% of all trees in the Appalachian Mountains. They were completely decimated in the early 1900s by blight from an asian fungus. [1441x868]. | 0non-cybersec
| Reddit |
Dear Disney, Please stop making Pirates of the Caribbean movies.. | 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 |
Two USB ports on the iPad wall wart.. This seems like it would be trivially easy and not very expensive. As a nod to the likelihood that iPad buyers are also iPhone owners (and for sure smartphone owners), how about just putting a second USB port on the iPad wall wart? It can't be that expensive or take up that much more room but it would make life every iPad/iPhone dual owner soooo happy. | 0non-cybersec
| Reddit |
Can't upgrade the system, dist. update stuck. <p>I've just bought a Dell inspirion laptop , core i3 , 4gb ram , nvidia graphics (2gb vram) and it came with Ubuntu 12.0.4 LTS which is nice cuz i need it for programming. But when i run distribution update from update manager it always gets stuck afterabout halfway, almost never at the same place(i had to return it to factory state a couple of times). I tried sudo apt-get -f install , tried sudo fuser /var/etc... and then
sudo apt-get -f install, it run the update but had some errors when installing kernels and couldn't load at all. Please help</p>
<p>P.S. I'm new to Ubuntu and Linux, i got the basics but I still dont get smoe things around here.</p>
| 0non-cybersec
| Stackexchange |
Storage product testing. <p>I know this is out of place (being an active member here I am coming for the help from seniors), but I need some information regarding storage testing, testing of RAID arrays, SCSI, SAS, SATA and also test carried out on fabric manager (Cisco MDS series switches).</p>
<p>I am aware that this is an administrative forum and I would really appreciate if you could direct me to the correct forum ar links where i can learn things.</p>
<p>@ moderators - Sorry for posting at the wrong place, I would be deleting this as soon as I get the help.</p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
[Link] 40% off all Ruffwear!. Per my dog hiking group on facebook:
"For 48 hours only on Friday and Saturday, use the promo code "PROSHARE15" to get 40% off at www.ruffwear.com. The code is good for one order per person, so use it wisely!!" | 0non-cybersec
| Reddit |
How does useState() in React Hooks know which Component instance it is?. <p><a href="https://reactjs.org/docs/hooks-faq.html#how-does-react-associate-hook-calls-with-components" rel="nofollow noreferrer">React Docs</a> says:</p>
<blockquote>
<h3>How does React associate Hook calls with components?</h3>
<p>React keeps track
of the currently rendering component. Thanks to the Rules of Hooks, we
know that Hooks are only called from React components (or custom Hooks
— which are also only called from React components). There is an
internal list of “memory cells” associated with each component.
They’re just JavaScript objects where we can put some data. When you
call a Hook like useState(), it reads the current cell (or initializes
it during the first render), and then moves the pointer to the next
one. This is how multiple useState() calls each get independent local
state.</p>
</blockquote>
<p>First of all... what is this "memory cell"? Can we print it out ourselves to see its value?</p>
<p>Second, there is only <strong>one</strong> instance of the function (such as <code>Counter()</code> in the following example). So if we render <code><Counter /></code> twice into the DOM, once to <code><div id="root1"></code> and the second time to <code><div id="root2"></code>, how does the function <code>Counter()</code> know which is which?</p>
<pre><code>function Counter() {
let [count, setCount] = React.useState(0);
return (
<div>
<button onClick={() => setCount(count + 1)}> + </button>
{ count }
<button onClick={() => setCount(count - 1)}> - </button>
</div>
)
}
</code></pre>
| 0non-cybersec
| Stackexchange |
How to include weight in edge of graph?. <p>I want to include weights or costs of the edge on my graph using this jgrapht interface-class:</p>
<pre><code>package org.jgrapht;
public interface WeightedGraph<V extends Object, E extends Object> extends Graph<V, E> {
public static final double DEFAULT_EDGE_WEIGHT = 1.0;
public void setEdgeWeight(E e, double d);
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Hydra brute force error message. <pre><code>hydra 190.13.132.90 -s 8081 -V -L /home/nicolas/Escritorio/USER -P /home/nicolas/Escritorio/passwords.txt http-post-form "/user=^USER^&password=^PASS^=Ingresar&culture=es-CL&mobile=0&clasica=1:F=Usuario inexistente:H=Cookie: stwa2={"lang":"es-CL"}"
Hydra v8.7-dev (c) 2017 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
Hydra (http://www.thc.org/thc-hydra) starting at 2018-04-29 14:34:51
[ERROR] the variables argument needs at least the strings ^USER^, ^PASS^, ^USER64^ or ^PASS64^: F=Usuario inexistente
</code></pre>
<p>Could anyone write the correct string to use in hydra please? I’m a noob using hydra :)</p>
<p>The username is Gonzalo Sepulveda.</p>
<p>The full URL of the login is:</p>
<p><a href="http://190.13.132.90:8081/" rel="nofollow noreferrer">http://190.13.132.90:8081/</a></p>
| 1cybersec
| Stackexchange |
"Serious errors found HF checking the drive for /home" After Moving /home to external HFSplus partition. <p>I just installed Mac OS X 10.7 "Lion" and Ubuntu 11.10 on my MacBook Pro using these instructions: <a href="http://www.tuxation.com/creating-home-partition-mac-linux.html" rel="nofollow">Creating a shared home partition between Linux and Mac OS X</a>. </p>
<p>After changing the location of my home folder to the new location, it gives me the error in the title, and my username no longer appears in the login screen. Using the "Other" option with my username seems to make it try to log in, but the screen quickly flashes between blank and a shell before kicking me back to the login screen without notice.</p>
<p>I'm trying to share my home folder between Mac OS X and Ubuntu, using an hfsplus partition (unjournaled) between the two. The home partition seems to mount fine as <code>/home</code>, and I am able to modify it under Ubuntu.</p>
<p>Below is the line I've added to fstab:</p>
<p><code>/dev/sda3 /home hfsplus defaults 0 1</code></p>
<p>I should also note that I changed my account's username and home directory location to match this, though I've double checked that and everything seems in order there...</p>
<p>Thank you in advance for any assistance.</p>
<p>Edit: It seems that the <code>/etc/passwd</code> file didn't have my new home directory's location in it, so I changed that, and I am now able to log into my account, although I am still not listed in the login screen, and my username in the menu on the top right shows up as "[Invalid UTF-8]"...</p>
| 0non-cybersec
| Stackexchange |
Pycharm debugger does not stop on breakpoints. <p>I have a flask project I am trying to debug (this was working absolutely ok till few hours ago) - When I debug the project, I see the following :</p>
<pre><code>Connected to pydev debugger (build 135.1057)
/Users/vantani/cp/bin/python /Applications/PyCharm.app/helpers/pydev/pydevd.py --multiproc --save-
signatures --client 127.0.0.1 --port 49223 --file /Users/vantani/cp/unnamed/manage.py server
pydev debugger: process 484 is connecting
/Users/vantani/cp/lib/python2.7/site-packages/flask_cache/__init__.py:152: UserWarning: Flask-
Cache: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
* Running on http://127.0.0.1:5000/
* Restarting with reloader
pydev debugger: process 498 is connecting
</code></pre>
<p>As I said this setup was working fine. Now, the debugger does not stop at the breakpoint and the debugger window is empty. I see that there are two processes created by PyDev and I guess that is causing this issue. I have restarted my machine and there is only one pycharm process running.</p>
| 0non-cybersec
| Stackexchange |
The Economist: The End of the Population Pyramid (video). | 0non-cybersec
| Reddit |
How our development tool became a prototyping app. | 0non-cybersec
| Reddit |
Rotating a triangle around $(x, y)$. <p>I have two coordinates $(x, y)$ lets call this point $A$. The triangle is drawn between point $B$, $C$ and $D$ which have the following values</p>
<p>$B = (A_x - 5, A_y)$</p>
<p>$C = (A_x + 5, A_y)$</p>
<p>$D = (A_x, A_y + 25)$</p>
<p>I also have a variable $R$ which stands for rotation, it will be from $0-180$ or $0-360$ whichever you prefer to work with.</p>
<p>How do I rotate the triangle $\triangle BCD$ a degree of $R$ ?</p>
<p>Edit:</p>
<p>My current attempt to create something like this, looks like this</p>
<pre><code>sinr = sin(R*3.14/180.0)
cosr = cos(R*3.14/180.0)
B = int((x + 5)*cosr - y*sinr), int((x + 5)*sinr + y*cosr)
C = int((x - 5)*cosr - y*sinr), int((x - 5)*sinr + y*cosr)
D = int(x*cosr - (y - 25)*sinr), int(x*sinr + (y - 25)*cosr)
</code></pre>
<p>However it leads to the following: <a href="https://gyazo.com/30899a78b4a4b7ed7c619796005cd600" rel="nofollow noreferrer">link</a></p>
<p>Note: the $X$ and $ Y $ value does not change in this example</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Is it possible to compute Right Triangle's Legs starting from another Right Triangle with the same Hypotenuse?. <p>In an application of the Manhattan Distance trough the haversine formula, I was stuck in a problem that doesn't allow me to compute the right distance among two points in a space.</p>
<p>Despite the scope, it could be useful to many other applications, so I'm trying to find a "good enough" solution of this tedious problem.</p>
<p>Take a look at this simple picture to easily understand the problem:
<a href="https://i.stack.imgur.com/VyhTS.png" rel="nofollow noreferrer">right triangles with same hypotenuse</a></p>
<p>There are two right triangles, one red and one blue, which have the same hypotenuse but different legs and legs ratios.
The two legs of the red triangle are known, so it is easy to compute both <strong><em>hypotenuse</em></strong> and angles <strong><em>gamma</em></strong> and <strong><em>beta</em></strong>, but what is important for me is the computation of <strong><em>c</em></strong> and <strong><em>d</em></strong> which are the legs of the blue triangle. </p>
<p>There doesn't exist a same ratio among the red legs and the blue ones (such as 16:9 in TV monitors), so it is probably impossible to solve this problem, but maybe I'm wrong.</p>
<p>I spent some time trying to compute <strong><em>alpha</em></strong> and now I think that this is impossible, I know that putting <strong><em>alpha</em></strong> equal to 45° I will be able to compute <strong><em>c = d</em></strong> but this is not the solution that I want, as you can see the blue legs are different each other.</p>
<p>If you have any idea concerning this problem please let me know your POV, I will appreciate because I was not able to find any suggestion. THANK YOU</p>
| 0non-cybersec
| Stackexchange |
Alembic support for multiple Postgres schemas. <p>How can I use Alembic's <code>--autogenerate</code> to migrate <em>multiple</em> Postgres schemas that are not hard-coded in the SQL Alchemy model? (mirror question of <a href="https://stackoverflow.com/questions/9298296/sqlalchemy-support-of-postgres-schemas">SQLAlchemy support of Postgres Schemas</a>, but for Alembic).</p>
<p>In particular, we use Postgres schemas to seperate different clients that share the same set of tables. Moreover, there is a schema with <em>shared</em> stuff among clients. The SQL Alchemy model has no knowledge of schemas, the schema is set at run-time using <code>session.execute("SET search_path TO client1,shared")</code>.</p>
<p>The default <code>--autogenerate</code> is not helping at all, as it is detecting multiple schemas that do not exist in the model and ends up deleting the schemas and re-creating every table in the default schema.</p>
<p>I would really like to use <code>--autogenerate</code> though, with the proper plumbing to set the schemas correctly. Any suggestions on if/how Alembic's API can do this?</p>
| 0non-cybersec
| Stackexchange |
How to Import mongodb database from development Environment to local env by using Commmand?. <p>I have lots of collections in my development server. I need to use the same data for testing scenarios. I am trying to import all the data of development environment to local by command is it possible?</p>
<p>I successfully imported to a file by using below command:</p>
<pre><code>mongoimport -d dbName -c collectionName dataFile.js
</code></pre>
<p>But how can we do same to import DB from development environment to local Env command-line?</p>
| 0non-cybersec
| Stackexchange |
Boards of Canada - Reach for the Dead [x-post /r/IDM]. | 0non-cybersec
| Reddit |
primefaces datatable row coloring. <p>I want to show datatable rows with different colors.</p>
<p>I am using rowStyleClass attribute.
But It is not changing the colors</p>
<p>My code in datatable is, </p>
<pre><code>rowStyleClass="highlight";
</code></pre>
<p>and my css file is looks like this,</p>
<pre><code>.highlight {
background: yellow !important ;
}
</code></pre>
| 0non-cybersec
| Stackexchange |
C++ entangled shared pointer. <p>I have found code below in "The C++ programming language, 4th edition", chapter 17.5.1.3</p>
<pre><code>struct S2 {
shared_ptr<int> p;
};
S2 x {new int{0}};
void f()
{
S2 y {x}; // ‘‘copy’’ x
∗y.p = 1; // change y, affects x
∗x.p = 2; // change x; affects y
y.p.reset(new int{3}); // change y; affects x
∗x.p = 4; // change x; affects y
}
</code></pre>
<p>I don't understand the last comment, indeed y.p should point to a new memory address after the reset() call, and so </p>
<pre><code> ∗x.p = 4;
</code></pre>
<p>should let y.p unchanged, isn't it?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.