text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Need more space in my front pockets for business casual clothing. Looking for some tastefully pleated pants on a budget. Besides thrift stores, are there any reccomendations?. Specifically, I need to reduce the visible bulge from a small pistol I keep concealed in my front pocket. Darker materials are better, and I'm trying to avoid your typical super-thin Izod polyester blends. | 0non-cybersec
| Reddit |
Compose "dead_greek" with compose key. <p>The config file for my compose key <code>/usr/share/X11/locale/en_US.UTF-8/Compose</code> lists all the key sequences for composing Greek letters; all of them require the pressure of a special <code>dead_greek</code> key. This is not a physical key of course, so, how can I assign an arbitrary key sequence to my compose key which produces this virtual <code>dead_greek</code>?</p>
<p>Also, I'd be interested to know if you have found a comfortable keyboard configuration regarding the compose key in general, and Greek letters in particular.</p>
| 0non-cybersec
| Stackexchange |
Why am I seeing so many vidme videos on reddit lately?. The platform sucks at least on mobile for me. | 0non-cybersec
| Reddit |
The fookin lad did it again!. | 0non-cybersec
| Reddit |
How does terminal palette work. <p><br />
So my question is basically simple. What is this color palette in color preferences of the terminal? Where can i see which color does what. What every color from this palette is responsible for? You can see that there is a color for text, for bold text and for background. But what's with the palette?<br />
Thank you.</p>
| 0non-cybersec
| Stackexchange |
AITA for telling a friends date that he has herpes, causing her to leave and block him?. One of my friends has been on a dry spell recently, let’s call him Mick. Mick has contracted both genital and oral herpes from an unfortunate drunk hook up years ago.
He was upset afterwards that the girl didn’t warn him beforehand - which I believe is relevant for the story.
He’s been wanting to get back into dating and told me that women tend to unmatch him immediately when he mentions his STDs. It’s understandably frustrating, but I felt it’s good on him for being upfront about it.
That changed with his last tinder encounter. Mick told me she’s a great girl - pretty, funny, witty. He was *really* excited about going on a date with her and I assumed he had told her about his herpes situation (as he with other girls before).
We arranged a double date, Mick and Tinder Girl, as well as my partner and I. Things went well in the beginning, we were having a great time and I could definitely feel the chemistry between the two.
However, here’s where I might have been an asshole: Mick and my partner went outside for a cigarette, so Tinder Girl and I were the only ones at our table. We ended up talking about Mick, and I mentioned how excited he had been about the date, especially since he hadn’t exactly been lucky on tinder so far. She couldn’t see why, since he was great guy and she enjoyed the date so far.
Mind you, we’ve had a few drinks at this point and I told her that he’s had a lot of girls unmatch him due to his ‘situation’. She was confused and asked me what I meant, so I told her that I meant his herpes.
She got upset and told me that he hadn’t told her, despite her specifically asking about STDs. Apparently, Mick claimed to be entirely clean.
She thanked me and stormed out, sending Mick an angry message and later blocking him.
Mick said I ruined his chances of scoring that night and is *really* upset with me. He said it was not my place to say anything and I should’ve given him the chance to tell her - but honestly I don’t think he would’ve (given that he specifically lied about it on tinder when she asked). I feel bad, at the same time I think she deserved to know beforehand.
I genuinely wish for Mick to have successful dates, but not through being deceitful. It wasn’t on purpose, I assumed he had told her prior to this - but maybe I do suck for even bringing it up?
So, reddit: AITA? | 0non-cybersec
| Reddit |
Convergence in distribution and OLS in the regression model. <p>Suppose a random variable $X_n$ converges in distribution to X and $E[X]< \infty$,<br>
Is this statement true or is there any condition to satisfy this? </p>
<blockquote>
<p>$ plim_{n\to \infty}Var(X_n) = Var(X) $ (or $lim_{n\to \infty}Var(X_n) = Var(X)$ ) </p>
</blockquote>
<p>In fact, I would like to know whether the (unconditional) variance of A=$\sqrt n(\hat\beta -\beta )$ converges in probability to the variance of the asymptotic distribution of A for the OLS estimator $\hat\beta$ in the linear regression model with stochastic regressors when the regressor X and the error term are independent. </p>
<p>e.g) $y_i = x_i\beta + e_i$ , $e_i$ ~ i.i.d $( 0, \sigma^2) $, $plim{{\sum x_i^2} \over n}=E(x_i^2)<\infty$ , and x and e are independent. </p>
<p>I thought that Var(A) = $\sigma^2 E[({{\sum x_i^2} \over n})^{-1} ] $ and A $\to^D $ N(0 , $\sigma^2 [E(x_i^2)]^{-1}$)<br>
I would like to know whether $plim_{x\to \infty}Var(A)=\sigma^2 (E(x_i^2))^{-1}$</p>
| 0non-cybersec
| Stackexchange |
On a remark of Tait on FLT for the exponent 3. <p>This is one of those recreational questions that aren't really about research. I found a curious remark in an old volume of American Mathematical Monthly (1922) which I'll quote below:</p>
<blockquote>
<p>In the <em>Proceedings of the Royal Society of Edinburgh</em>, vol.7, p.144, in some mathematical notes by professor P.G. Tait, it is stated:</p>
<p>"If <span class="math-container">$x^3+y^3=z^3$</span>, then <span class="math-container">$(x^3+z^3)^3y^3+(x^3-y^3)^3z^3=(z^3+y^3)^3x^3$</span>.</p>
<p>This furnishes an easy proof of the impossibility of finding two integers the sum of whose cubes is a cube."</p>
<p>How does this "easy proof" follow? Students are notoriously suspicious of those steps which an author announces as "easy", and are sometimes inclined to believe that the word is used in a humorous sense. [...] There are of course proofs in existence that the sum of two cubes cannot be a cube.</p>
</blockquote>
<p>Did anyone manage to find a proof of FLT for the exponent 3 using this identity or is the alluded proof another illusion that did not fit in the margin?</p>
| 0non-cybersec
| Stackexchange |
Optimal strategy for rolling die consecutively without getting a "1". <p>Consider rolling a 6-sided die continuously and trying to tally as high a score as possible (the sum of all rolls). If you roll a 1, then your turn is over and your score is 0. So for each <strong>successful</strong> roll, the expectation value should be 4. According to Knizia (1999), an approximately optimal strategy would be to attempt to roll to a score of 20 and then stop. (S)he states: </p>
<blockquote>
<p>"...we know the true odds of such a bet are 1 to 5. If you ask yourself how much you should risk, you need to know how much there is to gain.....If you put 20 points at stake, this brings the odds to 4 to 20, that is 1 to 5, and makes a fair game....Whenever your accumulated points are less than 20, you should continue throwing, <strong>because the odds are in your favor.</strong>"</p>
</blockquote>
<p>Don't understand this, is not rolling to 20 on average essentially rolling five times (without getting a 1)? The probability of this happening is only about 40%. So wouldn't the odds be about 60% that you would roll a 1 and score 0 if you always try to roll up to 20?</p>
| 0non-cybersec
| Stackexchange |
Luigi has finally rejected Satan. | 0non-cybersec
| Reddit |
LPT: Never dry your pots and pans again! Hang a pot rack directly over your sink.. | 0non-cybersec
| Reddit |
Is there an equivalence relation of which the quotient topology is homeomorphic to codomain of a quotient map?. <p>Let $X,Y$ be topological spaces.</p>
<p>Let $p:X\rightarrow Y$ be a quotient map.</p>
<p>Then, does there exist an equivalence relation $\sim$ on $X$ such that $X/\sim$ is homeomorphic to $Y$?</p>
| 0non-cybersec
| Stackexchange |
Israeli-made oral vaccine for coronavirus on track, but testing will take months. | 0non-cybersec
| Reddit |
Ionic (click) not working inside AlertController message Property. <p>I'm trying to create a AlertController with a button inside <code>message</code> Property. And the (click) method doesn't work. Is there an alternative way? It renders the button component but can't use function.</p>
<pre><code>async forgotPass() {
const alert = await this.alertCtrl.create({
header: "Forgot Password?",
message: `Enter you email address to send a reset code.
<a href="tel:+1-1800-555-5555" class="button button-positive">Call BKB</a> or
<br/>
<ion-button small (click)="navCtrl.navigateForward('forgot_password')">Enter Code</ion-button>
`,
inputs: [
{
name: "email",
type: "email",
placeholder: "Email"
}
],
....
</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 |
Numerical value of $\int_0^1 \int_0^1 \frac{\arcsin\left(\sqrt{1-s}\sqrt{y}\right)}{\sqrt{1-y} \cdot (sy-y+1)}\,ds\,dy $. <p>Could somebody give me a numerical value for this integral?</p>
<p>$$I = \int_0^1 \int_0^1 \frac{\arcsin\left(\sqrt{1-s}\sqrt{y}\right)}{\sqrt{1-y} \cdot (sy-y+1)}\,ds\,dy $$</p>
| 0non-cybersec
| Stackexchange |
Drake Is Hosting 'Saturday Night Live' on May 14th. | 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 |
Distribution of Norm of Two-Dimensional Brownian Motion. <p>I am trying to solve the following:</p>
<p>Let $W_{t}=\left(W_{t}^{1},W_{t}^{2}\right)$ be a two dimensional Brownian motion. Find the distribution of $$\|W_{t}\|=\sqrt{(W_{t}^{1})^2+(W_{t}^{2})^2}.$$</p>
<p>I know by the properties of Brownian motion for any $k \ge 1$ and $0<t_1<\dotsb<t_k$ the random vector $(W_{t_1},\dotsc,W_{t_k})$ is Gaussian with zero mean and covariance matrix $B(t_i,t_j)=\min(t_i,t_j).$ I also know that the sum of square iid Gaussian random variables $N(0,\sigma)$ is exponential with mean $2\sigma^2.$ Can I use this property to infer anything about the $L^2$ norm of a two-dimensional Brownian motion?</p>
| 0non-cybersec
| Stackexchange |
[Not exactly FMF] Amazon intros the official version of "order both sizes and return the other". | 0non-cybersec
| Reddit |
Pay Per Click Management Services – A strong platform in Search Engine Marketing. | 0non-cybersec
| Reddit |
Hidden Service Communication with clear net. <p>If a hidden service has to communicate with the clear net but doesnt want to either appear to be coming from a known tor exit and masking its true IP what would be the best way to achieve something like this?
Would a second hosted server and forwarding the data from HSserver to the nonHSserver and then out to teh clearnet be the best solution? </p>
| 0non-cybersec
| Stackexchange |
How to emulate an inline host in the middle of 2 other hosts in VMware Workstation?. <p>I want to setup a lab to try Suricate, an IPS system.
The thing is that I need to set it up like this:</p>
<p>Atacker VM ----- Inline IPS VM ----- Victim VM
How can I accomplish this?
I don't see a way to setup a virtual host with 2 NIC, putting it in the middle of the connection.
Can it be done somehow?</p>
| 0non-cybersec
| Stackexchange |
[23M] How to meet girls in a small town and other obvious questions.. Ok so I should say that first off I have zero experience dating. Not zero experience at social activities just zero at dating since I was always more focused on school or surviving my home life. Even in college I didn't date, I had friends and hung out with them but I didn't really get out that much.
Now finally I'm at a place where I feel like I actually want to start dating instead of just feeling left out because everyone else is dating.
My only problem is its in a small town. My old college is about 35min from where I'm teaching at now and their are two medium sized cities about an hour away but lacking the experience I'm not sure where to start. Well other than Tinder that is.
Also random question time but I walk my dog a lot and of course lots of people want to pet it. How is it people go from "do you want to pet my dog" to "Hey would you like to grab coffee later?" | 0non-cybersec
| Reddit |
Laptop screen brightness stuck. <p>I can no longer adjust the brightness of my laptop screen, it's stuck at the lowest.</p>
<p>In Linux, the brightness adjustment keys (Fn + F4/F5) still work, since a brightness popup shows and the meter bar changes, but it does this in a strange way. Starting at 100%, each successive press of the "lower brightness" button moves the bar to:</p>
<ul>
<li>67%</li>
<li>50%</li>
<li>0%</li>
<li>26%</li>
<li>12%</li>
</ul>
<p>Or another random pattern like that. The problem is not Linux however, since I can't change the brightness from Windows (7) either.</p>
<p>Where do I even begin to look? Since the problem does not seem be OS-specific, I've searched in the BIOS, but it has no option like that. I've also removed the power from my PC (including removing the battery) for about a minute but that changed nothing.</p>
<p>How did this happen? I think it's been this way since when I lowered the brightness to 0%, then pressed the "lower brightness" key again. Not sure about that though.</p>
<hr>
<p>In response to the file in proc: The file exists. If I read it, it shows:</p>
<pre><code>root@bart-laptop:/home/bart# cat /proc/acpi/video/VGA/LCD/brightness
levels: 70 50 20 30 40 60 80 90 100
current: 100
</code></pre>
<p>If I echo a different level to it it changes the value in the <code>current:</code> field above, but there's no actual change. Also the numbers behind <code>levels:</code> are in a strange order.</p>
<hr>
<p>For thoroughness' sake I've disconnected the CMOS battery to reset the BIOS settings. The settings were reset but the problem remains.</p>
| 0non-cybersec
| Stackexchange |
[29/m, Florida] I have no vehicle and I need to get a new job to afford one. I can't get a new job without a vehicle...can anyone advise me on how to get out of this?. Last October I was all set to move to Chicago. I had my bags packed, my stuff boxed, and I gave my car away to a friend that has a son with autism (I wouldn't need one in Chicago and he needed a car more than I did). I was about to rent a moving van when the friend I was set to be living with went into rehab.
I've been walking 4 miles to work ever since. I make roughly $400 every 2 weeks and my rent alone is $400 a month. I pay a ~$75 power bill and around $200 for bare essentials and food as well. I literally have no way to save money. The only way I'm going to get a better job is if I get a car, but I can't get a car unless I get a better job.
I have no family or friends that can lend me money to get a vehicle and I've sold just about everything I can already to make ends meet. Is there anything I can do (legally) to get out of this rut? | 0non-cybersec
| Reddit |
Berita Otomotif Terkini - Berhati-hatilah Batman! Superman Menunggangi Bugatti Chiron. | 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 rm reversible?. <p>On a Windows Server 2012R2 environment, is the PowerShell cmdlet <code>rm</code> undoable? The TechNet manual for <a href="http://technet.microsoft.com/en-us/library/hh849765.aspx" rel="nofollow noreferrer">Remove-Item</a> states that it deletes an item (multiple types), but no specification about the possibility of undeleting the item.<br>
So, if I do </p>
<pre><code>rm .\filename.ext
</code></pre>
<p>from a PowerShell prompt, can I recover this file only using native tools?</p>
| 0non-cybersec
| Stackexchange |
Set $PROJECT_NAME in docker-compose file. <p>I am using the same <code>docker-compose.yml</code> file for multiple projects. I am really lazy, so I don't want to start them with <code>docker-compose -p $PROJECT_NAME up</code>.</p>
<p><strong>As of Docker version 17.06.0, is it possible to set the variable directly in the <code>docker-compose.yml</code> file?</strong></p>
| 0non-cybersec
| Stackexchange |
Daily Drawing: Ready to Serve. | 0non-cybersec
| Reddit |
Budweiser Beer Crate End Table. | 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 |
Take row means of every other column in pandas (python). <p>I am trying to take row means of every few columns. Here is a sample dataset.</p>
<pre><code>d = {'2000-01': range(0,10), '2000-02': range(10,20), '2000-03': range(10,20),
'2001-01': range(10,20), '2001-02':range(5,15), '2001-03':range(5,15)}
pd.DataFrame(data=d)
2000-01 2000-02 2000-03 2001-01 2001-02 2001-03
0 0 10 10 10 5 5
1 1 11 11 11 6 6
2 2 12 12 12 7 7
3 3 13 13 13 8 8
4 4 14 14 14 9 9
5 5 15 15 15 10 10
6 6 16 16 16 11 11
7 7 17 17 17 12 12
8 8 18 18 18 13 13
9 9 19 19 19 14 14
</code></pre>
<p>I need to take row means of the first three columns and then the next three and so on in the complete dataset. I don't need the original columns in the new dataset. Here is my code. It works but with caveats (discussed below). I am searching for a cleaner, more elegant solution if possible. (New to Python/Pandas)</p>
<pre><code>#Create empty list to store row means
d1 = []
#Run loop to find row means for every three columns
for i in np.arange(0, 6, 3):
data1 = d.iloc[:,i:i+3]
d1.append(data1.mean(axis=1))
#Create empty list to concat DFs later
dlist1 =[]
#Concat DFs
for j in range(0,len(d1)):
dlist1.append(pd.Series(d1[j]).to_frame())
pd.concat(dlist1, axis = 1)
</code></pre>
<p>I get this output, which is correct:</p>
<pre><code> 0 0
0 6.666667 6.666667
1 7.666667 7.666667
2 8.666667 8.666667
3 9.666667 9.666667
4 10.666667 10.666667
5 11.666667 11.666667
6 12.666667 12.666667
7 13.666667 13.666667
8 14.666667 14.666667
9 15.666667 15.666667
</code></pre>
<p>The columns names can easily be fixed, but the problem is that I need them in a specific format and I have 65 of these columns in the actual dataset. If you'll notice the column names in the original dataset, they are <code>'2000-01'; '2000-02'; '2000-03'</code>. The 1,2 and 3 are months of the year 2000, therefore column 1 of the new df should be <code>'2000q1'</code> , q1 being quarter 1. How do I loop over column names to create this for all my new columns? This seems significantly more challenging (at least to me!) than what's shown <a href="https://stackoverflow.com/questions/34843786/renaming-pandas-data-frame-columns-using-a-for-loop">here</a>. Thanks for your time!</p>
<p>EDIT: Ok this has been solved, quick shoutout to everyone who contributed!</p>
| 0non-cybersec
| Stackexchange |
Star Wars: the last meme. | 0non-cybersec
| Reddit |
I laughed too hard at this.... | 0non-cybersec
| Reddit |
[FP] Went to the International Market on the Weekend. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How I can change the icon on an EditText?. <p>I make EditText to receive a password from the user.</p>
<p>So I changed the input type to password.</p>
<pre><code><EditText
android:id="@+id/edittext_Password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:inputType="textPassword"
android:layout_weight="1"
/>
</code></pre>
<p>When I put word in EditText, it shows a black dot.<br>
I want change the dot to a drawable resource.</p>
<p><a href="https://i.stack.imgur.com/8hoFw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8hoFw.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
How do I prevent my laptop from shutting down when undocking?. <p>The Laptop is an HP EliteBook 8540p running Windows 7 Professional. OS updates are applied regularly via Windows Update and the machine is currently fully up to date.</p>
<p>Recently, when undocking the laptop it has started initiating the shutdown sequence. The "waiting on applications to close" box pops up so it can be aborted if caught quickly enough.</p>
<p>I can't find anything in the power configuration related to docking/undocking and google hasn't proven very useful either. Has anyone ran into this problem and figured out how to resolve it?</p>
| 0non-cybersec
| Stackexchange |
The "let's arm all teachers" argument for stopping mass shootings makes me want to cry.. Gun violence has been bothering me for years. I'm 23, I was in college when Sandy Hook happened. I remember going home for Christmas that year, watching a memorial on TV, and crying with my Dad. For the years since then, these mass killings/ shootings happening in the US have been unbearable for me (and I think a lot of people).
The "solution" I keep seeing on my social media feeds is "Oh, we'll just give every teacher a gun and that will solve all of this."
This "solution" makes me want to cry. Do you think it is realistic to expect all teachers to be armed and trained to use a gun? There is already a teacher shortage. They are already underpaid. Being a teacher requires patience, understanding, and special skills to be able to teach many different types of students. They have to grade homework, create lesson plans, and (depending on the funding of the school) buy their own classroom supplies.
So now we want all teachers to have a gun on them at all times and use it? We add this to the list of their responsibilities? This should be a requirement for someone to be a teacher?
If you take a step back and think about all the teachers you know, do you think they want this burden? Is it realistic to require "weapons training" on a potential teacher's resume? Think about all the teachers you've had in your life. Would you have been happy that all those people had guns, or would it have been vastly inappropriate for some of those past individuals?
I feel like I'm living in a Crazy Ville USA where people would rather add more guns to the problem than admit that some of these high powered semi automatic rifles are unnecessary. I feel so hopeless and lost.
TLDR: I really can't stand the idea that arming every teacher is the solution to school shootings. I don't feel like it is realistic at all. | 0non-cybersec
| Reddit |
Sunny side up on grated potato with chili pepper and garlic, zucchini, dried pork sausage and creamy brie-like cheese. Simple and savory.. | 0non-cybersec
| Reddit |
ERROR: ' ' device did not show up after 30 seconds. <p>When installing archlinux 2019.04.01 I get</p>
<pre><code>losetup /run/archiso/bootmnt/arch/x86_64/airootfs.sfs:failed to set up loop device: No such file or directory
</code></pre>
<p>some useless rows</p>
<pre><code>Mounting ' ' to /run/archiso/sfs/rootfs
ERROR: ' ' device did not show up after 30 seconds
</code></pre>
<p>Flash drive name is ARCH_201904 ,so I don't know whats is problem, but
ERROR I see ' ',and in other asks here some way like /dev/disk/by-label</p>
<p>I used dd to make a bootable flash drive.</p>
| 0non-cybersec
| Stackexchange |
Bananomnomnomnom. | 0non-cybersec
| Reddit |
Placement of page numbers is too low. <p>I'm trying to set page numbering but somehow it ends up lower than it should and the numbers touch the edge of the page, which looks strange and is exactly what I don't want it to look like. How can I adjust the position of the numbers?
I didn't use any settings for page numbering. I use several packages, maybe it has something to do with it</p>
<pre><code>\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{float}
\usepackage{multicol}
\usepackage{a4wide}
\usepackage[margin={1cm, 1cm}]{geometry}
</code></pre>
| 0non-cybersec
| Stackexchange |
partial derivative with changing variables. <p>Here is the question
<a href="https://i.stack.imgur.com/1EXLU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1EXLU.jpg" alt="Here is the question"></a></p>
<p>and the way that I attempted for the first part in the question
<a href="https://i.stack.imgur.com/fusqP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fusqP.jpg" alt="enter image description here"></a></p>
<p>All of them seems like correct way but I don't understand what is the relationship of the functions $$F(u,v)\quad and\quad f(x,y)$$
and why it can establish
\begin{align}
\frac{{\partial F}}{{\partial u}}=\frac{{\partial f}}{{\partial x}}\frac{{\partial x}}{{\partial u}}+\frac{{\partial f}}{{\partial y}}\frac{{\partial y}}{{\partial u}}
\end{align}
and
\begin{align}
\frac{{\partial F}}{{\partial v}}=\frac{{\partial f}}{{\partial x}}\frac{{\partial x}}{{\partial v}}+\frac{{\partial f}}{{\partial y}}\frac{{\partial y}}{{\partial v}}
\end{align}</p>
<p>In the second part, I don't understand what does $$ f(x,y) \text{ is independent of } x$$
mean?
Please help!!</p>
| 0non-cybersec
| Stackexchange |
Aguero's 2 footed tackle vs Luiz. No card.. | 0non-cybersec
| Reddit |
Pence's D.C. Neighbors Troll Him With Pride Flags. | 0non-cybersec
| Reddit |
Why is Azure "Unable to find the bot with the specified id" when attempting to open a Bot Service that very much exists in the Azure Portal?. <p>I'm having a problem that I cannot find any information on anywhere on the Internet. I'm sharing an Azure directory with a number of my cohorts, and as such, any number of us might be working on a Resource in the Portal. However, when anyone creates a Bot Service, nobody else can access that Resource. Mind you, whoever creates the Bot Service can do whatever they want with it, but anyone else will see the error "Unable to find the bot with the specified id." (Written as is.)
<img src="https://i.stack.imgur.com/XcAMV.png" alt="This error message is shown in a prompt box (with an "OK" button) over a blank screen (in the context of the Portal window)."></p>
<p>We know that there's no problem with permissions, as everyone has full access to everything, and the problem only seems to be present for the Bot Service Resource.</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 |
Helicopter ride with pilot friend over forbidden Sacred Falls, Oahu, Hawaii. | 0non-cybersec
| Reddit |
Upgrading to 64-bit OS. Worth getting Windows 8?. With Windows 8.1 out now is it worth getting windows 8 or sticking with 7?
I also saw that new direct x versions wont be available for 7 which is annoying. I have been converting my PC to a gaming PC and need a 64-bit OS to make the rest of my RAM usable (above 4GB).
Any opinions, Ideas, or info is welcome. | 0non-cybersec
| Reddit |
Americans miffed at lack of Stephen Fry Harry Potter audiobooks. | 0non-cybersec
| Reddit |
56lbs Lost, (Before & After). I was 299lbs and I have gotten myself down to 242lbs, The photo on the left was after I lost 15lbs and the photo on the right is at 56lbs. I wish I had a better before photo but thats the only photo I could find. Here they are:
[https://imgur.com/a/UwvL0Cy](https://imgur.com/a/UwvL0Cy)
**Edit:** I have since found a picture taken around the same time as the picture on the left: [https://imgur.com/a/OvbRcSQ](https://imgur.com/a/OvbRcSQ)
**How did I lose the weight?**
Eating less, exercise and determination. I walk 10km (6.2 Miles) a day and strength train 4 days a week. I have only started strength training a month ago, I am still new. I eat fish (Blue Grenadier, Basa, Cod) I eat salads without dressing and croutons, just lots of chili flakes for flavour. Lot's of fruits (In smoothie form) 100% Organic.
That's basically all that has worked for me, I know it's probably not the best advice but that's how I have achieved my goals, feel free to message me if you have any questions or comment them, I am more than happy to answer them.
**Edit:** Wow, the support from everyone is amazing. Thank you so much. Your support only wants to make me work even harder! | 0non-cybersec
| Reddit |
Given Polar Coordinates - Find the rectangular coordinates of a centroid.. <p>I'm having trouble with this question on my Calculus III homework. I'm not really sure how to go about this one honestly. </p>
<blockquote>
<p>A lamina is bounded by the curve $r = 2\cos(3θ)\space$ when $-π/6 <= θ <= π/6$. Assuming a constant density, $ρ = k$, give the rectangular coordinates of the centroid.</p>
</blockquote>
<p>For clarity of the question, and clarity of what type of answer I am looking for:</p>
<blockquote>
<p>My professor taught me the following: $$M_x = \iint y\rho(x,y)dA$$ $$M_y = \iint x\rho(x,y)dA$$ $$m = \iint \rho(x,y)dA$$ The answer I need is, $$(\bar x, \bar y) = \left(\frac{M_y}{m},\frac{M_x}{m}\right)$$ In addition, I was taught that $$ x = r\cos(\theta) $$ $$ y = r\sin(\theta) $$ when converting between polar and rectangular coordinates.</p>
</blockquote>
<p>Any assistance would be greatly appreciated.
Thanks.</p>
| 0non-cybersec
| Stackexchange |
Pope Warns Migrant Influx Threatens Europe's 'Humanistic Spirit'. | 0non-cybersec
| Reddit |
Bootstrap modal - Add a object tag embedding a PDF. <p>I'm currently trying to display a bootstrap modal in which I want to include a PDF file with the "object" html tag. Problem is that nothing seems to display.</p>
<p>I've created a <a href="http://jsfiddle.net/mV6jJ/3/" rel="noreferrer">jsFiddle</a> (<a href="http://jsfiddle.net/mV6jJ/3/" rel="noreferrer">http://jsfiddle.net/mV6jJ/3/</a>).</p>
<p>So you will find a basic modal (exactly same code from bootstrap for a basic modal showing after a click on a button) and in the modal-body you will find :</p>
<pre><code><object type="application/pdf" data="http://www.inkwelleditorial.com/pdfSample.pdf" width="500" height="500">this is not working as expected</object>
</code></pre>
<p>So when I add this code alone (so not inside a bootstrap modal) it's working as expected. It display the pdf in the browser's default pdf viewer. But when I try to implement the pdf inside of the bootstrap modal, nothing seems to appear.</p>
<p>If you have any idea it will really helps me, many hours searching and I've only seen solutions with tag (which I don't want to use).</p>
<p>Thank you and best regards</p>
| 0non-cybersec
| Stackexchange |
Rewiring my own Vect but encountering issues. <p>I was trying to re-implement the Vect data type to become more familiar with the dependent types. This is what I wrote:</p>
<pre><code>data Vect : (len : Nat) -> (elem : Type) -> Type where
Nil : Vect Z elem
(::) : (x : elem) -> (xs : Vect len elem) -> Vect (S len) elem
append : Vect n elem -> Vect m elem -> Vect (n + m) elem
append [] y = y
append (x :: xs) y = x :: append xs y
</code></pre>
<p>I can define, for example <code>Vect 4 Nat</code> and others as well. But if I try <code>append (Vect 4 Nat) (Vect 3 Nat)</code> I get an error that I am not able to parse:</p>
<pre><code>When checking an application of function Main.append:
Type mismatch between
Type (Type of Vect len elem)
and
Vect n elem (Expected type)
</code></pre>
<p>Clearly there is something wrong in the way I think about this.</p>
<p>Any suggestion?</p>
<p>Also when I try to create <code>Vect 4 [1,2,3,4]</code> I get an error:</p>
<pre><code>When checking argument elem to type constructor Main.Vect:
Can't disambiguate since no name has a suitable type:
Prelude.List.::, Main.::, Prelude.Stream.::
</code></pre>
<p>So I guess I am quite lost ...</p>
| 0non-cybersec
| Stackexchange |
Slip Up Saturday (Chaturday): This is the thread to vent, laugh, and humble yourself with this past week's screw ups in training. You can also tell us all about it on our Discord chat!. Welcome back to the thread where no matter how new or adept you are, we can all take a moment to embrace the shortcomings that come with this journey, finding ways to improve together.
If you’ve got a photo or video of yourself face planting from a handstand, doing a muscle-up into a low ceiling, or simply want us to sympathize with your lack of resolve in training consistently, this is the thread for you!
Be sure you are familiar with the [rules](http://www.reddit.com/r/bodyweightfitness/wiki/rules), particularly #2: No Medical Advice.
---
**So how’d you goof this week? Tell us about it! Share your epic fails!**
[*Click here to view last week's thread*](https://www.reddit.com/r/bodyweightfitness/comments/c9w9t9/slip_up_saturday_chaturday_this_is_the_thread_to/)
[*Click here to view previous Slip Up Saturdays*](https://www.reddit.com/r/bodyweightfitness/search?q=I+SUCK+SATURDAY+author%3Asolfire&sort=new&restrict_sr=on&t=all).
___
ADDITIONALLY, **Saturday is the day we promote our chatroom, which we maintain throughout the week.** There, you can find some of our active subscribers lounging around ready to provide real-time answers to your burning questions, or make friends with a common interest in bodyweight fitness! Follow the instructions below to get started:
**Step One**: Click on [this link to join us on **Discord**](https://discord.gg/bwf). Register for an account if you don't already have one!
**Step Two**: Say hi, bullshit with us, or ask any questions you like and tell us how much you deadlift. | 0non-cybersec
| Reddit |
Do you know what Disney song is really deep?. Under The Sea. | 0non-cybersec
| Reddit |
I just wanna get home, I am not involved in your dispute. ohhhh wtf!. | 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 |
Easy way to convert c code to x86 assembly?. <p>Is there an easy way (like a free program) that can covert c/c++ code to x86 assembly?</p>
<p>I know that any c compiler does something very similar and that I can just compile the c code and then disassemble the complied executable, but that's kind of an overkill, all I want is to convert a few lines of code.</p>
<p>Does anyone know of some program that can do that?</p>
<p>EDIT: I know that GCC compiler does that but it's AT&T syntax and I'm looking for the Intel syntax (not sure if it's called intel syntax or not). The AT&T syntax looks a bit like gibberish to me and some commands use operands in reverse order and not how I'm used to and it can get really confusing.</p>
| 0non-cybersec
| Stackexchange |
Dorchester Town boss Phil Simkin may play at age of 60. | 0non-cybersec
| Reddit |
Wave tide-lapse time-lapse. | 0non-cybersec
| Reddit |
Skype binary. Skype's anti-reverse engineering technology is very strong - do you know if they built their own code, or use an existing libary . | 1cybersec
| Reddit |
WinSat command line closes too fast. <p>I'm trying to do some analysis under Windows 7 as to why I can't get a Windows Experience Index (WEI) rating due to disk issues. To this end, I'm trying to run <strong>winsat</strong> from the command line with :-</p>
<pre><code>winsat disk -seq -read -drive c
</code></pre>
<p>and</p>
<pre><code>winsat disk -ran -write -n 2
</code></pre>
<p>but the command window is closing too quickly to be able to read the results. I've tried opening a seperate <strong>cmd</strong> window to run it in but it still insists on launching its own window to run in, closing straight away.</p>
<p>Any idea how I can see the output?</p>
| 0non-cybersec
| Stackexchange |
any other Ents like resting your chin on your bong?. | 0non-cybersec
| Reddit |
How can I share my Zune with other PCs?. <p>I'm interested in listening to my Zune music collection with another PC. Ideally this would include Zune pass content. Is there a method, technique, or app that I can use to do this?</p>
<p>My Zune collection is on my desktop, and the other PC is a laptop on the same network via WiFi.</p>
<p><em>note: I'm not interested in techniques that involve separate media servers, or file syncing (for example Dropbox).</em></p>
| 0non-cybersec
| Stackexchange |
Android passed 80,000 apps in June 2010. . | 0non-cybersec
| Reddit |
How to query MultiIndex index columns values in pandas. <p>Code example:</p>
<pre><code>In [171]: A = np.array([1.1, 1.1, 3.3, 3.3, 5.5, 6.6])
In [172]: B = np.array([111, 222, 222, 333, 333, 777])
In [173]: C = randint(10, 99, 6)
In [174]: df = pd.DataFrame(zip(A, B, C), columns=['A', 'B', 'C'])
In [175]: df.set_index(['A', 'B'], inplace=True)
In [176]: df
Out[176]:
C
A B
1.1 111 20
222 31
3.3 222 24
333 65
5.5 333 22
6.6 777 74
</code></pre>
<p>Now, I want to retrieve A values:<br>
<strong>Q1</strong>: in range [3.3, 6.6] - expected return value: [3.3, 5.5, 6.6] or [3.3, 3.3, 5.5, 6.6] in case last inclusive, and [3.3, 5.5] or [3.3, 3.3, 5.5] if not.<br>
<strong>Q2</strong>: in range [2.0, 4.0] - expected return value: [3.3] or [3.3, 3.3] </p>
<p>Same for any other <em>MultiIndex</em> dimension, for example B values:<br>
<strong>Q3</strong>: in range [111, 500] with repetitions, as number of data rows in range - expected return value: [111, 222, 222, 333, 333] </p>
<p>More formal:</p>
<p>Let us assume T is a table with columns A, B and C. The table includes <em>n</em> rows. Table cells are numbers, for example A double, B and C integers. Let's create a <em>DataFrame</em> of table T, let us name it DF. Let's set columns A and B indexes of DF (without duplication, i.e. no separate columns A and B as indexes, and separate as data), i.e. A and B in this case <em>MultiIndex</em>. </p>
<p>Questions: </p>
<ol>
<li>How to write a query on the index, for example, to query the index A (or B), say in the labels interval [120.0, 540.0]? Labels 120.0 and 540.0 exist. I must clarify that I am interested only in the list of indices as a response to the query!</li>
<li>How to the same, but in case of the labels 120.0 and 540.0 do not exist, but there are labels by value lower than 120, higher than 120 and less than 540, or higher than 540?</li>
<li>In case the answer for Q1 and Q2 was unique index values, now the same, but with repetitions, as number of data rows in index range.</li>
</ol>
<p>I know the answers to the above questions in the case of columns which are not indexes, but in the indexes case, after a long research in the web and experimentation with the functionality of <em>pandas</em>, I did not succeed. The only method (without additional programming) I see now is to have a duplicate of A and B as data columns in addition to index.</p>
| 0non-cybersec
| Stackexchange |
VMware Fusion 6: cannot start Windows 2000 VM that worked in VMware Fusion 4. <p>Got this message when starting a Windows 2000 VM on VMware Fusion 6 on a Retina MacBook Pro with OS X Mavericks:</p>
<blockquote>
<p>This virtual machine's policies are too old to be run by this version of VMware Fusion.</p>
</blockquote>
<p>Could only find this <a href="http://notesnet.dk/notesnet/forum.nsf/0/0D27D4DCD6B9F3C5C1257A6B002BC33B?OpenDocument" rel="nofollow">Danish question</a> with no answers.</p>
<p>Fusion 6 is supposed to </p>
<ul>
<li><a href="http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1022060" rel="nofollow">run any old virtual hardware version</a> (this one is virtual hardware 7, I think it originates from VMware Workstation 6.5).</li>
<li><a href="https://communities.vmware.com/thread/464500" rel="nofollow">support Windows 2000</a>
Anyone having the faintest idea how to start digging for a cause?</li>
</ul>
<p><em>Edit: extra information about the settings, .vmx and .vmxf files.</em></p>
<p>Opening the <code>settings</code> for this VM gets the same message.</p>
<p><a href="http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1003746" rel="nofollow">VMware Virtual Hardware version overview</a>.</p>
<p>There are a few lines with the word <code>policy</code> in the <a href="http://www.fileinfo.com/extension/vmx" rel="nofollow">.vmx</a> file, but none in the <a href="http://www.fileinfo.com/extension/vmxf" rel="nofollow">.vmfx</a> file. And there is a <a href="http://www.fileinfo.com/extension/vmpl" rel="nofollow">.vmpl</a> file (which seems to have to do with the -now discontinued- <a href="http://www.vmware.com/products/ace/" rel="nofollow">VMware ACE</a> that used to ship with older VMware versions <a href="https://www.vmware.com/support/ws65/doc/releasenotes_ws65.html" rel="nofollow">including VMware 6.5</a>).</p>
<p>These are the lines with <code>policy</code> in the .vmx file:</p>
<pre><code>tools.upgrade.policy = "upgradeAtPowerCycle"
policy.vm.mvmtid = "52 3f 1e 13 9d 44 69 76-7c dd cc d1 67 a4 46 32"
policy.vm.managedVMTemplate = "FALSE"
policy.vm.managedVM = "FALSE"
</code></pre>
<p><em>Note</em>:</p>
<p>This is not a VMware Fusion specific question, searching for "<a href="https://www.google.com/search?q=%22This%20virtual%20machine%27s%20policies%20are%20too%20old%20to%20be%20run%20by%20this%20version%20of%20VMware%22" rel="nofollow">This virtual machine's policies are too old to be run by this version of VMware</a>" (so without <code>Fusion</code> or <code>Workstation</code>) reveals some nice links including <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2034362" rel="nofollow">Starting a virtual machine in Workstation or Fusion fails with the error: This virtual machine's policies are too old to be run by this version of VMware (2034362)</a> which also answers this question.</p>
| 0non-cybersec
| Stackexchange |
In Google Drive, how do I search for files that I own and that I've shared?. <p>I can't seem to figure out how to find the files that I've shared with people. The Google Help page on the <a href="https://support.google.com/drive/bin/answer.py?hl=en&answer=2375114&p=empty_search_ww" rel="nofollow">topic</a> provides a few clues but the following query is not allowed:</p>
<pre><code>owner:me to:*
</code></pre>
<p>but a specific target is valid:</p>
<pre><code>owner:me to:[email protected]
</code></pre>
<p>Any clues?</p>
| 0non-cybersec
| Stackexchange |
Is it ok to restart a BackgroundWorker inside its Completed event. <p>I want a background worker to continue running and occasionally update the user interface. My first idea was to use a BackgroundWorker and in its completed event just fire it up again. </p>
<p><strong>Is using a BackgroundWorker in this fashion acceptable?</strong> Or are there potential issues from using the completed event to trigger the worker?</p>
<hr>
<p>Below is some Pseudo code of what my intentions are</p>
<pre><code>class Program
{
private static BackgroundWorker worker;
private static Int32 runs = 0;
static void Main(string[] args)
{
worker = new BackgroundWorker();
worker.DoWork += worker_DoWork;
worker.RunWorkerCompleted += worker_RunWorkerCompleted;
worker.RunWorkerAsync(runs);
Console.ReadLine();
}
static void worker_DoWork(object sender, DoWorkEventArgs e)
{
//Do time consuming work
Thread.Sleep(3000);
}
static void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
//Update the UI and start time consuming work again
runs++;
Console.WriteLine("Completed run #" + runs);
worker.RunWorkerAsync();
}
}
</code></pre>
| 0non-cybersec
| Stackexchange |
"Your sense of certainty off the quantum edge" - In this lecture a philosopher and a physicist discuss quantum mechanics and its philosophical implications. We will think about uncertainty in the world and ask ourselves what the void is.. | 0non-cybersec
| Reddit |
Which shell interpreter runs a script with no hashbang... but run as sudo?. <p>This is an extension to <a href="https://unix.stackexchange.com/questions/373223/which-shell-interpreter-runs-a-script-with-no-shebang">Which shell interpreter runs a script with no shebang?</a> </p>
<p>I was testing my understanding of what interpreter is used, and found some odd behaviour when running a script without a hashbang but as sudo.</p>
<p>Script is as follows:</p>
<pre><code>echo "I am running shell $SHELL"
foo=$'dollar'
echo "run with sudo to see the magic dollar sign <$foo>"
</code></pre>
<p>When I ran this script as my normal user, all fine, outputs:
<code>
I am running shell /bin/bash
run with sudo to see the magic dollar sign <dollar></code></p>
<p>But when I run with sudo I get output
<code>
I am running shell /bin/bash
run with sudo to see the magic dollar sign <$dollar>
</code></p>
<p>So without sudo, foo expands to "dollar", but with sudo, the $'' evaluation is ignored and it becomes "$dollar"</p>
<p>I also now understand that $'' not POSIX compliant, and so wouldn't necessarily work if running the script except under bash. And confirm that <code>sudo bash myscript.sh</code> returns the expect "dollar" output.</p>
<p>However, in any of these scenarious, $SHELL implies the script is running under bash. What is going on?</p>
<p>PS - my /bin/sh links to dash - I can only think it has something to do with this</p>
| 0non-cybersec
| Stackexchange |
Cool illusion. (x-post r/gifs). | 0non-cybersec
| Reddit |
Epitome of MildlyInfuriating [x-post from /r/unexpected]. | 0non-cybersec
| Reddit |
RIP Fellow Brother (Not Me). | 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 |
Lists... 0% error when installing netcat. <p>I get this when I try and install netcat:</p>
<pre><code>root@server:~# sudo apt-get install nc -y
root@server:~# lists... 0%
root@server:~#
</code></pre>
<p>Can anyone help?</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 |
TinyProxy Upstream IPv6 Configuration. <p>How can I configure the upstream of tinyproxy for an IPv6 address?</p>
<p>The following does not work. </p>
<pre><code>Upstream "[2001:xxxx:xxx:xx:xxx:xxxx:xxxx:380f]:8888"
</code></pre>
<p><strong>Update</strong></p>
<p>I get the following error: <code>Unable to parse config file. Not starting.</code></p>
| 0non-cybersec
| Stackexchange |
Deploying war file to Tomcat with a different path. <p>If I deploy a war file to Tomcat, called for example <strong><em>foo-bar-1.1.2.war</em></strong>, how can I deploy it so that it is extracted to <strong><em>webapps/bar</em></strong> and its URL root is <strong><em>/bar/...</em></strong>?</p>
<p>My intention here is to keep the war file in the webapps server with its version information so that I know which version is installed but have it overwrite a previous version of the app.</p>
<p>I could deploy the war file using <a href="http://code.google.com/p/psi-probe/" rel="noreferrer">PSI Probe</a>. This would allow me to specify a target context for the web app. However, it means that I would lose any version information in the war file name.</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 |
How to make linux to press a key everytime I write something. <p>As the title says, I want linux to autopress a key everytime I write something.</p>
<p>For example, whenever I type <code>_I</code> it should autopress <code>ctrl+j</code> ( if you're wondering why, it's for codeblocks :) )</p>
<p>I already tried AutoKey but didn't figure out how to do this with it ..</p>
<p>I saw now <code>xdotool</code> command that seems to do the right job, but it continuous keeps pressing <code>ctrl+j</code>, and I want only after I type <code>_I</code>.</p>
<p>I made this code:</p>
<pre><code>#/bin/bash
while true; do
xdotool key ctrl+j
sleep 0.1
done
</code></pre>
<p>Now I think it should be something like</p>
<pre><code>#/bin/bash
while true; do
if pressed '_I'; then
xdotool key ctrl+j
fi
sleep 0.1
done
</code></pre>
<p>But again, I don't know how to do that if.</p>
<p>Can somebody give me any suggestions please?</p>
<p>Thanks in advance!</p>
| 0non-cybersec
| Stackexchange |
Why some function definitions appears in italic font in qt creator?. <p>I am using qt creator to work on open source and I am not able to understand some functions name are in italic fonts while declared it in it's class, whereas all other function are in normal font in all other class while declaring. Can you please explain how this functions are different from other ?</p>
| 0non-cybersec
| Stackexchange |
Barkevious Mingo on move to Patriots: "It’s a huge culture shock ... I felt like the winning spirit was making its way into Cleveland with those new coaches, but it’s definitely been established here for a long time, and I’m excited to be a part of it.”. | 0non-cybersec
| Reddit |
blursed_summer vacations 2020 vs 2019. | 0non-cybersec
| Reddit |
When a thread to a link makes so many awesome puns. | 0non-cybersec
| Reddit |
The crawlers. I’ve never told this to anyone out of respect for my friend, Mike. It happened twenty years ago, but I think about it often. When I’m up late at night, my thoughts will drift away, and for a moment I’m a carefree kid with no worries and a wild imagination. As an adult, there are all sorts of rational answers to what transpired, but I’ve never quite latched onto one as *the answer*.
But even though there are a dozen possible answers to what happened to us as kids, it all started with a single question:
“Have you seen the crawlers?”
I was ten years old at the time, and no, I hadn’t seen the crawlers. I didn’t know what my friend Mike was talking about. He shoved his hands in his pockets and shifted his weight from foot to foot; he was talking faster than usual. Mike was certainly excited to tell me and our friend Tommy about the crawlers...whatever they were.
“They are creatures that only come out at night,” Mike insisted. “And they don’t come out all the time. If you see one, it will be slowly crawling through your yard. But only when it’s really dark out. They don’t want to be seen.”
It was a lazy summer afternoon, and we were just three kids wasting time on our bikes in a safe and relatively boring subdivision...nothing should have creeped me out at that moment. But the term *crawlers* immediately gave me a case of the willies - the good kind of willies.
The crawlers sounded creepy - and I loved *anything* creepy.
“There’s only three rules if you see a crawler,” Mike said. “Number one: don’t shine a light on a crawler. If you do, it will sneak into your house and kill you.”
I nodded and smiled. Tommy just rolled his eyes and shook his head. I looked down on Mike as he told his story, but not in the lack of respect sort of way - it was the literal sort of way. I was eight inches taller than Mike. The doctors said that Mike was in the first percentile for height or something like that - and he might only ever grow a few more inches in his entire life. Tommy’s parents once told us that Mike liked to make-up stories to compensate for the fact that he was done growing and was such a weakling - I found that kind of mean.
“Number two,” Mike continued, “if you go out to meet a crawler, you have to keep your eyes shut. Don’t look at it. If you do, it will kill you and take over your life. It will mimic you.”
He paused and thought about it for a second.
“But I’m not sure about that one,” Mike said. “I think that’s what I heard, but it might be different. I can’t remember the rule completely.”
I smiled wider - this was really great. Tommy looked increasingly irritated.
“But the best rule of all is number three,” Mike said. “If you go out in the middle of the night to meet a crawler and you keep your eyes shut, the crawler will reward you for being so brave. Say a wish out loud, and it will come true. That’s the power of the crawler.”
My mind immediately raced with the possibilities. I had never seen a crawler in my backyard, but I’d never looked that closely in the middle of the night before. Maybe there *was* something crawling through my yard when the moon was high and the world was asleep. My house did back up to a forest, and there were a bunch of trees and bushes in my yard; a crawler would probably be easy to miss. It could squirm across the property line from the forest and then disappear without me even realizing it.
“I gotta go,” Mike said, hopping on his bike. “Don’t tell anyone else about the crawlers. They don’t like it if too many people know about them. I could get in trouble for telling you.”
With that, Mike pedaled away on his bicycle, the black patented leather on his sneakers glistening in the sun as his bike pedals spun faster.
Tommy scoffed and rolled his eyes again. “I wish I was short, then maybe my parents would buy me hundred-dollar shoes to make me feel better.”
I ignored Tommy’s comment - my head was too preoccupied with the existence of crawlers.
“He’s so full of crap,” Tommy said. “He’s just playing a joke on you. Mike’s never said anything smart in his whole life - you know he’s in those special slow classes, right? There’s no such thing as crawlers. Don’t listen to him.”
But the thing was - I wanted to believe Mike. I wanted to believe in crawlers. So that night I stayed up way later than I should have, just waiting at my window. I sat there with the lights off, just sipping on soda and trying hard to stay awake, gazing into my large backyard and out into the forest. I shone a flashlight on a comic book as I flipped through the pages, trying to keep my mind from sliding into sleep. And then I saw it - a flicker of movement from the edge of the woods. I clicked off my flashlight and dropped to my knees, my eyes barely peeking above the windowsill.
I couldn’t believe it - it was a crawler.
I tried not to look directly at it, because I was nervous that’d be breaking the rules. I dropped down below the windowsill for a few seconds and then slowly rose, careful not to look too long. I carefully sneaked a look, but then my eyes dashed away - I didn’t hold my gaze for longer than two seconds at a time. I didn’t want to break one of Mike’s rules.
But the creature was there, dragging itself through my dewey yard near the edge of the forest. Pale skin. Skinny arms and legs. Very deliberate and stiff movements, like it was struggling to move...all the while drenched in darkness.
It was a crawler. At least, I think it was. It was impossibly dark outside. I thought I saw its head turn and I quickly dropped down again, worried it might see me.
This time I didn’t get back up. I slept on the floor until sunup.
The next day I told Tommy about what I saw, and he laughed at me and shook his head.
“You can’t be serious!” he said. “I can’t believe you’re falling for this. It’s just Mike playing a trick on you. I’ll get to the bottom of this before you look even stupider.”
I didn’t listen to Tommy - I wanted crawlers to be real.
The next night I was determined to see the crawler again. I snuck outside at midnight with a sleeping bag under my arm. I wanted that crawler to come back, and this time I wanted my wish. I unrolled my sleeping bag near the edge of the forest and climbed inside, shivering with a mix of fear and anticipation. No one would understand how I felt, I remember thinking; no one would be brave enough to do what I was doing. I was dying for something as fantastic as a crawler to actually exist - it’d be like my favorite kind of movie come to life.
Crickets chirped, and the occasional hoot of an owl echoed in the night. I laid in my sleeping bag under the stars for hours before I heard the noise - the rustling sound of body being dragged across grass and dirt.
I pinched my eyes shut and waited.
The rustling came increasingly closer and my eyes clamped shut even harder. The labored breath of whatever was inching closer grew louder. It must have been a few feet away when it stopped. And then I felt its hand gently rubbing my leg over the flannel sleeping bag. It stopped on my ankle and latched on tight; its fingers felt unnaturally long, like they had wrapped themselves twice around my skinny leg.
I wanted to look. I yearned to see this horrible creature before me, yet my eyes did not betray me. They stayed closed, even as the breathing of the crawler turned into a low growl. It was growing impatient.
But then it dawned on me - I hadn’t thought of my wish. In that moment my mind blanked, and the grip on my leg tightened. I blurted out the first thing that popped into my head.
“A dog,” I sputtered. “I’ve always wanted a dog. I wish for a dog.”
The creature grunted and released the grip. My eyes burned with pain from the force of squeezing them shut. I listened closely as the rustling of the crawler’s body slowly led into the forest, and the sounds vanished into the night. I jumped up, grabbed my sleeping bag, and high-tailed it inside.
The following morning I was eating breakfast with my family when we heard a low whimper and scratching coming from the front door. It whined some more, and then it barked.
I almost choked on my cereal.
We opened the front door, and there sat an emaciated, black labrador. There was no collar, no form of identification. It dropped its head and looked at us with droopy eyes. Everyone immediately fell in love.
“Can we keep it!” my little sister cried. “Oh, daddy please, can we keep it!”
My dad smiled. “We’ll have to see whose dog this is, but if we can’t find the owners, then I think we can keep it.”
I knew at that moment that we’d never find the owners. That dog would be ours.
I finished breakfast and rode my bike like the wind to Tommy’s house. I told him everything, but he was very disbelieving. He had that smug look on his face like he was just humoring me.
“I hate to break it to you,” Tommy said, “but that was Mike outside your house last night. I got the whole scoop from his older sister. Their parents have been fighting a lot - yelling, throwing things, the whole deal. When Mike gets upset he goes outside and crawls around the backyard. I guess he doesn’t want to be around them, but he still wants to hear what they’re saying to each other. So he’ll crawl around the yard, get close to different windows and listen. His parents don’t know that he does it.
“And sometimes,” Tommy continued, “Mike will crawl around the yard even when his parents aren’t fighting. That’s what his sister says. Pretty weird.”
My heart broke that moment for Mike. That sounded awful - I couldn’t imagine my parents fighting like that. Yet something still wasn’t sitting right.
“What about the dog?” I asked. “How do you explain the dog? My wish came true.”
Tommy shrugged his shoulders. “Maybe it’s a coincidence. Or maybe Mike found a dog and brought it your house as part of the joke. But Mike is the crawler. He has to be.”
Tommy made a good point - it made perfect sense that Mike was the crawler. I was ready to drop the entire situation, but I still wasn’t entirely convinced.
I needed to find out for sure.
That night I waited again. I lay in my sleeping bag near the forest’s edge, hypnotized by the soundtrack of the night when the familiar rustling returned. I pinched my eyes shut again, ready to make another wish. This one would prove if the crawler was real or not.
The crawler lurched on the ground towards me, and soon it was at my feet, gripping me with both hands this time. It pulled itself on top of me, dragging its body across mine. It breathed heavy and hard; every movement it made was a colossal struggle. It’s face was now inches from mine, and I felt its cold breath on my nose as it inhaled and exhaled - but my eyes remained shut. Its hands rubbed up and down on my face, like a blind man searching another face for recognition.
There was no blurting out from me on this night - I knew exactly what I’d be wishing for.
“I wish for my friend Mike’s parents to stop fighting,” I said. “I wish for them to not yell at each other any more.”
The creature gasped and rolled off of me. I felt it lying next to me, its breath quickened and was intermixed with light sniffling.
“I know it’s you, Mike,” I said. “And I do wish for your parents to stop fighting. You don’t need to crawl around and spy on people anymore.”
I didn’t look, but I felt the crawler roll up into a ball and cradle itself. I lay still, eyes always closed.
I’m not sure how long we laid like that in the summer night, and eventually, even though I was paralyzed with a mix of sadness, apprehension and utter terror, I fell asleep. I awoke to the sun rising.
The crawler was gone.
Three days later, Mike announced to us that his parents were getting divorced. They were sick of the fighting; they were tired of the screaming matches. They brought out the worst in each other, and it was time for them to split up.
As Mike told us the story, he gave me a knowing look. A moment passed between us - a moment of recognition. Mike knew that I was aware of his parents’ problems, and I gave him a reassuring glance and a tiny smile. Mike wouldn’t be crawling around his yard anymore. His parents’ fighting would finally be over.
My wish had come true.
None of us talked about the crawlers again - we were kids, and we moved on to other things. And talking about the crawlers just felt wrong - I didn’t want to dredge up Mike’s unhappy memories about his parents’ fighting and divorce. That would be cruel.
So I just let it go.
But three years later, the crawler came back into my life one last time, if only for an evening. I was thirteen, and I was up late watching a movie at my house with Mike - he was asleep on the couch, and I went to the kitchen for a glass of water. I mindlessly gazed out the window and spotted something plodding on the ground near the edge of the forest.
It couldn’t be.
I quickly turned away, hesitant to look directly at it. I thought hard about the rules of the crawler, but my mind was blank. What were they again?
One popped into my head:
*Don’t shine a light on a crawler.*
I switched off the kitchen light, and I made sure the backyard light was off. Our black lab sidled up to me, nosing at my leg. I reached down and scratched its head, and my dog moaned in appreciation.
What was another rule? It had been so long...my head strained, and Mike's words came back to me:
*If you go out in the middle of the night to meet a crawler, keep your eyes shut. The crawler will reward you for being so brave. Say a wish out loud, and it will come true.*
I wasn’t going out there this time; I didn’t have any more wishes at the moment. My main wish had come true, and Mike was much happier once the shouting in his house had stopped. He had even shot up seven inches in the past few years - he was no longer the shortest kid in our class.
I glanced down at my dog, then back outside. I squinted hard, and I tried to make out the creature in the distance. I looked over at the couch, and Mike was still sleeping peacefully.
But what was the third rule? I just couldn't recall.
The crawler dragged itself methodically around the back of my yard. If the rules were true, I knew I shouldn’t look closely at it. But I couldn’t help myself. The crawler was as I remembered it - skinny and disjointed. A shimmer from the moon caught my reflection - it was the shoes. Those expensive shoes with the patented, shiny leather. They gleamed and glistened.
I squinted harder, and the creature crawled directly into the moonlight. We made eye contact, and we held it for several seconds.
The creature that stared back at me was Mike.
I dropped down to the kitchen floor, and I breathed in and out slowly. That crawler in my yard - it looked familiar, but it wasn’t the Mike sleeping on my couch. It reminded me of ten-year-old Mike - skinny, short and weak Mike. He was even wearing Mike’s special and expensive shoes; he was the only kid in school that ever had them.
But Mike outgrew them two years ago when he defied the doctor’s predictions and started growing like crazy. Mike tossed that pair of shoes in the garbage. They didn’t fit, he’d said. They made his feet hurt.
Something wasn’t right. My head was spinning - what was the third rule? What did Mike say to me three years ago when we were only ten? I scanned my brain and fumbled through memories, and then it bubbled to the surface.
*If you go out to meet a crawler, you have to keep your eyes shut. Don’t look at it. If you do, it will kill you and take over your life. It will mimic you.*
I rose and peeked out the window - the patented leather flickered once more at the edge of my lawn, and little Mike carefully slithered along the forest’s edge. And at that moment, I was convinced that crawlers were real, and maybe Mike had just screwed up the rules. He said three years ago that he wasn’t sure about the mimic rule, didn’t he? Perhaps Mike had gotten the details wrong.
Maybe the crawler doesn't just kill you and then assume your life.
Maybe it leaves you *alive*, makes a copy of you and assumes your life.
And then maybe *you* become the crawler.
I looked out that kitchen window again, and I saw nothing. There was no movement, no plodding creature squirming near the forest. The crawler was gone.
I returned to the living room, settled back into the recliner and gazed at my friend. He slept peacefully, softly snoring.
I shook my head, laughing at my foolishness. Maybe the ten-year-old me believed in the fantastic; the thirteen-year-old me didn’t believe there were now two Mikes - one dozing on my couch and another living in some weird crawler limbo. That type of awesome creepiness just wasn’t possible.
There must have been a rational answer.
But at that moment I knew I would never mention it to anyone. The crawlers were just too sensitive of a subject.
I would never say a word.
I would never ask Mike to wade into his pool of hurtful memories. Because the Mike I remain friends with to this very day has too much going for him - by his senior year of high school, my friend Mike was the tallest kid in the class and the best athlete in the school. That Mike graduated college with a physics degree, high honors and a perfect girlfriend who later became his wife. The Mike I know has a mother that got remarried to a great guy, and I couldn’t be happier for that Mike and his family.
But my mind always returns to the crawlers. And that’s why I still gaze out my window in the middle of the night, looking for the glimmer of those old shoes from twenty years ago - looking for a ten-year old lost in time. I sometimes wonder if my old friend Mike became a crawler. Poor, weak, ten-year-old Mike with the arguing parents, expensive shoes and fantastic tales.
I know it’s stupid, but I do it anyway. And when I do, I feel like an awful person. I feel like I’m admitting that the real Mike would have never amounted to anything. That the real Mike would have remained short and weak for the rest of his life. That the real Mike is now just a lost, helpless creature. I don’t want to think these things.
But I can’t stop myself.
And every time I do it, I think about Mike’s rules for the crawlers. I remember clearly those three rules he told me and Tommy on that lazy summer afternoon all those years ago.
Maybe Mike did get them wrong.
[→](https://www.facebook.com/chancepatrick.redgrin)
| 0non-cybersec
| Reddit |
I lost my phone a few months ago, and this person just took a picture with it that got synced to my Google+. If anyone knows him let me know so I can contact him and get my phone back!. | 0non-cybersec
| Reddit |
addThis smart api layer add a link. <p>I would like to add a new button with a link to a custom url on the addThis slideBar generated by using addThis Smart Layer Api (you can have a look at the documentation <a href="http://support.addthis.com/customer/portal/articles/1200473-smart-layers-api">here</a>)</p>
<p>I would like to add a custom service that is just a link to a precise page.
Is it possible?</p>
<p><a href="http://jsfiddle.net/corinnekm/p6vgcbnt/">Here</a> is the sample of the code I use to generate the side bar.</p>
<pre><code>addthis.layers({
'theme': 'transparent',
'share': {
'position': 'left',
'services': 'facebook,twitter,google_plusone_share,pinterest_share,print,more'
}
});
</code></pre>
| 0non-cybersec
| Stackexchange |
JabRef and Months. <p>Anyone that knows why JabRef nowadays seem to use number format for months rather than <code>jan</code>, <code>feb</code>, etc?</p>
| 0non-cybersec
| Stackexchange |
Netherland player rolling on the grass laughing (ROGL) . | 0non-cybersec
| Reddit |
NSAttributed string in multiple lines in a UILabel. <p>I have a <code>UILabel</code> inside a cell which contains several elements. I need the label to have attributed string which can fill the label's height, i.e. go into multiple lines if neccessary. I managed to achieve this and if I run the App on iOS7 it appears to be just fine(disregard the yellowish background color):
<img src="https://i.stack.imgur.com/ESMqM.png" alt="enter image description here"></p>
<p>Here is the setup of the UILabel:</p>
<pre><code>NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@", sender, content]];
NSRange selectedRange = NSMakeRange(0, sender.length); // 4 characters, starting at index 22
[string beginEditing];
[string addAttribute:NSFontAttributeName
value:[AppereanceConfiguration fontMediumWithSize:18]
range:selectedRange];
[string endEditing];
self.notificationText.attributedText = string;
</code></pre>
<p>where self.notificationText is the UILabel that I'm talking about. In the xib file for the cell I've set the minimum font size to 3 and the number of lines to 0. As I said before, it works perfectly on iOS 7, but on iOS 6 for some reason it doesn't know how to do the word wrapping on it's own and it tries to "Truncate Tail" as this is the line break mode that has been set by default in the xib, resulting in a cell looking like this:
<img src="https://i.stack.imgur.com/FUZ3f.png" alt="enter image description here"></p>
<p>If I change the line break mode to Word Wrapping it crashes the app on iOS 6 saying that:</p>
<pre><code>NSAttributedString invalid for autoresizing, it must have a single spanning paragraph style (or none) with a non-wrapping lineBreakMode.
</code></pre>
<p>How do I get this to work on iOS 6?</p>
| 0non-cybersec
| Stackexchange |
Full American Breakfast. | 0non-cybersec
| Reddit |
Scariest song I know, from 2001 A Space Odyssey. | 0non-cybersec
| Reddit |
Got Some New Equipment for My Shop Over the Weekend. For almost 40 years my grandfather has built everything from furniture, to boxes, and turned bowls in an old hog house turned wood shop on his farm. The majority of the wood he used came from walnut, oak, maple, cherry, hickory, and every other kind of tree he managed to find on that farm. Long story short, after 40 years of zero dust collection causing severe COPD, combined with his old age, he decided his woodworking days at the farm are now behind him. I went with him on saturday and he insisted that I take as much equipment to my house as I could possibly fit in the truck. I am beyond blessed to have received all of the stuff he wanted me to have, so i figured I'd come share it with you guys. Tell me what you think!
(http://imgur.com/a/ynjf9) | 0non-cybersec
| Reddit |
Java Convert Generic LinkedList to Generic Array. <p>So for starters lets say that I have a <code>LinkedList<String></code>, </p>
<p>I can easily convert it to an array via <code>toArray()</code>. i.e.</p>
<pre><code>LinkedList<String> strList = new LinkedList<String>();
String[] strArray = strList.toArray(new String[0]);
</code></pre>
<p>But Lets say I have a <code>LinkedList<T></code>
Then I the following code:</p>
<pre><code>LinkedList<T> tList = new LinkedList<T>();
T[] strArray = tList.toArray(new T[0]);
</code></pre>
<p>I get the <b>Cannot create a generic array of T</b> error message. </p>
<p>How can I get around this? </p>
<p>Specifically in my class I have <code>LinkedList<AbstractNode<T>> nodes</code>, and I am trying to implement a getAll() method that returns all the nodes as an Array.<br/>
Thanks!</p>
<p><b>Note</b> Péter Török's answer provides the correct answer to my problem, but for me simply returning an ArrayList instead of [] as Bar mentioned, ended up smoothing my code out a lot.
<br/><b>Note2</b> after looking at my code a bit more i'm not even sure if any conversion was necessary to begin with, LinkedList was fine for what I was trying to do... :-/</p>
| 0non-cybersec
| Stackexchange |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.