text
stringlengths
36
35k
label
class label
2 classes
source
stringclasses
3 values
tokens_length
int64
128
4.1k
text_length
int64
36
35k
KVM: how do I add host route when VM starts?. <p>Is there a way to automatically add a host route (pointing to the VM IP) when VM starts ? ATM I'm doing this by hand. I've also tried to add a route via <code>/etc/sysconfig/network-scripts/route-virbr0</code> file, but it doesn't work, probably due to the fact that I don't have the appropriate <code>ifcfg-virbr0</code> file.</p> <p>Adding just a static route pointing to the VM doesn't work for obvious reason - there's no appropriate network interface (<code>virbr0</code>) when the host enters the multiuser mode, so route addition just fails.</p>
0non-cybersec
Stackexchange
168
603
How to store multiple foreign key values in a single field?. <p>I have following two tables in an <strong>MS SQL-Server</strong> Database:</p> <pre><code>user_info ( user_id PRIMARY KEY, email, password ) </code></pre> <p>and </p> <pre><code>messages ( time_stamp, message, sender, recipients, FOREIGN KEY(sender) REFERENCES user_info (user_id), FOREIGN KEY(recipients) REFERENCES user_info (user_id) ) </code></pre> <p>I am wondering if it is possible to store multiple <code>user_id</code> values in the recipients field of <code>messages</code> table. I am a newbie, please help me how to solve this problem.</p>
0non-cybersec
Stackexchange
225
679
If $xR=I$ we can say that $x\in I$?. <p>Probably this is a dumb question, I lack knowledge on abstract algebra. Suppose that <span class="math-container">$R$</span> is a ring without unity and <span class="math-container">$I\subset R$</span> is a non-trivial ideal.</p> <p>If <span class="math-container">$xR=Rx=I$</span> for some <span class="math-container">$x\in R$</span>, we can says that <span class="math-container">$x\in I$</span>? If not, there is some other conditions that ensures that <span class="math-container">$x\in I$</span>?</p>
0non-cybersec
Stackexchange
184
548
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
restart program when it crashes / closes by self. <p>Hi i am wanting to restart a program which i need to have it run 24/7 the app is minergate.</p> <p>The issue I am having is that the app / program feezes and shuts down - this is a known issue with the 8.1 version.</p> <p>However until 8.2 comes out I have no other option but to bite my lips and bear it. I am wondering is there away to listen for the program, and if it crashes to restart the app and continue the ETH mining?</p>
0non-cybersec
Stackexchange
136
487
AddEntityFrameworkStores can only be called with a role that derives from IdentityRole in .NET Core 2.0. <p>I have changed a project from the .NET Core 1.1 to 2.0 version, but I'm getting an error from the Identity, when It tries to add the stores:</p> <pre><code>services.AddIdentity&lt;ApplicationUser, IdentityRole&lt;long&gt;&gt;() .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;() .AddDefaultTokenProviders(); </code></pre> <p>The thrown error is:</p> <blockquote> <p>AddEntityFrameworkStores can only be called with a role that derives from IdentityRole</p> </blockquote> <p>These are my classes:</p> <pre><code>public class ApplicationUser : IdentityUser&lt;long&gt; { } public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser, IdentityRole&lt;long&gt;, long&gt; { public ApplicationDbContext(DbContextOptions options) : base(options) { } } </code></pre> <p>Someone could help me?</p>
0non-cybersec
Stackexchange
292
951
TOR routing when using an open TOR proxy. <p>My question is about how TOR handles routing of traffic. Here's the situation: User has laptop1 and server1 on a LAN. The server runs a hidden service (say a webserver) sharing over TOR only, i.e. open to localhost only, at xxyyzzaabbcc.onion. The server allows TOR proxy connections from the LAN. </p> <p>If the user points configures his laptop to use server1:9050 as a proxy and navigates to xxyyzzaabbcc.onion, does the local TOR instance on server 1 recognize that traffic as local and simply forward the request to localhost, or does the traffic first go out over the TOR network, then back to server1's localhost to get to the webserver?</p> <p>Put another way, if someone on the LAN uses server1's proxy to access that proxy's hidden service, does the traffic stay local?</p>
0non-cybersec
Stackexchange
222
832
If Niantic added new Pokestops as much as they are removing currently existing ones, that would be great.. Pokemon GO just got released in my country today, so I decided to wander around the neighborhood today. I've played Ingress beforehand to get a better grasp of the concept of an augmented reality game, so I already knew which spots would be Pokemon infested and which spots would be Pokestops/Gyms. In my neighborhood, there's currently one Gym (currently inhabited by a Pinsir) and 3 - 4 Pokestops. Overall, it's good enough for me, the only problem being that the Pokestops are a tad bit too far for me to casually walk to regularly. There's a town hall and a basketball court nearby which would make excellent Pokestops, but for some reason, they aren't. I'm not sure how I would go about reporting these locations as potential stops, since I faintly recall being able to do the same in Ingress. Anyway, recently, there's been news of Pokestops being removed for no apparent reason in certain places (such as [public libraries](https://www.reddit.com/r/pokemongo/comments/4we4su/removal_of_pokestops_is_becoming_pretty_ridiculous/). The most unusual cases are when the authorities of the locations had absolutely no problems with the game, and in some cases even welcome the flooding attention. The most reasonable explanation would be some people decided to report these Pokestops as being "problematic" (even though there is no apparent issue in the first place). This got me thinking; if it's this easy to remove a stop, then shouldn't it be as easy to add a new one? I know Niantic kinda has their hands full at the moment, but in the future, they should allow us to give suggestions for new Gyms or Pokestops. If that's too easy, then they should allow us to vote for them as well so that we don't see random Pokestops being placed in random places.
0non-cybersec
Reddit
440
1,867
Generators of $PSL(3,2)$. <p>Is it true that a set of generators for $PSL(3,2)\simeq SL(3,2)$ is: $$\alpha=\left(\begin{array}{ccccccc} 0&amp;0&amp;1\\ 0&amp;1&amp;0\\ 1&amp;0&amp;0\\ \end{array}\right),$$ $$\beta=\left(\begin{array}{ccccccc} 1&amp;0&amp;0\\ 0&amp;0&amp;1\\ 0&amp;1&amp;0\\ \end{array}\right),$$</p> <p>$$\gamma=\left(\begin{array}{ccccccc} 1&amp;0&amp;0\\ 0&amp;1&amp;0\\ 0&amp;1&amp;1\\ \end{array}\right)?$$ How can I check/prove this fact? Thanks!</p>
0non-cybersec
Stackexchange
228
474
Problems on Ubuntu Budgie 17.04 with Ryzen CPU and Gigabyte Motherboard. <p>In order to fix the issues (as described by another user on <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1671360" rel="nofollow noreferrer">Launchpad</a> with the Gigabyte AM4 Motherboard, I installed a modified 4.10.3 kernel with CONFIG_PINCTRL_AMD disabled. I downloaded it from <a href="http://www.nextized.net/repo/linux/ubuntu-linux-4.10.3_ryzen01_amd64_generic.tar.gz" rel="nofollow noreferrer">here.</a> After booting with this kernel, everything worked fine. But now the system frequently crashes and there are a few weird things in /var/log/syslog:</p> <p>1.</p> <pre><code>May 1 13:37:55 Ava gnome-software-service.desktop[3074]: 11:37:55:0582 GLib g_strv_length: assertion 'str_array != NULL' failed </code></pre> <p>These messages appeared very often, but they could be entirely due to Budgie (version 10.3.1) and its integration with gnome programs being buggy.</p> <p>2.</p> <pre><code>May 1 13:41:28 Ava budgie-panel.desktop[2987]: process 3387: arguments to dbus_connection_unref() were incorrect, assertion "connection-&gt;generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794. May 1 13:41:28 Ava budgie-panel.desktop[2987]: This is normally a bug in some application using the D-Bus library. </code></pre> <p>This line, with different ../../dbus/dbus-connection.c lines, makes up more than half of the syslog.</p> <ol start="3"> <li><p>On startup, this line, with different addresses, appears hundreds of times:</p> <pre><code>May 1 17:07:59 Ava kernel: [ 1.069692] AMD-Vi: Event logged [ May 1 17:07:59 Ava kernel: [ 1.069693] IO_PAGE_FAULT device=09:00.0 domain=0x0003 address=0x000000f4007def00 flags=0x0010] </code></pre></li> </ol> <p>At the end of this block of messages is says:</p> <pre><code>May 1 17:07:59 Ava kernel: [ 1.111308] [AVFS] Something is broken. See log! </code></pre> <p>I have a RX 480 and I had previously tried to install the AMDGPU-PRO driver, which didn't work, so I removed it with <code>amdgpu-pro-uninstall</code>.</p> <p>Booting with the modified 4.11-rc8 kernel from the Launchpad Bug thread (linked above) results in the same IO_PAGE_FAULTS as above, although I have not encountered any of the other issues yet.</p> <p>I will try the new modified 4.11.0 kernel from Launchpad.</p>
0non-cybersec
Stackexchange
794
2,397
Levelplot color key - range and extremes. <p>Is it possible in R to create a color key like the one below? (this one comes from the software Grid Analysis and Display System - Grads). </p> <p><a href="https://i.stack.imgur.com/NoqbH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NoqbH.jpg" alt="enter image description here"></a></p> <p>There are two features that I can't reproduce in R:</p> <ol> <li>The sequence is non linear however it is displayed as if</li> <li>Values bigger than 200 are grey / Values smaller than 0 are white</li> </ol> <p>I'm using levelplot from rastervis that plots rasters using the lattice levelplot:</p> <pre><code>require(raster) require(rasterVis) set.seed(200) X = seq(-40,0,by=1) Y = seq(-60,-40,by=1) grid = expand.grid(list(X=X,Y=Y)) Z = rnorm(nrow(grid),mean=10,sd=100) data = data.frame(grid,Z) r = rasterFromXYZ(data) mapTheme &lt;- rasterTheme(region=c('#EEF7FA','#D6F8F7',"#BEDAFF",'#5DA4FF',"#0000FF","#D4F9E2","#00FF7F","#008000","#FFFF00","#FFD27F", "#FFB732" ,"#EE7600", "#D53E4F","#FF6A6A")) my.at = c(0,1,5,10,15,20,25,30,40,50,75,100,150,200) myColorkey &lt;- list(at=my.at, space="bottom", labels=list(at=my.at)) p=levelplot(r, par.settings=mapTheme,at = my.at, colorkey=myColorkey,margin=F) print(p) </code></pre> <p>The result:</p> <p><a href="https://i.stack.imgur.com/Z4KPw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z4KPw.png" alt="enter image description here"></a></p> <p>As you can see, both values smaller than 0 and bigger than 200 are white, I've no idea how to set values bigger than or smaller than a certain value to appear as a specific color. Morover, how can I make the space between consecutive thick marks in the color key to have the same size although the intervals are not the same?</p>
0non-cybersec
Stackexchange
693
1,892
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Publicly Accessible TSPLib95 Solutions. <p>I have asked <a href="https://math.stackexchange.com/questions/2602183/where-are-the-optimal-tours-of-tsplib-95-instances">this question on MSE</a>, but besides earning a TumbleWeed award, there was no feedback. </p> <p>My question is, where I can download <em>all</em> optimal tours of the TSPLib95 library? I already did a lot of googling and found that the original resource of the <a href="https://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/" rel="nofollow noreferrer">University of Heidelberg</a> hasn't been upated since 2008 and has not all optimal tours available. Also the distance calculations of the X-ray problems are hard to understand/find online. </p> <p>I would be a bit surprised if <em>the</em> standard collection of TSP problems were not maintained and available anymore; I am currently checking new heuristics for the TSP problem and would like to be able to provide results that are based on a collection of standard instances. </p> <p>Any help would be greatly appreciated.</p>
0non-cybersec
Stackexchange
302
1,065
how to access display of a pre-owned server?. <p>hey guys i purchased this server at an auction and i'm using it for my own home server for web development. It came without a cable for the back so i bought one off amazon (VGA CABLE) It's a server from 2007, the Dell Poweredge 2950 and it's still got some power in it. Depending on how these next few weeks go i'll install a remote access card in the back (far left, first picture is where the port goes). that keyhole is locked, inside is accessible.<a href="https://imgur.com/a/6fxPY3L" rel="nofollow noreferrer">two picutres, front and back of the server</a></p> <p>Now when i hooked it up to my monitor with the VGA cable the screen was fully black but it looks like it's on but black screen. i googled around and someone wrote that if the screen is black it could be access with with pressing the ESC key, that hasn't worked. my screen when on VGA <a href="https://imgur.com/JcGkyvk" rel="nofollow noreferrer">https://imgur.com/JcGkyvk</a></p> <p>Is there a way to format this servers without display, what options do i have accessing this>? Command line access?</p>
0non-cybersec
Stackexchange
313
1,125
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Eigenvalues of a $20 \times 20$ symmetric matrix. <p>$$\left[\begin{smallmatrix} 19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;17&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;16&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;0&amp;1&amp;0&amp;11&amp;0&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;17&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;16&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;15&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;16&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;17&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;0&amp;11&amp;0&amp;1&amp;0&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;16&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;17&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19 \end{smallmatrix}\right] $$</p> <p>Using a software, I found that $18$ is an eigenvalue of this matrix, with multiplicity $9$. I need to prove it mathematically. Since the matrix is real and symmetric, I thought of finding the nullity of $A-18I$ but that's tough to compute. Is there any other way to prove it ?</p>
0non-cybersec
Stackexchange
1,695
2,776
Should rxjs subjects be public in the class?. <p>Let's say I have two classes, where you can observe over some observables.</p> <p>First example, with public subject:</p> <pre><code>class EventsPub { public readonly onEnd = new Subject&lt;void&gt;(); } </code></pre> <p>Second example, with private subject and registering method:</p> <pre><code>class EventsPriv { private readonly endEvent = new Subject&lt;void&gt;(); public onEnd(cb: () =&gt; void): Subscription { return this.endEvent.subscribe(cb); } } </code></pre> <p>The first example is somehow unsafe because anyone can call <code>eventsPub.endEvent.next()</code> from outside the class and introduce side effects, however, comparing to example 2 It allows for pipes, which is a big plus since developers can for ex. register only for the first event with <code>eventsPub.onEnd.pipe(first()).subscribe(cb)</code>.</p> <p>The second example also allows for one-time subscription but requires more code and ugly unsubscribing.</p> <pre><code>const subscription = eventsPriv.onEnd(() =&gt; { // logic.. subscription.unsubscribe() }); </code></pre> <p>From your point of view, which is the best way to go? Or maybe there is a better solution?</p>
0non-cybersec
Stackexchange
356
1,239
First-principles benchmark of CFD solver. <p>A decade ago I saw a ~20 coupled state + random number problem that was used as a benchmark for meteorological CFD tools. It had a fractal dimension (of the chaotic attractor) around 2.3, I think. I saw matlab code for it.</p> <p>I'm looking for the method now, and can't remember what it was called. To be clear it was entirely synthetic. It was not flow in 2d or 3d. It wasn't a cylinder, cavity, or other plausible mechanical system. It was something like 20 nonlinear coupled states, and a random number generator.</p> <p>Can you help me find this method? It would be able to differentiate between ensemble Kalman filter or 4dvar in terms of performance, I think.</p>
0non-cybersec
Stackexchange
191
726
Macdonald&#39;s &quot;Symmetric Functions and Hall Polynomials&quot; Section 1.5 Example 9. <p>I'm trying to follow Example 9 in Section 1.5 of the 2nd edition of Macdonald's book "Symmetric Functions and Hall Polynomials". I have trouble with understanding some points.</p> <p>Before stating my question, I will first explain the example briefly. If <span class="math-container">$R$</span> is a root system, then the Weyl denominator formula for <span class="math-container">$R$</span> is <span class="math-container">$$\sum_{w\in W}\varepsilon(w)e^{w\rho}=\prod_{\alpha\in R^{+}}(e^{\alpha/2}-e^{-\alpha/2}),$$</span> where <span class="math-container">$W$</span> is the Weyl group of <span class="math-container">$R$</span>, <span class="math-container">$R^{+}$</span> is the set of positive roots (relative to some base), <span class="math-container">$\rho$</span> is the half-sum of the positive roots and <span class="math-container">$\varepsilon(w)$</span> is the sign of <span class="math-container">$w\in W$</span>. The goal of the example is to express the products <span class="math-container">$$\prod_{i&lt;j} (1-x_{i}x_{j}),\quad\prod_{i}(1-x_{i})\prod_{i&lt;j}(1-x_{i}x_{j}),\quad\prod_{i}(1-x_{i}^{2})\prod_{i&lt;j}(1-x_{i}x_{j})$$</span> as linear combinations of Schur functions using the Weyl denominator formula for root systems of types <span class="math-container">$D_{n}, B_{n}, C_{n}$</span>, respectively. More precisely, <span class="math-container">\begin{align*} \prod_{i&lt;j}(1-x_{i}x_{j})&amp;=\sum_{\pi}(-1)^{|\pi|/2}s_{\pi}(x_{1},\ldots,x_{n})\\ \prod_{i}(1-x_{i}^{2})\prod_{i&lt;j}(1-x_{i}x_{j})&amp;=\sum_{\mu}(-1)^{|\mu|/2}s_{\mu}(x_{1},\ldots,x_{n})\\ \prod_{i}(1-x_{i})\prod_{i&lt;j}(1-x_{i}x_{j})&amp;=\sum_{\nu}(-1)^{(|\nu|+p(\nu))/2}s_{\nu}(x_{1},\ldots,x_{n}), \end{align*}</span> where the first sum ranges over all partitions <span class="math-container">$\pi=(\alpha_{1}-1,\ldots,\alpha_{p}-1\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span>, the second sum ranges over all partitions <span class="math-container">$\mu=(\alpha_{1}+1,\ldots,\alpha_{p}+1\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span>, the third sum ranges over all self-conjugate partitions <span class="math-container">$\nu=(\alpha_{1},\ldots,\alpha_{p}\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span> and <span class="math-container">$p(\nu)=p$</span>.</p> <p>Now I'm ready to state my question. Here I will just consider the first product. Let <span class="math-container">$\epsilon_{1},\ldots,\epsilon_{n}$</span> be the standard basis for <span class="math-container">$\mathbb{R}^{n}$</span>. The root system <span class="math-container">$R=D_{n}$</span> is given by <span class="math-container">$$\{\pm(\epsilon_{i}\pm\epsilon_{j}):i\neq j\},$$</span> and the subset <span class="math-container">$$\Delta=\{\epsilon_{1}-\epsilon_{2},\epsilon_{2}-\epsilon_{3},\ldots,\epsilon_{n-1}-\epsilon_{n},\epsilon_{n-1}+\epsilon_{n}\}$$</span> is a base. Then <span class="math-container">\begin{align*} R^{+}&amp;=\{\epsilon_{i}\pm\epsilon_{j}:1\leq i&lt;j\leq n\},\\ \rho&amp;=(n-1)\epsilon_{1}+(n-2)\epsilon_{2}+\cdots+\epsilon_{n-1}. \end{align*}</span> On the other hand, the reflection <span class="math-container">$\sigma_{\epsilon_{i}-\epsilon_{i+1}}$</span> in the orthogonal complement of <span class="math-container">$\epsilon_{i}-\epsilon_{i+1}$</span> switches <span class="math-container">$\epsilon_{i}$</span> with <span class="math-container">$\epsilon_{i+1}$</span>, and <span class="math-container">$\sigma_{\epsilon_{i}+\epsilon_{i+1}}$</span> switches <span class="math-container">$\epsilon_{i}$</span> to <span class="math-container">$-\epsilon_{j}$</span> and <span class="math-container">$\epsilon_{j}$</span> to <span class="math-container">$-\epsilon_{i}$</span>. Thus the Weyl group <span class="math-container">$W$</span> can be identified with the group of all elements that permute <span class="math-container">$n$</span> elements as well as switching an even number of their signs, hence isomorphic to <span class="math-container">$S_{n}\ltimes\mathbb{Z}_{2}^{n-1}$</span>. If we replace <span class="math-container">$e^{-\epsilon_{i}}$</span> by <span class="math-container">$x_{i}$</span>, the right-hand side of the denominator formula becomes: <span class="math-container">\begin{align*} \prod_{\alpha\in R^{+}}(e^{\alpha/2}-e^{-\alpha/2})&amp;=e^{\rho}\prod_{\alpha\in R^{+}}(1-e^{-\alpha})\\ &amp;=x_{1}^{-(n-1)}x_{2}^{-(n-2)}\cdots x_{n-1}^{-1}\prod_{i&lt;j}(1-x_{i}x_{j})\left(1-\frac{x_{i}}{x_{j}}\right)\\ &amp;=(x_{1}\cdots x_{n})^{-(n-1)}\prod_{i&lt;j}(1-x_{i}x_{j})\left(x_{j}-x_{i}\right). \end{align*}</span> The product <span class="math-container">$\prod_{i&lt;j}(1-x_{i}x_{j})$</span> is the product we are interested in and the product <span class="math-container">$\prod_{i&lt;j}(x_{j}-x_{i})$</span> is involved in the definition of Schur function. So it remains to relate the left-hand side of the denominator formula to the partitions <span class="math-container">$\pi=(\alpha_{1}-1,\ldots,\alpha_{p}-1\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span>. But I have no idea. If someone has any idea, please let me know. Thank you for reading.</p> <p>This question was posted in Math Stack Exchange a few days ago by myself (<a href="https://math.stackexchange.com/questions/2967011/macdonalds-symmetric-functions-and-hall-polynomials-section-1-5-example-9">https://math.stackexchange.com/questions/2967011/macdonalds-symmetric-functions-and-hall-polynomials-section-1-5-example-9</a>). I didn't get an answer yet, so I repost the question here.</p>
0non-cybersec
Stackexchange
1,998
5,827
Prove that $(\mathbb{N}^\mathbb{N},d)$ is complete.. <p>Baire space $\mathbb{N}^\mathbb{N}$ is the set of sequences with natural number as entries. For example, $(n)_{n=1}^\infty \in \mathbb{N}^\mathbb{N}.$</p> <p>Equip Baire space with a metric $d$ given by $$d(f,g) = \frac{1}{2^{n+1}}$$ where $n$ is the least element of $\mathbb{N}$ such that $f(n)\neq g(n)$ for all $f,g\in\mathbb{N}^\mathbb{N}.$ If $f=g,$ then define $d(f,g)=0.$</p> <blockquote> <p><strong>Question:</strong> Prove that $(\mathbb{N}^\mathbb{N},d)$ is complete. </p> </blockquote> <p>My attempt: Let $(f_n)_{n=1}^\infty$ be a Cauchy sequence in $\mathbb{N}^\mathbb{N}.$ Fix $\varepsilon&gt;0.$ Then there exists $N\in\mathbb{N}$ such that for all $m&gt;n\geq N,$ we have $$d(f_n,f_m)&lt;\varepsilon.$$ Fix $k\in\mathbb{N}.$ Let $k$ be the smallest natural number such that $$\frac{1}{2^{k+1}}&lt;\varepsilon.$$ I stuck here. </p> <p>My intention is to construct a limit $f\in\mathbb{N}^\mathbb{N}$ by letting its $k$ entries to be the same as $f_n$ when $n$ is large. However, I fail to express it using mathematics.</p> <p>Any hint would be appreciated.</p>
0non-cybersec
Stackexchange
434
1,144
help in the Donalds B. Johnson&#39;s algorithm, i cannot understand the pseudo code (PART II). <p>i cannot understand a certain part of the paper published by Donald Johnson about finding cycles (Circuits) in a graph.</p> <p>More specific i cannot understand what is the matrix Ak which is mentioned in the following line of the pseudo code :</p> <p>Ak:=adjacency structure of strong component K with least vertex in subgraph of G induced by {s,s+1,....n};</p> <p>to make things worse some lines after is mentins " for i in Vk do " without declaring what the Vk is...</p> <p>As far i have understand we have the following: 1) in general, a strong component is a sub-graph of a graph, in which for every node of this sub-graph there is a path to any node of the sub-graph (in other words you can access any node of the sub-graph from any other node of the sub-graph)</p> <p>2) a sub-graph <b>induced </b> by a list of nodes is a graph containing all these nodes plus all the edges connecting these nodes. in paper the mathematical definition is " F is a subgraph of G induced by W if W is subset of V and F = (W,{u,y)|u,y in W and (u,y) in E)}) where u,y are edges , E is the set of all the edges in the graph, W is a set of nodes.</p> <p>3)in the code implementation the nodes are named by integer numbers 1 ... n. </p> <p>4) I <b>suspect</b> that the Vk is the set of nodes of the strong component K.</p> <p>now to the question. Lets say we have a graph G= (V,E) with V = {1,2,3,4,5,6,7,8,9} which it can be divided into 3 strong components the SC1 = {1,4,7,8} SC2= {2,3,9} SC3 = {5,6} (and their edges)</p> <p>Can anybody give me an example for s =1, s= 2, s= 5 what if going to be the Vk and Ak according to the code?</p> <p>The pseudo code is in my previous question in <a href="https://stackoverflow.com/questions/2908575/help-in-the-donalds-b-johnsons-algorithm-i-cannot-understand-the-pseudo-code">Understanding the pseudocode in the Donald B. Johnson&#39;s algorithm</a></p> <p>and the paper can be found at <a href="https://stackoverflow.com/questions/2908575/help-in-the-donalds-b-johnsons-algorithm-i-cannot-understand-the-pseudo-code">Understanding the pseudocode in the Donald B. Johnson&#39;s algorithm</a></p> <p>thank you in advance</p>
0non-cybersec
Stackexchange
732
2,276
Python is very slow to start on Windows 7. <p>Python takes 17 times longer to load on my Windows 7 machine than Ubuntu 14.04 running on a VM (inside Windows on the same hardware). Anaconda3 distribution is used on Windows and Ubuntu default python3.4.</p> <p>From a Bash prompt (Git bash on Windows):</p> <pre><code>$ time python3 -c "pass" </code></pre> <p>returns in 0.614s on Windows and 0.036s on Linux</p> <p>When packages are loaded the situation gets worse:</p> <pre><code>$ time python3 -c "import matplotlib" </code></pre> <p>returns in 6.01s on Windows and 0.189s on Linux</p> <p>Spyder takes a whopping 51s to load on Windows and 1.5s on Linux.</p> <p>I have not had any luck determining why I have this performance problems. Does anyone have any ideas what I should try next?</p> <p>edit:</p> <p><a href="https://stackoverflow.com/questions/10150881/why-is-python-so-much-slower-on-windows">Why is python so much slower on windows?</a> has been suggested as a possible duplicate but my performance different is far greater and not explained simply by different library dependencies and compilers. This seems to me to be related to filesystem differences.</p> <p>I had suspected antivirus on-access scans but disabled the antivirus just in case.</p> <pre><code>&gt;&gt;&gt; sys.path ['', 'c:\\Anaconda3\\python34.zip', 'c:\\Anaconda3\\DLLs', 'c:\\Anaconda3\\lib', 'c:\\Anaconda3', 'c:\\Anaconda3\\lib\\site-packages', 'c:\\Anaconda3\\lib\\site-packages\\Sphinx-1.2.3-py3.4.egg', 'c:\\Anaconda3\\lib\\site-packages\\cryptography-0.8-py3.4-win-amd64.egg', 'c:\\Anaconda3\\lib\\site-packages\\nose-1.3.4-py3.4.egg', 'c:\\Anaconda3\\lib\\site-packages\\win32', 'c:\\Anaconda3\\lib\\site-packages\\win32\\lib', 'c:\\Anaconda3\\lib\\site-packages\\Pythonwin', 'c:\\Anaconda3\\lib\\site-packages\\setuptools-14.3-py3.4.egg'] </code></pre> <p>Update:</p> <p>A fresh install of Windows 8.1 Pro on the same PC solved the problem. After reinstalling all applications and Anaconda3 Python performance is the best I have seen. Unfortunately the root cause of this issue is still unknown.</p> <p>Correction:</p> <p>After my IT dept installed Sophos SafeGuard encryption software and MS Endpoint Protection the problem returned. Same slow start as before. Disabling the extra software did not solve the problem so we are trying tests on other machines to trace the problem. </p>
0non-cybersec
Stackexchange
780
2,399
How to completely wipe laptop disk for a fresh Ubuntu install?. <p>I have a USB flash drive with Ubuntu 18.04 LTS, I want to completely wipe my machine of Windows 10 and start again with a new install of Ubuntu.</p> <p>I have installed Ubuntu on a laptop PC but the old Windows 10 installation is still causing me issues, and now I can't boot into Ubuntu again (after some sort of Ubuntu EFI update for Dell XPS). I may have screwed the pooch by removing some of the old filesystems via gparted, as I combined all partitions into a data partition that I mounted successfully, but after that update the restart resulted in a reboot quagmire.</p> <p>At this point, I assume it may be easiest to just completely wipe the system clean and install Ubuntu as the only OS. I would like to remove all vestiges of Windows as I do not need a dual boot. I have not found an easy way to do this, and <a href="https://www.avoiderrors.com/completely-remove-windows-10-and-install-ubuntu/" rel="nofollow noreferrer">installing Ubuntu using the option to erase all old partitions</a> didn't get me out of the woods, as I am now getting a "Dell Support Assist" screen when I boot that runs a memory check and then gets me into an all blue screen with no further progress.</p> <p>The machine is a Dell XPS 15 9570.</p> <p>Thanks in advance for any comments or suggestions.</p>
0non-cybersec
Stackexchange
346
1,363
E/SelfBrailleClient(11344): Failed to bind to service. <p>I keep getting following error in Logcat of my Android apps.</p> <pre><code>08-18 12:20:10.030: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.450: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.650: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.650: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.650: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.981: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:11.942: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:11.942: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:11.942: E/SelfBrailleClient(11344): Failed to bind to service </code></pre> <p>I seem to notice this in several of my applications.</p> <p>Thanks.</p>
0non-cybersec
Stackexchange
323
892
Prevent Windows PowerShell console from flashing up. <p>CustomApp is registered with a URI Scheme in Windows 10 so it launches when Chrome browser visits CustomApp://userid@departmentid</p> <p>Computer\HKEY_CLASSES_ROOT\CustomApp\shell\open\command</p> <pre><code>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\Program Files\CustomApp\bin\launch-customapp.ps1" -uri "%1" </code></pre> <p>Works great for launching the CustomApp but the blue Windows PowerShell console flashes up briefly during execution. How can I prevent it from popping up?</p> <p>I've tried these parameters but the console window still flashes up.</p> <pre><code>-WindowStyle Hidden -NonInteractive -NoLogo </code></pre>
0non-cybersec
Stackexchange
223
762
Is there a flash/html5 audio player that allows links to jump to a specfic time?. <p>I am looking for a web audio player to embed on my website that allows links to jump to a specific time in the audio, a la youtube.</p> <p>I am uploading lecture audio from lectures that are over an hour. I'd like to provide a way to link to specific times in the audio to jump to different topics, just like in youtube comments where users can enter 00:33 and have it turned in to a link that, when clicked, will jump to 00:33 part of the video. I can't seem to find anything that can do this.</p> <p>The site is only for myself and a few friends, FYI, so wide compatibility is not required. </p>
0non-cybersec
Stackexchange
177
685
Is storing redundant data part of the (CouchDB) self-contained data concept?. <p>The <a href="http://docs.couchdb.org/en/2.1.1/intro/why.html#a-better-fit-for-common-applications" rel="nofollow noreferrer">CouchDB concept</a> speaks about self-contained documents. In other words: ALL related data is stored in a single concept, instead of splitting them in multiple tables and reference each other using FKs. </p> <blockquote> <p>An invoice contains all the pertinent information about a single transaction the seller, the buyer, the date, and a list of the items or services sold.</p> </blockquote> <p>But this means that we end with redundant data in our database. Let's consider the invoice example: I buy 10 products over a period of time, which results in 10 invoices. Now several information are redundant, e.g. my billing address, delivery address and so on. That's at least a waste of space. </p> <p>Considering other use-cases, updating data can be very complex. If we have a blogging-cms like WordPress, every post-document contains metadata like author name/email and so on. If those information changes, we've to update a lot of documents. And we have to know the structure from all of them. E.g. the email could be used in posts, comments, log entrys and so on. </p> <p>When you think that the CouchDB allow a different form for any document, updating such information looks like a horrible tasks. I used MySQL as relational database for years and it seems much more meaningful to normalize such information, put e.g. users in a user table/collection, so that we can refer to some kind of PK. </p> <h3>What is the purpose behind those concept in CouchDB?</h3> <p>So my question is: Did I understood the concept of CouchDB properly, that they drop normalisation completely? I see the (theoretically?) benefit of having a better performance when no joins are required. Is the concept that we get a database with high throughput, but have to live with a (possible massive) amount of redundant data and we have to deal with a complex update-process when related metadata changes? </p>
0non-cybersec
Stackexchange
528
2,103
How do you shut down a stale Apollo-Client websocket connection?. <p>I have a page that is loading connected apollo-client pages as widgets inside of a main page. My GraphQL server is self-hosted. They are served up through iFrame (self-hosted), connecting back to my own server. Communications are done through a 3rd party's iFrame communications SDK. </p> <p>For some reason the widgets are not cleared out from the window when they are stale (I have no control over this). However I do have access to know when they are "stale". When they turn stale I want to disconnect / shutdown the websocket connection. The trouble is the still-connected clients are eating up my back-end's CPU. I am watching the websocket connection through chrome dev-tools. I notice every 5 seconds it sends a keep-alive request to the websocket sever. Every so often I see a stop request, and I want to figure out how to replicate that. </p> <p>Im my react apollo-connected component I tried calling these two commands, but after they are called with no errors, the keep-alive flags are still being sent to the websocket server. </p> <pre><code>this.props.client.stop() this.props.client.clearStore(); </code></pre> <p>How do I tell the apollo-client to shut itself down? </p>
0non-cybersec
Stackexchange
322
1,260
Just looking back I have a story I have to share with you all!. When I was in sixth grade, there was a beautiful girl named Ruby in my class. I didn't have many friends, but she seemed to like me and one day invited me and a few other girls over her house. At eleven years old I was a tall bony kid, covered in freckles, huge red frizz-ball of hair, snaggle-toothed and flat chested. I didn't care much for beauty. Ruby turns to one of the other girls and whispered something in her ear. "Let's give DontDieInAWildFire a make-over!" As you could imagine, I was a little apprehensive, I knew kids could be mean but part of me wanted to trust the girls, why not right? Ruby was my friend. So they decide it will be a surprise makeover, I'm not allowed to see what they put on my face or anything until they're done. I close my eyes. It must have taken a half hour, as I heard them debate eye shadows, felt brushes rub what I imagined was powder all over my face and neck, I feel them touching my lips, and smudging away things they didn't like. I keep my eyes shut. Finally, after much debate, I am given permission to look. Holy #$%*. I look beautiful, probably the most beautiful I've ever looked in my entire life! "Look how red your cheeks are" said Ruby. "Look how long your eye lashes are, how pink your lips, how smooth your skin..." I was in shock. "How? What did you do to make me look like this?" She smiled. "We didn't put a single bit of makeup on you." She showed me the q-tips, the clean brushes, the glass of water. "You're beautiful just as you are." We were eleven years old and Ruby had the knowledge to give me the greatest gift anyone has ever given me, the ability to be comfortable in my own skin. I'm 19 now and just finishing up my first year at college. I hope you all remember how beautiful you are, just as you are.
0non-cybersec
Reddit
477
1,848
Can&#39;t type the password while logging in the Non-Graphical interface (Ctrl+Alt+F3). <p>I have managed to log before, but now its different. I can type the Login normally and press enter. It asks for the password. But what I type is not displayed on the screen. I have to press enter, what moves it one line down, to start typing the password. Because of that, the password is seem as "incorrect". If I dont press enter it just wont display my password on the screen. </p> <p>PS: Even trying to type it on "invisible" wont let me in. </p> <p>PS2: I can log in the Graphical interface without a single digit problem.</p> <p>What might be causing the problem?</p>
0non-cybersec
Stackexchange
185
668
Can&#39;t stop list dividers being treated as list items. <pre><code>$(document).on("click", "li", function() {alert("A list item was clicked");} </code></pre> <p>I'm using the above code to perform an action on every list item but list dividers are also proccing this event.</p> <p>I managed to exclude my close button using </p> <pre><code>$(document).on("click", "li", function() { if (this.id !== "closeButton") { alert("A list item was clicked"); } }); </code></pre> <p>however I can't stop it from occurring on list dividers. I've tried to no avail</p> <pre><code>$(document).on("click", "li", function() { if (this.class !== "ui-li-divider") { alert("A list item was clicked"); } }); </code></pre> <p>Here's a JSFiddle with the problem: <a href="http://jsfiddle.net/2g3w5/" rel="nofollow">http://jsfiddle.net/2g3w5/</a></p>
0non-cybersec
Stackexchange
294
870
Bourne shell: trailing `-` operator in parameter substitution. <p>I'm reading a shell script for adding a progress bar to certain processes (found <a href="http://www.theiling.de/projects/bar.html" rel="nofollow noreferrer">here</a>). I'm having trouble understanding this (optional) line:</p> <pre><code>#BAR_EXT=${BAR_EXT-} </code></pre> <p>The comment says that this will add an extension to each file, and maybe I just need to read further, but I'm not familiar with that use of the - operator.</p> <p>I know about this kind of substitution, as found in the <a href="https://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion" rel="nofollow noreferrer">Bash Reference Manual</a>:</p> <pre><code>${parameter:-word} </code></pre> <p>I also know that the above will replace a null value for <code>parameter</code> with <code>word</code>, whereas <code>${parameter-word}</code> will not. (At least, I think I know that.)</p> <p>But with nothing specified after the <code>-</code> here, I'm not sure what's going on. Will this simply replace <code>parameter</code> with a null value? Generally, I would accept that as a working guess and just keep reading, but with the comment mentioning <em>adding</em> extensions to files.</p>
0non-cybersec
Stackexchange
367
1,256
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Lp gains broken?. Was playing yesterday and getting 20+ lp per win this morning won 2 and got 10-11 lp per win? Anyone know why. [https://cdn.discordapp.com/attachments/501585954100871186/694710608762896384/unknown.png](https://cdn.discordapp.com/attachments/501585954100871186/694710608762896384/unknown.png) [https://cdn.discordapp.com/attachments/501585954100871186/694702234457473074/unknown.png](https://cdn.discordapp.com/attachments/501585954100871186/694702234457473074/unknown.png) [https://oce.op.gg/summoner/userName=ShutenNG](https://oce.op.gg/summoner/userName=ShutenNG)
0non-cybersec
Reddit
222
587
Three independent events. <p>Let $A$ and $B$ be independent events and let $P(A),P(B) \in (0,1)$. Let $C$ be the event $A \cup B \setminus A \cap B$. Prove that if $A,C$ are independent and $B,C$ are independent then $P(A)=P(B)$.</p> <p>We have that $$P(A \cap B) = P(A)P(B) \\ P(A \cap C) = P(A)P(C) \\ P(B \cap C) = P(B)P(C)$$</p> <p>and I suppose that $$P(C) = P((A \cap B^c) \cup (A^c \cap B)) = P(A \cap B^c) + P(A^c \cap B)=P(A)P(B^c) + P(A^c)P(B)$$</p> <p>but I have no idea how can I solve this problem. </p>
0non-cybersec
Stackexchange
255
522
My 32/f, husband (32/m) just announced how much pussy he got in Thailand before we met to a group of our friends. UPDATE: He apologized a few times throughout the night, and again this morning. I kind of ignored it and just kept sleeping, he left to go to an appointment and was gone until this afternoon and I did not reach out. He returned home this afternoon with a big bouquet of flowers, multiple apologies and his tail between his legs. He is clearly very embarrassed and said he feels horrible, and that he drank way too much. I explained to him that it was not okay, disrespectful and can't happen again and I do feel like he took that in. Edit: He was hammered. Then when his friend pointed out it was slightly rude he turned to his engaged friend and said "see how much you have to look forward to?" I feel like this was rude AF and crossed a line. How would you all feel and what shd I do tomorrow
0non-cybersec
Reddit
217
919
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Is there an environment that imitates align but displays `textstyle` math?. <p>I'm currently typing a mathematical document which counts many <code>sum</code> symbols. I frequently use the <code>align</code> environment to render equations, although the default behaviour of this environment is to render the equations in <code>displaystyle</code>, which in my opinion wastes vertical space. I therefore have added <code>\textstyle</code> at the beginning of each line of math in this environment, but I'm looking for a more convenient solution. </p> <p><strong>So is there an environment that is similar to <code>align</code> with the exception it displays <code>textstyle</code> math by default ?</strong> Thank you.</p>
0non-cybersec
Stackexchange
167
724
Euclidean norms in quadratic fields. <p>I'm currently reading a set of lecture notes of Number Theory, and there's a small part I'm having trouble understanding. </p> <blockquote> <p>A norm $N: R \rightarrow \mathbb{N} $ is Euclidean if it satisfies: for all $a \in R, &gt;b \in R $, there exists $q, r \in R$ such that $a = qb + r$ and $N(r) &lt; N(b)$.</p> <p>Consider the norm given by $N(a + b \sqrt{D}) = |a^2 - Db^2| $</p> <p>Now, we consider the quadratic field $\mathbb{Z}[\sqrt{-1}]$: to show that this is a Euclidean norm, we must show that for all $\alpha \in \mathbb{Q}(\sqrt{-1})$ there exists $\beta \in \mathbb{Z}(\sqrt{-1}) $ with $N( \alpha - \beta ) &lt; 1 $</p> </blockquote> <p><em>My question is</em>: <strong>Why</strong> is $\alpha \in \mathbb{Q}(\sqrt{-1})$ if we are considering $\mathbb{Z}[\sqrt{-1}]?$ </p> <p>For the notes I'm using, see: <a href="http://math.uga.edu/~pete/4400quadrings.pdf" rel="nofollow">http://math.uga.edu/~pete/4400quadrings.pdf</a> page 5.</p>
0non-cybersec
Stackexchange
375
1,015
File Binary vs Text. <p> Are there some situation where I have to prefer binary file to text file? I'm using C++ as programming language? </p> <p> For example if I have to store some large text file is it better use text file or binary file? </p> <p><b> Edit </b></p> <p> The file for the moment has no requirment to be readable from human. Are some performance difference, security difference and so on? </p> <p><b> Edit </b></p> <p> Sorry for the omit other the requirment (thanks to Carey Gregory) </p> <p> <ul> <li>The record to save are in ascii encoding </li> <li>The file must be crypted ( AES ) </li> <li>The machine can power off any time. So I've to try to prevents errors.</li> <li>I've to know if the file change outside the program, I think I'll use a sha1 digest of the file. </li> </ul>
0non-cybersec
Stackexchange
253
802
Developing pages in MVC website that will be specifically used as an iframe by another website. <p>I have a website where I'm going to be partnering with another website. They want to view one specific page of mine, in their [WordPress] website. They aren't developers, so I looked into how to do this.</p> <p>At first glance, it appears as though the WordPress iFrame plugin is the easiest route. My next thought is, they'll probably still want to show their own header and footer in their page, while showing the content of my page in the iFrame. No big deal.</p> <p>I'm thinking of developing a View on my [MVC 4] website that will be used ONLY for their iFrame purposes. Since they'll probably want their own headers, I'll probably design a page that uses no layout, and just a custom header and/or footer that shows that the information is coming from MY website.</p> <p>Here are my questions: 1) The page that will be displayed contains MANY anchor tags, if that's embedded in an iFrame, what happens if the user on THEIR website clicks the link in the iFrame? Does the iFrame page change, or does their ENTIRE page change?</p> <p>2) Depending on the answer to #1, should I just disable all hyperlinks/anchor tags in the iFrame page on my site so it doesn't cause any funkyness on their site?</p> <p>3) What if I WANT some hyperlinks on the iFrame page so they come visit my website? Is that a matter of telling them to put a real link on their site to my own?</p> <p>4) What security concerns do I have with allowing a page of my own to be accessible via iFrame from another site? Should I only allow traffic to my iFrame page when it's from their site? If it's not from their site, then re-direct to my "real" page?</p> <p>Thanks all!</p>
0non-cybersec
Stackexchange
457
1,754
How to have subsubsection without new line. <p>I want to have a term and explained it like in the picture below. I tried using something like </p> <pre><code>\subsubsection*{Foo} </code></pre> <p>but without the new line.</p> <p><a href="https://i.stack.imgur.com/WhzgA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WhzgA.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
135
395
Btrfs Quotas for Hierarchy in Filesystem. <p>I want to implement a hierarchy of quotas in my filesystem. I will show you an example:</p> <pre><code>Folder A has Folder A1 and A2. A / \ A1 A2 </code></pre> <p>A should have a quota(limit) 10GB<br> A1 should have a quota(limit) 10GB<br> A2 should have a quota(limit) 5GB </p> <p>So I want that my system doesnt allow me to put more data into A1 and A2 than A can handle, for example A2=5GB and A1=6GB should not be allowed and the quotas for the lower levels should be working as well. It could also be that we only have a limit for A and for A2. So A1 can be as big as it needs to be but not bigger than A allows it.</p> <p>After hours of research my filesystem is not working how I wanted it too. If I list my subvolumes, everything is at level 5, I dont know if this is correct or not. </p> <p>Can someone show me an example how you can do this or how should I proceed.</p> <p>Best regards Eugen</p>
0non-cybersec
Stackexchange
311
965
Hard disk won&#39;t spin after minor laptop milk spill. <p>A week ago I stupidly split a small quantity of milk on my laptop's keyboard.</p> <p>I followed <a href="https://superuser.com/questions/11995">common sense</a> and now the laptop works... except the hard disk.<br> Booting a Live-CD works, but the hard disk is not shown.<br> Even if I plug the hard-disk into a hard-disk-to-USB device, it won't start spinning.</p> <p>Could milk enter the hard disk, while leaving the rest of the laptop intact?<br> Would you suggest hiring a professional to get back the content of the disk (a few months' pictures, not the end of the world) ?</p>
0non-cybersec
Stackexchange
185
644
Add page break after match of certain class on div with mpdf. <p>I am converting a report (in html)to pdf using mPDF library, but is putting all pages into one. I want to add a page break after a certain but I haven't been successful.</p> <p><strong>html</strong></p> <pre><code> &lt;div class='text my_form' style='margin:0px 0 0 0; padding:0px 0 0 0; border-style:dotted; border-color:white;'&gt; </code></pre> <p>I'm passing this to the php as $html</p> <p><strong>PHP</strong></p> <pre><code> require_once ("./libraries/MPDF57/mpdf.php"); $mpdf=new mPDF("", "Letter", "", "", 10, 10); </code></pre> <p>I want to add a page break after it finds the div shown above </p> <pre><code> preg_match_all("/((\&lt;div\s)(class='text\smy_form'[\s\w\s]*border-color:white)(.+?)(\&gt;)/", $html, $matches, PREG_SET_ORDER); foreach($matches as $value) { $html= $mpdf-&gt;AddPage(); } $mpdf-&gt;WriteHTML($html); $filename = "documentx.pdf"; $mpdf-&gt;Output($fileName, 'F'); </code></pre> <p>However, is not working, please help me go through the right track :)</p>
0non-cybersec
Stackexchange
405
1,107
Apprehensive about Ranked Play. So, I've been playing LoL since the beta on and off again. I hit 30 about a month ago after the time Ranked Play was introduced. Since I've hit 30 however, I haven't ventured into the world of ranked play yet because I'm worried about running into that "Elitist Attitude" I hear about. I know that this attitude is less prevalent in LoL than in other games like DotA and HoN, but how big of an issue is it in LoL ranked play? I do not have a problem with the odd shit-talking QQer in normal games, but is the problem any worse/better in ranked play?
0non-cybersec
Reddit
151
585
I don't know if I'm hurting myself.. My ex [18m] broke up with me [18f] 2 months ago because he didn't love me anymore and our relationship had become unhealthy for us. I tried to change his mind many times but man, unfortunately you can't get anyone to love you. We had sex, then he disappeared for another month, absolutely no contact, no texting, nothing; I started to get better mentally but I still loved him. A week ago we casually met and we talked normally for 10 minutes and then he texted me that he was glad for that little talk, so we went on talking and we ended up having sex again. The inner me is crying tears of joy but I know for sure that he isn't in love with me, he just cares about me and wants to be my friend, he even proposed to hang out as friends. I accepted but of course I ruined everything because I kept cuddling him after sex, and when I show that I'm crazy in love with him I know that a part of him feels pleased and satisfied with it. I also asked him if he was still into me and if he was interested in coming back together in the future, and he said not in the following months, but maybe in a few years. Okay, I know that this is absurd and that will never happen, and I don't care about the following years but I care about the following months because I'll probably move in another town for university. So... PLEASE, help me and I'll try to figure out if I'm doing something wrong, tell me if we share a similar situation, what I'm supposed to do?
0non-cybersec
Reddit
346
1,489
Composition of simplicial approximation is again simplicial approximation. <p>If $s:|K^m|\to |L|$ is a simplicial approximation to $f:|K^m|\to |L|$ and $t:|L^n|\to |M|$ is a simplicial approximation to $g:|L^n|\to |M|$. Is $t\circ s: |K^{m+n}|\to |M|$ necessarily a simplicial approximation to $g\circ f:|K^{m+n}|\to |M|?$</p> <p>I'm sure answer is yes. But i don't know how to prove this. This is one of the question in final exam but i didn't do. Most probably it again comes in my qualifying exam so please I seek the help. Your help will be appreciated. Thanks in Advance.</p>
0non-cybersec
Stackexchange
186
582
ODBC Driver &quot;Oracle in OraClient11g_home1&quot; required but can&#39;t seem to get it on Windows 10. <p>Not sure if this was the right StackExchange for this. My job recently upgraded their machines to Windows 10 and I thought setting them up would be a breeze, but I can't for the love of me figure out how to get the correct ODBC drivers on it. I've tried every download I could find and it isn't giving me the right driver.</p> <p><a href="https://i.stack.imgur.com/GNUxa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GNUxa.png" alt="Drivers list"></a></p> <p>Not sure where to get the drivers I need. I thought it'd be simple but I just can't find it anywhere after hours of searching. I don't know enough about database connections to know if I can just utilize one of these drivers and somehow translate the configuration from before onto them (old driver just had main entries for Data Source Name, Description, TNS Service Name, and User ID - that's all I enter to make the connection work.)</p>
0non-cybersec
Stackexchange
275
1,032
Hilbert Symbols, Norms, and p-adic roots of unity. <p>Let $p$ be an odd prime number, let $\mathbb{Q}_p$ be the field of $p$-adic numbers, and let $\overline{\mathbb{Q}_p}$ be an algebraic closure of it. For a primitive $p$-th root of unity $\zeta_p \in \overline{\mathbb{Q}_p}$, set $K = \mathbb{Q}_p(\zeta_p)$.</p> <blockquote> <p>Is it true that for every $a \in K^*$ there exists a power $q$ of $p$ such that $(a, \zeta_p)_q = 1$?</p> </blockquote> <p>Here $(,)_q$ is the $q$-th power Hilbert symbol (norm-residue symbol) in $K(\zeta_q) = \mathbb{Q}_p(\zeta_q)$.</p>
0non-cybersec
Stackexchange
224
576
My first raspberry pi program.. So i just got my first Raspberry Pi today as part of the CanaKit B+ Ultimate kit or whatever its called. I quickly got everything set up and started playing around. I quickly wired up an LED and then managed to write a script that pings the local ip address for my phone and if it responds turns the light on and if not it turns the light off and amazingly it worked. Obviously I know this is stupid simple but its exciting to make things work. Anyone have any other simple (I mean can be way more complex than what I did.) project ideas that would use things from the Canakit? I'm just excited and want to try new things. Eventually I think I want to write a program and use the raspberry pi to control a smoker I have and monitor all the temperatures etc and maybe integrate that with some sort of smartphone app. Thats obviously way down the road.
0non-cybersec
Reddit
198
884
What&#39;s the purpose of multiplying by 1024x1024?. <p>I'm working with an old C module that was originally ran on Power PC architecture and compiled with gnu 3.0.6 </p> <p>I'm porting it to run in a VS2012 project on Intel hardware. </p> <p>The module creates a 3D model of a storm cloud based on a bitmap file and other IO. </p> <p>I keep seeing signed magnitudes (x- and y-coords, -differentials) being multiplied by 1024*1024 and I don't see why. These quantities are stored in signed ints. </p> <p>Whenever one of these quantities is output from the module, it's right-shifted by 20, which apparently cancels the multiplication by 1024*1024. </p> <p>Does anyone know what's going on here? </p> <p>Thanks </p> <p>EDIT: One case is where x- and y-differentials of a line embedded in a 256x256 grid are used to iterate across it. Here we have a ray defined by some angle theta and a given starting point (x,y) within the grid. The starting point coordinates are products of 1024*1024, as well</p> <pre><code>#define KINT 1024*1024 float x_disp, y_disp; int x, y, dx, dy; //initializing code x = (int)(KINT*x_disp); y = (int)(KINT*y_disp); //as theta ranges across [-pi/2, pi/2], itheta ranges over [0, 720] dx = (int)(KINT*sin_table[itheta]); dy = (int)(KINT*cos_table[itheta]); </code></pre> <p>Come to think of it, I'm not sure why there isn't a (-1) in front of sin_table(itheta). </p> <p>The line embedded inside the 256x256 grid is traversed by computing the coordinates as follows:</p> <pre><code>for (int i = 0; i &lt; 256; i++) { int posx = (x&gt;&gt;20); int posy = (y&gt;&gt;20); if((posx|posy)&amp;0xffffff00 == 0) { char val = grid[x][y]; //do something with val } x += dx; y += dy; } </code></pre>
0non-cybersec
Stackexchange
612
1,782
Prove the norm of operator derived from orthogonal projections is less or equal to 1. <p>Suppose <span class="math-container">$H$</span> is a Hilbert space. We have two orthogonal projections <span class="math-container">$P_1: H\rightarrow A_1$</span> and <span class="math-container">$P_2: H\rightarrow A_2$</span>. Here <span class="math-container">$A_1$</span> and <span class="math-container">$A_2$</span> are two closed subspace of <span class="math-container">$H$</span>. Prove that <span class="math-container">$$ \lVert P_1 - P_2\rVert \le 1 $$</span></p> <p>Any hints may help. Thank you.</p>
0non-cybersec
Stackexchange
199
604
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Flexible Basis Functions. <p>What are the most flexible basis functions ?</p> <p>The most commonly used basis function is the polynomial function; $\begin{pmatrix} 1,x,x^2\end{pmatrix}$</p> <p>However when the function is complex it seems that we need a high order polynomial to model it accurately. This aspect greatly increases the number of parameters in our regression matrix that we need to estimate. Thus more data is needed. For instance given in linear regression if we use a polynomial of degree 6 then the expectation becomes $$f^{t}(x)\boldsymbol\beta=\beta_{1}+\beta_{2}x+\beta_{3}x^2+\beta_{4}x^3+\beta_{5}x^4+\beta_{6}x^5+\beta_{7}x^6$$</p> <p>This implies that 7 hyperparameters $\boldsymbol\beta$ need to be acquired</p> <p>What alternative basis functions require less hyper parameters and pose similar flexibility to high order polynomials</p>
0non-cybersec
Stackexchange
238
866
How to enable network with a raspberry pi emulated on qemu?. <p>I'm trying to emulate a raspberry pi on my ubuntu 13.04. I installed qemu and it works well except for the network.</p> <p>I followed <a href="http://sebpiq.github.io/rpi-workshop-instructions/index.html" rel="noreferrer">this procedure</a>. On the virtual machine, the file <code>/etc/network/interface</code> looks like this</p> <pre><code>auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.20.106 # your IP gateway 192.168.20.1 # IP of the Router netmask 255.255.255.0 # Network mask </code></pre> <p>I launch qemu like this <code>sudo qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -append "root=/dev/sda2" -hda 2013-09-25-wheezy-raspbian.img -kernel kernel-qemu -redir tcp:5022::22</code>.</p> <p>On ubuntu, when I do a <code>ifconfig</code>, I have this result :</p> <pre><code>br0 Link encap:Ethernet HWaddr 8e:0f:b1:ad:1c:18 inet adr:10.10.10.2 Bcast:10.255.255.255 Masque:255.0.0.0 adr inet6: fe80::8c0f:b1ff:fead:1c18/64 Scope:Lien UP BROADCAST MULTICAST MTU:1500 Metric:1 Packets reçus:8 erreurs:0 :8 overruns:0 frame:0 TX packets:26 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 Octets reçus:792 (792.0 B) Octets transmis:5092 (5.0 KB) eth0 Link encap:Ethernet HWaddr 90:2b:34:39:b4:1d UP BROADCAST MULTICAST MTU:1500 Metric:1 Packets reçus:0 erreurs:0 :0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B) lo Link encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 adr inet6: ::1/128 Scope:Hôte UP LOOPBACK RUNNING MTU:65536 Metric:1 Packets reçus:12770 erreurs:0 :0 overruns:0 frame:0 TX packets:12770 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 Octets reçus:2121321 (2.1 MB) Octets transmis:2121321 (2.1 MB) wlan1 Link encap:Ethernet HWaddr ac:f1:df:79:01:80 inet adr:192.168.20.106 Bcast:192.168.20.255 Masque:255.255.255.0 adr inet6: fe80::aef1:dfff:fe79:180/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Packets reçus:5283 erreurs:0 :48 overruns:0 frame:0 TX packets:5252 errors:0 dropped:5 overruns:0 carrier:0 collisions:0 lg file transmission:1000 Octets reçus:2806386 (2.8 MB) Octets transmis:1461531 (1.4 MB) </code></pre> <p>on the virtual machine, <code>ping 192.168.20.106</code> works because it is the local address but <code>ping 192.168.20.1</code> does not works. I also tried to set a different address for real and virtual machine.</p> <p>Whan can I do?</p>
0non-cybersec
Stackexchange
1,108
2,822
Finding the marginal density function limits of integration. <p>If $f(x,y) = \frac{12}{5x (2-x-y)}$ for 0 &lt; x and y &lt; 1, compute the marginal density function $f_Y(y)$</p> <p>I know that I have to integrate the joint density function with respect to x, but how I figure out the limits of integration? Also, if the bounds were 0 &lt; y &lt; x &lt; 1, what would the limits be then? </p> <p>Thanks :D </p>
0non-cybersec
Stackexchange
138
412
Solving equations by taking square roots. <p>I am confused with solving equations by taking square roots. I have a math problem below as an example of what I am confused with.</p> <p>$12x^2-154=0$</p> <p>So first I believe you are supposed to move the constant to one side so it would be </p> <p>$12x^2=154 $</p> <p>After that I believe we need to divide by $12$, however $154$ is not divisible by $12$ nor do any perfect squares fit. I am aware they both share the greatest common factor of $2$, however I am not sure what to do with that or if it is needed. I am not sure.</p>
0non-cybersec
Stackexchange
174
583
A strong relationship between $\mathrm{ad}(X)$ and $1-\mathrm{Ad}_g$ when $\mathrm{Ad}_gX=X$. <p>Let $G$ be a linear algebraic semisimple group over $\mathbb{C}$ with Lie algebra $\mathfrak{g}$, and let $(g,X)\in G\times\mathfrak{g}^{\operatorname{reg}}$ be such that $\mathrm{Ad}_gX=X$ (where $X\in\mathfrak{g}^{\operatorname{reg}}$ means that $Z_{\mathfrak{g}}(X)$ has minimal dimension).</p> <blockquote> <p><strong>Conjecture.</strong> We have $$\operatorname{im}(1-\mathrm{Ad}_g)\subseteq\operatorname{im}\mathrm{ad}(X), \quad\text{and}\quad\ker\mathrm{ad}(X)\subseteq\ker(1-\mathrm{Ad}_g).$$</p> </blockquote> <p>I already know that the second identity is true. Indeed, using the accepted answer to <a href="https://mathoverflow.net/q/253456/90299">this</a> question, $Z_G(X)$ is abelian and hence $Z_G(X)\subseteq Z_G(g)$. Passing to Lie algebras gives that $\ker\mathrm{ad}(X)\subseteq\ker(1-\mathrm{Ad}_g)$.</p> <p>I believe the first identity is also true. At least, it is true when $G=\mathrm{SL}(2,\mathbb{C})$, as I verified it by brut force. It also seems true for $G=\mathrm{SL}(n,\mathbb{C})$, as I verified the identity in many cases using a symbolic mathematical computation program. But I don't have any conceptual reason for why this happens.</p> <p>I would be interested to know if the conjecture is true, or if we can determine a subclass of the linear algebraic semisimple groups for which it holds (for all pairs $(g,X)$).</p>
0non-cybersec
Stackexchange
456
1,459
Upgrading 16 GB to a 4 GB iMac i5 2011 doesn&#39;t work with all modules loaded [SOLVED]. <p>I don't know if it is only my issue. I have a 2011 iMac i5 with 2x2GB RAM modules.</p> <p>Recently I bought 2x8GB RAM modules. If I add the 2x8GB to the default 4GB RAM, the computer doesn't start. I hear only the sound of DVD slot but the screen remains blank.<br> If I remove the 2x2GB ram modules and I use only the 2x8GB RAM modules, everything is fine and the iMac shows correctly the 16GB. I have also tried to change the order, putting the 8GB modules as first, but same problem.</p> <p>If I put 2x2GB with the 2x8GB together, iMac doesn't turn on.</p> <p>Original RAM: 2x Elpida 2 GB PC3-10600s-9-10-f1<br> Upgraded RAM: 2x Hynix 8 GB DDR3 Dream 1333mhz SO-DIMM (sold as Apple iMac 2011 compatible) </p> <p>The original RAM was mounted on top 2 slots.</p>
0non-cybersec
Stackexchange
289
862
For $\Bbb K^{n \times n}$ matrices $A$ and $B$, $\exists p[p(A)=B] \implies \exists p[p(B)=A]$?. <p>For $\Bbb K^{n \times n}$ matrices $A$ and $B$, is it true that if there exists a matrix polynomial $p$ such that $p(A)=B$, then there exists another matrix polynomial $p$ (not necessarily the same) such that $p(B) = A$?</p> <h3>My attempt</h3> <p>Let $B = \displaystyle \sum_{k=0}^{n-1} a_k A^k$, where $a_k \in \Bbb K$.</p> <p>From the <a href="https://en.wikipedia.org/wiki/Cayley%E2%80%93Hamilton_theorem" rel="nofollow noreferrer">Cayley-Hamilton theorem</a>, there exists a polynomial $p$ of degree $n$ such that $p(A) = O$, so $A^m$ where $m \ge n$ can be expressed as linear combination of $\left\{ A^k \ | \ 0 \le k &lt; n\right\}$.</p> <p>So, we can express $B^m = \displaystyle \sum_{k=0}^{n-1} a_{mk} A^k$, where $a_{mk} \in \Bbb K$.</p> <p>If $\{I, A, A^2, \cdots, A^{n-1}\}$ form a basis, then we can express a polynomial in $B$, $\displaystyle \sum_{k=0}^{n-1} b_k B^k$, as:</p> <p>$$\begin{pmatrix} a_{00} &amp; a_{10} &amp; a_{20} &amp; \cdots &amp; a_{(n-1)0} \\ a_{01} &amp; a_{11} &amp; a_{21} &amp; \cdots &amp; a_{(n-1)1} \\ a_{02} &amp; a_{12} &amp; a_{22} &amp; \cdots &amp; a_{(n-1)2} \\ \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots \\ a_{0(n-1)} &amp; a_{1(n-1)} &amp; a_{2(n-1)} &amp; \cdots &amp; a_{(n-1)(n-1)} \\ \end{pmatrix} \begin{pmatrix} b_0 \\ b_1 \\ b_2 \\ \vdots \\ b_{n-1} \end{pmatrix}$$</p> <p>Since we want the polynomial to equal $A$, we would need to solve:</p> <p>$$\begin{pmatrix} a_{00} &amp; a_{10} &amp; a_{20} &amp; \cdots &amp; a_{(n-1)0} \\ a_{01} &amp; a_{11} &amp; a_{21} &amp; \cdots &amp; a_{(n-1)1} \\ a_{02} &amp; a_{12} &amp; a_{22} &amp; \cdots &amp; a_{(n-1)2} \\ \vdots &amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots \\ a_{0(n-1)} &amp; a_{1(n-1)} &amp; a_{2(n-1)} &amp; \cdots &amp; a_{(n-1)(n-1)} \\ \end{pmatrix} \begin{pmatrix} b_0 \\ b_1 \\ b_2 \\ \vdots \\ b_{n-1} \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}$$</p> <hr> <p>Until now I have transformed the problem into a problem in linear algebra, but is utterly useless. Firstly, $\{A^k \ | \ 0 \le k &lt; n\}$ may not even be linearly independent.</p>
0non-cybersec
Stackexchange
978
2,230
Tangent to a circle. <blockquote> <p>The positive value of <span class="math-container">$\lambda$</span> for which the straight line <span class="math-container">$4x-3y+\lambda=0$</span> touches the circle <span class="math-container">$x^2+y^2-4x+6y-3=0$</span> is <span class="math-container">$4/3/5/8$</span>?</p> </blockquote> <p>My attempt: center is <span class="math-container">$(2,-3)$</span>. Radius is <span class="math-container">$\sqrt{4+9+3}=4$</span>. So, distance of the center from the tangent should be equal to radius.<span class="math-container">$$\implies \frac{8+9+\lambda}{5}=4$$</span><span class="math-container">$$\implies 17+\lambda=20$$</span><span class="math-container">$$\implies\lambda=3$$</span> I think this is correct. But when I do it with a different method, I don't get the answer. The equation of the given line can be written as <span class="math-container">$3y=4x+\lambda$</span>, or, <span class="math-container">$y=\frac43x+\frac\lambda3$</span>. And the equation of tangent to circle with slope <span class="math-container">$m$</span> is <span class="math-container">$y=mx\pm4\sqrt{1+m^2}$</span>. On comparing the two equations, I get <span class="math-container">$m=\frac43$</span>. <span class="math-container">$$\implies4\sqrt{1+(\frac43)^2}=\frac\lambda3$$</span><span class="math-container">$$\implies\lambda=20$$</span> What am I doing wrong?</p>
0non-cybersec
Stackexchange
469
1,400
Anyone heard of &#39;tank tracking&#39;?. <p>Someone I know told me about some seriously cutting edge blackhat SEO that he called 'tank tracking'. He said that it is some sort of code (he believes written in Python) that 'sits' around the outside perimeter of your visible webpage and listens for an incoming search spider. when a spider enters the page, it traps it in this weird wormhole, making it loop through, I don't know, certain keywords or something.... the result is that a SE like google would consequently give the page a full 100 rating (this person told me Google bestows some sort of scoring app once you've passed a certain number of their exams). A quick google search on 'tank tracking seo', 'tank tracking blackhat seo' and 'tank tracking google' yielded zero results.<br> Let me backtrack a bit and say that I am not interested in utilizing blackhat techniques. I'm just astonished that something like this might be out in the world. Anyone heard of this? </p> <p><strong>UPDATE</strong> I have tried googling "seo honeypot" and "search engine honeypot" and "search engine wormhole" and I cannot find anything anywhere about this. Either the hackers who are doing this stuff aren't commenting about it at all online or it just doesn't exist in the way I was told it exists. I appreciate your helpful answers. </p>
1cybersec
Stackexchange
322
1,345
Django — async_to_sync vs asyncio.run. <p>We can use both functions to run any async function synchronously:</p> <pre><code>import asyncio from asgiref.sync import async_to_sync asyncio.run(asyncio.sleep(1)) async_to_sync(asyncio.sleep)(1) </code></pre> <p>What is the difference? Can we <em>always</em> use <code>asyncio.run</code> instead of <code>async_to_sync</code>? </p>
0non-cybersec
Stackexchange
140
380
How to keep width of SELECT Element small but OPTIONs flexible. <p><strong>Problem:</strong></p> <p>My dropdown is loaded dynamically has some options that are quite long and this is messing up my page layout. I'd like the size of the <code>select</code> element to be small but when expanded, allow the user to see all the long <code>options</code>. To do this I have set the <code>width</code> of the <code>SELECT</code> to a fixed value e.g <code>width:200px;</code> </p> <p><strong>Expected/Desired Behavior (Works in Chrome)</strong></p> <p><img src="https://i.stack.imgur.com/pmS4S.jpg" alt="enter image description here"> <strong>Actual Behavior in IE8</strong></p> <p><img src="https://i.stack.imgur.com/Or9jW.jpg" alt="enter image description here"></p> <p><strong>What I have tried:</strong></p> <pre><code>select{ overflow:show; } option{ overflow:show; width:1000px; } </code></pre> <p><strong>SIMPLIFIED FIDDLE:</strong></p> <p><a href="http://jsfiddle.net/gCbhq/2/" rel="noreferrer">http://jsfiddle.net/gCbhq/2/</a></p>
0non-cybersec
Stackexchange
359
1,054
How to solve this integral that comes out to have iota and sinh-1??. <p>This is an integral which I'm unable to solve till now. </p> <p>$$\int \sqrt{ x + \frac1x}\text{d}x $$</p> <p>I thought if Wolfram|Alpha solved it I would get some idea of how to solve it, but it gave a really complicated answer for it: <a href="http://www.wolframalpha.com/input/?i=integral+(x%2B(1%2Fx))%5E0.5" rel="nofollow">http://www.wolframalpha.com/input/?i=integral+(x%2B(1%2Fx))%5E0.5</a></p> <p>Maybe a substitution so that the squareroot vanishes (i.e. a squared substitution), but that didn't help me either. Any hints on how to solve it? I'd like to try to solve it first before knowing the solution.</p> <p>Thanks!</p>
0non-cybersec
Stackexchange
254
709
outline image over entire page width. <p>I am probably not the first to ask this question but I have tried every answer I could find before asking it here. The problem is that I want an image (eps) be on the top of the page.</p> <p>I want to add a header on the top of the page starting at an inch from the top and starting at the side of the page (no margin). I have tried \noindent , raisebox &amp; makebox, outlining it to the left.... All the answers I could find. </p> <p>However, I keep getting this. I want it to be higher and starting from the left side of the paper.</p> <p><img src="https://i.stack.imgur.com/4kBTF.jpg" alt="enter image description here"></p> <p>Code:</p> <pre><code>\documentclass[11pt]{article} \usepackage{graphicx} \usepackage[a4paper]{geometry} \usepackage{epstopdf} \begin{document} \begin{titlepage} \begin{center} \raisebox{100pt}{\includegraphics[width=\paperwidth]{figures/eb.eps}} \end{center} \end{titlepage} \end{document} </code></pre> <p>Thank you in advance!</p>
0non-cybersec
Stackexchange
326
1,015
fstab parse error when adding mhddfs entry. <p>Having zero luck getting mhddfs to boot automatically. Also tried the rc.local addition to no avail. Here is my fstab. Let me know if there's anything else I can do to help figure this out.</p> <pre><code># &lt;file system&gt; &lt;mount point&gt; &lt;type&gt; &lt;options&gt; &lt;dump&gt; &lt;pass&gt; # / was on /dev/sdb2 during installation UUID=dd3d249f-6912-4979-88c0-ee02c72c1875 / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sdb1 during installation UUID=44B0-FDB4 /boot/efi vfat umask=0077 0 1 # swap was on /dev/sdb3 during installation UUID=e6b9121b-a133-4222-a547-65c3fb652d2b none swap sw 0 0 mhddfs#/media/andrew/WD60EZRZ,/media/andrew/8TB,"/media/andrew/Seagate Expansion Drive" /Storage fuse allow_other,nofail,defaults 0 0 </code></pre> <p>How can I add my <code>mhddfs</code>?</p>
0non-cybersec
Stackexchange
356
940
$x_1$ such that given sequence $(x_n)$ converges. <p>Let <span class="math-container">$(x_n)_{n \in \mathbb N}$</span> be a sequence in <span class="math-container">$\mathbb R$</span> such that <span class="math-container">$|4-x_{n+1}|&lt;q|4-x_n|^2$</span>, <span class="math-container">$\ q&gt;0$</span></p> <p>Under what circumstances for the initial value <span class="math-container">$x_1$</span> can we guarantee that <span class="math-container">$(x_n)_{n\in \mathbb N}$</span> converges?</p>
0non-cybersec
Stackexchange
181
501
What are some books you read growing up that most likely are the reason you got hooked on books?. My younger brother (13) isn't down with reading, yo. I'm trying to put together a shopping list to pique his interest. I thought I'd start with Calvin and Hobbes, throw in "Where the Red Fern Grows" somewhere in there. A little bit of "The Outsiders". Can I get a "The Boy in the Striped Pajamas". Anyways, I'd love to hear what you all read when you were growing up, why it was so great. Thanks! Thank you all for taking the time to reply. This list is getting really awesome!
0non-cybersec
Reddit
153
583
Can&#39;t Change the default python to 3.7 in ubuntu 19.10?. <p>I am not very experienced at Linux but I recently installed Ubuntu 19.10 and I am trying to use Python 3 and the default is Python 2. I spent a lot of time reading how to configure Ubuntu to run Python 3 but I felt to do it. Can anyone please help me? I used these commands but nothing works...</p> <pre class="lang-bash prettyprint-override"><code>sudo update-alternatives --list python sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 </code></pre>
0non-cybersec
Stackexchange
151
547
I've lost 47 pounds since May and was feeling pretty discouraged after not seeing any progress (stats and pics inside). That was until I looked at a picture from before my journey! For starters, I am about 6', 19 years old, and used to weigh 315 pounds. This morning before work I weighed in at 268, and was feeling pretty proud of myself so I took a selfie at work. Here are my before and after pics: http://imgur.com/a/bRQFT The before pic is in May, weeks before I started calorie counting and walking everyday. Oddly enough I was wearing the same shirt in both pictures which is actually was made me think to check the other picture and compare the two. I usually go for a 1-3 mile run/walk 2 or 3 days a week, in addition to going the gym 3 or 4 times a week for strength training. Progress could be a little faster, but I'll admit, I do slip often when it comes to staying under my calorie goal. (I'm a foodie what can I say) Just looking at the difference is astounding. If I can do it, anyone can do it. I still have quite a ways to go (final goal weight is about 180), but I'm confident that I'm on the right track. Thank you to everyone in this sub for your kind words and loads of motivation - you guys are pushing me through this!
0non-cybersec
Reddit
300
1,248
This is (maybe?) the best destiny story you will read.. Year one player here. Before this game, I had never raided in a video game. The vault of glass was the most jaw dropping experience, and this game has meant alot to me for the last two years. For those two years, I played on my girlfriend's account, which was actually her brother-in-law's xbox profile. Three months ago, he cheated on his wife, and decided to change his password. I couldn't ask him for it back, because it would be wrong for me to talk to the guy in a nasty custody battle. All of my thousands of hours in the game were lost. ToM, sleeper, all my nostalgic year one shaders. Gone forever. So I grind my way back to LL334, because I am in love with this game. In two years, I had never gone to the light house. Pickup groups for a raid are always a treat for me. I work in customer service, so squeakers and rage don't phase me. But pickup for trials with no credentials? Absolute nightmare. People asking you for money. Must have gone flawless before. Salt. Booted. I killed skolas in year one, and ran hardmode KF back when we were all 308, but I was always saving trials for something I would get to eventually, to complete my destiny experience. Today, I gave it a whirl. Rage filled kids, people asking me for money, getting booted with the second best performance. Always willing to learn, follow, and communicate. I posted "looking for chill run" and got an invite. These incredibly polite Scotsmen and I had the strangest good luck. They knew more and less than i did, and were incredibly chill and polite, just trying to have fun and enjoy the game. We racked up four wins, and then they realized my card had no boones so we went back to start a fresh cards with all boons together. That should have been my first clue.. At 7 wins we got beaten by some pros. On the ninth, a rematch. We went flawless. My personal destiny moments of triumph was complete. Only then did they reveal that they were streamers on twitch, that they had thousands of runs together and they had been secretly committed to getting my ass to Mercury, posing as casuals. They knew the opposition that held the keys to our perfect run, but they couldn't talk about adjusting their strategy to guarantee success because it would've ruined the illusion. They gave me a tour, and I was almost crying with joy. They complimented me, gave me pointers and praise for my contribution. They said the toxicity of the lfg community with regard to trials is unfortunate, and they help people like me from time to time, with a true love for the game, and that I couldnt pay them if I wanted to. The last three months of grinding back to the end game before the next dlc, so perfect, so poetic with this experience to top it all off. I am humbled and eternally grateful to these champion guardians, these truly beautiful people. I won the destiny lottery and met two destiny Santa Claus/Jesus sherpas who gave me the best video game experience I've ever had. Thank you gentlemen. Tldr: poetic justice exists, and there are some really, really good people in the world. Some of them play destiny. *minor edits for accuracy
0non-cybersec
Reddit
736
3,177
How do I setup an Endpoint URL with a Path Parameter within API Gateway?. <p>I'm trying to setup an API Gateway in front of my existing setup. Whenever I try to add an endpoint with a parameter, I get an error.</p> <pre><code>Invalid mapping expression specified: Validation Result: warnings : [], errors : [Invalid mapping expression parameter specified: method.request.querystring.type] </code></pre> <p>Here are screenshots:</p> <p><a href="https://i.stack.imgur.com/9FFFq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9FFFq.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/aN7I2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aN7I2.png" alt="enter image description here"></a></p> <p>What am I doing wrong?</p>
0non-cybersec
Stackexchange
255
799
Index sets and extensional many-one reductions. <p>Let <span class="math-container">$\varphi_0,\varphi_1,\varphi_2,\dots$</span> be an acceptable programming system. A function <span class="math-container">$f$</span> is extensional if, for all <span class="math-container">$x$</span> and <span class="math-container">$y$</span>, <span class="math-container">$\varphi_x=\varphi_y$</span> implies that <span class="math-container">$\varphi_{f(x)}=\varphi_{f(y)}$</span>. Now, let <span class="math-container">$A$</span> and <span class="math-container">$B$</span> index sets such that <span class="math-container">$A\leq_{m}B$</span> (<span class="math-container">$A$</span> is many-one reducible to <span class="math-container">$B$</span>). Is there an extensional function <span class="math-container">$f$</span> such that <span class="math-container">$f$</span> is an <span class="math-container">$m$</span>-reduction from <span class="math-container">$A$</span> to <span class="math-container">$B$</span>? </p>
0non-cybersec
Stackexchange
325
1,013
Number mhchem reactions and create a \listofreactions. <p>Is there a way to create an environment for reactions defined with mhchem that behaves similarly to equation in terms of numbering the reactions (including a \nonumber command)? Can I get a list of those reactions?</p> <pre><code>\documentclass{article} \usepackage[version=3]{mhchem} \newcounter{rxnum} \newenvironment{reaction}{ \refstepcounter{rxnum} \noindent %??? }{ %??? \par\noindent } \begin{document} \begin{reaction} \ce{X + Y -&gt; XY} \end{reaction} \begin{reaction} \ce{XX + YY -&gt; X2Y2} \\%&lt;- newline just like in equation \ce{A + B -&gt; C} \end{reaction} \end{document} </code></pre> <p>This is a two part question. The first part is about creating an environment that behaves similarly to equation, but for reactions defined in mhchem. I had a look in source2e in the definition of equation (around l. 293 in source2e) but couldn't quite figure out how to transfer that onto my new environment.</p> <p>The second part is about how to create a list of those reactions containing the reaction number, the page they occur on and optional a description that is only printed in the \listofreactions.</p> <p>For example:</p> <p>In the code I write</p> <pre><code>\begin{reaction} \ce{X + Y -&gt;XY}\descriptionforlist{XY formation reaction}\\ \ce{A +B -&gt; C} \ce{G + H -&gt; J}\nonumber \end{reaction} </code></pre> <p>Then in the list it should appear as</p> <p><strong>List of reaction</strong></p> <pre><code>R 1: XY formation reaction 6 R 2: 6 </code></pre>
0non-cybersec
Stackexchange
513
1,617
Why does $t^{i\lambda}=\cos(\lambda \ln(t))+\sin(\lambda \ln(t))$?. <p>My equation was <span class="math-container">$$tf''(t)+f'(t)+\frac{\lambda^2}{t}f(t)=0$$</span> where <span class="math-container">$\lambda \in \mathbb{R}$</span>. I set <span class="math-container">$f(t)=t^{m+1}$</span> and solve from there to obtain <span class="math-container">$m=\pm i\lambda$</span>. The general solution then is <span class="math-container">$$f(t)=c_1 \cos(\lambda \ln(t)) + c_2 \sin(\lambda \ln(t))$$</span> which I obtained via a table in the my book for Euler-Cauchy method. </p> <p>Can anyone tell me why <span class="math-container">$t^{i\lambda}=\cos(\lambda \ln(t)) + i \sin(\lambda \ln(t))$</span>? I've been trying to figure this out for a few hours, and it has been awfully unsuccessful. :(</p>
0non-cybersec
Stackexchange
283
800
Following the post from the woman asking about sex positions with her heavy boyfriend, I think it was really good for people in this sub to hear from those of us who have fat partners or are fat and in a happy, sexy relationship, so.... I think now would be a really good time for the folks of this sub to speak up about their beloved heavier partners. It sucks that there's this constant stereotype of no one ever being attracted to heavier people, and usually the only posts we see on this are things like "my girlfriend/boyfriend is gaining weight and I'm not into it". It would be nice to have more of a dialogue in which we acknowledge that fatter folks can and often do have fulfilling love and sex lives. Someone asked about my own experiences, so: I'm about 5'4" and my weight fluctuates but generally sits around 78kgs. My boyfriend is 6' and around 115kgs and I think he's completely and utterly gorgeous. We were actually friends with benefits for a really long time because even though dating initially seemed like a bad idea, we simply couldn't keep our hands off each other. I don't love his body despite his weight; his shape and size are part of the appeal. He loves my body as part of a very wide range of body types he can be attracted to (his joke is that his type is "women"). It just makes me so so sad to hear from folks who say they hate themselves and consider themselves unworthy of love because they're fat, and I wanted to make the thread because reading and hearing that from friends and from strangers on the Internet just breaks my heart.
0non-cybersec
Reddit
340
1,570
What is a reasonable manufactured solution to test finite difference method?. <p>What is a reasonable manufactured solution to test the following equation against its finite difference approximation? I want it to look like a Cosine function about $0$, rotated about $Z$ axis (basically not varying about $\theta$) such that $f$ turns out to be a not so bad function in terms of $r,\theta$</p> <p>$$u_{rr} \;+\; \frac{1}{r} u_r \;+\; \frac{1}{r^2} u_{\theta\theta}\;+\; Cu \;=\; f(r,\theta)$$</p>
0non-cybersec
Stackexchange
147
498
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
What is the name and location of the Nginx config file (htaccess equivalent)?. <p>There are many <a href="http://hiteshjoshi.com/linux/secure-nginx-and-codeigniter-configuration.html" rel="noreferrer">tutorials</a> on how to write Nginx rewrite rules to mimic Apache's .htaccess file but I can't confidently say I know what the name or location of this so-called Nginx config file actually is. I'm specifically looking for the Nginx config file that allows you to write server path and PHP directives. I'm using Ubuntu 12 linux and Codeigniter as my PHP framework.</p> <p>Here's what I know so far:</p> <ol> <li>This file: <code>/etc/nginx/nginx.conf</code> despite its enticing name is apparently not the place for server directives.</li> <li>This file: <code>/etc/nginx/sites-available/default</code> seems like what I need (i'm able to generate php errors specific to my app) but I can't get the Codeigniter-specific path routing correct. First of all, is this the "config" file/.htaccess equivalent everyone speaks of?</li> </ol>
0non-cybersec
Stackexchange
290
1,036
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Stopping auto-rotation of images in Django-imagekit Thumbnail. <p>I've got a thumbnail filter that always ends up rotating the image 90 degrees to the left when the image is taller than it is wide (I've checked, and the original image is straight, while the cached image is rotated). The relevant code looks like this:</p> <pre><code>profile_image = models.ImageField(upload_to='profile_images', default='profile_images/icon.png') profile_icon = ImageSpecField(source='profile_image', processors=[processors.Thumbnail(width=72, height=72, crop=True)], format='JPEG', options={'quality': 60}) </code></pre> <p>How do I stop the auto-rotation?</p>
0non-cybersec
Stackexchange
193
738
Decay of a convolution from its Fourier transform. <p>I have the following, physically motivated problem:</p> <p>Consider the convolution <span class="math-container">$F(x):=\int f(y)\Delta_0(x-y)d^4y$</span> where <span class="math-container">$f\in\mathcal{C}_0^\infty(\mathbb{R}^4)$</span>, i.e. smooth and compactly supported, while <span class="math-container">$\Delta_0\in\mathcal{S}'(\mathbb{R}^4)$</span> is the <strong>massless</strong> two-point function (Wightman function). It can be written as </p> <ol> <li><span class="math-container">$\Delta_0(x)=\int\delta(k^2)\theta(k^0)e^{-ikx}d^4k$</span></li> <li><span class="math-container">$\Delta_0(x)=\lim_{\epsilon\rightarrow 0}\frac{1}{x^2-i\epsilon x^0}$</span></li> </ol> <p>Theorem 4.1.1 in Hörmander's "The Analysis of partial differential operators I" asserts that <span class="math-container">$F\in\mathcal{C}^\infty(\mathbb{R}^4)$</span>. However, I would like to make some statements on the decay properties of <span class="math-container">$F$</span> (1. suggest that it decays like <span class="math-container">$1/r^2$</span> in spacelike directions).</p> <p>More generally, how can I determine the decay properties of a function <span class="math-container">$f$</span> through its Fourier transform <span class="math-container">$\hat{f}$</span>?</p> <p>If <span class="math-container">$f$</span> was integrable I would try to use the connection <span class="math-container">$x_i f(x)\leftrightarrow \frac{\partial}{\partial k_i}\hat{f}(k)$</span>, but how can I proceed if <span class="math-container">$f$</span> is smooth but not integrable, e.g. a smooth (tempered) distribution?</p> <p>Thank you very much for your help :)</p>
0non-cybersec
Stackexchange
564
1,707
Why is the sprite not rendering in OpenGL?. <p>I am trying to render a 2D(Screen coordinated) sprite in OpenGL. Yet, when I compile it, it does not show up. I see that the code is fine (There are not even any shader compilation errors nor any other errors). I also have also the matrices set up(which I doubt is causing the problem, and that's where starts the CONFUSION!!)</p> <p>Here is the source code, by the way(without debugging, to make it short):-</p> <p><b>main.cpp</b></p> <pre><code>// Including all required headers here... #include &lt;iostream&gt; #define GLEW_STATIC #include &lt;GL/glew.h&gt; #include &lt;GLFW/glfw3.h&gt; #include "SOIL2/SOIL2.h" #include &lt;glm/glm.hpp&gt; #include &lt;glm/gtc/type_ptr.hpp&gt; #include &lt;glm/gtc/matrix_transform.hpp&gt; const GLchar * vertexShaderSource = "#version 330 core\n" "layout(location = 0) in vec4 vertex;\n" "out vec2 TexCoords;\n" "uniform mat4 model;\n" "uniform mat4 projection;\n" "void main()\n" "{\n" "TexCoords = vertex.zw;\n" "gl_Position = projection * model * vec4(vertex.xy, 0.0, 1.0);\n" "}\0"; const GLchar * fragmentShaderSource = "#version 330 core\n" "in vec2 TexCoords;\n" "out vec4 color;\n" "uniform sampler2D image;\n" "uniform vec3 spriteColor;\n" "void main()\n" "{\n" "color = vec4(spriteColor, 1.0) * texture(image, TexCoords);\n" "}\0"; const GLint WIDTH = 800, HEIGHT = 600; int main() { glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_FALSE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "Rendering Sprites", nullptr, nullptr); int screenWidth, screenHeight; glfwGetFramebufferSize(window, &amp;screenWidth, &amp;screenHeight); glfwMakeContextCurrent(window); glewExperimental = GL_TRUE; glewInit(); glViewport(0, 0, screenWidth, screenHeight); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); glShaderSource(vertexShader, 1, &amp;vertexShaderSource, NULL); glCompileShader(vertexShader); GLuint fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(fragmentShader, 1, &amp;fragmentShaderSource, NULL); glCompileShader(fragmentShader); GLuint shaderProgram = glCreateProgram(); glAttachShader(shaderProgram, vertexShader); glAttachShader(shaderProgram, fragmentShader); glLinkProgram(shaderProgram); glDeleteShader(vertexShader); glDeleteShader(fragmentShader); GLuint quadVAO; GLuint VBO; GLfloat vertices[] = { 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f }; glGenVertexArrays(1, &amp;quadVAO); glGenBuffers(1, &amp;VBO); glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glBindVertexArray(quadVAO); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(GLfloat), (GLvoid*)0); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); GLuint texture; int width, height; glGenTextures(1, &amp;texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); unsigned char *image = SOIL_load_image("img.png", &amp;width, &amp;height, 0, SOIL_LOAD_RGBA); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, image); SOIL_free_image_data(image); glBindTexture(GL_TEXTURE_2D, 0); while (!glfwWindowShouldClose(window)) { glfwPollEvents(); glClearColor(0.2f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glUseProgram(shaderProgram); glm::mat4 model; glm::mat4 projection = glm::ortho(0.0f, static_cast&lt;GLfloat&gt;(WIDTH), static_cast&lt;GLfloat&gt;(HEIGHT), 0.0f, -1.0f, 1.0f); glm::vec2 size = glm::vec2(10.0f, 10.0f); glm::vec2 position = glm::vec2(-10.0f, 10.0f); glm::vec3 color = glm::vec3(1.0f, 0.0f, 0.0f); GLfloat rotation = 0.0f; model = glm::translate(model, glm::vec3(position, 0.0f)); model = glm::translate(model, glm::vec3(0.5f * size.x, 0.5f * size.y, 0.0f)); model = glm::rotate(model, rotation, glm::vec3(0.0f, 0.0f, 1.0f)); model = glm::translate(model, glm::vec3(-0.5f * size.x, -0.5f * size.y, 0.0f)); model = glm::scale(model, glm::vec3(size, 1.0f)); glUniformMatrix4fv(glGetUniformLocation(shaderProgram, "projection"), 1, GL_FALSE, glm::value_ptr(projection)); glUniformMatrix4fv(glGetUniformLocation(shaderProgram, "model"), 1, GL_FALSE, glm::value_ptr(model)); glUniform3f(glGetUniformLocation(shaderProgram, "spriteColor"), color.x, color.y, color.z); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); glBindVertexArray(quadVAO); glDrawArrays(GL_TRIANGLES, 0, 6); glBindVertexArray(0); glfwSwapBuffers(window); } glDeleteVertexArrays(1, &amp;quadVAO); glDeleteBuffers(1, &amp;VBO); glfwTerminate(); return EXIT_SUCCESS; } </code></pre>
0non-cybersec
Stackexchange
2,177
5,758
Maintenance Monday: Good for You, Not for Me. Open to any takes on today's title! Is there any common weight loss or maintenance wisdom that didn't work for you? Are there foods or activities you turn down without thinking about it? Do you find yourself ignoring or shutting down diet talk or fat logic? We're all on unique journeys, so let's share and celebrate our differences. ---------------------- Anything else on your mind pertaining maintenance? Is your diet going effortlessly, or have the last few weeks been more of a struggle? All questions, remarks and worries are welcome topics of conversation! Also feel free to drop some suggestions for future Maintenance Monday threads - what topics do you find yourself wishing you had a like minded person to discuss with during regular life?
0non-cybersec
Reddit
161
799
Exponential probability density functions of independent variables. <p>I just have a small technical question. I am in the midst of solving a problem where I have gotten 2 different exponential probability density functions that are as follows:</p> <p>pdf #1: 3e^(-3x)</p> <p>pdf #2: 5e^(-5y)</p> <p>The question then asks of me to find the cumulative distribution function and the probability density function of W = X/Y. Note: the variables X &amp; Y are independent.</p> <p>Here is where I am confused:</p> <p>To find the cumulative distribution function, all I would have to do is take the integral of (3e^(-3x) * 5e^(-5y)) to get the cdf? I believe I can multiply the pdfs since the two variables are independent!</p> <p>To find the pdf of W, I am not entirely sure but again, since the variables are independent can I not just have pdf W = (pdf X)/(pdf Y)?</p> <p>Help is greatly appreciated! Thanks :)</p>
0non-cybersec
Stackexchange
264
921
Video playback not working/choppy in Linux Mint 19.2. <p>I have a problem with Linux Mint and video playback. </p> <p>The issue is that opening any .mp4 from disk (don't have any other filestypes) results in video player crash. Tried many different players like vlc (which crashes), mplayer (fails with Exit Code 11) et cetera. </p> <p>Also YouTube videos crash Firefox. Chromium plays YouTube videos but is very choppy. This may or may not be a separate issue.</p> <p>As far as i see i have everything installed. Drivers, codecs, apps. Im at loss as to why this happens. Having been asking around people seem to suggest the machine is too old and slow but i disagree. We are talking about HD or FHD video playback here not 4K or something like that. If the <a href="http://download.msi.com/archive/mnu_exe/M7788v1.0.zip" rel="nofollow noreferrer">motherboard</a> and APU are under powered, it would be choppy but it would not outright crash.</p> <p>This leads me to believe it's some sort of software configuration/conflict issue. Below is <code>inxi -F &amp;&amp; dmesg | grep -i error</code> output:</p> <pre><code>System: Host: eve Kernel: 4.15.0-58-generic x86_64 bits: 64 Desktop: Cinnamon 4.2.3 Distro: Linux Mint 19.2 Tina Machine: Type: Desktop Mobo: MSI model: H61M-P31 (G3) (MS-7788) v: 1.0 serial: N/A UEFI: American Megatrends v: 2.7 date: 01/10/2013 CPU: Topology: Dual Core model: Intel Celeron G550 bits: 64 type: MCP L2 cache: 2048 KiB Speed: 2594 MHz min/max: 1600/2600 MHz Core speeds (MHz): 1: 2594 2: 2594 Graphics: Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics driver: i915 v: kernel Display: server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz OpenGL: renderer: Mesa DRI Intel Sandybridge Desktop v: 3.3 Mesa 19.0.8 Audio: Device-1: Intel 6 Series/C200 Series Family High Definition Audio driver: snd_hda_intel Sound Server: ALSA v: k4.15.0-58-generic Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: d4:3d:7e:18:a9:53 Drives: Local Storage: total: 223.57 GiB used: 106.59 GiB (47.7%) ID-1: /dev/sda vendor: Patriot model: Burst size: 223.57 GiB Partition: ID-1: / size: 217.61 GiB used: 106.58 GiB (49.0%) fs: ext4 dev: /dev/sda2 Sensors: System Temperatures: cpu: 29.8 C mobo: 27.8 C Fan Speeds (RPM): N/A Info: Processes: 194 Uptime: 18h 02m Memory: 3.56 GiB used: 1.17 GiB (32.8%) Shell: bash inxi: 3.0.32 </code></pre> <p>Im not a first time Linux user and the PC is not mine. But im also not super experienced in Linux tho i seem to have little problem using the terminal. I can access the PC with remote management if nessesary to test things.</p> <p>So far i have tried:</p> <pre><code>Install FFmpeg - no change Install mplayer - no change Install ubuntu-restricted-extras - was already installed Switch VLC video output to X11 - no change monitor CPU usage during playback - near 100% on both cores during youtube playback via Chromium. update libva - was already installed update vaapi - was already installed sudo apt-get update &amp;&amp; sudo apt-get install vlc - no change sudo apt-get dist-upgrade - no change </code></pre> <p>Driver manager shows no proprietary drivers avaliable or installed. Everything else seems to work just fine.</p> <p>I think i might need to try and use Intel's legacy video driver instead of modesetting. As i understand modesetting is better on newer hardware but legacy is better on legacy hardware.</p> <p>Problem is, I can't seem to find the specific command to do this.</p> <p><strong>EDIT:</strong></p> <p>Ok so i tried using the Linux Mint live usb version (same from where i installed Mint) and when opening video via file manager it requested 2 downloads. One was gstreamer and i don't remember what the other one was - MPEG4 something.... It was then able to play back the video just fine after that.</p> <p>So it seems the hardware is capable and it's not a problem with Mint but there is some sort of software configuration issue with the installed version.</p>
0non-cybersec
Stackexchange
1,314
4,189
Can&#39;t see own VPN Server Windows. <p>Found a similar issue here but involved Hyper-V VM's and Host.</p> <p>In my case i sense something bizarre.</p> <p>I've established a connection using only PPTP built-in windows connection between two points. Everything seems to be working, from the client i can access the router and other machines of the remote network just fine, problem is i can't access the very same computer that is providing me with the VPN tunnel connection.</p> <p>Wait for it, i'll make it worse: i can't ping the windows machine where i've set the VPN server, can't access its own shared folder either, but when i open MSSQL Studio i can connect to its database! Basically i can't even ping the address 192.168.1.1 but when i try to connect from studio using 192.168.1.1\sqlinstance it connects no problem.</p> <p>I appreciate any help you can provide, i don't know what i'm missing tbh...?</p> <p>TLDR: windows -> windows PPTP, can access network all around but the very single windows pc that's providing me the access tunnel.</p>
0non-cybersec
Stackexchange
278
1,058
LF More girl players who are totally bored (7/10)!. I've been putting together an all girl raiding group through Tumblr, and it has been getting less of a response now that i've got 7 girls (including me). I figured I'd check out Reddit, because there are definitely more ladies of the WoW world here! there is no age restriction (just thought i'd throw that in), and i'm looking for people who will stick to it and is willing to make friends :) if you're interested, and you happen to have a Tumblr, this: (http://thedragon-smaug.tumblr.com/) is my personal Tumblr where you can send a message to me and i'll give you the information! I keep track of all the people and update progress! :) Comment below if you're interested! Edit: 8/10 edit2: 9/10 Edit3: 10/10! Will update soon :)
0non-cybersec
Reddit
209
788
Ordinals that satisfy $\alpha = \aleph_\alpha$ with cofinality $\kappa$. <p>I am trying to solve the following question:</p> <blockquote> <p>Prove that for every regular cardinal, $\kappa \gt \aleph_0$, there is a exists an $\alpha$ with cofinality $\kappa$ such that $\alpha = \aleph_\alpha$</p> </blockquote> <p>I tried to build $\alpha$ as the limit of $\kappa$ regular cardinals with various properties (this seems to sort out the requirement that $cof(\alpha) = \kappa$). I want to choose all of them to be weakly inaccessible but I'm not entirely sure it's "allowed" and if there isn't a simpler approach.</p> <p>My attempt:</p> <ul> <li>Let $A = \langle\alpha_i\mid i &lt; \kappa\rangle$, increasing series of weakly inaccessible cardinals, and let $\alpha = \bigcup_{i &lt; \kappa}\alpha_i$</li> <li>$cof(\alpha) = \kappa$. Otherwise, we can define a bijection between $A$ and $\kappa$ and contradict $\kappa$'s regularity.</li> <li>We know that $\alpha \leq \aleph_\alpha$. </li> <li>Assume $\alpha &lt; \aleph_\alpha$, so there is $i$ such that $\alpha &lt; \aleph_{\alpha_i}$</li> <li>$\alpha_i$ is weakly inaccessible, hence it's a fixed point of the aleph function, which means $\alpha_i = \aleph_{\alpha_i}$ </li> <li>But $\alpha &lt; \aleph_{\alpha_i} = \alpha_i &lt; \alpha$, and this is a contradiction.</li> </ul>
0non-cybersec
Stackexchange
432
1,340
Evaluate $ \int_{- \infty}^{\infty} \frac{x^4}{x^8 + 1} dx$ using Residual Theorem. <p>Need to evaluate the integral </p> <p><span class="math-container">$$ \int_{- \infty}^{\infty} \frac{x^4}{x^8 + 1}dx $$</span></p> <p>I'm having trouble finding the poles.</p> <p>I was trying to do this before and got that the poles in the upper plane occurred at <span class="math-container">$e^\frac{i\pi}{8}$</span>, <span class="math-container">$e^\frac{3i\pi}{8}$</span>, <span class="math-container">$e^\frac{5i\pi}{8}$</span>, <span class="math-container">$e^\frac{7i\pi}{8}$</span>. I don't know if this is right. </p> <p>I know once I find the poles I have to use the equation <span class="math-container">$$ Res(f; z) = \frac{P(z)}{Q'(z)}$$</span> where <span class="math-container">$f = \frac{z^4}{z^8+1}$</span>, <span class="math-container">$ P = z^4$</span> and <span class="math-container">$Q' = 8z^7$</span> and <span class="math-container">$z$</span> is a pole of <span class="math-container">$f$</span></p> <p>The book got the answer <span class="math-container">$$\frac{\pi}{4}\biggl(sin\frac{3\pi}{8}\biggr)^{-1}$$</span></p> <p>Any help would be appreciated. </p>
0non-cybersec
Stackexchange
440
1,180
Thickheaded Thursday - April 4th 2013. >Basically, this is a safe, non-judging environment for all your questions no matter how silly you think they are. Anyone can start this thread and anyone can answer questions. If you start a Thickheaded Thursday or Moronic Monday try to include date in title and a link to the previous weeks thread. Hopefully we can have an archive post for the sidebar in the future. Thanks! [Last Week](http://www.reddit.com/r/sysadmin/comments/1b6f4x/thickheaded_thursday_mar_28_2013/)
0non-cybersec
Reddit
133
513
Proofs with implication statement logic for linear algebra. <p>everyone before I start writing my question I would like you guys to <strong>note</strong> that this is more towards logic than linear algebra but contains a linear algebra example for the sake of asking my question more clearly.</p> <p>Recall, the definition of a linearly independent set of vectors. Let $V$ be a vector space and $v_1, ..., v_n$ is in $V$. $\{v_1, ..., v_n\}$ is linearly independent if either 1 or 2 holds.</p> <p>Note: 1 and 2 are equivalent definitions of linear independence).</p> <ol> <li>$c_1v_1+ ... + c_nv_n = 0 \implies c_1=...=c_n=0$, for $c_i\in\mathbb{R}.$</li> <li>The equation of the form $c_1v_1+ ... + c_nv_n = 0$ has only the unique solution $c_1=...=c_n=0$.</li> </ol> <p><strong>NOTE:</strong> Definition #1 of linear independence is a conditional statement/implication. I will be referring to the <strong>condition</strong> of the implication i.e. $c_1v_1+...+c_nv_n=0$ as the <strong>antecedent</strong> and $c_1=...=c_n=0$ as the <strong>conclusion</strong> of the implication.</p> <p>Let $P$: "$\{v_1,...,v_n\}$ is linearly independent." (which means 1 and 2 holds)</p> <p>Let $Q:$ "any statement."</p> <p>Suppose we have two logical statements as follows:</p> <p>(a) $P \implies Q$</p> <p>(b) $Q \implies P$</p> <p><strong>Note:</strong> The below represents my thoughts of how proofs generally work regardless of linear algebra when it includes conditional statements. Please correct me if I am wrong.</p> <p>(a) When we try to prove (a) we would suppose that $P$ is true and then reach the conclusion $Q$. In more detail, we would assume that $\{v_1,...,v_n\}$ is linearly independent which means 1 and 2 holds. For the sake of my question let's work with definition #1. Since we assume that $P$ is true but $P$ is an implication statement we will have to satisfy the <strong>condition</strong> of $P$ to use the <strong>conclusion</strong> in supporting our proof. (whatever statement Q might be)</p> <p>(b) On the other hand, if we try to prove (b) we would suppose that $Q$ is true and then reach the conclusion $P$. In more detail, we are trying to reach at the fact that the vectors $\{v_1,...,v_n\}$ is linearly independent. Since $P$ is an implication statement and <strong>it's what we are trying to prove</strong> we can suppose the <strong>antecedent</strong> of what we are trying to prove. i.e. We can suppose that $c_1v_1+...+c_nv_n=0$. Ultimately, try to prove that the coefficients are all equal to 0. </p> <p><strong>Linear Algebra Question #1:</strong> If $\{v_1,...,v_n\}$ is linearly independent then $v_i\notin span\{v_j: n\geq j\geq 1, j \neq i\}.$</p> <p><strong>Proof:</strong> The proof of the question above will go in the same steps as (a). We would try to <strong>satisfy the condition</strong> so that we can use the fact that the coefficients are equal to zero to prove our $Q$ statement in this case that $v_i\notin span\{v_j: n\geq j\geq 1, j \neq i\}.$</p> <p><strong>Linear Algebra Question #2:</strong><a href="https://i.stack.imgur.com/SXump.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SXump.png" alt="enter image description here"></a> <strong>Important note:</strong> It's not the concept or theorem that gives me trouble so you don't need to try to <strong>rewrite</strong> the solution or anything.</p> <p>The only part of the question <strong>I am interested in asking</strong> is the following: "If $\{w_1,w_2,w_3\}$ is linearly independent then the matrix A whose ij-entry is $a_{ij}$ is invertible."</p> <p><strong>My question:</strong> Why is it that the solution <strong>starts with the condition</strong> that we are trying to satisfy? i.e. $c_1w_1+c_2w_2+c_3w_3=0$? That's the condition we are trying to reach in order for us to <strong>use</strong> the fact that $c_1=c_2=c_3=0$. Why are we even allowed to make such a statement and work with that equation if we don't know <strong>whether if the condition</strong> holds or not? For linear algebra question #1 I can proceed the proof as (a) and it works but for linear algebra question #2 I can't do it the same way as I would do question #1.</p> <p>If any part of my logic is flawed it will be very appreciated this is stopping me from answering a lot of linear independence/dependence questions in my textbook and practice problems. Once again, <strong>it's not the content</strong> that is giving me the trouble it's just that one step in the solution that I specified as above.</p> <p>Thank you in advance!</p>
0non-cybersec
Stackexchange
1,387
4,564
Should I make a move on a close friend's sister?. I'm a 21 y/o male and one of my close buddies' sister is 18. I've been thinking about asking her out some time, but my friend is very protective over his sister and I have a feeling it might make things a little weird between me and him. I don't want to be in a serious relationship with her or anything... mainly something more friendly and to go on a few dates here and there. Plus, I could use the experience and I think she could, too. What do you think? Has anyone else ever been in a similar situation?
0non-cybersec
Reddit
135
560
Strange result of MPI_AllReduce for 16 byte real. <p>Compiler: gfortran-4.8.5</p> <p>MPI library: OpenMPI-1.7.2 (preinstalled OpenSuSE 13.2)</p> <p>This program:</p> <pre><code> use mpi implicit none real*16 :: x integer :: ierr, irank, type16 call MPI_Init(ierr) call MPI_Comm_Rank(MPI_Comm_World, irank, ierr) if (irank+1==1) x = 2.1 if (irank+1==8) x = 2.8 if (irank+1==7) x = 5.2 if (irank+1==4) x = 6.7 if (irank+1==6) x = 6.5 if (irank+1==3) x = 5.7 if (irank+1==2) x = 4.0 if (irank+1==5) x = 6.8 print '(a,i0,a,f3.1)', "rank+1: ",irank+1," x: ",x call MPI_AllReduce(MPI_IN_PLACE, x, 1, MPI_REAL16, MPI_MAX, MPI_Comm_World, ierr) if (irank==0) print '(i0,a,f3.1)', irank+1," max x: ", x call MPI_Finalize(ierr) end </code></pre> <p>I also tried <code>real(16)</code>, <code>real(kind(1.q0))</code>. <code>real(real128)</code> is actually equivalent with <code>real*10</code> for this compiler.</p> <p>The result is:</p> <pre><code>&gt; mpif90 reduce16.f90 &gt; mpirun -n 8 ./a.out rank+1: 1 x: 2.1 rank+1: 2 x: 4.0 rank+1: 3 x: 5.7 rank+1: 4 x: 6.7 rank+1: 5 x: 6.8 rank+1: 6 x: 6.5 rank+1: 7 x: 5.2 rank+1: 8 x: 2.8 1 max x: 2.8 </code></pre> <p>The program finds the true maximum for <code>real*10</code> keeping <code>MPI_REAL16</code>. The MPI specification (3.1, pages 628 and 674) is not very clear if <code>MPI_REAL16</code> corresponds to <code>real*16</code> or <code>real(real128)</code> if these differ.</p> <p>Also, assuming <code>MPI_REAL16</code> is actually <code>real(real128)</code> and trying to use that in a program leads to a different problem:</p> <pre><code>Error: There is no specific subroutine for the generic 'mpi_recv' at (1) Error: There is no specific subroutine for the generic 'mpi_send' at (1) </code></pre> <p>which does not happen for <code>real*16</code>. (disregarding that one should be able to pass any bit pattern, so this check is superfluous)</p> <p>What is the right way to use 16 byte reals? Is the OpenMPI library in error?</p>
0non-cybersec
Stackexchange
871
2,036
Clock showing wrong time. <p>This is not a duplicate of <strong><a href="https://askubuntu.com/questions/169376/clock-time-is-off-on-dual-boot">Clock time is off on dual boot</a>. This is a TimeZone Bug!</strong></p> <p>My clock on top panel shows time different from time i set or synched through internet. It began after changing to winter time. Here's the screenshot so you can understand what I mean: <img src="https://i.stack.imgur.com/wKoOA.png" alt=""></p> <p>If I change timezone I get correct time in that timezone but can't fix my one. Is it some sort of bug? How to fix it?</p> <p>Edit: yes, I have Windows in dualboot. How does it affect the clock?</p> <p>Edit2: so, I currently changed to Shanghai time which is the same timezone but clock is now correct. But still, Irkutsk is showing wrong time.</p>
0non-cybersec
Stackexchange
248
820
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
349
1,234
Greek Yogurt Chicken Salad Sandwich. From the plump grapes and fresh apples to the sweet cranberries, this lightened up sandwich won’t even taste healthy! **Ingredients** - 1 pound cooked chicken breast, shredded - 1/2 cup diced red onion - 1/2 cup diced apple - 2/3 cup grapes, halved - 1/3 cup dried cranberries - 1/4 cup sliced almonds - 1/2 cup plain Greek yogurt - 1 tablespoon freshly squeezed lemon juice, or more, to taste - 1/2 teaspoon garlic powder - Kosher salt and freshly ground black pepper - 4 rolls ciabatta bread, toasted, for serving **Instructions** 1. In a large bowl, combine chicken, red onion, apple, grapes, dried cranberries or currants, sliced almonds, Greek yogurt, lemon juice, garlic powder, salt and pepper, to taste. 2. Serve sandwiches on ciabatta bread with chicken mixture. [Taste it with your eyes first Then Try it](http://www.thebestrecipesever.net/2014/01/greek-yogurt-chicken-salad-sandwich.html)
0non-cybersec
Reddit
279
995