text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Explain proof for strategy to write a cycle as transpositions. <p>My group theory book teaches a strategy how to write a cycle as a series of transpositions. Although the strategy is not hard to understand, I appreciate that they included a proof that this strategy actually works. However I wasn't able to follow it until the end, so I would appreciate if someone could help me out. </p> <p>The strategy and the proof as follows:</p> <blockquote> <p><strong>Theorem:</strong> If <span class="math-container">$a_1, a_2,..., a_r$</span> are symbols (where <span class="math-container">$r \ge 2$</span>), then the composite of transpositions:</p> <p><span class="math-container">$$ \begin{pmatrix}a_1 &amp;a_r \end{pmatrix} \circ \begin{pmatrix}a_1 &amp;a_{r-1} \end{pmatrix} \circ \text{...}\circ \begin{pmatrix}a_1 &amp;a_3 \end{pmatrix} \circ \begin{pmatrix}a_1 &amp;a_2 \end{pmatrix} $$</span></p> <p>is equal to the cycle</p> <p><span class="math-container">$$ \begin{pmatrix}a_1 &amp; a_2 &amp; ... &amp; a_r \end{pmatrix} $$</span></p> <p><strong>Proof:</strong></p> <p>First we consider the symbol <span class="math-container">$a_1$</span>. The first transposition <span class="math-container">$\begin{pmatrix}a_1 &amp;a_2 \end{pmatrix}$</span> maps <span class="math-container">$a_1$</span> to <span class="math-container">$a_2$</span> and the remaining transpositions map <span class="math-container">$a_2$</span> to itself, so the composite maps <span class="math-container">$a_1$</span> to <span class="math-container">$a_2$</span>.</p> <p>Now we consider any symbol <span class="math-container">$a_s$</span>, where <span class="math-container">$2 \le s \le r-1$</span>. We see that:</p> <ul> <li>Each of the transpositions <span class="math-container">$$ \begin{pmatrix}a_1 &amp;a_2 \end{pmatrix}, \begin{pmatrix}a_1 &amp;a_3 \end{pmatrix}, ..., \begin{pmatrix}a_1 &amp;a_{s-1} \end{pmatrix} $$</span> maps <span class="math-container">$a_2$</span> to itself. </li> </ul> </blockquote> <p>Here I'm already getting some doubts. If we let <span class="math-container">$s=2$</span> then the transposition <span class="math-container">$\begin{pmatrix}a_1 &amp;a_2 \end{pmatrix}$</span> certainly doesn't map <span class="math-container">$a_s = a_2$</span> to itself, it maps it to <span class="math-container">$a_1$</span>. Or am I misunderstanding what they are saying?</p> <p>The proof continues:</p> <blockquote> <ul> <li>the next transposition <span class="math-container">$\begin{pmatrix}a_1 &amp;a_s \end{pmatrix}$</span> maps <span class="math-container">$a_s$</span> to <span class="math-container">$a_1$</span>. </li> <li>then the next transposition <span class="math-container">$\begin{pmatrix}a_1 &amp;a_{s+1} \end{pmatrix}$</span> maps <span class="math-container">$a_1$</span> to <span class="math-container">$a_{s+1}$</span></li> <li>and each of the remaining transpositions <span class="math-container">$$ \begin{pmatrix}a_1 &amp;a_{s+2} \end{pmatrix}, ..., \begin{pmatrix}a_1 &amp;a_r \end{pmatrix} $$</span> maps <span class="math-container">$a_{s+1}$</span> to itself. Hence the composite maps <span class="math-container">$a_s$</span> to <span class="math-container">$a_{s+1}$</span>. It remains to find the image of <span class="math-container">$a_r$</span>. [...]</li> </ul> </blockquote> <p>I left out the last part because that is actually clear to me. I'm not following the line of reasoning that tries to show the composite maps <span class="math-container">$a_s$</span> to <span class="math-container">$a_{s+1}$</span>. </p>
0non-cybersec
Stackexchange
来週のJapan Identity &amp; Cloud Summitでの講演を楽しみにしています.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
BWF Daily Discussion and Beginner/RR Questions Thread for 2018-07-02. **Welcome to the /r/bodyweightfitness daily discussion thread!** * Feel free to post beginner questions or just about anything that's on your mind related to fitness! **Reminders:** * Read the [FAQ](http://www.reddit.com/r/bodyweightfitness/wiki/faq) as your question may be answered there already. * If you're unsure how to start training, check out our [Recommended Routine](https://www.reddit.com/r/bodyweightfitness/wiki/kb/recommended_routine), or our more skills based routine: [Move](https://www.reddit.com/r/bodyweightfitness/wiki/move). * Even though the rules are relaxed here, asking for medical advice is still not allowed. **For your reference we also have these weekly threads:** * [Motivation Mondays](http://www.reddit.com/r/bodyweightfitness/search?q=motivation+monday+author%3Aautomoderator&restrict_sr=on&sort=new&t=all) * [Training Tuesdays](http://www.reddit.com/r/bodyweightfitness/search?q=training+tuesday+author%3Am092+OR+author%3Aautomoderator&sort=new&restrict_sr=on) * [Concept Wednesdays](http://www.reddit.com/r/bodyweightfitness/wiki/weekly/conceptwednesday) * [Technique Thursdays](http://www.reddit.com/r/bodyweightfitness/wiki/weekly/techniquethursday) * [Form Check Fridays](https://www.reddit.com/r/bodyweightfitness/search?q=form+check+friday+author%3Am092+OR+author%3Aautomoderator&restrict_sr=on&sort=new&t=all) * [Slip Up Saturdays](http://www.reddit.com/r/bodyweightfitness/search?q=I+SUCK+SATURDAY+author%3Asolfire&sort=new&restrict_sr=on&t=all) * [Progress Sundays](http://www.reddit.com/r/bodyweightfitness/search?q=progress+sunday+author%3Am092+OR+author%3Asolfire&sort=new&restrict_sr=on) Feel free to join us on Discord! You can find the web client by clicking this link, [here](https://discord.gg/TsD9zeH). If you'd like to look at previous Discussion threads, [click here.](https://www.reddit.com/r/bodyweightfitness/search?q=Daily+Discussion+and+Beginner&sort=new&restrict_sr=on)
0non-cybersec
Reddit
Why do we specify the length of a VARCHAR in MySQL?. <p>I'm designing a MySQL table that will contain a row which contains a subject title of variable length, but probably between 40-100 characters. VARCHAR is the obvious choice, but I'm not clear on how to balance efficiency with ensuring that I capture all data. I can declare it as VARCHAR(256) and be very safe, or I can declare it as VARCHAR(512) and be crazy safe. From what I understand, VARCHAR only stores what you put in it, so why don't we just use VARCHAR(max) all the time? Is it just to protect against running over the 65,535 byte row size limit, which includes all columns in the row? What's the best design practice when you have a general idea about the upper limit of a string's length like this?</p> <p>Some people don't understand the question. I'm asking what the reason is to specify a limit on VARCHAR that isn't max. I know what a VARCHAR is, what max is, etc.</p>
0non-cybersec
Stackexchange
How to check recently installed rpms?. <p>I am trying to find some recently installed <code>rpms</code> on my <code>redhat linux</code> system, Does RPM provide any way to do this?</p> <p>I have tried </p> <pre><code>#rpm -qa </code></pre> <p>But it only provides installed rpms. What are the options available for this?</p>
0non-cybersec
Stackexchange
Let&#39;s Encrypt SSL Certificate Auto Renew with Certbot on Amazon Lightsail Server running Ubuntu 16.04.03 LTS. <p>I'm trying to set up SSL Certificate auto renewal on my boss's Amazon LightSail server. It was previously set up by a past contractor who isn't being a lot of help. I am very unfamiliar with Let's Encrypt so I searched for an article. I found <a href="https://www.onepagezen.com/letsencrypt-auto-renew-certbot-apache/" rel="nofollow noreferrer">this</a> guide on how to renew it. I followed the steps up to step 4 but the script that it says to add to my crontab file is for apache. When I checked the conf file in the renewal folder, it shows that the installer used was nginx and that the authenticator is standalone. In this case, how would I be able to modify the script to set an auto renewal for the SSL certificate. </p> <p>Here's the script: 45 2 * * 6 cd /etc/letsencrypt/ &amp;&amp; ./certbot-auto renew &amp;&amp; /etc/init.d/apache2 restart</p>
0non-cybersec
Stackexchange
When should Q_OBJECT be used?. <p>The documentation states that: </p> <blockquote> <p>The Q_OBJECT macro must appear in the private section of a class definition that declares its own signals and slots or that uses other services provided by Qt's meta-object system.</p> </blockquote> <p>But <em>exactly</em> what does that mean? On which QObject-derived classes can I safely omit it? Will problems arise if you omit Q_OBJECT on a QObject-derived class, and then inherit from that one? Basically I would like a little more information on when I can omit it from my Qt classes.</p>
0non-cybersec
Stackexchange
Explain why this homotopy works?. <p><a href="http://www.math.cornell.edu/~hatcher/AT/AT.pdf" rel="nofollow noreferrer">http://www.math.cornell.edu/~hatcher/AT/AT.pdf</a> </p> <p>It's page 351, but I'm having trouble with the line highlighted. <img src="https://i.stack.imgur.com/jhzHW.png" alt="enter image description here"></p> <p>The highlighted part makes no sense to me. I can see why $f_0=f$ as you would do this $f_0=(1-0)f+0g=f$, but then how do you get $f_1|K_1=g|K_1$. I was thinking that $f_1|K_1=(1-\varphi)f+\varphi g$?</p> <p>So how do you get that to be equal to g. I know g and f agree on vertices. But, I don't see how you get it. The before this bit is fine, but then this bit confuses me. </p>
0non-cybersec
Stackexchange
It just gets B E T T E R.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Why isn&#39;t my monitor&#39;s native resolution appearing as an option?. <p>I'm on a clean install of Ubuntu 10.04 LTS. My monitor's native resolution is 1280x1024. However, in the Monitor Preferences application, I am only presented with 640x480 and 800x600 as options. My video card is an on board Matrox G200eW. I tried installing the proprietary driver from Matrox's website, but the installer immediately throws four errors. I also tried using xrandr to set my resolution, but it simply pops back saying "Size 1280x1024 not found in available modes." How can I get 1280x1024 added to my available sizes to that I can switch to it?</p>
0non-cybersec
Stackexchange
Why typecasting an integer literal to a pointer value results in a non-const expression?. <p>I'm trying to write a struct to calculate the pointer offset between a base and a derived class as a constant expression in C++03. The code is as follows:</p> <pre><code>template &lt;typename Base, typename Derived, typename Via = Derived&gt; struct OffsetToBase { static const std::ptrdiff_t val = (const char*const)static_cast&lt;Base*const&gt;(static_cast&lt;Via*const&gt;((Derived*const)(1u &lt;&lt; 7))) - (const char*const)(1u &lt;&lt; 7); }; </code></pre> <p>The code compiles in GCC, but not in clang and VC. The error produced by clang and VC basically says that the initializer is not a constant expression with clang further underlines the sub-expression <code>(Derived*const)(1u &lt;&lt; 7)</code>. </p> <p>So, my question is what the standards say about this? And if the initializer does not qualify as a constant expression according to the standards, then what is the reasoning behind this?</p> <p><strong>UPDATE:</strong> For your interest, I've found these two discussions:</p> <p><a href="https://stackoverflow.com/questions/21592494/initializer-element-is-not-constant-error-for-no-reason-in-linux-gcc-compilin">&quot;Initializer element is not constant&quot; error for no reason in Linux GCC, compiling C</a></p> <p><a href="https://stackoverflow.com/questions/21972815/about-cast-in-integer-constant-expression-in-standard-c">About cast in integer constant expression (in standard C)</a></p> <p>But I don't think the same rules apply to C++.</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Solo: A Star Wars Story Currently Tracking For A $150 Million Opening Weekend.
0non-cybersec
Reddit
Kiev after last night's riots (photos).
0non-cybersec
Reddit
Library of Babel: A website that contains every possible permutation of letters.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
How do I find orphaned computer objects in Active Directory using PowerShell?. <p>How can I find all computer accounts in my Active Directory domain that have been inactive for x days using PowerShell?</p> <blockquote> <p>Note that I do actually know how to do this. This is a self-answered question just to get the knowledge out there. If anyone else has a better way, feel free to post it!</p> </blockquote>
0non-cybersec
Stackexchange
Central Limit Theorem Fourier Isometry Confusion. <p>Okay, so I'm trying to understand the proof of the classical CLT. I'm not really a probability guy, so I'll apologize in advance for the analysis-heavy language used.</p> <p>Statement: If $X_i\in L^1\cap L^2$ independent with constant mean and second moment. Then $$ \sum_{i=1}^N\frac{x_i}{\sqrt{N}} $$ converges weakly (in the probabilist sense) to a Gaussian.</p> <p>Looking at the proof, we show essentially that the Fourier Transform (characteristic function) of a sequence of functions (rvs) $f_n$ converges to the Fourier Transform of a Gaussian at least pointwise. </p> <p>Now, what confuses me is how we complete the proof. We know that the Fourier Transform is an Isometry on $L^2$, so why don't we use this? The standard proof seems to go through either some sort of approximation-theoretic argument using essentially Schwartz class functions and their density to obtain weak convergence or via something called the continuity theorem. Isn't there a another/easier way using the Fourier Isometry (of $L^2$)? The idea here is of course that isometry somehow means that both spaces have the same topology and thus convergence in either is equivalent to convergence in the other.</p> <p>I'd appreciate any arguments as to why replacing Schwartz argument with the $L^2$ argument does or does not work! References are of course also appreciated.</p>
0non-cybersec
Stackexchange
next versus if in a .each loop?. <p>I have a text processing thing I'm doing in Ruby. Basically, I have to implement a simple state machine (with one character look-behind).</p> <p>My code at the moment looks like this:</p> <pre><code>text.each{ |c| ... ... ... ... if @state!=:some_state next end #processing stuff for if in :some_state mode ... ... ... ... ... } </code></pre> <p>Is this proper? Or should it rather be implemented like:</p> <pre><code>text.each{ |c| ... ... ... ... if @state==:some_state #processing stuff for if in :some_state mode ... ... ... ... ... end } </code></pre> <p>Is there a right way or is it just preference? Which one blends more with "the ruby way" of doing things?</p>
0non-cybersec
Stackexchange
I shared my cuckolding fantasy with my wife, she indulged it for a while, then changed her mind. However, I checked her web history and she is still watching cuckold themed porn quite often.. The topic, basically describes my question in a nutshell. But to add more details. We're both in our early 30s, she has an extremely high libido, while I have a moderately high one. Which means we do have sex maybe 2-3 times a week, but according to her she'd want more. Very early in our relationship she told me she's turned on by big cocks quite a bit, but never experienced one (my 6 inches being her biggest). So obviously, you can see how this eventually led to me indulging in cuckold territory. And for the last 4 years, we've indulged this fantasy quite a bit. Nothing, turned us on this much before and we both enjoyed it. However, she never quite took the plunge. I think it was a combination of her having anxiety about being sexually intimate with another man after being exclusive to me for about 10 years. She admitted this to me a year ago and we established what we called "partial cuckolding"; which allowed her to go out flirt, dance, grind, get felt up by other men - but no actual sex or making out. And she did this twice, one time even breaking some rules as she did let the guy feel up her breasts and even grinded on his cock on the dance floor until she orgasmed. That was 9 months ago, she has since turned a complete 180 on the idea. Her reasoning is that, 9 months ago she realized how attracted she was to me - and didn't want any other men in her life, only me. She also, didn't like seeing me as a beta male (her words) who would let another man screw his wife. What then happened was that we sort of have awkward sex (like we were both holding back on talking about cuckolding) for months. For the last 3 months, our sex life has been great and the awkwardness gone. BUT, out of curiosity I checked her browser history and 4 times in the last month she been watching cuckold porn, interracial big cock porn and things along those lines. Now, everyone of you will tell me, just ask her. Well I did, and she lied saying nothing about the cuckolding idea turns her on anymore, and no part of her wants to do it. So I've come to you now, with my dilemma. 1. Is it a case where she's afraid or indulging me in because of how much she said she didn't want it. As she's afraid of being a hypocrite? 2. Does she secretly need this to get off, but much prefers our sex life this way? I can't imagine that being fulfilling as I held this cuckold fantasy close to my chest for years which was mentally difficult. 3. She wants to do it, but maybe is still unsure of my reaction, because I too tell her it no longer turns me on. The truth is, it still does, but I've mentally compartmentalized that fantasy. So I can go weeks without indulging it. Honestly, what I want is for her to be happy and if cuckolding makes her happy then I'm 100% GTG, if not then I'm fine. But yes, i do lean slightly into the cuckolding territory.
0non-cybersec
Reddit
Just Watched David Cronenberg’s “The Fly” For The First Time. Absolutely incredible film! Been wanting to watch it for forever. Jeff Golblum was outstanding, but the best part is just how amazing the special effects and creature design still hold up remarkably well to this day. Great acting, drama, and suspense as well as some genuinely icky moments. Who else loves the fly?!
0non-cybersec
Reddit
Cannot install HP printer: plugin installation not successful. <p>I am trying to set up my HP LaserJet P1102 on Ubuntu 19.04.</p> <p>I know the <a href="https://askubuntu.com/questions/1070470/how-should-i-install-hplip-binary-proprietary-plugin-driver-for-my-hp-printer-or">theoretical procedure</a> to install the printer, but this procedure does not work for me, following the &quot;correct&quot; procedure to install the printer (the software + the plugin) fails as follows.</p> <p>I have downloaded and installed hplip 3.19.5 from <a href="https://developers.hp.com/hp-linux-imaging-and-printing" rel="nofollow noreferrer">here</a>.</p> <p>At first the installation seems to succeed. It asks for plugin to be installed, then it says &quot;Plugin installation successful&quot;. But after I click OK on this message, it returns to the window in which I should choose which printer to install, and another message pops up:</p> <blockquote> <p>error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins. Visit <a href="http://hplipopensource.com" rel="nofollow noreferrer">http://hplipopensource.com</a> for more infomation.</p> <p>error: hp-setup failed. Please run hp-setup manually.</p> </blockquote>
0non-cybersec
Stackexchange
Pete Hines Confirms That Elder Scrolls VI Will Be Fully Single-Player.
0non-cybersec
Reddit
SQL 2008 RTM Temp Tables. <p>Today I implemented a monitoring solution on our SQL server using Cacti and the first thing i noticed is the growth in the number of temporary tables, in just 3 hours on our test system we had an additional 300+ temp tables in the temp DB. I also noticed that SQL Server's memory growth over these 3 hours was huge - 15 GB utilized after 3 hrs.</p> <p>There were only 3-4 users testing on the test system and about 5 connections open to the application when I ran a SP_WHO.</p> <p>What can be causing this? I did a query on the objects in the temp DB and all the names are similar to this #XXXXXXXXX, I read somewhere that these are from the Table Variable (Declare @myTable...)</p> <p>Is there any way to check why we have a growth in the number of temp tables &amp; what is causing it? Any help at this stage would be greatly appreciated.</p> <p>I am going to be installing the service packs tomorrow for 2008, hopefully that solves the problem.</p>
0non-cybersec
Stackexchange
Is the exponential function the one this problem is hinting at?. <blockquote> <p>Suppose that $f$ is holomorphic on all of $\mathbb{C}$ and that $$\lim_{n\rightarrow \infty} \left(\frac{\partial}{\partial z}\right)^nf(z)$$ exists, uniformly on compact sets, and that this limit is not identically zero. Then the limit function $F$ must be a very particular kind of entire function. Can you say what kind?</p> </blockquote> <p><strong>My attempt/thoughts:</strong></p> <p>Well if the limit function is $F$, then $$\frac{\partial}{\partial z}\left(F(z)\right) = \frac{\partial}{\partial z}\left(\lim_{n\rightarrow \infty} \left(\frac{\partial}{\partial z}\right)^nf(z)\right) = \lim_{n\rightarrow \infty} \left(\frac{\partial}{\partial z}\right)^{n+1}f(z) = F(z).$$</p> <p>Therefore, $$F'(z) = F(z) \implies F(z) = Ae^z$$</p> <p>Where $A$ is some complex number.</p> <p>However, this problem is supposed to be one of the harder problems, so my guess is that I must have assumed something that I shouldn't have. Is this wrong? If so, could you point out my error?</p>
0non-cybersec
Stackexchange
The more programming languages you learn, the easier it becomes to learn new ones..
0non-cybersec
Reddit
Röyksopp - This Must Be It [Electro].
0non-cybersec
Reddit
Online, How Much Security Is Too Much? .
1cybersec
Reddit
controlling spacing between lines in tree of contents. <p>Since yesterday I have learned that doing a hard reset on a git branch also throws away stashed changes. So, I need to recreate some steps that I have inadvertently thrown away. Unfortunately I cannot remember how I decreased the spacing between lines of contents table. I have tried </p> <pre><code>\renewcommand{\cftsubsecafterpnum}{\vspace{-8pt}} \renewcommand{\cftsubsubsecafterpnum}{\vspace{-8pt}} </code></pre> <p>which works, but unfortunately I also have the custom defined <code>subsubsubsection</code> which I am unable to modify using the above logic using <code>tocloft</code> package.</p> <p>I have also tried </p> <pre><code>\renewcommand{\baselinestretch}{0.8}\normalsize \tableofcontents \renewcommand{\baselinestretch}{1.0}\normalsize </code></pre> <p>but this controls only the space of multilines in TOC.</p> <p>Below are images of what I have now and what it used to look like. Any hints on how to decrease spacing between the lines would be much appreciated.</p> <p>This is "before" look of how I managed to decrease the spacing. <a href="https://i.stack.imgur.com/hcxrB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hcxrB.jpg" alt="enter image description here"></a></p> <p>This is what it looks now. <a href="https://i.stack.imgur.com/bUGbd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bUGbd.jpg" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
Android custom chrome tab with deep links. <p>I have an Android/Kotlin application and I would like to configure deep links for certain pages to open inside my application (to look native).</p> <p>At the moment, I have intent filters that redirect the user to an activity with WebView in which I open the desired url:</p> <pre><code>&lt;activity android:name=".activity.WebViewActivity"&gt; &lt;intent-filter android:label="Futurity"&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:host="api.example.com" android:pathPrefix="/auth/confirm" android:scheme="https" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; class WebViewActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_web_view) val data = intent.data // construct url val url = if (intent.data != null ) { "https://" + data.host + data.path + "?" + data.query } appWebView.webViewClient = WebViewClient() appWebView.loadUrl(url) } } </code></pre> <p>This works fine, but I would like to use Chrome custom tabs instead for security reasons.</p> <p>However, when I try to configure the custom tab instead of WebView, I am getting an infinite loop of redirects between the page (launched in the chrome tab) and the intent filter which immediately redirects user back to the activity:</p> <pre><code>CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent customTabsIntent = builder.build(); customTabsIntent.launchUrl(this, Uri.parse(url)); </code></pre> <p>How can I achieve the same behavior as with webviews but without modifying the url? Is it even doable?</p>
0non-cybersec
Stackexchange
Password authentication using a master key and KDF without storing password. <p>I want to make a service stateless(has no data to store or mantain). But the service shoule be able to authenticate user. </p> <p>What I'm considering is using <a href="https://en.wikipedia.org/wiki/Key_derivation_function" rel="nofollow noreferrer">key derivation function</a> with a shared master secret key and username to calculate user password each time when user login. The KDF should ensure it generates the same password everytime for specific user. The service will deliver the derived password to correspond user.</p> <p>For example, use PBKDF2 and use username+secret_shared_master_key as the password, kinda like a <code>username-based key derivation function</code></p> <p>I'm wondering is this way secure cryptographically? Thanks in advance!</p> <hr> <p>After some discussion with SteffenUllrich in comments, seems using <code>HMAC(secret_master_key, username)</code> or <code>PBKDF2(HMAC(secret_master_key, username))</code> as the user's password is one option to do the thing.</p>
0non-cybersec
Stackexchange
Just lost my best friend. My cat died. I had to leave him with my parents at home when I moved for work. My folks just called me with the news. He was fine this morning. Then a few hours ago, he was acting "funny", to the point where my parents were getting him ready for the emergency vet. He had a seizure and passed. He was only four. My dad could only spit the news out before my mom took the phone. My dad never cries. But he did. I can't stop crying. Cato saved my life. I was about to die a few years ago, depressed, unemployed, lost all my friends to a bad break up riddled with trauma. Cato walked with me through isolation, slept with me through the nightmares, and cuddled me through painful physical therapy. He loved everyone unconditionally. He was bad at being a cat. He wanted everyone to share his toys, his "kisses", and his love. He sat with my mom when both her kids moved out last year, he kept my dad company too. I felt okay leaving because my parents had him. He couldn't follow me. I kept putting off visiting after I got this job. I skipped Easter because I was "too busy". I contented myself with hearing his "hello?" Meow through the phone and promised to visit for Memorial Day. Now I can't. He was talented at sounding like a person saying "hello" to get you to pay attention. He could manipulate my dad into starting a fire in the wood stove because of his "cold paws" that you could feel through your clothes. He stole the covers, hogged the bed, and snored worse than any human I ever met. He knew what doors each family member walked through, and waited for them at the right time. Mom says he never stopped "waiting" for me at mine. Cato, I'm sorry, little buddy.
0non-cybersec
Reddit
Ng5 Karma Jasmine test renders component instead of result page. <p>Let's say i have a very simple 'create' unit test, kind that <code>ng cli</code> generates for you:</p> <pre><code>describe('MyComponent', () =&gt; { let component: MyComponent; let fixture: ComponentFixture&lt;MyComponent&gt;; beforeEach(async(() =&gt; { TestBed.configureTestingModule({ declarations: [MyComponent], imports: [ HttpClientTestingModule, FormsModule, RouterTestingModule.withRoutes([{ path: 'home', redirectTo: '/' }]) ], providers: [SomeService1, SomeService2, { provide: SomeService3, useValue: {} }], schemas: [NO_ERRORS_SCHEMA] }) .compileComponents(); })); beforeEach(() =&gt; { fixture = TestBed.createComponent(MyComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () =&gt; { expect(component).toBeTruthy(); }); }); </code></pre> <p>Now when i run this test like so <code>ng test --browser=Chrome</code> instead of looking at Karma results page, i am looking at my component.</p> <p>My CLI version is <code>1.6.3</code>, Karma <code>1.7.1</code>, Angular <code>5.2.0</code>, OS macOS.</p> <p><strong>Update</strong> My browser is captured, karma loads, tests run but instead of karma results i see my full-screen component because it's css overlays their results. If i find the div and delete it in the DOM, i can see Karma results.</p> <p>I was just expecting Angular to remove that node.</p>
0non-cybersec
Stackexchange
Five-Cheese Mac and Cheese as made by Lawrence Page.
0non-cybersec
Reddit
Understanding the lower and upper limit of a graph. <p>I was recently presented the following graph:</p> <p><img src="https://i.imgur.com/wdP5PmC.jpg" alt=""></p> <p>I was given very little context and I have to recreate it. I don't want it to be done for me, but some context would help.</p> <p>Any idea what these upper and lower limits represent? Are they represented by an exponential function (I noticed the lines curve)? Or is there some value at each point (it doesn't seem like it the way they are drawn)? I think it has something to do with error or confidence level?</p> <p>I'm able to represent the data points in excel, and make a line of best fit, but have no idea what the dotted lines represent, or how to add them to my excel graph. Any help would be great.</p>
0non-cybersec
Stackexchange
Needing Context in non-Activity classes. <p>I have some classes within my application that need to call Android functions that require the Context as a parameter. I don't have it as the class is not a subclass of the Activity class.</p> <p>What is the correct way to tackle this problem?</p> <ol> <li>Pass it as a parameter on each call?</li> <li>Pass it at class instantiation and keep it?</li> </ol>
0non-cybersec
Stackexchange
Why cutting the cable is making me a better cook.... I know cable and satellite TV is loaded with cooking shows but it wasn't until we gave it (almost) all up that I really started getting into a cooking groove. We only get over-the-air TV now and it turns out most PBS stations also broadcast a couple of other channels in addition to their main one (albeit not in HD). In my neck o' the woods, one of them is the "Create" channel. Whilst I always enjoyed cooking, I feel that the shows *America's Test Kitchen* and the companion show *Cook's Country USA* have really made mealtimes more enjoyable for everybody. I get the satisfaction of doing things in the kitchen that I never knew about growing up and my wife and our neighbors eat the results. I'm by no means a great (or even good) cook but I *know* I'm getting better (and saving $100 a month!). The only monetary down-side is that there was some purchasing of quality items (knives and pans, for the most part). Sorry if this sounds like a commercial; I just wanted to give a shout-out.
0non-cybersec
Reddit
Dual Boot Mint Linux cursor freezes on F541N (aka X541NA)- how to fix?. <p>Bought <a href="https://www.asus.com/Laptops/X541NA/" rel="nofollow noreferrer">ASUS VivoBook Max- F541N</a> with pre-installed Win 10 few days ago and dual booted into Mint Linux Sylvia (Cinnamon) 18.3 successfully</p> <p>I see that the keyboard cursor (touchpad) pointer and touchpad suddenly freezes after a while (I don't use a mouse ). Observed on Linux Mint 18.3 and 18.2. The freeze is sure to occur the moment I initiate update ( On a few occasions the entire system is unresponsive and I need to hard reboot </p> <ul> <li><p>Switching to Intel Microcode (open source), rebooted and the behaviour persists (it was on <em>Don't change CPU microcode</em>)</p></li> <li><p>All updates Level 1 and 2 done (corresponding to <em>Keep my computer safe</em>)</p></li> <li><p>No difference if I update Kernel</p></li> <li><p>It’s a virgin system – nothing installed it </p></li> <li><p>Laptop tool confirms that it's running the latest BIOS</p></li> <li><p>Resource applet shows CPU usage less than 15% and memory usage less than 1.5 GB when the freeze occurs- checked multiple times</p></li> </ul> <p>Same behavior persists over multiple installs over last few days</p> <p><strong>tl:dr;</strong> <strong>How do I fix this problem?</strong> </p> <p>( It's barely a week old so I want to be very , very careful and not screw up)</p> <p>Here is more information about the setup using <code>inxi -Fxz</code></p> <pre><code>System: Host: s****-X541NA Kernel: 4.13.0-45-generic x86_64 (64 bit gcc: 5.4.0) Desktop: Cinnamon 3.6.6 (Gtk 3.18.9-1ubuntu3.3) Distro: Linux Mint 18.3 Sylvia Machine: System: ASUSTeK (portable) product: X541NA v: 1.0 Mobo: ASUSTeK model: X541NA v: 1.0 Bios: American Megatrends v: X541NA.318 date: 02/27/2018 CPU: Quad core Intel Pentium N4200 (-MCP-) cache: 1024 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 8755 clock speeds: max: 2500 MHz 1: 852 MHz 2: 798 MHz 3: 842 MHz 4: 1277 MHz Graphics: Card: Intel Device 5a84 bus-ID: 00:02.0 Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: [email protected] GLX Renderer: Mesa DRI Intel HD Graphics 505 (Broxton) GLX Version: 3.0 Mesa 17.0.7 Direct Rendering: Yes Audio: Card Intel Device 5a98 driver: snd_hda_intel bus-ID: 00:0e.0 Sound: Advanced Linux Sound Architecture v: k4.13.0-45-generic Network: Card-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 01:00.0 IF: enp1s0 state: down mac: &lt;filter&gt; Card-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter driver: ath9k bus-ID: 02:00.0 IF: wlp2s0 state: up mac: &lt;filter&gt; Drives: HDD Total Size: 1000.2GB (1.3% used) ID-1: /dev/sda model: ST1000LM035 size: 1000.2GB Partition: ID-1: / size: 29G used: 6.3G (23%) fs: ext4 dev: /dev/sda6 ID-2: /home size: 446G used: 160M (1%) fs: ext4 dev: /dev/sda8 ID-3: swap-1 size: 6.37GB used: 0.00GB (0%) fs: swap dev: /dev/sda7 RAID: No RAID devices: /proc/mdstat, md_mod kernel module present Sensors: System Temperatures: cpu: 35.0C mobo: N/A Fan Speeds (in rpm): cpu: N/A Info: Processes: 201 Uptime: 13 min Memory: 607.0/3809.0MB Init: systemd runlevel: 5 Gcc sys: 5.4.0 Client: Shell (bash 4.3.481) inxi: 2.2.35 </code></pre>
0non-cybersec
Stackexchange
Daughter has a case of the "its not fair's" so I picked this up today. .
0non-cybersec
Reddit
Yahoo! Shellshocked Like Ninja Turtles!.
0non-cybersec
Reddit
&quot;Mechanically generated&quot; java source files in the Java source code. <p>As I was looking through the Java source code, I found some unusual files, mostly related to <code>ByteBuffer</code>s in the <code>java.nio</code> package which had a very messy source code and were labelled <code>This file was mechanically generated: Do not edit!</code>. </p> <p>These files also contained large portions of blank lines (some even in the middle of javadocs (!!?)), presumably to prevent the line numbers from changing. I have also seen a few java decompilers, such as <a href="https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler" rel="nofollow"><code>procyon-decompiler</code></a>, which have an option to keep line numbers, but I doubt that's the case, because putting blank lines before the final accolade changes nothing.</p> <p>Here are a few of these files (I couldn't find any links to them online and didn't pastebin them because I don't want to break any copyright, but you can find them in the <code>src.zip</code> folder at the root of your JDK installation folder):</p> <ul> <li>java.nio.ByteBuffer</li> <li>java.nio.DirectByteBufferR</li> <li>java.nio.Bits</li> <li>java.nio.BufferOverflowException</li> </ul> <p>I'd be curious to know:</p> <ul> <li>Which tool generated these files?</li> <li>Why does the tool keep the line numbers the same? Is it to make debugging (stacktraces) easier?</li> <li>Why would a tool be used to generate them, while all other classes are programmed by humans?</li> <li>Why would the tool put blank lines randomly inside parentheses, before the final accolade, or even in javadocs?</li> </ul>
0non-cybersec
Stackexchange
Understanding tax liabilities of a 2nd home in another state. My wife and I live and rent in CA but are planning to purchase a house in Oregon. We want to rent it out 1-2 years before moving into it. As such, we're buying it as a '2nd home' and will be first time homeowners. I've read through some of the tax laws and will find an accountant to go over this with us, but I was hoping the kind people of reddit could help give us an outline of how to get the maximum deductions and provide a heads-up to things to be aware of before we buy a house. We're trying to break even until we move in. Things I'm aware of that we should or can do assuming we live in it less than 14 days a year: * Keep receipts for everything * Deduct everything possible for those days it's rented out: Mortgage tax, property tax, insurance premiums, utilities, repairs, property management fees, travel expenses to/from property, depreciation on the property, any energy efficient items we install. Are there other tax deductions or credits that I'm missing? * Are we missing out on tax benefits by not living it as our first house? * Is only the profit from the difference between the mortgage and rental income taxed as taxable income? (that might be a loaded question) * Is there anything else we be prepared for, outside of the normal headache of owning a 2nd home far away from us? Edit: Assuming we use an investment property loan, the rest of my questions still apply. Thanks to aardy for calling the loan situation out.
0non-cybersec
Reddit
What is growing in the urinal? [NSFL][xpost /r/trypophobia].
0non-cybersec
Reddit
Dedicated Server or Terminal Server. <p>Asked this question by a software provider. How would I know? What's the difference?</p>
0non-cybersec
Stackexchange
GRID 2 Teaser vid!.
0non-cybersec
Reddit
OpsCenter 5.1.2 fails to start with SSL enabled on CentOS 5. <p>This applies to OpsCenter 5.1.0 and 5.1.1 as well.</p> <p>I got the following error when trying to run OpsCenter 5.1.2 on a CentOS 5 server:</p> <pre><code>Unhandled Error Traceback (most recent call last): File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/scripts/_twistd_unix.py", line 317, in startApplication app.startApplication(application, not self.config['no_save']) File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py", line 653, in startApplication service.IService(application).startService() File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/service.py", line 277, in startService service.startService() File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1141, in unwindGenerator return _inlineCallbacks(None, f(*args, **kwargs), Deferred()) --- &lt;exception caught here&gt; --- File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1020, in _inlineCallbacks result = g.send(result) File "/usr/lib/python2.6/site-packages/opscenterd/OpsCenterdService.py", line 45, in startService File "/usr/lib/python2.6/site-packages/opscenterd/OpsCenterdService.py", line 101, in setupWebServer File "/usr/lib/python2.6/site-packages/opscenterd/WebServer.py", line 120, in makeWebServer File "/usr/lib/python2.6/site-packages/opscenterd/SslUtils.py", line 2, in &lt;module&gt; exceptions.ImportError: No module named OpenSSL </code></pre> <p>python26 is installed from EPEL. This is OpsCenter from Datastax. SSL support worked fine with OpsCenter 5.0.x.</p>
0non-cybersec
Stackexchange
The WTC did not collapse because of fire .
0non-cybersec
Reddit
PsBattle: This whining cat.
0non-cybersec
Reddit
How to use Sequelize belongsToMany associations?. <p>I have projects and users.</p> <p>A user can have many projects.</p> <p>A project can have multiple users.</p> <p>I tried to model this with a belongsToMany association.</p> <p>On my server I defined the associations like that:</p> <pre><code>user.belongsToMany(project, { through: 'writer_of_project' foreign-key: 'user' as: \projects }); project.bbelongsToMany(user, { through: 'writer_of_project' foreign-key: 'project' as: 'writers' }); </code></pre> <p>On my client it looks like this:</p> <pre><code>user: { id: 1, ... projects: [1,2,3] } project: { id: 1, ... writers: [1,4,5] } </code></pre> <p>On the server the association requires a third table to store the association and Sequelize doesn't seem to let me include the corresponding models from it.</p> <p>If I run a <code>project.find(1)</code> with <code>include:[user]</code> I get </p> <blockquote> <p>user is not associated with project!</p> </blockquote> <p>If I try to put the project from the example above into the update method. The users attribute is simply ignored (I expected a project.setUsers(projectUpdate.users to happen in the background).</p> <p><strong>What is the right way to deal with the loading and updating of these associations?</strong></p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
I want to make a enemy to fight against 8 level 2 PC's?. the enemy is a humanoid that only uses his legs to fight he is kinda like a monk. how do you do it?
0non-cybersec
Reddit
Kruger National Park..
0non-cybersec
Reddit
Keep your resolutions simple and focused this year..
0non-cybersec
Reddit
Enable coredump centos 7 with systemd. <p>I went through couple of articles after some googling but nothing seems to work. </p> <p>I am using Centos 7.</p> <p>Let me explain what have I done so far.</p> <p>I followed step by step</p> <p><a href="http://www.kibinlabs.com/re-enabling-core-dumps-redhat-7/" rel="nofollow noreferrer">http://www.kibinlabs.com/re-enabling-core-dumps-redhat-7/</a></p> <p>After that, I can get the coredump generated but only if I start the process manually, however, whenvever I start the process like</p> <pre><code>systemctl start &lt;myprocess&gt; </code></pre> <p>it does not generate coredump after killing with SEGV</p> <pre><code>kill -11 &lt;pid&gt; </code></pre> <p>var/log/messages shows that it got the signal SEGV but I cant see the coredump.</p> <p>The kernel core pattern is also set.</p> <pre><code>cat /proc/sys/kernel/core_pattern /var/lib/coredumps/core-%e-sig%s-user%u-group%g-pid%p-time%t coredump.conf cat /etc/sysctl.d/50-coredump.conf Storage=both cat /etc/sysctl.d/99-sysctl.conf fs.suid_dumpable = 1 kernel.core_uses_pid = 1 Storage=both [root@server01 coredumps]# ls -l /etc/sysctl.d/50-coredump.conf lrwxrwxrwx 1 root root 26 Aug 6 13:51 /etc/sysctl.d/50-coredump.conf -&gt; /etc/systemd/coredump.conf </code></pre>
0non-cybersec
Stackexchange
run Airflow webserver on EC2 CentOS using Systemd: Permission denied. <p>I'm using <a href="https://airflow.apache.org/" rel="nofollow noreferrer">Airflow</a> in EC2 CentOS with <a href="https://en.wikipedia.org/wiki/Systemd" rel="nofollow noreferrer">systemd</a> to manage daemons for starting airflow processes (ie: webserver, worker and scheduler). When I run <code>sudo systemctl start airflow-webserver</code></p> <pre><code>: ec2-user : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl enable airflow-webserver Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal sudo[11680]: ec2-user : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl start airflow-webserver Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[11684]: Failed at step EXEC spawning /home/ec2-user/.local/bin/airflow: Permission denied Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[1]: airflow-webserver.service: main process exited, code=exited, status=203/EXEC Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[1]: Unit airflow-webserver.service entered failed state. Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[1]: airflow-webserver.service failed </code></pre> <p><em>airflow-webserver.service</em></p> <pre><code>[Unit] Description=Airflow webserver daemon After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service Wants=postgresql.service mysql.service redis.service rabbitmq-server.service [Service] EnvironmentFile=/etc/sysconfig/airflow User=airflow Group=airflow Type=simple ExecStart=/home/ec2-user/.local/bin/airflow webserver --pid /run/airflow/webserver.pid RestartSec=5s PrivateTmp=true [Install] WantedBy=multi-user.target </code></pre> <p>airflow group and user are present:</p> <pre><code>$ less /etc/group # airflow:x:1001:ec2-user $less etc/psswd # ec2-user:x:1000:1000:EC2 Default User:/home/ec2-user:/bin/bash # tss:x:59:59:Account used by the trousers package to sandbox the tcsd # daemon:/dev/null:/sbin/nologin # airflow:x:1001:1001::/home/airflow:/bin/bash </code></pre> <p><a href="https://stackoverflow.com/questions/47291335/run-airflow-process-and-airflow-webserver-as-airflow-user">THIS</a> does not help.</p>
0non-cybersec
Stackexchange
How do you feel about attending a concert with a platonic girl-friend to watch a performer serenade with sweet sweet baby-making music?. I think it'd make me feel quite uncomfortable, yet I've agreed to go... She asked me to a concert after two "dates". I'm hesitant to call them dates because I figured I was just meeting a girl for the hell of it. So I think we're platonic, and now I don't know how I'm going to act at the concert. Men, advice? Do I have any reason to feel uncomft? Should I just keep my eyes fixated on the dude singing and try to enjoy the music? edit: forgot to add a bit of detail: we've been strictly exchanging non-flirtatious normal messages with each other for a couple months before actually meeting in person. This weighs heavily into my reason for thinking it's platonic.
0non-cybersec
Reddit
Highlighting issue with solr 8.2. <p>Partial highlighting for <code>solr 8.2</code> is not working fine for me. I am able to do a partial search by using <code>NGramTokenizerFactory</code>. But the highlight dosen't seems to be working now.</p> <p>Here is Field type defination:</p> <pre><code> &lt;fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"&gt; &lt;analyzer type="index"&gt; &lt;tokenizer class="solr.NGramTokenizerFactory" maxGramSize="15" minGramSize="1"/&gt; &lt;filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;/analyzer&gt; &lt;analyzer type="query"&gt; &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt; &lt;filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/&gt; &lt;filter class="solr.SynonymGraphFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;/analyzer&gt; &lt;/fieldType&gt; </code></pre> <p>Here is my Field: </p> <pre><code>&lt;field name="title" type="text_general" multiValued="true" indexed="true" stored="true"/&gt; </code></pre> <p>Query:</p> <pre><code>http://10.232.208.141:8986/solr/up1/select?df=title&amp;hl.fl=title%2Ccontent &amp;hl.simple.post=%3C%2Fb%3E&amp;hl.simple.pre=%3Cb%3E&amp;hl=on&amp;q=digi&amp;rows=1 </code></pre> <p>Expected highlight:</p> <pre><code>"title":["AgencyPortal &lt;b&gt;Digi&lt;/b&gt;tal Engagement Solution Integration—Case Study | Cognizant"]}}, </code></pre> <p>Current output Highlight:</p> <pre><code>"title":["AgencyPortal Digital Engagement Solution Integration—Case Study | Cognizant"]}}, </code></pre>
0non-cybersec
Stackexchange
Patagonia donating 100% of its Black Friday sales to envrionmental groups.
0non-cybersec
Reddit
Not sure if wholesome, but definitely helping out some people.
0non-cybersec
Reddit
Am I have right answer about dual problem?. <p>I have some problems to make from primal problem to dual problem.</p> <p>If I have the primal problem like down below.</p> <p>Problem</p> <p><span class="math-container">$$ \text{Min} \qquad 3w_1 + 4w_2 + 5w_3 $$</span> <span class="math-container">$$ w_1 - w_2 \le ε_1 $$</span> <span class="math-container">$$ w_2 - w_3 \le ε_2 $$</span> <span class="math-container">$$ w_3 \le ε_3 $$</span> <span class="math-container">$$ 1 \le 2ε_1 +3ε_2 + 4ε_3 $$</span> <span class="math-container">$$ w_1 + w_2 + w_3 = 1 $$</span></p> <p>then I think its dual problem with dual variable x is</p> <p><span class="math-container">$$ \text{Max} \qquad ε_1x_1 + ε_2x_2 + ε_3x_3 + (2ε_1 +3ε_2 + 4ε_3)x_4 + x_5$$</span> <span class="math-container">$$ s.t. x_1 + x_5 \le3 $$</span> <span class="math-container">$$ x_2 \le 4 $$</span> <span class="math-container">$$ x_3 \le 5 $$</span> <span class="math-container">$$ \text{where} \quad r_4 \quad \text{and} \quad r_5 \quad \text{are} \quad \text{unrestricted} \quad \text{in } \quad \text{sign}. $$</span></p> <p>am I right?</p>
0non-cybersec
Stackexchange
Bray-Curtis Pairwise Analysis in R. <p>I am trying to calculate and visualize the Bray-Curtis dissimilarity between communities at paired/pooled sites using the Vegan package in R.</p> <p>Below is a simplified example dataframe:</p> <pre><code>Site = c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J") PoolNumber = c(1, 3, 4, 2, 4, 1, 2, 3, 4, 4) Sp1 = c(3, 10, 7, 0, 12, 9, 4, 0, 4, 3) Sp2 = c(2, 1, 17, 1, 2, 9, 3, 1, 6, 7) Sp3 = c(5, 12, 6, 10, 2, 4, 0, 1, 3, 3) Sp4 = c(9, 6, 4, 8, 13, 5, 2, 20, 13, 3) df = data.frame(Site, PoolNumber, Sp1, Sp2, Sp3, Sp4) </code></pre> <p>"Site" is a variable indicating the location where each sample was taken The "Sp" columns indicate abundance values of species at each site. I want to compare pairs of sites that have the same "PoolNumber" and get a dissimilarity value for each comparison.</p> <p>Most examples suggest I should create a matrix with only the "Sp" columns and use this code:</p> <pre><code>matrix &lt;- df[,3:6] braycurtis = vegdist(matrix, "bray") hist(braycurtis) </code></pre> <p>However, I'm not sure how to tell R which rows to compare if I eliminate the columns with "PoolNumber" and "Site". Would this involve organizing by "PoolNumber", using this as a row name and then writing a loop to compare every 2 rows? I am also finding the output difficult to interpret. Lower Bray-Curtis values indicate more similar communities (closer to a value of 0), while higher values (closer to 1) indicate more dissimilar communities, but is there a way to tell directionality, which one of the pair is more diverse?</p> <p>I am a beginner R user, so I apologize for any misuse of terminology/formatting. All suggestions are appreciated.</p> <p>Thank you</p>
0non-cybersec
Stackexchange
[ART] Hand painted shirt based on the movie “There Will Be Blood”.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
OpenCV build from source Windows make error &quot;RC Object&quot;. <p>I downloaded the latest source from github and configured opencv and the contrib modules. I can seem to build. I already turned off FFMPEG, which I manually downloaded the .dll previously, i know that has been a recent problem. I have succeeded in the past. But now i'm getting to</p> <pre><code>[ 50%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj C:\mingw\bin\windres.exe: invalid option -- W Usage: C:\mingw\bin\windres.exe [option(s)] [input-file] [output-file] The options are: -i --input=&lt;file&gt; Name input file -o --output=&lt;file&gt; Name output file -J --input-format=&lt;format&gt; Specify input format -O --output-format=&lt;format&gt; Specify output format -F --target=&lt;target&gt; Specify COFF target --preprocessor=&lt;program&gt; Program to use to preprocess rc file --preprocessor-arg=&lt;arg&gt; Additional preprocessor argument -I --include-dir=&lt;dir&gt; Include directory when preprocessing rc file -D --define &lt;sym&gt;[=&lt;val&gt;] Define SYM when preprocessing rc file -U --undefine &lt;sym&gt; Undefine SYM when preprocessing rc file -v --verbose Verbose - tells you what it's doing -c --codepage=&lt;codepage&gt; Specify default codepage -l --language=&lt;val&gt; Set language when reading rc file --use-temp-file Use a temporary file instead of popen to read the preprocessor output --no-use-temp-file Use popen (default) -r Ignored for compatibility with rc @&lt;file&gt; Read options from &lt;file&gt; -h --help Print this help message -V --version Print version information FORMAT is one of rc, res, or coff, and is deduced from the file name extension if not specified. A single file name is an input file. No input-file is stdin, default rc. No output-file is stdout, default rc. C:\mingw\bin\windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1517: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles\Makefile2:2363: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: *** [Makefile:160: all] Error 2 </code></pre> <p>cmake gui options</p> <pre><code>Detected version of GNU GCC: 47 (407) Could NOT find PythonInterp: Found unsuitable version "2.7.11", but required is at least "3.4" (found C:/Python27/python.exe) Could NOT find PythonInterp: Found unsuitable version "2.7.11", but required is at least "3.2" (found C:/Python27/python.exe) Could not find OpenBLAS include. Turning OpenBLAS_FOUND off Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file Caffe: NO Protobuf: NO Glog: NO Looking for tiny_dnn.h Looking for tiny_dnn.h - found Found tiny-dnn in: C:/Users/Ben/Documents/opencv/build/3rdparty/tinydnn/tiny-dnn-1.0.0a3 The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND') freetype2: NO harfbuzz: NO No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake. Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components. Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags Torch importer has been enabled. To run the tests you have to install Torch ('th' executable should be available) and generate testdata using opencv_extra/testdata/dnn/generate_torch_models.py script. Tesseract: NO General configuration for OpenCV 3.3.0-rc ===================================== Version control: f670a99 Extra modules: Location (extra): C:/Users/Ben/Documents/opencv_contrib/modules Version control (extra): 3.3.0-rc Platform: Timestamp: 2017-07-04T19:39:34Z Host: Windows 10.0.14393 AMD64 CMake: 3.5.0-rc3 CMake generator: MinGW Makefiles CMake build tool: C:/mingw/bin/mingw32-make.exe Configuration: Release CPU/HW features: Baseline: SSE SSE2 requested: SSE2 Dispatched code generation: SSE4_1 FP16 AVX AVX2 requested: SSE4_1 AVX FP16 AVX2 SSE4_1 (0 files): + SSE3 SSSE3 SSE4_1 FP16 (1 files): + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (1 files): + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (2 files): + SSE3 SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 C/C++: Built as dynamic libs?: YES C++ Compiler: C:/mingw/bin/g++.exe (ver 4.7.2) C++ flags (Release): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -march=i686 -fomit-frame-pointer -ffunction-sections -msse -msse2 -mfpmath=sse -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DNDEBUG C++ flags (Debug): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -march=i686 -fomit-frame-pointer -ffunction-sections -msse -msse2 -mfpmath=sse -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG C Compiler: C:/mingw/bin/gcc.exe C flags (Release): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -march=i686 -fomit-frame-pointer -ffunction-sections -msse -msse2 -mfpmath=sse -fvisibility=hidden -O2 -DNDEBUG -DNDEBUG C flags (Debug): -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -march=i686 -fomit-frame-pointer -ffunction-sections -msse -msse2 -mfpmath=sse -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG Linker flags (Release): Linker flags (Debug): ccache: NO Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 winmm 3rdparty dependencies: OpenCV modules: To be built: core flann imgproc ml objdetect phase_unwrapping photo plot reg surface_matching video xphoto bgsegm dnn face fuzzy img_hash imgcodecs shape videoio xobjdetect highgui superres ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo tracking videostab xfeatures2d ximgproc aruco optflow python2 Disabled: stitching world contrib_world structured_light Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 viz cnn_3dobj cvv dnn_modern freetype hdf matlab sfm Windows RT support: NO GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver encoder: 0x020e) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: NO avcodec: NO avformat: NO avutil: NO swscale: NO avresample: NO GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO Parallel framework: none Trace: YES () Other third-party libraries: Use Intel IPP: NO Use Intel IPP IW: NO Use Intel IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: NO Use OpenCL: NO Use OpenVX: NO Use custom HAL: NO Python 2: Interpreter: C:/Python27/python.exe (ver 2.7.11) Libraries: C:/Python27/libs/libpython27.a (ver 2.7.11) numpy: C:/Python27/lib/site-packages/numpy/core/include (ver 1.11.3) packages path: C:/Python27/Lib/site-packages Python 3: Interpreter: NO Python (for build): C:/Python27/python.exe Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO Matlab: Matlab not found or implicitly disabled Documentation: Doxygen: NO Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO Install path: C:/Users/Ben/Documents/opencv/build/install cvconfig.h is in: C:/Users/Ben/Documents/opencv/build ----------------------------------------------------------------- Configuring done Generating done </code></pre> <p>Is there a cmake flag that gets around this? opencv_core sounds pretty crucial...</p>
0non-cybersec
Stackexchange
I guess I believe in reincarnation now....
0non-cybersec
Reddit
Wither Desert Temple.
0non-cybersec
Reddit
[Homemade] Mega-Breakfast: Sausage, Hash Brown, Bacon, Toast, Beans, Mushrooms, Fried Egg..
0non-cybersec
Reddit
determine the locations of all the poles and zeros (including zeros at s = infinite). Make an S-Plane plot of the infinite poles and zeros. <p>Determine the locations of all the poles and zeros (including zeros at $S = \infty$). Make an $S$-Plane plot of the infinite poles and zeros. $$G(s) = \dfrac{5S^2 + 20S + 15}{S(S + 3)(S^2 + 4S + 4)}$$</p>
0non-cybersec
Stackexchange
Using FractionallySizedBox in a Row. <p>I want to have a widget of arbitrary width that contains a row of three widgets sized relatively to its parent.</p> <p><code>FractionallySizedBox</code> sounds like the right tool for the job, so I tried it like this:</p> <pre><code>Container(height: 24.0, color: Colors.black, child: Row(children: [ FractionallySizedBox(heightFactor: 1, widthFactor: 0.25, child: Container(color: Colors.orange)), FractionallySizedBox(heightFactor: 1, widthFactor: 0.15, child: Container(color: Colors.green)), FractionallySizedBox(heightFactor: 1, widthFactor: 0.05, child: Container(color: Colors.blue)), ] ) </code></pre> <p>But I'm getting an error</p> <blockquote> <p>BoxConstraints forces an infinite width.</p> </blockquote> <p>This happens even when I set some width on the enclosing container.</p> <p>Why doesn't this work?</p>
0non-cybersec
Stackexchange
Django - SQL bulk get_or_create possible?. <p>I am using <strong>get_or_create</strong> to insert objects to database but the problem is that doing 1000 at once takes too long time.</p> <p>I tried <strong>bulk_create</strong> but it doesn't provide functionality I need (creates duplicates, ignores unique value, doesn't trigger post_save signals I need).</p> <p>Is it even possible to do get_or_create in bulk via customized sql query? </p> <p>Here is my example code:</p> <pre><code>related_data = json.loads(urllib2.urlopen(final_url).read()) for item in related_data: kw = item['keyword'] e, c = KW.objects.get_or_create(KWuser=kw, author=author) e.project.add(id) #Add m2m to parent project </code></pre> <p>related_data cotains 1000 rows looking like this:</p> <pre><code>[{"cmp":0,"ams":3350000,"cpc":0.71,"keyword":"apple."}, {"cmp":0.01,"ams":3350000,"cpc":1.54,"keyword":"apple -10810"}......] </code></pre> <p>KW model also sends signal I use to create another parent model:</p> <pre><code>@receiver(post_save, sender=KW) def grepw(sender, **kwargs): if kwargs.get('created', False): id = kwargs['instance'].id kww = kwargs['instance'].KWuser # KeyO a, b = KeyO.objects.get_or_create(defaults={'keyword': kww}, keyword__iexact=kww) KW.objects.filter(id=id).update(KWF=a.id) </code></pre> <p>This works but as you can imagine doing thousands of rows at once takes long time and even crashes my tiny server, what bulk options do I have?</p>
0non-cybersec
Stackexchange
Your opinion on Justin Timberlake's "The 20/20 Experience". I've listened to the album a few times now and I was wondering what everyone thinks of this album. > Friday is for interesting discussions .. so this is an open discussion. If you have your opinion - and I'm sure you do have one -, I encourage you to share it. Personally, I think it is *great*. I'm the kind of person to like a lot of music genres, yes, but I like this anyway.
0non-cybersec
Reddit
script not run after reboot from /etc/rc3.d. <p>I create symbolic link to the file - /etc/rc3.d/platform.bash from /var/tmp/platform.bash </p> <pre><code> ln -s /var/tmp/platform.bash /etc/rc3.d/platform.bash </code></pre> <p>script exist under /var/tmp :</p> <pre><code> -rwxr-xr-x 1 root root 58442 Aug 30 08:49 platform.bash </code></pre> <p>view from /etc/rc3.d :</p> <pre><code> lrwxrwxrwx 1 root root 31 Aug 30 06:33 S99platform.bash -&gt; /var/tmp/platform.bash </code></pre> <p>my target is to run platform.bash after reboot ( on solaris 10 OS )</p> <p>from some reason the script platform.bash not run after reboot ? please advice what I need to check in order to verify the problem ?</p> <p>my script ( platform.bash )</p> <pre><code> #!/bin/bash echo test &gt; /var/tmp/log.txt </code></pre>
0non-cybersec
Stackexchange
MySQL creates lowercase database / table names. <p>I'm currently building an application which requires a large MySQL database. Whenever I run the script, it executes perfectly but all of my table names (and the database name) end up in full lowercase.</p> <p>I tried setting <code>lower_case_table_names = 0</code> in the <code>my.ini</code> file (and I restarted the service).</p> <p>However my script still keeps creating everything in lowercase. Column names are strangely not affected tough. </p> <p>My script:</p> <pre><code>CREATE DATABASE IF NOT EXISTS Vacation; CREATE TABLE IF NOT EXISTS Users ( userId INT AUTO_INCREMENT, userFirstname NVARCHAR(32) NOT NULL, userLastname NVARCHAR(32) NOT NULL, userPrefix VARCHAR(16), userPhone VARCHAR(15), userEmail VARCHAR(32) NOT NULL, userPassword CHAR(40) NOT NULL, userPoints INT DEFAULT 0 NOT NULL, PRIMARY KEY(userId) ); </code></pre> <p>The result:</p> <pre><code>SHOW DATABASES -- vacation SHOW TABLES FROM Vacation -- users </code></pre> <p>I'm currently using Ubuntu 14.04 (and I've tried reading <a href="https://dev.mysql.com/doc/refman/5.5/en/identifier-case-sensitivity.html" rel="nofollow">this</a> article for help).</p> <p>Is there any way of fixing this problem? Thanks in advance.</p>
0non-cybersec
Stackexchange
Excel - How do I convert negative seconds into negative minutes. <p>How do I convert negative seconds (eg. -10) into minutes in the next cell (eg -00:00:10) ?</p>
0non-cybersec
Stackexchange
How to hide website background images by default?. <p>I universally consider background images on web pages as visual clutter. The images can impair text readability and website navigation, major examples include <a href="https://steamcommunity.com/app/440/discussions/" rel="nofollow noreferrer">Steam's community pages</a> and Wikia (<a href="http://callofduty.wikia.com/wiki/Frank_Woods" rel="nofollow noreferrer">sample page</a>). Because Firefox can detect background images (right click context menu > "view background image"), is it possible to hide (or preferably block the images from loading) on all pages?</p>
0non-cybersec
Stackexchange
Jabees’ wireless earbuds are good for the gym, but can’t compete with AirPods.
0non-cybersec
Reddit
SQL Server installation prerequisite fails. <p>When I install SQL Server 2008 R2, I get this message:</p> <blockquote> <p>Previous release of Microsoft Visual Studio 2008 -- Failed</p> </blockquote> <p>(<a href="https://i.stack.imgur.com/SD0nA.jpg" rel="nofollow noreferrer">screen shot</a>)</p> <p>I can't proceed to the next step. How can I fix this?</p>
0non-cybersec
Stackexchange
'Lost in translation' 9"x12" acrylic on canvas.
0non-cybersec
Reddit
AKKA-http deployment. <p>This is the first time I'm working with akka-http. I wrote the following main class which starts the application:</p> <pre><code>object Main extends App with Routes with Config with Protocols { implicit val system: ActorSystem = ActorSystem("slickboard-system") implicit val executor: ExecutionContext = system.dispatcher implicit val materializer: ActorMaterializer = ActorMaterializer() override val employeeActor: ActorRef = system.actorOf(EmployeeActor.props, "employees") val server = Http().bindAndHandle(route, httpServerURL, httpServerPort) } </code></pre> <p>It starts a server on localhost, but when I try to deploy it on a remote tomcat server, it is not working anymore. It is responding with a HTTP 404: not found.</p> <p>I've been searching on the web for akka-http deployment, but couldn't find an answer. Someone has experience with this probleem?</p> <p>Kind regards</p>
0non-cybersec
Stackexchange
In math, is the order of operations arbitrary? Meaning is there a real reason x and / comes before + and -, or is that just the order we decided and as long as the operations are consistent and that's what really matters?.
0non-cybersec
Reddit
Best practices for securing a Windows machine?. I'll try to keep this short. I recently purchased a laptop with Windows 8 preinstalled. (I want to keep Windows as my primary OS because I have software I wish to run which I wouldn't expect to perform well in a VM) I'm looking for some practical tips to protect the machine from malware or software exploitation. When I say "practical," I mean that following a tip should not impose a significant burden on me. (e.g., "Run every application in a virtual machine" or "Don't connect to the Internet" are not practical) Here are some of my thoughts right now: - Obviously, I intend to stay up-to-date with Windows Updates and other software updates. This is a given. - Are there are any unnecessary services or features in the operating system that might be worth disabling (at little loss to me) for the sake of reducing my attack surface? - Any thoughts on sandboxing? Applications that make heavy use of the Internet are understandably high targets for exploitation; does anyone have experience with running them in a sandbox? Would you recommend Sandboxie? - I want to install some type of HIPS. I'd also like to install a highly configurable firewall. I'm open to suggestions. I have a moderate preference towards stuff that is free. - I'm thinking of using an account without admin privileges as my primary account. Thoughts on this? - I'll probably also run NoScript. - I probably won't be using disk encryption, unless there is a good reason to do so. Attacks that require physical access are less of a concern to me right now. Feel free to add any suggestions you might have. Or, if you think anything is overkill, feel free to say so.
1cybersec
Reddit
Is there a way in .bash_profile, to create two aliases that do the same thing?. <p>I have some simple aliases in my <code>.bash_profile</code> (OS X El Capitan, 10.11.6). Sometimes, I want multiple aliases that do the same thing. I have, for example, a folder that is my starting point for programming projects. Currently, I have an alias for code and one for programming that do the same thing: </p> <pre><code>alias code='cd /path/to/Programming/; clear; pwd; ls' alias programming='cd /path/to/Programming/; clear; pwd; ls' </code></pre> <p>This saves me having to remember how I aliased this directory. Is there a way to set multiple aliases without having to repeat the command? In short, is there something like this? </p> <pre><code>alias code,programming='cd /path/to/Programming/; clear; pwd; ls' </code></pre>
0non-cybersec
Stackexchange
How to maintain up-to-date snapshot tar archive efficiently?. <p>I have a large directory of files and I would like to maintain a single compressed tar archive that I can server over http containing all the files which is brought up to date once each day.</p> <p>Many of the files will not change day-to-day and I'd like to avoid hours of processor time compressing the same files every day.</p> <p>tar "cannot update compressed archives", so <code>tar uj</code> won't help.</p> <p>Is there a clever way to do this?</p>
0non-cybersec
Stackexchange
Checking HDD SMART Data from Live USB. <p>I'm trying to use a Ubuntu 18.04.2 Live USB to check SMART Data on hard drives but it asks me for the Live Session User password. I do not have persistence enabled and would prefer not to create a new account although this may not be possible. </p> <p>Does anyone know how I can authenticate to check the SMART Data or is there not a way to do this without persistence enabled on the USB and making a new admin account? I just want to boot from this Live USB and do a short check of the SMART Data quickly</p> <p>I appreciate any help I can get with this and thank you in advance.</p>
0non-cybersec
Stackexchange
ELI5: Whats happening when we get tired while exercising? In theory, shouldn't we be able to keep going as long as an energy source and oxygen are available to our cells/muscles?.
0non-cybersec
Reddit
a file to be in git or not to be?. <p>I didn't prevent same problem:</p> <p>I don't use <code>git rm projects.py</code> and when i use :</p> <p><code>git cp projects</code><kbd>TAB</kbd><kbd>TAB</kbd></p> <p><code>projectsFindFrame.py projectsInsert.py</code></p> <p>Also when i use:</p> <pre><code>git show a3ea2118bf1c5e2c6aa0974d0b6ff7415bd044ef </code></pre> <p>I prevent to content of projects.py file:</p> <pre><code>commit a3ea2118bf1c5e2c6aa0974d0b6ff7415bd044ef Author: Mohsen Pahlevanzadeh &lt;mohsen@debian&gt; Date: Wed Oct 9 04:21:14 2013 +0330 formValidators has been added, all of *_Insert component has been added to Projects() class. diff --git a/projects.py b/projects.py new file mode 100644 index 0000000..d76685b --- /dev/null +++ b/projects.py @@ -0,0 +1,303 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# + +from tables import * +from dbabslayer import * +from languagecodes import * +from PyQt4 import QtCore, QtGui + + +try: + _fromUtf8 = QtCore.QString.fromUtf8 +except AttributeError: + def _fromUtf8(s): + return s + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig, _encoding) +except AttributeError: + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig) + + + + +class Projects(QtGui.QMainWindow): </code></pre> <p><strong>My Question</strong> is : Why i can't do <code>git cp projects.py</code> ? But it's to be.</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Every time I've been asked to make something lately..
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
RedirectToAction after ajax form submit in Asp.net Core. <p>I have a view named Index and a PartialView named '_Addbook' that shown as a bootstrap modal. In the partialView insert data into database using ajax form.</p> <p><strong>Index view :</strong></p> <pre><code>&lt;div class="panel panel-primary"&gt; &lt;div class="panel-body"&gt; &lt;div class="btn-group"&gt; &lt;a class="btn btn-primary marginbutoon" id="showBookgroup" data-toggle="modal" asp-action="AddBook" data-target="#modal-book"&gt; &lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; Add Book &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p></p> <p><strong>Partialview :</strong></p> <pre><code> @model WebApplication1.Models.Book &lt;form asp-controller="Home" asp-action="AddBook" id="myform" data-ajax="true" data-ajax-method="POST" data-ajax-mode="replace" data-ajax-update="#myform"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt; &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Add Book&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body form-horizontal"&gt; &lt;div class="row"&gt; &lt;div class="form-group"&gt; &lt;label asp-for="BookName" class="col-sm-3 control-label"&gt;&lt;/label&gt; &lt;div class="col-lg-6"&gt; &lt;input asp-for="BookName" class="form-control" /&gt; &lt;span asp-validation-for="BookName" class="text-danger"&gt;&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;input type="submit" class="btn btn-primary" value="Submit" /&gt; &lt;/div&gt; </code></pre> <p></p> <p><strong>Controller :</strong></p> <pre><code> [HttpGet] public IActionResult AddBook() { var book = new Book(); return PartialView("_AddBooks", book); } [HttpPost] [ValidateAntiForgeryToken] public IActionResult AddBook(Book model) { if (ModelState.IsValid) { using (var db = _Context.GetRequiredService&lt;ApplicationDbContext&gt;()) { db.bookgroups.Add(model); db.SaveChanges(); } return RedirectToAction("Index"); } else { return PartialView("_Addbooks", model); } } </code></pre> <p>The data is stored correctly in the database and modal hide after submit but index view shows Mixed up. How can i Redirect after ajax submit?</p>
0non-cybersec
Stackexchange
Indian court bans politicians from using religion, caste to win votes.
0non-cybersec
Reddit
ASP.NET/IIS7.5 Writing Log File Not Working (Permissions, UAC, Config., ???). <p>We're having trouble migrating our ASP.NET applications to Windows Server 2008 R2 x64 and IIS7.5. The problem is that our ASP.NET apps write log files, and these log files are not being written. The only way the apps write their log files is if I'm logged into the server as the local Administrator user or if I right click and run IE as Run as Administrator, neither of which is an acceptable solution for us.</p> <p>Our platform is: Windows Server 2008 R2 x64 (UAC setting is the default setting) IIS7.5 ASP.NET 4.0 (using Windows authentication and impersonation, both on in web.config)</p> <p>Our app gets installed to: D:[appname] [appnameWebSite] (all the .aspx, .dll, etc. files are in here) \Log (the app tries to write the log file to this folder)</p> <p>On the server: Created new App Pool (name: [appname], .NET 4.0, Managed Pipeline Mode: Classic, Identity: ApplicationPoolIdentity, Load User Profile: False, all other properties are the defaults) Created IIS application pointing to D:[appname][appnameWebSite] and added it the the new App Pool (Full trust level) Have a domain user in local Administrators group</p> <p>With all the configuration and default settings listed above, the ASP.NET app will not write the log file. The app appears to work fine in the browser, but no log.txt file.</p> <p>To try to "fix" this issues, we've tried many things: Tried Application Pool setting: Managed Pipeline Mode: Integrated Tried Application Pool setting: Identity: NetworkService Tried Application Pool setting: Identity: LocalSystem Tried Application Pool setting: Load User Profile: True Gave Users group full control to file system for our application folder structure (tried appname folder, tried Log folder only, tried appnameWebSite and Log folders only) Gave IIS AppPool[appname] (matching the new App Pool) user full control to file system for our application folder structure (tried appname folder, tried Log folder only, tried appnameWebSite and Log folders only)</p> <p>None of these things helped. Again, the app would run fine, just no log file created.</p> <p>As mentioned above, the only way that the log file is created when the app runs is if we log into the server using the local Administrator account (which makes sense since he's a super user) or if we run IE as administrator and elevate privileges.</p> <p>Any suggestions? Help? Questions?</p> <p>Thanks!</p>
0non-cybersec
Stackexchange
Pavlof volcano in the Aleutian arc erupts - captured by astronauts on the International Space Station on May 18, 2013.
0non-cybersec
Reddit
Javascript : How to create global functions &amp; variables. <p>I would like to create a new function that I can use on elements, like this:</p> <pre><code>document.getElementById("element").myNewFunction(); </code></pre> <p>I'm not talking about this:</p> <pre><code>document.getElementById("element").myNewFunction = function(){ doSomething... } </code></pre> <p>Because this works on that element only, but how should I create global function what I can use on all elements like the ones what are built in to JavaScript?</p>
0non-cybersec
Stackexchange
Snowboard Backflip [PIC].
0non-cybersec
Reddit
Mission accomplished! Next step unclear..
0non-cybersec
Reddit
If two vertices point to one another in a directed graph, is the graph then considered cyclic?. <p>Suppose you have a directed graph. Vertices <em>a</em> and <em>b</em> are part of the graph. There is an arrow pointing from <em>a</em> to <em>b</em> and an arrow pointing from <em>b</em> to <em>a</em>. Does this make the directed graph cyclic?</p>
0non-cybersec
Stackexchange
Linux ethernet bridge can be accessed behind a router. <p>I run Debian 8 and need to bridge a tap interface <code>tap0</code> to <code>eth0</code> (trying to setup an OpenVPN server). I use the standard bridging script from OpenVPN help page:</p> <pre><code>#!/bin/sh # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged, # for example tap="tap0 tap1 tap2". tap="tap0" # Define physical ethernet interface to be bridged # with TAP interface(s) above. eth="eth0" eth_ip="192.168.0.140" eth_netmask="255.255.255.0" eth_broadcast="192.168.0.255" for t in $tap; do openvpn --mktun --dev $t done brctl addbr $br brctl addif $br $eth for t in $tap; do brctl addif $br $t done for t in $tap; do ifconfig $t 0.0.0.0 promisc up done ifconfig $eth 0.0.0.0 promisc up ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast </code></pre> <p>where 192.168.0.140 is the IP address reserved to this server by the router's DHCP. The router (192.168.0.1) is used to access the Internet.</p> <p>When I run the script everything seems fine from inside the LAN. However, all the ports that were forwarded in the router to 192.168.0.140 suddenly stop answering.</p> <p>I've noticed that router's DHCP uses MAC address to identify server, and that <code>br0</code> has a different MAC than <code>eth0</code>. So I added</p> <pre><code>ifconfig $br hw ether d0:50:99:3b:4e:ff </code></pre> <p>at the end of the bridging script to make the <code>br0</code> have the same MAC as <code>eth0</code>. And it actually does assign the 'correct' MAC to <code>br0</code>, but, unfortunately, doesn't solve the problem.</p> <p>The problem seems to be in the router itself, because the server still can be accessed from LAN.</p>
0non-cybersec
Stackexchange