text
stringlengths
36
35k
label
class label
2 classes
source
stringclasses
3 values
tokens_length
int64
128
4.1k
text_length
int64
36
35k
I noticed a lot of you love Aldi. I'm a shift manager there. AMA and I'll tell you the truth.. Pro tips: Most companies say they're all about customer service but Aldi really is. Take advantage of this. If you're looking for something but can't find it, just ask. I guarantee they won't mumble and point in a direction. They'll physically take you there. If there is anything you want done or need help with (other than us bagging your groceries) we'll do it. Don't be "needy" but don't be afraid to ask. If you want the freshest produce arrive when we first open or right after 3pm. Always dig to the bottom of the pile though, we rotate the old produce to the top. Usually, you can put your hand on the product and if it's not cold then it has been sitting out overnight or throughout the day. It doesn't mean it's bad, it's just not the best. Our policy on throwing away bad produce is complete discretion. We ask ourselves "would you buy this?". If it's anything other than yes we pitch it. When buying meat, look at the back of the cooler or the product on the bottom, we put the closest expiration dates in the front to rotate it. Same with bread. The deeper you go the newer it is. We don't rotate anything else in the store. If you're digging to the bottom of the chip box you're wasting your time and making our lives miserable. They all have the same dates. We have a double money back guarantee on our food products. Use this to try new things you'd be hesitant to try anywhere else. If you don't like it, bring it back and we'll give you your money back *and* a similar priced product of your choice. It's a win win. You either discover something new you like or you get your money back and something you're used to. Example, you want to try our chips. You buy it and think it tastes like crap. We'll give you your $3 back and a free box of cookies. Compliment your cashier on his/her hard work. It may mean nothing to you but they are busting their ass and we hardly get encouragement or praise from our superiors. Most of the time we just get told we need to be faster, more efficient, and have better productivity. When they sit down to ring you up, that's a mini break for them because they're doing some serious physical labor when they're not ringing. It's an extremely stressful job and the workload is almost unbearable. A few kind words from a customer could make someone's day significantly better. Alright... Ask away, I'll tell you the truth whether it's good or bad. Edit: realized I posted this way too late. I need sleep. Go ahead and ask away and I promise I'll answer when I wake up. **edit two** heading off to work. Keep the questions coming and I'll answer every one after I get off work. Hope you all have enjoyed it so far.
0non-cybersec
Reddit
659
2,768
How to use node-config in typescript?. <p>After installing <code>node-config</code> and <code>@types/config</code>:</p> <pre><code>yarn add config yarn add --dev @types/config </code></pre> <p>And adding config as described in <a href="https://github.com/lorenwest/node-config" rel="noreferrer">lorenwest/node-config</a>:</p> <pre><code>// default.ts export default { server: { port: 4000, }, logLevel: 'error', }; </code></pre> <p>When I am trying to use in my app:</p> <pre><code>import config from 'config'; console.log(config.server); </code></pre> <p>I am getting the error:</p> <pre><code>src/app.ts(19,53): error TS2339: Property 'server' does not exist on type 'IConfig'. </code></pre>
0non-cybersec
Stackexchange
261
712
Simple module over $ֿ\mathbb{Z}G$ has a $\mathbb{Z}N$ composition series when $N \triangleleft G$ is nilpotent and of finite-index. <p>Assume that <span class="math-container">$M$</span> is a simple <span class="math-container">$\mathbb{Z}G$</span> module with <span class="math-container">$G$</span> finitely-generated, virtually nilpotent group.</p> <p>Take <span class="math-container">$N\leq G$</span> to be a normal, finite index, nilpotent subgroup.</p> <p>The claim is that <span class="math-container">$M$</span> has a finite-length composition series as a <span class="math-container">$\mathbb{Z}N$</span>-module. How can I see this?</p> <p>One approach I've tried: I know that a module has a finite-length composition series if and only if the module is both Artinian and Noetherian. Now in fact I can prove (with some &quot;heavier&quot; theorems) that <span class="math-container">$M$</span> is Noetherian in this case (this follows because <span class="math-container">$N$</span> is also finitely generated, and nilpotent, hence polycyclic, in essence). But, this approach doesn't use the fact the <span class="math-container">$M$</span> is simple as a <span class="math-container">$\mathbb{Z}G$</span>-module and moreoever I can't prove the descending-chain-condition anyways.</p>
0non-cybersec
Stackexchange
385
1,295
MSBuild: imported project ... Sdk.props was not found. <p>I installed Build Tools for Visual Studio 2017 and tried to build the <a href="https://github.com/DiscUtils/DiscUtils" rel="noreferrer">DiscUtils solution</a> with:</p> <pre><code>&amp; "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" DiscUtils.sln </code></pre> <p>I get for all 51 C# projects:</p> <pre><code>error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk. </code></pre>
0non-cybersec
Stackexchange
225
694
Integration of $\int \frac{\arcsin{e^x}}{e^x}dx$. <p>I've got a problem with this integral:</p> <p>$$\int \frac{\arcsin{e^x}}{e^x}dx$$</p> <p>I got such a result: $$\int\frac{\arcsin{e^x}}{e^x}dx=-\frac{\arcsin{e^x}}{e^x}-\ln|\sqrt{e^{-2x}-1}+e^{-x}|+C$$ but the wolphram alpha and the book where this integral is as an exersise give this answer:</p> <p>$$\int\frac{\arcsin{e^x}}{e^x}dx=x-e^x\arcsin{e^x}-\ln(1+\sqrt{1-e^{2x}})+C$$</p> <p>Where do I make a misteake? This is my solution:</p> <p>$$\int \frac{\arcsin{e^x}}{e^x}dx=\int \frac{e^x\arcsin{e^x}}{e^{2x}}dx $$</p> <p>Now,</p> <p>$t=e^x$</p> <p>$dt=e^xdx$</p> <p>$$\int \frac{\arcsin{e^x}}{e^x}dx=\int\frac{\arcsin{t}}{t^2}dt$$</p> <p>Now, I integrate by parts:</p> <p>$u=\arcsin{t},\ v^{'}=\frac{1}{t^2}$</p> <p>$u^{'}=\frac{1}{\sqrt{1-t^2}},\ v=-\frac 1t$</p> <p>Hence, $$\int \frac{\arcsin{t}}{t^2}dt=-\frac{\arcsin{t}}{t}+\int\frac{dt}{t\sqrt{1-t^2}}$$</p> <p>$s=\frac 1t$</p> <p>$t=\frac 1s$</p> <p>$dt=-\frac{1}{s^2}ds$</p> <p>and I get</p> <p>$$\int\frac{dt}{t\sqrt{1-t^2}}=-\int\frac{ds}{s^2\sqrt{1-\frac{1}{s^2}}\cdot \frac 1s}= -\int\frac{ds}{\sqrt{s^2-1}}=-\ln|\sqrt{s^2-1}+s|+C^{'}$$</p> <p>From this we get:</p> <p>$$\int\frac{\arcsin{e^x}}{e^x}dx=-\frac{\arcsin{e^x}}{e^x}-\ln|\sqrt{e^{-2x}-1}+e^{-x}|+C$$</p>
0non-cybersec
Stackexchange
691
1,304
Rank of matrices problem. <p>Let $A$ and $D$ be two square matrices. Let $P$ be defined as</p> <p>$P= \left( \begin{array}{ccc} A &amp; B \\ C &amp; D \end{array} \right)$. If $A$ is an invertible matrix of order $k$, show that rank $P$= $k+$rank$(D-CA^{-1}B)$. Deduce from this that if rank $P = $ rank $A$, then $D=CA^{-1}B$.</p> <p>I would appreciate any hints or ideas to show this.</p>
0non-cybersec
Stackexchange
151
393
How to create a custom layer in Keras with &#39;stateful&#39; variables/tensors?. <p>I would like to ask you some help for creating my custom layer. What I am trying to do is actually quite simple: generating an output layer with 'stateful' variables, i.e. tensors whose value is updated at each batch.</p> <p>In order to make everything more clear, here is a snippet of what I would like to do:</p> <pre><code>def call(self, inputs) c = self.constant m = self.extra_constant update = inputs*m + c X_new = self.X_old + update outputs = X_new self.X_old = X_new return outputs </code></pre> <p>The idea here is quite simple:</p> <ul> <li><code>X_old</code> is initialized to 0 in the <code>def__ init__(self, ...)</code></li> <li><code>update</code> is computed as a function of the inputs to the layer</li> <li>the output of the layer is computed (i.e. <code>X_new</code>)</li> <li>the value of <code>X_old</code> is set equal to <code>X_new</code> so that, at the next batch, <code>X_old</code> is no longer equal to zero but equal to <code>X_new</code> from the previous batch.</li> </ul> <p>I have found out that <code>K.update</code> does the job, as shown in the example:</p> <pre><code> X_new = K.update(self.X_old, self.X_old + update) </code></pre> <p>The problem here is that, if I then try to define the outputs of the layer as:</p> <pre><code>outputs = X_new return outputs </code></pre> <p>I will receiver the following error when I try model.fit():</p> <pre><code>ValueError: An operation has `None` for gradient. Please make sure that all of your ops have gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval. </code></pre> <p>And I keep having this error even though I imposed <code>layer.trainable = False</code> and I did not define any bias or weights for the layer. On the other hand, if I just do <code>self.X_old = X_new</code>, the value of <code>X_old</code> does not get updated.</p> <p>Do you guys have a solution to implement this? I believe it should not be that hard, since also stateful RNN have a 'similar' functioning.</p> <p>Thanks in advance for your help!</p>
0non-cybersec
Stackexchange
705
2,187
failing with creating ftp server. <p>so i'm tring to create an ftp server on one of the computers i had at home, but i'm keep on failing.</p> <p>so what i did:</p> <ol> <li><p>created an acount at NoIP, and got ddns. - working fine.</p></li> <li><p>set an sataic ip to the pc with the ftp server installed and running on it.(10.0.0.10:1990).</p></li> </ol> <p>3.set an port forwarding on my rotuer(dlink 6740U). <a href="https://i.stack.imgur.com/MtliB.png" rel="nofollow noreferrer">the settings</a> </p> <ol start="4"> <li><p>updated my firmware to the last one.</p></li> <li><p>speaked with my ISP provider and thay said: "we block noting".</p></li> </ol> <p>result : no connection. can some one help me? my ddns is: erlichsefi.ddns.net </p>
0non-cybersec
Stackexchange
289
752
dpkg is broken, how to recover?. <p>When I ran <code>apt-get</code>, the system said that dpkg is broken, use <code>sudo dpkg --configure -a</code> to recover, but when I ran <code>sudo dpkg --configure -a</code>, it showed the following error message:</p> <pre><code>dpkg: error: liboil0.3:amd64 0.3.16-1ubuntu2 (Multi-Arch: no) is not co-installable with liboil0.3 which has multiple installed instances </code></pre> <p>How do I fix this? Please help.</p>
0non-cybersec
Stackexchange
154
461
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
Sudo, Virtualbox, and Permission issues. (The Good, The Bad, The Ugly). <p>I'm testing a development image of Linux Mint built by myself and a friend. I'm testing it out by trying to do all the normal things that you would do in a web development workflow (Install an editor, bring up vagrant boxes, etc). While doing this I ran into an interesting permissions issue. When I tried to sudo anything in my <code>$HOME</code> directory I was met with a permission denied. for example </p> <pre><code>sudo vim ~/bad.txt </code></pre> <p>was met with:</p> <pre><code>~/bad.txt" [Permission Denied] </code></pre> <p>So as a test I created a folder in my <code>~/</code> directory and <code>chmod 777</code> it and everything worked in there. So I proceeded to install Vagrant and VirtualBox and noting seemed to go wrong until I ran vagrant up for a plain scotchbox. Where I received the following error</p> <pre><code>There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["import", "/public/home/username/.vagrant.d/boxes/scotch-VAGRANTSLASH-box/2.5/virtualbox/box.ovf", "--vsys", "0", "--vmname", "scotch-box_default_1446564755217_55786_1449843924304_26032", "--vsys", "0", "--unit", "7", "--disk", "/username/VirtualBox/Machines/scotch-box_default_1446564755217_55786_1449843924304_26032/box-disk1.vmdk"] Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interpreting /public/home/username/.vagrant.d/boxes/scotch-VAGRANTSLASH-box/2.5/virtualbox/box.ovf... OK. 0%... Progress state: VBOX_E_IPRT_ERROR VBoxManage: error: Appliance import failed VBoxManage: error: Could not create the directory '/username/VirtualBox/Machines/scotch-box_default_1446564755217_55786_1449843924304_26032' (VERR_ACCESS_DENIED) VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Appliance, interface IAppliance VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 779 of file VBoxManageAppliance.cpp </code></pre> <p>As you can see it's trying to read a folder named my username in the / directory. So it seems that not only permissions are messed up but something with the path to home is also messed up. So what we would like a little help with is understanding where we screwed up and how we can go about fixing it.</p> <p>I've looked for similar issues so I've checked </p> <pre><code>sudo su - id </code></pre> <p>and the UID is indeed 0. I really want to understand where we screwed up here so we can avoid the same mix ups in the future. Thanks.</p>
0non-cybersec
Stackexchange
839
2,609
Temptalia's review of the Too Faced White Chocolate Bar palette....ouch.. She had no mercy and [gave it a straight F](https://www.temptalia.com/too-faced-white-chocolate-eyeshadow-palette-review-photos-swatches/). According to her, there were issues with consistency, application, and wear time pretty much across the board. It's a wonder why Too Faced would even bother releasing this when the White Chocolate Chip palette was so poorly received. One would think they were trying to start fresh and do it right this time, but the quality makes it seem more like a holiday cash grab. Also, Temptalia's "look" with it, lol....barely looks like she's wearing eyeshadow at all.
0non-cybersec
Reddit
171
676
Java BigDecimal Possible Overflow Bug. <p>I was testing boundary conditions on some code involving a <code>BigDecimal</code>, and I noticed that when a <code>BigDecimal</code> is initialized with the String <code>"1e2147483647"</code> it behaves unexpectedly. It seems to have a value between <code>0</code> and <code>1e-2147483647</code>. When I try calling <code>intValue()</code>, I get a <code>NegativeArraySizeException</code>. I should note that <code>2147483647</code> is the max value of an integer on my system. Am I doing something wrong, or is this a problem with <code>BigDecimal</code>?</p> <pre><code>BigDecimal test = new BigDecimal("1e2147483647"); test.compareTo(new BigDecimal(0)); //Returns 1 test.compareTo(new BigDecimal("1e-2147483647")); //Returns -1 test.intValue(); //Throws NegativeArraySizeException </code></pre>
0non-cybersec
Stackexchange
256
846
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
The simplest way to make damn near perfect roast chicken (Thomas Keller recipe) [PICS, Glorious PICS]. Crisp, crackling skin and juicy, flavorful meat... what more can you ask for? I know everyone and their mom has blogged about this, but once I tried this chicken, I had to add my voice to the chorus. Hell, Thomas Keller said this would be his choice for his last meal and I don't blame him. See below for my version. I brined mine, but I've made it since without the brine and it was still damn good. This also looks damn impressive, so if you want to show off a bit, it's a good dish for that, without requiring you to slave over the stove for hours on end. Without further ado... [Thomas Keller's roast chicken: Food, By Z style](http://www.foodbyz.com/2010/07/06/thomas-kellers-last-meal-roast-chicken/).
0non-cybersec
Reddit
219
814
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
Can a problem be solved if value of $z$ is not given?. <p>Can a problem like the following be solved with Cramer's rule?</p> <p>$\left\{\begin{array}{l} &amp;8x+6y-3z=42\\ &amp;3x-6y+z=18\\ &amp;4x-3y-12=0\\ \end{array}\right.$</p> <p>In this problem $z$ is not given for the 3rd equation.</p> <p>Can a such problem be solved in this case? How? </p>
0non-cybersec
Stackexchange
148
353
python-augeas, yum update error in CentOS7. <p>I'm coming across this error below when I run: <code>sudo yum update</code></p> <pre><code>Downloading packages: No Presto metadata available for base python-augeas-0.5.0-2.el7.noarch.rpm | 25 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : python-augeas-0.5.0-2.el7.noarch 1/2 Error unpacking rpm package python-augeas-0.5.0-2.el7.noarch error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info: cpio: rename Verifying : python-augeas-0.5.0-2.el7.noarch 1/2 python-augeas-0.4.1-5.el7.noarch was supposed to be removed but is not! Verifying : python-augeas-0.4.1-5.el7.noarch 2/2 Failed: python-augeas.noarch 0:0.4.1-5.el7 python-augeas.noarch 0:0.5.0-2.el7 Complete! </code></pre> <p>I see that the update is expecting a file to be removed. My plan was to find it and remove and then try the update again. However, <code>find -iname "python-augeas-0.4.1-5.el7.noarch"</code> doesn't return anything for me, so I have my doubts that removing that file is the way to go.</p> <p>Admittedly I'm not a sys admin or even very competent when it comes to stuff like this. Any help is appreciated. Thanks.</p> <hr> <p>EDIT 1:</p> <p>As suggested by Michael Hampton, here are the permissions and attributes:</p> <pre><code>$ ls -ld /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info drwxr-xr-x. 2 root root 4096 Jun 29 2015 /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info $ lsattr -d /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info ---------------- /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info </code></pre> <hr> <p>EDIT 2:</p> <p>I uninstalled the package with <code>sudo yum remove python-augeas</code>. I then reinstalled with the following error:</p> <pre><code>$ sudo yum install python-augeas Loaded plugins: fastestmirror, langpacks, remove-with-leaves Loading mirror speeds from cached hostfile * base: mirrors.rit.edu * epel: mirror.steadfast.net * extras: centos.chi.host-engine.com * nux-dextop: mirror.li.nux.ro * updates: mirrors.rit.edu Resolving Dependencies --&gt; Running transaction check ---&gt; Package python-augeas.noarch 0:0.5.0-2.el7 will be installed --&gt; Finished Dependency Resolution Dependencies Resolved ====================================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================================== Installing: python-augeas noarch 0.5.0-2.el7 base 25 k Transaction Summary ====================================================================================================================================================== Install 1 Package Total download size: 25 k Installed size: 71 k Is this ok [y/d/N]: y Downloading packages: python-augeas-0.5.0-2.el7.noarch.rpm | 25 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python-augeas-0.5.0-2.el7.noarch 1/1 Error unpacking rpm package python-augeas-0.5.0-2.el7.noarch error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/python_augeas-0.5.0-py2.7.egg-info: cpio: rename Verifying : python-augeas-0.5.0-2.el7.noarch 1/1 Failed: python-augeas.noarch 0:0.5.0-2.el7 Complete! </code></pre> <hr> <p>EDIT 3:</p> <p>Michael Hampton was correct about the permissions of my directory:</p> <pre><code>$ ls -ld /usr/lib/python2.7/site-packages/ drwxr-xr-x. 161 root root 12288 Jan 14 12:47 /usr/lib/python2.7/site-packages/ </code></pre> <p>Solution:</p> <pre><code>sudo chmod 777 /usr/lib/python2.7/site-packages/ sudo yum install -y python-augeas </code></pre>
0non-cybersec
Stackexchange
1,371
4,729
Extract substring of characters from column. <p>I have a column in SharePoint containing information like this:</p> <p><b>ABCD-D-12345678-10012-.PDF<p> XYZAB-D1-87654321-2110-.PDF<p> ABCD-D0-12345678-10012-.PDF<p> XYZAB-D1-87654321-2110-.PDF<p></b></p> <p>I need to break down this file name into the following groups:<p></p> <p><b>Product#</b> (first part of the string, includes the first dash)<p></p> <p>ABCD-D<p> XYZAB-E1<p> ABCD-A0<p> XYZAB-D1<p></p> <p><b>Serial#</b> (second part of the string, ignores dashes)<p> 12345678<p> 87654321<p> 12345678<p> 87654321<p></p> <p><b>Part#</b> (third part of the string, ignores dashes)<p> 10012<p> 2110<p> 10012<p> 2110<p></p> <p>I'm having a hard time getting <b>"LEFT"</b>; <b>"MID"</b> and <b>"RIGHT"</b> to ignore the first dash to create the first group. The same is true finding the items that are in the mid section. </p> <p>I've tried this <b>=LEFT(Name1,INT(FIND("-",Name1)))</b> but I need it to include the first dash and the rest of the characters until the next dash.</p> <p>The goal is to be able to create three calculated columns where each one of them extracts the data as described above. </p>
0non-cybersec
Stackexchange
450
1,167
What does Keccak being &quot;efficiently invertible&quot; mean?. <p>Reading through <a href="https://en.wikipedia.org/wiki/SHA-3#Security_against_quantum_attacks" rel="nofollow noreferrer">Wikipedia</a>, I saw this:</p> <blockquote> <p>It has been shown that the Merkle–Damgård construction, as used by SHA-2, is collapsing and, by consequence, quantum collision-resistant, but for the sponge construction used by SHA-3, the authors provide proofs only for the case that the block function f is not efficiently invertible; Keccak-f[1600], however, is efficiently invertible, and so their proof does not apply.</p> </blockquote> <p>So:</p> <ol> <li><p>What does "efficiently invertible" mean in this case? It isn't reversible (as in decryption), so what else could that mean?</p></li> <li><p>Why is Keccak invertible? Is it by design or did they not bother as it's not important?</p></li> </ol>
0non-cybersec
Stackexchange
268
899
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
Events?. If Niantic ends up doing periodic events like most other noble games, what kind of events would you guys like to see? Off the top of my head I can think of a few possible events, some better than others. • catch event - ranking event based on number of Pokemon caught within a set amount of time. • personal raid - during the special event raid Pokemon have a chance to spawn on a personal level, ranking based on how many of these Pokemon were found and captured or found and defeated in battle. • team raid - one massive over leveled Pokemon spawns that anybody can attack, the team that deals the most damage wins. • gym capture event - event points earned by capturing event gyms during the event. • pokestop visit event - ranking based on how many pokestops visited during the event. What kind of events would you like to see happen once the game is out?
0non-cybersec
Reddit
201
875
Whether a series is convergent or divergent. <p>Is it true that if $\sum u_n$ is convergent, where $u_n$'s are positive real numbers then $\sum \dfrac{u_1+u_2+...+u_n}{n}$ is divergent?</p> <p>I know that if $\lim_{n\to\infty}u_n =0$ then $\lim_{n\to\infty}\dfrac{u_1+u_2+...+u_n}{n}=0$ and it is the necessary condition for a series to be convergent.</p> <p>Someone help please.</p>
0non-cybersec
Stackexchange
149
388
Can I standardly use transformation facts to solve an equation or to find the zeros of a function? ( Example of horizontal stretch).. <ul> <li>Suppose I am asked to find the zeros of :</li> </ul> <p><span class="math-container">$$g(x)= - \frac 12 (\frac 19x^2 - 4)^2$$</span>. </p> <ul> <li>Is the following reasoning formally correct: </li> </ul> <p>(1) <span class="math-container">$g(x)= f(\frac 13 x)$</span> with <span class="math-container">$f(x)= - \frac 12 (x^2 - 4)^2$</span>. </p> <p>(2) I know that in general, if <span class="math-container">$g(x)=f(kx)$</span> then <span class="math-container">$g = \{(\frac xk, y) | (x,y)\in f\}$</span>. </p> <p>(3) The set of all points in <span class="math-container">$f$</span> with a null <span class="math-container">$y$</span> cordinate is : <span class="math-container">$\{ (-2, 0) , (2,0) \}$</span> , since </p> <p><span class="math-container">$ - \frac 12 (x^2 - 4)^2 = 0 \iff (x^2 - 4)^2 = 0 \iff (x^2 - 4)=0 \iff x^2 = 4$</span> <span class="math-container">$ \iff (x=2 \lor x=-2)$</span>. </p> <p>(4) So, the set of all points in <span class="math-container">$g$</span> with a null <span class="math-container">$y$</span>-coordinate is : </p> <p><span class="math-container">$\{(\frac {-2}{k}, 0), (\frac {2}{k}, 0) \} = \{ ( \frac {-2}{\frac 13}, 0), (\frac {2}{\frac 13}, 0)\} = \{( -6,0), (6,0)\}$</span></p> <p>(5) Therefore, the zeros of function <span class="math-container">$g$</span> are <span class="math-container">$x=-6$</span> and <span class="math-container">$x=6$</span>. </p> <p>My question : is using transformation facts a valid way of solving an equation or of finding the zeros of a function? Incidentally, is it standardly accepted in an exam? </p>
0non-cybersec
Stackexchange
647
1,741
Import font, straight integral symbol. <p>I tried a lot (2 days) and try to find a way to extend a answer </p> <p><a href="https://tex.stackexchange.com/questions/304656/using-xits-with-pdflatex">Using XITS with pdflatex</a></p> <p>but I am unable to understand the method here. How do I extend above answer to include vertical closed integrals like '\oint'</p> <p>I have been using straight vertical integral symbols so far and now I need closed integral. How do I do that</p> <p><a href="https://i.stack.imgur.com/u2rSv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u2rSv.jpg" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
217
649
Search and replace in a range of line and column. <p>I want to apply a search and replace regular expression pattern that work only in a given range of line and column on a text file like this : </p> <pre><code>AAABBBFFFFBBBAAABBB AAABBBFFFFBBBAAABBB GGGBBBFFFFBHHAAABBB </code></pre> <p>For example i want to replace BBB with YYY in line range 1 to 2 and from column 4 to 6, then obtaining this output : </p> <pre><code>AAAYYYFFFFBBBAAABBB AAAYYYFFFFBBBAAABBB GGGBBBFFFFBHHAAABBB </code></pre> <p>Is there a way to do it with Vim ?</p>
0non-cybersec
Stackexchange
189
542
Hey /r/Mac! I am at the South Pole for a year and my MacBook Pro doesn't have GarageBand on it as I assumed it would! We don't have the bandwidth for iTunes so I need help!. Hello, all. As stated I am at the South Pole for a year. I just arrived a couple of weeks ago and brought with me my newly purchased factory refurbished 2014 MacBook Pro, which is my first ever Apple anything. I will be here for a year and I was very much looking forward to using GarageBand to help me learn a new instrument since I will have a decent amount of free time on my hands. However, to my confusion GB isn't installed on my machine, and we do not have the bandwidth to connect to iTunes, let alone the bandwidth to be able to download the app and the libraries from anywhere else. Can anyone help me with any kind of DVD/USB with the app and the libraries on it? Flat-pack mail such as small padded envelopes make it here pretty quickly and I would gladly reimburse the sender the shipping fees for Priority Mail. Again, I am new to Mac and do not know what my options are in this situation, so I appreciate your time and consideration.
0non-cybersec
Reddit
260
1,125
Naive Question About Quantifiers: for all, for some, where, and given.... <p>I was bumped into a question related to quantifiers: and was wondering if anyone can give me a further explanation for the following four statements:</p> <p>Let <span class="math-container">$f: \mathbb{R} \to \mathbb{R}$</span> be a function,</p> <blockquote> <p>Statement 1: Given <span class="math-container">$\epsilon&gt;0$</span>, <span class="math-container">$|f(x)|&lt;\varepsilon$</span></p> <p>Statment 2: <span class="math-container">$|f(x)|&lt;\varepsilon$</span> for all <span class="math-container">$\varepsilon&gt;0$</span></p> <p>Statment 3: <span class="math-container">$|f(x)|&lt;\varepsilon$</span> where <span class="math-container">$\varepsilon &gt;0$</span>.</p> <p>Statment 4: <span class="math-container">$|f(x)| &lt; \varepsilon$</span> for some <span class="math-container">$\varepsilon&gt;0$</span>.</p> </blockquote> <p>I think statement 1 and statement 2 are equivalent and statement 3 and stamens 4 are equivalent. Is my understanding correct?</p> <p>Thank you.</p> <p>[Updated Comment] For sure this is not a homework question, since I been argued with my friend about this topic so I'm trying to seek a more crystal clear way to enhance my understanding..</p>
0non-cybersec
Stackexchange
396
1,267
Process is disabled in VS2010 attach to process dialog. <p>I have a VS2010 running on a WTS machine (Windows2008). I'm trying to attach the debugger into a process. The process is running a WPF client. The process is presented in the attach to process dialog, but grayed out and the attach button is disabled.</p> <p>I read through the discussions, and confirmed managed code is enabled for debugger, with no luck. Here are two screenshots representing the current situation (in the first image, the process I'm trying to debug is marked in blue - please note I'm running as admin):</p> <p>snapshot goes here - but was removed by stack overflow...</p> <p>After trying the automatic code type selection, I tried the manual way, with no luck. Here is the screenshot:</p> <p>snapshot goes here - but was removed by stack overflow...</p> <p>Any help would be appreciated.</p> <p>Thanks, Busi</p>
0non-cybersec
Stackexchange
238
898
XCTestCase with Auth0: How to dismiss security alert “XXXX” Wants to Use “auth0.com” to Sign In. <p>So recently Apple introduced this prompt: “XXXX” Wants to Use “auth0.com” to Sign In Where “XXXX” is the ios app name.</p> <p><a href="https://i.stack.imgur.com/ajYob.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ajYob.png" alt="enter image description here"></a></p> <p>This alert/dialog comes up when in the case of Auth0 the user clicks on “Login with Google” or “Login with Facebook”. That’s all nice but when running IOS UI tests, this dialog doesn’t go away when using the usual way of dismissing system dialogs:</p> <pre><code>func doUserLogin(_ app: XCUIApplication) { app.staticTexts["notLoggedInActivelabel"].tap() // this will bring up oauth0 login window in ios // setup a handler to dismiss the system alert let handler = self.addUIInterruptionMonitor (withDescription: "allow oauth") { (alert) -&gt; Bool in // code should come here where the dialog is presented, // but it never does .... alert.buttons["Continue"].tap() // click Continue Button return true } // click the login with GOOGLE button. This brings up dialog “XXXX” Wants to Use “auth0.com” to Login app.scrollViews.otherElements.buttons["LOG IN WITH GOOGLE"].tap() // this step is required when using addUIInterruptionMonitor app.tap() removeUIInterruptionMonitor(handler) } </code></pre> <p>It kinda makes sense to me: This is a security system dialog introduced by Apple in order to improve security. Having it easily dismissed in the code would defeat the purpose.<br> But still, anyone knows if it's possible to dismiss this dialog in an XCTestCase?</p>
0non-cybersec
Stackexchange
490
1,736
How to get enumerated captions below Tikz pictures?. <p>I did some dirty stuff in order to get the captions (i) and (ii) as seen below.</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://i.stack.imgur.com/lw7z2.jpg" alt="tikzwithcap"></p> <p>Basically what I did was add nodes (i) and (ii). The code used was basically the one given in <a href="https://tex.stackexchange.com/a/233398/25723">this</a> answer. It might be important to mention that this was done within two minipages, each with its own tikzpicture.</p> <p>How can I do this in a proper way?</p> <p>An ideal solution would contemplate different sorts of enumerations (letters, numerals, etc).</p>
0non-cybersec
Stackexchange
267
818
Why is Windows 7 throttling my laptop CPU?. <p>I have been dealing with this problem for <em>months</em>. </p> <h2>The Computer</h2> <ul> <li><strong>Model</strong>: Dell XPS M1330 (<a href="http://reviews.cnet.com/laptops/dell-xps-m1330/4507-3121_7-32465545.html" rel="nofollow noreferrer">specs found here</a>; I have the full 4GB of RAM)</li> <li><strong>Age</strong>: 3+ years</li> <li><strong>OS</strong>: Windows 7 Professional x64</li> </ul> <h2>Problem Investigation</h2> <p>One day I noticed that my computer was intermittently experiencing major slowdowns. It was to the point where there are sometimes several seconds of delay between me pressing a key and the character appearing on the screen. At first I thought that a Chrome update was causing the browser to eat all of my CPU, but eventually I figured out it was happening even when Chrome wasn't open. Finally I got the bright idea to use the Resource Monitor and noticed that Windows was routinely throttling my CPU to 25%.</p> <h2>What I've Tried</h2> <ul> <li>I checked the health of my disk drive and ran pretty much every system maintenance utility that Windows ships with and the problem persisted. </li> <li>I have systematically played with power settings</li> <li>After some Google searching, I found out that the most common reason for this is overheating. So I did the following: <ul> <li>Had all my fans cleaned</li> <li>Had the thermal paste on the heatsinks replaced</li> <li>Used SpeedFan to confirm that temperatures are all normal (except for the GPU, which is apparently normal for this model).</li> </ul></li> </ul> <p>The problem persists. In fact, sometimes it's even worse now. If I really need to I'll suck it up and buy a new one, but I would like advice on how to proceed from here.</p>
0non-cybersec
Stackexchange
514
1,787
How can I generate keypairs, and check the public key against a known public key to check for a match?. <p>Running on headless Ubuntu Linux. I would like to use <a href="https://github.com/SjorsO/keys-generator" rel="nofollow noreferrer">this keypair generator</a>, and check the public keys generated with each run against a single other public key.</p> <p>I know that "recovering" a lost private key is impossible and what not. But I'm not asking if this is a good or bad idea, I'm asking how I can accomplish the process of generating the keypairs and checking the public key. The address I'm checking against is pre-HD wallets. I don't know if that makes a difference, but may be relevant.</p> <p>Consider this a proof-of-concept, demonstration. I would like to generate the keys, compare against the known public key string, then if a match is found: record the public and private key information to a file.</p> <p>I'm thinking I would grep/sed this, or maybe awk, but ultimately, need some direction.</p>
0non-cybersec
Stackexchange
265
1,014
Finding half a diagonal in a rhombus using trigonometric ratios?. <p>So, if you take a rhombus, then call the bottom left hand corner $A$, the top left hand corner $B$, the top right hand corner $C$, and the bottom right hand corner $D$. Then draw the two diagonals. </p> <p>The angle of the bottom left hand corner is $60°$. The side lengths are $10$ cm. Call the point where the diagonals bisect each other $X$. I have to find the distance of $AX$.</p>
0non-cybersec
Stackexchange
132
456
How to call data datafetch function only after data is completely store in core data in swift?. <p>I am getting some data from API which I am storing in core data, and retrieving that data stored in core data and displaying it on collectionview.</p> <p>Currently i m facing issue like. my data fetching function is getting called before data stored in function completion hence getting 0 records first time.</p> <pre><code>override func viewDidLoad() { super.viewDidLoad() self.fetchExchangeRateData() // API calling + saving data to core data self.retrieveExchangeRateData(). // data fetching from core data } @objc func fetchExchangeRateData() { if isConnectedToInternet() == true { let webserviceURLNew = webserviceURL + &quot;live?access_key=&quot; + accessToken + &quot;&amp;format=1&quot; Webservice.shared.getExchangeRateData(with: webserviceURLNew) { (exchangeRateData, error) in if error != nil { return } guard let exchangeRateData = exchangeRateData else {return} self.exchangeRateData = exchangeRateData CoreManager.shared.saveExchangeRateData(exchangeRate: self.exchangeRateViewModel!.exchangeRate) } } else { showAlert(title: &quot;No Internet Connection&quot;, message: &quot;Please check your internet connection&quot;) } } </code></pre> <p>Please suggest the way yo handle this problem.</p>
0non-cybersec
Stackexchange
372
1,546
UWP - TextBox is missing the line feed (\n) character in Windows 10 build 14393. <p>After retargeting my UWP project to Windows 10 build 14393 (Anniversary update) I found that the line feed (<strong>\n</strong>) character is missing from the output Text when I press enter in a TextBox with <code>AcceptsReturn="True"</code>. When I retarget back to 10240, pressing enter in the TextBox produces the expected CR+LF characters i.e. <strong>\r\n</strong>.</p> <p>If this is a feature and not a bug, what can I do to bring back the classic TextBox behavior when pressing enter adds both CR and LF characters to the output Text?</p>
0non-cybersec
Stackexchange
168
631
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
SVN - Using branch for beta release of game and advise for repository layout?. <p>I'm setting up the SVN repository for my hobby game project.</p> <p>I have the main version of the game and a beta version. The game is already online with a few players. The beta version is isolated from the main game and is used to test new features and changes which might break the main game.</p> <p>For the beta version I would like to use a branch. Majority of the codebase is just the same with a few variations so using a branch seems the most sensible option. The branch would be pretty much permanent. Certain approved features would eventually be moved to the main version.</p> <p>For the main version I'm using the trunk.</p> <p>This is how my repository layout would look like:</p> <pre><code>/ trunk/ source branches/ Dev-July-2020/ source BETA/ source tags/ 1.0.0/ source 1.0.1/ source 1.0.2/ source ...etc </code></pre> <p>Is it OK to have a permanent branch like that? According to the SVN handbook branches normally have a finite lifespan. Here my 'Dev-July-2020' branch is a temporary one like that and is used for normal development work for the main version (small changes and bugfixes). These will be eventually be merged back to the trunk and the branch would be deleted. The source in the trunk is pretty much stable and the tags are snapshots of the trunk.</p> <p>Does my repository layout look decent or are there things that I should definitely change/reconsider?</p>
0non-cybersec
Stackexchange
402
1,606
Dependency of the properties of numbers&#39; subsets. <p>Let $a$ be the number of different sums of all the subsets of a set $A$ of $n$ real numbers (let's suppose the sum of an empty set is $0$). Let $b$ be the number of ordered pairs of the subsets of $A$ with the same sums (the subsets in the pair may be the same one, but they are in that case only one pair). Prove that $6^n\ge ab$<br/> <br/>I don't know if it will have any use but I figured out that the number of subsets is $2^n$, $2^n\ge a\ge 1$, $(2^n\cdot(2^n-1))\ge b\ge2^n$. $b$ for a subset of subsets with the same sum is increasing faster than the number of subsets inside this subset. Experimenting I only managed to receive sums of $2$s with different exponents.</p>
0non-cybersec
Stackexchange
217
736
python38, python3, python 2.7, and python 3.8, a file called &quot;secretstorage&quot; and some serious file differences. <p>I have Xubuntu based on 20.04. A newish install. My security is a VPN and the firewall from the router. </p> <p>I have python2.7, python3(no decimal), and python3.8. python3 is VERY different from the others. It includes a folder and filed called "secretstorage" that I assumed was an easter egg. Many files in there seem to be appended with x.egg.info. </p> <p>In /etc, all three have a single file. python3 has one marked debian_config. The others have a file called sitecustomized.py</p> <p>Under the /bin folder, python2.7 and python3.8 seem normal to my untrained eye. python3 has a folder filled with dist-packages that looks like the install pkgs of games and emulators I got from Lutris, recently. Many end with .egg.info and there is one called secretstorage, which originally made me laugh. It contained what was at least one clearly a joke file(I haven't looked at the others) that pretended to be a file accidentally partially decoded. I don't specifically remember doing a hash check, but I have been consistent about it since learning about them. </p> <p>The secretstorage file has some sort of wiki entry that makes it seem legit. There also seems to be a redirect to python2.7.1 a couple of levels inside the python3 directory that I have not taken a pic of, yet.</p> <p>I have not deleted anything because I am not sure I would get it all and also for documentation. Plus, I am not sure if it is a joke, tbh. I have many pictures of it all, though.</p> <p>So, should I delete this as malware that I somehow got from Lutris.com or perhaps a man-in-the-middle situation, I guess? </p> <p>Am I being pranked, or is this a legit problem? Some Bing searches, and a search of LinuxQuestions, as well as Ask Ubuntu find no matches to secretstorage, python38, python3(no decimal).</p>
0non-cybersec
Stackexchange
535
1,944
Today is my Birthday and no one remembered. I mean no one! I have a sort of SO (its complicated at the moment) who has know me as a friend for 10 years! He even forgot. I talked with several friends about my Birthday last week. They forgot. I'm not a kid and Birthdays aren't a huge deal but I'm just so tired of reminding people that I excist. I always remember everyone's Birthdays and try to let them know they are loved. If moneys tight I make them a present but I always do something for the people I love. EDIT to add I bought myself a switch for my birthday and breath of the wild. I've been enjoying it lots. Decided to spoil myself I just want someone to do the same for me someday and I'm now 29. I want to feel like someone genuinely cares about me. Okay end rant. Bed time. EDIT so I didn't check my inbox for two weeks or my posts and my inbox is flooded with beautiful messages. You guys are amazing! The day didn't get much better but the last two weeks got better and I've been happily busy. Thank you all so much for the messages, comments and awards! Like omg thank you
0non-cybersec
Reddit
275
1,103
Sell me distributed revision control. <p>I know 1000s of similar topics floating around. I read at lest 5 threads here in SO But why am I still not convinced about DVCS?</p> <p>I have only following questions (note that I am selfishly worried only about Java projects)</p> <ul> <li>What is the advantage or value of committing locally? What? really? All modern IDEs allows you to keep track of your changes? and if required you can restore a particular change. Also, they have a feature to label your changes/versions at IDE level!?</li> <li>what if I crash my hard drive? where did my local repository go? (so how is it cool compared to checking in to a central repo?)</li> <li>Working offline or in an air plane. What is the big deal?In order for me to build a release with my changes, I must eventually connect to the central repository. Till then it does not matter how I track my changes locally.</li> <li>Ok Linus Torvalds gives his life to Git and <em>hates</em> everything else. Is that enough to blindly sing praises? Linus lives in a different world compared to offshore developers in my mid-sized project?</li> </ul> <p>Pitch me!</p>
0non-cybersec
Stackexchange
320
1,148
What is the difference between Cond and Case?. <p>In the Elixir programming language, there are two similar constructs <code>cond</code> and <code>case</code>. Both resemble the <code>switch</code> or <code>select</code> statements from other langages</p> <p>both <code>cond</code> and <code>case</code> are described on <a href="https://elixir-lang.org/getting-started/case-cond-and-if.html#case" rel="noreferrer">this page</a></p>
0non-cybersec
Stackexchange
138
434
Working with SAML 2.0 in C# .NET 4.5. <p>I am trying to use pure .NET (no external classes, controls, helpers) to create a SAML message. I found some code on the interwebs; this is what I have:</p> <pre><code>private static SamlAssertion createSamlAssertion() { // Here we create some SAML assertion with ID and Issuer name. SamlAssertion assertion = new SamlAssertion(); assertion.AssertionId = "AssertionID"; assertion.Issuer = "ISSUER"; // Create some SAML subject. SamlSubject samlSubject = new SamlSubject(); samlSubject.Name = "My Subject"; // // Create one SAML attribute with few values. SamlAttribute attr = new SamlAttribute(); attr.Namespace = "http://daenet.eu/saml"; attr.AttributeValues.Add("Some Value 1"); //attr.AttributeValues.Add("Some Value 2"); attr.Name = "My ATTR Value"; // // Now create the SAML statement containing one attribute and one subject. SamlAttributeStatement samlAttributeStatement = new SamlAttributeStatement(); samlAttributeStatement.Attributes.Add(attr); samlAttributeStatement.SamlSubject = samlSubject; // Append the statement to the SAML assertion. assertion.Statements.Add(samlAttributeStatement); //return assertion return assertion; } </code></pre> <p>and here is the code I am using to get the XML:</p> <pre><code>var sb = new StringBuilder(); var settings = new XmlWriterSettings { OmitXmlDeclaration = true, Encoding = Encoding.UTF8 }; using (var stringWriter = new StringWriter(sb)) using (var xmlWriter = XmlWriter.Create(stringWriter, settings)) using (var dictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(xmlWriter)) { var samlAssertSerializer = new SamlSerializer(); var secTokenSerializer = new WSSecurityTokenSerializer(); assertion.WriteXml( dictionaryWriter, samlAssertSerializer, secTokenSerializer ); } </code></pre> <p>This seemed like it was going to work. However, the message is produces is SAML version 1.0 - I need to work with 2.0.</p> <p>I know I can do some sloppy work and replace some values here and there and this system would work fine. There are very little differences in the message, version being the most important. I am having a hard time finding information on SAML 2.0 for .NET. I do know SAML 2.0 was implemented into .NET recently. I am using Framework 4.5 so I should have access to it. The MSDN page for SamlAssertion says the "majorVersion" is a constant, always set to '1'.</p> <p>I'm guessing there is another namespace I could be working with, but I haven't found it. My requirement is just to get the XML SAML message. I don't need to sign with X509, I don't need the token. Just the SAML XML message.</p> <p>Again, this is a question trying to find out how to do this in native .NET. I have found several SAML helpers and lots of code on how to build the message manually- I'm trying to find the CORRECT solution, if it exists.</p> <p>EDIT: I have found I can use Saml2Assertion. However, I am unable to find a way to get the SAML message written to xml now.</p> <p>EDIT2: I have found how to write the Saml2Assersion object to xml. Sadly, it does not keep the SAML syntax, it writes in pure XML without <code>&lt;saml&gt;</code> tags.</p>
0non-cybersec
Stackexchange
931
3,307
How to quit TeX in interactive mode on CLI in Windows 10?. <p>Suppose I have a file named <code>demo.tex</code> containing:</p> <pre><code>\hrule \vskip 1in \centerline{\bf A SHORT STORY} \vskip 6pt \centerline{\sl by A. U. Thor} \vskip .5cm Once upon a time, in a distant galaxy called \"O\"o\c c, there lived a computer named R.~J. Drofnats. Mr.~Drofnats---or ‘‘R. J.,’’ as he preferred to be called---was happiest when he was at work typesetting beautiful documents. \vskip 1in \hrule \vfill\eject </code></pre> <p>I open <code>cmd</code> on Windows 10 then excute <code>C:\&gt;tex demo.tex</code>. Then there is a star or two stars in the next line. Knuth said that use <code>\relax</code> to quit, but it doesn't works for me. How could I quit?</p> <p>By the way, could I use TeXstudio to run <code>demo.tex</code>?</p>
0non-cybersec
Stackexchange
295
828
Implicit Function Theorem Help in a Macroeconomic Model. <p>I'm having trouble with this problem:</p> <p>"A macroeconomic model contains the following equations characterizing its steady state:</p> <p>$1=B(f'(K)+1-Y)$</p> <p>$C+YK=f(K)$</p> <p>$B$ and $Y$ are parameters between $0$ and $1$.</p> <p>The question is, "do these equations implicitly define $C$ and $K$ as $C^1$ functions of $Y$ in an open ball around $(C^*,K^*)$? If so find the derivatives of these implicit functions with respect to $Y$.</p> <p>Now I have no problem doing implicit function theorem problems in my textbook. But I don't know where to start with this one. Help! Can I just take the derivative of $f(k)$ and plug it into the first function?</p> <p>EDIT: Here is what I know about $f$: $$f:\mathbb{R}^+ \to \mathbb{R}^+ , f \in C^2 \text{ and } f' &gt; 0, f'' &lt; 0.$$</p>
0non-cybersec
Stackexchange
289
861
Transitivity of dual operators. <p>Near the end of this proof of Burnside's theorem: <a href="https://core.ac.uk/download/pdf/82680953.pdf" rel="nofollow noreferrer">https://core.ac.uk/download/pdf/82680953.pdf</a>, it says that it should be clear that since <span class="math-container">$\mathcal{A}$</span> acts transitively on the vector space, the operators dual to things in <span class="math-container">$\mathcal{A}$</span> should act transitively on the dual space.</p> <p>In other words, given any two non-zero functionals <span class="math-container">$f,f'$</span> on <span class="math-container">$V$</span>, there should be some <span class="math-container">$A \in \mathcal{A}$</span> such that <span class="math-container">$f(Av)=f'(v)$</span> for all <span class="math-container">$v$</span>. And all we know is that for any non-zero <span class="math-container">$w,w'$</span> there is an <span class="math-container">$A\in \mathcal{A}$</span> such that <span class="math-container">$Aw=w'$</span>.</p> <p>I can't think of any easy explanation for this (that doesn't rely on already having proved the theorem). Can anyone help?</p>
0non-cybersec
Stackexchange
359
1,145
On the conditions of a Riemann integral substitution. <p>Consider the following statement: </p> <blockquote> <p>Consider two functions <span class="math-container">$f:[a,b]\to \mathbb{R}$</span> and <span class="math-container">$\phi:[c,d]\to [a,b]$</span> with the following properties:<br> 1)<span class="math-container">$f$</span> is continuous<br> 2)<span class="math-container">$\phi$</span> is bijective, <span class="math-container">$\phi$</span> and <span class="math-container">$\phi^{-1}$</span> are differentiable and their derivatives are continuous.<br> Then <span class="math-container">$$\int_a^b f(x)dx=\int_{\phi^{-1}(a)}^{\phi^{-1}(b)}f(\phi(t))\phi'(t)dt.$$</span></p> </blockquote> <p>The proof given in my textbook goes as follows:<br> Let <span class="math-container">$F:[a,b] \to \mathbb{R}$</span> be an antiderivative of <span class="math-container">$f$</span> (it exists since <span class="math-container">$f$</span> is continuous). Then <span class="math-container">$\int_a^b f(x)dx=F(b)-F(a)(1)$</span>.<br> By the chain rule, we have that <span class="math-container">$(F\circ \phi)'(t)=F'(\phi(t))\phi'(t)=f(\phi(t))\phi'(t)$</span>, which shows that <span class="math-container">$F\circ \phi$</span> is an antiderivative of <span class="math-container">$(f\circ \phi)\cdot \phi'$</span>.<br> As a result, <span class="math-container">$\int_{\phi^{-1}(a)}^{\phi^{-1}(b)}f(\phi(t))\phi'(t)dt=(F\circ \phi)(t) |_{\phi^{-1}(a)}^{\phi^{-1}(b)}=F(b)-F(a)(2)$</span>.<br> From <span class="math-container">$(1)$</span> and <span class="math-container">$(2)$</span> we reach the desired conclusion.<br> My question is: why is it necessary that <span class="math-container">$\phi$</span> and <span class="math-container">$\phi^{-1}$</span> have continuous derivatives? Wouldn't it be enough if they were just Riemann integrable?</p>
0non-cybersec
Stackexchange
646
1,868
Chinese remainder theorem, can&#39;t figure it out!. <p>x mod 5 = 3</p> <p>x mod 7 = 5</p> <p>x mod 11 = 7</p> <p>How to determine x? I've been searching on YouTube, but they're giving examples in different ways, for example </p> <p>x ≡ 1(mod 3)</p> <p>I don't understand it, is it the same as x mod 3 = 1? Thanks, Im still new and quite slow at math, I'm trying to understand it still </p>
0non-cybersec
Stackexchange
145
398
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
SSRS: Error Getting the Fields And Parameters for a shared Dataset based on a Stored Procedure. <p>I am using SSRS and adding a shared dataset based on a stored procedure with parameters. When I go to refresh the fields so Visual Studio adds the correct parameters and fields, sometimes I get the following error message: </p> <blockquote> <p>Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct. </p> </blockquote> <p>The detail message is </p> <blockquote> <p>Procedure or function 'SP NAME' expects parameter '@parameter name', which was not supplied.</p> </blockquote> <p>The problem happens quite randomly. Sometimes it works, other times it doesn't. Doesn't matter what is inside the stored procedure. Without the fields and parameter list, you can not add the data set to a report. </p> <p>Thanks!</p>
0non-cybersec
Stackexchange
233
900
All the zeroes of $p(z)$ lie inside the unit disk. <p>Let $p(z) = c_0 + c_1z + c_2z^2 + \dots + c_nz^n$ where $0 \le c_0 \le c_1 \le \dots \le c_n$. I would like to show that all zeroes of this polynomial lie inside the unit disk by applying Rouche's theorem to the polynomial $(1-z)p(z)$. I'm not completely sure how to do this. Using the given, information I can deduce that $$|(1 - z)p(z)| \le |c_nz^{n+1}|$$</p> <p>on the unit circle, but this doesn't really match the assumptions of Rouche's theorem. </p> <p>Help would be appreciated.</p>
0non-cybersec
Stackexchange
200
550
.htaccess RewriteRule, send requests to PHP script. <p>I'm trying to protect user uploaded files in directory /secret. I created a htaccess file and placed it into that directory.</p> <pre><code>RewriteBase /secret/ RewriteCond %{REQUEST_URI} !^download.php.*$ RewriteRule .* download.php [QSA,L] #send request to php script, that script sends out the file if user is authenticated </code></pre> <p>This is working very well, as long as all the files are in that /secret directory. The problem comes when there are subdirectories, for example /secret/subfolder/document.txt. Now when I request this file with my browser, Apache sends out the file. It will not be rewritten by the rewriterule, and anyone can download that file.</p> <p>Is there any trick that I could use to redirect all the request inside /secret folder to go throught download.php script? So that /secret/file.txt and /secret/subfolder/document.txt etc would all work. I can do the authentication only with php and I would like to keep my directory structure as it is, since those files are used as links on a various member only pages.</p> <p>Best regards, Jdoen</p>
0non-cybersec
Stackexchange
301
1,140
Proving that $\int_0^\infty\Big(\sqrt[n]{1+x^n}-x\Big)dx~=~\frac12\cdot{-1/n\choose+1/n}^{-1}$. <blockquote> <p>How can we prove, without employing the aid of residues or various transforms, that, for $n&gt;2$ $$\int_0^\infty\Big(\sqrt[n]{1+x^n}-x\Big)dx~=~\frac12\cdot{-1/n\choose+1/n}^{-1}$$</p> </blockquote> <hr> <p><strong>Motivation:</strong> In my <a href="https://math.stackexchange.com/questions/829909">previous question</a>, thanks to Will Jagy's simple but brilliant answer, I was able to express the area of the <a href="http://en.wikipedia.org/wiki/Superellipse" rel="nofollow noreferrer">superellipse</a> $x^n+y^n=r^n$, for odd values of $n=2k+1$, with $k\in\mathbb N^*$, as </p> <p>$A_n=r^2\displaystyle\cdot{2/n\choose1/n}^{-1}+r^2\cdot{-1/n\choose+1/n}^{-1}$, where the first term, representing the surface inside the </p> <p>first sector or quadrant, comes from a simple evaluation of the <a href="http://en.wikipedia.org/wiki/Beta_function" rel="nofollow noreferrer">beta function</a>.</p> <hr> <p><strong>My fruitless efforts and endeavors:</strong></p> <p>$\big(1\big).$ Breaking up the integration interval into $(0,1)$ and $(1,\infty)$, expanding the integrand into an appropriate <a href="http://en.wikipedia.org/wiki/Binomial_series" rel="nofollow noreferrer">binomial series</a> for each of the two cases, and then switching the order of summation and integration. In the end, this made me rewrite the initial question in terms of an infinite series, but led me no closer to finding an answer:</p> <p>$$2a\sum_{k=1}^\infty{a\choose k}\Bigg(\frac1{k+a}+\frac1{k-2a}\Bigg)={-a\choose+a}^{-1}-1.$$ <br> $\big(2\big).$ Letting $x=\sqrt[n]{\sinh^2t~}$. Needless to say, that did not get me very far either.</p> <p>$\big(3\big).$ Letting $x^n=u$, we are able to obtain an <a href="http://en.wikipedia.org/w/index.php?title=Wikipedia:Reference_desk/Archives/Mathematics/2014_June_16#June_16" rel="nofollow noreferrer">expression</a> in terms of <a href="http://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function" rel="nofollow noreferrer">incomplete beta functions</a>.</p>
0non-cybersec
Stackexchange
761
2,115
Let $\Omega$ be a finite set. Let $\mathcal{F}\subset\mathcal{P}(\Omega)$ be an algebra. Show that $\mathcal{F}$ is a $\sigma$-algebra.. <p>Let <span class="math-container">$\Omega$</span> be a finite set. Let <span class="math-container">$\mathcal{F}\subset\mathcal{P}(\Omega)$</span> be an algebra. Show that <span class="math-container">$\mathcal{F}$</span> is a <span class="math-container">$\sigma$</span>-algebra.</p> <p><strong>MY ATTEMPT</strong></p> <p>Since <span class="math-container">$\mathcal{F}$</span> is an algebra, <span class="math-container">$\Omega\in\mathcal{F}$</span>. Moreover, if <span class="math-container">$A\in\mathcal{F}$</span>, then <span class="math-container">$A^{c}\in\mathcal{F}$</span>. Finally, if <span class="math-container">$A,B\in\mathcal{F}$</span>, then <span class="math-container">$A\cup B\in\mathcal{F}$</span>.</p> <p>Now we have to prove that the countable union of sets in <span class="math-container">$\mathcal{F}$</span> does belong to <span class="math-container">$\mathcal{F}$</span>.</p> <p>Here it is the sketch of my attempt to prove it: since there are finitely many subsets of <span class="math-container">$\Omega$</span>, the countable union has to have finitely many different sets in its composition. Consequently, such union is a finite union of subsets of <span class="math-container">$\Omega$</span>, which clearly belongs to <span class="math-container">$\mathcal{F}$</span> since it is an algebra.</p> <p>However I am not sure if it is a good approach or how to formalize it.</p> <p>Could someone please help me with this?</p>
0non-cybersec
Stackexchange
488
1,595
Bit distance and disruption. <p>Earlier, I asked <a href="https://cs.stackexchange.com/questions/27950/disruption-in-the-context-of-genetic-algorithms">a question</a> defining disruption in Genetic Algorithms. Given that definition, I'm still confused on how to answer the following question.</p> <blockquote> <p>True or false? For 1-point and 2-point crossover, the schemata which have bits that are close together on the string encoding are more likely to be disrupted by crossover.</p> </blockquote> <p>From my understanding of cross-over disruption should only be dependant on the number of matching bits strings between parents. So <code>1001</code> would be more likely to be disrupted by <code>0110</code> then by <code>1000</code>. So I answered false, but their justification was that bits closer together encourage disruption, which I don't totally understand.</p> <p>I'm assuming that "bit distance" can be defined as the number of zeros between sequential bits, but based on my proof above, I really don't see how this could affect disruption. Alternatively, I could consider "bit distance" as being the number of bits to flip to reach from one number to another, but based on my proof above, the greater the distance, the greater the chances of disruption.</p> <p>Where is the mis-understanding between the official answer and my own?</p>
0non-cybersec
Stackexchange
356
1,377
Conditions under which a convolution transformation is injective in the 1-d Torus. <p>Let $X=[0,1)$ the 1-d torus. Given a bounded positive function $w\colon X\to\mathbb{R}$ with unit integral (I mean $w\geq 0$, $w\in L^\infty(X)$ and $\int_X w\; dx=1$), define</p> <p>\begin{align*} T_{w} \colon L^\infty(X) &amp;\to L^\infty(X)\\ f &amp;\mapsto T_wf(x)=\int_0^1 f(y)w(x-y)dy. \end{align*}</p> <p>I need to determine conditions for $w$ under which the transformation $T_w$ is injective. I know a counterexample for $w$ continuous with compact support, so those conditions are not enough. </p> <p>I have read a lot of material about convolutions and integral transformation, but it is mostly about $L^2(\mathbb{R})$, and it haven't been easy to adapt.<br> For example, I know that if $w=\frac{1}{(b-a)}\chi_{[a,b]} $ $(0\leq a\leq b\leq 1)$, $T_w$ is not injective because if we take $$f(x) = \begin{cases} 1 &amp;\mbox{if } x &lt; \frac{b-a}{2} \\ -1 &amp; \mbox{if } x\geq\frac{b-a}{2} \end{cases} \pmod{b-a}.$$ then $T_wf=0$. But if we extend $T_w$ to $L^2(\mathbb{R})$ it happens to be injective (<a href="https://math.stackexchange.com/questions/866909/another-proof-of-the-iniectivity-of-a-linear-operator">Another proof of the iniectivity of a linear operator</a>).</p> <p>Working on this problem, I stumbled upon this type of equation $$\int_0^1 f(y)w(x-y)dy=0\quad\forall x\in X$$ from which I would like to conclude that $f\equiv 0$. Any reference would be helpful.</p>
0non-cybersec
Stackexchange
539
1,490
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
Repeated indices Python Pandas from list of dicts. <p>I have a list of dictionaries with two keys. The first key is the shared index and the second key is the column name. I want to convert this list to a Pandas <code>DataFrame</code> object. But when I do that I get repeated index rows where and one columns is blank in every row.</p> <p>With this code:</p> <pre><code>import pandas as pd l = [{'col_a': 0, 'idx': 0}, {'col_b': 5, 'idx': 0}, {'col_a': 1, 'idx': 1}, {'col_b': 6, 'idx': 1}, {'col_a': 2, 'idx': 2}, {'col_b': 7, 'idx': 2}, {'col_a': 3, 'idx': 3}, {'col_b': 8, 'idx': 3}, {'col_a': 4, 'idx': 4}, {'col_b': 9, 'idx': 4}] df = pd.DataFrame(l) df = df.set_index('idx') </code></pre> <p>I get this</p> <pre><code> col_a col_b idx 0 0.0 NaN 0 NaN 5.0 1 1.0 NaN 1 NaN 6.0 2 2.0 NaN 2 NaN 7.0 3 3.0 NaN 3 NaN 8.0 4 4.0 NaN 4 NaN 9.0 </code></pre> <p>but I want this</p> <pre><code> col_a col_b idx 0 0.0 5.0 1 1.0 6.0 2 2.0 7.0 3 3.0 8.0 4 4.0 9.0 </code></pre> <p>Any ideas? Thanks!</p>
0non-cybersec
Stackexchange
500
1,239
Jest snapshots not matching - Windows vs Unix/Linux Line Endings. <p>We have a project developed by multiple developers on multiple operating systems. We have a character limit in our prettier config set to 120 characters. Our windows machines are producing snapshots different than our linux/unix machines.</p> <p>windows:</p> <pre><code> &lt;h4 className="RightPanel__item--heading heading--headingBlocks subHeading--headingBlocks subHeading--different" &gt; </code></pre> <p>whereas on our linux/unix machines the snapshot produces the following line:</p> <pre><code> &lt;h4 className="RightPanel__item--heading heading--headingBlocks subHeading--headingBlocks subHeading--different" &gt; </code></pre> <p>For the linux/unix snapshot, the code ends right on column 119, whereas windows machines produce a new line before the last couple of attributes. We use React, Jest for Testing, eslint for linting, Babel for transformation. </p> <h2>Related Configuration</h2> <ol> <li>babelrc: transform: { "^.+\.jsx?$": "babel-jest" }</li> <li>eslintrc: "globals": { "jest": true }</li> <li>prettierrc: "printWidth": 120</li> <li>prettierignore: *.snap</li> </ol> <h2>Project</h2> <p>React, Babel, Webpack, vanilla es6+ no typescript project with jest for testing</p> <h2>Research</h2> <p>We've tried setting the eslint's "linebreak-style": ["error", "unix"] to see if the eslint change would update the fix the jest snapshot for windows to no avail. We've ensured the same installed version of jest across machines. Same with prettier and eslint. </p> <p>Any suggestions on how we might fix this issue so tests don't fail for one OS or the other?</p>
0non-cybersec
Stackexchange
512
1,744
Functors and Groups. <p>Let $\alpha$ be a functor from the category of groups in the category of groups which assigns to every group $G$ a characteristic subgroup $\alpha (G)$ of $G$ and to every homomorphism $\theta : H \rightarrow K$ the restriction $\theta|_{\alpha(H)}:\alpha(H)\rightarrow \alpha(K)$ (in other words, $\alpha(H)^\theta \leq \alpha(K)$). So we have, in particular, that $\alpha(H)^\theta \leq \alpha(H^\theta)$. Is it true that also happen that $\alpha(H)^\theta$ is equal to $\alpha(H^\theta)$? I think it holds, but why?</p> <p><strong>References</strong></p> <p>D.J.S. Robinson, "Finiteness Conditions and Generalized Soluble Groups", Vol. 1 Pag. 18, (1.3, at the bottom of the page) </p>
0non-cybersec
Stackexchange
221
717
binomial determinant. <p>Let <span class="math-container">$n &gt; 0$</span>, then :</p> <p><span class="math-container">$$ \det \left( {2n \choose n+i-j} \right)_{i,j=0}^{n-1} = \prod_{i=0}^{n-1} \frac{2n+i \choose n}{n+i \choose n} $$</span></p> <p>The LHS appears to be the determinant of a symetric Toeplitz matrix with binomial coefficients.</p> <p>Does anyone have an idea on how to proove this formula ?</p>
0non-cybersec
Stackexchange
162
418
How do I make an AWS RDS MySQL Read &quot;replica&quot; have a different schema?. <p>Rather than using the AWS CLI/UI to <strong>create</strong> a read replica, I would like to create a DB instance with a "close enough" schema and <strong>SET</strong> it to be the replica.</p> <p>I need to make a schema change (a collation change) that cannot be done live in MySQL. I would like to make this change by creating a read "replica" with the schema change, and then promote the read-only "replica".</p> <p>The problem is that the AWS RDS MySQL read-replica mechanism requires that the two schemas be exact.</p> <p>I know that this can be done in general in MySQL (although I do not know the specifics); I would like to do this completely within the AWS RDS framework.</p>
0non-cybersec
Stackexchange
215
772
can vncviewer forward alt key to server for application switch?. <p>I'm using the <code>tightvnc</code> <code>vncviewer</code> to connect to a Windows10 server from my Linux machine running <code>Ubuntu</code>. Now I wish had the option to switch between aplications on the Windows machine using alt-tab over vnc. I've found a plethora of articles describing this on the web but they all seem to refer to the vncviewer that's running on Windows and I did not find any info for the Linux version of it. Can anyone help?</p> <p>I also started a separate thread in the group: comp.os.linux.networking (subject "can vncviewer forward alt key to server for application switch?") - - I will make sure that answers are synchronized between the two separate threads! </p>
0non-cybersec
Stackexchange
196
766
How to stop a new console window from starting when building or debugging a project in Visual studio for Mac Professional?. <p>Everytime I build a project or debug, a new console window pops up with functions runtime information and program output. I want to have the output terminal, debug console, build information etc. in the same visual studio window. I found similar questions but the solution were for the older version of visual studio and my version of visual studio did not have those menu options (No Preview tab or Tools -> options) . The visual studio version that I have is a Visual Studio for Mac Professional, version 8.1.5 (build 9). </p>
0non-cybersec
Stackexchange
144
659
Cannot connect bot to Bale messenger API: network connection disconnected. <p>I was trying my first bot in bale messenger but I couldn't and faced this error. Is there any one here to help me?</p> <pre><code> 2018-05-05 11:13:47,938 network.py:112 WARNING:"network connection disconnected." 2018-05-05 11:13:47,939 network.py:36 ERROR:"connect error: 500, message='Invalid response status'" Traceback (most recent call last): File "/home/ehsan/PycharmProjects/example_bots/venv/lib/python3.5/site-packages/balebot/connection/network.py", line 31, in connect self._ws = await self._session.ws_connect(self.construct_url()) File "/home/ehsan/PycharmProjects/example_bots/venv/lib/python3.5/site-packages/aiohttp/helpers.py", line 109, in __await__ ret = yield from self._coro File "/home/ehsan/PycharmProjects/example_bots/venv/lib/python3.5/site-packages/aiohttp/client.py", line 465, in _ws_connect headers=resp.headers) aiohttp.client_exceptions.WSServerHandshakeError: 500, message='Invalid response status' </code></pre>
0non-cybersec
Stackexchange
341
1,039
@PreDestroy method of a Spring singleton bean not called. <p>I have a Spring bean defined in <code>beans.xml</code> as follows:</p> <pre><code>&lt;context:annotation-config /&gt; [...] &lt;bean id="myBackend" class="mycompany.BackendBean" scope="singleton" /&gt; </code></pre> <p>Inside the bean are 2 methods, which must be executed at the start and before termination of the web application:</p> <pre><code>public class BackendBean implements IBackend { private static final Logger LOGGER = LoggerFactory .getLogger(BackendBean.class); @PostConstruct public void init() { LOGGER.debug("init"); } @PreDestroy public void destroy() { LOGGER.debug("destroy"); } } </code></pre> <p>When I run the server (<code>mvn jetty:run</code>), I can see the output of the <code>init</code> method in the console, from which I conclude that the <code>init</code> method is executed.</p> <p>When I press <code>Ctrl-C</code> and Jetty starts to shut down, I don't see the output of the <code>destroy</code> method.</p> <p>What should I change in order for the <code>destroy</code> method to be executed, when the application is terminated?</p>
0non-cybersec
Stackexchange
366
1,201
How to correctly split a monolith and rely on the same domain. <h1>Context</h1> <p>I'm developing a Spring Boot java application. Currently it is a monolith with the rest API and the front end (vaadin driven) in the same big project.</p> <p>Although this is very easy to develop and deploy, it is getting harder and harder to add features. There are too many concerns in the same application.</p> <p>Also, I did some load testing on my app and it didn't survive more than ~1.5k (virtual) users using it during 1 minute (+/- 1000 to 4000 requests/s).</p> <h1>What I have researched already</h1> <p>I've been reading about microservices for scaling but I'd have to re-write almost the entire application for that, since all my data is relational and stored in a relational database (and I have no clue on how to change that to independent data).</p> <h1>The problem</h1> <p>What I tried to do now is to split the project into three sub projects. A data project that contains all domain and services, an API project that contains the REST api, and a internal front-end project that contains the vaadin interal frontend.</p> <p>The data project would only be a library for the other projects. The API project and the frontend project would both include this data project in their gradle, and both would use this project as a library to access the database.</p> <p>Splitting this project is beeing quite hard and I don't even know if this is the correct path to follow. So in this case, is splitting a correct decision?</p> <p>My thought process was that once the projects are split I could develop with more ease, and also I could spawn independent API instances and plug them in a load balancer (although all of them would still use the same database).</p> <p>On the other hand, this split is causing many dependency issues since the original project was Spring boot and the data project is not going to be 'runnable' (so it can't depend on the boot plugin as I read). But this is a question for stackoverflow only if the achitecture is right.</p> <h2>TL;DR questions</h2> <ul> <li>Is it correct to use a project with both domain and service layer, as a library?</li> <li>Is it correct to access the same database with more than one application?</li> <li>If not, what is the correct form of acessing data (read and write) from instances of an api project (to load balance)?</li> </ul>
0non-cybersec
Stackexchange
621
2,395
Prevent character or word auto-corrections in Microsoft Word. <p>Is there a way to prevent Microsoft Word 2010 from making any auto-corrections.</p> <p>Here's one example, that causes issues when creating technical documentation for server build scripts. Copy and Pasting the auto-corrected hyphen causes the command to not run correctly.</p> <p>If you type <code>./CA -sign</code>, the "-" (hyphen) changes to a "-" (dash) UNICODE character. Pasting into a Putty.exe (Linux emulator session) will cause an error. It's easy to tell if the hyphen changes. It gets wider if using the default font in Word.</p>
0non-cybersec
Stackexchange
165
614
Integrability of $f \circ g$ when $f$ is Riemann integrable and $g$ is continuous.. <p>First I want to refer to <a href="https://math.stackexchange.com/questions/1041330/show-that-if-fc-d-rightarrow-mathbb-r-is-continuous-and-ga-b-right">show that if $f:[c,d] \rightarrow \mathbb {R}$ is continuous and $g:[a,b] \rightarrow [c,d]$ is Riemann integrable, then $f\circ g$ is also integrable</a>.</p> <p>My case is slightly different with above link. Question: If $f:[c,d]\to\mathbb{R}$ is Riemann integrable and $g:[a,b]\to[c,d]$ is continuous, then is $f\circ g$ also integrable?</p> <p>I guess that it's not true but I failed to find a counterexample. Please help me.</p>
0non-cybersec
Stackexchange
238
676
Internal website to securely share secrets(credentials) that can expire?. I'm looking for a website I can deploy internally only that will allow my users and external vendors/clients the ability to send text securely that will automatically be erased after a period of time. The information would be stored in an encrypted manner and salted. We have deployed a customized Zendto setup however I'm not looking to use that for this method because we need to only send passwords most of the time and it must time out sooner (even based on the exposure of the secret) and the information is not encrypted in a stored state with Zendto. Anyone have such a website deployed? open source of course is preferred.
0non-cybersec
Reddit
146
706
C question: single dereference on a void** double indirection pointer. <p>I got this message: </p> <pre><code>expected 'void **' but argument is of type 'char **' </code></pre> <p>when I tried to compile something similar to this: </p> <pre><code>void myfree( void **v ) { if( !v || !*v ) return; free( *v ); *v = NULL; return; } </code></pre> <p><br><br> I found what I think is a solution after reading this question on stack overflow:<br> <a href="https://stackoverflow.com/questions/2943983/avoid-incompatible-pointer-warning-when-dealing-with-double-indirection">Avoid incompatible pointer warning when dealing with double-indirection - Stack Overflow</a><br> <br> So I adjusted to something like this: </p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; void myfree( void *x ) { void **v = x; if( !v || !*v ) return; free( *v ); *v = NULL; return; } int main( int argc, char *argv[] ) { char *test; if( ( test = malloc( 1 ) ) ) { printf( "before: %p\n", test ); myfree( &amp;test ); printf( "after: %p\n", test ); } return 0; } </code></pre> <p>Is this legal C? I am dereferencing a void pointer aren't I? </p> <p>Thanks guys<br> <br> <br> <strong>EDIT 12/10/2010 4:45PM EST:</strong><br> As it has been pointed out <code>free(NULL)</code> is safe and covered by the C standard. Also, as discussed below my example above is not legal C. See caf's answer, Zack's answer, and my own answer.<br> <br> Therefore it's going to be easier for me to initalize any to-be-malloc'd pointers as NULL and then later on to just free() and NULL out directly in the code: </p> <pre><code>free( pointer ); pointer = NULL; </code></pre> <p>The reason I was checking for NULL in myfree() like I did was because of my experiences with fclose(). <code>fclose(NULL)</code> can segfault depending on platform (eg xpsp3 msvcrt.dll 7.0.2600.5512) and so I had assumed (mistakenly) the same thing could happen with free(). I had figured rather than clutter up my code with if statements I could better implement in a function. </p> <p>Thanks everyone for all the good discussion</p>
0non-cybersec
Stackexchange
728
2,199
Soft dependency in systemd. <p>I am trying to understand if there is a way to create a soft dependency between systemd services. Basically, I'd like to create an "umbrella" service that starts other services marked as (soft-) dependencies, but <strong>if and only if they are enabled</strong> -- the umbrella should <strong>never</strong> start a dependant service that is disabled.</p> <p>More specifically, I have received a <a href="https://github.com/brontolinux/cfengine-systemd/pull/1/commits/ff8085b9ca739d2c3e3e9ebcbaf559230e4db216" rel="nofollow noreferrer">pull request</a> for <a href="https://github.com/brontolinux/cfengine-systemd" rel="nofollow noreferrer">cfengine-systemd</a> that aims to create such an umbrella unit. Unfortunately, the proposed <code>cfengine3.service</code> unit doesn't honour the enabled/disabled state of the dependant units and starts them in any case.</p> <p>I had tried myself to do the same previously by means of a target unit, but <a href="https://github.com/brontolinux/cfengine-systemd/commit/97887c6700866844b4ea6c84d5d8f246b53adfe9" rel="nofollow noreferrer">failed shamefully</a>.</p> <p>Any clues?</p> <p>Thanks in advance</p> <p><strong>Update</strong> following Michael's question: I would say that if <code>cfengine3.service</code> is disabled, systemd should not try to start the dependant services.</p>
0non-cybersec
Stackexchange
423
1,365
Mac Pro 2,1 Only Shows Flashing Question Mark After Update. <p>So, I have an older Mac Pro 2,1 that I received. Had a fresh install of Mavericks and nothing else. It worked fine, with exception to slow redraw speeds on the screen. When I got it plugged into a network for the first time, it said there were updates, so I let it do the updates.</p> <p>When I returned to the machine, it was simply sitting at a white screen. After waiting several hours with no change, I turned the machine off, and rebooted. I was met with the flashing question mark on a folder icon.</p> <p>The Mac has the Apple RAID card in it, and 4 1TB drives.</p> <p>Pressing <em>any</em> of the startup commands during boot does nothing; I still get the flashing icon. <kbd>Command</kbd><kbd>R</kbd> doesn't work. <kbd>C</kbd> doesn't work. The only two that do anything is <kbd>Command</kbd><kbd>Option</kbd><kbd>P</kbd><kbd>R</kbd> (reset NVRAM) and <kbd>Option</kbd> (Startup Disc select). However, even when using those two, they still result in a flashing question mark icon.</p> <p>Any clues? I'm wondering if the RAID card went bad or something. It was complaining of a bad battery.</p>
0non-cybersec
Stackexchange
358
1,182
Printing Variable names and contents as debugging tool; looking for emacs/Python shortcut. <p>I find myself adding debugging "print" statements quite often -- stuff like this:</p> <pre><code>print("a_variable_name: %s" % a_variable_name) </code></pre> <p>How do you all do that? Am I being neurotic in trying to find a way to optimize this? I may be working on a function and put in a half-dozen or so of those lines, figure out why it's not working, and then cut them out again.</p> <p>Have you developed an efficient way of doing that?</p> <p>I'm coding Python in Emacs.</p>
0non-cybersec
Stackexchange
171
581
Is it a problem for Google if robots.txt blocks URLs in the sitemap?. <p>I had submitted my site's URL to Google Webmaster Tools. I am using OpenCart. I also have robots.txt file which is accessible to Googlebot.</p> <p>Now issue I am facing: Googlebot is blocked from accessing 450 URLs by robots.txt but these URLs are present in the sitemap which I submitted. Now I am seeing almost 150 warnings on the "Google Index" page of Google Webmasters Tools.</p> <p>Will this effect the website indexing? I do not know how to control the sitemap. am using the default sitemap for OpenCart.</p>
0non-cybersec
Stackexchange
158
592
Avoid The Bancorp like the plague! (long). Hi r/pf. I want to let you all know the experience I'm having with a financial institution. I had a small 401k with my previous company. I was inexperienced with financial matters at the time and didn't roll my 401k over on my own, so after about six months the company transferred my 401k to something called The Bancorp in something called a "Safe Harbor IRA". I've learned a lot since then thanks to r/pf and r/fi, and frankly had forgotten about the small amount of money I had in that old IRA. About two months ago I decided to consolidate all my investments at Vanguard. This is where the nightmare began. I called The Bancorp to see how to do that. After numerous calls, it has become clear to me that this institution's business model is to make it as difficult as possible to access your money and eat away at it in fees. Here's what I've discovered. The Bancorp has no physical locations, so you must deal with them over the phone. Do you want to check your balance? Sorry, you can't log on to a website. You have to call and ask what your balance is. Do you want to know what type of fund holds your assets (mutual fund, money market, etc.?) Sorry, we won't tell you that and play dumb unless you explain to them what the difference is between a mutual fund and a money market account is (you need this information to roll over funds). Do you need to update your information over the phone, like your address? Sorry, you can't do that. You have to print out and mail them a form. This I learned after about the 8th call after I was assured on previous calls that my address had been updated. Can they accurately update your personal information? No, they can't. It will be wrong. How do you get a balance statement for Vanguard to initiate the rollover? They have to email it to you. When you get the email, half of your information will be wrong. When you ask for a corrected email, they don't send it. Look, I'll stay on the phone while you email a corrected balance statement, ok? I just want to be done with you people. Sorry, we can't do that. It takes 2-3 days to send an email, even to an irate customer. I'll stay on the line while you contact that department and get my balance verification email sent out, ok? Sorry, we don't have a way to contact that department. Do you want to have a supervisor call you back? Sorry, we're not calling you back. I have been working on this for two months now. Every day off I have I spend an hour on the phone with these people. I am no closer to getting my money out today than I was two months ago. Every time I think I'm getting closer to getting everything together I get further away from the finish line. The reason I'm posting is to let anyone who is leaving a position to start a new one is that you need to roll over your IRA immediately, otherwise you may lose control of your assets. Fortunately in my case it's a small amount, but if you have significant assets it could become a nightmare if a company like The Bancorp gets a hold of your money. Thanks for listening.
0non-cybersec
Reddit
764
3,127
My [23F] boyfriend [23F] thinks ill of working women. I've been with my partner for 2.5 years. We have a great relationship, but there's this one blip. All of the women in his life, whether they be his mother, other relatives, or exes, have been housewives/housewife types. We've discussed all of our future plans, and we've discussed at length the fact that I want my own career outside of taking care of our house and future kids. He feels uneasy about it, because the only women he's known in his life have stayed at home while the husband works. The ones he has known to hold jobs that also have families are emotionally distant from their husbands and kids. I tell him to trust me, and he says he will, and believes I can handle multiple things at once. We're both at a point now where we're both holding full time jobs, more or less with the exact same schedule. We've been through me doing full time school, holding a part time job, volunteering with our church on the weekends, and having a relationship and outside social life together. I know having kids, a marriage and a full time job are on a different plane than these things, but I do have a lot of faith in my ability to give the most amount of attention as I can to multiple things at once. I still sense a little bit of unease when we bring future kids and working up to him. He knows I'm nothing like the other women he's witnessed with full time jobs and families, but I feel sometimes like I don't have anything else to tell him but "trust me." It's starting to get a little frustrating. Am I wrong for that? What else can I say to ease his fears? (Please, no "you should break up" advice. I want to try and fix this to the best of my ability before considering pulling any plug.) **tl;dr**: My partner has had little experience with women working full time while having a family, and the experience he has had has been negative. How do I convince him that I'm not gonna forget about home life while working full time?
0non-cybersec
Reddit
464
2,006
Does standard configuration in Tomcat pose any security risk?. <p>I have a simple test website on Tomcat running on RaspberryPi. Pi is behind a router. Port forwarding is on and I can access the website from the Internet.</p> <p>What are the security risks of standard out of the box configuration? Only user and password to Tomcat changed or actually added.</p> <p>Can someone access my RaspberryPi because of that Tomcat?</p> <p>Wasn't sure if that question should go to Server Fault or here. On Server Fault, there is a similar question, but unanswered 6 months old.</p>
0non-cybersec
Stackexchange
149
577
Glasses detection. <p>What I'm trying to do is measure the thickness of the eyeglasses frames. I had the idea to measure the thickness of the frame's contours (may be a better way?). I have so far outlined the frame of the glasses, but there are gaps where the lines don't meet. I thought about using HoughLinesP, but I'm not sure if this is what I need.</p> <p>So far I have conducted the following steps:</p> <ul> <li>Convert image to grayscale</li> <li>Create ROI around the eye/glasses area</li> <li>Blur the image</li> <li>Dilate the image (have done this to remove any thin framed glasses)</li> <li>Conduct Canny edge detection</li> <li>Found contours</li> </ul> <p>These are the results:</p> <p><img src="https://i.imgur.com/jNcl1vo.png" alt=""></p> <p><img src="https://i.imgur.com/10StwCL.png" alt=""></p> <p>This is my code so far:</p> <pre><code>//convert to grayscale cv::Mat grayscaleImg; cv::cvtColor( img, grayscaleImg, CV_BGR2GRAY ); //create ROI cv::Mat eyeAreaROI(grayscaleImg, centreEyesRect); cv::imshow("roi", eyeAreaROI); //blur cv::Mat blurredROI; cv::blur(eyeAreaROI, blurredROI, Size(3,3)); cv::imshow("blurred", blurredROI); //dilate thin lines cv::Mat dilated_dst; int dilate_elem = 0; int dilate_size = 1; int dilate_type = MORPH_RECT; cv::Mat element = getStructuringElement(dilate_type, cv::Size(2*dilate_size + 1, 2*dilate_size+1), cv::Point(dilate_size, dilate_size)); cv::dilate(blurredROI, dilated_dst, element); cv::imshow("dilate", dilated_dst); //edge detection int lowThreshold = 100; int ratio = 3; int kernel_size = 3; cv::Canny(dilated_dst, dilated_dst, lowThreshold, lowThreshold*ratio, kernel_size); //create matrix of the same type and size as ROI Mat dst; dst.create(eyeAreaROI.size(), dilated_dst.type()); dst = Scalar::all(0); dilated_dst.copyTo(dst, dilated_dst); cv::imshow("edges", dst); //join the lines and fill in vector&lt;Vec4i&gt; hierarchy; vector&lt;vector&lt;Point&gt;&gt; contours; cv::findContours(dilated_dst, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE); cv::imshow("contours", dilated_dst); </code></pre> <p>I'm not entirely sure what the next steps would be, or as I said above, if I should use HoughLinesP and how to implement it. Any help is very much appreciated!</p>
0non-cybersec
Stackexchange
812
2,283
Image disappears when using \textwidth or \columnwidth. <p>I am trying to insert an image in my document using one of the relative scales, such as <code>\columnwidth</code> or <code>\textwidth</code>. When I use one of them, the image disappears, but the label is present on the text: <a href="https://i.stack.imgur.com/rqWc1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rqWc1.png" alt="Figure disappears"></a></p> <pre><code>\begin{figure*}[htbp] \centerline{\includegraphics[scale=\columnwidth]{LaTeX/images/test-image.png}} \caption{This is a test image.} \label{ux1} \end{figure*} </code></pre> <p>However, if I set the scale to a number, such as <code>0.30</code>:</p> <p><a href="https://i.stack.imgur.com/ntFeg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ntFeg.png" alt="enter image description here"></a></p> <pre><code>\begin{figure*}[htbp] \centerline{\includegraphics[scale=0.30]{LaTeX/images/test-image.png}} \caption{This is a test image.} \label{ux1} \end{figure*} </code></pre> <p>The same happens when I use the <code>figure</code> environment (without the *) for a single-column image. Since this is a template, I am not sure if I am allowed to change the document's structure.</p> <p>Any ideas?</p>
0non-cybersec
Stackexchange
432
1,268
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
[Pic] [NSV] - 6 months LazyKeto, bonus kitty!. [Progress Pic](http://imgur.com/gallery/cItZJiY/new) Stats: 32 Male, USA, 71", 241 lbs --> 198 lbs. Currently around 1690 Calories, the staples are Bunless Burgers over Spinach and Barbacoa/Steak Salad Bowls. I tend to do hard boiled eggs & bacon crumbles for breakfast, a salad at lunch and then usually one of the above for dinner. Lots of water, coffee with cream and the occassional diet cola for lunch (I really need to cut down). A year ago, I never though I'd see anything below 200 in my life again, and now I'm not even sure what my new goal should be. But I feel better than I have in...years. I've also been hittin' the gym 4 days a week, 3 Lifting 1 HiiT Cardio. Its more or less StrongLifts 5x5 + a Bootcamp Class. * Bench from 85 --> 195 * Squat from 95 --> 255 * Deadlift from 135 --> 300 My Curl still sucks, and I hurt my wrist a few months ago, so I'm being gentle with it. Be gentle Reddit :D
0non-cybersec
Reddit
301
976
Connect HTTP Proxy with Authorization with Fiddler. <p>I would like to connect to a HTTP Proxy with Fiddler Core.</p> <p>I'm using the <code>oSession['X-OverrideGateway'] = "HOSTNAME:PORT"</code> code to do it.</p> <p>Now authentication is needed for the proxy. I see in <a href="https://stackoverflow.com/questions/2989466/configuring-fiddler-to-use-company-networks-proxy">other question</a> a <a href="https://stackoverflow.com/a/4945865/4080226">solution</a>. It says:</p> <pre><code>oSession.oRequest["Proxy-Authorization"] = "Basic sOMeBASE64eNCODEdSTRING="; </code></pre> <p>Where the hash at the end is the Base64 coding of the '<code>username:password</code>'</p> <p><strong>My question about this workaround:</strong></p> <p>It results a <code>HTTP_PROXY_AUTHORIZATION</code> HTTP header to my requests. Not just from fiddler to the proxy, but also from the proxy to the web.</p> <p>Shouldn't it be removed by the proxy?</p> <p>Is there a workaround with Fiddler so I can connect a HTTP Proxy with credentials without HTTP headers?</p> <p>I would like to use Fiddler Core.</p> <p><strong>UPDATE:</strong></p> <p>As I can see the image</p> <p><a href="https://i.stack.imgur.com/qBEsI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qBEsI.png" alt="Http Proxy Authentication process"></a></p> <p>I only have to provide the Proxy-Authorization header if a Proxy Authentication header was in a response with a status code. It seams ok. But in fiddler core how can I reach the previous response? If I just simply save into a field variable it won't work, since the order of the traffic is not</p> <p>Request, Response, Request, Response, etc.</p> <p>But mor like</p> <p>Request, Response (407), Request, Request, etc.</p> <p>In the 2nd example on the 3rd Request we shouldn't send the Proxy Authorization header but we will, since the last Response was a 407.</p> <p>Any ideas?</p>
0non-cybersec
Stackexchange
631
1,924
PyDev: Running code to interactive console. <p>As my problem is quite simple I'll try to make this question simple aswell. The problem I'm having concerns the PyDev interactive console. I can bring up the console just fine without problems, and even use it as an interactive shell, just as I would be able to with IDLE. However, when I try to run my code that I've written in my project module, it won't run to the interactive console, but to the Eclipse default console. The default console displays the program just fine, but since it's not an interactive shell, I can't do anything afterwards. </p> <p>With that being said, my question is: How do I get my code to run to the PyDev interactive console, and not the Eclipse default one? Thanks in advance!</p>
0non-cybersec
Stackexchange
180
762
Symbol.prototype Comparison Error. <p>Why do I get this error:</p> <pre><code>Uncaught TypeError: Symbol.prototype [ @@toPrimitive ] requires that 'this' be a Symbol </code></pre> <p>when I run this code?</p> <pre><code>3 == Symbol.prototype </code></pre> <p>I'm still trying to work out the reason why by myself and so far using a <code>try-catch</code> block to hold it down for awhile but I want a reason for the error.</p>
0non-cybersec
Stackexchange
138
431
Does the following Diffie-Hellman problem hold in bilinear groups $G\times G \rightarrow G_T$. <p>For every PPT distinguisher A there exists a negligible function $neg(·)$ such that for all $\lambda$</p> <p>$|\Pr[A(1^\lambda, g,g_1^a,g_1^b,g_1^{ab}) = 1] - \Pr[A(1^\lambda, g,g_1^a,g_1^b,g_1^z) = 1]| \leq \textsf{negl}(\lambda)$</p> <p>where $g$ is a generator of group $G$ of order $p$ where $p$ is a prime of length approximately $\lambda$, $g_1 = g^r \in G$, and $r,a,b,z$ are randomly chosen from $Z_p$</p>
0non-cybersec
Stackexchange
211
514
Which concrete applications benefit from Oblivious RAM constructions?. <p>The main motivation for Oblivious RAM (ORAM) is that, for instance, in the "cloud" setting a client outsources his data to a server in the form of encrypted blocks. Later on, he wants to perform read and write operation on these encrypted blocks, which apparently may leak information about what data is stored. ORAM now ensures that the server cannot tell which blocks the client is interested in and whether he is reading or writing. </p> <p><strong>My question is</strong>: Are there any concrete examples/attacks, where the access pattern on encrypted data leaks sensitive data? </p>
0non-cybersec
Stackexchange
149
663
Why do my IIS6 requests freeze for a long time in the HTTPSYS_CACHEABLE stage?. <p>One of my applications was experiencing intermittent delays in a specific part of the system. Users would click the "Save" button, and sometimes it would take an extra 30 seconds to respond. I turned on <a href="http://msdn.microsoft.com/en-us/library/0x5wc973%28v=VS.85%29.aspx" rel="nofollow noreferrer">ASP.NET tracing</a> and then used <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/592e2b3e-02d5-4b37-b0dc-a728e0636974.mspx?mfr=true" rel="nofollow noreferrer">Logman and ETW</a> to record detailed traces.</p> <p>The trace showed that the delay happened in the "HTTPSYS_CACHEABLE" stage. But, I could not figure out why that was causing a delay. I didn't find any useful documentation about the trace stages in IIS6, and Google didn't find anyone else who had solved this problem.</p> <p>I tried to disable HTTP.SYS caching by changing a registry key and by editing machine.config. Neither action caused any change in the page performance or the trace logs.</p> <p>The relevant part of the trace results is this section. Note the gap between the timestamps.</p> <pre><code>IISCache: URL_CACHE_ACCESS_END - IIS ends accessing URL cache ErrorCode: 0x00000000 PhysicalPath: H:\JobTraQ_Site\ URLInfoFromCache: 1 URLInfoAddedToCache: 0 ContextIDSeq: 4 Timestamp: 00:30:29.406.250000 IISCache: HTTPSYS_CACHEABLE - IIS decides if the request is HTTP.SYS cacheable Reason: RESPONSE_MORE_DATA HttpsysCacheable: 0 ContextIDSeq: 4 Timestamp: 00:30:53.421.875000 </code></pre>
0non-cybersec
Stackexchange
503
1,615
Transfer mail from local machine to Gmail. <p>I'm trying to use Gmail to manage a MS Exchange email that I log into with Outlook Web Access. The Exchange email has IMAP and SMTP access but not POP3 access so I can't use Gmail's "check mail from other accounts" feature but I can use the "send mail as" feature. An inbox rule to forward all mail to the Gmail account doesn't work either.</p> <p>I want to use Fetchmail and something else, possibly Postfix, to retrieve mail from the Exchange email and pass it along to Gmail. I'm not sure what the proper name is for that second operation, that is, placing the retrieved emails in my Gmail but not sending them to Gmail. Maybe "transferring"? or "pushing" an email? This might be why I can't find what I want on Google. I don't I want to forward the mail. It should appear in Gmail as if I had used the "check mail from other accounts" feature.</p> <p>Right now, Fetchmail works - I can retrieve mail from the Exchange server, but I don't know where to go from here or what terms I should be using to search. I think what I should be trying to do is use Postfix to transfer the mail to Gmail via SMTP but I'm unsure.</p> <p>There are a few questions and blog posts out there by people trying to access Exchange with Gmail. Those all involve either forwarding (doesn't work for me) or using just Fetchmail. The Fetchmail-only solutions specify smtp.google.com as the smtphost in the poll. I can't get this to work and it doesn't make sense that it would since the Gmail password is never given. (Further searching - it looks like fetchmail doesn't support ssl on the smtp side.) Some solutions also suggest using Thunderbird to do this. I'd rather not.</p> <p>I can't find anything on Google about people using Postfix to transfer mail to Gmail. Instead I find I lot of people relaying mail through Gmail.</p> <p>Is the approach I've outlined sensible or do I fundamentally misunderstand something? Can I use Postfix to transfer mail, already retrieved, via SMTP to Gmail as described? What is the appropriate name for transferring mail like this?</p> <p>EDIT: The transfer to Gmail should be automatic and regular. This is not intended as a onetime backup but rather as a way to receive email.</p> <p>Thanks.</p>
0non-cybersec
Stackexchange
572
2,269
How to average values in list of lists that contain same parameter. <p>I want to average the 2nd values in all lists that contain the same 1st value, and convert these averaged lists into a new list of lists. </p> <p>For example i want to convert this:</p> <pre><code>[['foo', 13], ['foo', 15], ['bar', 14], ['bar', 16], ['bar', 5]] </code></pre> <p>to this: </p> <pre><code>[['foo', avg(13+15)], ['bar', avg(14+16+5)]] </code></pre> <p>Any ideas of a simple way to do this?</p>
0non-cybersec
Stackexchange
181
489
I feel like I have to hide sometimes dating someone with kids is this right?. I'm in a relationship with a girl with 2 kids girl 7 and boy 4. About 5 months now. They love me to death we feel like a perfect fit we have a blast doing nothing they say all the time they wish I was their stepdad they love me kiss me on the cheek and beg me to stay over at night but. The dad is sorry they barely know him sometimes they cry when they have to go visit him. There's things I can't do yet like stay over or babysit or put pictures up on Facebook because she's scared they might tell him or he might see them and try to take her to court for full custody or her mom will tell her she shouldnt do stuff with us all because it might make him mad. he has said he doesn't want them to be around me or he will try to go to court which he probably won't he can't even afford child support but it sucks having to hide and hold back because of other people's opinions and what they might do. He has no legitimate reason for not wanting them to be around me besides just pure jealousy or not wanting the mom to be happy hes like that. What is the best way to handle this situation.
0non-cybersec
Reddit
263
1,166
TIFU: By "meatspinning" my mom.. My girlfriend was over for a few days, and unfortunately I live with my parents while I attend University. We have a goofy relationship..and more often than not I am doing something awkward or crazy to get a laugh out of her. She left the room without saying much and I assumed she walked into the bathroom next to my bedroom, as shortly after she left, I hear the door close. I pulled off my pants and slowly unlocked to door to avoid making a sound... Got my dick in a full helicopter then burst into the room. My mom is sitting there screaming at the horror at the tornado of cock headed towards her. (cocknado) I am so embarrassed.. we haven't made eye contact yet. Will keep you up to date when the awkward silence ends Edit: Mom: Don't worry about it. Your dad does that all the time... Me: TO BATTLE!!!!..JK -She just started laughing while making the salad for dinner and said "what the fuck Michael" Edit:Turned out OK. We had a good chuckle at dinner and she knows I was trying to bug my Gf but now she thinks I am a weirdo haha.
0non-cybersec
Reddit
280
1,085
What are &quot;nwnode:&quot; URLs, and why did Lion break them?. <p>After installing OS X 10.7, <a href="http://db.tt/dVppKR6" rel="nofollow noreferrer">Dropbox</a> presented the following error upon loading: "URLs with the type "nwnode:" are not supported". I also got this error from <a href="http://cocoatech.com/" rel="nofollow noreferrer">Path Finder</a> (although I don't know what I did to cause it).</p> <p>Both applications only gave me the error once and have not done it since.</p> <p>What are nwnode: URLs? What purpose did they serve? And why did Lion stop supporting them?</p> <p><img src="https://dl.dropbox.com/u/2044/nwnode_error.png" alt="URLs with the type 'nwnode:' are not supported" /></p>
0non-cybersec
Stackexchange
239
715
Straight-line drawing of regular polyhedra. <blockquote> <p>Find the minimum number of straight lines needed to cover a crossing-free straight-line drawing of the icosahedron <span class="math-container">$(13\dots 15)$</span> and of the dodecahedron <span class="math-container">$(9\dots 10)$</span> (in the plane). </p> </blockquote> <p>For example, the cube can be covered by 7 lines:</p> <p><a href="https://i.stack.imgur.com/l8OqJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l8OqJ.png" alt="enter image description here"></a></p> <p>(The problem was posed 13.10.2017 by Alexander Wolff and Alexander Ravsky on page <a href="http://www.math.lviv.ua/szkocka/viewpage.php?page=78" rel="nofollow noreferrer">78</a> of <a href="http://www.math.lviv.ua/szkocka/viewbook.php?vol=1" rel="nofollow noreferrer">Volume 1</a> of the <a href="http://www.math.lviv.ua/szkocka" rel="nofollow noreferrer">Lviv Scottish Book</a>. </p> <p>The prize for solution: <em>A bottle of Franconia wine!</em>).</p>
0non-cybersec
Stackexchange
368
1,021
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
I've wanted to build a PC for nearly 10 years, and after finishing school, generating enough income, and accumulating parts over the past few months, I've finally built my first PC!. Ever since my dad used to put together computers in the old Athlon days (for work use, not gaming), I've always fantasized about putting together my own, but school always got in the way. Well now, I'm no longer a student, and after working for a few months, I deliberated for a while on when would be a good time to build. And then that [infamous Amazon pricing error](https://www.reddit.com/r/buildapcsales/comments/9o122l/gpu_evga_gtx_1070_ti_8gb_sc_gaming_black_edition/) happened for those EVGA 1070ti's, and that became the first part I bought lol (yes, I was one of the lucky few that got one!) Thanks to /r/buildapcsales and a lot of patiently waiting, I finally got all my parts and put it together. My build is listed below along with the prices I paid. I'd say I got some pretty good deals and I'm really happy with the final result. Nothing too flashy with crazy RGB, but still looks awesome! Obligatory pics: [https://imgur.com/a/U4s5yGe](https://imgur.com/a/U4s5yGe) [PCPartPicker part list](https://pcpartpicker.com/list/XN8Kmq) / [Price breakdown by merchant](https://pcpartpicker.com/list/XN8Kmq/by_merchant/) |Type|Item|Price| |:-|:-|:-| |**CPU**|[Intel - Core i7-8700K 3.7 GHz 6-Core Processor](https://pcpartpicker.com/product/sxDzK8/intel-core-i7-8700k-37ghz-6-core-processor-bx80684i78700k)|Purchased For $319.33| |**CPU Cooler**|[Scythe - Mugen 5 Rev. B 51.17 CFM CPU Cooler](https://pcpartpicker.com/product/8GBrxr/scythe-mugen-5-rev-b-512-cfm-cpu-cooler-scmg-5100)|Purchased For $38.92| |**Motherboard**|[Gigabyte - Z390 AORUS ULTRA ATX LGA1151 Motherboard](https://pcpartpicker.com/product/n6gzK8/gigabyte-z390-aorus-ultra-atx-lga1151-motherboard-z390-aorus-ultra)|Purchased For $205.66| |**Memory**|[G.Skill - Ripjaws V Series 16 GB (2 x 8 GB) DDR4-3000 Memory](https://pcpartpicker.com/product/tMvZxr/gskill-memory-f43000c15d16gvgb)|Purchased For $109.99| |**Storage**|[HP - EX920 1 TB M.2-2280 Solid State Drive](https://pcpartpicker.com/product/88bwrH/hp-ex920-1tb-m2-2280-solid-state-drive-2yy47aaabc)|Purchased For $179.99| |**Video Card**|[EVGA - GeForce GTX 1070 Ti 8 GB SC GAMING ACX 3.0 Black Edition Video Card](https://pcpartpicker.com/product/jvwqqs/evga-geforce-gtx-1070-ti-8gb-sc-gaming-acx-30-black-edition-video-card-08g-p4-5671-kr)|Purchased For $294.43| |**Case**|[Fractal Design - Design Define R6 USB-C - TG ATX Mid Tower Case](https://pcpartpicker.com/product/z3kj4D/fractal-design-design-define-r6-usb-c-tg-atx-mid-tower-case-fd-ca-def-r6c-bk-tgl)|Purchased For $119.99| |**Power Supply**|[EVGA - SuperNOVA G1+ 750 W 80+ Gold Certified Fully-Modular ATX Power Supply](https://pcpartpicker.com/product/xTMwrH/evga-supernova-g1-750w-80-gold-certified-fully-modular-atx-power-supply-120-gp-0750-x1)|Purchased For $56.99| |**Total**||**$1325.30**| &#x200B;
0non-cybersec
Reddit
1,113
2,989
Got my first Direct Deposit at a new job. It is significantly less than predicted.. I know that this sounds like something that everyone says, but I think that there must be a real problem. I recently got a new job and it is my first "real" job at a local outdoors store. I get paid $10 an hour and have worked for 24 hours (4-4 hour shifts and 1-8 hour shift) I know that that does not mean that I will get $240 because of taxes and etc, but i was expecting more than the $119.27 that was deposited into my account. I did not claim myself when filling out the wp-40. I am wondering if maybe this direct deposit did not cover all the hours that I have worked and that they may appear on my next paycheck? I did not get a physical paycheck, just the direct deposit. Any advice or information would be greatly appreciated! thanks
0non-cybersec
Reddit
194
829