text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to 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 |
Calculating number of days from two dates in XML with XSLT. <p>I've been going on for about 5 hours now, trying exactly EVERY example found on Google found with the serach term "xml xslt calculate number of days between dates" that I could find to just take two dates from "date.xml" file and calculating the days between the dates, in format "YYYY-MM-DD" <strong><em>(example below doesn't have this format, but it's the only format I need)</em></strong></p>
<p>I finally found this page:: <a href="https://forums.oracle.com/thread/2432132" rel="noreferrer">https://forums.oracle.com/thread/2432132</a></p>
<p>Where the solution can be verified at: <a href="http://xslttest.appspot.com/" rel="noreferrer">http://xslttest.appspot.com/</a></p>
<p>But, saving the "date.xml/date.xslt" on localhost trying to open the page in Internet Explorer, Google Chrome or Firefox either shows error or nothing at all and as it's always seem to have been - no information what is wrong. The same happens when the file is on a webserver.</p>
<p>So, why can't I try out a simple example that I've found that everyone says has the solution or what am I doing wrong?</p>
<p>XML File from the above example:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="date.xslt"?>
<root>
<date1>2012-01-11T00:00:00.000-05:00</date1>
<date2>2012-01-15T00:00:00.000-05:00</date2>
</root>
</code></pre>
<p>XSLT File from the above example:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions">
<xsl:template match="/">
<xsl:variable name="date1" select="xs:dateTime(/root/date1)"/>
<xsl:variable name="date2" select="xs:dateTime(/root/date2)"/>
<xsl:value-of select="fn:days-from-duration($date2 - $date1)"/>
</xsl:template>
</xsl:stylesheet>
</code></pre>
<p>Adding this to the XSLT verifier, it shows the right value "4" days between these two dates.</p>
<p>I want to be able to just create a document that actually can do calculations, whether they are dates or numbers but it's seems impossible at this moment. Get number of dates, then do some calculation with that value.</p>
| 0non-cybersec
| Stackexchange |
Romney iPhone app misspells 'America' to Web's delight - CNN.com. | 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 |
Logitech presenter R800 set-up problem on Ubuntu 18.04 LTS (64-bit). <ul>
<li>I am on <strong>Ubuntu 18.04 LTS (64-bit)</strong> on my Asus notebook and I am trying to setup the <strong>USB presenter by Logitech R800</strong>.</li>
</ul>
<p>I searched on plenty of Linux forums (also on Logitech community forum, specifically) and could not find any solution for my problem, which is the failure to recognize the USB receiver that comes with the Logitech R800 presenter. This causes the presenter device not to work at all.</p>
<p>As I do not have experience with Ubuntu - or any other Linux distribution, really - I look for detailed and step-by-step information, please.</p>
<p><em>Aiming at elaborating better what is happening, please, guide me with the right questions and suggestions, if needed.</em></p>
<p>This is the best I can express this problem.</p>
<p>I hope to get a response. </p>
<p>Thank you! </p>
<p>Related:<a href="https://askubuntu.com/q/113984/66509">Is Logitech's Unifying receiver supported?</a></p>
| 0non-cybersec
| Stackexchange |
Text (preferably centered with the first line in bold) to the side of included graphics in LaTeX. <p>I have a document with a main heading followed by a picture with some contact information to the right of it. After that the other subheadings continue.</p>
<p><img src="https://i.stack.imgur.com/80qXm.jpg" alt=""></p>
<p>I want to do the same in LaTeX. Which I am actually quite familiar with. Which method would you recommend to get the same layout using LaTeX? I really want to use this layout.</p>
| 0non-cybersec
| Stackexchange |
Number of zeros of $p(z)=z^5+10z-3$ on annulus $A(0,1,2)$. <blockquote>
<p>How many zeros does the function <span class="math-container">$p(z)=z^5+10z-3$</span> have on the annulus <span class="math-container">$A(0,1,2)$</span>?</p>
</blockquote>
<p>For <span class="math-container">$z\in C(0,2)$</span>, we have <span class="math-container">$|f(z)|=|z^5|=32$</span> and <span class="math-container">$|g(z)|=|10z-3|\leqslant 10\cdot 2+3=23$</span>, thus <span class="math-container">$|f|<|g|$</span> on <span class="math-container">$C(0,2)$</span>, which implies by Rouché's Theorem that <span class="math-container">$p=f+g$</span> has as much zeros as <span class="math-container">$f$</span> in <span class="math-container">$B(0,2)$</span>, which is <span class="math-container">$5$</span>.</p>
<p>We can do the same trick on <span class="math-container">$C(0,1)$</span> using <span class="math-container">$f(z)=10z$</span> and <span class="math-container">$g(z)=z^5-3$</span>, to show that <span class="math-container">$p$</span> has <span class="math-container">$1$</span> zero in <span class="math-container">$B(0,1)$</span>. (Since <span class="math-container">$p(0)p(1/2)<0$</span>, this is a real zero)</p>
<p>Now I want to conclude that in the annulus <span class="math-container">$A(0,1,2)$</span> there are <span class="math-container">$5-1=4$</span> zeros. However, how can I be sure that there is no zero on the circle <span class="math-container">$C(0,1)$</span>? </p>
| 0non-cybersec
| Stackexchange |
Fight at my School in Scotland. Great Country, come visit. | 0non-cybersec
| Reddit |
Jon and Tracey Stewart Roll Out the ‘Green’ Carpet to Welcome Rescued Goats and Sheep to Their Farm. | 0non-cybersec
| Reddit |
Dream wheezing while his friends are in trouble. | 0non-cybersec
| Reddit |
US border agents ask Muhammad Ali's son: 'Are you a Muslim?'. | 0non-cybersec
| Reddit |
Fuck Everything About This. | 0non-cybersec
| Reddit |
PsBattle: Coach demonstrating all your happiness after winning a championship. | 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 |
Woah.... I bought a microscope today from a second hand shop, I cleaned it and wiped it down. After checking a few things here and there stuff like saliva, rocks, hairs and such, I looked at my own semen, and watched the little guys jamming around it is like they have all this nervous energy (they are quick but lack direction)...life is amazing.
Sorry if I grossed you out, but it was a real trip. | 0non-cybersec
| Reddit |
How to simplify $A(\overline BC+B)$. <p>How do I go from $A(\overline BC+B)$ to $A(B+C)$? What definition should I use to get the final answer?</p>
<p>Would like an explanation and proof so I can learn rather than just memorise.</p>
| 0non-cybersec
| Stackexchange |
CP: max source files number arguments for copy utility. <p>Consider that there are countless number of files under /src/</p>
<pre><code>cp /src/* /dst/
</code></pre>
<p>How many files <code>cp</code> will successfully process?</p>
| 0non-cybersec
| Stackexchange |
run command where specific user login. <p>I have made a script that I want to run only where the user kyle logs in. I don't want it to be run on all users like a start-up app. I only want it to run when the user kyle logs in</p>
| 0non-cybersec
| Stackexchange |
Does anyone else have no problem finding a date, but struggle with finding friends?. This sounds really odd because usually it's the other way around for people (having friends but being single). I usually find it difficult to connect with people and maintain a long-lasting friendship. But it's really easy for me to just get a guy. I have had several boyfriends and a bunch of flings. Sometimes I enjoy it, but I would prefer having friends to boyfriends since I don't want to cling to just one person. Don't know if there's anything problematic with me.
I don't get it, if I'm likable enough to get guys, why isn't it the same with making friends?
| 0non-cybersec
| Reddit |
I don't want to live and there is nothing i can do about it.. I guess i'll just jump right into it. I am a 25 year old trans-man, almost 26. I have no motivation to live, that's it, i don't want a hand in life. When i was eighteen i told myself if i didn't find some reason, motivation, goal, literally anything, any reason to live by the time i turned 25 i would kill myself. I started dating a boy when i was 24, a few months before i turned 25. I told myself i'll give this a shot, my 25th birthday came and went and a few months later we broke up when i came out as trans. I figured that was fine, i'll just push the date back to my twenty sixth birthday, same deal.
In December my little brother killed himself, and i saw first hand the impact and hurt that inflicted on not only my family but his friends too and now i don't think i can do the same, not after my stepdad held me, sobbing into my shoulder and making promise to never make him go through that again.
But i just have no will to live, i don't care about my life, its stupid and selfish and i wish i cared more but i don't.
I am almost 26 and i don't even have my highschool diploma
I don't have my drivers licence
I don't have a job nor have i ever held one for more than a week.
Anti-depressants and therapy didn't do anything for even when i was desperately trying, to make it work.
The only reason i'm able to live comfortably is because one of my ex boyfriends parents took pity on me after he knocked me up and my mom disowned me. They let me stay with them and i do nothing for them in return and i feel like shit but i can't motivate myself to do anything about it.
I want to die, but i can't.
I'm not interested in anything.
I don't know what to do. | 0non-cybersec
| Reddit |
How can I use [Author Year] like new ACM Style?. <p>I'm use the TeX ACM Style in my thesis:</p>
<pre><code>\bibliographystyle{acm}
\bibliography{Anderson_EQM}
</code></pre>
<p>And cite references using <code>\cite{}</code>, but it's different of the new ACM style:</p>
<p><strong>[Number]</strong> instead <strong>[Author Year]</strong></p>
<p>How can I use [Author Year] like ACM Style?</p>
<p>Thanks</p>
<hr>
<p>Obs.: In ACM examples, the cite and reference styles are:</p>
<blockquote>
<p>TYPICAL REFERENCES IN NEW ACM REFERENCE FORMAT</p>
<p>A paginated journal article [Abril and Plant 2007], an enumerated
journal article [Cohen et al. 2007], a reference to an entire issue
[Cohen 1996], a monograph (whole book) [Kosiur 2001], a
monograph/whole book in a series (see 2a in spec. document) [Harel
1979], a divisible-book such as an anthology or...</p>
</blockquote>
<p>REFERENCES</p>
<blockquote>
<p>Rafal Ablamowicz and Bertfried Fauser. 2007. CLIFFORD: a Maple 11 Package for Clifford Algebra Computations, version 11. (2007). Retrieved February 28, 2008 from <a href="http://math.tntech.edu/rafal/cliff11/index.html" rel="nofollow">http://math.tntech.edu/rafal/cliff11/index.html</a></p>
<p>Patricia S. Abril and Robert Plant. 2007. The patent holder’s dilemma: Buy, sell, or troll? Commun. ACM 50, 1 (Jan. 2007), 36–44. DOI:<a href="http://dx.doi.org/10.1145/1188913.1188915" rel="nofollow">http://dx.doi.org/10.1145/1188913.1188915</a></p>
</blockquote>
| 0non-cybersec
| Stackexchange |
The story behind one of the most famous pictures in astronomy.. | 0non-cybersec
| Reddit |
Radeon DVI errors filling logs. <p>These error just fill my logs: </p>
<pre><code>[316094.848311] [drm:radeon_dvi_detect] *ERROR* DVI-I-1: probed a monitor but no|invalid EDID
[316104.895726] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 128
[316104.898492] Raw EDID:
[316104.901300] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.904245] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.907191] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.910137] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.912948] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.915620] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.918152] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.920589] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.951274] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 128
[316104.953906] Raw EDID:
[316104.956597] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.959421] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.962250] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.965081] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.967907] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.970590] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.973136] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316104.975625] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.006315] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 128
[316105.008953] Raw EDID:
[316105.011641] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.014475] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.017310] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.020144] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.022982] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.025683] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.028234] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.030689] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.061394] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 128
[316105.064038] Raw EDID:
[316105.066736] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.069589] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.072429] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.075263] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.078103] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.080804] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.083339] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.085794] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[316105.088272] radeon 0000:0c:01.0: DVI-I-1: EDID block 0 invalid.
[316105.088275] [drm:radeon_dvi_detect] *ERROR* DVI-I-1: probed a monitor but no|invalid EDID
</code></pre>
<p>Is there aything I can do to suppress them or tell the driver to probing the monitor or disable DVI port?</p>
<p>I'm running Debian 7 with only a cli as a LAMP server. THere is no GDM nor GUI nor anything like that.</p>
| 0non-cybersec
| Stackexchange |
invalid conversion from ‘const type*’ to ‘type*’. <p>I want to store through the constructor of a class a pointer to an object of another class. What is the correct way to do that?</p>
<p>If I substitute <code>MyClass1* ptr</code> with <code>const MyClass1* ptr</code> there is no error, but in this case I think that i cannot change <code>ptr</code> anymore. What is the correct way to achieve what i want?</p>
<p>example.cpp</p>
<pre><code>class MyClass1{
public:
int a;
int b;
};
class MyClass2{
MyClass1* ptr;
public:
MyClass2(const MyClass1& obj){ptr = &obj;};
};
int main(int argc, char* argv[]){
MyClass1 object1;
object1.a = object1.b = 0;
MyClass2 object2(object1);
return 0;
}
</code></pre>
<p>Compile it through <code>g++ -o example example.cpp</code> give me this error</p>
<blockquote>
<p>example.cpp: In constructor ‘MyClass2::MyClass2(const MyClass1&)’:</p>
<p>example.cpp:10:37: error: invalid conversion from ‘const MyClass1*’ to ‘MyClass1*’ [-fpermissive]</p>
<p>MyClass2(const MyClass1& obj){ptr = &obj;};</p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Do SAS coding "best practices" exist?. <p>At work, we develop a lot of our applications in SAS, from start to finish. One of the problems with this approach is that SAS is a very verbose language with very few language constructs; there is limited support for variables, very limited support for basic functions, and no such thing as classes. They have a concept called "macros" which essentially text substitution; you define a macro, and on invocation, it simply drops in the content of the macro.</p>
<p>My question is, is anyone familiar with "best coding practices" for use in developing SAS applications? Are there software design patterns for SAS? I've gone through Code Complete, and some of what he writes is applicable to SAS, but much of it is not, as the concepts don't exist in SAS. Can anyone give recommendations for writing maintainable, well-designed SAS code?</p>
| 0non-cybersec
| Stackexchange |
Chinese Dumplings - Hundun - DELICIOUS!!!. | 0non-cybersec
| Reddit |
Are the 2012 Panthers victims of bad luck or bad coaching?. | 0non-cybersec
| Reddit |
The Anakin Moxie in Darth Vader. So I’ve been on a Star Wars kick since TROS and Clone Wars. I recently rewatched the original trilogy and I just want to shout out all of Darth Vader’s one liners that make me think of Anakin and are awesome.
There’s that classic line from Anakin in Revenge of the Sith where in the beginning he says “this is where the fun begins” which is cocky and funny Anakin. But rewatching the original we get awesome cocky lines from Vader like
“All too easy” - Vader thinking he trapped Luke
“Apology Accepted” - Killing one of the admirals
“I find your lack of faith disturbing” - literally choking a commander who called the force an ancient religion
“Perhaps I can find new ways to motivate them” - Vader getting the new Death Star back on schedule
And then my favorite
“Don’t choke on your aspirations commander”
Just these lines are so Anakin I love hearing them even after his transformation. It adds so much to the Anakin/Darth Vader arc for me | 0non-cybersec
| Reddit |
Proof about sequence of non-negative real numbers. <p><img src="https://i.stack.imgur.com/pMyRm.png" alt="enter image description here"></p>
<p>How do I do this one? I don't know how to start.</p>
| 0non-cybersec
| Stackexchange |
Get size of volume on Windows. <p>I'm writing a library to extract information about physical disks, partitions, and volumes on a Windows system (XP or later).</p>
<p>I'm trying to get the capacity of a volume. Here are the approaches I know about and the reason each fails:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364937.aspx" rel="nofollow"><code>GetDiskFreeSpaceEx</code></a> -- Affected by user quota.</li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365171.aspx" rel="nofollow"><code>IOCTL_DISK_GET_DRIVE_GEOMETRY_EX</code></a> -- Gets size of entire physical disk, even when invoked using a volume handle.</li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365194.aspx" rel="nofollow"><code>IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS</code></a> -- Doesn't account for RAID overhead.</li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365178.aspx" rel="nofollow"><code>IOCTL_DISK_GET_LENGTH_INFO</code></a> -- Fails with access denied. (Actually, it requires <code>GENERIC_READ</code> access, unlike all other queries, and <code>GENERIC_READ</code> requires administrator access.)</li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa363469.aspx" rel="nofollow"><code>IOCTL_STORAGE_READ_CAPACITY</code></a> -- Not available on XP, also shares the drawbacks of <code>IOCTL_DISK_GET_LENGTH_INFO</code> and <code>IOCTL_DISK_GET_DRIVE_GEOMETRY_EX</code></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364573%28v=vs.85%29.aspx" rel="nofollow"><code>FSCTL_GET_VOLUME_BITMAP</code></a> + <code>GetFreeDiskSpace</code> for cluster size -- Requires <code>GENERIC_READ</code> (admin access) and gives the size of the data area of the filesystem, not the entire volume.</li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa365179%28v=vs.85%29.aspx" rel="nofollow"><code>IOCTL_DISK_GET_PARTITION_INFO</code></a> -- Requires <code>GENERIC_READ</code> (admin access) and also failed on a USB-attached disk (possibly using superfloppy partitioning)</li>
</ul>
<p>Oddly, the number of clusters from <code>FSCTL_GET_VOLUME_BITMAP</code> and WMI's <code>CIM_LogicalDisk.Size</code> property agree, and both are 4096 bytes smaller than the value from <code>IOCTL_DISK_GET_LENGTH_INFO</code>.</p>
<p>What is the correct way to get volume capacity? Since all the other queries work without administrator access, I'm looking for a least-privilege solution for this too.</p>
| 0non-cybersec
| Stackexchange |
Hit and run. | 0non-cybersec
| Reddit |
arXiv:hep-lat/9209015v1 9 Sep 1992
ar
X
iv
:h
ep
-l
at
/9
20
90
15
v1
9
S
ep
1
99
2
September 1992 HLRZ-92-61
Chern-Simons term and
Topological Charge on the Lattice
M. L. Laursen1
1 HLRZ, c/o KFA Jülich, P.O. Box 1913, D-5170 Jülich, Germany
Abstract
In a somewhat overlooked work by Seiberg, a definition of the topological charge
for SU(N) lattice fields was given. Here, it is shown that Seibergs and Lüschers
charge definition are related up to the section of the bundle. With the continued
interest in baryon number violating processes, Seibergs paper is useful since it allows
for a Chern-Simons number also.
1
http://arxiv.org/abs/hep-lat/9209015v1
1 Introduction
Over the past few years there has been quite an activity in the area of baryon
number violating processes. Early on ’t Hooft found that both baryon number
and lepton number are not conserved in the electroweak theory [1]. While the
B − L symmetry remains unbroken due to the anomaly cancellation, B + L is no
longer conserved. This socalled baryon number violation is caused by the nontrivial
topological winding of the SU(2) gauge fields. The anomaly of the fermionic current
relates the winding of the gauge fields and changes the baryon number by an amount
B(t2)−B(t1) =
Nf
16π2
∫ t2
t1
∫
d3xtr[Fµν F̃µν ] (1.1)
where Nf is the number of families of quarks and leptons. In the axial gauge A0 = 0
one can relate the change in the baryon number to the change in the Chern-Simons
number
B(t2)− B(t1) = Nf [NCS(t2)−NCS(t1)] (1.2)
where the Chern-Simons number NCS is
NCS = −
1
8π2
∫
d3xǫijktr[Ai(∂jAk +
2
3
AjAk)]. (1.3)
At zero temperature such processes are exponentially suppressed as exp(−2π/αW ),
α ≈ 1/30. This is because any gauge field configuration which changes the winding
number has an action at least that of the barrier height 2π/αW . At high temper-
atures thermal fluctuations allow the system to tunnel classically, since the only
suppression factor is the Boltzmann factor exp(−βE/T ) where E is the barrier
height and T the temperature. As a consequence any baryon asymmetry generated
at the GUT scale will get washed out as the universe approaches the electroweak
phase transition from above [2].
Several lattice studies of baryon number violating processes exist in the four
dimensional SU(2) Higgs model [3]. The configurations are prepared at high tem-
perature and the system is allowed to change via the classical Hamiltonian equation
of motion. Since the axial gauge is used, the Gauss constraint must be implemented
in addition. It is then possible to monitor ∆NCS during the time evolution as a
function of the temperature. In practice a naive lattice definition of FF̃ is used to
measure Q. Only if the fields are very smooth is this method meaningful. Notice,
2
measuring Q does not say anything about the value of NCS(t). All these calculations
are done in the real time formalism, and it is worth while to study the behavior of
NCS in Euclidean time. Using a naive lattice transcription of this makes no sense,
since NCS must change by an integer under large gauge transfomations.
There are now several (all geometric) definitions for NCS in the Euclidean version
ref. [4], [5]. For an actual calculation, the work of Seiberg seems to be the most
appropiate [6]. In the work of Göckeler et al a continuum field is constructed directly
from the lattice field. It is the purpose of this note to explain Seibergs lattice Chern-
Simons term and topological charge. In particular I will show that Seibergs charge
is related to Lüschers charge up to a section of the Lüscher bundle.
2 Topological charge and the Chern-Simons term
in the continuum
I will first define the topological charge and I start with the SU(2) gauge field Aµ
and the gauge field tensor Fµν :
Fµν = ∂µAν − ∂νAµ + [Aµ, Aν ]. (2.1)
Under a a local gauge transformation g the gauge field changes as:
δAµ = g
−1[Aµ + ∂µ]g(x), (2.2)
while the gauge field tensor transforms gauge covariantly
Fµν → g
−1Fµνg. (2.3)
The topological charge Q is gauge invariant and an integer,
Q = −
1
32π
∫
M
d4xǫµνρσtr[FµνFρσ] ∈ Z. (2.4)
The manifold is denoted M and I shall assume that its boundary ∂M is a three
sphere S3. The topological charge density q can be written as a perfect derivative
q = −
1
32π
ǫµνρσtr[FµνFρσ] = ∂µKµ (2.5)
3
where the Chern-Simons density Kµ is
Kµ = −
1
8π2
ǫµνρσtr[Aν(∂ρAσ +
2
3
AρAσ)]. (2.6)
It is gauge variant and changes under the gauge transformation g by an amount
δKµ = −
1
24π2
ǫµνρσtr[g
−1∂νg g
−1∂ρg g
−1∂σg]
−
1
8π2
ǫµνρσ∂νtr[∂ρg g
−1Aσ]. (2.7)
I define the Chern-Simons number NCS in the axial gauge as follows:
NCS =
∫
∂M=S3
d3xK0 6∈ Z. (2.8)
While NCS is only an integer for pure gauge configurations, the gauge variation is
always an integer (the boundary term vanishes)
δNCS = −
1
24π2
∫
∂M=S3
d3xǫ0νρσtr[g
−1∂νg g
−1∂ρg g
−1∂σg] ∈ Z. (2.9)
This becomes clear from homotopy theory using the mapping g : S3 → SU(2) = S3.
Such mappings are characterized with the homotopy class Π3(S
3) ∈ Z.
3 Topological charge and the Chern-Simons term
on the lattice
I will now consider the lattice version of the topological charge Q and the Chern-
Simons number NCS. I shall first follow Lüschers geometric method to define Q.
Problems with dislocations will be ignored here. Let the manifold be a four torus
M = T 4 and assume it is covered with cells (hypercubes) c(n). Consider the gauge
potential Anν defined on c(n) and likewise let A
n−µ̂
ν be defined on c(n − µ̂). At the
faces (cubes) f(n, µ) = c(n− µ̂)∩c(n), one relates the two potentials by a transition
function vn,µ
An−µ̂ν = v
−1
n,µ[A
n
ν + ∂ν ]vn,µ. (3.1)
Lüscher now fixes to a local complete axial gauge in each c(n). For any corner x of
c(n) one defines a parallel transporter wn(x) from n to x. This leads to vn,µ(x) =
wn−µ̂(x)w
−1
n (x). It is then possible to interpolate it to the whole cube, thus defining
4
a bundle. One finds vn,µ(x) = s
n−µ̂
n,µ (x)
−1 vn,µ(n) s
n
n,µ(x). Here, the function s is
defined on f(n, µ). Let p be the restriction of s to ∂f(n, µ). The actual expressions
are given in ref. [4]. The topological charge is:
QL =
∑
n
qL(n) =
1
2π
∑
n,µ
(−1)µ(kn,µ − kn+µ,µ), (3.2)
where
(−1)µkn,µ =
1
12π
ǫµνρσ
∫
f
d3xtr[s∂νs
−1 s∂ρs
−1 s∂σs
−1]
+
1
4π
ǫµνρσ
∫
∂f
d2xtr[p−1∂ρp s
−1∂σs]. (3.3)
At this point one should note that qL(n) is gauge invariant and unrestricted. In
Seibergs version no local gauge fixing is performed, but otherwise the same interpo-
lation is performed. Replace (s, p, kn,µ) → (S, P,Kn,µ). The difference is that S and
P only depend on the original gauge fields in the cube. Then
NCS =
1
2π
∑
ns
Kns,µ (3.4)
is nothing but a Chern-Simons term (the summation is over the spatial lattice only).
Like in the continuum it is only an integer for pure gauge field configurations, but
under gauge transformations it changes by an integer. The corresponding topological
charge is defined as
QS =
∑
n
q̃S(n), −1/2 ≤ q̃S(n) < 1/2. (3.5)
By restricting the charge to this interval one has a gauge invariant charge defini-
tion. After some algebra the Chern-Simons term is found to have the correct naive
continuum limit, that is after writing Un,µ = exp(aAn,µ) and letting a → 0:
(−1)µKn,µ =
a3
4π
ǫµνρσ[An,ν(∂ρAn,σ +
2
3
An,ρAn,σ)]. (3.6)
As an interesting corollary I find that the two charge definitions are related. I
first introduce the section of the Lüscher bundle, w(x), x ∈ ∂c(n), which relates s
and S: s(x) = w(0)S(x)w−1(x) [7]. The following identity is useful
ǫµνρσtr[(sw)∂ν(sw)
−1 (sw)∂ρ(sw)
−1 (sw)∂σ(sw)
−1]
= ǫµνρσtr[s∂νs
−1 s∂ρs
−1 s∂σs
−1]
− ǫµνρσtr[w
−1∂νww
−1∂ρww
−1∂σw]
+ 3ǫµνρσtr[w∂ρw
−1 s−1∂σs]. (3.7)
5
This gives
(−1)µKn,µ = (−1)
µkn,µ −
1
12π
ǫµνρσ
∫
f
d3xtr[w−1∂νww
−1∂ρww
−1∂σw]
+
1
4π
ǫµνρσ
∫
∂f
d2xtr[P−1∂ρP w
−1∂σw]. (3.8)
Using the identity
∑
µ,ν,ρ,σ
ǫµνρσ
∫
p(n,µν)
d2xtr[P−1∂ρP w
−1∂σw] = 0, (3.9)
and others I arrive at
qS(n) = qL(n)− qw(n)
= qL(n)−
1
24π2
ǫµνρσ
∫
∂c(n)
d3xtr[w−1∂νww
−1∂ρww
−1∂σw], (3.10)
where qw(n) is the topological charge (integer) of the section. Since qw(n) is not
gauge invariant, the same is true for qS(n). It can change by an integer under a gauge
transformation. This is why one must use q̃S(n) instead of qS(n). Notice also that
QS =
∑
n q
S(n) = 0 since QL =
∑
n q
L(n) =
∑
n q
w(n). Therefore q̃S(n) = qL(n) up
to integers. For smooth fields like instantons they always agree, while for realistic
configurations this is true for almost every hypercube. It can happen in a few
hypercubes that |qL(n)| > 1/2 and this often make the charges different. Since
Seiberg interpolates the original gauge fields, he has a much rougher function to
integrate. Therefore it is necessary to perform a global Landau or axial gauge
fixing, to make the integrals converge. For the topological charge this is fine since
it is gauge invariant. The same is true for the restricted Chern-Simons term ÑCS.
As a check I have taken an instanton configuration. For the evaluation of the
integrals see ref. [6]. The size of the lattice is 83 × 12 and the core size is ρ = 2. For
both charge definitions I find Q = −1. In Fig. 1 I have plotted the Chern-Simons
number as a function of the time slice. The complete axial gauge was chosen to
resemble a tunneling event. Notice that NCS = 0 in the first time slice and NCS = 1
in the next to last time slice. Of course, at the last time slice the Chern-Simons
number must return to it’s initial value due to periodicity.
Acknowledgement
I appreciate valuable discussions with F. Karsch and B. Plache.
6
References
[1] G. ’t Hooft, Phys. Rev. Lett. 37 (1976) 8; Phys. Rev. D14 (1976) 3432.
[2] V. A. Kuzmin, V. A. Rubakov and M. E. Shaposhnikov, Phys. Lett. B155
(1985) 36.
[3] J. Ambjørn, M. L. Laursen and M. E. Shaposhnikov, Phys. Lett. B179 (1987)
757; Nucl. Phys. B353 (1989) 483; J. Ambjørn, T. Askgaard, H. Porter and
M. E. Shaposhnikov, Phys. Lett. B244 (1990) 479; J. Ambjørn, K. Farakos,
NBI-HE-92-52 preprint.
[4] M. Lüscher, Commun. Math. Phys.85 (1982) 39;
N. Seiberg, Phys. Lett. B148 (1984) 456.
[5] M. Göckeler, A. S. Kronfeld, G. Schierholz and , U. -J. Wiese, HLRZ preprint
HLRZ-92-34 (1992);
A. Phillips and D. Stone, Nucl. Phys. B (Proc.Suppl.) 20 (1991) 28;
P. Woit, Stony Brook preprint ITP-SB-87-56 (1987).
[6] F. Karsch, M. L. Laursen, B. Plache, T. Neuhaus and U. -J. Wiese, HLRZ
preprint HLRZ-92-55 (1992).
[7] M. Göckeler, A. S. Kronfeld, M. L. Laursen, G. Schierholz and U. -J. Wiese,
Nucl. Phys. B292 (1987) 349.
7
Figure captions
Figure 1. Profile of NCS through an instanton configuration. The lattice is 8
3 × 12
and the core size ρ = 2.
8
| 0non-cybersec
| arXiv |
Rewarded Video Ad in Admob - Mediation not Working. <p>From my Admob, I have setup the mediation for Flurry and Vungle. When I request an Ad I am always getting the error as provided in the Logcat.</p>
<pre><code>Could not instantiate mediation adapter: com.google.ads.mediation.flurry.FlurryAdapter.
MediationAdapter is not a MediationRewardedVideoAdAdapter: com.vungle.mediation.VungleInterstitialAdapter
</code></pre>
<p><a href="https://developers.google.com/android/reference/com/google/android/gms/ads/reward/RewardedVideoAd" rel="noreferrer">Code Reference</a></p>
<h2>Gradle</h2>
<pre><code>dependencies {
compile files('libs/FlurryAnalytics-6.2.0.jar')
compile files('libs/FlurryAds-6.2.0.jar')
compile files('libs/flurryAndroidDFPandAdMobMediationAdapter-5.0.0.r1.jar')
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.4.jar')
compile files('libs/VungleAdapter.jar')
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.android.gms:play-services-ads:8.3.+'
compile 'com.google.android.gms:play-services-analytics:8.3.+'
compile 'com.google.android.gms:play-services-appindexing:8.3.+'
compile 'com.google.android.gms:play-services-appinvite:8.3.+'
compile 'com.google.android.gms:play-services-games:8.3.+'
compile 'com.google.android.gms:play-services-identity:8.3.+'
compile 'com.google.android.gms:play-services-plus:8.3.+'
compile project(':BaseGameUtils')
compile project(':facebook-android-sdk-4.8.1')
compile files('libs/AudienceNetwork.jar')
compile files('libs/FacebookAdapter.jar')
}
</code></pre>
<h2>Admob Setup</h2>
<p>I have setup the adunit in Admob with the Adtype as Interstitial like shown below<a href="https://i.stack.imgur.com/28naF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/28naF.png" alt="enter image description here"></a></p>
<h2>Code</h2>
<pre><code>@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
@Override
protected void onPause() {
super.onPause();
if(rewardedVideoAd!= null)
rewardedVideoAd.pause();
socialShareType=null;
}
@Override
protected void onResume() {
super.onResume();
if(rewardedVideoAd!=null)
rewardedVideoAd.resume();
// Refresh the state of the +1 button each time we receive focus.
if(canShowGPlus1() && plusOneButton!=null) {
plusOneButton.initialize("https://developers.google.com/+", PLUS_ONE_REQUEST_CODE);
// plusOneButton.initialize("https://play.google.com/store/apps/details?id=com.game.puzzle.game.ballmania.android", PLUS_ONE_REQUEST_CODE);
}
}
@Override
public void onDestroy() {
if(rewardedVideoAd!=null)
rewardedVideoAd.destroy();
super.onDestroy();
accessTokenTracker.stopTracking();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
rateMe();
getActualScreenSize();
// Initialize the SDK before executing any other operations,
// especially, if you're using Facebook UI elements.
FacebookSdk.sdkInitialize(getApplicationContext());
callbackManager = CallbackManager.Factory.create();
shareDialog = new ShareDialog(this);
LoginManager.getInstance().registerCallback(callbackManager,
new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
// App code
System.out.println("FacebookCallback : Success");
//fbShareNow();
}
@Override
public void onCancel() {
// App code
System.out.println("FacebookCallback : Cancel");
}
@Override
public void onError(FacebookException exception) {
// App code
System.out.println("FacebookCallback : Erroe");
}
});
accessTokenTracker = new AccessTokenTracker() {
@Override
protected void onCurrentAccessTokenChanged(AccessToken oldAccessToken, AccessToken newAccessToken) {
currentAccessToken=newAccessToken;
}
};
currentAccessToken = AccessToken.getCurrentAccessToken();
c=AndroidLauncher.this;
bld = new AlertDialog.Builder(this);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
//initialize(new MainGame(this), config);
// Create the layout
layout = new RelativeLayout(this);
// Do the stuff that initialize() would do for you
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
AdView admobView = createAdView();
layout.addView(admobView);
View gameView = initializeForView(new MainGame(this), config);
layout.addView(gameView);
showGPlus1(150, 150, 150, 150);
setContentView(layout);
if (isAppInstalledFromGooglePlay()) {
iabSetup();
}else{
Arrays.fill(gemPurchased, Boolean.FALSE);
}
initializeGameServices();
alarmSetup();
setInterestial();
setRewardedVideo();
//getHash();
}
private void setRewardedVideo() {
rewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this);
rewardedVideoAd.setUserId("userId");
AdRequest adRequest = new AdRequest.Builder().build();
rewardedVideoAd.loadAd(AD_UNIT_ID_REWARDED_VIDEO_AD, adRequest);
rewardedVideoAd.setRewardedVideoAdListener(new RewardedVideoAdListener() {
@Override
public void onRewardedVideoAdLoaded() {
System.out.println("onRewardedVideoAdLoaded()");
if (rewardedVideoAd.isLoaded()) {
rewardedVideoAd.show();
}
}
@Override
public void onRewardedVideoAdOpened() {
System.out.println("onRewardedVideoAdOpened()");
}
@Override
public void onRewardedVideoStarted() {
System.out.println("onRewardedVideoStarted()");
}
@Override
public void onRewardedVideoAdClosed() {
System.out.println("onRewardedVideoAdClosed()");
}
@Override
public void onRewarded(RewardItem rewardItem) {
System.out.println("onRewarded()");
}
@Override
public void onRewardedVideoAdLeftApplication() {
System.out.println("onRewardedVideoAdLeftApplication()");
}
@Override
public void onRewardedVideoAdFailedToLoad(int i) {
System.out.println("onRewardedVideoAdFailedToLoad()");
}
});
}
</code></pre>
<h2>Logcat:</h2>
<pre><code>01-31 19:38:05.795 6634-6634/com.game.puzzle.game.ballmania.android I/dalvikvm﹕ Could not find method android.security.NetworkSecurityPolicy.getInstance, referenced from method com.google.android.gms.ads.internal.t.e.a
01-31 19:38:06.085 6634-6735/com.game.puzzle.game.ballmania.android D/dalvikvm﹕ DexOpt: --- BEGIN 'ads1706048048.jar' (bootstrap=0) ---
01-31 19:38:06.285 6634-6735/com.game.puzzle.game.ballmania.android D/dalvikvm﹕ DexOpt: --- END 'ads1706048048.jar' (success) ---
01-31 19:38:06.285 6634-6735/com.game.puzzle.game.ballmania.android D/dalvikvm﹕ DEX prep '/data/data/com.game.puzzle.game.ballmania.android/cache/ads1706048048.jar': unzip in 0ms, rewrite 207ms
01-31 19:38:13.165 6634-6634/com.game.puzzle.game.ballmania.android I/Ads﹕ Starting ad request.
01-31 19:38:13.175 6634-6634/com.game.puzzle.game.ballmania.android I/Ads﹕ Use AdRequest.Builder.addTestDevice("B6155B00A6A175A4D29AE13C0F0FBD7B") to get test ads on this device.
01-31 19:38:16.665 6634-7074/com.game.puzzle.game.ballmania.android W/Ads﹕ Could not instantiate mediation adapter: com.google.ads.mediation.flurry.FlurryAdapter. null
01-31 19:38:16.715 6634-7074/com.game.puzzle.game.ballmania.android W/Ads﹕ Fail to instantiate adapter com.google.ads.mediation.flurry.FlurryAdapter
android.os.RemoteException
at com.google.android.gms.internal.zzev.zzah(Unknown Source)
at com.google.android.gms.internal.zzev.zzaf(Unknown Source)
at com.google.android.gms.internal.zzew$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:347)
at com.google.android.gms.ads.internal.l.a.d.a(SourceFile:94)
at com.google.android.gms.ads.internal.reward.c.b(SourceFile:194)
at com.google.android.gms.ads.internal.reward.mediation.h.a(SourceFile:53)
at com.google.android.gms.ads.internal.util.b.run(SourceFile:19)
at com.google.android.gms.ads.internal.util.r.call(SourceFile:52)
at com.google.android.gms.ads.internal.util.s.run(SourceFile:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
01-31 19:38:16.745 6634-7075/com.game.puzzle.game.ballmania.android W/Ads﹕ MediationAdapter is not a MediationRewardedVideoAdAdapter: com.vungle.mediation.VungleInterstitialAdapter
01-31 19:38:16.745 6634-7075/com.game.puzzle.game.ballmania.android W/Ads﹕ Fail to check if adapter is initialized.
android.os.RemoteException
at com.google.android.gms.internal.zzfd.isInitialized(Unknown Source)
at com.google.android.gms.internal.zzex$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:347)
at com.google.android.gms.ads.internal.l.a.g.g(SourceFile:621)
at com.google.android.gms.ads.internal.reward.mediation.a.a(SourceFile:83)
at com.google.android.gms.ads.internal.util.b.run(SourceFile:19)
at com.google.android.gms.ads.internal.util.r.call(SourceFile:52)
at com.google.android.gms.ads.internal.util.s.run(SourceFile:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
01-31 19:38:16.745 6634-6634/com.game.puzzle.game.ballmania.android W/Ads﹕ Failed to load ad: 3
</code></pre>
| 0non-cybersec
| Stackexchange |
Server - Lightweight GUI for 20.04 - only need browser, copy files, and see terminal windows. <p>I've looked at a LOT of articles and suggestions, and tried a few options, but i'm super confused as there is a lot of conflicting and constantly changing advice.</p>
<p>We are moving from windows server 2016 to Ubuntu, due to this transition we need to limit the amount of change, mainly moving from a GUI to command line.
The server will need RabbitMq, and run C# dotnet core console apps (10 microservices that all use Rabbitmq to communicate)</p>
<p>We need an extremely light weight gui that has a browser so we can download file/see rabbitmq management screen, and ability to have multiple terminal windows running so we can see the output of each microservice
We will also need to copy and paste files for new releases</p>
<p>Currently these microservices are EXE files on windows, and an app called restartOnCrash keeps them running, we need a similar scenario so we can have these console apps running and detect if they are not (and something will need to make sure they are running, not sure what options there are here)</p>
<p>As we all get use to the linux environments, we will remove the GUI, but for now we need one so the transition is less risky and more familiar for everyone</p>
<p>When there are system issues, we look at RabbitMQ ingestion rates, queue sizes, and each microservice console app to determine where the issue is, so we need to retain this visibility and workflow.</p>
<p>Can anyone suggest a lightweight GUI that is low on system resources to do the above?</p>
| 0non-cybersec
| Stackexchange |
How to remove the already opened popup in jquery mobile. <p>I googled and search SO but can't find anything relates to me.</p>
<p><a href="http://jsfiddle.net/aravinth/Ad22d/90/" rel="noreferrer">http://jsfiddle.net/aravinth/Ad22d/90/</a> </p>
<p>In this fiddle, cloned the table rows using <strong><code>ADD ROW</code></strong> in that table row click <strong>Add Expenses</strong> shows the <code>popup</code> it is also cloned when click the <code>PLUS icon</code>...</p>
<p>My problem starts here now i click the <code>first row add expense button</code>, <strong>3 rows cloned</strong> in popup then click the <code>second row add expenses</code> it shows three rows but i need to <code>show only one column</code> (that is default one)...</p>
<p>Please suggest some idea...Thank You </p>
| 0non-cybersec
| Stackexchange |
Is Ubuntu Live the Right Solution for Me?. <p>I am in charge of imaging many Ubuntu machines on a weekly basis for the company that I work at. Each time I image a machine with 14.04 I have to install certificates so the machines can access our network and additionally install about 10 packages to bind the machine to our domain. </p>
<p>It takes a lot of time to do this and even after scripting the process I still want to be as efficient as possible. I have been investigating the 'Ubuntu Live' procedure but have not been successful the past few weeks.</p>
<p>I have been following this guide: <a href="https://help.ubuntu.com/community/LiveCDCustomizationFromScratch" rel="nofollow">https://help.ubuntu.com/community/LiveCDCustomizationFromScratch</a></p>
<p><strong>- Can anyone give me any insight into the 'Ubuntu Live' process?<br>
- Has anyone had to install many files/packages into certain
directories for many machines?<br>
- How would you go about this
project?</strong></p>
<p>Thanks for reading. You guys have been a great resource to me:D </p>
<p><strong>Update: I found the solution that I was looking for! Remastersys allowed me to put the correct files in the correct location and then clone the entire environment to an iso and image that to any computer!! I followed this guide; <a href="http://linuxhalwa.blogspot.com/2013/01/how-to-create-ubuntu-live-cddvd-using.html" rel="nofollow">http://linuxhalwa.blogspot.com/2013/01/how-to-create-ubuntu-live-cddvd-using.html</a></strong></p>
| 0non-cybersec
| Stackexchange |
I took a picture of the fair today as a storm rolled in.. | 0non-cybersec
| Reddit |
HITMAN – World Of Assassination Trailer [Video]. | 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 fingerprint scanner doesn't work after reboot on Mi phones?. <p>When I first experienced this I ignored it. But after some days I noticed that I <em>had</em> to unlock it by pattern lock or password everytime I restart the phone and <em>after</em> unlocking by pattern/password, I was able to use fingerprint.</p>
<p>Why is this so? I am not sure that every Android device has the same issue. Is this a security feature? If yes, why? I mean if this is a security feature the phone must be unlocked by fingerprint, as pattern or password can be guessed after some attempts (especially patterns). </p>
<p>There are some threads (see <a href="https://www.google.co.in/amp/s/forum.xda-developers.com/mi-5s/help/fingerprint-scanner-doesnt-reboot-t3551025/amp/" rel="nofollow noreferrer">this</a> and <a href="http://en.miui.com/thread-373403-1-1.html" rel="nofollow noreferrer">this</a>), but they doesn't seem to be very informative.</p>
| 0non-cybersec
| Stackexchange |
Would it be possible to have a pet komodo dragon if you say, removed its venom glands?. | 0non-cybersec
| Reddit |
How to perform partial update with Spring data mongoDB(MongoOperations). <p>In my database I have a document that looks like this </p>
<pre><code>{
"_id" : ObjectId("5864ddd8e38112fd70b89893"),
"_class" : "com.apic.models.UserReg",
"name" : "Bijay",
"email" : "[email protected]",
"psd" : "16d932a5a3da90cc6afd831016b5a6821f0badf7e2c624159205924433613c3a",
"activationToken" : "fe8376ea2dbdf61ebc0f11a2361d741ba3178362d5bf876cf47e6a126bc5b39c",
"verified" : false
}
</code></pre>
<p>I also have a bean that looks like this </p>
<pre><code>public class User {
@Id
private int id;
private String name;
private String email;
// getter/setter methods
}
</code></pre>
<p>So when I try to call <code>save()</code> method of <code>MongoOperations</code>, it replaces all missing properties like psd, verified and activationToken. </p>
<pre><code>mongoOperations.save(user, COLLECTION);
</code></pre>
<p>Is there any way where I can update only the existing properties in my models class and leave others as it is?</p>
| 0non-cybersec
| Stackexchange |
John Farnham - You're the Voice [80's power ballad]. | 0non-cybersec
| Reddit |
Show that for every integer $n$, $n^3 - n$ is divisible by 3 using modular arithmetic. <p><strong>Problem</strong>:</p>
<p>Show that for every integer $n$, $n^3 - n$ is divisible by 3 using modular arithmetic</p>
<p>I was also given a hint: </p>
<p>$$n \equiv 0 \pmod3\\n \equiv 1 \pmod3\\n \equiv 2 \pmod3$$</p>
<p>But I'm still not sure how that relates to the question. </p>
| 0non-cybersec
| Stackexchange |
Passing options to template function in thor. <p>I am looking for a way to pass options to the ERB templating engine in thors template action.</p>
<p>I stumbled upon the bundler cli source where thors template action is being used like this:</p>
<pre><code>opts = {:name => name,
:constant_name => constant_name,
:constant_array => constant_array,
:author_name => author_name,
:author_email => author_email
}
template(File.join("newgem/Gemfile.tt"),
File.join(target, "Gemfile"),
opts)
</code></pre>
<p>But when I add options like this in my thor tasks they are not found by ERB, i can only use arguments and functions in my thor class to set variables in the template.</p>
<p>I have no clue how binding works in ruby, maybe there is a way to pass a scope through binding to ERB. </p>
| 0non-cybersec
| Stackexchange |
Algebraic extension and integral element. <p>I'm doing the exercise of Algebraic curves by Fulton and I'm stucked in this problem</p>
<p>Let $R$ be a domain with quotient field $K$, and let $L$ be a finite algebraic extension
of $K$. </p>
<p>(a) For any $v\in L$, show that there is a nonzero $a\in R$ such that $av$ is integral over $R.$ </p>
<p>(b) Show that there is a basis $v_1,..., v_n$ for $L$ over $K$ (as a vector space) such that each $v_i$ is integral over $R$.</p>
<p>If you can give me a sketch of the proof or a Hint i will be very grateful!</p>
<p>Thanks !</p>
| 0non-cybersec
| Stackexchange |
Why you always flush the toilet first in Australia. | 0non-cybersec
| Reddit |
Auditd in a PCI-DSS-compliant Linux cluster. <p>I'm familiar with some of the more common ways of configuring a Linux server to be compliant with <a href="https://www.pcisecuritystandards.org/documents/PCI_DSS_v3-2.pdf" rel="nofollow noreferrer">PCI-DSS 3.2</a>, at least to the requirements of <a href="https://www.pcisecuritystandards.org/documents/PCI-DSS-v3_2-SAQ-A.pdf" rel="nofollow noreferrer">SAQ A</a>. A common concern is requirement 8.5 which requires that:</p>
<blockquote>
<p>Generic user IDs and accounts are disabled or removed</p>
</blockquote>
<p>This includes the root user, which obviously cannot be disabled, so a "compensating control" (in the terminology of PCI-DSS) is needed. A <a href="https://serverfault.com/questions/470755/log-all-commands-run-by-admins-on-production-servers">common recipe</a> is some variant of the following:</p>
<ul>
<li>disable logins as root;</li>
<li>require logins by <code>ssh</code> to use an SSH key;</li>
<li>use <code>sudo</code> to get root;</li>
<li>install <code>pam_loginuid</code> to record the login user ID once users have root; and</li>
<li>install and configure <code>auditd</code> to record root actions and the login user ID.</li>
</ul>
<p>However in case I'm dealing with today, it's not a single machine I'm securing: it's a small cluster (currently with 10 machines), and it's really, really useful to be able to <code>ssh</code> (and <code>scp</code> files) between the machines. Having to do that as a non-root user would be a real pain: almost always the file you need is only readable to root and needs to be put some place only root can write to.</p>
<p>What I'd like to do is allow <code>ssh</code> as root between the machines, using a SSH key present on the servers. This is <a href="https://serverfault.com/questions/189574/allow-root-login-from-one-ip-address-only">easy enough</a> in <code>/etc/ssh/sshd_config</code> with a <code>PermitRootLogin</code> command in a <code>Match Address</code> block. I'm not too concerned about the security implications of allowing someone who has compromised one machine to gain control of the whole cluster: the machines are similar enough that if they manage to compromise one, they can probably use the same process to access the rest.</p>
<p>However if I do this, I loose the ability to track who is running what command, as the no login UID is no longer attached to the process when I <code>ssh</code> to another machine. A compensating control in PCI-DSS needs to "meet the intent and rigor of the original PCI DSS requirement", and the intent of requirement 8.5 is stated as being to make it possible "to trace system access and activities to an individual". Without preserving the login UID, we're no longer providing a compensating control for allowing the root user to exist.</p>
<p>What I'm hoping to find is way of passing loginuid from server to server when login in as root, probably by putting it into the environment. I don't mind that this requires implicitly trusting the originating server: it already is. Can anyone suggest a means of doing this? Or failing that, another way of tracing sysadmin activity as root to a particular user, while allowing easy <code>ssh</code> and <code>scp</code> between machines? </p>
| 0non-cybersec
| Stackexchange |
INSANE THROW Keyhole thermite round win. | 0non-cybersec
| Reddit |
Tyler The Creator on his lyrics(x-post r/youtubehaiku). | 0non-cybersec
| Reddit |
I call it Green Lantern. | 0non-cybersec
| Reddit |
Eating poutine in Quebec along with a couple of steamies.. | 0non-cybersec
| Reddit |
Rails: displaying an image from a blob field in a database. <p>So, I managed to get an image blob into my MySQL database (there's a big hex number in the field), but I can't find any documentation on how to display the image in a rails environment... when it prints out, it starts with a GIF89... and then the gobbledygook characters you see in a GIF when you open it in Notepad. : P Any clues would be greatly appreciated!</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
That's one way to do it.. | 0non-cybersec
| Reddit |
Is semantic web a dead on arrival project?. <p>Does anybody use semantic techniques (RDF, OWL, machine reasoning, etc.) in comercial apps or is it still an academia's toy?</p>
| 0non-cybersec
| Stackexchange |
TIFU by listening to my dick instead of the voice of reason.. TLDR: I'd planned to hook up with my FWB at her house, her parents were meant to be out, her Dad wasn't, went along with it, no one knew I was there, Dad walked in on us, mirror fell on top of me.
​
So yeah, this happened a little while ago but thought I'd share this tale of woe today.
So this girl and I, I'll call her Kate, had been hooking up for about a month, but had never had sex because Kate didn't want to have sex unless it was outside of a car, where all the hookups had taken place prior to this. At this point we were both still in high school and lived with our parents and it was tricky to find the time and a free house and whatnot. But then, one weekend, Kate's parents were planning on taking a trip away for a few days, leaving us plenty of time to do the deed.
So she had been out that night and I picked her up and basically we were planning on going back to hers and whatnot. Everything was going swimmingly but then just as we were about to get home, her Dad calls her saying he felt ill and had just gotten back home. This was obviously a big problem. I parked down the road from her house and we discussed our options. 1: We could just abandon ship and go home. 2: We just hook up in the car instead. or 3: We wait for Kate's Dad to go to sleep or go out to the shops or something along those lines. Normally option 2 would have been our go, but we had been anticipating this for ages and we really wanted to so we decided on option 3.
She left to go inside and scope the scene and let me know when I could sneak in whilst I staked it out in the car. While waiting I was texting my best mate about what was going on and his advice was a resounding "DON'T FUCKING DO IT", but what did he know hey.
Well he knew better than me apparently.
Shortly after our conversation ended Kate texted me saying her Dad was out to get dinner and I should take this opportunity to sneak in. Perfecto. So I snuck in and we got into bed together. Initially the plan was just to wait it out til he was certainly asleep, but we ended up saying fuck that and just went straight to it. Thing is, we had a safety net, if he was returning home we'd hear his car parking on the street, as well as, most importantly, the front light would turn on as he approached the front porch. All the lights were off in the house, we were sneaky, nothing could go wrong.
What we didn't predict was the power outage that hit just after I had gotten into the house. Unbeknownst to us, our safety net was gone. And thus everything went to shit. Kate was on top of me when he burst into the house. We fucking panicked, her Dad went straight to her room, as there was an obvious commotion going on in there. As he walked in, she jumped off of me, damn near broke my dick and scrambled to get the sheets over her. Meanwhile I had no idea what to do so I just rolled off of the bed and hoped to get out of sight. Unfortunately Kate has a floor mirror that I happened to bump into. It then immediately fell on me and I tried to catch it with my legs and arms and heard the glass break.
So there her Dad was, his naked daughter trying to cover herself up, and on the other side of the bed two butt naked legs and two arms desperately trying to keep a mirror from falling onto the floor and smashing to a million pieces.
Needless to say, my best friend was very smug afterwards. | 0non-cybersec
| Reddit |
Competition between Airbus and Boeing 1974 - 2019. | 0non-cybersec
| Reddit |
There is a significant association between the rise of populism across Europe and the level of mistrust around vaccines, according to a new study from 14 European countries.. | 0non-cybersec
| Reddit |
Beautiful time bomb in a huge bowl. | 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 |
Obat Aman Batuk Kering Anak. | 0non-cybersec
| Reddit |
[OC] County by County Spread of Covid-19 in the United States. | 0non-cybersec
| Reddit |
As Samsung is removing the headphone jack from its devices, on line at the time, it might be time for them to fix a Bluetooth bug that has been plaguing its Galaxy series for years.... The use case is easy : have a smartwatch/band always connected to your Galaxy phone through Bluetooth and no matter how good your Bluetooth headphones are, they will most likely sound like crap.
I've had it on my S8, S8+, Note 8 and Note 9 with my Moto 360 Sport, MiBand and now Huawei Watch 2 but I've read people reporting it as far as the Galaxy S6. Had it on my Plantronics Beats Pro 2, Sennheiser HD4.50 and now Sony WH-1000M3.
No matter what I do (including messing around with the Bluetooth settings from the Developer Options...that get reset all the time anyway), Bluetooth quality will drop from time to time to 2003 96kbps mp3.
Quality is fine when no Bluetooth devices is connected or when using another Android phone in the same use case.
[You can read about it here for instance.](https://forum.xda-developers.com/galaxy-s8+/help/bluetooth-audio-bad-quality-t3622984/page4)
But there are many other posts online.
​
It might be Android Wear related as well but...
1. I definitely had it with only a MiBand connected and I've read reports of similar issues with Tizen products ([Gear S3](https://www.reddit.com/r/GearS3/comments/7r1303/poor_bluetooth_streaming_quality_s8_when/))
2. With these phones now costing 1000€ and such a push from the industry to go "all Bluetooth", I'd expect this issue to be fixed by now. Especially since other manufacturers are not affected (definitely had no issue on my OP6T recently).
​
Beware of this issue before purchasing a Note 10. | 0non-cybersec
| Reddit |
Set half of the filters of a layer as not trainable keras/tensorflow. <p>I'm trying to train a model suggested by <a href="https://arxiv.org/ftp/arxiv/papers/1705/1705.04748.pdf" rel="nofollow noreferrer">this</a> research paper where I set half of the filters of a convolution layer to Gabor filters and the rest are random weights which are initialized by default. Normally, if I have to set a layer as not trainable, I set the <code>trainable</code> attribute as <code>False</code>. But here I have to freeze only half of the filters of a layer and I have no idea how to do so. Any help would be really appreciated. I'm using Keras with Tensorflow backend.</p>
| 0non-cybersec
| Stackexchange |
How can I make an element draggable, but not its child elements, using jQuery UI?. <p>For example, I want to have this:</p>
<pre><code><div class="draggable">
<p>Text that can be selected</p>
</div>
</code></pre>
| 0non-cybersec
| Stackexchange |
Shell script equivalent to PHP $_POST. <p>For example and learning purposes, I have a webpage that uses <code>POST</code> method to submit a text field. I have a server running script (bash) that I want to display what the "Query_string" is. I'm not completely familiar with PHP either, but I think <code>$_POST</code> would be used to print the submitted text. The script I am using is bash. What could I use to print out the submitted text? </p>
| 0non-cybersec
| Stackexchange |
Remove User interaction from apt-get when installing/removing things in a script. <p>I have a script which removes libreoffice and installs openoffice instead, how can I get apt-get to stop requiring the user to confirm this operation? I only want this to happen in the script so what switches should I use? I also want to reduce the output so it doesn't clog up the console. </p>
| 0non-cybersec
| Stackexchange |
Princess fires starter pistol, Prime Minister suffers hearing loss. | 0non-cybersec
| Reddit |
jQuery Waypoints Fire Once. <p>I am using <a href="http://imakewebthings.com/jquery-waypoints" rel="nofollow noreferrer">http://imakewebthings.com/jquery-waypoints</a> and
I need to do some action when the user scrolls down to the area with the class <code>div1</code>. However, I need it only fire once and not every time the user scrolls to that location. — <strong>only once</strong></p>
<pre><code>$('.div1').waypoint(function(direction)
{
alert(CARRY OUT MY ACTION);
});
</code></pre>
<p>This needs to only happen on the first scroll to that section — up or down.</p>
| 0non-cybersec
| Stackexchange |
Using Groovy, how can we call a python script, in windows, with one argument. <p>I need to run a python script in windows system using groovy script.</p>
<p>Example:</p>
<p>python.exe c:/main.py argument1</p>
<p>I am new to groovy and I don't know, how to do it.
Please share me groovy syntax to run python as mentioned in the above example</p>
<p>I am preparing this script for jenkins.</p>
| 0non-cybersec
| Stackexchange |
expect_not_equal in pkg:testthat. <p>I want to test that two values are <em>not</em> equal using 'testthat'. I can test equality using something like</p>
<pre><code>expect_that(x, equals(y))
</code></pre>
<p>But, what if I expect them to not be equal? I could use</p>
<pre><code>expect_false(x == y)
</code></pre>
<p>Is this the right way to do it or is there something like</p>
<pre><code>expect_that(x, not_equals(y))
</code></pre>
| 0non-cybersec
| Stackexchange |
Ep. IX could use the same first sentence as TFA’s Crawl. | 0non-cybersec
| Reddit |
This bong makes a smokenado. | 0non-cybersec
| Reddit |
How many primitive roots does $334$ have?. <p>Clearly $334 = 2 \times 167$. So it is of the form $2p^k$ which implies primitive roots $\bmod 334$ exits but the question is how many?</p>
<p>The formula $\phi(\phi(n))$ requires $n$ to be prime. If we use it for $334$ which is composite, we get $\phi(\phi(334)) = 82$.</p>
<p>So can we conclude that there are $82$ primitive roots $\bmod 334$?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to 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 |
lxd with own br0 Network is Unreachable in centos conteiner. <p>When I run lxd init I choose this setting. </p>
<pre><code>Would you like to create a new network bridge (yes/no)? no
</code></pre>
<p>because I created my own br0 in /etc/network/interfaces</p>
<pre><code>source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address x.x.50.2
netmask 255.255.252.0
broadcast x.x.x.255
network x.x.x.0
gateway x.x.53.254
dns-nameservers 8.8.8.8
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
iface eth0 inet manual
</code></pre>
<p>Then I launch lxd centos and run</p>
<pre><code> lxc config device add first eth0 nic nictype=bridged parent=br0
lxc config device set first eth0 ipv4.address x.x.51.2
lxc config device set first eth0 security.mac_filtering true
</code></pre>
<p>and change configuration in</p>
<pre><code> /var/lib/lxd/containers/second/rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HOSTNAME=LXC_NAME
NM_CONTROLLED=no
TYPE=Ethernet
IPADDR=x.x.51.2
NETMASK=255.255.255.255
GATEWAY=x.x.53.254
DNS1=8.8.8.8
DNS2=x.x.x.x
MTU=
DHCP_HOSTNAME=x.x.50.2
</code></pre>
<p>When I try ping 8.8.8.8 I get Connection: Network is Unreachable</p>
<p>/etc/resolv.conf</p>
<pre><code> nameserver 8.8.8.8
search lxd
nameserver x.x.x.x
</code></pre>
<p>What am I doing wrong I cannot figure out, maybe I'm missing some conception?</p>
| 0non-cybersec
| Stackexchange |
Error in cordova When type "cordova build android". <p>When i do the cordova build android in cmd, it gives an error:</p>
<pre><code>C:\workspace\two>cordova build android
ANDROID_HOME=C:\Program Files\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_77
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configur
ation failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:17
6)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.jav
a:599)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:566)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:563)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.ja
va:55)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.ja
va:47)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:562)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:559)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.d
ispatch(BroadcastDispatch.java:93)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.d
ispatch(BroadcastDispatch.java:82)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(Abstract
BroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatc
h.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatc
h.java:30)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocat
ionHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy11.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfte
rEvaluate(LifecycleProjectEvaluator.java:67)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L
ifecycleProjectEvaluator.java:61)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj
ect.java:529)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj
ect.java:90)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(Task
PathProjectEvaluator.java:42)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuil
dConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLa
uncher.java:125)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:90)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:52)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:122)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGra
dleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl
eLauncher.java:99)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl
eLauncher.java:93)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:90)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:62)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:93)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:82)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:94)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(Exe
cuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildA
ctionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:43)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:28)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin
uousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin
uousBuildActionExecuter.java:46)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBu
ild.java:52)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Build
CommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(
WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute
(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.
execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(Forw
ardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(Forw
ardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(For
wardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(
DaemonHealthTracker.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClien
t.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Build
CommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBu
ild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Build
CommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(Hin
tGCAfterBuild.java:41)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.
run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(Daemon
StateCoordinator.java:246)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.
onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableE
xecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
FAILURE: Build failed with an exception.
* Where:
Script 'C:\workspace\two\platforms\android\CordovaLib\cordova.gradle' line: 64
* What went wrong:
A problem occurred evaluating root project 'android'.
> No installed build tools found. Please install the Android build tools version
19.1.0 or higher.
BUILD FAILED
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Total time: 3.089 secs
Error: Error code 1 for command: cmd with args: /s,/c,"C:\workspace\two\platform
s\android\gradlew cdvBuildDebug -b C:\workspace\two\platforms\android\build.grad
le -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
</code></pre>
<p>my SDK is complete and path is correct</p>
<p><a href="https://i.stack.imgur.com/xZvRm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xZvRm.png" alt="enter image desciption here"></a></p>
<p>Cordova Version <code>6.1.1</code>
Cordova Platform ls for Android <code>5.1.1</code></p>
| 0non-cybersec
| Stackexchange |
Bats are the most fascinating sexy beasts. | 0non-cybersec
| Reddit |
Chamillionaire shares a first-hand account of Michael Jordan being a major ass hole - cause apparently he is.. | 0non-cybersec
| Reddit |
Mumford-Tate groups and Hodge structures. <p>It is well known that the Mumford-Tate group of a polarizable pure $Q$-Hodge structure is reductive.
(this is proved for instance in Deligne et al LNM 900, Voisin's books on Algebraic Geometry,..)</p>
<p>Question: Is there an example of a non-polarizable $Q$-Hodge structure whose Mumford-Tate group is reductive? </p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
Show that there exists no sequence of complex polynomials which converges uniformly to $\frac{1}{z^2}$ on the annulus $1<|z|<2$.. <blockquote>
<p>Show that there exists no sequence of complex polynomials which converges uniformly to <span class="math-container">$\frac{1}{z^2}$</span> on the annulus <span class="math-container">$1<|z|<2$</span>.</p>
</blockquote>
<p>Suppose there exists a sequence of complex polynomials <span class="math-container">$f_n(z)=a_0^{(n)}+a_1^{(n)} z+a_2^{(n)} z^2+\cdots +a_n^{(n)}z^n$</span> which converge uniformly to <span class="math-container">$\frac{1}{z^2}$</span> where <span class="math-container">$a_n^{(n)}\neq 0$</span></p>
<p>Then <span class="math-container">$\sup_{1<|z|<2}|f_n(z)-\frac{1}{z^2}|<\epsilon $</span> <span class="math-container">$\forall \epsilon>0\to (\ast)$</span>.</p>
<p>Now note that at <span class="math-container">$1<|z|<2 ,|z|^n\to \infty$</span></p>
<p>Thus <span class="math-container">$|f_n(z)|\to \infty $</span> as <span class="math-container">$n\to \infty $</span> making <span class="math-container">$f_n(z) $</span> unbounded but <span class="math-container">$\frac{1}{z^2}$</span> is bounded in <span class="math-container">$1<|z|<2$</span>.</p>
<p>Thus <span class="math-container">$(\ast) $</span> cant hold <span class="math-container">$\forall \epsilon>0$</span>.</p>
<p>Thus no such sequence of polynomial exists.</p>
| 0non-cybersec
| Stackexchange |
Tiny Caught T.I. Watching Ashley Graham’s Twerking Video & Her Reaction Will Shock You. | 0non-cybersec
| Reddit |
Has anyone read/debunked Yessenin-Volpin–Hennix “Beware of the Gödel-Wette paradox”?. <p>A student recently asked me about the status of a 2001 arXiv post, <a href="http://arxiv.org/abs/math/0110094">Beware of the Gödel-Wette paradox!</a>, by Alexander Yessenin-Volpin (aka Esenin-Volpin and several other transliterations) and Catherine Christer Hennix.</p>
<p>It claims to give a counter-example to Gödel’s second incompleteness theorem, which of course sets off the crackpot alarm. However, at least Yesenin-Volpin has done enough other serious and thought-provoking work (albeit more philosophy-of-maths than straight-up mathematics) that I am uncomfortable dismissing the paper without some consideration. I presume it either has an error, or works in a non-standard meta-mathematical setting, or in some other way does something weaker than it seems to claim; but it would be nice to substantiate this suspicion and find out which of these is the case.</p>
<p>Has anyone read this paper carefully, and discussed/debunked it?</p>
| 0non-cybersec
| Stackexchange |
APRIL FOOLS!!!. | 0non-cybersec
| Reddit |
Expected Value: $E[aX]=aE[X]$. <p>Let $X$ be a random variable on [0,$ \infty $] and $a \in R$ .</p>
<p>We can prove</p>
<p>$E[aX] = \int_0^{+\infty} a*x f(x) dx = a\int_0^{+\infty} x f(x) dx = a E[X]$</p>
<p>I have $Y = aX$ then $E[Y]=aE[X]$</p>
<p>The expression below should give $aE[X]$ but I'm doing an error and I can't identify it. Please can someone explain me what is it.</p>
<p>Here are the steps:</p>
<p>$Y= aX \leftrightarrow dy= a\ dx$ </p>
<p>$x=0 \rightarrow y= 0$, $x=\infty \ y=\infty$</p>
<p>$E[Y]= \int_0^{+\infty} y Pr(Y=y) dy= \int_0^{+\infty} a*x*pr(aX=ax)*a*dx$</p>
<p>$ = \int_0^{+\infty} a^2*x*pr(X=x)*dx = a^2* E[X]$</p>
| 0non-cybersec
| Stackexchange |
Horseman's Horrific Jack-o'-Lantern. | 0non-cybersec
| Reddit |
what animals scare you that doesn’t really scary others, and why?. | 0non-cybersec
| Reddit |
parpic problem (indentation). <p>I like to use parpic to insert in the beginning of a paragraph some photo of scientist --- mainly eps files. Unfortunately some times, it indents the whole paragraph. Is this a know bug or the result of a clash between packages? I do not believe to the second proposition since in the same text it is not systematic. </p>
<p>I add an example</p>
<p><a href="https://i.stack.imgur.com/5uPil.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5uPil.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
Pirelli CEO Marco Tronchetti says Inter will sign Messi. | 0non-cybersec
| Reddit |
Android ListView,show a message if arrayList of arrayAdapter is empty. <p>I need help.
I have a Listview.setListAdapter(arrayAdapter) and array adapter have a arrayList.</p>
<p>If my arrayList is empty it shows loading images, it is normal, but how can i show a message if my arrayList is empty?
Thanks in advance.
<img src="https://i.stack.imgur.com/PmDxy.png" alt="enter image description here"></p>
| 0non-cybersec
| Stackexchange |
Do pets enjoy being petted as much as we enjoy petting them?. | 0non-cybersec
| Reddit |
Help! My boyfriend's cock STINKS!!!. So I (22) have been dating this guy (24) for about 6 months now and everything is going great. He's smart, dependable, and we have a lot of common interests. Overall, he seems like the perfect guy.
One problem: HIS DICK SMELLS FUCKING PUTRID! I know he washes, we've showered together and he's generally a very clean guy. He says he's been tested and I believe him, so I doubt that is the cause of the stench.
It's getting to be a real problem. I used to be able to deal with it, but lately every time I give him oral I've had to stop because I feared I would vomit from the smell.
Help me Reddit! What do I do about my boyfriends stinky cock??? | 0non-cybersec
| Reddit |
error in phpMyAdmin. <p>I was create Database (products) table Items with tow columns (id,name) and I added values to this columns then this errors display </p>
<pre><code>Warning in .\libraries\DisplayResults.php#869
A non-numeric value encountered
Backtrace
.\libraries\DisplayResults.php#4933: PMA\libraries\DisplayResults->_getTableNavigation(
integer 0,
integer 0,
boolean false,
string '',
)
.\libraries\DisplayResults.php#4378: PMA\libraries\DisplayResults->_getPlacedTableNavigations(
integer 0,
integer 0,
string 'top_direction_dropdown',
boolean false,
string '',
)
.\libraries\sql.lib.php#1685: PMA\libraries\DisplayResults->getTable(
,
array,
array,
boolean false,
)
.\libraries\sql.lib.php#1976: PMA_getHtmlForSqlQueryResultsTable(
,
string './themes/pmahomme/img/',
NULL,
array,
boolean true,
integer 1,
integer 1,
NULL,
,
array,
)
.\libraries\sql.lib.php#2199: PMA_getQueryResponseForResultsReturned(
,
array,
string 'products',
string 'items',
NULL,
NULL,
,
string './themes/pmahomme/img/',
integer 1,
integer 1,
NULL,
NULL,
NULL,
NULL,
NULL,
string 'SELECT * FROM `items`',
NULL,
)
.\libraries\sql.lib.php#2061: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'products',
string 'items',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `items`',
NULL,
NULL,
)
.\sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'products',
string 'items',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `items`',
NULL,
NULL,
)
</code></pre>
| 0non-cybersec
| Stackexchange |
Is the order of evaluation with comma operator & assignment in C predictable?. <p>Recently cppcheck raised an error in some C code, that has the structure:</p>
<pre><code>((void)(value_prev = value), value = new_value())
</code></pre>
<p>In most cases this can be split onto 2 lines, however there are some cases this is useful to have in a single statement.</p>
<p>In practice I found this works with popular compilers (GCC/Clang/MSVC), which don't give any warnings <em>(even with warning levels set to their highest)</em>.</p>
<hr>
<p>Example code:</p>
<pre><code>#include <stdio.h>
int get_next(int i);
int main() {
int i = 0, i_prev = 10;
do {
printf("%d\n", i);
} while ((void)(i_prev = i),
(i = get_next(i)) != 10);
}
</code></pre>
<p>CppCheck 1.73 <em>(latest at time of writing)</em> gives an error with this code:</p>
<pre><code>(error) Expression '(void)(i_prev=i),(i=get_next(i))!=10'
depends on order of evaluation of side effects`
</code></pre>
<p>While the code could be changed to quiet the warning, is the order really undefined?</p>
| 0non-cybersec
| Stackexchange |
Digital Franchise Opportunity. | 0non-cybersec
| Reddit |
I like to draw space themed pixel art. Here's The Moon Halo using only 10 colors.. | 0non-cybersec
| Reddit |
The European Union Parliament just dealt a major blow to net neutrality. | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.