text
stringlengths 36
35k
| label
class label 2
classes | source
stringclasses 3
values | tokens_length
int64 128
4.1k
| text_length
int64 36
35k
|
---|---|---|---|---|
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 |
Is there a standard name for this index 2 subgroup in an affine group over a finite field of odd char?. <p>Fix an odd prime power $q$, fix a generator of the multiplicative group ${\mathbb F}_q^\times$, let $H$ be the subgroup generated by the <strong>square</strong> of this element, and form the semi-direct product ${\mathbb F}_q \rtimes H$. This is a subgroup of the full affine group of ${\mathbb F}_q$, and in the ongoing work I'm doing with colleagues, it provides a useful example at one point.</p>
<p>More out of curiosity than anything else, I wondered if this group has a standard name in the literature, or is denoted by a standard symbol? In the current draft of our paper it's denoted, unimaginatively, by $G_q$, but I wouldn't be surprised if that clashes with other notation that's standard in finite group theory.</p>
<p>(I've seen the $q=7$ case in several books, usually as an exercise in determining the character table, but it is only described as the non-abelian group of order 21.)</p>
| 0non-cybersec
| Stackexchange | 252 | 1,011 |
How can I get aligned equations not to be spoiled by an item?. <p>Is it possible to use <code>itemize</code> between align? For instance one wants to list some equations with previous explanations following an <code>item</code>, but one wants the explanations not to break the align structure, so that, say, the equal signs are aligned? What I want is:</p>
<p><img src="https://i.stack.imgur.com/jLQwN.png" alt="enter image description here"></p>
<p>My attempts to interlace an item in an give an error.</p>
<p>In this MWE:</p>
<pre><code>\documentclass{standalone}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
\item This is the expansion for $f$:
\begin{align}
f(X) = & \sum_n {t_n+x_n-s_n-2} X^n
\end{align}
\item This is the expansion for $g$:
\begin{align}
g(X) = & \sum_m {r_m} X^m
\end{align}
\end{itemize}
\end{document}
</code></pre>
<p>I get the equations unaligned.</p>
| 0non-cybersec
| Stackexchange | 316 | 912 |
Finite simple groups: smallest nonsplit automorphic extensions. <p>Let $S$ be a finite nonabelian simple group such that the exact sequence </p>
<p>$$1 \to S \to {\rm Aut}(S) \to {\rm Out}(S) \to 1$$</p>
<p>is nonsplit, where $S$ is identified with ${\rm Inn}(S)$. Then there is always a (not necessarily unique) minimal subgroup $A$ in ${\rm Out}(S)$ with respect to the condition that </p>
<p>$$1 \to S \to S.A \to A \to 1$$</p>
<p>is nonsplit. Where can I find a classification of all such pairs $(S,A)$? In particular, is it always true that $|A|=2$?
I checked it with the <a href="http://en.wikipedia.org/wiki/ATLAS_of_Finite_Groups" rel="nofollow">ATLAS</a> that $S$ cannot be sporadic and, if it is alternating, then $S\cong A_6$ and $S.A\cong M_{10}$. </p>
<p><strong>Update:</strong> (inspired by Derek Holt's example below)</p>
<p>Can there be nonisomorphic minimal nonsplit extensions $S.A_1$ and $S.A_2$ for a given simple group $S$ with $A_1\cong A_2$?</p>
| 0non-cybersec
| Stackexchange | 345 | 980 |
When I was a kid I read a book about possible life on other worlds. Can you help me figure out what it was? (some details inside). . The book on display in my elementary school's library in the late 80s in the manner dictionaries are often displayed. It was on it's own platform usually open. From what I remember it was about what types of life might exist on other worlds, given their own unique environmental evolutionary pressures. There were several well done illustrations. A couple that come to mind are balloon like creatures that would evolve on planets with dense gaseous atmospheres and tall creatures (think star wars AT-AT) that were mostly legs. If it helps the book was large, I would guess something like 15 inches by 12 inches, but only a couple inches thick.
Please bear in mind that this was over 20 years ago and these descriptions are just memories and to be held highly suspect. I Figure at best this is a long shot. | 0non-cybersec
| Reddit | 199 | 942 |
Windows 10 upgrade activation failure. <p>I downloaded a windows 10 image from the volume licensing site and used that to upgrade a HP Elitebook from Windows 8.1 which had been activated. The license key is available in the BIOS and can be accessed from the command prompt using:
wmic path softwarelicensingservice get OA3Xoriginalproductkey
Unfortunately, after the upgrade, the license did not automatically activate, in fact, Microsoft could not activate it without using a digital product key. When I downloaded an image using the Media Creation Tool, it worked great and the key automatically activated.
I now have 25 computers upgraded but do not know which ones Microsoft had to assist me with and which were upgraded using the newer image. Is there any way of finding this out?
I am worried that if I have to reinstall after the free upgrade period, the windows key currrently installed will not be recognised and I will have to buy a new license or go back to Windows 8.1</p>
| 0non-cybersec
| Stackexchange | 214 | 987 |
Is there an error in my proof of existence of a solution to this integral equation?. <p>I have this proof to show that $$x(t) = \log(1+t) + \frac{1}{5} \int^1_0 e^{-t} \cos ^2(ts)(x(s))^2 ds $$ has a unique integral solution in $C[0,1]$.</p>
<p>I was looking at someone who had posted an identical question to this here: <a href="https://math.stackexchange.com/questions/2259735/show-that-the-integral-equation-has-a-solution-on-a-suitable-subset-of-c0-1">Show that the integral equation has a solution on a suitable subset of $C[0,1]$</a> where someone answered that you need to be careful about which subsets of $C[0,1]$ you choose. I didn't take any care about subsets at all in my own proof so I was wondering if someone could tell me precisely where I went wrong in the following sketch of my proof. Help is truly appreciated.</p>
<p>Sketch of proof at first is that I show that for all $t\in [0,1]:$ $$\frac{1}{5} \int^1_0 e^{-t} \cos ^2(ts)(x(s))^2 ds $$</p>
<p>is continuous with respect to $t$. (and thus locally Lipschitz given the closed bounded interval).</p>
<p>Then I define $$T_x(t) = \log(1+t) + \frac{1}{5} \int^1_0 e^{-t} \cos ^2(ts)(x(s))^2 ds $$</p>
<p>which has a fixed point at:</p>
<p>$$x(t) = \log(1+t) + \frac{1}{5} \int^1_0 e^{-t} \cos ^2(ts)(x(s))^2 ds $$ </p>
<p>Then from the lemma above that the integral is continuous, $T$ is also continuous and thus we have that $T: C[0,1] \rightarrow C[0,1]$.</p>
<p>Then I make the following argument that $T$ is a contraction map.</p>
<p>$$|T_{x_1}(t) - T_{x_2}(t)| = \frac{1}{5} \Big|\int ^1_0 e^{-t} \cos^2 (ts) (x_1(s)-x_2(s))ds\Big| \leq \frac{1}{5} \text{max}_{s\in[0,1]} \Big|x_1(s)-x_2(s)\Big|$$</p>
<p>Thus $\Big\| T_{x_1} - T_{x_2} \Big\| \leq \frac{1}{5} \Big| x_1 - x_2 \Big|$, so $T$ is a contraction map, and since $C[0,1]$ is complete then $T$ has a unique fixed point. Thus there is a unique solution.</p>
<p>If this is correct or if I am missing something fundamental? Thanks for the time.</p>
| 0non-cybersec
| Stackexchange | 763 | 1,994 |
/bin/sh: 0: Can't open sh. <p>I'm trying to run a simple C program.</p>
<pre><code>#include <stdio.h>
#include <unistd.h>
extern char** environ;
int main(){
// execl("/bin/sh","sh","-c","/bin/ls -l",(char *) NULL);
char* argv[] = {"/bin/sh","sh","-c","/bin/ls", (char*) NULL};
execve(argv[0], argv, environ);
return 0;
}
</code></pre>
<p>The commented out execl runs fine. But when I try to do the same with execve, then the compiler invokes the following error:</p>
<pre><code>/bin/sh: 0: Can't open sh
</code></pre>
<p>What am I doing wrong here?</p>
| 0non-cybersec
| Stackexchange | 234 | 588 |
Desktop shortcut doesn't work for script but script work fine. <pre><code>#!/bin/bash/
ls -1 *.mp3 > playlist.m3u
for (( ; ; )) do mplayer -playlist playlist.m3u; sleep 0.1; done
</code></pre>
<p>This is the script and it works !</p>
<pre><code>[Desktop Entry]
Version=1.0
Type=Application
Name=Play
Comment=Play music
Exec=bash /home/awesome/Desktop/test/play.sh
Icon=
Terminal=true
GenericName=Player
</code></pre>
| 0non-cybersec
| Stackexchange | 157 | 426 |
Pandas: plot multiple columns to same x value. <p>Followup to a <a href="https://stackoverflow.com/questions/21089154/pandas-selecting-multiple-columns-from-one-row">previous question</a> regarding data analysis with pandas. I now want to plot my data, which looks like this:</p>
<pre><code>PrEST ID Gene Sequence Ratio1 Ratio2 Ratio3
HPRR12 ATF1 TTPSAXXXXXXXXXTTTK 6.3222 4.0558 4.958
HPRR23 CREB1 KIXXXXXXXXPGVPR NaN NaN NaN
HPRR23 CREB1 ILNXXXXXXXXGVPR 0.22691 2.077 NaN
HPRR15 ELK4 IEGDCEXXXXXXXGGK 1.177 NaN 12.073
HPRR15 ELK4 SPXXXXXXXXXXXSVIK 8.66 14.755 NaN
HPRR15 ELK4 IEGDCXXXXXXXVSSSSK 15.745 7.9122 9.5966
</code></pre>
<p>... except there are a bunch more rows, and I don't actually want to plot the ratios but some other calculated values derived from them, but it doesn't matter for my plotting problem. I have a dataframe that looks more or less like that data above, and what I want is this:</p>
<ul>
<li>Each row (3 ratios) should be plotted against the row's ID, as points</li>
<li>All rows with the same ID should be plotted to the same x value / ID,
but with another colour </li>
<li>The x ticks should be the IDs, and (if
possible) the corresponding gene as well (so some genes will appear
on several x ticks, as they have multiple IDs mapping to them)</li>
</ul>
<p>Below is an image that my previous, non-pandas version of this script produces:</p>
<p><img src="https://i.stack.imgur.com/2zB1t.png" alt="enter image description here"></p>
<p>... where the red triangles indicate values outside of a cutoff value used for setting the y-axis maximum value. The IDs are blacked-out, but you should be able to see what I'm after. Copy number is essentially the ratios with a calculation on top of them, so they're just another number rather than the ones I show in the data above.</p>
<p>I have tried to find similar questions and solutions in the documentation, but found none. Most people seem to need to do this with dates, for which there seem to be ready-made plotting functions, which doesn't help me (I think). Any help greatly appreciated!</p>
| 0non-cybersec
| Stackexchange | 660 | 2,195 |
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 |
Route specific ip adress through VPN gateway. <p>I'm running a Linux Mint (client) machine, and I need to connect to a remote (server) IP (10.0.4.29) through a VPN Gateway (163.172.224.201).</p>
<p>The VPN (Softether) created a virtual network interface (named vpn_vpn).</p>
<p>I'm currently connected to a Wifi Network (livebox on below outputs), and the VPN connection is working correctly.</p>
<p>Here are the output of:</p>
<p>netstat -r</p>
<p><code>Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default livebox 0.0.0.0 UG 0 0 0 wlp3s0
link-local * 255.255.0.0 U 0 0 0 wlp3s0
192.168.1.0 * 255.255.255.0 U 0 0 0 wlp3s0
192.168.6.0 * 255.255.255.0 U 0 0 0 vpn_vpn</code></p>
<p>ip route list</p>
<p><code>default via 192.168.1.1 dev wlp3s0
169.254.0.0/16 dev wlp3s0 scope link metric 1000
192.168.1.0/24 dev wlp3s0 proto kernel scope link src 192.168.1.128 metric 600
192.168.6.0/24 dev vpn_vpn proto kernel scope link src 192.168.6.57</code></p>
<p>How can I route all traffic to 10.0.4.29 through my gateway, and let other IP go through the livebox gateaway?</p>
<p>I already tried to execute these commands:</p>
<p><code>sudo ip route add default via 163.172.224.201
RTNETLINK answers: Network is unreachable</code></p>
<p><code>sudo route delete default
sudo ip route add default via 163.172.224.201
RTNETLINK answers: Network is unreachable</code></p>
<p><code>sudo route add -host 10.0.4.29 gw 163.172.224.201
SIOCADDRT: Network is unreachable</code></p>
<p><code>sudo ip route add 10.0.4.29 dev vpn_vpn
ip route get 10.0.4.29
10.0.4.29 dev vpn_vpn src 192.168.6.57
cache</code></p>
<p>and then ping 10.0.4.29</p>
<p><code>PING 10.0.4.29 (10.0.4.29) 56(84) bytes of data.
From 192.168.6.57 icmp_seq=1 Destination Host Unreachable</code></p>
<p>I know this is a really simple case, and I know I'm missing something, I don't know what. Can someone please help me?</p>
<p>Regards,</p>
<p>Julien</p>
| 0non-cybersec
| Stackexchange | 795 | 2,157 |
Can Ghidra show me the p-code generated for an instruction?. <p>I'm trying to verify the correctness of a custom processor module in Ghidra. The instruction that I am currently analyzing does some fancy stuff with its <a href="https://ghidra.re/courses/languages/html/pcoderef.html" rel="nofollow noreferrer">p-code</a>. Specifically, it uses a bunch of <a href="https://ghidra.re/courses/languages/html/sleigh_constructors.html#sleigh_tables" rel="nofollow noreferrer">tables</a> that end up forming a <a href="https://ghidra.re/courses/languages/html/sleigh_constructors.html#idm140310874886224" rel="nofollow noreferrer">p-code tree</a> that is several levels deep when it disassembles that instruction. Since p-code trees are walked in a depth-first order, that means the p-code of the child nodes will be emitted first before their parents. This could result in the p-code of the instruction not working in the order that you might expect.</p>
<p>I would like to be able to have Ghidra (or SLEIGH, or whatever affiliated tool) spit out the full generated p-code after it has walked the tree so I can verify that things are happening in the order that I think they are.</p>
| 0non-cybersec
| Stackexchange | 334 | 1,179 |
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 |
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 |
Disable Asset Pipeline/Sprockets Rails 4.1. <p>I cannot seem to find a way to disable the Asset Pipeline in Rails 4.1. I see a lot of information for Rails 3.2. </p>
<p>I want to use Grunt/GulpJs and bower to handle all of my assets and I cannot seem to find something for this. Rather I find a decent amount but most of it doesn't apply to me or is broken.</p>
<p>There is the <a href="https://rubygems.org/gems/half-pipe"><code>half-pipe</code> gem</a>. However half-pipe relies on Rails 4.0 and I'm on Rails 4.1 and I can't find where to force a Gem to install in different version of Rails, if that's even possible.</p>
<p>This question expanded into a few more questions than I intended. Basically I just need to know how to disable the Asset Pipeline, barring that how to integrate GruntJS.</p>
| 0non-cybersec
| Stackexchange | 234 | 804 |
Error 'Printer Settings could not be saved' after driver upload (Samba). <p>When I upload driver to Samba, I often get the message "Printer Properties" - "Printer settings could not be saved. Operation could not be completed (error 0x0000007a)".</p>
<p>Since driver seems to be correctly uploaded to my Samba 3.6.27 server, I do not understand what is the point of this error message. I also manage to change default configuration of the printer by using the contextual properties dialog (which change on driver upload).</p>
<p>Could you explain what is the actual consequence of the error? What i can do to avoid this error?</p>
| 0non-cybersec
| Stackexchange | 166 | 643 |
How can I disable _moz_resizing?. <p>I am using nicEdit editor and I have added my own custom image resizing script to it. But I want to disable the default _moz_resizing that appears in Firefox. </p>
<p>I wanted to have finer control over the image being resized. ( Eg: Allow only the image to resize and inherit the width of the parent container. ) </p>
<p>So I wrote a custom script. But since Firefox has its own image resizing control (_moz_resizing) how do I disable it? If there is no way to do so, I have a very simple workaround where I detect if Firefox and turn off my custom script and use the _moz_resizing instead.</p>
<p>But I won't have fine-grained control and I will have to rely on there being browser bugs in Firefox. :(</p>
| 0non-cybersec
| Stackexchange | 201 | 748 |
Surjective maps of Sheaves. <p>My question is mainly along the lines of another post:</p>
<p><a href="https://math.stackexchange.com/questions/3361084">Surjectivity on stalks implies surjectivity on sheaves</a></p>
<p>I’m trying to prove that given a map of sheaves <span class="math-container">$\psi : \mathcal{F} \rightarrow \mathcal{G}$</span> the followings true:</p>
<p><span class="math-container">$(\mathcal{Im}\psi)_p = \mathcal{G}_p$</span> for every p <span class="math-container">$\Rightarrow \mathcal{Im}(U) = \mathcal{G}(U)$</span> for any open subset U of X</p>
<p>I found a solution </p>
<p><a href="https://www.math.arizona.edu/~cais/CourseNotes/AlgGeom04/Hartshorne_Solutions.pdf" rel="nofollow noreferrer">https://www.math.arizona.edu/~cais/CourseNotes/AlgGeom04/Hartshorne_Solutions.pdf</a></p>
<p>Which states that <span class="math-container">$\psi$</span> is surjective
iff <span class="math-container">$\mathcal{Im}\psi = \mathcal{G}$</span>
iff <span class="math-container">$(\mathcal{Im}\psi)_p = \mathcal{G}_p$</span> For every p
iff <span class="math-container">$\mathcal{Im}\psi_p = \mathcal{G}_p$</span> For every p
iff <span class="math-container">$\psi_p$</span> is surjective</p>
<p>Most of this is fine, but why does step 2 hold? I.e why is it true that </p>
<p><span class="math-container">$\mathcal{Im}\psi = \mathcal{G}$</span> Iff <span class="math-container">$(\mathcal{Im}\psi)_p = \mathcal{G}_p$</span> For every p</p>
<p>I can see why the forward implication holds but why the backward? </p>
<p>The answer and comments in the post above didn’t seem to involve the fact any specific properties of the image sheaf (as was pointed out in the comments) and so the answer seemed weird (given that the statement shouldn’t hold for arbitrary sheafs F and G)</p>
<p>My questions are then </p>
<p>1) what is the proof for the reverse implication of the above mentioned step 2?</p>
<p>2) where (if at all) is there a mistake in the answer/comments in the above mentioned post? And if there are no mistakes, then where in both inclusions in the proof for the reverse implication are the hypotheses (that we are working in the image sheaf) used? </p>
<p>3) is there a more elegant approach to proving the initial surjectivity statement? </p>
| 0non-cybersec
| Stackexchange | 737 | 2,289 |
Birthday paradox for large numbers. <p>I'm attempting to test the claim:
"Every card deck shuffled is unique. A shuffled deck of cards will exist once and never again."</p>
<p>Assumption: A perfect world where a deck of cards is perfectly random all of the time. 52 cards are used in the deck.</p>
<p>The birthday paradox and it's easy enough to calculate for small numbers. 23 people and 365 birthdays as used in the 50% examples. But how do you approach (or approximate) the birthday paradox for values like 52!?</p>
<p>I understand 52! is a large (~226 bit) number but I would like to get a feel of the order of magnitude of the claim. Is it 1% or 0.00001%? </p>
<p>To calculate the probability of a shuffle collision would be:
(52!)!/(52!^n*(52!-n)!)</p>
<p>I understand the formula. But 52!! is incomputable so where do I go from here? How to approach a problem like this?</p>
<p>This is just for my own curiosity and not homework. If it can be done for a deck of cards I'd want to give it a try on collisions in crypto keys. (RSA, and AES256 etc.)</p>
| 0non-cybersec
| Stackexchange | 309 | 1,066 |
How do you talk to your SO about financial stuff?. Greetings Relationships. I have come to ask you for advice about a very sensitive subject.
I am mid-30s and my SO is late 30s. We have been dating 1 and 1/2 years and currently live together. Marriage has come up and the only thing holding me back at this point is financial worries.
Currently we are both employed. I make enough to pay my bills and put money in the bank. I have a very good credit rating and my only debts are student loans and 4 more payments on one credit card. My SO is kind of a different story. I have never point blank asked him about his financial background. What I get from him is that he has a poor credit rating, no substantial savings, a good amount of debt, and is not the best at handling money. However, as far as I can tell he pays his bills every month and, after we had our first mini discussion, is working on a savings account.
I have been advised by numerous friends and family that I should ask him to fully disclose his financial background as well as ask him about the amounts of debt he owes. I am really torn because although we have discussed marriage, we have also said we don’t want to rush the relationship. I honestly don’t know if I should force this discussion before we really sit down and decide on a marriage timeline. He has already said that he wants to marry me and I am a bit nervous that he might try to propose before I have this discussion with him. If he does, I will say no, because I want this resolved before we even get engaged.
To be clear, I am not very concerned about his debt. I also have some debt. I am concerned because he has debt and a low credit rating. This sets off a red flag that he might not be handling that debt properly. Since we have been together, we have worked through several major issues. I feel that we can work together on this as well. I am just at a loss as to how to approach the discussion.
**TL;DR I have a high credit rating and good financial sense, my SO does not. Marriage has been discussed. How do I approach this discussion?**
| 0non-cybersec
| Reddit | 472 | 2,093 |
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 |
Logic behind an eBay phishing attempt. Wonder if someone can explain the logic behind a phishing attempt against me on eBay. I'm writing a book, not about phishing/hacking, but one of the characters in the book suffers from a cyberattack so I'd like to understand some of the whys.
Scenario: I placed a $2000 camera for sale on eBay. Within an hour, it's sold. No questions, nothing. The buyer sends me a message with their email address and asks me to complete the sale using our emails. I refuse and insist to be paid via PayPal. Couple of emails back and forth and eBay tells me the buyer's account has been compromised and that I should relist the camera.
I googled the buyer's address and it's a real person, a retired 60-something lady living in a small, quiet country town.
So,
1) What the buyer was trying to do by making me to deal with them via email and not via eBay messaging system?
2) What's the con? I'm the seller, I'm supposed to be paid. What did they want? My camera? I wouldn't send anything without first being paid.
3) How did they get hold of the lady's eBay account? | 1cybersec
| Reddit | 271 | 1,096 |
infinite loop, csname and forloop function. <p>I want to define some commands that finish with "a", "b", "c"... and totalize the number of them, how can I do this??</p>
<pre><code>\documentclass{article} \usepackage[utf8]{inputenc}
\usepackage{ifthen}
\usepackage{pgffor}
\usepackage{alphalph}
\usepackage{etoolbox}
\usepackage{forloop}
\newcounter{totpecas}
\newcommand \peca {This is the first.}
\newcommand \pecab {This is the
second.}
\newcommand \pecac {This is the third.}
\newcommand \npecatot{1}
\begin{document}
\forloop{totpecas}{2}{{\ifcsdef{peca\alphalph{\value{totpecas}}}{1}{0}}
= 1}{\renewcommand \npecatot {\value{totpecas}}}
The number of defined commands is {\npecatot}.\\
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange | 259 | 737 |
[Spoilers][Rewatch] Clannad: After Story Ep. 18: "The Ends of the Earth". #Clannad: After Story Ep. 18: "The Ends of the Earth"
####[**Table of contents**](https://www.reddit.com/r/anime/comments/4pi3hh/we_start_the_clannad_rewatch_tomorrow_at_2pm_est/)
<-------------------------------Previous Episode|Next Episode----------------------------------->
:--|--:
[Clannad: After Story Ep. 17: "Summertime"](https://www.reddit.com/r/anime/comments/4w5us1/spoilersrewatch_clannad_after_story_ep_17/)|[Clannad: After Story Ep. 19: "The Road Home"](https://www.reddit.com/r/anime/comments/4wgyao/spoilersrewatch_clannad_after_story_ep_19_the/)
***
[MAL](http://myanimelist.net/anime/2167/Clannad)
[MAL:AS](http://myanimelist.net/anime/4181/Clannad__After_Story)
[Free legal streaming @ Hulu: Clannad](http://www.hulu.com/clannad)
[Free legal streaming @ Hulu: Clannad: After Story](http://www.hulu.com/clannad-after-story)
/r/Clannad
***
With regards to spoilers: Please be aware we have both first time watchers and re-watchers, so please tag any spoilers as such. Also, please try to avoid limiting yourself to just spoiler discussions, doing so will make first time watcher's experience much more enjoyable. | 0non-cybersec
| Reddit | 420 | 1,209 |
How can I break referential integrity briefly, within a transaction, without disabling the foreign key constraint?. <p>I have a table with 3 columns:</p>
<pre><code>ID, PARENT_ID, NAME
</code></pre>
<p><code>PARENT_ID</code> has a foreign key relationship with <code>ID</code> in the same table. This table is modeling a hierarchy.</p>
<p>Sometimes the <code>ID</code> of a record will change. I want to be able to update a record's <code>ID</code>, then update the dependent records' <code>PARENT_ID</code> to point to the new <code>ID</code>.</p>
<p>The problem is, when I attempt to update the <code>ID</code> of a record it breaks the integrity and fails immediately.</p>
<p>I realize I could insert a new record with the new <code>ID</code>, then update the children, then delete the old record, but we have a lot of triggers in place that would get screwed up if I did that.</p>
<p>Is there any way to temporarily update the parent with the promise of updating the children (obviously it would fail on commit) without disabling the foreign key briefly?</p>
| 0non-cybersec
| Stackexchange | 298 | 1,071 |
Proof of an infinite sum of probabilities. <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://math.stackexchange.com/questions/74186/alternative-expected-value-proof">Alternative Expected Value Proof</a> </p>
</blockquote>
<p>If $X$ is a random variable that takes values in the range $\left \{ 1,2,3,4,5,6,\ldots \right \}$ how can I prove the following statement?</p>
<p>$$\mathbb{E}[X]=\sum_{i=1}^\infty \mathbb{P}[X \ge i]$$</p>
<p>I honestly have no idea where to even begin. Even just something to kick off the process would be great.</p>
| 0non-cybersec
| Stackexchange | 192 | 578 |
Can one make Code Analysis understand Code Contracts?. <p>When using Code Analysis and Code Contracts in combination, I get a lot of warnings like</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms182182.aspx" rel="noreferrer">CA1062</a>: Microsoft.Design : In externally visible method 'Foo.Bar(Log)', validate parameter 'log' before using it.</p>
<p>In Foo.Bar, I have a contract that validates <code>log</code>.</p>
<pre><code>public Bar(Log log)
{
Contract.Requires(log != null);
log.Lines.Add(...);
// ...
}
</code></pre>
<p>Is there a way to make FxCop understand code contracts?</p>
| 0non-cybersec
| Stackexchange | 200 | 611 |
Access OneDrive personal vault through API. <p>Microsoft introduced a special folder in OneDrive (I only see it in a personal OneDrive account, not in OneDrive for Business) called <a href="https://www.engadget.com/2019/10/01/microsoft-onedrive-personal-vault/" rel="noreferrer">"Personal Vault"</a>. I searched the <a href="https://docs.microsoft.com/en-us/graph/overview" rel="noreferrer">documentation of MS Graph API</a> but could not find this mentioned.</p>
<p>So my question is: is there any way to access this personal vault as a third-party app?</p>
| 0non-cybersec
| Stackexchange | 159 | 560 |
A set theory questions regarding functions.. <p>Q: Let $A=\{1,2,3\}$ and $B=\mathcal{P}(A)$. Let $F: B \rightarrow B$ be the function defind by the formula $F(X)=A\setminus X$. What is $F(\{1,3\})$ ?</p>
<p>A:
I have no idea where to start. I assume $X$ is an arbitrary $X$. I originally tried to define the function as $F=\{(x,y) \in B \times B | y=x+2\}$ however, the function is already defined. Im also sure my original idea is something completely different than what the topic is. </p>
<p>I also figured to draw a "bubble" picture for sets $B \rightarrow B$ but this would be just an arrow point from 1 to 3. </p>
<p>Any info is greatly appreciated. </p>
| 0non-cybersec
| Stackexchange | 214 | 664 |
Approximation of $u \in C^{1,2}([0,T]\times \mathbb{R}^d)$ with $u(0,x)= 0$ by smooth functions vanishing close to $t=0$. <p>My question is the following:
Let <span class="math-container">$T>0$</span>, <span class="math-container">$u: [0,T]\times \mathbb{R}^d \to \mathbb{R}$</span> be continuously differentiable once w.r.t. <span class="math-container">$t \in (0,T)$</span> and twice w.r.t. <span class="math-container">$x \in \mathbb{R}^d$</span> such that all partial derivatives can be extended to <span class="math-container">$[0,T]\times \mathbb{R}^d$</span> continuously. Further, suppose <span class="math-container">$u$</span> along with all its partial derivatives is bounded.</p>
<p>Does there exist a sequence <span class="math-container">$(u_n)_n$</span> with <span class="math-container">$u_n \in C^{\infty}_c((0,T]\times \mathbb{R}^d)$</span> which approximates <span class="math-container">$u$</span> pointwise up to all <span class="math-container">$(1,2)$</span>-derivatives such that each sequence of derivatives is bounded in <span class="math-container">$n$</span>?</p>
<p>The answer is affirmative, if we do not require <span class="math-container">$u_n$</span> to vanish close to <span class="math-container">$0$</span> (note that there is no assumption on vanishing close to <span class="math-container">$T$</span>), because clearly <span class="math-container">$u$</span> as above can be approximated by smooth functions in the desired sense. However, to me it seems possibly troublesome to prove what I'm looking for, essentially because if we require <span class="math-container">$\partial_tu_n$</span>to be bounded uniformly in <span class="math-container">$n$</span>, we cannot allow each <span class="math-container">$u_n$</span> to be constantly <span class="math-container">$0$</span> on some <span class="math-container">$(\epsilon_n,T]\times \mathbb{R}^d$</span>, because this might require us to approximate <span class="math-container">$u$</span> by functions <span class="math-container">$u_n$</span> with increasing (not bounded) derivative <span class="math-container">$\partial_tu_n$</span> close to <span class="math-container">$t=\epsilon_n$</span>.</p>
<p>Is it still possible to obtain what I'm looking for? My hope is that due to <span class="math-container">$u(0,x)=0 \forall x$</span> the situation is actually not too bad. Any help is appreciated!</p>
| 0non-cybersec
| Stackexchange | 742 | 2,404 |
Android on-screen keyboard auto popping up. <p>One of my apps has an "opening screen" (basically a menu) that has an <code>EditText</code> followed by several <code>Button</code>s. The problem is that several of my users are reporting that when they open the app it's automatically popping up the on-screen keyboard without them even touching the <code>EditText</code>. As far as I can tell, all of these users are using the <a href="http://www.htc.com/www/product/hero/overview.html" rel="noreferrer">HTC Hero</a>. </p>
<p>Is this a bug in 1.5? Is there anything I can do about it?</p>
| 0non-cybersec
| Stackexchange | 171 | 588 |
refreshing the page results in 404 error- Angular 6. <p>I am building an application with the help of <strong>Angular6</strong> and facing problems in routing. All the <strong>routes</strong> are working when I click on a particular tab but whenever I <strong>refresh</strong> the current page, it is throwing <strong>404</strong> error. I have seen many posts regarding this issue on Stack overflow but failed to overcome from this problem. </p>
<p>Below is my app.module.ts</p>
<pre><code>import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {AppComponent} from './app.component';
import {FetchApiComponent} from './fetch-api/fetch-api.component';
import {FormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';
import {UserServiceLatest} from './fetch-latest/app.service';
import {UserServiceTop} from './fetch-top/app.service';
import {YoutubePlayerModule} from 'ngx-youtube-player';
import {SidebarComponent} from './sidebar/sidebar.component';
import {FetchLatestComponent} from './fetch-latest/fetch-latest.component';
import { FetchTopComponent } from './fetch-top/fetch-top.component'
import {UserService} from './fetch-api/app.service';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import { AngularFireModule } from 'angularfire2';
import * as firebase from 'firebase';
import { firebaseConfig } from './../environments/firebase.config';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import {PushService} from './push.service';
const appRoutes: Routes = [
{
path: '',
component: FetchApiComponent
},
{
path: '/latest',
component: FetchLatestComponent
},
{
path: '/top',
component: FetchTopComponent
},
{
path :'*',
component: FetchApiComponent
}
];
firebase.initializeApp(firebaseConfig);
@NgModule({
declarations: [
AppComponent,
FetchApiComponent,SidebarComponent, FetchLatestComponent, FetchTopComponent
],
imports: [
RouterModule.forRoot(appRoutes),
BrowserModule, YoutubePlayerModule,
FormsModule,
AngularFireModule.initializeApp(firebaseConfig),
AngularFireDatabaseModule,environment.production ?ServiceWorkerModule.register('firebase-messaging-sw.js'):[],ServiceWorkerModule.register('/firebase-messaging-sw.js', { enabled: environment.production }),
HttpClientModule,environment.production ? ServiceWorkerModule.register('ngsw-worker.js') : [], ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production })
],
providers: [UserService,UserServiceTop,UserServiceLatest,PushService],
bootstrap: [AppComponent]
})
export class AppModule {}
</code></pre>
<p>Can you point me in right direction?</p>
| 0non-cybersec
| Stackexchange | 806 | 2,860 |
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 |
Geometry Conjecture, Interpretation.. <p>I've been participating in a message group on geometry and the following conjecture has been presented. I am only trying to understand it fully. First the conjecture is the following:</p>
<p><strong>"ABC is a triangle with circumcenter O. A1B1C1 is the cevian triangle of O with respect to ABC. A2B2C2 is cevian triangle of O with respect to A1B1C1.
AnBnCn is cevian triangle of O with respect to A(n-1)B(n-1)C(n-1).
I conjecture that when n tends to infinity then sequence centroid of triangles AnBnCn tends to O. Is it true?"</strong></p>
<p>It is the last part regarding "sequence centroid" that I am failing to understand. If the centroid is the concurrency point of the medians, then what is meant by "sequence centroid"? Does it mean to ask whether the successive centroid points of the triangles AnBnCn go towards the circumcenter O, and become synonymous with it? That would be an interesting thing to prove, perhaps, if that is in fact the meaning. As n approaches infinity the triangles become infinitely small it would seem. I suppose the question is whether such a succession of triangles condenses to the point O. Is this the correct way to interpret this question? </p>
| 0non-cybersec
| Stackexchange | 325 | 1,235 |
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 |
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 |
Set Mouse Cursor to Left Center of Currently Active Display With Command/Script. <p>I am trying to figure out how to make a script that operates in the following way:</p>
<ol>
<li>finds dimensions of the display which the mouse pointer is currently on</li>
<li>moves the mouse pointer to the center of the left edge on that display</li>
<li>I'd like to be able to add command arguments when running the script that would add or subtract to the center left edge position and move the mouse accordingly. For example if I ran:</li>
</ol>
<blockquote>
<p>python3 /path/to/script.py</p>
</blockquote>
<p>then the script would place the mouse pointer on left edge of display and in the center of the vertical axis. If I ran this:</p>
<blockquote>
<p>python3 /path/to/script.py 10 -10</p>
</blockquote>
<p>then the script would place the mouse pointer 10px --> from left edge of screen, and -10px (down) from center of vertical axis.</p>
<p>I'm pretty sure xdotool and python can accomplish this, but I am a complete noob when it comes to programming anything, and even though I found <a href="https://askubuntu.com/questions/792911/how-to-set-cursor-position-with-command-script">this link</a>, I'm still not sure how to proceed. If anyone feels so kind as to help me out with this, it would be greatly appreciated, but if not then no worries. </p>
<p>If anyone is curious as to why I want to do this: I'm setting up a tablet to use i3wm. I'm creating touch button shortcuts for i3 window management using jgmenu. Jgmenu has an option to launch at the location of the mouse pointer. I would like to use a touchegg gesture to first move the mouse pointer with this script, then launch jgmenu. </p>
| 0non-cybersec
| Stackexchange | 473 | 1,702 |
[D&D 5E] Some drawings of my players' characters. I've been DM'ing a homebrew D&D 5E campaign since last summer. As DM who's also an illustrator, I draw some of the NPCs my players face to give them a unique visual, but I've also drawn their own characters for fun and inspiration. I thought there might be interest in seeing some of those drawings here along with a bit of their background.
**[Aetius Scipio](http://pasiphilo.deviantart.com/art/Aetius-Scipio-Human-Wizard-586023516)** is a high-born human wizard who had to study spellcasting secretly because arcane magic is outlawed in the tyranny he grew up in. His player portrayed him as very CN - almost machiavellian. The expression on his face is meant to evoke both his privileged position and his potential for ruthlessness (though never against the party). The magic tome he holds is supposed to be one of fey origin he discovered during their first quest.
**[Ellora Sera](http://pasiphilo.deviantart.com/art/Ellora-Sera-Human-Cleric-546059177)** is a human cleric (Life domain) whose deity is focused on healing and restoration. She comes from the same tyranny that Aetius does and even served in its ruthless legions as a War Priest until a higher and more benevolent destiny called to her and she retired to answer that call. She has sworn off the empire she once served and now works to undo it. The glyphs on her arms glow when she calls upon her deity's power.
**[Valmar Astorio](http://pasiphilo.deviantart.com/art/Valmar-Astorio-Human-Fighter-545302699)** is a human fighter who, like Ellora, was a legionary in the tyrannical empire he was born into, continuing the proud familiy tradition of serving in the legions but he, too, became disillusioned with the empire. His time with the legions ended when he struck a superior officer. Only his father's clout saved him from certain death in a gulag. He now, like Ellora, seeks to undermine the empire from the outside. The smouldering menace in his eyes reflects his anger at the injustice he once helped enable.
**[Lemeria Leafringer](http://pasiphilo.deviantart.com/art/Lemeria-Leafringer-Halfling-Rogue-544346474)** is a halfling rogue who lived most of her life as the captive servant of a wealthy merchant family in the same tyranny the others come from. As an infant, she was kidnapped from her home in the fey lands where her people live and raised among humans. The moment of her escape served as the catalyst for the start of our campaign, and her flight lead her into contact with each of the other heroes, all of whom banded together to secure her freedom, thereby solidifying their loyalty to each other. Liberating Lemeria became their first act against the empire.
Aetius and Lemeria have since left the story (because their players had to go back to university) and two more player's have filled the void, so I now have a couple more characters to illustrate eventually. :) But it's been an incredidly fun and rewarding campaign to run and (according to my players) to play as well.
Anyway, feedback welcome. | 0non-cybersec
| Reddit | 759 | 3,049 |
Friendly Strangers. The other day, I was talking to an online friend of mine over Skype.
We're both pretty big fans of the paranormal. we were CONSTANTLY swapping stories and testing fates.
That day, my friend seemed rather freaked out-like a happy freaked out.
"Dude, I have some one here I need you talk to. You're going to love this!!!"
She typed to me.
I was a bit puzzled.
"??" I replied.
She started explaining.
"Some weird things have been happening to my cousin lately. I have her over here right now and I'm gonna have her tell you all about them! But I'm telling her not to tell you whats odd about it until the end."
I replied with a quick "LOL k, bring it!" and waited a few moments for my friend and her cous to switch places.
Soon, the screen blipped.
"Hey. You're <screenname>, <friends name> friend? She talks a lot about you. I'm gonna be honest, I never really believed in this whole ghost or paranormal things up until now so I'm a bit nervous and I think I might just be over reacting but the doctors haven't found anything psychologically wrong with me so???If you're just gonna think I'm crazy then tell me now cuz I'll just leave."
I could tell from her reluctance that this must have been really freaking her out.
"Don't worry, I believe pretty much anything anyone tells me. I doubt you're crazy."
I assured her.
"Ok. here it goes then."
She said and then typed up her story.
"It began a few weeks ago after I read some ridiculous chain letter that I didn't forward. I didn't think anything of it because, like I said, I didn't believe in that stuff and the chain letter was something about creatures wearing human skin that blend in with humans I don't know, I don't really think it's related but it started after I deleted it.
"It first started at the market. While i was in line, I noticed that the bagger was staring at me.
He was smiling a bit too uncomfortably at me. Like, he wasn't using his muscles to smile, it was more like some one took two fingers to his cheeks and pulled upwards to draw the corner of his lips into a smile??
I know I know that sounds way stupid, doesn't it?"
"Anyways, I smiled politely at him and took my groceries from the end of the belt when he finished bagging them.I freed up a hand and I thanked him for his service.
And that's when it happened.
His lips moved and he said in a deep voice "You're welcome, miss."
I stood there in complete shock for a moment. His smile grew wider before he then ignored me completely and went back to bagging groceries."
I figured I must have been exhausted because there's no way that just happened."
"The next day, I was walking down the street. The air was chill and cold, and I was enjoying all the smells and sensations of the upcoming fall.
That's when it happened again.
I saw a woman staring at me . She didn't take her eyes off me. She had that same eerie smile.
It was uncomfortable. As she got closer to me, she parted her lips and spoke to me:
"Nice weather today, isn't it miss?"
And then nodded and kept walking.
I stopped in my tracks once more. It was dizzying because of its impossibility.
And it wasn't just those few times either.
Several other people spoke to me since then.
It was always innocuous things like "Need any help today, ma'am?" or "You're looking lovely today", nothing vicious, the strangers were all very friendly albeit all with that same creepy grin, but the mere fact it was HAPPENING was terrifying and yet also strangely hope bringing? Does that sound right?
I don't know, but soon, everywhere I went, I would hear voices of certain people I was near exchanging pleasantries with me.
I even told my doctor this and he assured me that no,it isn't possible that this could happen.And yet I know it is. It IS happening to me!"
After that wall of text, my friends cousin stopped typing.
Frankly, I was confused as shit.
"Look that's all great and all but uhm, people talking to you and saying nice things isn't at all a paranormal experience, even if they smile weird.."
It was the next thing she said that changed my mind.
"And THAT's the response most people would have. But here's the thing:
Somehow I am hearing these people talk when I can't hear anything else; I don't hear birds, I don't hear cars driving down the street,
I don't hear the tapping of the keys on my keypad. I don't hear anything.
I don't hear anything because I've been fully deaf since I was 4."
I stared at my screen for a bit before she typed again.
"What do you think is going on?"
| 0non-cybersec
| Reddit | 1,165 | 4,568 |
Validation error messages without the attribute. <p>I'm trying to show custom error messages without the attribute name in front. I used to do this with the custom_error_message gem, however it doesn't work with Rails 3.1</p>
<p>What I'm trying now in create.js.erb:</p>
<pre><code>alert("<%= @post.errors[:title] %>")
</code></pre>
<p>Which returns </p>
<pre><code>[&quot;Here goes my custom message?&quot;]
</code></pre>
<p>My question is -- how can I remove the brackets and the &quot so only the message is left. I'll insert it into the page using jquery.</p>
| 0non-cybersec
| Stackexchange | 186 | 587 |
What is the behavior of these functions linear or logarithmic or neither?. <p>Please consider the following functions $F$ and $G$.
\begin{align*}
F(K) = \log_2 \left(\frac{( 2\sqrt{K-1}+K-2)^2}{(\sqrt{K-1}-1)^2}\right)+(K-1) \log_2(2)
\end{align*}
and the function
\begin{align*}
G(K)=
\log \left( \bigg( \frac{K^2-2}{(K-1)^2}\bigg) \ \frac{(2\sqrt{K-1}+K-2)^2}{(\sqrt{K-1}-1)^2} \right)
+(K-2)\log_{2}\left(\frac{(K^2-2)}{2(K-1)^2} \frac{(\sqrt{K-1}+1)^2}{(\sqrt{K-1}-1)^2}\right)
+(K-2)\log(2)
\end{align*}</p>
<p>I should note that $K$ is a positive integer greater than 2.</p>
<p>My question is I don't really understand how these functions are behaving a a function of $K$? Are these functions linear or logarithmic as function of $K$ or something else...</p>
<p>Any help would be much appreciated.</p>
| 0non-cybersec
| Stackexchange | 326 | 814 |
ELI5: PVP in WoD. So I've decided to pursue PVP as my endgame in WoD, having said that there's a lot of different avenues Ashran, Rated and Unrated BG's, Arena's, Honor Points, Conquest points.
I want to get started in PVP, and have no idea how to get from 0 to "Top of the pvp food chain" in terms of gear and skill, I know PVP is a constantly evolving and changing beast, and there's always more to learn from so being bad at first isn't an issue if it matters I'm a rogue, so where do people also duel all day to get better? Where am I on that proverbial food chain and how do I get to the top? I appreciate all responses. | 0non-cybersec
| Reddit | 171 | 629 |
Creating a SOAP call using PHP with an XML body. <p>I'm trying to call a SOAP method using PHP.</p>
<p>Here's the code I've got:</p>
<pre><code>$data = array('Acquirer' =>
array(
'Id' => 'MyId',
'UserId' => 'MyUserId',
'Password' => 'MyPassword'
));
$method = 'Echo';
$client = new SoapClient(NULL,
array('location' => 'https://example.com/ExampleWebServiceDL/services/ExampleHandler',
'uri' => 'http://example.com/wsdl', 'trace' => 1));
$result = $client->$method($data);
</code></pre>
<p>Here's the request it creates:</p>
<pre><code> <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://example.com/wsdl" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:Echo>
<param0 xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Acquirer</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">Id</key>
<value xsi:type="xsd:string">mcp</value>
</item>
<item>
<key xsi:type="xsd:string">UserId</key>
<value xsi:type="xsd:string">tst001</value>
</item>
<item>
<key xsi:type="xsd:string">Password</key>
<value xsi:type="xsd:string">test</value>
</item>
</value>
</item>
</param0>
</ns1:Echo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</code></pre>
<p>And here's what I <em>want</em> the request to look like:</p>
<pre><code> <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://example.com/wsdl" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<Echo>
<Acquirer>
<Id>MyId</Id>
<UserId>MyUserId</UserId>
<Password>MyPassword</Password>
</Acquirer>
</Echo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</code></pre>
| 0non-cybersec
| Stackexchange | 1,132 | 2,853 |
how to handle firebaseauth token expiration?. <p>I use firebase 2 years so far and was never clear to me how to handle firebasse auth token expiration. </p>
<p>I'm using android and once i do <code>FirebaseAuth.getInstance().signInWithCustomToken(token);</code> interanally firebase receives a message like that:</p>
<pre><code>{
"t":"d",
"d":{
"r":5,
"b":{
"s":"ok",
"d":{
"auth":{
"uid":"test",
"token":{
"exp":1592230969,
"user_id":"test",
"iat":1592227369,
"sub":"test",
"aud":"test",
"auth_time":1592227369,
"iss":"https://securetoken.google.com/igibo-b0b27",
"firebase":{
"identities":{
},
"sign_in_provider":"custom"
}
},
"provider":"custom",
"user_id":"test"
},
"expires":1592230969
}
}
}
}
</code></pre>
<p>after this request any future calls to <code>FirebaseAuth.getInstance().getCurrentUser()</code> will return info about this authenticated user.<br>
It is clean in this json that this auth token expires sometime, but it isn't clear to me what will be firebase behaviors for that...</p>
<p>will <code>FirebaseAuth.getInstance().getCurrentUser()</code> return null after token expiration?<br>
will firebase automatially renew the token so it never expires?<br>
if i need to monitore and revalidate token manually HOW I DO THAT? </p>
<p>if im not debugging i cant even find the information of expiration anywhere.</p>
| 0non-cybersec
| Stackexchange | 466 | 1,728 |
Windows Server 2012 R2 network Failover?. <p>i have two windows server 2012 R2 using to running software (sms gateway) , i want to configure a network failover , if the first server goes down the second server goes up.</p>
<p>note: the both server need internet connection to connect with the mobile operators , i need a way to enable the internet for second server if the first server goes down , or any thing like that.</p>
<p>can i make this by using windows server 2012, or not.</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange | 132 | 504 |
I accidentally deleted /usr/bin/python. How do I restore it?. <p>Trying to set the default Python version to 2.7, I ran this command:</p>
<pre><code>sudo rm /usr/bin/python*
</code></pre>
<p>Now when I type <code>python</code> or <code>python2.7</code>, I see these error messages: </p>
<pre><code>bash: /usr/bin/python: No such file or directory
bash: /usr/bin/python2.7: No such file or directory
</code></pre>
<p>What happened? Should I have run the <code>rm</code> command? How can I undo it?</p>
| 0non-cybersec
| Stackexchange | 176 | 505 |
While we drop the constant in big O notation, does it matter in real-life situations?. <p>While I understand that <a href="https://en.wikipedia.org/wiki/Big_O_notation" rel="noreferrer">big O</a> notation simply describes the growth rate of an algorithm, I'm uncertain if there is any difference in efficiency in real life between the following O(n) algorithms.</p>
<p>To print the value of a node in a linked list k places from the end of the list.</p>
<p>Given a node:</p>
<pre><code>/* Link list node */
struct node
{
int data;
struct node* next;
};
</code></pre>
<p><strong>Solution 1 O(n)</strong></p>
<p>This solution iterates over the list twice, once to find the length of the list, and the second time to get to the <strong>end of the list - N</strong>.</p>
<pre><code>void printNthFromLast(struct node* head, int n)
{
int len = 0, i;
struct node *temp = head;
// 1) Count the number of nodes in Linked List
while (temp != NULL)
{
temp = temp->next;
len++;
}
// Check if value of n is not more than length of the linked list
if (len < n)
return;
temp = head;
// 2) Get the (n-len+1)th node from the begining
for (i = 1; i < len-n+1; i++)
{
temp = temp->next;
}
printf ("%d", temp->data);
return;
}
</code></pre>
<p><strong>Solution 2 O(n)</strong></p>
<p>This solution only iterates over the list once. The ref_ptr pointer leads, and a second pointer (main_ptr) follows it k places behind. When ref_ptr reaches the end of the list, main_ptr should be pointing at the correct node (k places from the end of the list).</p>
<pre><code>void printNthFromLast(struct node *head, int n)
{
struct node *main_ptr = head;
struct node *ref_ptr = head;
int count = 0;
if(head != NULL)
{
while( count < n )
{
if(ref_ptr == NULL)
{
return;
}
ref_ptr = ref_ptr->next;
count++;
}
while(ref_ptr != NULL)
{
main_ptr = main_ptr->next;
ref_ptr = ref_ptr->next;
}
}
}
</code></pre>
<p>The question is: Even though both solutions are O(n) while leaving big O notation aside, is the second solution more efficient that the first for a very long list as it only iterates over the list once?</p>
| 0non-cybersec
| Stackexchange | 753 | 2,327 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
The map $\phi : \ell^{1}(\mathbb{N}) \to L^{1}(\mathbb{R})$ where $\left\{ a_n \right\} \mapsto \sum_n a_n 1_{[n,n+1]}$ is norm preserving?. <p>I'm actually just trying to show $\phi$ is continuous by showing that it is Lipschitz. However, I believe the map $\phi : \ell^{1} \to L^{1}(\mathbb{R})$ where $\left\{ a_n \right\} \mapsto \sum_n a_n 1_{[n,n+1]}$ may also be norm-preserving. Here is what I have so far:</p>
<p>Take $x = \left\{ a_n \right\} \in \ell^{1}$ and $f = \sum_n a_n 1_{[n,n+1]} \in L^{1}(\mathbb{R})$ so that</p>
<p>\begin{align*}
\|\ \phi(x) \|_{L^{1}(\mathbb{R})} &= \|\ \sum_{n} a_n 1_{[n,n+1]} \|_{L^{1}(\mathbb{R})} \\
&= \|\ f \|_{L^{1}(\mathbb{R})} \\
&= \int_{\mathbb{R}} |f(x)| dx \\
&= \sum_{n=1}^{\infty} \left( \int_{-n}^{-n+1} |f(x)|dx + \int_{n-1}^{n} |f(x)|dx \right)
\end{align*}</p>
| 0non-cybersec
| Stackexchange | 361 | 840 |
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 get images in Bootstrap's card to be the same height/width?. <p>So here is my code, it displays 6 cards, three across and two rows. I would like for the images to all be the same size without having to manually resize the images. The responsiveness does work, I use "img-fluid" as a class and when I go to a mobile or smaller browser, they all have the same width, but the height is still off. </p>
<pre><code><h1 class="display-4 text-xs-center m-y-3 text-muted" id="speakers">Ice Cream</h1>
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="card"><img alt="Card image cap" class="card-img-top img-fluid" src="img/brownie.jpg" />
<div class="card-block">
<h4 class="card-title">Brownie Delight</h4>
<p class="card-text">Our customer favorite chocolate ice cream jam packed with pieces of brownies and fudge</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card"><img alt="Card image cap" class="card-img-top img-fluid" src="img/butterPecan.jpg" />
<div class="card-block">
<h4 class="card-title">Butter Pecan</h4>
<p class="card-text">Roasted pecans, butter and vanilla come together to make this wonderful ice cream</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card"><img alt="Card image cap" class="card-img-top img-fluid" src="img/bCherry.jpg" />
<div class="card-block">
<h4 class="card-title">Black Cherry</h4>
<p class="card-text">Our classic vanilla loaded with plump black cherries to give flavor and color</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card"><img alt="Card image cap" class="card-img-top img-fluid" src="img/mintChip.jpg" />
<div class="card-block">
<h4 class="card-title">Mint Chip</h4>
<p class="card-text">Our signiture mint ice cream jam packed with mint chocolate chips</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card"><img alt="Card image cap" class="card-img-top img-fluid" src="img/pistachio.jpg" />
<div class="card-block">
<h4 class="card-title">Pistachio</h4>
<p class="card-text">Our classic pistachio is loaded with nuts to give it that great flavor, and of course comes in your favorite color</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card"><img alt="Card image cap" class="card-img-top img-fluid" src="img/IceCream.jpg" />
<div class="card-block">
<h4 class="card-title">More Flavors</h4>
<p class="card-text">We couldn not fit all of our wonderful flavors on one page, click here to see more!</p>
</div>
</div>
</div>
</div>
</code></pre>
<p>Here is an <a href="https://imgur.com/cxEkvmc" rel="noreferrer">image</a> of what I am getting and this is what I want to <a href="https://imgur.com/pT8Uctr" rel="noreferrer">get</a> where they are all the same size.</p>
| 0non-cybersec
| Stackexchange | 1,331 | 3,422 |
Java Android room alter table java.lang.IllegalStateException: Migration didn't properly handle. <p>I want to add column to existing table I do this :</p>
<pre><code> static final Migration MIGRATION_33_35 = new Migration(33, 35) {
@Override
public void migrate(SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE 'Orders' " + " ADD COLUMN 'lats' REAL ");
}
};
private static DbManager buildDatabaseInstance(Context context) {
return Room.databaseBuilder(context,
DbManager.class,
DB_NAME)
.addMigrations(MIGRATION_31_32,MIGRATION_33_35)//nazwa powinna byc 32_33
.allowMainThreadQueries().build();
}
</code></pre>
<p>And I do not want to lose my data in which I have rows.
Now I have this :</p>
<pre><code>java.lang.IllegalStateException: Migration didn't properly handle table
</code></pre>
| 0non-cybersec
| Stackexchange | 272 | 905 |
Just finished building PC, video card overheats during video games. My computer is at 50 degrees celsius when I just have things running in windowed mode (Itunes/Chrome/Magic:the gathering online etc) but if I try to play a full screen game even like Magicka, my temp goes to 80-90 degrees, even though I still only have 1% cpu usage, so im guessing its my video card.
My computer:
Intel I7-960 processor (using its heat sink)
ASUS Sabertooth X58 motherboard
Gefoce GTX560Ti Videocard
Corsair GS600 Power Supply
[Corsair Graphite Series 600T Black Steel / Plastic ATX Mid Tower Computer Case](http://www.newegg.com/Product/Product.aspx?Item=N82E16811139003)
edit: fixed, explained in comments section | 0non-cybersec
| Reddit | 205 | 707 |
Find solutions $12x=3$ in $\mathbb{Z}/93\mathbb{Z}$. <p>Does anybody have any idea of how to find all the solutions to
$12x=3$ in $\frac{\mathbb{Z}}{93\mathbb{Z}}$</p>
<p>Edit: I was able to reduce it to $4x=1 \pmod {31}$ and was able to find to $x$ using Euclid's extended algorithm. i.e. $x=8$, but I am still not able to get other 2 values that are $39$ and $70$ with some suitable method. I got these values by trying all possibilities from $0$ till $92$.</p>
| 0non-cybersec
| Stackexchange | 157 | 465 |
What does MSCK REPAIR TABLE do behind the scenes and why it's so slow?. <p>I know that <code>MSCK REPAIR TABLE</code> updates the metastore with the current partitions of an external table.</p>
<p>To do that, you only need to do <code>ls</code> on the root folder of the table (given the table is partitioned by only one column), and get all its partitions, clearly a < 1s operation. </p>
<p>But in practice, the operation can take a <strong>very long</strong> time to execute (or even <a href="https://docs.aws.amazon.com/athena/latest/ug/msck-repair-table.html" rel="noreferrer">timeout if ran on AWS Athena</a>).</p>
<p>So my question is, what does <code>MSCK REPAIR TABLE</code> actually do behind the scenes and why? </p>
<p>How does MSCK REPAIR TABLE find the partitions?</p>
<hr>
<p>Additional data in case it's relevant:</p>
<p><sub>Our data is all on S3, it's both slow when running on EMR (Hive) or Athena (Presto), there are ~450 partitions in the table, every partition has on avg 90 files, overall 3 Gigabytes for a partition, files are in Apache parquet format</sub></p>
| 0non-cybersec
| Stackexchange | 346 | 1,100 |
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 |
Have you noticed iTunes sometimes doesn't download album art, even with perfect tags? Or have you ever wanted a special edition album art, available nowhere else, that iTunes won't download? Here's how to hack it from the iTunes Preview site.. 1. Since you can't search the iTunes Preview site, head over to Google. Searching there will search all regional stores. Your search should read: site:itunes.apple.com search terms here
2. For this example, we'll be using Ilse DeLange's best-of album 'Here I Am', for which a high quality album art image is not available anywhere else: http://itunes.apple.com/be/album/here-i-am/id39278491 (Notice in the link that it's previewing the Belgium store's listing. iTunes won't download artwork for albums that aren't in your regional store, so this trick is also handy for foreign music!)
3. Open the preview album art image in its own tab: http://a4.mzstatic.com/us/r1000/059/Music/y2004/m12/d15/h22/s06.cjowwapl.170x170-75.jpg
4. Notice the file name says 170x170-75. The first two numbers denote the resolution, and the last number denotes the .jpg quality constraint (note that editing the quality doesn't work for everything, and some files that say 75 will actually be unconstrained). The standard artwork resolution for the iTunes Store is 600x600, so edit the resolution part of the file name to read 600x600. Also, in this case, changing the quality to 100 will give a higher quality image. Our result: [http://a4.mzstatic.com/us/r1000/059/Music/y2004/m12/d15/h22/s06.cjowwapl.600x600-100.jpg](http://a4.mzstatic.com/us/r1000/059/Music/y2004/m12/d15/h22/s06.cjowwapl.600x600-100.jpg)
And that's it! I just worked this out last night and figured I would share it with you good people.
Also, the 600x600 link works for all art, not just art whose dimensions are exactly 600x600—that is, non-square images are linked in the same way. | 0non-cybersec
| Reddit | 529 | 1,885 |
apt-get upgrade to exclude some updates. <p>I want to exclude some package(s) when choosing to <code>apt-get upgrade</code>. I'm thinking an edit to source.list probably? For example, maybe a package that updates often with minor point releases, or minor issues to attend to manually first. I'm thinking of <em>percona</em> specifically.</p>
<pre><code>libmysqlclient16 libmysqlclient18 percona-server-client
percona-server-client-5.5 percona-server-common-5.5 percona-server-server
percona-server-server-5.5
</code></pre>
<p>I still want to run <code>apt-get upgrade</code> and have it update everything it finds normally, except what I've asked to be held back or <strong>libmysql*</strong> and <strong>percona*</strong> if possible.</p>
<p>Then I'm not sure yet how I'll upgrade these others manually.</p>
| 0non-cybersec
| Stackexchange | 248 | 817 |
Godaddy .htaccess and mod_url. <p>I'm an experienced full stack developer and freshly minted webmaster. Recently my client asked me to create a redirect from one url to an outside page. I know how to make a page redirect and I'm pretty sure doing it requires me to work on the .htaccess file or mod_url or both.</p>
<p>The site is hosted at Godaddy on the "Economy Web Hosting Linux" plan. The UI is not very friendly. It's an Apache server. What I need to know is where do I find the .htaccess file to edit it? I also probably need to know where to find the mod_url settings. I can probably do the needful from there.</p>
| 0non-cybersec
| Stackexchange | 171 | 630 |
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 .htaccess with exclusions. <p>I want all requests on a domain to be redirected to <code>https</code>, with the exception of just one particular file. I'm not sure how to accomplish this with .htaccess </p>
<pre><code>-bash-3.2# cat .htaccess
ErrorDocument 404 http://www.example.com
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
-bash-3.2#
</code></pre>
<p>The above code redirects everything perfectly, however, I need the <code>robots.txt</code> file to be accessible via <code>http://</code> vs the <code>https://</code> only.</p>
| 0non-cybersec
| Stackexchange | 190 | 600 |
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 |
Defining the sum on the set $\mathbb N$. <p>Suppose we have a set $\mathbb N$, $0\in \mathbb N$ and $\sigma\colon \mathbb N \to \mathbb N$ satisfying <a href="https://en.wikipedia.org/wiki/Peano_axioms#Formulation" rel="nofollow noreferrer">Peano axioms</a> of natural numbers. </p>
<p>Inside ZF (or ZFC if needed) how do we define the "addition" function i.e. a function $+ \colon \mathbb N \times \mathbb N \to \mathbb N$ satisfying for all $n,m \in \mathbb N$
$$
n + 0 = n\\
n + \sigma(m) = \sigma(n+m).
$$</p>
<p>I have tried to consider all relations satisfying these properties and taking their intersection $R$. I would like to prove that what I get is a function. I have proved that its domain is $\mathbb N \times \mathbb N$ but I am not able to prove that such relation is univoque. To get the result I would need to prove that $\le$ is a well ordering. But to define $\le$ I would like to have already defined $+$... so I'm not sure which one should be defined first and how to proceed.</p>
<p>A reference to a book would be also appreciated.</p>
| 0non-cybersec
| Stackexchange | 324 | 1,065 |
How to compute a smooth-degree isogeny given a generator point of its kernel?. <p>I need to compute an isogeny from $E: y^2 = x^3 + ax + b$, given a generator point for its kernel subgroup, using Python.
The point has smooth order.</p>
<p>I need both the parameters for the curve and polynomials for point mappings.</p>
<p>I have already read about Vélu's formulas, but it seems it will take a lot of time to compute each point in the subgroup, and more time to evaluate the curve parameters.</p>
<p>I know PARI and MAGMA provide an algorithm for that, but I need to understand the algorithm to write it on my own.</p>
<p>I am trying to use this for computing SIDH.</p>
| 0non-cybersec
| Stackexchange | 188 | 674 |
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 |
Laravel table: there can be only one auto column and it must be defined as a key. <p>I have made all integers unsigned but I still get the error. What do I need to change?</p>
<pre><code><?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFacebook extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('facebook', function($table)
{
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
$table->timestamps();
$table->string('username', 255);
$table->bigInteger('uid', 20)->unsigned();
$table->string('access_token', 255);
$table->string('access_token_secret', 255);
$table->string('photoURL', 255);
$table->string('profileURL', 255);
$table->string('firstName', 255);
$table->string('lastName', 255);
$table->string('gender', 255);
$table->string('age', 20);
$table->integer('birthDay')->unsigned();
$table->integer('birthMonth')->unsigned();
$table->integer('birthYear')->unsigned();
$table->string('email', 255);
$table->string('phone', 30);
$table->string('address', 255);
$table->string('country', 100);
$table->string('region', 100);
$table->string('city', 100);
$table->string('zip', 20);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('facebook');
}
}
</code></pre>
<p>SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be de fined as a key </p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange | 666 | 2,024 |
Postgres group by timestamp into 6 hourly buckets. <p>I have the following simple table:</p>
<pre><code>ID TIMESTAMP VALUE
4 2011-05-27 15:50:04 1253
5 2011-05-27 15:55:02 1304
6 2011-05-27 16:00:02 1322
7 2011-05-27 16:05:01 1364
</code></pre>
<p>I would like to average the <code>VALUES</code>, and <code>GROUP</code> each <code>TIMESTAMP</code> day into 6 hourly buckets. e.g 00:00 to 06:00, 06:00 to 12:00, 12:00 to 18:00 & 18:00 to 00:00.</p>
<p>I am able to group by year, month, day & hour using the following query:</p>
<pre><code>select avg(VALUE),
EXTRACT(year from TIMESTAMP) AS year,
EXTRACT(month from TIMESTAMP) AS month,
EXTRACT(day from TIMESTAMP) as day
from TABLE
group by year,month,day
</code></pre>
<p>But I am unable to group each day into 4 periods as defined above, any help is most welcome.</p>
| 0non-cybersec
| Stackexchange | 318 | 876 |
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 create or import a bilingual table from Word in LaTeX?. <p>Short story: How can I recreate <a href="https://www.dropbox.com/s/ap85xfeekfau1qh/Snippet.docx?dl=0" rel="nofollow noreferrer">this</a> table in LaTeX, I am currently experimenting with the <code>parallel</code> and <code>parcolumns</code> packages, but the results are not similar.</p>
<p>Long story: I am trying to make a bilingual booklet for Gregorian chant, and I have a setup on Word that I like the aesthetic of. But getting proper chant notation is easier with LaTeX, so I would like to recreate <a href="https://www.dropbox.com/s/ap85xfeekfau1qh/Snippet.docx?dl=0" rel="nofollow noreferrer">this</a> table from Word. I am not sure how to proceed as I am completely green when it comes to typesetting.</p>
<p>Edit by me, including my pitiful minimal attempt</p>
<pre><code> \begin{Parallel}[v]{0.4\textwidth}{0.51\textwidth}
\tolerance=1000
\ParallelLText{Examen conscientiæ vel Pater Noster totum secreto}
\ParallelRText{Enten ransager man sin samvittighed eller beder Fader vor i stilhed.}
\ParallelPar
\ParallelLText{Pater noster, qui es in cælis, sanctificétur nomen tuum: advéniat regnum tuum: fiat volúntas tua, sicut in cælo et in terra. Panem nostrum quotidiánum da nobis hódie: et dimítte nobis débita nostra, sicut et nos dimíttimus debitóribus nostris: et ne nos indúcas in tentatiónem: sed líbera nos a malo. Amen.}
\ParallelRText{Fader vor, du som er i Himlen. Helliget vorde dit navn, komme dit rige. Ske din vilje, som i Himlen så og på jorden. Giv os i dag vort daglige brød og forlad os vor skyld, som og vi forlader vore skyldnere, og led os ikke i fristelse, men frels os fra det onde. Amen.}
\end{Parallel}
</code></pre>
<hr>
<p>Edit by naph: embedded image of example.</p>
<p><a href="https://i.stack.imgur.com/m8dNa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8dNa.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange | 684 | 1,950 |
unable to load certificate 6300:error:0906D06C:PEM routines:PEM_read_bio:no start line. <p>When I run the command below to check my private-key PEM file, an error pops up</p>
<p><code>unable to load certificate 6300:error:0906D06C:PEM routines:PEM_read_bio:no start line:.\crypto\pem\pem_lib.c:703:Expecting: TRUSTED CERTIFICATE</code></p>
<p><code>command : C:\>openssl x509 -in C:\private-key.pem -text -noout</code></p>
<p>any idea?</p>
| 0non-cybersec
| Stackexchange | 176 | 446 |
How do I create a class in Javascript?. <p>This is what I got so far, and it's not working at all :( all the variables are null in my player class and update never gets called.</p>
<p>I mean a programming class, not a css class. I.E. not (.movingdiv{color: #ff0000;})</p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<title>Class Test</title>
<meta charset="utf-8" />
<style>
body { text-align: center; background-color: #ffffff;}
#box { position: absolute; left: 610px; top: 80px; height: 50px; width: 50px; background-color: #ff0000; color: #000000;}
</style>
<script type="text/javascript">
document.onkeydown=function(event){keyDown(event)};
document.onkeyup=function(event){keyUp(event)};
var box = 0;
function Player () {
var speed = 5;
var x = 50;
var y = 50;
}
function update() {
box.style.left = this.x + "px";
box.style.top = this.y + "px";
box.innerHTML = "<h6 style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\">X: "+ this.x + "<br /> Y: " + this.y + "</h6>";
}
var player = new Player();
var keys = new Array(256);
var i = 0;
for (i = 0;i <= 256; i++){
keys[i] = false;
}
function keyDown(event){
keys[event.keyCode] = true;
}
function keyUp(event){
keys[event.keyCode] = false;
}
function update(){
if(keys[37]) player.x -= player.speed;
if(keys[39]) player.x += player.speed;
player.update();
}
setInterval(update, 1000/60);
</script>
</head>
<body>
<div id="box" ></div>
<script type="text/javascript">
box = document.getElementById('box');
box.innerHTML = "<h6 style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\">X: "+ player.x + "<br /> Y: " + player.y + "</h6>";
</script>
</body>
</html>
</code></pre>
<hr>
<p>Edit: alright, I think I messed up here. The first time I tried to make a class I seem to have messed up. After retrying I seem to be able to now using the "1 Using a function" in Meders post.</p>
<p>the real problem seems to be that javascript doesn't know what to do when it gets to this line in my real code: </p>
<pre><code>box.style.background-position = "" + -(this.frame * this.width) + "px " + -(this.state * this.height) + "px";
</code></pre>
<p>It also seems to choke anytime I put </p>
<p><code>box.style.background-color</code></p>
<p>So the question I need answered now is how do I set a value to style variables in javascript that have a "-" in the name. I'll post a test in a second</p>
| 0non-cybersec
| Stackexchange | 989 | 3,080 |
Best use of RAM for multiple SQL instances?. <p>I have a new Windows Server 2016 box with 32GB of RAM, it will be used for dev testing by one or two users max. There will be occasional use of VM/Hyper-V instances and a couple of IIS test sites running from time to time.</p>
<p>I also need to install <em>all</em> versions of SQL Server from 2008 through to 2016. These will each have many databases attached but very few will actually be active at a time unless testing calls for it.</p>
<p>Assuming there is no practical issue with installing several different SQL Server installations on the same box, what options do I have to configure the best use of RAM? I know that on a standard installation, SQL will try to hog all available RAM but I want to try to avoid this leaving around 12GB for other services and allocate a maximum of 24GB for <em>all</em> the SQL instances to share equally without fighting with each other over resources.</p>
<p>Is there a good way to achieve this?</p>
<p>PS I'm not an experienced DBA just a humble developer</p>
| 0non-cybersec
| Stackexchange | 257 | 1,056 |
Splitting of the tangent bundle of a vector bundle and connections. <p>Let $\pi:E\to M$ be a smooth vector bundle. Then we have the following exact sequence of vector bundles over $E$:</p>
<p>$$
0\to VE\xrightarrow{} TE\xrightarrow{\mathrm{d}\pi}\pi^*TM\to 0
$$</p>
<p>Here $VE$ is the vertical bundle, that is kernel of the bunble map $\mathrm{d}\pi$. This sequence splits, so there is a bundle morphism $\sigma:\pi^*TM\to TE$ such that $\mathrm{d}\pi\circ\sigma=\mathrm{Id}$. It can be shown that the data of such a $\sigma$ is equivalent to a connection (covariant derivative) $\nabla$ on $E\to M$ (see for instance the volume 2 of Greub-Halperin-Vanstone). Also we know that $VE\cong\pi^*E$ so that we can write the following decomposition:</p>
<p>$$
TE\cong\pi^*E\oplus\pi^*TM
$$</p>
<p>My question is the following: considering $E$ as a manifold, I would like to consider differential forms on $E$, that is $\Gamma(\Lambda T^*E)$; is the De Rham differential linked to $\nabla$ in some way?</p>
<p>Thank you for your help. Any reference would be very useful.</p>
| 0non-cybersec
| Stackexchange | 330 | 1,074 |
Initialize empty matrix in Python. <p>I am trying to convert a MATLAB code in Python. I don't know how to initialize empty matrix in Python.</p>
<p>MATLAB Code:</p>
<pre><code>demod4(1) = [];
</code></pre>
<p>I tried in Python </p>
<pre><code>demod4[0] = array([])
</code></pre>
<p>but it gives error: </p>
<pre><code>only length-1 arrays can be converted to Python scalars
</code></pre>
| 0non-cybersec
| Stackexchange | 144 | 394 |
Question on limit of power of rational functions. <p>Let $k$ be a fixed number and suppose that $q_k$ is a polynomial with rational coefficients. In other words $$q_k(y) = \sum_{i=0}^{k}b_i y^i$$ where $b_i, \quad 0 \le i \le k$ are rationals.</p>
<p>Here is my question: I need want to show that either $$\lim_{n \rightarrow \infty} \displaystyle \frac{2^n}{\displaystyle e^{q_k(n)}} = 0$$ or $$\lim_{n \rightarrow \infty} \displaystyle \frac{\displaystyle e^{q_k(n)}}{2^n} = 0.$$</p>
<p>I know that $$ \lim_{n \rightarrow \infty} \frac{1}{2^n} = 0$$ so the first thing that comes to my mind is that $$\lim_{n \rightarrow \infty} \displaystyle \frac{\displaystyle e^{q_k(n)}}{2^n}$$ has to be zero if the $\lim_{n \rightarrow \infty}\displaystyle e^{q_k(n)}$ is finite which I think is infinty. How can I approach this question? Any help on this will be great.</p>
| 0non-cybersec
| Stackexchange | 287 | 869 |
Question about Real Representations. <p>I am stuck on a problem in Fulton's <em>Representation Theory: A First Course</em>. Exercise 3.39 states:</p>
<p>Let $V_0$ be a real vector space on which $G$ acts irreducibly, $V=V_0 \otimes \Bbb C$ the corresponding real representation of $G$. Show that if $V$ is not irreducible, then it has exactly two irreducible factors, and they are conjugate complex representations of $G$.</p>
<p>I had originally misread the problem and taken $V_0$ to be not only a real $G$-invariant vector space, but a representation of $G$ itself. Proceeding from there, I showed that $V= V_0 \oplus iV_0$, but this is clearly wrong, as these $V_0$ is not complex and these two representations are not conjugate. However, given that $V_0$ is only a real $G$-invariant vector space, I'm not sure how to proceed.</p>
| 0non-cybersec
| Stackexchange | 237 | 838 |
Reason to not use chmod -R 777 on internal server for project source code?. <p>From my days of amateur web development <a href="https://kb.iu.edu/d/amsv" rel="noreferrer">the principle of least privilege</a> has beaten into me not to use <code>chmod -R 777 dir</code>. I have personally never needed it, so I've never used it.</p>
<p>I now work on a development team professionally, and we recently moved executable code to a shared internal server. Only people from the company can access the server and we trust everyone at our company. The code isn't particularly sensitive, anyway.</p>
<p>Trying to run a script<sup>†</sup> that another team member wrote into the shared folder caused a permissions error, so <em>"just to check if it would otherwise work"</em> a coworker ran <code>chmod -R 777 /opt/path/to/shared/folder</code> on the project. Once it did work the coworker said it's fine to leave it as is instead of switching to a more controlled <code>groups</code> solution for us.</p>
<p>Because I am <a href="https://security.stackexchange.com/a/33471/90486">a chimpanzee</a> I want to speak up and say this is bad practice and we should change it to a <code>groups</code> solution. However, after putting some thought into it I can't come up with a reason why shared executable code on an internal server shouldn't have <code>777</code> permissions.</p>
<p>From a security standpoint, is there any reason to change our project folder's permissions from <code>777</code> to something tied down a little tighter with <code>groups</code>?</p>
<hr>
<p>† We can't change this scripts' permission requirements.</p>
| 0non-cybersec
| Stackexchange | 442 | 1,630 |
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 |
Find number of divisors upto $10^9$. <p>I am new to number theory, I have to find the number of divisors up to $10^9$, but i dont know how to do it efficiently and store it in an array in 'c'.
I am using sieve algo to find the number of divisors, here is what I am doing</p>
<pre><code>#include<stdio.h>
#define N 100000
int div[N+1];
void divisors() {
int i,len,j;
for(i=2;i<=N;i++) {
for(j=i;j<N;j+=i)
div[j]++;
}
}
int main(){
int i;
divisors();
for(i=1;i<N;i++) printf("%d\n",div[i]+1);
return 0;
}
</code></pre>
<p>Thank You</p>
| 0non-cybersec
| Stackexchange | 245 | 577 |
How to make focus() work before the DOM element shown. <p><strong>UPDATE: it turns out there is no way to directly apply focus to textbox before DOM rendering finished</strong></p>
<hr>
<p>I wonder why the focus() function does not work on hidden element.</p>
<p>For example( I am using Vue.js ):</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var vm = new Vue({
el: "#app",
data:{
showtext: false
},
methods: {
showTxt(ev){
this.showtext = true
var vm = this;
// if I uncomment setTimeout, then the textbox can set focus
//setTimeout(function(){
vm.$refs.textbox.focus()
//}, 0)
}
}
})</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<button @click="showTxt">
Show Textbox and SetFocus on it
</button>
<div v-show="showtext">
<input ref="textbox" type="text" />
</div>
</div></code></pre>
</div>
</div>
</p>
<p>What I am trying to do is to click that button and show textbox and put focus in textbox, but currently, the textbox can not get focus if I directly call .focus(). It only works when I wrap a setTimeout around it(which I guess run on the next event loop). I wonder if there is any way to make the focus working without setTimeout?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange | 540 | 1,599 |
Openvpn server conf route. <p>Here is my openvpn server conf - </p>
<pre><code>server 192.168.255.0 255.255.255.0
verb 3
key /etc/openvpn/pki/private/VPN.SERVERNAME.COM.key
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/VPN.SERVERNAME.COM.crt
dh /etc/openvpn/pki/dh.pem
tls-auth /etc/openvpn/pki/ta.key
key-direction 0
keepalive 10 60
persist-key
persist-tun
proto udp
# Rely on Docker to do port mapping, internally always 1194
port 1194
dev tun0
status /tmp/openvpn-status.log
user nobody
group nogroup
### Route Configurations Below
route 192.168.254.0 255.255.255.0
</code></pre>
<p>I'm trying to understand what does the "route" configuration do? I checked the ip addr of the host where my openvpn is running but its ip address is different.</p>
| 0non-cybersec
| Stackexchange | 288 | 765 |
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 |
Guidance for company investigation into porn on employee machine. An employee at my company left his BitTorrent software running on his corporate machine when he connected to the corporate network, which triggered an alert on my security logging tools (SIEM.) I connected to his machine to investigate and found that he was torrenting porn - LOTS of it (100+ gigs). I had to rat him out to HR, and now they want to investigate to see if any of it was CP.
Based on the names of files, most of which the movie titles and the name(s) of the actresses, and a spot check of a few, I really don't think that ANY of the files will be CP, but I was hoping you folks could give me (and my HR department some guidance.)
There are 750+ files - do we need to review each one in order to cover ourselves from a CP / legal perspective? Or does a sampling of the most likely titles (e.g. "Young Teens XXX.mp4") sufficient? I was planning on dumping all of the files to an Excel spreadsheet to help with that. I've never seen CP before (nor do I want to) but I'm not even sure what to look for. Is it a "you'll know it when you see it" type of thing?
Is the a publicly available md5 dump that I can compare the files against? I'm (ahem) not against reviewing the files myself, but I feel like it's a lot to ask the two nice old ladies in HR to view hours upon hours of video without some kind of strategy for knowing when to apply Occam's Razor (the guy is just into 'normal' porn, stuff he'll get fired over but not throw in jail for.)
Thanks! | 1cybersec
| Reddit | 381 | 1,542 |
Check if a child is React.Fragment. <p>As I see <code>React.isFragment</code> is only a proposal for the moment: <a href="https://github.com/facebook/react/issues/12038" rel="noreferrer">https://github.com/facebook/react/issues/12038</a></p>
<p>Is there a workaround to do something like</p>
<pre><code>if (child instanceof React.Fragment) {
...
}
</code></pre>
<p>until that API is available.</p>
<p>Temporary solution that works for me:</p>
<pre><code>const isReactFragment = child => {
try {
return child.type.toString() === React.Fragment.toString();
} catch (e) {
return false;
}
};
</code></pre>
| 0non-cybersec
| Stackexchange | 214 | 626 |
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 |
Windows 10 Sleep mode causes unsafe shutdown. <p>Recently, when I leave my computer (desktop, not laptop) alone for half an hour or so, I will come back to find that rather than enter sleep or hibernate, the computer has shut down completely. While Windows 10 normally reuses boot information to make the Windows logo breeze past during startup, I'm usually staring at it for 2 minutes or more, even though the system OS is on a Solid State Drive.</p>
<p>What's more, when I start up the computer, a few programs offer clues that it was an unsafe shutdown. Firefox says it couldn't open the tabs I had up, and Steam asks me for my password (normally remembered).</p>
<p>I've looked in the Windows event logs, but nothing of interest appears at the time of the shutdown; there is one recurring event that stands out; a warning that says "The IO operation at logical block address 0x13f9b8 for Disk 0 (PDO name: \Device\00000031) was retried." It happens every few minutes, not just during a power event, so I'm not sure it's related.</p>
<p>EDIT: Assuming I ran smartctl (smartmontools) correctly, here is its output for C:.</p>
<pre><code>SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 6863
12 Power_Cycle_Count 0x0032 097 097 000 Old_age Always - 2181
177 Wear_Leveling_Count 0x0013 087 087 000 Pre-fail Always - 469
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 063 047 000 Old_age Always - 37
195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0
199 CRC_Error_Count 0x003e 001 001 000 Old_age Always - 529334
235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 134
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 56049724571
</code></pre>
| 0non-cybersec
| Stackexchange | 765 | 2,627 |
Boyfriend of 4.5 wants to "take a break" because he wants to know what else is out there. Please help.. I've been with my boyfriend since our Junior year in high school; we were 16 when we started dating and are both 21 now. We've been through so much, and I can't blame him for wanting to know, but at the same time it's killing me. Here's a little back story:
After our senior year, he moved to Texas with his family. This was so hard because neither of us new what would happen. We spent 7 months apart before he ended up moving back to our hometown so he could be with me, and also go to school at the community college. A year later we both move to a town an hour away to attend the state college. We got apartments in the same complex and spent all of our time together.
I've never doubted that he loves me. Never. But in the past, I could tell he wasn't 100% happy, so I initiated a deep talk about it and asked if he wished he was single. He cried and told me that as much as he loved me, he couldn't help but wonder what else is out there and whether or not I was 100% perfect for him. I tried to be very understanding, even though it broke my heart, and told him that I have never wanted anything more than for him to be happy. His happiness means more to me than anything. We talked for a long time and openly discussed the things we needed to change. We were honest and at the end of the conversation, he told me he wanted to stay together and that he wanted to live his life with me by his side. Since then, I've tried to hold up my end of the bargain and make the changes we discussed.
Fast forward to today. We were discussing through texts (he is out of town) what was going to happen after graduation. I said I thought he'd want to go to Texas, and I don't want to live there. I told him I felt like he'd choose moving there over me, to which he said "We'll see." This hurt my feelings and I told him that if it were me, I'd be telling him how much I love him and how we would work it out because I want to be with him no matter what. He replied with a 12-page text saying that he loves me, he's love me more than anything, I'm the only girl he's ever loved, and he'll always love me no matter what happens. He said sometimes he wonders if I'm really 100% perfect for him, and that sometimes he doesn't think I am, but he knows that what he has is damn good and that he's been happy for 4.5 years with me. He said sometimes he wants to know what else there is, but he also doesn't want to throw away such a good thing just to find out. He said it's really tough for him. He said I'm his first serious girlfriend and he's got no other experience to compare this to. He said sometimes he doesn't know how he feels. He said I'm an amazing person and that he doesn't want to hurt me. I'm the last person he'd ever want to hurt, but this is big. It's life changing, but he doesn't want to grow up in regret that he just went with the first thing he found. He said that was the hardest thing he's ever had to say to me, and he asked if I've ever felt the same way. I told him that if it were up to me, and I had to choose right now, I'd be with him forever. He told me that it's not that I'm not good enough, or that he's unhappy, or that he doesn't love me because none of that is true.
I just don't know what to do. I'm at a total loss. Is it normal for people to feel this way? Especially after 4.5 years? What do I do. I'm so hurt...I'm breaking. He's my whole world. I know that we're young, but I love him. I want him to be happy, and I'm prepared to let him go. I just don't get it. What do I do.
TL;DR Boyfriend of 4.5 years wants to take a break to see other people, even though he still loves me. | 0non-cybersec
| Reddit | 921 | 3,723 |
I wish to install Skype and other downloaded programs on Linux, specifically Debian, AMD64 LXDE. <p>With Linux I have functioned up to now just using apt-get and modifying /etc/apt/sources.list . I followed the instructions in <a href="http://www.debianadmin.com/install-skype-instant-messanger-in-debian-and-ubuntu.html" rel="nofollow noreferrer">this blog</a>. I added "<code>deb h ttp://download.skype.com/linux/repos/debian/ stable non-free</code>" to sources.list, then updated, then tried apt-get install skype</p>
<pre><code>Package skype is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
</code></pre>
<p>This is probably what I get for using 5 year old blog found on google, but if you all share the right repository I can at least get skype to work. But this is part of a bigger problem I have.</p>
<p>I don't actually know how to install packages I download myself, rather than through apt. For instance, I got <a href="http://www.skype.com/intl/en-us/get-skype/on-your-computer/linux/" rel="nofollow noreferrer">official skype site's</a> package downloaded, but I don't know how or where to unpack it, and if I have to do something to ensure my computer uses it. I also have a few other applications and games sitting on my hard drive untouched.</p>
| 0non-cybersec
| Stackexchange | 384 | 1,376 |
Ubuntu 20.04 Battery drains even after the laptop is shut down after changing from Windows. <p>I recently switched from windows to Ubuntu 20.04 LTS on my Lenovo e560. Whenever I press shutdown, everything shuts and the screen goes black. Pressing neither of keys other than a power key wakes it up. However battery drains overnight and sometimes its dead.</p>
<p>The unusual behavior I noticed is whenever my PC shuts, the red indicator used to blink three times before but now it blinks for a single time. I tried a hard shutdown by long pressing the power button for the confirmation and it shutdowns with 3 blinks as usual.</p>
<p>I believe the shutdown is not happening properly. Also, the performance of battery is fine and its a giving a good backup when I am working.
Can anyone help me with this please?</p>
| 0non-cybersec
| Stackexchange | 194 | 818 |
Microsoft SQL: dealing with invalidated databases. <p>I created a Microsoft SQL Server database that has now changed location. (The details are probably unimportant, but for the curious, I originally created it in a folder on an external drive mapped to a particular drive letter, but this mapping no longer exists.)</p>
<p>How can I fix the entry in the Databases list to point to the new MDF file location? I would expect to be able to do this using SQL Server Management Studio Express, but it seems that I can't get the database properties, detach, or even delete the database without a valid connection.</p>
<p>Version info:
I <em>think</em> the database was created using SQL Server Express 2005, but I also have SQL Server 2008 and SQL Server 2012 installed, if that matters. The version of SQL Server Management Studio Express I installed is for SQL Server 2005, but I think I can install a different version if I need to. I'm running 64-bit Win 7.</p>
<p>Disclaimer: I know essentially nothing about SQL servers in general, much less MS SQL Server.</p>
<p><strong>EDIT:</strong> The invalid database entry eventually disappeared from the management studio, and I'm not sure why. I was able to attach it again using the correct file path, and now it works.</p>
| 0non-cybersec
| Stackexchange | 296 | 1,273 |
How can i use orbot in my college??its not working. <p>i have a tor application called orbot and it does not function well in our college..how do i configure orbot so i can access tor serviceses in our college networks??
My college has a server based on isa server..it has a [email protected] and port@8080....
so can anyone tell me specifically how to configure orbot..oh and my college blocks most websites including facebook,twiiter,and watsapp and anything like that...sorry for the bad english...so please help
This is the log </p>
<hr>
<pre><code>Orbot is starting…
Orbot is starting…
updating settings in Tor service
updating torrc custom configuration...
success.
Orbot is starting…
Tor (1): Mar 18 20:48:26.600 [notice] Tor v0.2.7.6 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.1q and Zlib 1.2.8.
Mar 18 20:48:26.601 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Mar 18 20:48:26.601 [notice] Read configuration file "/data/data/org.torproject.android/app_bin/torrc".
Mar 18 20:48:26.601 [notice] Read configuration file "/data/data/org.torproject.android/app_bin/torrc.custom".
Mar 18 20:48:26.624 [notice] Opening Socks listener on 127.0.0.1:0
Mar 18 20:48:26.625 [notice] Socks listener listening on port 33324.
Mar 18 20:48:26.625 [notice] Opening DNS listener on 127.0.0.1:5400
Mar 18 20:48:26.626 [notice] Opening Transparent pf/netfilter listener on 127.0.0.1:9040
Mar 18 20:48:26.626 [warn] Could not bind to 127.0.0.1:9040: Address already in use. Is Tor already running?
Mar 18 20:48:26.626 [notice] Opening Control listener on 127.0.0.1:0
Mar 18 20:48:26.626 [notice] Control listener listening on port 60999.
Mar 18 20:48:26.626 [notice] Closing partially-constructed Socks listener on 127.0.0.1:33324
Mar 18 20:48:26.627 [notice] Closing partially-constructed DNS listener on 127.0.0.1:5400
Mar 18 20:48:26.627 [notice] Closing partially-constructed Control listener on 127.0.0.1:60999
Mar 18 20:48:26.627 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Mar 18 20:48:26.627 [err] Reading config failed--see warnings above.
</code></pre>
| 0non-cybersec
| Stackexchange | 707 | 2,187 |
Man-in-the-middle Blue Coat proxy SSL or what?. <p>I have just discovered that my workplace has enabled some new features in the Blue Coat network proxy. It seems like all HTTPS certificates in Chrome on Windows are being issued by this internal server. Under connection I only see: "The identity of this website has been verified by" this is an internal IP and not the "The identity of this website has been verified by Google Internet Authority". As I do when not running the on the corporate network or on my Ubuntu VM.</p>
<p>As Chrome allows this proxy as CA, everything seems okay, but this also makes me worry a bit. Are they actually doing a man-in-middle where they can look into my communication?</p>
<p>How can I eventually set which CA I want to use? Can I use more than one?</p>
| 0non-cybersec
| Stackexchange | 192 | 794 |
Parents filed tax refund early February and I haven't received it. When do I start getting worried and what do I do?. I'm not sure if this is necessarily personal finance, but this is the most populous reddit where I'm comfortable asking this.
My parents used FreeTaxUSA.com to file my taxes, the first time they did not declare me as dependent. According to the website, the e-filed tax return was accepted 2/7. On the IRS website it says electronically filing cuts the wait time from six weeks to three, but it's been 8 weeks now. It's been listed as "processing" for a while now.
I'm a little concerned, and my parents agree that I should've received it already. How much longer should I wait for it to get deposited? I've tried calling various IRS numbers with no human response. | 0non-cybersec
| Reddit | 181 | 785 |
Connect MySQL using SSL only with the --ssl-ca option. <p>I copied the <code>ca.pem</code> from server (Percona default 5.7 Ubuntu deb) able to make a secure connection with</p>
<pre><code>mysql --ssl-ca=/var/lib/mysql/ca.pem -u root
</code></pre>
<p>I find that the options <code>--ssl-cert</code> and <code>--ssl-key</code> are actually no needed.</p>
<p>What are the drawbacks in doing so?</p>
| 0non-cybersec
| Stackexchange | 142 | 401 |
Get input of switch control via headphone jack on iOS. <p>As a little holiday project I want to control an app via an accessibility switch which is connected via 3,5mm headphone jack to the iOS device.</p>
<p>This is the switch and the plug:<a href="https://i.stack.imgur.com/63hTl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/63hTl.png" alt="enter image description here"></a></p>
<p>My problem is that I don't have any clue what kind of signal is fired when I press the button - I assumed that it acts similar to a headphone's remote control.</p>
<p>Is there a way to measure the input of this or does anybody know how to get the input of the button on iOS?</p>
| 0non-cybersec
| Stackexchange | 198 | 680 |
Dont Allow to update attributes in laravel. <p>In laravel when adding an attribute to <code>$fillable</code> then we can mass assignment in both Create/Update but I want to allow an attribute to mass assignment in create but not allow for update. Now I use Updating Event to achieve this. Is there a better way?</p>
<pre><code>protected static function boot()
{
static::updating(function ($product) {
$product->price = $product->getOriginal('price');
}
}
</code></pre>
| 0non-cybersec
| Stackexchange | 137 | 492 |
Subsets and Splits