text
stringlengths 36
35k
| label
class label 2
classes | source
stringclasses 3
values | tokens_length
int64 128
4.1k
| text_length
int64 36
35k
|
---|---|---|---|---|
runas when you already are administrator. <p>Something escapes me when trying to use runas to elevage privilege. Simple Win10 machine with single user who already has admin rights. I need to write in a specific registry key via script, but I get "access denied" when I try with the reg command directly.</p>
<pre><code>> reg ...
ERROR: Access is denied.
</code></pre>
<p>If I try:</p>
<pre><code>> runas /user:Administrator Command
Enter the password for Administrator:
1326: The user name or password is incorrect.
</code></pre>
<p>It refuses my user password. I don't think there's a specific administrator password on a local machine, right ? There's no other account.
Trying:</p>
<pre><code>> runas /user:MyUser Command
Enter the password for MyUser:
740: The requested operation requires elevation
</code></pre>
<p>So how do I elevate privileges from the command line ?!?
Why can't I see that I have admin rights here:</p>
<pre><code>>runas /showtrustlevels
The following trust levels are available on your system:
0x20000 (Basic User)
</code></pre>
<p>EDIT:
Maybe I should be more clear about what I want to do. From a C program I want to make a change to WT_KEY_HKLM, "Software\Microsoft\Windows\CurrentVersion\Run". I could do this directly in XP, but in more recent versions of Windows, it has no effect. And indeed, running "reg" on this key from the command line gives access denied. I don't want to run my program with elevated privileges, so muy idea was to do something like system("runas reg ...") where it would ask for the password and make the registry change. But I can't even get the command to work from the command line. Maybe someone can suggest the proper way to do that ?</p>
| 0non-cybersec
| Stackexchange | 460 | 1,721 |
This Week on PlayStation 4 - North America (Week 169: 2017.01.31). *****
####GAMES
Title|Price
:-|-:
[Adventure Pop](https://store.playstation.com/#!/en-us/games/adventure-pop/cid=UP4040-CUSA05985_00-ADVENTUREPOPGAME)|Free
[Dexed](https://store.playstation.com/#!/en-us/games/dexed/cid=UP3064-CUSA06891_00-DEXED2016NT001EN)|$9.99
[Digimon World: Next Order](https://store.playstation.com/#!/en-us/games/digimon-world-next-order/cid=UP0700-CUSA05469_00-DIGIMONWORLDNE0A)|$59.99
[Divide](https://store.playstation.com/#!/en-us/games/divide/cid=UP0880-CUSA03088_00-ETSTUDIOS1DIVIDE)|$24.99
[Double Dragon IV](https://store.playstation.com/#!/en-us/games/double-dragon-iv/cid=UP0036-CUSA07236_00-DD4MASTERNA00000) (Out 01.30)|$6.99
[Dynasty Warriors: Godseekers](https://store.playstation.com/#!/en-us/games/dynasty-warriors-godseekers-with-bonus/cid=UP4108-CUSA06586_00-DWGODSEEKERSWB00)|$59.99
[Kill the Bad Guy](https://store.playstation.com/#!/en-us/games/kill-the-bad-guy/cid=UP1309-CUSA05109_00-KILLTHEBADGUYEXK)|$6.99
[Knee Deep](https://store.playstation.com/#!/en-us/games/knee-deep/cid=UP4459-CUSA06056_00-KNEEDEEPGAMEPS40)|$14.99
[Linelight](https://store.playstation.com/#!/en-us/games/linelight/cid=UP2401-CUSA07216_00-LINELIGHTPS40000)|$9.99
[Naruto Shippuden: Ultimate Ninja Storm 4](https://store.playstation.com/#!/en-us/games/naruto-shippuden-ultimate-ninja-storm-4-road-to-boruto/cid=UP0700-CUSA06381_00-NARUTOUNS4RTB000) (Out 02.03)|$59.99
*****
####BUNDLES
Title|Price
:-|-:
[Eagle Flight & Werewolves Within PSVR Bundle](https://store.playstation.com/#!/en-us/games/eagle-flight-werewolves-within-psvr-bundle/cid=UP0001-CUSA04900_00-EAGLEWEREWOLVES1)|$54.99
[Hand of Fate: Deluxe Edition](https://store.playstation.com/#!/en-us/games/hand-of-fate-deluxe-edition/cid=UP2182-CUSA01503_00-HOFDELUXEEDITION)|$21.99
[Letter Quest/Three Foruths Home/Paranautical Activity Bundle](https://store.playstation.com/#!/en-us/games/letter-quest-three-fourths-home-paranautical-activity-bundle/cid=UP2187-CUSA03867_00-LQRPATFHBUNDLE00)|$19.99
[Madden NFL 17: Super Bowl Edition](https://store.playstation.com/#!/en-us/games/madden-nfl-17-super-bowl-edition/cid=UP0006-CUSA02095_00-SUPERBOWLBUNDLE1)|$59.99
[Table Top Racing: Swag Bag](https://store.playstation.com/#!/en-us/games/table-top-racing-swag-bag/cid=UP2336-CUSA04838_00-VALUEBUNDLE00001)|$18.99
*****
####DLC
Call of Duty: Infinite Warfare
* Sabotage | $14.99
Dynasty Warriors: Godseekers
* Lixia Yukata Costume | $0.99
Hitman
* Bonus Episode | $9.99
Minecraft: PlayStation 4 Edition
* Villains Skin Pack | $1.99
Resident Evil VII: Biohazard
* Banned Footge Vol. 1 | $9.99
Rocksmith 2014 Edition
* Evanescence - Everybody's Fool | $2.99
* Evanescence - Going Under | $2.99
* Evanescence - My Immortal | $2.99
Tales of Berseria
* Adventure Item Pack 2 | Free
* Attachment Set | $7.99
* Catalog 2 | Free
* Summer Holiday Costume Pack | $11.99
Tom Clancy's Rainbow Six Siege
* Pulse Bushido Set | $7.99
World of Tanks
* British Bulldog Churchill VII Loaded | $34.99
* British Bulldog Chruchill VII Ultimate | $37.99
Zen Pinball 2
* Star Wars Pinball: Rogue One | $3.99
*****
####DEMOS
* [Bound](https://store.playstation.com/#!/en-us/games/bound-demo/cid=UP9000-CUSA07114_00-BOUNDVRDEMO00001)
*****
**[](#ps+) PS+ OFFERINGS** (exp. Feb 07)
* [Azkend 2: The World Beneath](https://store.playstation.com/#!/en-us/games/azkend-2-the-world-beneath/cid=UP4403-CUSA04407_00-AZKEND2000000000)
* [Day of the Tentacle Remastered](https://store.playstation.com/#!/en-us/games/day-of-the-tentacle-remastered/cid=UP2154-CUSA01991_00-DAYOFTHETENTACLE)
* [The Swindle](https://store.playstation.com/#!/en-us/games/the-swindle/cid=UP4395-CUSA02329_00-THESWINDLEUSAPS4)
* [Titan Souls](https://store.playstation.com/#!/en-us/games/titan-souls/cid=UP3643-CUSA01598_00-DEVOTITANSOULS01)
* [This War of Mine: The Little Ones](https://store.playstation.com/#!/en-us/games/this-war-of-mine-the-little-ones/cid=UP2047-CUSA02696_00-THISWAROFMINEG01)
*****
Last week's update: [2016.01.24](https://www.reddit.com/r/PS4/comments/5q05hl/this_week_on_playstation_4_north_america_week_168/)
| 0non-cybersec
| Reddit | 1,777 | 4,244 |
Do pool operators usually set block version numbers before their clients hash?. <p>I know that pool operators have the power to modify the actual transactions in a block. I also know that pool operators can decide on block transaction orderings and even commit double spends pretty easily. I know that pool operators send the merkle root hash of this block to miners. The miner then provides the nonce, which is the hard work of mining.</p>
<p>But, there's another part to mining, which is the block version number. Do most pool operators set this, for e.g. voting, and which bits are able to be set for votes? </p>
| 0non-cybersec
| Stackexchange | 145 | 619 |
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 | 349 | 1,234 |
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 | 349 | 1,234 |
Custom title page for thesis with new fields (institute, supervisor). <p>Sorry, this has probably been tried more than once, but I ended up with the following broken code below.</p>
<p>Briefly, I attempted to: </p>
<ol>
<li>define a <code>\institute</code> and <code>\supervisor</code> command;</li>
<li>redefine the <code>\maketitle</code> command (taking into account the provided institute/supervisor).</li>
</ol>
<pre><code>\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{wallpaper} % background figure on title page
% copied from Pandoc default template
\providecommand{\institute}[1]{}
\makeatletter
% copied from https://tex.stackexchange.com/a/196650/95423
\newcommand{\@supervisor}{}
\newcommand{\supervisor}[1]{\renewcommand{\@supervisor}{#1}}
\makeatother
\title{The Limits of Individual Plasticity}
\author{Edward \textsc{Prendick}}
\institute{Island of Doctor Moreau}
\supervisor{Dr. \textsc{Moreau}}
\date{1896}
\makeatletter
\def\maketitle{%
\begin{titlepage}%
\begin{center}%
\ThisULCornerWallPaper{0.2}{logo-univ}\par
\vspace*{2.5cm}
\huge\@title
\vspace{1.5cm}
\Large\@author
\vspace{1.5cm}
\normalsize
A thesis for the degree of PhD
\vfill
\normalsize
Supervised by:\\
\@supervisor\\
\vspace{0.8cm}
%\includegraphics[width=0.4\textwidth]{logo/logo-lab}
\normalsize
\@institute
\@date
\end{center}%
\end{titlepage}%
}
\makeatother
\begin{document}
\maketitle
\end{document}
</code></pre>
<p>Would anyone tell me why it fails with:</p>
<pre><code>! Undefined control sequence.
\maketitle ...} \par \par \normalsize \@institute
\par \@date \par \end {cen...
l.58 \maketitle
?
</code></pre>
| 0non-cybersec
| Stackexchange | 625 | 1,807 |
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 | 349 | 1,234 |
Testing the Observer complete event with Jest?. <p>The RxJS <code>Observer</code> fires the events:</p>
<ul>
<li><code>complete</code></li>
<li><code>error</code></li>
<li><code>next</code></li>
</ul>
<p>If we want to test for the complete event with Jest. How is this done?</p>
<p>For example we can test the <code>next</code> and <code>error</code> events, because those functions pass data:</p>
<pre><code>o.subscribe(result => {
expect(result.data.length).toEqual(1);
},
(e)=>{expect(e).toBeFalsy()},
()=>{ WHAT TO EXPECT HERE? }
</code></pre>
<p>The <code>complete</code> event does not. The function signature is <code>()=>void</code>. How do we test that function signature?</p>
<p>Also the line <code>(e)=>{expect(e).toBeFalsy()}</code> because it never actually fires. Is there a way to check that a callback does not run?</p>
| 0non-cybersec
| Stackexchange | 306 | 865 |
Installing Arch Linux Error: grub-install: error: cannot find EFI directory. <p>I'm trying to install Arch Linux on my machine, following <a href="https://youtu.be/HpskN_jKyhc" rel="nofollow noreferrer">these</a> instructions.</p>
<pre><code>timedatectl set-ntp true
timedatectl status
cfdisk
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
swapon /dev/sda3
mount /dev/sda2 /mnt
pacstrap /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/myRegion/myCity /etc/localtime
hwclock --systohc
locale-gen
nano/etc/locale.conf
LANG=en_US.UTF-8
nano /etc/hostname
myhostname
nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
passwd
useradd -m newusername
passwd newusername
usermod -aG wheel,audio,video,optical,storage newusername
pacman -S vim
visudo
pacman -S grub
grub-install /dev/sda
</code></pre>
<p>At <code>cfdisk</code>, I configured my partitions as follows:</p>
<pre><code>sda1: EFI system partition
sda2: Linux x86-64 root
sda3: Linux swap
</code></pre>
<p>At the mounting steps, I did the following: </p>
<pre><code>mkfs.ext4 /dev/sda1
mkswap /dev/sda3
swapon /dev/sda3
mount /dev/sda2 /mnt
</code></pre>
<p>The rest is mostly the same, just with my own info.</p>
<p>I'm currently stuck here:</p>
<pre><code>/# grub-install /dev/sda
grub-install: error: cannot find EFI directory
</code></pre>
<p>I've checked out a few similar post with this problem but it hasn't helped me progress.</p>
<p>How should I fix this problem? </p>
| 0non-cybersec
| Stackexchange | 602 | 1,553 |
Setting the alpha value for a ConstraintLayout group. <p>I want to ask is it possible to change the alpha for a constraint group?</p>
<pre><code><android.support.constraint.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="statusTv, statusDropDownIv"
android:id="@+id/buttonGroup"
android:visibility="visible"
android:alpha="0" />
</code></pre>
<p>Right now the <code>visibility</code> tag has effect if I set it to visible/gone but the <code>alpha</code> tag seems to not work.</p>
| 0non-cybersec
| Stackexchange | 177 | 575 |
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 | 349 | 1,234 |
PSA: If you reinstall a new mac, here is a tool that install all the apps for you. Some of you may know Ninite.com a service that changed my life as I'm a tech guy and need to often reinstall some systems (PC). Here is the equivalent for Mac: http://www.getmacapps.com/
You just need to select the apps you want to be installed, copy past a command in terminal, and let the magic do the rest!
EDIT: Thanks to /u/noxorm here is an other one that has way more apps: http://macapps.link/ | 0non-cybersec
| Reddit | 133 | 487 |
Trying to Create an AFM relationship by using GPFS protocol. Having error in cache side cluster. <p>I am trying to create an <code>AFM</code> relationship by using <code>GPFS</code> protocol. Having error in cache side cluster.</p>
<p>Steps of Home cluster :</p>
<p>1) Create a home cluster (cluster name - gpfs01).</p>
<p>2) Create a file system at the home cluster (filesystem name - gpfs01).</p>
<p>3) Enable remote access to the file system .</p>
<p>4) To configure the exported path at the home cluster for <code>AFM</code>.</p>
<p>Steps of Cache cluster :</p>
<p>1) Create a cache cluster (cluster name - gpfs02)</p>
<p>1) <code>mmchnode --gateway -N Node1</code></p>
<p>2) <code>mmstartup -a</code></p>
<p>3) <code>mmmount Device -a</code></p>
<p>4) Mount the home filesystem on the cache cluster remotely.</p>
<p>5) When i am created <code>AFM</code> fileset and link it but still getting this error. </p>
<pre><code> [root@gpfs02 ~]# mmcrfileset gpfs02 singleWriter1 -p
afmtarget=gpfs:///gpfs/storage/ -p afmmode=sw --inode-space new
mmcrfileset: File system gpfs02 belongs to cluster gpfs01.
Command is not allowed for remote file systems.
mmcrfileset: Command failed. Examine previous error messages to
determine
cause.
[root@gpfs02 ~]# mmcrfileset gpfs01 afm2 -p
afmtarget=gpfs:///gpfs/storage/ -p afmmode=sw --inode-space new
mmcrfileset: [E] Invalid option specified: gpfs:///gpfs/storage/.
The AFM target must be on a separate filesystem.
mmcrfileset: Command failed. Examine previous error messages to
determine cause.
</code></pre>
| 0non-cybersec
| Stackexchange | 537 | 1,589 |
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 | 349 | 1,234 |
Small inheritance. I am about to inherit about $40,000. I coincidentally have about $40,000 in student loan debt.
Wondering if I should put this $ into a brokerage account and continue to make payments on my student loans, or if I should pay off the loans in one fell swoop. Or, put half toward the principal of my loan and invest the rest.
I am a public servant, which means I qualify for loan forgiveness after 120 months of loan payments. I believe that my 120 payments will be completed in about 5 years, of which I'll have to apply for forgiveness and (fingers crossed) be approved. I am not certain that I want to be in my current career for the next 5 years, but if it makes a huge difference to my financial situation, I'll figure out a way to remain a public servant.
For some context, I am 30, make only $40,000/year, have no other debt, $5,000 in savings, do not own a home, contribute to a retirement account and a Roth, but generally feel way behind in securing retirement. I would love to purchase a home someday, but know I need stronger investments and/or a higher paying job before this becomes possible. | 0non-cybersec
| Reddit | 264 | 1,126 |
Embedding 2-complexes null homotopically into 2-complexes. <p>Whitehead's conjecture states that if <span class="math-container">$L$</span> is an aspherical 2-complex and <span class="math-container">$K$</span> is a subcomplex of <span class="math-container">$L$</span>, then <span class="math-container">$K$</span> is also aspherical. It is known by work of Howie and Luft that if the Whitehead conjecture is false, then there is a counterexample where <span class="math-container">$L$</span> is constructed as the limit of a series of nested spaces <span class="math-container">$K= K_0 \subset K_1 \subset K_2 \subset \cdots$</span> where the inclusion of <span class="math-container">$K_i$</span> in <span class="math-container">$K_{i+1}$</span> is nullhomotopic and each <span class="math-container">$K_i$</span> is not aspherical (or should I just say spherical?). </p>
<p>I do not think about 2-complexes very often so I apologize if this is too basic, but I can't picture any examples of such inclusions of 2-complexes <span class="math-container">$A \subset B$</span> where the inclusion is null homotopic and <span class="math-container">$\pi_2(A) \neq 0$</span>. What are some examples of this? Ideally, I would like for <span class="math-container">$A$</span> and <span class="math-container">$B$</span> to both be finite. Any example will probably have <span class="math-container">$\pi_2(B) \neq 0$</span>, since otherwise you solve Whitehead. </p>
<p>Given a 2-complex <span class="math-container">$A$</span>, can we always find another 2-complex <span class="math-container">$B$</span> containing <span class="math-container">$A$</span> as a subcomplex so that <span class="math-container">$A$</span> is nullhomotopic in <span class="math-container">$B$</span>? If you could, then this would yield a solution to the Whitehead conjecture, since you could just do that over and over again, and the resulting limit space would be aspherical by compactness. So there are presumably obstructions, does anyone know some? </p>
<p>Edit: Whoops - In light of Mike's observation I should assume that <span class="math-container">$H_2(A) = 0$</span>. For the setup of the Whitehead conjecture, we have <span class="math-container">$H_2(K) = 0$</span>, so I definitely should have included that initially - sorry. </p>
| 0non-cybersec
| Stackexchange | 693 | 2,336 |
ThreadPoolExecutor: how to limit the queue maxsize?. <p>I am using ThreadPoolExecutor class from the concurrent.futures package</p>
<pre><code>def some_func(arg):
# does some heavy lifting
# outputs some results
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=1) as executor:
for arg in range(10000000):
future = executor.submit(some_func, arg)
</code></pre>
<p>but I need to limit the queue size somehow, as I don't want millions of futures to be created at once, is there a simple way to do it or should I stick to queue.Queue and threading package to accomplish this?</p>
| 0non-cybersec
| Stackexchange | 179 | 637 |
Getting Microsoft Security Essentials to alert me when a threat has been found. <p>Is there a way of getting Microsoft Security Essentials to alert me when a threat has been found?</p>
<p>I recently went through the log tab of Windows Defender and found a number of threats in the quarantine, but I have no idea how they got there. For future events, I would like to find out if and when I enter a hostile web page by having Microsoft Security EssentialsMicrosoft Security Essentials (or some 3rd party) notify me.</p>
<p>Is this possible? Perhaps some kind of tool that would monitor the Events log?</p>
| 0non-cybersec
| Stackexchange | 145 | 607 |
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 | 349 | 1,234 |
How can I place a table (including caption) across two columns of a \twocolum document?. <p>I have inserted a table in a two column document. The table should span across both columns without a page break. Ideally, the table should be fixed at the top of a page with two columns of text below. I almost got what I wanted using <code>\FloatBarrier</code>. The table now ignores the columns and spans across the whole page breadth. However, this didn't work for the caption below, which is fit into the left column. I also noticed that in Overleaf the text gets printed over the table and the table is still fixed to a column (when it gets positioned on a right side column, it stretches over the borders of the page).
Is there a way to get the result I want (see picture)<a href="https://i.stack.imgur.com/XM6u8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XM6u8.jpg" alt="enter image description here"></a>?</p>
<pre><code>\documentclass[12pt,a4paper,twoside]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[left={2.5cm},right={2.5cm},top={2cm},bottom={2.5cm}]{geometry}
\usepackage{multirow}
\usepackage{tabularx,booktabs}
\usepackage{placeins}
\usepackage{calc}
\usepackage{float}
\usepackage{lipsum}
\begin{document}
\twocolumn
\lipsum[3-5]
\FloatBarrier
\begin{table}[!tbh]
\centering
\begin{tabularx}{\textwidth}{lllll}
%\toprule
\textbf{step} & \textbf{extractant} & \textbf{target phase} & \parbox{3cm}{\bfseries possible mechanism} & \textbf{reference} \\
\addlinespace[0.2cm]
\parbox[t][][t]{\widthof{digestion}}{PO\(_4\)} & \parbox[t][][t]{\widthof{1\,M NaH2PO4}}{1\,M NaH2PO4, pH\,5, 16\,h, 24\,h + water wash} & \parbox[t][][t]{\widthof{As coprecipitated}}{adsorbed As} & \parbox[t][][t]{3.2cm}{anion exchange of PO4 for AsO4 and AsO3} & \parbox[t][][t]{3.3cm}{\cite{welchFactorsControllingShallow1998}; modified by \cite{keonValidationArsenicSequential2001}}\\
\addlinespace[0.2cm]
\parbox[t][][t]{\widthof{digestion}}{HCl} & \parbox[t][][t]{\widthof{1\,M NaH2PO4}}{1\,N HCl, 2\(*\)\,1\,h + water wash} & \parbox[t][][t]{\widthof{As coprecipitated}}{As coprecipitated with Mn oxides and amorphous Fe oxides} & \multirow{3}{3.2cm}{proton dissolution; Fe-Cl complexation} & \parbox[t][][t]{3.3cm}{\cite{huerta-diazPyritizationTraceMetals1992}; \cite{cornwellCharacterizationIronSulfide1987}; \cite{wallmannNewProcedureDetermining1993}; \cite{canfieldSulfateReductionDiagenesis1988}} \\
\addlinespace[0.2cm]
\parbox[t][][t]{\widthof{digestion}}{Microwave digestion} & \parbox[t][][t]{\widthof{1\,M NaH2PO4}}{xxx} & \parbox[t][][t]{\widthof{As coprecipitated}}{xxx} & \parbox[t][][t]{3.2cm}{xxx} & \parbox[t][][t]{3.3cm}{cite{various}} \\
\bottomrule
\end{tabularx}
\caption[Single Extraction: Steps]{Single Extraction Procedure; table from \cite{keonValidationArsenicSequential2001} (modified)}
\label{extraction_steps}
\end{table}
\lipsum[6-8]
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange | 1,073 | 2,995 |
Are there any other movies like 'From Dusk Till Dawn' that did a complete 180 on the plot half way into the movie?. I am not sure if the trailer at the time acknowledge the whole vampire element of the film, but when I first saw that movie I was completely unprepared when the shit hits the fan in the titty twister!
Are there any other movies that pull something similar like this off? Also, what did you think about the vampire twist in FDTD? Did you enjoy it or think it ruined the movie? As much as I'd love a more serious film with the Gecko brothers, I still had so much fun with that movie as it played out. | 0non-cybersec
| Reddit | 143 | 615 |
cURL "response reading failed" in FTPS file transfer. <p>I am trying to download a directory and it's files using cURL via FTPS.</p>
<p>The following command gets me very close - I successfully logged in and set the clear command channel, but then it fails with <code>curl: (56) response reading failed</code></p>
<pre><code>curl -v --ftp-ssl --data-ascii --ftp-pasv --no-epsv --user myusername:XXXXXXXX ftp://ftp.server.com:21 -Q "CCC"
* About to connect() to ftp.server.com port 21 (#0)*
Trying 55.55.55.55... connected
< 220-This System Is For Authorized Users Only.
< 220-
< 220 Secure FTP Server - SecureTransport ready.
> AUTH SSL
< 234 SSLv23/TLSv1
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
* subject: DC=local; DC=ftp_host_company; DC=us; OU=Accounts; OU=SSL Accounts; CN=ftp.server.com
* start date: 2012-02-14 16:29:37 GMT
* expire date: 2015-02-14 16:59:37 GMT
* common name: ftp.server.com (matched)
* issuer: DC=local; DC=ftp_host_company; CN=Configuration; CN=Services; CN=Public Key Services; CN=AIA; CN=FTP_hosting_company Issuing CA 1
* SSL certificate verify ok.
> USER myusername
< 331 Password required for myusername.
> PASS XXXXXXXX
< 230 Virtual user myusername logged in.
> PBSZ 0
< 200 PBSZ=0
> PROT P
< 200 PROT command successful
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CCC
< 200 command channel cleared.
> PASV
* Connect data stream passively
* SSLv3, TLS alert, Client hello (1):
* response reading failed
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
curl: (56) response reading failed
</code></pre>
<p>The ftps host specifically said that I would need to connect with FTPS with Clear Command
Channel on Port 21 - anything I'm missing?</p>
| 0non-cybersec
| Stackexchange | 763 | 2,306 |
Printing all lines between two strings, with one as a user input, using sed. <p>I'm trying to use:</p>
<pre><code>sed -n '/String1/,/String2/p' Filename
</code></pre>
<p>to print all lines between String1 and String2. Although I want to add String1 as a user input so,</p>
<pre><code>read $userinput
sed -n '/$userinput/,/String2/p' Filename.
</code></pre>
<p>But as the input is within quotation is is read as the string <code>$userinput</code> instead of the given input.</p>
| 0non-cybersec
| Stackexchange | 158 | 479 |
Upside down tikz-qtree with concentrated edges. <p>I would like to create an upside down tree with concentrate edges and labels inside the nodes as labels above them.</p>
<p><img src="https://i.stack.imgur.com/NVSj9.jpg" alt="desired result"></p>
<p>Right now I've come so far. But I still need the edges to concentrate/combine and put the labels <code>+</code> and <code>*</code> next to the overlapping bit. And I need to add the extra labels <code>x</code>, <code>y</code>, and <code>z</code> to the top nodes.</p>
<p><img src="https://i.stack.imgur.com/osant.png" alt="current situation"></p>
<p>How do I get the tree from the first image? (The corners do not need to be rounded.) It is not absolutely necessary to use tikz-qtree.</p>
<pre><code>\tikzstyle{var} = [draw,shape=rectangle,minimum size=2em,
inner sep=2pt,fill=white!20]
\tikzstyle{operator} = [draw=none,fill=none,minimum size=2em,
inner sep=2pt,fill=white!20]
\begin{tikzpicture}[grow'=up,level distance=1.25cm,sibling distance=1cm,]
\tikzset{every node/.style={var}}
\Tree [.7 \edge node[auto=right,style={operator}] {$+$};
[.6 \edge node[auto=right,style={operator}] {$*$};
[.2 ] [.3 ] ]
[.1 ] ]
\end{tikzpicture}
</code></pre>
| 0non-cybersec
| Stackexchange | 426 | 1,305 |
could not connect to server (FreeNAS server). <p>I have imported a volume and set its permission like this
<img src="https://i.stack.imgur.com/1fdRH.png" alt="enter image description here"></p>
<p>then I created an AFP share like this
<img src="https://i.stack.imgur.com/bOYm9.png" alt="enter image description here"></p>
<p>then I created an AFP service like this
<img src="https://i.stack.imgur.com/ebtQS.png" alt="enter image description here"></p>
<p>but when I am trying to connect to server from Mac I am getting error
<img src="https://i.stack.imgur.com/XVEln.png" alt="enter image description here"></p>
| 0non-cybersec
| Stackexchange | 195 | 615 |
I have 20 different steam keys to give away!. I have 20 steam keys to give away. Nothing special. I honestly have never heard of any of these games before, and none interest me, so I don't really want them.
I'll add a list of these games on this post at 4:30pm US Eastern Time (in about 45 minutes). Please leave a comment before then to let me know that this post has gained attention.
I'm thinking I'll just give whichever key to whoever asks for it first, and will cross off and keep updated which keys are taken.
**SOME RULES**
**1.** One key per request.
**2.** Your account must be at least 2 weeks old and appear active. (to avoid one person asking for multiple keys)
**3.** I will private message you the key.
**4.** I have no reason to doubt the valid status of these keys. I purchased them in random crates, and am under the belief that I am the first to see them. I apologize if there are issues registering the key, but seeing that this is a giveaway, I will not oblige any request to purchase you that game, or any other.
**5.** If there is a dispute where multiple users ask for the same key, and I cannot determine who asked first, it will be up to choosing a number between 1 and 100.
**This giveaway is in the spirit of sharing fun among our glorious community. Thank you for participating!**
**EDITS**
The games are up for grabs once the list is posted
MAKE A NEW COMMENT FOR YOUR REQUEST. I WILL BE MONITORING MY INBOX FOR THIS WHOLE THING, AND EDITS DO NOT SHOW UP AS NEW.
It is going to take a minute or so to process each request, between checking the user's history, crossing off the title, and messaging them the code. Please be patient. I am only one man.
**10 minutes peeps**
**5 Minutes**
leave a comment as soon as you know what game you want. I'll be going in order of what shows up in my inbox
**2 Minutes**
You just have to be the first to say what you want
**1 Minute!** The Hype Train is approaching the station!
Alien Hallway
Alien Shooter - Revisited
Bloodbath kavkaz
Commander - Conquest Of The Americas
Cubetractor
Culling Of The Cows
Fly and Destroy
Gun Metal
Hacker Evolution
Knightshift
Pixel Puzzles 2 Anime
Pixel Puzzles 2 Birds
Pixel Puzzles Japan
Shut Up And Dig
Soulbringer
Space Farmers
Survive in space
Two Worlds - Game of the Year Edition
Two Worlds 2
Zombie Shooter
**THATS IT HOMIES!**
Wow that kinda fucked my inbox
I hope every one atleast had fun, and congratulations to the winners. I hope you get some enjoyment out of your new game!
The instant i submitted the list, my inbox was just like WWHOOOOOSSHHHHH!!!!!! I started with the earliest enrty and counted toward the last. about the time people started asking for what i no longer had, i tried replying to each one, but that was just foolish, because i was still getting like 3 new comments every second. haha it was a lot of fun actually. Fun enough that i may do it again some time soon ;)
**It's over guys!**
Sorry I thought i said that already in the edits | 0non-cybersec
| Reddit | 811 | 3,022 |
Difference between / and /* in servlet mapping url pattern. <p>The familiar code: </p>
<pre class="lang-xml prettyprint-override"><code><servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</code></pre>
<p>My understanding is that <code>/*</code> maps to <code>http://host:port/context/*</code>.</p>
<p>How about <code>/</code>? It sure doesn't map to <code>http://host:port/context</code> root only. In fact, it will accept <code>http://host:port/context/hello</code>, but reject <code>http://host:port/context/hello.jsp</code>.</p>
<p>Can anyone explain how is <code>http://host:port/context/hello</code> mapped? </p>
| 0non-cybersec
| Stackexchange | 314 | 861 |
Ashamed of my new girlfriend. It feels bad/makes me sad to type this, but right now, I'm ashamed of my new girlfriend. We're both 21, and we've been together for a month now.
I just got back from a new years eve party, and she made a complete fool out of herself, and me. She got completely wasted tonight. I honestly can't count the amount of times she just randomly fell down on the floor throughout the night. She couldn't stand on her feet by the end of the night, she kept having random mood swings where she'd start crying, she'd fall asleep at the bar, and everyone would make fun of her, while I was there supporting her. At the end, I had to carry her on my back, sat on the bus together with her to get to her home, then walk all the way back in the cold, to the city we went out (about an hour and half by foot) as there was no other bus to go back.
Now you might say "it's new years eve, relax" it's not the first time this has happened though. Tonight was also the night where she met some of my friends for the first time, and they really have a pathetic view of her right now.
I guess talking about it with her is the obvious answer, but I'd have no idea how to begin about this, without offending her? I also hope she realizes and appreciates what I've done for her tonight
**EDIT** Thank you for the replies, Reddit. I REALLY appreciate it. She's coming over tonight to have dinner with my parents and myself, she's then staying the night. I will bring it up. | 0non-cybersec
| Reddit | 355 | 1,480 |
Time Capsule Fileshare over internet with windows. <p>I can access the hard disc from the time capsule over the internet with any mac computer. But it is not working with windows. Windows prompts the network security alert where I have to enter the username and password. But the correct username and password is always wrong. For example, if I enter the credentials Michael in the username field and qwerty123 in the password field on a mac, it connects. The same on windows and it says wrong credentials. </p>
<p>My setup is as follows:
A router is connected to the WAN. Because the IP changes every 24h, I setup a dyn DNS. The time capsule is connected to the router with a cable and is in bridge mode. Windows and OSX can access the hard disc in the LAN. The router makes a port forwarding to the time capsule. </p>
| 0non-cybersec
| Stackexchange | 191 | 821 |
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 | 349 | 1,234 |
Guesses Based on Your Location/Climate/Geography. The area I live in has a good range of salt and fresh water, coniferous and deciduous forest, plains, hills and rocky areas. That combined with the fact that we have big ranges in temperature and precipitation between seasons, I am hoping we will get a good range.Nothing like Infernape or Metang, but maybe Larvitar or Sudowoodo. I also expect to see Deerling since we have a lot of Moose and Deer. Honestly except for anything tropical or from areas with extreme temperatures I wouldn't be surprised by much, especially if they don't arbitrarily limit what and how many pokemon can be found in different regions. Anyone else have any guesses for what they are expecting or even what they are hoping for? | 0non-cybersec
| Reddit | 171 | 755 |
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 | 349 | 1,234 |
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 | 349 | 1,234 |
Where do I set 'NODE_OPTIONS="–max-old-space-size=2048"'. <p>When I run "npm start" in application I get the following error -
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory</p>
<p>Most of the solutions posted online are about increasing memory with NODE_OPTIONS="–max-old-space-size=2048". But I have no idea where to set this. Some posts talked about a .bashrc file which my project does not have. I'm also on a windows system. The "npm start" command runs "npm run build-semantic && react-scripts start" as set up in package.json.</p>
| 0non-cybersec
| Stackexchange | 181 | 623 |
What is up with the new angel game controller award here on Reddit?. Along with Gold, Silver, and Platinum, I've been seeing another award popping up a lot in the last few days. It looks like a video game controller with wings and a halo. It's not listed on [the help page for awards.](https://www.reddithelp.com/en/categories/reddit-101/reddit-basics/what-are-awards) I know some subs have their own community awards now, but I've been seeing this one all over the place, on lots of different subs and posts. Can somebody tell me what I means please? Thank you! | 0non-cybersec
| Reddit | 142 | 562 |
Get minSdkVersion and targetSdkVersion from apk file. <p>I am trying to get the values of <code>minSdkVersion</code> and <code>targetSdkVersion</code> from an apk stored on the device. Getting other details are discussed <a href="https://stackoverflow.com/questions/5661418/get-apk-file-icon-version-name">here</a>, but only the <a href="http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#targetSdkVersion" rel="nofollow noreferrer"> targetSdkVersion </a>
is available in the <code>ApplicationInfo</code> class. Can the <code>minSdkVersion</code> be obtained other than by extracting the apk file and reading AndroidManifest.xml?</p>
| 0non-cybersec
| Stackexchange | 196 | 662 |
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 | 349 | 1,234 |
upgrade of virtual machine upgraded main machine. <p>I was running Ubuntu 10.11 , with several virtual machines on it
(Windows XP, Windows 7, Ubuntu 11.04 etc) and decided to update the
Ubuntu 11.04 virtual machine to 11.10.</p>
<p>However, it decided (there was no option anywhere) to update the MAIN
machine, not the virtual machine and consequently, the computer won't
boot up!</p>
<p>I have got it going using a flash drive and I can see all my files -
but I can't get at them to copy, because it says I do not have the
necessary permissions.</p>
<p>Similarly, I can see the virtual machine folders, but I can't access them.</p>
<p>Anyone any bright ideas?
Thanks
Chris</p>
| 0non-cybersec
| Stackexchange | 191 | 682 |
Smurfing IS a problem in Overwatch. As we all know the world cup countries that are allowed to participate are the top 20 countries based on the top 150 players average SR.
I will use dafran here as an example, but he is off course not the only one "guilty" of this.
Dafran currently has 3 acccounts, they are rank 1,2 and 4. These 3 accounts SIGNIFICANTLY boost the average SR of Denmark. Not only do these accounts change the seeding Denmark will have, but Dafran gets to vote 3 times on his countries coach.
Now imagine this happening on a much larger scale, where the top players of each countries all have several accounts in the top 150 players of their country. They all get several votes and can change the outcome, of what should be a fair vote.
I think the only solution for this problem is if Blizzard steps up, and doesn't give these secondary accounts the option to vote. And, doesn't take these accounts into calculation when determining the average SR per country.
Edit: I may have worded this poorly by using the word smurfing. What i mean is alternate accounts, that play at the same level as their main account. | 0non-cybersec
| Reddit | 263 | 1,133 |
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 | 349 | 1,234 |
An r-neighborhood of a measurable set of intermediate measure has strictly larger measure. <p>I think the following should be true but can’t seem to figure out a proof:</p>
<p>Let <span class="math-container">$M$</span> be a connected compact Riemannian manifold (without boundary) with the volume measure, normalized so that the total measure is 1.</p>
<p>Let <span class="math-container">$A$</span> be a Borel measurable subset such that <span class="math-container">$0 < \mathrm{vol}(A) < 1$</span>. For <span class="math-container">$r > 0$</span>, let
<span class="math-container">$$ B(A, r) := \bigcup_{x \in A} B(x, r) $$</span>
be the <span class="math-container">$r$</span>-neighborhood of <span class="math-container">$A$</span>, where <span class="math-container">$B(x, r) := \{y \in M \mid d(x, y) < r\}$</span>. </p>
<p>Show that for all <span class="math-container">$r > 0$</span>, <span class="math-container">$\mathrm{vol}(B(A,r)) > \mathrm{vol}(A)$</span>.</p>
<p>If A is closed (hence compact) this is clear. But I am having trouble proving it in general. I have thought of using the fact that <span class="math-container">$A$</span> can be approximated from the inside by compact sets but it is not clear to me how to complete the proof. Any suggestions are appreciated. Thanks.</p>
| 0non-cybersec
| Stackexchange | 417 | 1,324 |
PSA: For those who love diet sodas...consider your teeth!. I thought this was a good time to chime in on the debate over diet soda, after /u/funchord's [post about soda consumption](https://www.reddit.com/r/loseit/comments/4cprv4/article_us_soda_consumption_falls_to_30year_low/).
I love diet soda, and I drink about 1 to 2 cans a day to ease the craving for something cold and sweet. It's also my default drink to order when I go to bars with friends.
However, a few days ago I went to the dentist. This guy came highly recommended by my co-worker, and I was unsatisfied with the government-subsidised dentist I'd been going to over the past few years (it was always a wham-bam-thank-you-ma'am experience). This new dentist took the time to examine my teeth properly.
The first thing he asked me was: "Has anyone ever told you that you grind your teeth in your sleep?"
I was surprised that he asked that, and said no. He remarked that my teeth had a LOT of wear and tear, and looked very eroded. That was when I told him I drink a lot of diet soda, and he shook his head.
I'm at that point where I'm still able to save most of my teeth, but the damage of 30+ years of soda has already taken its toll. We may argue back and forth over whether diet soda increases sugary cravings, or whether it's good for weight loss. Me? I've decided to give it up in order to save my teeth. I might have one occasionally, but my days of guzzling a can with lunch AND dinner are over.
I really hope this post doesn't sound preachy or anything. I just thought that if I had seen something cautionary like this, I would have stopped drinking diet soda years ago, so I thought I'd post this in case it might benefit someone else. | 0non-cybersec
| Reddit | 445 | 1,717 |
Deciding whether $f^{-1} (f(A)) = A$ or $f(f^{-1}(B)) = B$. <p>$X$ and $Y$ are two sets and $f:X\to Y$. If $f(C)=\{f(x):x\in C\}$ for $C\subseteq X$ and $f^{-1}(D)=\{x:f(x)\in D\}$ for $D\subseteq Y$, then the true statement is </p>
<p>(A) $f(f^{-1}(B))=B$</p>
<p>(B) $f^{-1}(f(A))=A$</p>
<p>(C) $f(f^{-1}(B))=B$ only if $B\subseteq f(X)$</p>
<p>(D) $f^{-1}(f(A))=A$ only if $f(X)=Y$</p>
| 0non-cybersec
| Stackexchange | 212 | 392 |
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 | 349 | 1,234 |
Variation of parameters for 2nd order ODE. <p><a href="http://en.wikipedia.org/wiki/Variation_of_parameters" rel="nofollow">http://en.wikipedia.org/wiki/Variation_of_parameters</a> describes the general solution to a second order system under "General Second Order Equation." What does it mean when the forcing function $f$ is not $C^1$? Does that just mean that the assumption of the form of the particular solution is wrong? (We know from general theory that there exists a unique solution per initial condition on $u$ and its first derivative.)</p>
| 0non-cybersec
| Stackexchange | 143 | 554 |
How to make a transparent proxy server based intranet dns. <p>I want to implement a server for responding any <code>http/https</code> request sent to it. </p>
<p>It's much like forward proxy using CONNECT method. I do not want the clients to set proxy explicitly. The DNS of the clients is a customized <code>dnsmasq</code> which will resolve some domain to the proxy server. </p>
<p>How can I achieve this via using iptables for packet forward to a normal forward proxy like squid. Or should I use some hacks like write a <code>netfilter/iptables</code> plugin, modify the code of squid to make it work in connect mode without connect method.</p>
<p>In short, I want to implement a transparent <code>http/https</code> proxy which can respond to any normal <code>http/https</code> request sent to it.</p>
| 0non-cybersec
| Stackexchange | 220 | 809 |
How to change terminal folder font color. <p>I use terminal with the fish shell. I played the themes and colors in <code>fish_config</code> as well as the ANSI colors in the terminal preferences. Nothing I do can change the folder font colors. How do I get rid of this ugly purple-blue color?</p>
<p><a href="https://i.stack.imgur.com/SFIs9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SFIs9.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange | 140 | 464 |
Algorithm for a strategy game. <p>This is a question I have been toying with for a week or so, proposed by a colleague:</p>
<p>Imagine a game played on a
<a href="http://www.corknine.com/new/img/funji.jpg" rel="nofollow noreferrer">36x36 grid</a>. The goal of the game is to create four corners of a square of any size (eg., 2x2, 3x3, 4x4, and so on). The first player places a game-piece anywhere except the center four grid spaces. After the first move, players can place their game-piece anywhere on the grid. Game-pieces cannot be moved after they are placed. And that's it; The game is simple and fun. </p>
<p>I have been trying to come up with an algorithm to win, or at least do well at this game. Any suggestions?</p>
| 0non-cybersec
| Stackexchange | 222 | 736 |
Is Continuous Integration nowadays intended as "Continuous Inspection"?. <p>I've been reading a log about CI (mostly Addison-Wesley books) and taking "CI" courses. I see two clear distinctions between old books on CI and new ones:</p>
<ul>
<li>Old ones focus on "committing" or "pushing" your code often (integrating often)</li>
<li>New ones talk about practices for having feedback early in the process, like running builds and tests in a pull request instance.</li>
</ul>
<p>I think it's not common nowadays to commit or push every day (or multiple times per day), but it's a great practice to build and run tests in every pull request. Is it still Continuous Integration? Or am I missing something?</p>
<p>Edit: I'm following Martin Fowler's definition: "A software development practice where members of a team integrate their work frequently, usually each person integrates at least daily—leading to multiple integrations per day"</p>
<p>In the context of Git, I understand it as pushing/committing your code to the "development" branch daily. Maybe I'm mistaken, and it refers to a "working" or "feature" branch.</p>
| 0non-cybersec
| Stackexchange | 284 | 1,136 |
I can't connect to mysql on a remote server. <p>I'm trying to connect from an Ubuntu server to a RHEL6 server using mysql. I've tried <code>telnet</code>ing into the server as well as trying to connect with mysql. I've tried commenting out the bind-address but didn't have any success with that either. I don't get an error code or anything with <code>telnet</code>. It just fails after a minute or so. With mysql, I get this error code <code>ERROR 2003 (HY000): Can't connect to MySQL server on 'SERVER_IP' (111)</code>. "SERVER_IP" is of course a placeholder where actual error gives that actual IP.</p>
<p>I've included my my.cnf as well as well as my iptables from the destination server.</p>
<p>On Destination Server...</p>
<p>my.cnf:</p>
<pre><code>[mysqld]
bind-address=0.0.0.0
tmp_table_size=512M
max_heap_table_size=512M
sort_buffer_size=32M
read_buffer_size=128K
read_rnd_buffer_size=256K
table_cache=2048
key_buffer_size=512M
thread_cache_size=50
query_cache_type=1
query_cache_size=256M
query_cache_limit=24M
#query_alloc_block_size=128
#query_cache_min_res_unit=128
innodb_log_buffer_size=16M
innodb_flush_log_at_trx_commit=2
innodb_file_per_table
innodb_log_files_in_group=2
innodb_buffer_pool_size=32G
innodb_log_file_size=512M
innodb_additional_mem_pool_size=20M
join_buffer_size=128K
max_allowed_packet=100M
max_connections=256
wait_timeout=28800
interactive_timeout=3600
# modify isolation method for faster inserting.
# Do not uncomment the line below unless you understand what this does.
# transaction-isolation = READ-COMMITTED
# do not reverse lookup clients
skip-name-resolve
#long_query_time=6
#log_slow_queries=/var/log/mysqld-slow.log
#log_queries_not_using_indexes=On
#log_slow_admin_statements=On
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
#Added by Magento ECG
long_query_time=1
slow_query_log
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
</code></pre>
<p>iptables:</p>
<pre><code>:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 225 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -i eth1 --dport 11211 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
</code></pre>
<p>sudo netstat -ntpl</p>
<pre><code>Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:2123 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:1581 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 :::11211 :::* LISTEN -
tcp 0 0 :::22 :::* LISTEN -
tcp 0 0 :::225 :::* LISTEN -
</code></pre>
<p>sshd_config:</p>
<pre><code>Protocol 2
SyslogFacility AUTHPRIV
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
X11Forwarding yes
Subsystem sftp /usr/libexec/openssh/sftp-server
</code></pre>
| 0non-cybersec
| Stackexchange | 1,461 | 4,225 |
Export CSV using Laravel via Ajax. <p>I have a export csv function, it worked fine with laravel. But now I want to call export function via ajax and use method post, but I there is no respone. I can send a variable from laravel controller to response, but can not send a file download.</p>
<p>Here is my code :</p>
<p><strong>route.php</strong></p>
<pre><code> Route::get('/title/show', 'TitleController@show');
Route::post('/title/show', 'TitleController@exportFromDB');
</code></pre>
<p><strong>show.blade.php</strong></p>
<pre><code><script>
$(document).ready(function () {
$('#exportFromDB').click(function () {
$.ajax({
url: "",
type: "post",
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
data: {},
success: function (response) {
var a = document.createElement("a");
a.href = response.file;
a.download = response.name;
}
})
})
})
</code></pre>
<p></p>
<p><strong>TitleController.php:</strong></p>
<pre><code> $dataExport['Oversea'] = $dataOversea;
$this->titleRepository->export('csv', $properties, $dataExport);
</code></pre>
<p><strong>TitleRepository.php</strong></p>
<pre><code>public function export($type, $properties, $data)
{
if (in_array($type, self::EXPORT_TYPE)) {
try {
return Excel::create($properties['_title'], function ($excel) use ($data, $properties) {
$excel->setTitle($properties['_title']);
$excel->setCreator($properties['_creator'])
->setCompany($properties['_company']);
$excel->setDescription($properties['_description']);
$excel->sheet('Sheet', function ($sheet) use ($data) {
foreach ($data as $item) {
$sheet->fromArray($item);
}
});
})->export($type);
} catch (Exception $error) {
throw $error;
}
}
}
</code></pre>
<p>How can I fix them ? Thank !</p>
| 0non-cybersec
| Stackexchange | 642 | 2,148 |
OS X (Mavericks) file sharing: Can only see contents of shared folder, not open files. <p>I have setup my mac with two admin users, lets call them foo and bar. The user foo has a folder x which contain files and other folders and so on. In system preferences I have enabled file sharing and added "read only" access to the user bar for the folder x. Now, if I am logged in as user bar, I can open the folder x and see its files and folders. However, if I try to open, say, a pdf-file in that folder, I get an error message telling me I do not have permissions. Interestingly, if I copy this file to the desktop (being prompted for admin password), I can open the copy afterwards. </p>
<p>Should not I be able to open all the files as user bar in folder x? Do I have to user more fine-grained access control, like, enabling access on each file?</p>
| 0non-cybersec
| Stackexchange | 214 | 849 |
Get size of an Iterable in Java. <p>I need to figure out the number of elements in an <code>Iterable</code> in Java.
I know I can do this:</p>
<pre><code>Iterable values = ...
it = values.iterator();
while (it.hasNext()) {
it.next();
sum++;
}
</code></pre>
<p>I could also do something like this, because I do not need the objects in the Iterable any further:</p>
<pre><code>it = values.iterator();
while (it.hasNext()) {
it.remove();
sum++;
}
</code></pre>
<p>A small scale benchmark did not show much performance difference, any comments or other ideas for this problem?</p>
| 0non-cybersec
| Stackexchange | 190 | 589 |
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 | 349 | 1,234 |
Prove that $X^2$ and $Y^2$ are independent if $X$ and $Y$ are independent - am I right?. <p>$X$ and $Y$ are independent r.v's. </p>
<p>I want to prove that $X^2$ and $Y^2$ are also independent. Here's my reasoning:</p>
<p>$P(X=x)=P(X=x|Y=y)=>P(X=x)=P(X=x|Y=y^2)=>P(X=x^2)=P(X=x^2|Y=y^2)$ </p>
| 0non-cybersec
| Stackexchange | 155 | 301 |
Why limit commands and events to one aggregate? CQRS + ES + DDD. <p>Please explain why modifying many aggregates at the same time is a bad idea when doing CQRS, ES and DDD. Is there any situations where it still could be ok?</p>
<p>Take for example a command such as PurgeAllCompletedTodos. I want this command to lead to one event that update the state of each completed Todo-aggregate by setting IsActive to false.</p>
<p>Why is this not good?</p>
<p>One reason I could think of:</p>
<p>When updating the domain state it's probably good to limit the transaction to a well defined part of the entire state so that only this part need to be write locked during the update. Doing so would allow many writes on different aggregates in parallell which could boost performance in some extremely heavy scenarios.</p>
| 0non-cybersec
| Stackexchange | 206 | 816 |
ERR_SSL_PROTOCOL_ERROR in Chrome but not Edge. <p>I temporarily changed the DNS pointer to a website and then changed it back.
Since doing this the link no longer works in Chrome on my computer.
It does work on another computer at this location.
The link also works in Edge on my computer.</p>
<p>I have tried clearing the browsing history in Chrome.
I have also tried <a href="https://superuser.com/questions/1077503/chrome-err-ssl-protocol-error-on-known-working-site">chrome://net-internals/#dns and ipconfig /flushdns</a></p>
| 0non-cybersec
| Stackexchange | 152 | 532 |
How do I do a group count on two fields, to summarise colour and size choices?. <p>I have a spreadsheet where each row is a person's choice of colour and size of a T-Shirt. It looks something like this:</p>
<pre><code>┌─────────┬────────┐
│ Large │ Red │
│ Small │ Blue │
│ Medium │ Red │
│ Small │ Red │
│ Medium │ Red │
└─────────┴────────┘
</code></pre>
<p>I'd like to be able to summarise that in a form I can give to a supplier, ideally like this:</p>
<pre><code>┌────────┬──────┬───┐
│ Large │ Red │ 1 │
│ Medium │ Red │ 2 │
│ Small │ Blue │ 1 │
│ Small │ Red │ 1 │
└────────┴──────┴───┘
</code></pre>
<p>How can I do this?</p>
| 0non-cybersec
| Stackexchange | 281 | 666 |
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 | 349 | 1,234 |
Appending data to file with a single open/close from a shell script. <p>I need to adjust my shell script and write to <code>$log</code> multiple times. Opening and closing the file repeatedly will cause an increase in runtime. </p>
<p>How can I write everything at once to the file, including all <code>echo</code> statements defined in my script?</p>
<pre><code>#!/bin/sh
log="loadlog.log"
for i in {1..10}
do
n=$((100*$i))
echo "## Users=$i requests=$n ##" >> $log
ab -n $n -c $i http://mainserver.com/index.html >> $log
ssh root@mainserver cat /proc/loadavg >> $log
echo "======" >> $log
done
</code></pre>
| 0non-cybersec
| Stackexchange | 230 | 661 |
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 | 349 | 1,234 |
How to setup a vue-cli with vuetify project to run with IE 11?. <p>I spend a few days to setup a <strong>vue.js + vue-cli + typescript + vuetify</strong> project to run with IE 11 without success? </p>
<p>I found many posts on the net that explain how it should be done but without success. I tried to combine in almost all the ways possible the setup explained below without success, endind with many different errors up to a blank page</p>
<p>The application runs fine wit Chrome or FF</p>
<p><strong>If someone has such an application running in IE 11 it would be greatly appreciated</strong></p>
<p><strong>Context</strong> (all the latest versions):</p>
<ul>
<li>vue-cli</li>
<li>typescript</li>
<li>vue.js + vue-router + vuex + vuex-persistedstate</li>
<li>vuetify + vue-i18n + vuelidate </li>
<li>axios</li>
</ul>
<p>Pardon me if some question seems stupid as I'm quite a newbie on babel/webpack dev..</p>
<p><strong>What I've tried and questions</strong> :
(i've tried almost all the combinations the following)</p>
<ul>
<li>Should I use <code>npm install babel-polyfill --save</code>as explained in the <a href="https://vuetifyjs.com/en/getting-started/quick-start" rel="noreferrer">vuetify setup for IE 11 here</a>?</li>
<li>Should I add<code>import 'babel-polyfill'</code>in<code>main.ts</code>as explained in the <a href="https://vuetifyjs.com/en/getting-started/quick-start" rel="noreferrer">vuetify setup for IE 11 here</a>?</li>
<li>Or should I add<code>import '@babel/polyfill'</code>in<code>main.ts</code><a href="https://stackoverflow.com/questions/53420392/vue-cli-3-vuetify-not-working-on-ie-11-babel-does-not-transpile">as explained here </a></li>
<li>Should I use <code>npm install @babel/preset-env --save-dev</code>as explained in the <a href="https://vuetifyjs.com/en/getting-started/quick-start" rel="noreferrer">vuetify setup for IE 11 here</a> or is it unnecessary due to<code>vue-cli</code> being used?</li>
<li><p>in<code>babel.config.js</code>, should I replace the content initially created by vue-cli </p>
<pre><code>presets: [
'@vue/app'
]
</code></pre>
<p>by <a href="https://stackoverflow.com/questions/53420392/vue-cli-3-vuetify-not-working-on-ie-11-babel-does-not-transpile">as explained here </a> </p>
<pre><code>presets: ['@babel/preset-env']
</code></pre>
<p>or (as seen in many places)?</p>
<pre><code>presets: [['@vue/app', useBuiltIns: 'entry' }]]
</code></pre>
<p>or add the 2 presets?</p>
<pre><code>presets: [
['@babel/preset-env'],
['@vue/app', useBuiltIns: 'entry' }]
]
</code></pre>
<p>Should I add some plugins like <a href="https://stackoverflow.com/questions/53885552/how-to-make-a-vuejs-application-work-with-ie-11-when-using-feathersjs/53908771#53908771">explained here</a>?</p>
<pre><code>presets: ['@vue/app'],
plugins: ['@babel/transform-modules-commonjs']
</code></pre>
<p>Or change it like this <a href="https://cli.vuejs.org/guide/browser-compatibility.html" rel="noreferrer">as explained in the vue doc here</a>?</p>
<pre><code>presets: [
['@vue/app', {
polyfills: [
'es6.promise',
'es6.symbol'
]
}]
]
</code></pre></li>
<li><p>in<code>vue.config.js</code>, should I add?</p>
<pre><code>transpileDependencies: [
'vuetify',
'vue-i18n',
'vuelidate',
'axios'
]
</code></pre></li>
</ul>
<p><strong>[SOLUTION 2019-06-25]</strong><br>
We finally got it to work, the answer from @blackening was very helpful
It happened also that we had javsacript errors in IE 11 with google<code>"reCaptcha"</code>that disappeared after the following setup:</p>
<p>As a prerequisite,<code>vue-cli</code>is installed and the project is created by selecting`'Use Babel alongside TypeScript for auto-detected polyfills'</p>
<p>1) install<code>core-js@3</code></p>
<pre><code> npm install core-js@3
</code></pre>
<p>2) edit<code>main.ts</code>like this:</p>
<pre><code> import 'core-js/stable'
import Vue from 'vue'
import '@/plugins/vuetify'
{...}
</code></pre>
<p>3) edit<code>babel.config.js</code></p>
<pre><code> module.exports = {
presets: [
['@vue/app', { useBuiltIns: 'entry' }]
]
}
</code></pre>
<p>And that's it !<br>
Now we are fighting with IE 11 CSS, but that's a know story... As a nexample, in<code>vue</code> to apply a style only to IE, just code it like this</p>
<pre><code> <style scoped>
/* Only for IE 11, wrap div text */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.ieMaxWidth90 {
max-width: 90vw; /* 90% view width */
}
}
</style>
</code></pre>
| 0non-cybersec
| Stackexchange | 1,678 | 4,608 |
Achieving FTP/SFTP without 3rd party dll with FtpWebRequest if possible in C#. <p>I am trying to achieve the ftp/sftp through FtpWebRequest class in C# but not succeeded till now.</p>
<p>I dont want to use any 3rd party free or paid dll.</p>
<p>credentials are like</p>
<ol>
<li>hostname = sftp.xyz.com</li>
<li>userid = abc</li>
<li>password = 123</li>
</ol>
<p>I am able to achieve the ftp with Ip address but unable to acheive sftp for above hostname with credentials.</p>
<p>For sftp I have enabled the EnableSsl property of FtpWebRequest class to true but getting error unable to connect to remote server.</p>
<p>I am able to connect with Filezilla with the same credentials and hostname but not through code.</p>
<p>I observed filezilla, it changes the host name from sftp.xyz.com to sftp://sftp.xyz.com
in textbox and in command line it changes the userid to [email protected]</p>
<p>I have done the same in code but not succeeded for sftp.</p>
<p>Please need urgent help on this. Thanks in advance.</p>
<p>Below is my code so far:</p>
<pre><code>private static void ProcessSFTPFile()
{
try
{
string[] fileList = null;
StringBuilder result = new StringBuilder();
string uri = "ftp://sftp.xyz.com";
FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(new Uri(uri));
ftpRequest.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
ftpRequest.EnableSsl = true;
ftpRequest.Credentials = new NetworkCredential("[email protected]", "123");
ftpRequest.UsePassive = true;
ftpRequest.Timeout = System.Threading.Timeout.Infinite;
//ftpRequest.AuthenticationLevel = Security.AuthenticationLevel.MutualAuthRequested;
//ftpRequest.Proxy = null;
ftpRequest.KeepAlive = true;
ftpRequest.UseBinary = true;
//Hook a callback to verify the remote certificate
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate);
//ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);
FtpWebResponse response = (FtpWebResponse)ftpRequest.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string line = reader.ReadLine();
while (line != null)
{
result.Append("ftp://sftp.xyz.com" + line);
result.Append("\n");
line = reader.ReadLine();
}
if (result.Length != 0)
{
// to remove the trailing '\n'
result.Remove(result.ToString().LastIndexOf('\n'), 1);
// extracting the array of all ftp file paths
fileList = result.ToString().Split('\n');
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message.ToString());
Console.ReadLine();
}
}
public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
if (certificate.Subject.Contains("CN=sftp.xyz.com"))
{
return true;
}
else
{
return false;
}
}
</code></pre>
| 0non-cybersec
| Stackexchange | 917 | 3,218 |
Reimann sum and summation - Khan Academy. <p>From <a href="https://www.khanacademy.org/math/calculus-1/cs1-integrals/cs1-riemann-sums-in-summation-notation/a/riemann-sums-with-summation-notation" rel="nofollow noreferrer">Khan Academy</a>, we want to approximate the area in the interval $[1,7]$ using a right Riemann sum with $9$ equal subdivisions. Only 1 answer is correct:</p>
<p><a href="https://i.stack.imgur.com/0To6Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0To6Z.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/0wd0W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0wd0W.png" alt="enter image description here"></a></p>
<p>My question is, equation $y = \frac5x + 2$ is already given and we can use right Reimann sum and add the areas of different rectangles each of $\frac{7-1}{9} = \frac23$ width. We only need 3 things: $x, \Delta x, y$ and we got all of them, then from where this 2nd equation (the answer with strange interval of $[1,9]$) came up ? Does some 3rd equation exist too with another strange interval $[2,10]$ e.g. ?</p>
<p>Let me be clear:</p>
<p>$$y = \frac 5x + 2, \Delta x = \frac23$$</p>
<p>Hence the $9$ intervals are:</p>
<p>$$[1,\frac53], [\frac53, \frac73], [\frac73, 3], [3, \frac{11}{3}], [\frac{11}{3}, \frac{13}{3}] $$
$$ [\frac{13}{3}, 5], [5, \frac{17}{3}], [\frac{17}{3}], \frac{19}{3}], [\frac{19}{3}, 7]$$</p>
<p>Now we can calculate right Reimann sum using right-end values of each interval for $y$ is already given:</p>
<p>$$ y(\frac53) = \frac{5}{\frac{5}{3}} + 2 \iff 3 + 2 \iff 5 $$</p>
<p>Similarly we can calculate all and add them.</p>
<p>$$ y(\frac73) = \frac{29}{7}, y(3) = \frac{11}{3}, y(\frac{11}{3}) = \frac{37}{11}, y(\frac{13}{3}) = \frac{41}{13} $$</p>
<p>$$ y(5) = 3, y(\frac{17}{3}) = \frac{49}{17}, y(\frac{19}{3}) = \frac{53}{19}, y(7) = \frac{19}{7} $$</p>
<p>Hence, we got the length and width of all the rectangles and we can dot he summation:</p>
<p>$$Area = \frac23 (5 + \frac{29}{7} + \frac{11}{3} + \frac{37}{11} + \frac{41}{13} + 3 + \frac{49}{17} + \frac{53}{19} + \frac{19}{7}) $$</p>
<p>$$ Area = 20.475 $$</p>
<p>Like I said, we already have $x, \Delta x, y$ and we know how to do summation, then why we need this 2nd equation that shows up as answer ?</p>
| 0non-cybersec
| Stackexchange | 918 | 2,327 |
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 | 349 | 1,234 |
5e Starting a Viking-ish campaign this week. Thought I'd write a song for my group.. Those that know me, not many let's be honest here, know I'm a Bard at heart but first a DM. I've homebrewed like crazy and I'm doing a fantasy world D&D campaign where my players are part of a clan that becomes quite unpopular and they become exiles. I felt this song worked perfectly.
As for the artwork. All can be found on deviant art or Pinterest.
I do hope any find inspiration from the images or song.
Cheers.
https://www.youtube.com/watch?v=j7nBQIcb9FQ | 0non-cybersec
| Reddit | 151 | 549 |
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 | 349 | 1,234 |
Existence of inverse limit in an arbitrary category. <p>According to Wikipedia article</p>
<p><a href="http://en.wikipedia.org/wiki/Inverse_limit" rel="nofollow">http://en.wikipedia.org/wiki/Inverse_limit</a></p>
<p>"Unlike for algebraic objects, the inverse limit might not exist in an arbitrary category."</p>
<p>But when constructing the inverse limit of $(M_\alpha)_\alpha$ as a coherent subset of $\prod_{\alpha}M_\alpha$ and checking if it satisfies the universal property, the algebraic structure doesn't seem necessary. Is it referring to more general category where the objects are not even sets?</p>
| 0non-cybersec
| Stackexchange | 163 | 613 |
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 | 349 | 1,234 |
How to use customized describe function with a grouping variable to get statistics by group?. <p>I was trying to get descriptive stats for a particular variable, by a grouping variable. I wanted more percentile values in the output than the describe function gives by default.</p>
<p>I tried the following code:</p>
<p><code>df.groupby('city')['population'].describe([0.01,0.05,0.25,0.50,0.75,0.90,0.95,0.99])</code></p>
<p>It gives an error:
<code>describe() takes 1 positional argument but 2 were given</code></p>
| 0non-cybersec
| Stackexchange | 155 | 519 |
why I have 2 swap paritions?. <p>I'm new in using Ubuntu,
I just installed ubuntu 12.10 and everytime I start up the pc, a message tell me that </p>
<blockquote>
<p>the drive /dev/mapper/ubuntu-swap_1 is not ready yet or not present</p>
</blockquote>
<p>.</p>
<p>This is my current situation:</p>
<pre><code>sudo blkid
/dev/sda1: UUID="fa675e68-de82-4257-8960-bb312d08e113" TYPE="ext2"
/dev/sda5: UUID="NLQ7rm-qbYa-QS4y-If3b-nLaY-FHZq-Dklhr8" TYPE="LVM2_member"
/dev/mapper/ubuntu-root: UUID="bf5875d5-5cdd-4b08-a16e-168f75e535e9" TYPE="ext4"
/dev/mapper/cryptswap1: UUID="1acc7002-dc75-452d-b46f-034c03c00f5e" TYPE="swap"
</code></pre>
<p>in the <code>etc/fstab</code>:</p>
<pre><code># /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/ubuntu-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=fa675e68-de82-4257-8960-bb312d08e113 /boot ext2 defaults 0 2
/dev/mapper/ubuntu-swap_1 none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
</code></pre>
<p>in the forum there are suggestions to change the name with uuid,but in my case in fstab there are 2 swap.</p>
<p>should I change it anyway?</p>
| 0non-cybersec
| Stackexchange | 608 | 1,550 |
A question from my high school Olympiad.. <blockquote>
<p>A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are <span class="math-container">$189, 320, 287, 264, x, y$</span>. Find the greatest possible value of: <span class="math-container">$x + y$</span>.</p>
</blockquote>
<p>By assuming the elements to be <span class="math-container">$a, b, c, d$</span> and by making <span class="math-container">$6$</span> different equations, I solved for <span class="math-container">$x+y$</span>. The result came to be <span class="math-container">$793$</span>. I am not sure if this is correct or not. Can anyone help me out?</p>
| 0non-cybersec
| Stackexchange | 210 | 685 |
Reflexive vs. pseudo-coherent abelian groups. <p>Recall that a module M over some ring R is <em>pseudo-coherent</em> if it admits a resolution whose terms are <em>finitely generated</em> projective R-modules. Such a module is reflexive when regarded as an object in the derived category <span class="math-container">$D(Mod_R)$</span>, i.e.,
<span class="math-container">$$M \to RHom(RHom(M, R), R))$$</span>
is a quasi-isomorphism, where RHom denotes the derived functor of the usual homomorphisms of R-modules.</p>
<p>Does the converse hold? (Maybe for nice rings, even for the integers?), i.e., are reflexive modules (where reflexivity is always understood in the derived sense) pseudo-coherent?</p>
| 0non-cybersec
| Stackexchange | 205 | 704 |
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 | 349 | 1,234 |
Onion Bhaji. I cooked some onion bhaji from scratch yesterday for the first time and I was impressed with how easy they were to do. However, whilst they were reasonably tasty they had nothing on the local Indian takeaway restaurants near me.
Any tips on how to elevate the flavour?
Roughly speaking my recipe was:
Chopped onion, soak in water and then dry with paper towel.
Batter was plain flour, turmeric, salt, chilli powder and baking soda. Add 100ml water to mixture.
Drop heaped spoons of mixture into oil.
Fry for 1 minute either side then flip. My oil was at 170C or thereabouts throughout cooking time but needed 2/3 minutes to become golden and crispy. | 0non-cybersec
| Reddit | 166 | 671 |
How to order desktop icons by name in XFCE?. <p>I'm using Xfce 4.8 installed on Ubuntu 12.04.2 LTS and I'm wondering what's the alternative for <em>Right-click -> Order by name</em> on XFCE. Right now, when I right click on my desktop, it looks like this:</p>
<p><img src="https://i.imgur.com/2bI8bGU.png" alt="right click menu on desktop in Xfce"></p>
<p>As you can see, there's no option for rearranging the icons. If my assumption is correct, it can't be done directly via GUI. I saw <a href="http://forums.fedoraforum.org/archive/index.php/t-197861.html" rel="nofollow noreferrer">this</a> thread, but that doesn't really explain how to achieve the same result. Any ideas?</p>
| 0non-cybersec
| Stackexchange | 221 | 683 |
part of the screen (Desktop) is black [Pic inside] (happens with 17.10s on Atom n270 laptops). <p>The mouse is visible on the black part, and i can drag windows from there.
Print screen produces a normal pic with all the desktop as it should look like.</p>
<p>I have this problem with 2 atom n270 laptops, With the first one I could "fix" it temproary by connecting an external screen, then switching to CLI (Ctrl+Alt+F1) and back to the gui (Ctrl+Alt+F7).
It might be a temporary fix for the second laptop too, just didn't check it.</p>
<p>It happens only in 17.10 versions (Ubuntu, Ubuntu mate, Lubuntu). Previous versions of Ubuntu are fine. Also Windows and Manjaro are fine.</p>
<p>Pic of second laptop having this: <a href="https://imgur.com/b6iTmFi" rel="nofollow noreferrer">https://imgur.com/b6iTmFi</a></p>
<p><img src="https://i.imgur.com/b6iTmFi.jpg" alt="enter image description here"></p>
<p>Possible tags: screen, screen black, monitor, laptop, monitor and laptop, monitor display, 17.10, atom, atom n270, n270, intel atom, </p>
| 0non-cybersec
| Stackexchange | 326 | 1,049 |
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 | 349 | 1,234 |
pytest how to use both getoption and parameterize. <p>I have test which run subprocess on certain executable and test the stdout result. </p>
<p>So I use </p>
<pre><code>#conftest.py
def pytest_addoption(parser):
parser.addoption("--executable", action="store")
@pytest.fixture(scope="session", autouse=True)
def pass_executable(request):
try:
return request.config.getoption("--executable")
except AttributeError:
pass
</code></pre>
<p>So that I can use command line arg to set the pass the executable. I wish to use this as a global variable across all my tests. However, I have trouble with the tests which requires @pytest.mark.parametrize decorator. So my solution is to create a <code>test_update_path(pass_executable)</code> to update a global variable PATH, which works. </p>
<pre><code># test.py
PATH = 'defaultpath/app'
def test_update_path(pass_executable):
global PATH
PATH = pass_executable
print("Gloabl path is update to: ")
print(PATH)
def test_1():
# This will work
print("Now next")
print(PATH)
cmd = [PATH]
stdout, stderr = run_subprocess(cmd)
assert stdout == 'some expected result'
@pytest.mark.parametrize("args", [1, 2, 3])
def test_2(path, args):
print("Now next")
print(PATH)
cmd = paramparser(PATH, args)
stdout, stderr = run_subprocess(cmd)
assert stdout == 'some expected result'
if __name__ == '__main__':
pytest.main()
</code></pre>
<p><code>pytest --executable=newpath/app -s</code> will work fine, but it is an ugly hack. More importantly, it ran a test which was not doing any actual testing. It is also problematic as the argument is not an optional. Without setting --executable. The path will be an <code>NoneType</code> rather than the original default path .</p>
<p>Any suggestion please?</p>
<p>Appreciated. </p>
| 0non-cybersec
| Stackexchange | 591 | 1,862 |
Server running but not serving. <p>I have a simple python flask server that is started by start-stop-daemon. It was running well last week, and this monday I see that it is not serving anymore (<code>curl http://localhost/mypage</code> takes forever and never returns). Last log is from friday.</p>
<p>The strange thing is that <code>sudo service myService status</code> is "running" and I see that the process is indeed running (<code>ps aux | grep $(cat /var/run/myservice.pid)</code>)</p>
<p>Is there a way to know what could have happened? I have no idea where to go next from here.</p>
| 0non-cybersec
| Stackexchange | 164 | 593 |
Did I screw up royally? (401k transfer to Roth IRA after I quit my job). So I had about $5k in a traditional IRA w/ Fidelity (rollover from first job) and $25k in a 401k with Wells Fargo. I quit back in April and Wells Fargo started charging fees soon thereafter, so I opted to roll it to Vanguard. When I talked to the guy on the phone, he said most people don't roll their 401ks into Roth IRAs bc of the tax hit. He said it might not be a bad idea for me since I am not working (I quit my job to go to school full time) and it would be the majority of my 2012 "income" aside from what I earned Jan-March. I assumed when it rolled into the Roth IRA, all the taxes would be taken out of it, but that didn't happen.
So when I do my taxes in a couple months, what should I expect? I am really worried I'll be looking at like an $8k tax bill. I obviously don't want to spend that money from my savings since it's keeping me afloat during this year-long degree program. Thanks in advance for your help! | 0non-cybersec
| Reddit | 258 | 1,004 |
Scripting Local Policy Perform Volume Maintenance Tasks. <p>I am working on an automated SQL 2012 install process on Windows 2012 R2 and have everything complete except for one task. My process launches secpol.msc but I am still required to drill in and manually assign access to Perform Volume Maintenance Tasks to the SQL service account. Once I close the window the process takes over and installs and configures everything else without user intervention.</p>
<p>I have done extensive internet searching and the closest I have found is this article from 5 years ago by Kendra Little: <a href="http://www.littlekendra.com/2009/11/12/automating-sql-local-security-policy-rights-posh-and-ntrights/" rel="nofollow">http://www.littlekendra.com/2009/11/12/automating-sql-local-security-policy-rights-posh-and-ntrights/</a>.</p>
<p>Is there a means via scripting to set Local Security Policies?</p>
<p>Thank You,
Scott</p>
| 0non-cybersec
| Stackexchange | 253 | 924 |
Chase Freedom: limitations on combining cashback rewards?. I'm planning on making a large electronics purchase this holiday season and wanted to a credit card to take advantage of a period of 0% APR to pay it off. I have excellent credit and was looking into the Chase Freedom card. Here's what I know:
-Earn $100 if you spend > $500 in the first 3 months - My purchase will cover this
-5% cash back on rotating categories up to $1500 (this quarter is department stores) - I plan on making this purchase at Sears, which is considered a dept. store
-7% cashback for shopping Sears.com via their Rewards Mall
-1% on all purchases
My question: is anyone aware of any limitations of stacking these rewards?
| 0non-cybersec
| Reddit | 168 | 706 |
Luke. I was well into my senior year of high school when my mom married again. I don't remember went my parents split, so I was okay with the change. He was tall, blonde, and very talkative. He worked extremely hard to make everyone laugh whenever possible. You could say he wouldn't hurt a fly, but I didn't get to know him enough to confirm that. For the sake of this retelling, all names will be changed, my step-dad will be Luke, my mom will be Lisa, and I will call myself Penelope.
After the marriage, my mother and I moved in with Luke. I was hesitant, but his three bedroom house seemed much more appealing than our cramped one bedroom apartment. It was only a couple miles farther from my school and I was promised Luke's old car everyday for school.
The new house was beautiful. It was in a quiet neighborhood. The bedrooms were average size, but I didn't have enough stuff to care. Luke also owned a dog, who barked at anything that moved.
After a few weeks of living there, I noticed a strange amount of doors locked. Every cupboard had a child lock on it, as well. I brought this up to Luke once, but only once.
We were eating dinner and laughing at a clever joke my mom pulled on Luke. Once the laughter subsided, I turned to Luke and asked, "So, Luke, did you ever have kids?" His smile quickly left his face and a look of hate crossed his eyes. The faint smile I had slowly lowered as he stared at me. My mother conveniently broke the silence with another joke.
No one would be home when I returned from school every day. I enjoyed it and would play my music as loud as I pleased. I would commonly be in my boyfriend's shirt and my panties during these times.
One day, no different from the rest, I got home, unloaded my backpack, and changed. I was downstairs making a snack, playing music when I heard a strange, rhythmic tapping under the music. I turned off my music and listened. It seemed to stop, so I tried to write it off as the music, but right before I turned it back on, I heard the sound again.
tap tap tap
It was a muffled, metal on metal rhythm. I walked towards it and discovered it coming from the basement.
*tap tap tap*
I grabbed a flashlight and slowly opened the door with trembling fingers.
*TAP TAP*
It stopped. I shined the light down the stairs and, seeing nothing, searched for a light switch. I found it and the basement was illuminated by a single bulb, the rest burnt out. I cautiously walked down into the dimly lit room. I started hearing a faint mechanical noise once I reached the bottom of the stairs. I scanned the room and found nothing except some boxes and the washer and dryer.
TAP
I spun around as I heard it again under the stairs. The mechanical noise was louder here. I bent forward and reached to move the box.
"Penelope? Are you down there?" My mom called for me and I ran up to speak with her. I didn't tell her what happened and I was glad for the interruption. I deemed the basement a no entry zone after that.
We had been living in Luke's house for two months now. My mom was going out of town for business for a night and Luke went to a friend's house for a guy's poker night. I was left alone for most of the night. I spent most of it watching TV.
At about 10 p.m. I heard what sounded like a car pulling up and ran upstairs to put on pants, thinking Luke came home early. I looked out the window from my room and saw only my second hand car in the driveway. Maybe someone had to turn around, I thought.
A random sense of paranoia urged me to search the trees across from my window. A shadowed figured stood directly across from my window. As soon as my eyes met the figure a bright flash came from it. I blinked hard and the figure was gone. Shivers ran down my arms and I decided to call my boyfriend to distract myself.
I was back on the couch, talking and laughing while on the phone. My nerves had just calmed by then. However, something in the window caught my eye and I turned my head towards it. I didn't see anything, but I got up for a closer look. I was four or five feet back when another flash lit up the glass. I screamed and told my boyfriend I had to call the police. I locked myself in the bathroom until they arrived. They didn't find anyone around.
Luke was called to come home early and my mom was notified of the incident. I called her to let her know I was okay. She asked me if I saw the person in the window.
"I think he was blonde, kinda tall."
"Similar to Luke?" she replied.
"Exactly like Luke."
You can find [Part 2](http://www.reddit.com/r/nosleep/comments/x43xo/luke_part_2/) here.
| 0non-cybersec
| Reddit | 1,116 | 4,615 |
Script stuck writing to pipe, continues if attached to strace. <p>I have an old set of bash scripts that communicate via a named pipe, that until recently, seemed to always work fine. This is the basic setup:</p>
<pre><code># Script #1
$ mkfifo myfifo
$ exec 3<>myfifo
$ yad --notification --listen <&3
</code></pre>
<pre><code># Scripts #2 and #3
$ echo icon:name >myfifo
</code></pre>
<p>Script #1 keeps running until yad receives a SIGTERM, and scripts #2 and #3 pass information to yad.</p>
<p>Since a few days ago, I started noticing dozens of processes from scripts #2 and #3, which are sometimes getting stuck. I tried attaching one of them to strace to see what's happening, after script #1 had already finished running, but then the script just created a file named fifo, wrote to it, and exited successfully:</p>
<pre><code>strace: Process 9396 attached
openat(AT_FDCWD, "/run/user/1000/myfifo", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fcntl(1, F_GETFD) = 0
fcntl(1, F_DUPFD, 10) = 10
fcntl(1, F_GETFD) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
dup2(3, 1) = 1
close(3) = 0
write(1, "icon:tabletdisconnected\n", 24) = 24
dup2(10, 1) = 1
fcntl(10, F_GETFD) = 0x1 (flags FD_CLOEXEC)
close(10) = 0
...
</code></pre>
<p>I have done many tests and couldn't figure out: what could be the reasons for scripts #2 and #3 to get randomly stuck, when they were supposed to just write to the named pipe and exit?</p>
| 0non-cybersec
| Stackexchange | 515 | 1,641 |
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 | 349 | 1,234 |
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 | 349 | 1,234 |
Phase dislocations and numerical accuracy. <p>I am solving the nonlinear Schrodinger equation (NLSE),
$$A_t+iA_{xx}+i|A|^2A=0$$
where $A$ is a complex valued function, which can be written as $A=ae^{i\theta}$ for $a,\theta$ real. Now, for particular sets of initial conditions, I find that phase dislocations occur, and hence there are singularities in the frequency, $\omega=-\theta_t$. </p>
<p>My question is, do phase singularities effect the accuracy of the model? Furthermore, physically, why can rapid variations in the phase occur in an equation that is derived under the WKB assumption? Does this mean the equation is not uniformly valid? </p>
<p>An example will be provided below. </p>
<p>I am using a split-step pseudo spectral method. My code is written in Fortran but I have found I can reproduce the results with a Matlab code I found online, which is provided below. </p>
<p>The initial condition takes the form
$$A=sech(x)e^{iCx^2}$$</p>
<p>for $C$ a constant representing a chirp to the signal, which can lead to packet focusing due to dispersion. The evolution of the packet is shown in figure 1. <a href="https://i.stack.imgur.com/y5e1M.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y5e1M.jpg" alt="enter image description here"></a> </p>
<p>Now, the phenomena in question occurs around $t=0.20$ when the amplitude $a$ goes to 0, and hence the phase is not well defined. This leads to singularities in $\omega$. A better picture of this is shown in figure 2. </p>
<p><a href="https://i.stack.imgur.com/mU2yZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mU2yZ.jpg" alt="enter image description here"></a></p>
<p>We see that as the amplitude goes towards 0 at the front and rear of the group, i.e. the packet splits, the phase starts to become singular. Note, I've decimated $\omega$ by a factor 10 to make my point. </p>
<p>Note, the amplitude $a$ heuristically seems to vary slowly, but the phase clearly has rapid variations where the packet amplitude becomes small. Does this mean my results are no longer physically? Finally, and this is off topic, what sets the sign of $\omega$ at these singularities? </p>
<p>Note, to check the numerical accuracy of the scheme I confirm the energy is conserved to one part in $10^6$. Furthermore, there exist exact solutions to the NLSE, which I confirm stay solutions for long times with the resolution and step size used. Finally, the CFL condition for linear wave speeds ($u=1$ here) is obeyed. I have played around with the resolution and time steps, and find they give the same results. </p>
<p>Matlab script: </p>
<pre><code> % This Matlab script file solves the nonlinear Schrodinger equation
% with the first order split-step Fourier method due to Hardin and Tappert.
% Andre Weideman, 1995
%
N=512; %number of fourier modes
dt = 0.001; %time step
M=300; % number of time steps
t=0:dt:M*dt-dt;
L=4*pi; % size of the domain
I=sqrt(-1);
% J=100;
h = L/N; % Space step
n = [-N/2:1:N/2-1]'; % Indices
x = n*h; % Grid points
%----------------------------------------
% IC: Chirped sech packet
u=sqrt(2)*sech(x).*exp(-I*x.^2);
%----------------------------------------
U = u; % Compute initial condition; save it in U
e = -4*n.*n*pi*pi/L/L; % Squares of wavenumbers.
for m = 1:1:M % Start time evolution
u = exp(dt*I*(abs(u).*abs(u))).*u; % Solve nonlinear part of NLS
c = fftshift(fft(u)); % Take Fourier transform
c = exp(dt*I*e).*c; % Advance in Fourier space
u = ifft(fftshift(c)); % Return to physical space
U = [U u];
end
</code></pre>
| 0non-cybersec
| Stackexchange | 1,134 | 3,833 |
Scrape table from each option in drop down menu python. <p>I'm trying to scrape all the data from this website:<br>
<a href="http://www.dartsdatabase.co.uk/PlayerStats.aspx?statKey=1&pg=7" rel="nofollow noreferrer">http://www.dartsdatabase.co.uk/PlayerStats.aspx?statKey=1&pg=7</a></p>
<p>However, I do not know how to iterate through the <strong>'stat'</strong> drop-down menu. Each of these options contains a table I need to scrape. </p>
<p>So far I have the following code which lists the options and values associated with each element in the drop-down list: </p>
<pre><code>url = 'http://www.dartsdatabase.co.uk/PlayerStats.aspx'
response = requests.get(url).text
soup = BeautifulSoup(response,"lxml")
drop = soup.find('select',{'name':'stat'}).findAll("option")
options = []
val = []
for i in range(0,len(drop)):
options.append(drop[i].text)
val.append(drop[i]['value'])
</code></pre>
<p>Any help would be greatly appreciated!</p>
| 0non-cybersec
| Stackexchange | 333 | 968 |
Balls on Stairs. <p>Recently I realized that lost all computing skill in probability. Please take a look at the following problem.</p>
<p>There are $b$ balls that are thrown one by one and bounce from top to bottom on the $n$ steps of stairs. The balls are thrown one by one with one unit of time interval when the previous ball touches the first step the next ball is thrown. Reaching the next step takes the same one unit of time. The probability that the ball miss the step is $p$. The goal is achieved when at least one ball touches the last step. </p>
<blockquote>
<p>What is the maximum running time of the process till the success in the worst case?</p>
</blockquote>
<p>I think the worst case is when we lost first $b-1$ balls on the first step, all $b-1$ balls missed the first step and the last $b$th last successfully reached the last step, therefore the worst running time is $b-1+n$.</p>
<blockquote>
<p>What is the probability of a success (at least one ball reached the last step)?</p>
</blockquote>
<p>$P(success)=1-p^b$</p>
<blockquote>
<p>What is the smallest number of balls should be thrown to guarante that the probability of success is at least $1 - \frac{1}{n}$.</p>
</blockquote>
<p>$$1-p^b \geq 1 - \frac{1}{n}$$</p>
<p>$$p^b \leq \frac{1}{n}$$</p>
<p>$$b \cdot \log p \leq - \log n$$</p>
<p>$$b \leq - \frac{\log n}{\log p}$$</p>
<p>I am not sure if I get it correct.</p>
<blockquote>
<p>Give an upper bound on the expected running time.</p>
</blockquote>
<p>Let try to use a Geometric distribution</p>
<p>$$E=\sum_{i=1}^{b-1} i \cdot p^i \cdot (1-p)^n$$</p>
<p>I still not sure if I get it right with expected running time</p>
| 0non-cybersec
| Stackexchange | 554 | 1,680 |
Irreducible component of a scheme over a dvr. <p>Let $\mathcal M$ be a (reduced) quasi-projective scheme over a dvr (of mixed caracteristics), $R$. Suppose that the generic fiber $\mathcal M_{\eta_R}$ is (nonempty) smooth and irreducible of dimension $n>0$ and that the special fiber $\mathcal M_{x}$ is (nonempty) smooth of dimension $n$ also. Can one find a irreducible component $\mathcal M'\subset \mathcal M$ such that $\mathcal M'_{\eta_R}$ contains an nonempty open subscheme of $\mathcal M_{\eta_R}$ and $\mathcal M'_x$ contains also an nonempty open subscheme of $\mathcal M_x$. </p>
| 0non-cybersec
| Stackexchange | 168 | 597 |
Conflict: TikZ externalisation, local bounding box with empty name, forked edges and multi-line nodes in Forest. <p>What is the cause of the following conflict and how should I resolve it?</p>
<p>The conflict involves a compilation error when a document includes the following elements:</p>
<ul>
<li>Ti<em>k</em>Z externalisation;</li>
<li>a Ti<em>k</em>Z picture which uses <code>local bounding box/.expanded=\macro</code>, where <code>\macro</code> is empty;</li>
<li>a Forest tree using the <code>forked edges</code> style which includes a multi-line node.</li>
</ul>
<p>If the tree is commented out, the <code>tikzpicture</code> is successfully externalised. If the tree is then uncommented, the code compiles as expected.</p>
<p>However, if the tree is uncommented before the <code>tikzpicture</code> has been externalised, externalisation of the <code>tikzpicture</code> fails. If compilation is allowed to proceed, numerous errors including the term <code>forest</code> result.</p>
<p>Is it simply expected that this will fail if <code>\macro</code> is empty? Why does it matter whether the tree is uncommented or not? Or what the style and content of that tree is?</p>
<p>MNME (compile with <code>pdflatex --shell-escape</code>):</p>
<pre><code>\documentclass{article}
\usepackage[edges]{forest}
\usetikzlibrary{external}
\tikzexternalize
\tikzset{%
person name/.store in=\personname,
person name=,
}
\begin{document}
\begin{tikzpicture}
\begin{scope}[local bounding box/.expanded=\personname]
\node (-pen) [circle, minimum size=40mm] {};
\end{scope}
\end{tikzpicture}
\begin{forest}
forked edges,
for tree={
align=center,
},
[Root Starts Here
[Something Else
[All\\Other\\Things
]
]
]
\end{forest}
\end{document}
</code></pre>
<p>Initial failure of externalisation and first couple of <code>forest</code> related errors:</p>
<pre><code>==== 'mode=convert with system call': Invoking 'pdflatex -shell-escape -halt-o
n-error -interaction=batchmode -jobname "prawf-figure0" "\def\tikzexternalrealj
ob{prawf}\input{prawf}"' ========
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
\write18 enabled.
entering extended mode
system returned with code 256
! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "prawf-figure0" "\def\tikzexternalrealjob{
prawf}\input{prawf}"' did NOT result in a usable output file 'prawf-figure0' (e
xpected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled syst
em calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also
named 'write 18' or something like that. Or maybe the command simply failed? Er
ror messages can be found in 'prawf-figure0.log'. If you continue now, I'll try
to typeset the picture.
See the tikz package documentation for explanation.
Type H <return> for immediate help.
...
l.16 \end{tikzpicture}
?
! Argument of \forest@referencednodename@stripafter has an extra }.
<inserted text>
\par
l.29 \end{forest}
?
Runaway argument?
\relax \fi \if \relax \relax \fi \endcsname
! Paragraph ended before \forest@referencednodename@stripafter was complete.
<to be read again>
\par
l.29 \end{forest}
</code></pre>
<p><... and so on ...> </p>
| 0non-cybersec
| Stackexchange | 1,129 | 4,532 |
Using @MockBean in tests forces reloading of Application Context. <p>I have several integration tests running on Spring Framework that extend the base class called <em>BaseITCase</em>.<br>
Like this:</p>
<pre><code>@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppCacheConfiguration.class, TestConfiguration.class}, loader = SpringBootContextLoader.class)
@Transactional
@WebMvcTest
public abstract class BaseITCase{...}
...
public class UserControllerTest extends BaseITCase {...}
</code></pre>
<p>The problem is that one of the test has several declarations of:
@MockBean inside of it and the moment this test executed, Spring recreates context and the tests that follows this one sometimes use wrong beans(from the context created exactly for the test with @MockBean). I found out about that just by checking that beans have different hashcodes. </p>
<p>It becomes really critical when I use @EventListener. Because listeners for wrong context(context of the test class that has already finished execution) are invoked and I have wrong beans there. </p>
<p>Is there any workaround for that?</p>
<p>I tried to move all @MockBean declarations to basic class and it worked fine because new context is not created. But, it makes basic class too heavy.
Also, I tried to make a dirty context for this test, but then the next test fails with message that context has already been closed. </p>
| 0non-cybersec
| Stackexchange | 350 | 1,422 |
How to Reduce Values in a List in R. <p>New R learner here. I have a list of odd numbers that I produced in R. I have 1. . .23 odd. "Three" is supposed to be spelled out. I only need the rows with the values of 1-11 odd not 13-23 odd. I am unable to reduce the list to be 1-11. How can I get rid of the values that are not needed?</p>
<pre><code>for (i in 0:11)
{
i<-(i*2+1)
{
if (i <= 11)
{
if (i == 3) ("three")
}
}
print(i)
}
[1] 1
[1] 3
[1] 5
[1] 7
[1] 9
[1] 11
[1] 13
[1] 15
[1] 17
[1] 19
[1] 21
[1] 23
</code></pre>
| 0non-cybersec
| Stackexchange | 243 | 561 |
Slow Internet Mac Yosemite Recovery Doom (MacBook Air, Early 2015). <p>Product: MacBook Air(early 2015) with OS X Yosemite.</p>
<p>The issue is, that I happen to have my Yosemite reinstalled, so I restarted my MacBook and at the sound of the chime(startup sound of Yosemite), I pressed <kbd>⌥ Opt</kbd>+<kbd>R</kbd> and subsequently selected the Disk Utility.
Once into that, I erased my whole Macintosh HD and then restarted the computer
after which I was expecting the reinstall to be done automatically.</p>
<p>I am a novice in the Mac world.</p>
<p>Now once after the reinstall, I was forced into a screen with 4 options of reinstalling, Disk Utility, Time Machine and help from Apple.</p>
<p>I tried to reinstall, but due to a slow internet connection, I wasn't able to reinstall using Internet Recovery.</p>
<p>Now I created a bootable disk with "InstallESD.dmg" (using tansmac on windows)
This copy of installed is the one downloaded from macworld torrents.
It was after that I restarted the computer this time pressing only the <kbd>⌥ Opt</kbd> key and then all I had was this black screen with a box that asked me for the network I had.</p>
<p>I selected mine in a hope it might work with my USB but it just shows an Internet Recovery option with a globe which I cannot afford due to my slow internet connection. Is there any specific key to select the bootable image because it isn't appearing there?</p>
| 0non-cybersec
| Stackexchange | 398 | 1,422 |
Author affiliations in achemso class. <p>I am trying to enter a list of authors and affiliations in a document with achemso class, but I am new to LaTeX and can't figure how for to get the right affiliation with the right person...
There are 5 authors and 6 affiliations:</p>
<p>Author1 (affiliation 1,2,3), Author 2 (affiliation 4,5), Author 3 (affiliation 2,6), Author 4 (affiliation 2,6), Author 5 (affiliation 1,2,3,4)</p>
<p>The list is quite complex and I don't know how to include all of them properly. Any suggestions?</p>
| 0non-cybersec
| Stackexchange | 155 | 533 |
Can't disable NMI watchdog on Debian Buster in vmware context - couldn't write to kernel, unknown error 524. <p>Following <a href="https://www.pcsuggest.com/disable-nmi-watchdog-linux/" rel="nofollow noreferrer">instructions</a>, I want to disable the NMI watchdog on boot.</p>
<pre><code>sudo sh -c "echo '0' > /proc/sys/kernel/nmi_watchdog"
</code></pre>
<p>However:</p>
<pre><code>Couldn't write '0' to 'kernel/nmi_watchdog': Unknown error 524
</code></pre>
<p>How to proceed?</p>
| 0non-cybersec
| Stackexchange | 183 | 499 |
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 | 349 | 1,234 |
Why does integration of a power series introduce an $(x-a)$ and not an $x$?. <p>Given power series, say:<span class="math-container">$$f(x)= c_0+c_1(x-a)+c_2(x-a)^2+...= \sum_{n=0}^{\infty}c_n(x-a)^n $$</span></p>
<p>and when we integrate it we get the following:</p>
<p><span class="math-container">$$\int f(x) dx=C+c_0(x-a)+\frac{c_1(x-a)^2}{2}+.... $$</span></p>
<p>My question is:</p>
<p>Why do we get "<span class="math-container">$c_0(x-a)$</span>" instead of <span class="math-container">$c_0x$</span> given that we've differentiated with respect to x?</p>
| 0non-cybersec
| Stackexchange | 234 | 568 |
MacBook 15" (2017) - Battery Charging Problem. <p>Since yesterday my MacBook charges really slow, so I gave <a href="https://www.coconut-flavour.com/coconutbattery/" rel="nofollow noreferrer">coconutBattery</a> a try, and it showed that my MacBook is only charging with around 14 Watts. I am charging with an Apple 86W Power Supply.</p>
<p><img src="https://i.stack.imgur.com/ZVBPf.png" width="320"></p>
<p>So my question is with how much Watt are batteries supposed to charge?</p>
| 0non-cybersec
| Stackexchange | 159 | 489 |
Subsets and Splits