text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Partial derivatives - polyniomial. <p>I need help proving that each mapping $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ such that $\forall a,b \in \mathbb{R} \ : \ f_a(y):= (a,y), \ f_b (x):=(x,b)$ are polynomials, is a polynomial with two variables.</p> <p>It is obvious that partial derivatives of a polynomial are polynomials, but I don't know how to deduce that the function must be a polynomial if the partial derivatives are polynomials.</p> <p>Could you help me?</p> <p>Thank you.</p>
0non-cybersec
Stackexchange
How to prevent auto-backup of an Android app?. <p>I face very weird situation on certain device (Nexus 5x with Android 7): when I clean its data and uninstall it, then install it with Studio, the app is not unitialized but it uses data from 24th january! I tried the same procedure with a tablet and the app has no data.</p> <p>I have repeated this procedure many times, I cleaned my project, rebuilt it multiple times and it always starts with 24th january data (both database and shared prefs).</p> <p>I even tried adb shell and run as to clean up data:</p> <pre><code>bullhead:/data/data/lelisoft.com.lelimath.debug $ ls -l databases/ total 232 -rw-rw---- 1 u0_a259 u0_a259 98304 2017-02-05 11:03 lelimath.sqlite -rw------- 1 u0_a259 u0_a259 16928 2017-02-05 11:03 lelimath.sqlite-journal </code></pre> <p>I deleted them and the app seemed empty - until I deleted it and installed again - 24th january was back.</p> <p>This is a log how it starts:</p> <pre><code>$ adb shell am start -n "lelisoft.com.lelimath.debug/lelisoft.com.lelimath.activities.DashboardActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: lelisoft.com.lelimath.debug | lelisoft.com.lelimath.debug.test I/InstantRun: Instant Run Runtime started. Android package is lelisoft.com.lelimath.debug, real application class is lelisoft.com.lelimath.helpers.LeliMathApp. D/l.c.l.h.LeliMathApp: onCreate() D/l.c.l.h.BalanceHelper: Current points balance: 234 </code></pre> <p>This is a location of a database, got from a debugger:</p> <pre><code>/data/user/0/lelisoft.com.lelimath.debug/databases/lelimath.sqlite </code></pre> <p>Gradle:</p> <pre><code>android { signingConfigs { } compileSdkVersion 24 buildToolsVersion "23.0.3" defaultConfig { applicationId "lelisoft.com.lelimath" resValue 'string', 'app_name', 'LeliMath' minSdkVersion 16 targetSdkVersion 24 versionCode 300 versionName '3.0.0' resValue "string", "app_build_number", getDate(); resValue "string", "app_version", versionName; } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix ".debug" resValue 'string', 'app_name', 'LeliMath DEV' } } </code></pre> <p>Manifest portion:</p> <pre><code>&lt;application android:name=".helpers.LeliMathApp" android:allowBackup="true" android:fullBackupContent="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning"&gt; </code></pre> <p>I do not want o factory reset my phone to get rid off this data. I do not think that this data is in my build. I have not added them and the app in the tablet was empty when installed.</p>
0non-cybersec
Stackexchange
Wasteland 3 - E3 2019 - Official Trailer.
0non-cybersec
Reddit
Windows 10 Pro computer locks out user after a minute of idle time regardless of the settings. <p>I have a Windows 10 Pro (version 10.0.17134) computer that is part of our domain, that after a minute of idle time locks the user out.</p> <p>It is not a group policy issue, and we already looked at the power-saving and screen setting. Does anyone know what might be causing this?</p>
0non-cybersec
Stackexchange
We're only bad at speaking to people because we don't speak to enough people.
0non-cybersec
Reddit
Portable DVD player found in wreckage of fatal Tesla crash amid claim that driver was watching a movie with Autopilot enabled.
0non-cybersec
Reddit
Php executes with different results in command line than when browsed to in Apache. <p>I setup a CentOS 7 vm webserver with the LAMP stack. Over the last few days I have been trying to get an LDAPS connection working to my Windows Server 2008 R2 Domain Controller.</p> <p>I have been able to connect to my DC with: <code>ldapsearch -H "ldaps://server.ad.com" -D "domain\user-name" -W</code> for a couple days. I am also able to use the <code>openssl s_client -connect server.ad.com -prexit</code> command to verify the SSL cert (as I am using a self-signed cert).</p> <p>However, whenever I browse to my PHP webpage in the /var/www/html/test/index.php I always receive "Can't contact LDAP server" errors when trying to <code>ldap_bind()</code>. Yesterday I tried running the PHP file from command line: <code>php /var/www/html/test/index.php</code> and found that my PHP ldap_bind() works every time when using the command line.</p> <p>Searching on the internet, I have found that often the PHP-CLI and PHP Apache will use different php.ini files, but running the <code>php --ini</code> command only shows me a single php.ini file located in /etc/php.ini.</p> <p>I am trying to figure out why PHP executes correctly from the command line but not when browsed to/run through Apache. Any info/ideas to help solve this would be greatly appreciated, thank-you!</p>
0non-cybersec
Stackexchange
Reload of page after rebuild is very slow. <p>I recently went from css to scss instead. </p> <p>Suddenly afterwards my project is very slow for loading the page after a rebuild. (30-50 seconds) </p> <p>I literally did nothing else than added scss instead of css. Just changed the files and changed the settings in .angular-cli to use scss instead. </p> <p>Let me know if i can share some more to help troubleshooting.</p> <p>I have no idea why this is the case.</p> <p>Terminal: </p> <pre><code>webpack: Compiling... Hash: 528351f97868ee9f6cc1 Time: 1857ms chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 178 kB {4} [initial] chunk {1} main.bundle.js, main.bundle.js.map (main) 46.1 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 26.6 kB {4} [initial] chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.2 MB [initial] chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] webpack: Compiled successfully. webpack: Compiling... Hash: b4d9b9ae09285a8f41b1 Time: 350ms chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 178 kB {4} [initial] chunk {1} main.bundle.js, main.bundle.js.map (main) 44.9 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 26.6 kB {4} [initial] chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.2 MB [initial] chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] webpack: Compiled successfully. webpack: Compiling... Hash: 3da1ef8d97c8d4dafca1 Time: 323ms chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 178 kB {4} [initial] chunk {1} main.bundle.js, main.bundle.js.map (main) 44.8 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 26.6 kB {4} [initial] chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.2 MB [initial] chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] webpack: Compiled successfully. </code></pre> <p><a href="https://i.stack.imgur.com/ZZttD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZZttD.png" alt="Network description"></a></p>
0non-cybersec
Stackexchange
Recursion in "the real world". I am a high school student who just completed a course in Java programming. My favorite part of learning to program was recursion. I am seriously considering majoring in Computer Science in college and pursuing a career in programming. I am wondering how often recursion is actually used in software projects (commercial or otherwise). It seems too complex to be useful or even just overkill. Just wondering, what place does recursion have in the commercial sector?
0non-cybersec
Reddit
Keto: Dog Approved.
0non-cybersec
Reddit
Add custom method to string object. <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/4698493/can-i-add-custom-methods-attributes-to-built-in-python-types">Can I add custom methods/attributes to built-in Python types?</a> </p> </blockquote> <p>In Ruby you can override any built-in object class with custom method, like this:</p> <pre><code>class String def sayHello return self+" is saying hello!" end end puts 'JOHN'.downcase.sayHello # &gt;&gt;&gt; 'john is saying hello!' </code></pre> <p>How can i do that in python? Is there a normally way or just hacks? </p>
0non-cybersec
Stackexchange
Examples of commutative ring spectra with graded-artinian coefficients?. <p><strong>Question:</strong> What are some ring spectra <span class="math-container">$E$</span> satisfying the following conditions?</p> <ol> <li><p>The coefficients <span class="math-container">$E_\ast = \pi_\ast(E)$</span> are graded-commutative;</p></li> <li><p>There is a Kunneth spectral sequence <span class="math-container">$E_\ast(X) \otimes_{E_\ast} E_\ast(Y) \Rightarrow E_\ast(X \wedge Y)$</span> for finite spectra <span class="math-container">$X,Y$</span>;</p></li> <li><p>The coefficients <span class="math-container">$E_\ast$</span> form a graded-artinian ring (i.e. satisfies the descending chain condition for homogeneous ideals).</p></li> </ol> <p>Clearly there is a canonical sequence of examples <span class="math-container">$E = H\mathbb Q, K(1), K(2), \dots, H \mathbb F_p$</span>. More generally, if <span class="math-container">$E_\ast$</span> is a graded field then <span class="math-container">$E$</span> is an example -- but this essentially reduces to the examples listed.</p> <p>I'm particularly curious if the telescope <span class="math-container">$T(n)$</span> is (can be chosen to) satisfy (1,2,3).</p>
0non-cybersec
Stackexchange
My (17M) parents (45F) and (48M) bent me over their knees and spanked me for getting a bad grade on a quiz.. I don’t even know where to start unpacking this bullshit. Or if this is the right sub for this. My parents have always been on the crazier side. Super strict military type dad, mom who blindly follows my dads rule. His word is equivalent to that of God’s and if it’s not followed all hell breaks loose. So I’m typically an A-/B+ type student. Nothing great but not bad. Science (chemistry) has kicked my ass this year so far. It’s never been my best subject so whatever. I’ve gotten by. But I’ve never gotten less than a B- and even then my parents grounded me for two weeks. but this past quiz I got a C+. I got it Friday afternoon and told them about it Saturday morning. You’d have thought I came to tell them I’d murdered someone. Dad screaming, mom crying, threats to kick me out, promises I’d amount to nothing. The whole nine yards. But then they really went off the deep end. My mom was sitting on the couch when all this was happening and my dad was standing to my right. All of a sudden he grabs me (he’s 6’2 and muscular, I’m 5’10 and have a runners build, I’m strong but not like him) and pushes me down over my moms lap and starts spanking me. She does nothing, just sits there. He probably hits me about fifteen times before pushing me off her lap onto the ground. He stormed out. My mom continued being a spineless twit on the couch and my ass was stinging like hell. Wtf do I do here? This was inappropriate and disgusting. The idea of even being in the same room as them again disgusts me.
0non-cybersec
Reddit
Radiohead -- No Surprises [Acapella].
0non-cybersec
Reddit
The crew of an Israeli M3 Halftrack proud of the crude graffiti on their vehicle during the Yom Kippur war - October 1973 [1000x729].
0non-cybersec
Reddit
How can I draw irregular shading area with tikz?. <p>How can I draw with tikz the irregular shaded area and (similarly?) the irregular frame around nodes like the ones in the image?</p> <p><img src="https://i.stack.imgur.com/N1WXs.png" alt="gaming analysis"></p>
0non-cybersec
Stackexchange
[Derek Wolfe] These penalties are getting ridiculous. Tough to take someone to the ground without landing on them, whipping them down, grazing their head or hitting their legs. This is a tough game for tough people..
0non-cybersec
Reddit
Time to replenish my makeup collection!. Now at the moment, I can only do drugstore brands. But I'm looking for any tips or hints on your guys' favorite brands from the drugstore! Thought this might be a fun discussion, while also getting some helpful information. I'll start in the comments.
0non-cybersec
Reddit
Beginner Routine and YAYOG (Newb Questions). Hello everyone long time lurker here, I profoundly apologise if the questions have been answered before but here it goes. I started the bwf about 3 months ago, did yoga before that for about 2 months, and I was following YAYOG, You're Your Own Gym by Mark Lauren. Having some knowledge on this subreddit, I was using the warm-up routine before following the set exercises on YAYOG and it was all good and well up until this week. I started the programme on YAYOG -using the book by the way- with the Basic Programme and went through it like a hot knife through butter and started to have some problems come the Week 5&6 of the 1st Class Programme. The 'pull' section of the programme wants me to do 5 pull ups and that is where I failed. I could do 2 with ease another one with the form dissipating and not one more. So this got me thinking if I should check the beginner routine on the sidebar and help myself by following the Pull Up progression there. Right now, I can do 4 sets of 5 negative pull ups with about 4 secs of letting myself down and taking 45 secs of rest between each set. I've also followed the dipping progression there and can do the 3*5-8 as instructed- 45 secs of rest. So as of now I'm still following the programme on YAYOG tho just put a hold on the 'pull' days and replaced it the pull up and dipping progression as well as the handstand progression. And for my question, should I completely drop the YAYOG programme and stick with the beginner programme, change anything with my current method of doing things and whatnot, so suffice to say I'm looking for a general advice on how to progress from there on now. Oh before I forget, male 21 y/o, 66kg -which is 145lb as google tells me- 172cm - 5'6 is the conversion I think.
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
(M)e 37 someone slap sense into me in regards to my girlfriend (f)33 of 1 year. TLDR girlfriends a liar but I want to believe her where do I even begin with this? If you love someone you will do anything for that person you will put aside your own wants for a time for that person right? You will make time to spend with that person you will make time to talk to that person. You will make plans and follow through with them. You wouldn't lie you wouldn't always cancel plans not be able to talk basically do the exact opposite of what a person who wants to be with another person does. So why do I continue with it? Why should I continue with it? Why do we do this to ourselves? Even now I want to defend her I want to believe her when she says she does want a life with me and I can, that's what gets me. That's why I am a miserable wreck. That's why I am allowing my heart to be hurt. I want a life with her. I want to trust her to believe her but I don't think I can anymore. I told her that I can't believe her that at this point me and her are over but she said she doesn't want to lose me that she wants to be with me that she loves me. She wants to talk to me to explain it to me. I want her to be able to explain it am I wrong for that?
0non-cybersec
Reddit
TIL that you can't actually screenshot or record in Batman: Arkham Knight when it is revealed who he is.
0non-cybersec
Reddit
Product of infinite series from -infinity to infinity. <p>How to multiply 2 series which sums over all integers? $$ \Bigr( \sum_{i=-\infty}^\infty a_i x ^i\Bigr)\Bigr(\sum_{j=-\infty}^\infty b_j x ^j\Bigr)$$ </p>
0non-cybersec
Stackexchange
Doing his civic duty....
0non-cybersec
Reddit
SASS (gulp) failing. <p>My <code>gulp</code> is failing. It's a clean install. Installed as non-superuser and using as non-superuser.<br> I am in <code>/X/</code> when running <code>gulp</code>. It works straight from install on other machines. I have done a <code>ls -l $(du|grep 'node')|grep 'root'</code> to try find any incorrect permissions, but I've found none.</p> <pre><code>╰─ gulp [00:20:14] Using gulpfile /X/gulpfile.js [00:20:14] Starting 'cleanJs'... [00:20:14] Starting 'cleanCss'... [00:20:14] Starting 'cleanImg'... [00:20:14] Finished 'cleanJs' after 31 ms [00:20:14] Finished 'cleanCss' after 21 ms [00:20:14] Finished 'cleanImg' after 19 ms [00:20:14] Starting 'cleanAll'... [00:20:14] Finished 'cleanAll' after 104 μs [00:20:14] Starting 'buildFromScratch'... [00:20:14] Starting 'styles'... [00:20:15] 'styles' errored after 145 ms [00:20:15] Error: /X/node_modules/node-sass/vendor/linux-x64-47/binding.node: failed to map segment from shared object: Operation not permitted at Error (native) at Object.Module._extensions..node (module.js:423:18) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object.&lt;anonymous&gt; (/X/node_modules/node-sass/lib/index.js:16:15) at Module._compile (module.js:398:26) at Object.Module._extensions..js (module.js:405:10) at Module.load (module.js:344:32) [00:20:15] Finished 'buildFromScratch' after 156 ms </code></pre>
0non-cybersec
Stackexchange
Speeding Up Angular Material Autocomplete or Alternatives. <p>I am using Angular Materials autocomplete to allow a user to search a string of the format: "[ID #] - [Textual Description]". The data is pre-retrieved at the very beginning of the page loading and holds approximately 39,000 strings.</p> <p>My HTML code is:</p> <pre><code>&lt;md-input-container&gt; &lt;input mdInput placeholder="TSN Search" [mdAutocomplete]="auto" [formControl]="TSN_Ctrl"&gt; &lt;/md-input-container&gt; &lt;md-autocomplete #auto="mdAutocomplete"&gt; &lt;md-option *ngFor="let tsn of filtered_TSNs | async" [value]="tsn"&gt; {{ tsn }} &lt;/md-option&gt; &lt;/md-autocomplete&gt; </code></pre> <p>And my typescript code is:</p> <pre><code>TSN_Ctrl: FormControl = new FormControl(); filtered_TSNs: any; constructor(){ this.filtered_TSNs = this.TSN_Ctrl.valueChanges .startWith(null) .map(val =&gt; val ? this.filter_TSNs(val) : this.dataService.tsnTitles.slice()); } private filter_TSNs(val: string) { return this.dataService.tsnTitles.filter(option =&gt; new RegExp(`^${val}`, 'gi').test(option)); } </code></pre> <p>I am essentially using the standard code from the Angular Materials example, with a slight adaptation.</p> <p>The autocomplete function is incredibly slow and essentially non-responsive. I understand there are a lot of options (39k strings) but it is pre-retrieved and locally stored.</p> <p>Is there something I can do to speed this up or are there simply too many strings in the list? If I modify the filter method and strings to only contain the ID field, could that speed up the process? Do I need to use an entirely different library (i.e. if Angular Materials Autocomplete is known to be slow)?</p>
0non-cybersec
Stackexchange
singularities( Essential and removable) of a complex function.. <p><a href="https://i.stack.imgur.com/1MfrY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1MfrY.png" alt="enter image description here"></a></p> <p>I have some doubts on this question. I think the first and second are false. As for the others I'm not sure.</p>
0non-cybersec
Stackexchange
Selenium python Error: element could not be scrolled into view. <p>I am working on automating the IdentiGO application for my company, and I'm getting the following error:</p> <pre><code>Internal Server Error: /identigo Traceback (most recent call last): File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/views/generic/base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "/Users/jane/Code/maynard_env/maynard/employee/views.py", line 63, in post driver.main(employee) File "/Users/jane/Code/maynard_env/maynard/employee/driver.py", line 31, in main WebDriverWait(driver, 1000000).until(EC.presence_of_element_located((By.XPATH, '/html/body/div[5]/div[3]/div/button/span'))).click() File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: Element &lt;span class="ui-button-text"&gt; could not be scrolled into view </code></pre> <p>Here is my code, with the scripts leading up to this page omitted since they aren't relevant to my problem.</p> <pre><code>from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC WebDriverWait(driver, 1000000).until(EC.presence_of_element_located((By.XPATH, '/html/body/div[5]/div[3]/div/button/span'))).click() </code></pre> <blockquote> <p>On the page prior to this code, where the user selects an appointment date and time; I want the script to wait for the "Go" button to be pushed, then click on "Continue" in the following screenshot:</p> </blockquote> <p><a href="https://i.stack.imgur.com/9YYqk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9YYqk.png" alt="enter image description here"></a></p> <p>If you would like to see the exact page, go to <a href="https://tn.ibtfingerprint.com/" rel="noreferrer">this</a> url, then you will have to make a series of POST requests using the following info:</p> <ul> <li>click schedule a new appointment</li> <li>other</li> <li>vendors and contractors (children)</li> <li>tnvc00047</li> <li>37204</li> <li>make random appointment date</li> </ul> <p>Any advice would really be appreciated!</p> <h2>Update</h2> <p>Here is a JS Fiddle with the html of the page:</p> <p><a href="https://jsfiddle.net/khf4tym3/" rel="noreferrer">https://jsfiddle.net/khf4tym3/</a></p> <p>When I click "view page source", the popup html doesn't show in the source code, so I assume that it is generated with JS.</p> <pre><code>&lt;div class="ui-dialog-buttonset"&gt; &lt;button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"&gt; &lt;span class="ui-button-text"&gt;Continue&lt;/span&gt; &lt;/button&gt; &lt;/div&gt; </code></pre> <h2>Update 2</h2> <p>If I change the line <code>WebDriverWait(driver, 1000000)</code> to <code>WebDriverWait(driver, 30)</code>, I get the following error instead:</p> <pre><code>Internal Server Error: /identigo Traceback (most recent call last): File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/django/views/generic/base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "/Users/jane/Code/maynard_env/maynard/employee/views.py", line 63, in post driver.main(employee) File "/Users/jane/Code/maynard_env/maynard/employee/driver.py", line 34, in main element=WebDriverWait(driver,30).until(EC.element_to_be_clickable((By.XPATH,"//div[@class='ui-dialog-buttonset']/button[@class='ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only']/span[contains(.,'Continue')]"))) File "/Users/jane/Code/maynard_env/env/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: </code></pre> <h2>pythonfiddle</h2> <p>code for the project so far, so you can skip the forum entry.</p> <p><a href="https://jsfiddle.net/93k5s2xg/1/" rel="noreferrer">https://jsfiddle.net/93k5s2xg/1/</a></p> <p>The working solution:</p> <pre><code>WebDriverWait(driver, 20).until(expected_conditions.element_to_be_clickable((By.XPATH, "//div[starts-with(@aria-describedby, 'ui-id-')]//span[@class='ui-button-text' and text()='Continue']"))).click() </code></pre>
0non-cybersec
Stackexchange
This Always Gets to Me.
0non-cybersec
Reddit
Noticed these on the outside of a sliding glass door, finger for scale. Guessing they’re some kind of eggs?.
0non-cybersec
Reddit
Getting shared_ptr refs to appear in doxygen collaboration diagrams. <p>I've done enough Googling to know that if I have something like</p> <pre><code>class SubObject { public: //blah blah blah }; class Aggregate { public: boost::shared_ptr&lt;SubObject&gt; m_ptr; }; </code></pre> <p>I can get Doxygen to create the "correct" collaboration diagram if I have a dummy declaration like</p> <pre><code>namespace boost { template&lt;class T&gt; class shared_ptr { T *dummy; }; } </code></pre> <p>in my header file.</p> <p>My question is: how do I get that to work over all my projects and all my headers, without having to actually include that line in every file?</p>
0non-cybersec
Stackexchange
jQuery: show an element from select drop down, hide it when other option selected. <p>I've tried looking around and there are similar problems, but mine is way more simple, but yet, I can't find a solution within these forums.</p> <p>While learning jQuery, I'm trying to show a DIV when an item/option from a select drop down is selected, and hide that same DIV when any other option in the select drop down is selected.</p> <p>select HTML:</p> <pre><code>&lt;select name="source" id="source"&gt; &lt;option value="null" selected="selected"&gt;&amp;mdash;Select&amp;mdash;&lt;/option&gt; &lt;option value="s1"&gt;Source 1&lt;/option&gt; &lt;option value="s2"&gt;Source 2&lt;/option&gt; &lt;option value="sother"&gt;Other&lt;/option&gt; &lt;/select&gt; </code></pre> <p>DIV I need to show when 'Other' is selected:</p> <pre><code>&lt;div id="specify-source"&gt;Other source here...&lt;/div&gt; </code></pre> <p>When any other option in the select menu is selected, the above DIV shouldn't be visible.</p> <p>I've tried this jQuery but of course it doesn't work properly:</p> <pre><code>$(function() { $.viewMap = { 'sother' : $('#specify-source') }; $('#source').change(function() { // hide all $.each($.viewMap, function() { this.hide(); }); // show current $.viewMap[$(this).val()].show(); }); }); </code></pre> <p>Any help you can give me, I'd greatly appreciate it.</p> <p>Thanks,</p>
0non-cybersec
Stackexchange
Can length extension attacks be avoided by a single bit flip?. <p>It always seemed to me that length extensions are possible simply because no special operation is performed after the last operation - for instance in a Merkle-Damgård construction. Basically the MD construction makes sure that the hash state is secure after processing each block, and therefore the hash state can be directly used as the output of the hash function.</p> <p>All the bits in the state should depend on all the input bits. That should mean that it will be as hard to find a hash with a short Hamming distance to an existing hash value as to find a hash with a much larger Hamming distance.</p> <p>So if this reasoning is correct then <em>any</em> operation that:</p> <ol> <li>doesn't affect the security of the hash;</li> <li>cannot be reduced to the operation performed on each block;</li> </ol> <p>should be able to turn a hash that allows length extension attacks to a hash that doesn't allow length extension attacks.</p> <p>Questions:</p> <ol> <li>Any problem with my reasoning? Is any bit flip enough for the full output of the hash (see note below)?</li> <li>If it is that simple, is there any reason why it hasn't been performed on SHA-2? Were length extension attacks unknown or not seen as a problem?</li> <li>Would such a stupidly simple construction be an viable alternative to HMAC (with <span class="math-container">$K \| M$</span> as input message and a static size of <span class="math-container">$K$</span>)? </li> </ol> <p>Note: Flipping a single bit could do the trick if my reasoning is correct, but it has the drawback that partial hashes may not be affected. Flipping every bit - to get the complement of the hash value - should work as well - I think.</p>
0non-cybersec
Stackexchange
Ran my GF's first D&D session. Gnome bullying and Fox catching details inside.. **Background:** Yesterday I ran a short session (45 minutes) for my GF. She'd been hounding me to show her this game I'm obviously obsessed with. I didn't think she was serious but she kept reminding me so I finally prepped a one-shot session. The adventure was as basic as you can possibly make it. An inn with some rats in the basement. She doesn't play video games aside from Mario or Sonic and the only board games she knows are Monopoly and Cards Against Humanity from "one time at a party". I knew I'd lose her if she had to make a character but a pre-gen wouldn't capture how it feels to play something that's *yours*. I decide to keep character creation simple and to do the calculations for her (modifiers, attack bonuses and damage). We end up with a Half-Elf Sage fighter (Bow) with the standard array. I ask her to put the stats where she wants them. I point out the 8 will be something she was terrible in. Strength 8 it is because who needs Strength anyway! **The session:** To kick things off I describe what she'd been up to until then: She's a somewhat renowned hero and occasionally hears ballads about her exploits. Her last quest's reward was spent which means now she's out looking for more trouble. The adventure kicks off on a small road in the forest. It's getting late when she notices a sign marking the village of Parvus only 3 miles away. At this point I think I've set the scene properly and ask: What would you like to do? She freezes up for a second. I'd never realized how daunting it can feel to have unlimited choices. She could do *anything* and the story would go on. She tells me she stays on the path and walks at a brisk pace to Parvus. I tell her she'd been walking for about an hour when she crests a hill and sees the tiny little village. It's a few minutes further but I prompt her again: What do you do? She jokingly tells me she wants to look around for a cat-lion (She'd shared this (Warning: graphic!) [video](https://www.youtube.com/watch?v=w0MueLc68zU) that day) so I ask for a Perception check. No cat-lions in sight. I describe the smoking chimneys in the village and a nearby fox holding a dead mouse observing her. She's curious about the fox but goes to the village. I set up Parvus with a few amenities where the NPCs direct her to the inn. I hadn't given her any money because I wanted her to figure out how to pay for her stay. She catches on quickly and looks for work. She tries a random house first and I roleplay a 3 foot Halfling. As a DM, I try to do voices. Usually, it helps immersion. Not this time. My squeaky Halfling voice gets her laughing. "You're so cute!" I try to stay in character and reply "Oh...err...I guess. Thanks?" The Halfling and the Dwarf Blacksmith she talks to after that direct her to the inn. There, she talks to the owner who is eager to complain about his good-for-nothing son who can't get the basement rat infestation under control. Now, she's playing a pretty badass character. Any of us playing would have stormed into that basement hacking and slashing until the cellar was wet and bloody. Not her. Without pausing, she tells me she's going to get some foxes to deal with the rats. *Blindsided!* I run the fox-hunting like a skill challenge. First she needs a location (Nature), then she looks for signs of the creature (Survival) and finally she attempts to tame the fox (Animal Handling). Her surprisingly good rolls carry her through and she travels back to Parvus with a curious fox in tow. They enter the basement from behind the inn. I describe gnawing sounds coming from the darkness. Her Half-Elf eyes adjust and she decides, being the Hero she is, to go down first. The fox follows but the rats are hiding. A Strength check has her knock over a barrel and we jump to initiative. First, she faces a rat on her own. The creature is completely outmatched and I make sure to include a few gory details of its demise. Then, her attention turns to the less heroic fox. It's fighting a rat but another one is sneaking up behind it! She practically yells "I KILL THE RAT!" but she can't. "It's not your turn yet." I didn't know people's eyes could shoot venom. "I swear, if you tell me the fox dies...!". I make a few rolls. The fox gets bitten but its plot armor holds up and it kills a rat before her turn comes up again. She repeats "I kill the rat." and attacks. The creature dies and the basement falls quiet. She immediately asks about the fox and I inform her it looks injured and whimpers at her touch. She grabs it and runs outside to look for a way to treat it. I ask for a quick check to look around reveals the Gnomish potion-maker is closing up shop for the night. She approaches and asks to make a purchase. "Oh, I'm closed for the day. Come back tomorrow!" She's not a happy camper. The fox needs help now! Out come the Intimidate rolls. The Gnome is bullied into letting her inside and the fox is given treatment. For free, too! Would you look at that...threats of violence are extremely convincing when coming from an armed madwoman. A small pot of aloe-scented paste stabilizes the fox and I end the session. I'm pretty happy happy with how it played out. Then she tells me to hold onto her character sheet! I have to continue her story! Critical success. I've introduced a few people to D&D. Some stuck around, some didn't. For some reason, this time gave me some warm n fuzzies. I thought I'd share. Note: This happened last week. I started writing this post and got busy. I could only finish it now. It's all true unless she happens to read this in which case the part about the fox's plot armor is 100% fabricated and false. Foxes don't have plot armor that ensure boyfriends don't sleep on the couch. **TL:DR Fighter goes into basement. Kills rats.**
0non-cybersec
Reddit
John and Prostie argue about when to pay up....
0non-cybersec
Reddit
3 Monitors Output with Motherboard Build In Graphics. <p>I am trying to have 3 monitors output from my ASRock H110M-HDV motherboard PC with Windows 7. However, so far I only manage to get 2 monitor output. When I try to expand the desktop to third monitor, the second monitor will turn off.</p> <p>How can I have 3 monitor output from my system? Thank you.</p>
0non-cybersec
Stackexchange
Improper convergent integral with interior singularity. <p>For $a$ and $b$ real numbers, $a&lt;b$, I'm looking for an example of a function $f(x)$ that has an infinite discontinuity at some $c$ satisfying $a&lt;c&lt;b$ (i.e. $c$ is in the interior of the domain of integration) and such that</p> <p>$$\int_a^bf(x)dx$$</p> <p>is finite. I tried $\int_{-1}^{1}\frac{e^x}{e^x-1}$ but did not work (integral diverges). Thanks.</p>
0non-cybersec
Stackexchange
Pay Per Click Marketing.
0non-cybersec
Reddit
Is every positive nonprime number at equal distance between two prime numbers?. <p>For example $8$ is in the middle of the interval between $5$ and $11$, $9$ is at equal distance between $7$ and $11$; $10$ between $7$ and $13$.</p>
0non-cybersec
Stackexchange
Sources: Destiny 2 Coming To PC, Aims To Feel Like A Totally New Game (Rumor from Kotaku). http://kotaku.com/sources-destiny-2-coming-to-pc-aims-to-feel-like-a-to-1787153460 http://m.neogaf.com/showpost.php?p=218333036 Thanks /u/BillPax2000 for providing this extra link to help solidify the leak :D
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
Evaluating $\cos^{-1}(\sin(-17))$. <p>I had this question on my test I took today, and I'm confused if my answer's right. </p> <p>I had to find the value of </p> <p>$$\cos^{-1}(\sin(-17))$$</p> <p>Okay, first, I drew a triangle. And, after, I let a and b for each line related to sin -17, so that we can say sin (-17) is b/a. And then, I realized cos ^(-1)(b/a) is the other angle than -17 and the right angle. I said the answer was 73, subtracting 17 from 90, since I thought -17 was an way of expressing that the triangle is in the third or fourth quadrant, and the actual angle is 17. However, I heard these kids saying that the answer's 107, since the angles should add up to 90, and 107+(-17) =90. I'm simultaneously confused and frustrated. What's the answer?</p> <p>any help would be appreciated. </p>
0non-cybersec
Stackexchange
Coca-Cola sucks wells dry in Chiapas, forcing residents to buy water: A Coca-Cola bottling plant in Mexico consumes millions of liter of water per day while wells dry up.
0non-cybersec
Reddit
Given a vector subspace $W$, there exist a functional f such that $W= \ker(f)$?. <p>Given $V$ a vector space of finite dimension over a field $F$, and given a subspace of $V$, say, $W\leq V$, I want to find a functional $f\colon V \rightarrow F$ such that $\ker(f) = W$ I don't know how to construct such a functional or if this is possible. </p> <p>Any help would be appreciated.</p> <p>Thanks in advance.</p>
0non-cybersec
Stackexchange
Going to another school and seeing all the hot people there [picture].
0non-cybersec
Reddit
how to write to a file in emacs. <p>I want the emacs lisp code to append some data to a log file from emacs. The log file is large so I don't want to read it into memory.</p> <p>I just need to open the log file, append some data to it, close it. I never need to see or manually edit the content.</p>
0non-cybersec
Stackexchange
continuous curve homotopic to smooth curve. <p>Assume that <span class="math-container">$\gamma : [0,1] \to M$</span> is a continuous curve with initial and endpoint <span class="math-container">$a$</span> and <span class="math-container">$b$</span> respectively and <span class="math-container">$M$</span> is a differentiable manifold. The very well known Approximation Whitney's theorem states that is <span class="math-container">$\gamma$</span> is continuous and differentiable in <span class="math-container">$A = \{0,1\}$</span> we can find a smooth curve <span class="math-container">$\sigma$</span> joining <span class="math-container">$a$</span> and <span class="math-container">$b$</span> such that <span class="math-container">$\gamma$</span> and <span class="math-container">$\sigma$</span> be relative homotopic to <span class="math-container">$A$</span> (its extremes).</p> <p>What happens if <span class="math-container">$\gamma$</span> is not smooth in <span class="math-container">$A$</span>? I have though the next argument. Let <span class="math-container">$(U,\varphi)$</span> be a chart centered in <span class="math-container">$\gamma(0) = a$</span> such that <span class="math-container">$\varphi(U)$</span> is a disk. For simplicity I am going to assume that <span class="math-container">$M$</span> is 2-dimensional. If <span class="math-container">$\gamma$</span> was simple (without self-intersection) its easy to see that <span class="math-container">$\gamma :[0,\varepsilon] \to \varphi(U)$</span> is homotopic (relative to <span class="math-container">$\gamma(0)$</span> and <span class="math-container">$\gamma(\varepsilon)$</span>) to the segment that joins both points.</p> <p>What happens if its not possible to obtain a neighborhood of the point <span class="math-container">$a$</span> such that <span class="math-container">$\gamma :[0,\varepsilon] \to \varphi(U)$</span> is not simple? I mean the set of point self-intersection points of <span class="math-container">$\gamma$</span> could have <span class="math-container">$a$</span> like an accumulation point...</p>
0non-cybersec
Stackexchange
Skipped leg day.
0non-cybersec
Reddit
Lollipop, LethargicNoodles, Digital, 2019.
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
Template specialization with enable_if. <p>I'm trying to create a template function taking a typename. I want to specialize this templates for some basic types like <code>int</code>, <code>long</code>, <code>string</code> and <code>double</code>. For all others types, i need to have a specialized code for class/struct, and a default code for others types.</p> <p>My current code is this one :</p> <pre><code>// Declaration template &lt;typename T, typename enable_if&lt;is_class&lt;T&gt;::value&gt;::type = 0&gt; void test(T&amp; value); template &lt;typename T, typename enable_if&lt;!is_class&lt;T&gt;::value&gt;::type = 0&gt; void test(T&amp; value); template &lt;&gt; // What am i supposed to write here ? void test&lt;int&gt;(int&amp; value); // Definition template &lt;typename T, typename enable_if&lt;is_class&lt;T&gt;::value&gt;::type = 0&gt; void test(T&amp; value) { cout &lt;&lt; "Class/struct test" &lt;&lt; endl; } template &lt;typename T, typename enable_if&lt;!is_class&lt;T&gt;::value&gt;::type = 0&gt; void test(T&amp; value) { cout &lt;&lt; "Other types test" &lt;&lt; endl; } template &lt;&gt; void test&lt;int&gt;(int&amp; value) { cout &lt;&lt; "int test" &lt;&lt; endl; } </code></pre> <p>This code won't compile. I can't figure what am i suppoed to write in the <code>int</code> specialized template.</p> <p>I'm trying to use <a href="https://en.cppreference.com/w/cpp/types/enable_if" rel="nofollow noreferrer">the examples from this documentation</a>, but i'm unable to make it work.</p>
0non-cybersec
Stackexchange
Let $\alpha= f\,dx_1 \wedge \cdots\wedge dx_n$; where $f$ is continuous on $A$. Show that $\int_ \Phi \alpha =\int_ \Phi f$. <p>Let $A \subset \mathbb{R}_k$ be a rectangle (or box), and let $\Phi:A\to\mathbb{R}_k$, be the identity mapping.</p> <p>Let $\alpha= f \, dx_1 \wedge \cdots \wedge dx_n$; where $f$ is continuous on $A$.</p> <p>Show that</p> <p>$$\int_ \Phi \alpha =\int_ \Phi f$$</p> <p>I'm not sure what the formal way to proceed is, if we just go back to the formal definitions of $\alpha(\Phi)$ and $f(\Phi)$ I know what to do in the case of $\alpha$ but I'm not sure what to do for $f$ because it's a $0$-form.</p> <p>So by looking at the definition, there is no jacobian to calculate for $f$ and for $\alpha$ the jacobian has to be one because we have an identity mapping? I'm not sure how to write this properly.</p> <p>Thank you for your help as always!</p>
0non-cybersec
Stackexchange
For that special keto-er in your life this Christmas....
0non-cybersec
Reddit
Erich Lesovsky Live @ Plötzlich am Meer 2013.
0non-cybersec
Reddit
If $a_{n+1}=\frac{10}{a_n}-3$ and $a_1=10$, find $\lim_{n \to \infty} a_n$. <blockquote> <p>Let <span class="math-container">$a_{n+1}=\dfrac{10}{a_n}-3$</span>, <span class="math-container">$a_1=10$</span> then find the limit <span class="math-container">$\lim\limits_{n \to \infty} a_n$</span></p> </blockquote> <p>My Try :</p> <p><span class="math-container">$$a_2=-2 \ \ ,a_3=-8 \ \, a_4=-4.25 \ \ a_n &lt;0$$</span></p> <p>thus visthe monotone convergence theorem <span class="math-container">$$\lim\limits_{n \to \infty}=l$$</span></p> <p>so: <span class="math-container">$$l=\dfrac{10}{l}-3 \to l^2+3l=10 \to l=2 , -5 $$</span></p> <p>it is right ?</p>
0non-cybersec
Stackexchange
how I could pass variable inside awk match?. <p>I have an awk command. I need to use <code>i</code> variable but my command does not work when I do.</p> <pre> "fechaName": "1","firstName": "gdrgo", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "lastName": "222",dfg "fechaName": "2","xxxxx": "John", "firstName": "beto", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "lastName": "111","xxxxx": "John", "fechaName": "4","xxxxx": "John", "firstName": "beto", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "lastName": "111","xxxxx": "John", "fechaName": "4","xxxxx": "John", "xxxxx": "John", "firstName": "beto2", "xxxxx": "John","lastName": "555", "xxxxx": "John","xxxxx": "John", "fechaName": "5","xxxxx": "John", "xxxxx": "John", "firstName": "beto2", "xxxxx": "John","lastName": "444", "xxxxx": "John","xxxxx": "John", "fechaName": "4","firstName": "gdrgo", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "xxxxx": "John", "lastName": "222",dfg "fechaName": "7","xxxxx": "John", "xxxxx": "John", "firstName": "beto2", "xxxxx": "John","lastName": "444", "xxxxx": "John","xxxxx": "John",</pre> <p>When I use 5 instead of <strong>"i"</strong> it works</p> <pre><code>awk -v OFS='"' -v FS='Name": "' '{ for( i=2; i&lt;=7; i++ ) if( match($2, /5"/) ) print $0 }' sumacomando </code></pre> <p>this is my command </p> <pre><code>awk -v OFS='"' -v FS='Name": "' '{ for( i=2; i&lt;=7; i++ ) if( match($2, /**i**"/) ) print $0 }' sumacomando awk -v OFS='"' -v FS='Name": "' '{ for( i=2; i&lt;=7; i++ ) if( match($2, /i"/) ) print $0 }' sumacomando </code></pre>
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
Can I verify on my server that a user paid for an Android app through the Google Play Store?. <p>There appears to be a <a href="https://developer.android.com/google/play/billing/gp-purchase-status-api.html#subscriptions_api_overview" rel="noreferrer">Subscriptions and In-App Purchases API</a> to verify in-app purchases, but as far as I can tell there is no way to do the same for the app itself through the Google Play Store.</p> <p>There is an Android API for <a href="http://developer.android.com/google/play/licensing/index.html" rel="noreferrer">verifying licensing</a>, but it appears to be on-device only. I'd like to do the verification against their server from my server, not my app.</p> <p>With iOS, I can use the <a href="https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1" rel="noreferrer">Receipt Validation API</a> to determine both if an app was purchased on the App store and any in-app purchases. The app sends the receipt to my server, and my server verifies the receipt with Apple's servers. Is there something analogous for Android?</p>
0non-cybersec
Stackexchange
Factorisation of repunits and determination whether a number is prime. Are these two questions linked?. <p>Let $R(n)$ denote a repunit in decimal number system of $n$ digits. With the exception of $2,3$ and $5$ (which have easy divisibility tests), its factors can only be of two types:</p> <ol> <li>Positive integers of the form $nm+1$ where $m$ is a natural number.</li> <li>The divisors of $R(k)$, where $k$ is a factor of $n$.</li> </ol> <p>(So for the first type of factors, the smallest factor of $R$(n) can be $n+1$ and the largest, the number itself.)</p> <p>Firstly i wanted to ask is this a well established and documented result?</p> <p>Secondly has this way of factoring a repunit been used in factoring a number or more importatnly in forming a primality testing algorithm? </p>
0non-cybersec
Stackexchange
Migrating from Eclipse to Android Studio.
0non-cybersec
Reddit
Bet you can't guess the Mystery flavor.
0non-cybersec
Reddit
TIL thath Patricia Routledge, who I remember fondly as Hyacinth Bucket in "Keeping Up Appearances" won a Tony for Best Actress in a Musical..
0non-cybersec
Reddit
Braising steak, onions, carrots, potatoes and a can of Guinness on low all day! Can't wait for my dinner!.
0non-cybersec
Reddit
Debian Buster, &#39;ip a&#39; command doesn&#39;t list my wireless card. <p>I've recently finished a Debian 10 install on my old PC with the XFCE environment. I've been running off of ethernet so far and I intend to use my broadcom wireless card instead, so I installed wicd as well as the broadcom drivers for my card as per these instructions: <a href="https://wiki.debian.org/bcm43xx" rel="nofollow noreferrer">https://wiki.debian.org/bcm43xx</a>.</p> <p>However, wicd didn't see my wireless card, so I ran <code>ip a</code> and it brought back this: </p> <pre><code>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp2s0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 1c:6f:65:41:0d:c2 brd ff:ff:ff:ff:ff:ff inet 192.168.1.228/24 brd 192.168.1.255 scope global dynamic enp2s0 valid_lft 86018sec preferred_lft 86018sec inet6 fe80::1e6f:65ff:fe41:dc2/64 scope link valid_lft forever preferred_lft forever </code></pre> <p>When I run <code>lspci</code> I get this:</p> <pre><code>00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS880 Host Bridge 00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI bridge (ext gfx port 0) 00:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 5) 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3c) 00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde XT [Radeon HD 7770/8760 / R7 250X] 01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02) 03:06.0 Network controller: Broadcom Limited BCM4306 802.11b/g Wireless LAN Controller (rev 03) 03:0e.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) </code></pre> <p>So clearly my card is visible to it. What am I doing wrong?</p>
0non-cybersec
Stackexchange
🔥 The royal moth caterpillar AKA Shaman caterpillar 🔥.
0non-cybersec
Reddit
QCOW2 virtual size lowering. <p>I'm trying to get the virtual size of a <code>qcow2</code> container down so that it can fit in a openstack flavor with 10GB disk.</p> <pre><code>root@node-10:~# qemu-img info zztop.qcow image: zztop.qcow file format: qcow2 virtual size: 80G (85899345920 bytes) disk size: 2.6G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false </code></pre> <p>I follow the guide <a href="https://www.jamescoyle.net/how-to/323-reclaim-disk-space-from-a-sparse-image-file-qcow2-vmdk" rel="noreferrer">here</a> and fill the end of the disk with zeros then run <code>qemu-img convert -O qcow2</code>. The resulting qcow2 however retains the same disk size and virtual size.</p> <p>How do I lower the virtual size of a qcow2 so that it can fit in a openstack flavor smaller than 80GB?</p>
0non-cybersec
Stackexchange
What laws are the standard Haskell type classes expected to uphold?. <p>It's well-known that <code>Monad</code> instances ought to follow the Monad laws. It's perhaps less well-known that <code>Functor</code> instances ought to follow the Functor laws. Nevertheless, I would feel fairly confident writing a GHC rewrite rule that optimizes <code>fmap id == id</code>.</p> <p>What other standard classes have implicit laws? Does <code>(==)</code> have to be a true equivalence relation? Does <code>Ord</code> have to form a partial order? A total order? Can we at least assume it's transitive? Anti-symmetric?</p> <p>These last few don't appear to be specified in the Haskell 2010 report nor would I feel confident writing rewrite rules taking advantage of them. Are there any common libraries which do, however? How pathological an instance can one write confidently?</p> <p>Finally, assuming that there is a boundary for how pathological such an instance can be is there a standard, comprehensive resource for the laws that each type class instance must uphold?</p> <hr> <p>As an example, how much trouble would I be in to define</p> <pre><code>newtype Doh = Doh Bool instance Eq Doh where a == (Doh b) = b </code></pre> <p>is it merely hard to understand or will the compiler optimize incorrectly anywhere?</p>
0non-cybersec
Stackexchange
Resolving the location/registration of an executable in the system?. <p>I am on Ubuntu 11.04, Gnome 2. I had at a certain point installed Adobe Reader (<code>acroread</code>), however "off-tree" (at a non-standard location) - and I just noticed something weird about this executable. </p> <p>First, <code>which</code> reports:</p> <pre><code>$ which acroread /media/mydisk/AdobeReader/Adobe/Reader9/bin/acroread </code></pre> <p>Ok, so it is on a different partition than the system root <code>/</code>; in this case, I'd expect a symlink to this <code>acroread</code> to be present somewhere in the <code>$PATH</code>, e.g. in <code>/usr/bin</code>. So let's try <code>locate</code>:</p> <pre><code>$ locate acroread ~/.icons/All-blacks/scalable/apps/acroread.png /usr/lib/pymodules/python2.7/orca/scripts/apps/acroread /usr/lib/pymodules/python2.7/orca/scripts/apps/acroread/__init__.py /usr/lib/pymodules/python2.7/orca/scripts/apps/acroread/__init__.pyc /usr/lib/pymodules/python2.7/orca/scripts/apps/acroread/script.py /usr/lib/pymodules/python2.7/orca/scripts/apps/acroread/script.pyc /usr/share/app-install/desktop/acroread.desktop /usr/share/app-install/icons/acroread.png /usr/share/pyshared/orca/scripts/apps/acroread /usr/share/pyshared/orca/scripts/apps/acroread/__init__.py /usr/share/pyshared/orca/scripts/apps/acroread/script.py /usr/share/scribus-trunk/icons/acroread16.png /usr/share/scribus-trunk/icons/acroread22.png /usr/share/scribus-trunk/icons/acroread32.png </code></pre> <p>Weird - nothing here seems related, except for <code>acroread.desktop</code>. I recall in Gnome, one can "register" an application by placing a <code>.desktop</code> file in a respective system directory; but if I check <code>acroread.desktop</code>:</p> <pre><code>$ cat /usr/share/app-install/desktop/acroread.desktop [Desktop Entry] X-AppInstall-Package=acroread X-AppInstall-Proprietary=true X-AppInstall-Channel=natty-partner X-AppInstall-LicenseUri=/usr/share/app-install/channels/natty-partner.eula X-AppInstall-Architectures=i386,amd64 Encoding=UTF-8 Name=Adobe Reader 9 Icon=acroread.png Terminal=false Type=Application Categories=Application;Office;Viewer; StartupNotify=true </code></pre> <p>... there's nothing in there about <code>/media/mydisk</code> location ?! Actually, this <code>.desktop</code> file looks like a pre-prepared icon, which would start the installer if you click it?!</p> <p>So how come <code>which</code> finds this executable -- on a partition other than the system one? Maybe it's my <code>.bashrc</code>?:</p> <pre><code>$ grep 'acro\|Adobe' ~/.bashrc $ </code></pre> <p>Nope, nothing there. </p> <p>So - how does the system know, that when I type <code>acroread</code> in the terminal, it should run <code>/media/mydisk/.../acroread</code> - and yet there is no symlink in system path, no mention in <code>~/.bashrc</code>, and not even any relevant Gnome <code>.desktop</code> files in the root filesystem, either?</p> <p>EDIT: The shell I use is <code>bash</code> , and <code>type</code> reports:</p> <pre><code>$ type acroread acroread is hashed (/media/mydisk/AdobeReader/Adobe/Reader9/bin/acroread) </code></pre> <p>I've also tried this:</p> <pre><code>$ while read line; do if [ -f "${line}" ]; then grep -rH 'acroread' "${line}"; fi; done &lt; &lt;(locate applications) /usr/share/application-registry/gnome-vfs.applications:acroread /usr/share/application-registry/gnome-vfs.applications: command=acroread </code></pre> <p>but the <code>gnome-vfs.applications</code> doesn't contain much about the location:</p> <pre><code>$ grep -A7 acroread /usr/share/application-registry/gnome-vfs.applications acroread command=acroread name=Adobe Acrobat Reader can_open_multiple_files=true expects_uris=false requires_terminal=false mime_types=application/pdf applix </code></pre> <p>EDIT2: as @MichaelHomer noted, the reason the shell can call this executable is that the directory was in the <code>$PATH</code>:</p> <pre><code>$ for path in ${PATH//:/ }; do echo "$path" | grep 'Adobe\|acro'; done /media/mydisk/AdobeReader/Adobe/Reader9/bin </code></pre> <p>However, the weird thing now is - how did this directory end up in <code>$PATH</code>? As mentioned earlier, certainly not by being added to my <code>.bashrc</code> - or for that matter, in any <code>bashrc</code>:</p> <pre><code>$ while read fnline; do if [ -f "${fnline}" ]; then echo "...(${fnline})..."; grep -rH 'acro\|Adobe' "${fnline}"; fi; done &lt; &lt;(locate bashrc) ...(/etc/bash.bashrc)... ...(/etc/skel/.bashrc)... ...(~/.bashrc)... ...(~/.bashrc-orig)... ...(~/.bashrc_mine)... ...(/home/aaa/.bashrc)... ...(/home/bbb/.bashrc)... ...(/usr/share/base-files/dot.bashrc)... ...(/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc)... ...(/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc)... </code></pre> <p>... so the question now is: how did this directory end up in path?</p>
0non-cybersec
Stackexchange
Nom Nom Nom Footsies.
0non-cybersec
Reddit
Irish Politician tries to restrict "dangerous" dog breeds.
0non-cybersec
Reddit
My friend said we couldn't make the train, I disagreed [GTA V].
0non-cybersec
Reddit
Access query with &quot;last&quot; and display the rest too. <p>I have an Access DB about measuring tools.</p> <p>I have 2 tables: <code>tblTools</code>, which countains the details of the device, the <code>tblCalibration</code> contains when each device was calibrated.</p> <pre><code>tblTools: tool_ID; tool_Name tblCalibration: calibration_ID; tool_ID ;calibration_Date </code></pre> <p>I wrote a query to get the last calibration date, but it only shows the devices which have a calibration date. I need the results to show all devices, not just those that have been calibrated.</p> <p>Is there any solution for a query that will list all of the devices plus the last calibration date if one exists?</p>
0non-cybersec
Stackexchange
Format of /etc/hosts on Linux (different from Windows?). <p>Pasted below this question is a sample of a <code>/etc/hosts</code> file from a Linux (CentOS) and a Windows machine. The Linux file has two tabbed entries after the IP address (that is localhost.localdomain localhost) and Windows has only one. If I want to edit the hosts file in Windows to have the machine name (etest) instead of localhost, I simply replace the word localhost with the machine name I want. The machine need not be part of a domain.</p> <p>In a Linux machine, the two entries <code>localhost.localdomain</code> and <code>localhost</code> seems to indicate that I will need the machine to be part of a domain. Is this true?</p> <p>Can I simply edit both entries to <code>etest</code> so that it will read:</p> <pre><code>127.0.0.1 etest etest </code></pre> <p>or is it required that I substitute one entry with a domain name?</p> <p>Additionally, please let me know what the second line of the <code>/etc/hosts</code> file on the Linux machine is for.</p> <pre><code>::1 localhost6.localdomain6 localhost6 </code></pre> <p><code>hosts</code> file on a Linux machine:</p> <pre><code># Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 </code></pre> <p><code>hosts</code> file on a windows machine:</p> <pre><code># Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost </code></pre>
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
Differential Geometry in Hamiltonian Mechanics. <p>I have following question about the Hamiltonian mechanics from differential geometrical viewpoint:</p> <p>We start with a physical system parametrized by generalized (position) coordinates <span class="math-container">$(q^i)$</span> providing under given restrictions the configuration space <span class="math-container">$Q$</span> or more precisely a (smooth) <strong><em>manifold</em></strong>. </p> <p>The <strong><em>tangent bundle</em></strong> <span class="math-container">$TQ$</span> over <span class="math-container">$Q$</span> provides for the fixed coordinates <span class="math-container">$q^i$</span> the corresponding velocities <span class="math-container">$\dot q ^j$</span>. Geometrically the velocities <span class="math-container">$\dot q ^j$</span> at <span class="math-container">$q^i$</span> belong to the tangent space <span class="math-container">$TQ_{q_0}$</span> at fixed point <span class="math-container">$q_0^i$</span> of <span class="math-container">$Q$</span>.</p> <p>So <span class="math-container">$q^i$</span> and <span class="math-container">$\dot q ^j$</span> provide parameters for the Lagrangian <span class="math-container">$L[q(t), \dot q(t)]$</span>, a function on <span class="math-container">$TQ$</span>.</p> <p>On the other hand it's known that the Hamiltionian <span class="math-container">$H[q(t), p(t)]$</span> can be interpreted as a function on the <strong><em>cotangent bundle</em></strong> <span class="math-container">$T^*Q$</span> where for fixed <span class="math-container">$q_0^i \in Q$</span> the momenta <span class="math-container">$(p_0)_j$</span> are living in cotangent space <span class="math-container">$T^*Q_{q_0}$</span>.</p> <p>My question is why (mathematically) the phase space spanned by position <span class="math-container">$q^i$</span> and momentum coordinates <span class="math-container">$p_j$</span> come from the <strong><em>cotangent bundle</em></strong> <span class="math-container">$T^*Q$</span> while the position <span class="math-container">$q^i$</span> and velocity coordinates <span class="math-container">$\dot q_j$</span> come from tangent bundle ?</p> <p>Or in other words why the cotangent space <span class="math-container">$T^*Q_{q}$</span> corresponds to momenta while the tangent space <span class="math-container">$TQ_{q}$</span> to velocities from viewpoint of differential geometry?</p> <p>Remark: I know that elemenary physical approach always associates the velocity to the tangent space of the position but this doesn't answer concretely why the momenta spaces should belong exactly to the cotangents. </p> <p>Intuitively I guess that the velocities and momenta should behave differently under transformations in sense of co- and contravariant coordinates but I'm not sure if this is the real reason for the problem above...</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
All snuggled up in a blanket.
0non-cybersec
Reddit
My Jewish grandmother in 1936 at the Berlin Zoo..
0non-cybersec
Reddit
Installing proprietary nvidia drivers while installing Ubuntu?. <p>I've got a GeForce 6150 that unfortunately suffers bad corruption problems under the open source nVidia drivers in Linux. So bad sometimes I cannot see anything on screen.</p> <p>Is there any way to install the proprietary nVidia drivers WHILE installing Ubuntu so that I can simply fully bypass the open source drivers?</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
Best friends forever.
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
Making a script interact with another program. <p>Let's say I have this program <code>math</code> that generates and prints a random math question and than waits for an input.</p> <p>How would I create a script to receive the input, process it, and then print it back to the original program?</p> <p>I've tried to do something like this <code>./math | script.sh | ./math</code> but the second program generates a different problem, so it doesn't work.</p>
0non-cybersec
Stackexchange
The package linux-headers-4.13.0-37 needs to be reinstalled, but I can&#39;t find an archive for it. <p>I would like to ask one solution regarding update and upgrade process. I am using Ubuntu 16.04 LTS xenial version. I found one problem statement:</p> <blockquote> <p>E:The package linux-headers-4.13.0-37 needs to be reinstalled, but I can't find an archive for it.</p> </blockquote> <p>when I try to update. I am not able to open my synaptic. Please suggest me to get rid of the problem.</p>
0non-cybersec
Stackexchange
Google search via AppleScript. <p>I would like to make a Google search with an AppleScript. The code looks like this:</p> <pre><code>set search to text returned of (display dialog "Google Search" buttons {"OK"} default answer {""}) open location ("https://www.google.de/#q=" &amp; search) </code></pre> <p>The problem is, how can I change the spaces to a <code>+</code>?</p>
0non-cybersec
Stackexchange
WCG changes rules..
0non-cybersec
Reddit
How often do you encounter men that get easily ofended?. Idk why, but this friend of mine gets so easily ofended. I don´t think he necessasrily gets things personally, and he cleraly forgets fast, but he clearly gets butt hurt when you´re mildly direct with him, and he makes sure you know it... This isn´t common in my family (Mainly men). We treat each other with respect, but I guess, part of respecting others is sometimes being direct, and even a little rude if the situation warrants it. I am not even direct with people (which is something I try to work on) I am too agreeable, but it doesn´t help when others (specially close friends) get easily offended. Don´t get me wrong, it´s harsh when people are honest, but it´s no reason to get offended. EDIT: I Don´t mean necessarily in politics, I mean on small stuff, like day to day interactions you have with people that don´t necessarily revolve around politics, although if you want to share your political experiences that´s fine too!
0non-cybersec
Reddit
[WP] Everyone's flaws are listed in a translucent white box above their heads. One day, you meet a man whose 'box' is empty..
0non-cybersec
Reddit
Show that for all vector, directional derivative is zero. <p>Consider the following function: <span class="math-container">$ f(x,y) = \begin{cases} 1 &amp; \text{if $y=x^2$, $x \neq 0$} \\ 0 &amp; \text{otherwise} \end{cases} $</span></p> <p>Show that for any vector <span class="math-container">$ v \neq 0$</span>, <span class="math-container">$D_vf(0,0)$</span>, the directional derivative, is <span class="math-container">$0$</span>.</p> <p>So I mark <span class="math-container">$ v = [v_1, v_2]$</span>. By definition:</p> <p><span class="math-container">$D_vf(0,0) = \lim\limits_{t \to 0} \frac{f((0,0) + tv) - f(0,0)}{t} = \lim\limits_{t \to 0} \frac{f(tv_1, tv_2)}{t}$</span></p> <p>since t goes to 0, and the vector is not the zero vector, I can assume <span class="math-container">$ x = tv_1 \neq 0 $</span>, which means the limit <span class="math-container">$ \frac{1}{t} $</span> as <span class="math-container">$t \to 0$</span> does not exist , and I get stuck.</p> <p>How to solve this?</p>
0non-cybersec
Stackexchange
Locked out of my server. <p>I recently got my server and I did a major noob mistake. I forgot to allow my modified ssh port on ufw. Now I can't ssh into it. It's a remote dedicated server. So that means I have to ask the host to allow it? </p>
0non-cybersec
Stackexchange
Mauviel 250c vs E.Dehillerin "extra thick". I've been buying Mauviel 250c pots & pans one by one over the years & recently was looking into getting a 3.2qt sauté pan. They seem few & far between as far as availability goes and also the price has increased a bunch since last time i checked. Anyone know if Mauviel has just discontinued this line altogether (250c)? Are pans directly from E.Dehillerin basically the same? (i read here & there that Mauviel makes them, not sure if thats actually the case though).
0non-cybersec
Reddit
Google AdSense | ZEFIR.
1cybersec
Reddit
Solve $3^x \equiv 43 \pmod {97}$ using Pohlig-Hellman. <p><strong>Problem</strong>: Solve $3^x \equiv 43 \pmod 97$ using Pohlig-Hellman.</p> <p>Here is my solution, but the problem is that I don't get it right at the end.</p> <p>First of all, I calculate $\phi(97) = 96 = 2^5 \cdot 3$.</p> <p>Now, let $x=a_0 + 2^5a_1=a_0+32a_1$. Then $$ {3^{(a_0+32a_1)}}^3 \equiv 43^3 \pmod{97}$$ $$27^{a_0} \equiv 64 \pmod {97}.$$</p> <p>Trial and error yields $a_0 = 6$. So now we have $x = 6 + 32a_1$, meaning $x \equiv 6 \pmod {32}$.</p> <p>Now, let $x=b_0 + 3b_1$. Then $$ {3^{(b_0 + 3b_1)}}^{32} \equiv 43^{32} \pmod{97}$$ $$35^{b_0} \equiv 35\pmod {97}.$$</p> <p>Obviously, $b_0=1$. So now we get $x = 1 + 3b_1$, meaning $x \equiv 1 \pmod {3}$.</p> <p>Using CRT, we can now solve: $$x \equiv 6 \pmod {32}$$ $$x \equiv 1 \pmod {3}.$$</p> <p>Solving the first equivalence:</p> <p>$$3x_1 \equiv 6 \pmod {32}.$$</p> <p>The multiplicative inverse of $3$ modulo $32$ is $11$.</p> <p>$$11 \cdot 3x_1 \equiv 11 \cdot 6 \pmod {32}$$ $$x_1 \equiv 11 \cdot 6 \equiv 2 \pmod {32}.$$</p> <p>Now for the second one:</p> <p>$$32x_2 \equiv 1 \pmod {3}$$ $$2x_2 \equiv 1 \pmod {3}$$ $$x_2 \equiv 2 \pmod 3.$$</p> <p>And at last:</p> <p>$$x_0 = 3 \cdot 2 + 32 \cdot 2 = 70 \equiv 70 \pmod {96}.$$</p> <p>Now $3^{70} \pmod {97}$ is not $43$, and I cannot find where is my error. But, if I got $a_0=22$, then I would get $x_1 \equiv 18 \pmod {32}$ and $x_0 \equiv 22 \pmod {96}$, and that would be correct answer.</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
Persistent vs non-Persistent - Which should I use?. <p>My site has always used persistent connections, based on my understanding of them there's no reason not to. Why close the connection when it can be reused? I have a site that in total accesses about 7 databases. It's not a huge traffic site, but it's big enough. What's your take on persistent, should I use them?</p>
0non-cybersec
Stackexchange
PDF reader feature (notes). <p>So when I read papers in hard copy, I like to be able to mark the line that I am reading currently using a notecard, which covers up things below the line that I am reading. This keeps me from being distracted. Is there a PDF reader that has a feature like this? I realize that most of the time I <em>could</em> just use the bottom of the screen, but I was just wondering if there is a purpose built tool for this. I use Mac OS X, by the way.</p>
0non-cybersec
Stackexchange
hate when that happens.
0non-cybersec
Reddit
Would these go well together?. http://www.moss.co.uk/images/extraextralarge/965655117_01.jpg?lg-inline http://www.moss.co.uk/images/extraextralarge/965724309_01.jpg?lg-inline Reason being, I've already bought the trousers, however I don't want to buy a generic suit blazer with it as I already have a suit and I need something to go with this trouser, if you don't think the blazer/jacket goes well with the trouser, could you recommend something that does? Thanks
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
So many people say that wow is dying, but what they really mean is that its dead for them. So many people quit this game and say they are never coming back. Without even thinking about it they say that the game is dead. I'm one of those people that has said this in the past. I never really thought too much into what I meant about it but it just felt dead. So I started to think about it. What does it mean when people say this game is dying or dead? It's the excitement. When you have played a game for 10 years straight, and a vast majority of the game is comprised of things that you have already done for years and years on end, when you've done just about everything that there is to do and you've done it to death, it's just not new and exciting anymore. Of course wow is not dying. New people come to the game all the time. But for these new people, the game is new, fresh, and exciting. For us old timers, we've been doing this for a really long time. So it's not new and exciting to us. But we can go play some other MMO that isn't as a successful like ESO and all of a sudden it feels like it's vibrant and teeming and filled with life. When you say that it game is dead or dying and compare it to another game, it's an abstraction. Because you really have no idea how many people actually play either game. Sure there are some areas where the game will be dead. Not a lot of people running around in red Ridge Mountains these days. But how many people can you actually see in one day in WoW? Like 100? 200? So what if there is 10 million people or five million or 1 million or 300,000 people playing this game? It's not like you're going to notice the difference either way. At most you're only going to see a couple hundred people per day all across the world. It's not like we can see all 10 million people that play the game in one place to see how truly big it is like we would if we were in New York City and so how truly populous the city was. But games like Elder Scrolls feel so populated because they are new to us and again, you'll see the exact same amount of people there because of phasing. You'll see at a maximum 300 people all throughout. Maybe more because they have mega shards. But people that say this game is dying are wrong. We have just played it to death, and sometimes, it feels like we have worn it out
0non-cybersec
Reddit