text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Dynamically Disable Particular Context Menu Item. <p>I've added 4 menus in context menu. If during the start context menu item is clicked, how to disable that particular <code>("Start")</code> menu item?</p> <pre><code>ContextMenu conMenu1 = new ContextMenu(); public Form1() { InitializeComponent(); conMenu1.MenuItems.Add("Start", new System.EventHandler(this.Start_Click)); conMenu1.MenuItems.Add("Pause", new System.EventHandler(this.Pause_Click)); conMenu1.MenuItems.Add("Resume", new System.EventHandler(this.Resume_Click)); conMenu1.MenuItems.Add("Stop", new System.EventHandler(this.Stop_Click)); } private void Start_Click(object sender, EventArgs e) { // Functionalities to disable start context menu item } </code></pre>
0non-cybersec
Stackexchange
Error with seting keyval default values with def. <p>First of all, sorry for my english level.</p> <p>I'm trying to do a personalized command with key value parameters through keyval package. It's my first attempt and probably can be better forms to do it.</p> <p>I made a file included into principal file via input command. In the first part of that file I would like to have a little description of my personal commands and the configuration if it's necessary.</p> <p>I made a new command (\imagen) to include pictures and my intention es that it works like:</p> <pre><code>\imagen[key-value options]{file name}{caption} </code></pre> <p>The keys I would like to use are:</p> <ul> <li>carpeta= folder where I save de images</li> <li>ancho = width</li> <li>escala = scale</li> <li>aqui --> bolean to force position to H. Normal is htb</li> <li>etiqueta = label for ref. In default mode it's file name</li> </ul> <p>The definition of that command is:</p> <pre><code>% INCLUIR IMAGENES %%%%%%%%%%%%%% Creación de las claves \makeatletter \define@key{Imagen}{carpeta}{\def\Imagen@carpeta{#1}} \define@key{Imagen}{ancho}{\def\Imagen@ancho{#1}} \define@key{Imagen}{escala}{\def\Imagen@escala{#1}} \define@key{Imagen}{aqui}[true]{\def\Imagen@aqui{#1}} \define@key{Imagen}{etiqueta}{\def\Imagen@etiqueta{#1}} %%%%%%%%%%%%%% Valores por defecto \setkeys{Imagen}{\ImagenDefecto} %%%%%%%%%%%%%% Definición de la Macro \newcommand{\imagen}[3][]{ %se empieza un grupo para que no guarde \begingroup \setkeys{Imagen}{#1} \ifdef\Imagen@carpeta% {\def\Imagen@fichero{{\Imagen@carpeta#2}}}% {\def\Imagen@fichero{#2}} \ifdef\Imagen@aqui% {\begin{figure}[H]}% {\begin{figure}[htb]} \begin{center} \ifdef\Imagen@anchura% {\includegraphics[width=\Imagen@ancho]{\Imagen@fichero}}% {\ifdef\Imagen@escala% {\includegraphics[scale=\Imagen@escala]{\Imagen@fichero}} {\includegraphics{\Imagen@fichero}} } \captionof{figure}{#3} \ifdef\Imagen@etiqueta% {\label{\Imagen@etiqueta}}% {\label{#2}} \end{center} \end{figure} \endgroup } \makeatother </code></pre> <p>As you can see, I put \setkeys{Imagen}{\ImagenDefecto} where \ImagenDefecto it's a definition that comes from the frist part of that file where I do a litle description how it works the command and try to configure it.</p> <p>To do the configurations I use:</p> <pre><code>\def\ImagenDefecto{aqui, carpeta=img} </code></pre> <p>It not work if I use the = symbol in the definition, but if I put the same text directly in key value command \setkeys{Imagen}{aqui, carpeta=img} works perfectly.</p> <p>The error is:</p> <pre><code>! Package keyval Error: aqui, escala=img undefined. </code></pre> <p>I was trying to deactivate packets that I think can be a problem like Babel (all is in spanish) and I don't know what can be the problem.</p> <p>If do you like, I'm doing this to have a template and I put all the code into github: <a href="https://github.com/pepramon/plantilla-latex" rel="nofollow noreferrer">https://github.com/pepramon/plantilla-latex</a></p> <p>Thanks to all.</p>
0non-cybersec
Stackexchange
How to create collection of RDDs out of RDD?. <p>I have an <code>RDD[String]</code>, <code>wordRDD</code>. I also have a function that creates an RDD[String] from a string/word. I would like to create a new RDD <strong>for each string</strong> in <code>wordRDD</code>. Here are my attempts:</p> <p>1) Failed because Spark does not support nested RDDs:</p> <pre><code>var newRDD = wordRDD.map( word =&gt; { // execute myFunction() (new MyClass(word)).myFunction() }) </code></pre> <p>2) Failed (possibly due to scope issue?):</p> <pre><code>var newRDD = sc.parallelize(new Array[String](0)) val wordArray = wordRDD.collect for (w &lt;- wordArray){ newRDD = sc.union(newRDD,(new MyClass(w)).myFunction()) } </code></pre> <p>My ideal result would look like:</p> <pre><code>// input RDD (wordRDD) wordRDD: org.apache.spark.rdd.RDD[String] = ('apple','banana','orange'...) // myFunction behavior new MyClass('apple').myFunction(): RDD[String] = ('pple','aple'...'appl') // after executing myFunction() on each word in wordRDD: newRDD: RDD[String] = ('pple','aple',...,'anana','bnana','baana',...) </code></pre> <p>I found a relevant question here: <a href="https://stackoverflow.com/questions/30522564/spark-when-union-a-lot-of-rdd-throws-stack-overflow-error">Spark when union a lot of RDD throws stack overflow error</a>, but it didn't address my issue.</p>
0non-cybersec
Stackexchange
check if xml file exists with XSLT 2.0, saxon9HE. <p>I'd like to check, whether a file exists, with xslt 2.0. However, it's not working. I've tried this:</p> <pre><code>&lt;xsl:choose&gt; &lt;xsl:when test="doc(iri-to-uri(concat($currFolder, '/', $currSubFolder, '/', @href)))"&gt; </code></pre> <p>(The path is correct)</p> <p>however, this results in an error, when the file isnt there.</p> <p>and this:</p> <pre><code>&lt;xsl:choose&gt; &lt;xsl:when test="doc-available(iri-to-uri(concat($currFolder, '/', $currSubFolder, '/', @href)))"&gt; </code></pre> <p>doesn't work, it tells me files are there that clearly don't exist.</p> <p>Whats the correct way to do this? A reliable way to check, if an xml file exists.</p>
0non-cybersec
Stackexchange
Winding Up!.
0non-cybersec
Reddit
Stormwind looks really happy to me.
0non-cybersec
Reddit
sketching path on unit simplex. <p>I am trying to simulate a path on the unit simplex, which can be drawn using <code>pgfplots</code>:</p> <pre><code>\documentclass[border=5pt]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{70}{130} \begin{tikzpicture}[tdplot_main_coords] \def\laxis{5} \def\ltriangle{3} \begin{scope}[-&gt;,red] \draw (0,0,0) -- (\laxis,0,0) node [below] {\textcolor{blue}{$x$}}; \draw (0,0,0) -- (0,\laxis,0) node [right] {\textcolor{blue}{$y$}}; \draw (0,0,0) -- (0,0,\laxis) node [left] {\textcolor{blue}{$z$}}; \end{scope} \filldraw [opacity=.5,green] (\ltriangle,0,0) -- (0,\ltriangle,0) -- (0,0,\ltriangle) -- cycle; \end{tikzpicture} \end{document} </code></pre> <p>I've sketched an outline:</p> <p><a href="https://i.stack.imgur.com/dYiBj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dYiBj.png" alt="enter image description here"></a></p> <p>Where the corners are the coordinates (1,0,0) (0,1,0) (0,0,1).The page is just a random set of coordinates such that the elements add up to 1, and I want to feed the coordinates into the program to sketch the path over the simplex, im not really sure how I can do this though.</p> <p>Example of a path for 6 time steps:</p> <pre><code>(0.25,0.5,0.25) , (0.2,0.6,0.2), (0.24,0.56,0.2), (0.16,0.52,0.0.32),(0.12,0.5,0.38), (0.1,0.46,0.44) </code></pre>
0non-cybersec
Stackexchange
Nexus 5X vs Nexus 6P Price, Specs, Review, Release Date.
0non-cybersec
Reddit
My bedroom/battlestation setup (AKA my happy place).
0non-cybersec
Reddit
Create a common xsd generated class to be used by other packages. <p>I am trying to use the same generated class but in separate packages. So the structure should look something like this:</p> <pre><code>com.test.common -commonType.java com.test.A -objectA.java com.test.B -objectB.java </code></pre> <p>But i keep getting this:</p> <pre><code>com.test.common -commonType.java com.test.A -objectA.java -commonType.java com.test.B -objectB.java -commonType.java </code></pre> <p>My common.xsd looks like this:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://test.com/magic/common" xmlns="http://test.com/magic/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"&gt; &lt;xs:complexType name="CommonType"&gt; &lt;xs:sequence&gt; &lt;xs:element name="name" type="xs:string" /&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:schema&gt; </code></pre> <p>the objectA.xsd looks like</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://test.com/magic/objectA" xmlns:common="http://test.com/magic/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"&gt; &lt;xs:complexType name="ObjectA"&gt; &lt;xs:sequence&gt; &lt;xs:element name="size" type="xs:string" /&gt; &lt;xs:element name="commonA" type="common:CommonType" /&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:schema&gt; </code></pre> <p>And objectB.xsd looks like:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://test.com/magic/objectB" xmlns:common="http://test.com/magic/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"&gt; &lt;xs:complexType name="ObjectB"&gt; &lt;xs:sequence&gt; &lt;xs:element name="version" type="xs:string" /&gt; &lt;xs:element name="commonB" type="common:CommonType" /&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:schema&gt; </code></pre> <p>I have a common binding file common.xjb which looks like this:</p> <p></p> <pre><code> &lt;jxb:bindings schemaLocation="../xsd/common.xsd" node="/xsd:schema"&gt; &lt;jxb:schemaBindings&gt; &lt;jxb:package name="com.test.common"/&gt; &lt;/jxb:schemaBindings&gt; &lt;/jxb:bindings&gt; </code></pre> <p></p> <p>And finally my maven job looks like this: </p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt; &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;args&gt; &lt;arg&gt;-Xequals&lt;/arg&gt; &lt;/args&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt; &lt;artifactId&gt;jaxb2-basics&lt;/artifactId&gt; &lt;version&gt;0.6.3&lt;/version&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;episode&gt;true&lt;/episode&gt; &lt;extension&gt;true&lt;/extension&gt; &lt;verbose&gt;true&lt;/verbose&gt; &lt;generateDirectory&gt;src/main/java&lt;/generateDirectory&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;common&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;generate&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;generatePackage&gt;com.test.common&lt;/generatePackage&gt; &lt;schemaIncludes&gt; &lt;includeSchema&gt;xsd/common.xsd&lt;/includeSchema&gt; &lt;/schemaIncludes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;login&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;generate&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;generatePackage&gt;com.test.A&lt;/generatePackage&gt; &lt;bindingIncludes&gt; &lt;includeBinding&gt;xjb/commons.xjb&lt;/includeBinding&gt; &lt;/bindingIncludes&gt; &lt;schemaIncludes&gt; &lt;includeSchema&gt;xsd/objectA.xsd&lt;/includeSchema&gt; &lt;/schemaIncludes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;alert&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;generate&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;generatePackage&gt;com.test.B&lt;/generatePackage&gt; &lt;bindingIncludes&gt; &lt;includeBinding&gt;xjb/commons.xjb&lt;/includeBinding&gt; &lt;/bindingIncludes&gt; &lt;schemaIncludes&gt; &lt;includeSchema&gt;xsd/objectB.xsd&lt;/includeSchema&gt; &lt;/schemaIncludes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; </code></pre>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Should I move invariant out of cycle. <p>Should I care about moving invariants out of cycle scope if it worsens code readability?</p> <p>Let's take a look at a simple example:</p> <pre><code>for (var i = 0; i &lt; collection.Count; i++) { ... } </code></pre> <p>vs.</p> <pre><code>var collectionCount = collection.Count; for (var i = 0; i &lt; collectionCount; i++) { ... } </code></pre> <p>The performance of second piece of code is better or equal to first one. It will be equal only if collection is fixed-size and Count is not calculated every time. It will be much better if, for example, collection is Linked List which doesn't cache somewhere its Length.</p> <p>I understand that second approach will unlikely kill my application performance (it is much more likely some inefficient SQL query will) but at the same time I don't feel comfortable when I write second piece of code as I miss (small) optimization. But at the same time from readability point of view I like the first piece of code more (less lines of code, less variables).</p> <p>I guess it is minor thing and may be it doesn't worth discussing but I would like to hear your opinion.</p>
0non-cybersec
Stackexchange
Built my first gaming PC. https://imgur.com/a/9iSWqhP https://pcpartpicker.com/list/Y8fYtp I just wanted to thank everyone here in this community for being so incredibly helpful during this process. We are now in the process of build my fiance a PC because she wanted one after seeing mine. Thank you again to everyone here and have a great weekend!
0non-cybersec
Reddit
Scratch and sniff on kindle....
0non-cybersec
Reddit
Are Razer products worth it?. My friend recently told me about Razer stuff after I was talking to him about how I wanted to upgrade from my old keyboard and mouse and wanted to upgrade to a mechanical keyboard. So I've been looking at their products for a little bit (specifically the new Deathadder and the Black widow ultimate 2013) so I was wondering if they are worth it if any of you own some or if they're all asthetics. Also if you could recommend anything it would be much appreciated.
0non-cybersec
Reddit
Dart: how do I get first day of week for current locale?. <p>It can be done in Java by</p> <pre><code>com.ibm.icu.util.Calendar.getInstance(Locale alocale).getFirstDayOfWeek() </code></pre> <p>Is there an equivalent way to get it in Dart?</p>
0non-cybersec
Stackexchange
Invert a Boolean expression which can return UNKNOWN. <h3>Example</h3> <p>I have a table</p> <pre><code>ID myField ------------ 1 someValue 2 NULL 3 someOtherValue </code></pre> <p>and a T-SQL Boolean expression which can evaluate to TRUE, FALSE or (due to SQL's ternary logic) UNKNOWN:</p> <pre><code>SELECT * FROM myTable WHERE myField = 'someValue' -- yields record 1 </code></pre> <p>If I want to get <em>all the other records</em>, I cannot simply negate the expression</p> <pre><code>SELECT * FROM myTable WHERE NOT (myField = 'someValue') -- yields only record 3 </code></pre> <p><strong>I know how why this happens</strong> (ternary logic), and <strong>I know how to solve this specific issue.</strong></p> <p>I know I can just use <code>myField = 'someValue' AND NOT myField IS NULL</code> and I get an &quot;invertible&quot; expression which never yields UNKNOWN:</p> <pre><code>SELECT * FROM myTable WHERE NOT (myField = 'someValue' AND myField IS NOT NULL) -- yields records 2 and 3, hooray! </code></pre> <hr /> <h3>General Case</h3> <p>Now, let's talk about the general case. Let's say instead of <code>myField = 'someValue'</code> I have some complex expression involving lots of fields and conditions, maybe subqueries:</p> <pre><code>SELECT * FROM myTable WHERE ...some complex Boolean expression... </code></pre> <p>Is there a generic way to &quot;invert&quot; this expession? Bonus points if it works for subexpressions:</p> <pre><code>SELECT * FROM myTable WHERE ...some expression which stays... AND ...some expression which I might want to invert... </code></pre> <p>I need to support SQL Server 2008-2014, but if there's an elegant solution requiring a newer version than 2008, I'm interested to hear about it too.</p>
0non-cybersec
Stackexchange
References for numerical approach of Hilbert uniqueness method (HUM). <p>Finding of the control that achieves the exact controllability of the wave equation (Neumann boundary conditions) using the HUM method (see: J.L. Lions, Controlabilité exacte perturbations et stabilisation des systèmes distribués, Tome 1: controlabilité exacte, Masson, Paris, 1988) depends to the resolution of the equation <span class="math-container">$\Lambda (\phi_0 , \phi_1 ) = (\psi_t (x,0). \psi(x,0))$</span>.</p> <p>How can one solve this equation numerically? How can one find the initial conditions of the adjoint system?</p>
0non-cybersec
Stackexchange
Server 2008/2012 (R2) group policy scheduled task not applying. <p>I am at wit's end and totally confused. The goal is to take group policies(one per day of a week) and set a scheduled task which will trigger a reboot on that day at a specific time.</p> <p>So I made them (see example below) yet.....they don't work? I've done additional manual reboots of the servers, <code>gpupdate /force</code> on the servers, changed the GPO from 'create' to 'update', and nothing seems to make them actually get applied.</p> <p><a href="https://i.stack.imgur.com/ejMba.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ejMba.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/4OnNo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4OnNo.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/nOGVc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nOGVc.png" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/7KJbn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7KJbn.png" alt="enter image description here"></a></p> <p>My two questions are:</p> <ol> <li>What am I doing wrong? I just want to schedule graceful restarts on a recurring pattern through group policy (other options are welcome, I guess)</li> <li>How can I fix it or acheive the same end result?</li> </ol> <p>Goal is simply to: Set policyGPO from AD to reboot servers on certain days, push scheduled tasks to each server the GPO is attached to, have the servers run their received scheduled task going forward.</p> <p>Edit - gpresult /H <a href="https://i.stack.imgur.com/1f8MH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1f8MH.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
Do there exist nontrivial global solutions of the PDE $ u_x - 2xy^2 u_y = 0 $?. <p>Consider the following PDE, $$ u_x - 2xy^2 u_y = 0 $$ Does there exist a non-trivial solution $u\in \mathcal{C}^1(\mathbb{R}^2,\mathbb{R})$? </p> <p>It is clear that all solutions for $u\in \mathcal{C}^1( \mathbb{R}^2_+,\mathbb{R})$ are given by $u(x,y) = f\left( x^2 - \tfrac{1}{y}\right)$ where $f\in \mathcal{C}^1(\mathbb{R}_+,\mathbb{R})$. But can we extend such solutions to the entire plane? </p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Mexican Sour Cucumber (Melothria Scabra) sprouts.
0non-cybersec
Reddit
[M27] Confused about my beliefs on dating. Yesterday I was talking with a friend who was trying to convince me to ask out a girl when I admitted that I've never had a relationship before and don't try anymore so she would stop mentioning it. She seemed quite taken aback by my views, so I wanted to get a second opinion... In my mind, my reasons are: - I'm ugly. My parents, other family members, and girls have said so over the years. - I'm already badly balding and I'm an undesirable minority relative to where I live and probably in general. - I'm overweight (5'11" 230lbs pretty much all in my gut) - I've been trying to lose the excess weight for the last 5 years when I weighed at my max 275lbs. I have no will power and can never keep a habit for more than a few weeks. Yes, I've done weight lifting and the starting strength program. Yes, I've done Keto. Yes, they both worked, but I didn't keep up with them anyway. I guess I just love junk food and have a hard time keeping a gym routine because I travel so much. I know I should be better, but I'm not, so I guess I just keep trying and failing hoping one day I will stick to it. - I'm very shy, quiet, and introverted. I'm very nerdy and have been told I can be socially awkward. All my hobbies are solo interests: programming, traveling, hiking, movies/TV, video games, guitar, reading. - I've had sex a few times somehow (alcohol!) but was never enjoyed it, because I felt really self conscious about my stomach and sweating. - I don't really like being around children nor do I want to have any of my own. I feel normal. I'm not sad, unhappy, or depressed. Sometimes I feel lonely and think about what it would be like to be loved. I often consider seeking an escort which I feel is fair transaction to have to put up with me, but I'm very put off by the horrors of the industry like trafficking, underage girls, exploitation, etc. If there was somehow a safe, easy, and legal way to get that at a price I could afford that's not exploitative to anyone, I would definitely do it regularly. I live a pretty good life with good friends and a job I love. I would be lying if I said that it wouldn't be nice to have a wonderful woman share with, but I just can't see any reason why she would be interested in me. To me, I just see this is accepting that I won't ever be a movie star or the president. TL;DR - If I've decided and accepted that I'm undatable does that mean I need professional help?
0non-cybersec
Reddit
trying to run FSF emacs in character based mode ( -nw ) on Catalina. <p>After installing Catalina on my laptop emacs vanished so I installed the latest version from FSF. Running it in a window (gui mode) works fine but I can't get it to reliably work in character mode in Terminal.</p> <p>I can run it fine like this </p> <blockquote> <p>/Applications/Emacs.app/Contents/MacOS/Emacs -nw</p> </blockquote> <p>but when I try and create an alias I get an unhelpful error:</p> <pre><code>alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw $1' emacs LSOpenURLsWithRole() failed for the application /Applications/Emacs.app with error -10810. </code></pre> <p>I found references to starting emacs using open in an alias but open keeps grabbing the -nw and if I use the --args to pass -nw to emacs I get the same error 10810 as above</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
LPT: If you are having trouble with your phone charger, use a toothpick to clean out the phones charging port. More often than not, it’s filled with lint from being in your pocket. Pull it out and it will work like new again..
0non-cybersec
Reddit
While setting TIMETICKS, INTEGER or any other datatype except STRING getting NotWritable exception in SNMP MIB. <p>I have set up an SNMP agent running in my Linux machine. I am trying to update an object value whose data type is not string like INTEGER, TIMETICKS etc. For STRING data type I am able to set but for others getting NotWritable message like</p> <pre><code>[centos@ip-172-31-69-192 ~]$ snmpget -c public -v 1 localhost SNMPv2-MIB::sysORLastChange.0 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03 [centos@ip-172-31-99-192 ~]$ snmpset -v3 -u geekuserafs -l authNoPriv -a MD5 -A geek123afs localhost .1.3.6.1.2.1.1.8.0 t 287 Error in packet. Reason: notWritable (That object does not support modification) Failed object: SNMPv2-MIB::sysORLastChange.0 </code></pre> <p>For this object, access is <code>MAX-ACCESS read-write</code>. I am even not able to update the value.</p> <p>I tried updating MIB txt file from read-only to read-write, restarted SNMP daemon.</p> <p>I am using this command to set</p> <pre><code>$ snmpset -v3 -u geekuserafs -l authNoPriv -a MD5 -A geek123afs localhost .1.3.6.1.2.1.1.8.0 t 287 </code></pre> <p>For other data types like String, OctetByteString I am able to set values. So wrt user permission I hope I am fine.</p> <p>Even it will be fine for me if someone shared a mib/object file which contains writable/updatable objects. I can add to my mib tree and test</p> <p>What am I missing? Any help will be appreciated.</p>
0non-cybersec
Stackexchange
How to aggregate datapoints in a table?. <p>Suppose I have following table - </p> <pre><code>CREATE TABLE data_points (t DATETIME PRIMARY KEY, value INTEGER); </code></pre> <p>I want to aggregate the data by calculating average of every 10 points in the table.</p> <p>i.e. If table has 20 data points the result is two aggregate points. 1st aggregate point the average of 1-10 data points, and 2nd of 11-20.</p> <p>Is this possible using a SQL query?</p>
0non-cybersec
Stackexchange
Does anyone self sabotage like this?. Hey guys I often read people's posts on this sub and although I've never posted or replied myself I can relate a lot to what some redditors go through here. However I just got into a situation that made me really upset and I needed to get it out, so I'm sorry if I'm ranting and this isn't really the right place. I'm messaging this guy who asked my number in class today (!!!) and I'm just here thinking it's all fun and games until he realizes I'm boring as hell and drop it. Just waiting for it. I'm really upset over this because I always don't know what to say or talk about, in fact sometimes people do take a interest in me but even if I'm super into them I always push them away because they are going to find out how boring and plain and void I am (so what's the point?). As of right now I can't talk about anything else not related to Uni in general, I just keep talking about classes and so on. I know he is going to get tired and just stop messaging me by tomorrow, I already feel bummed by it. To top it all I get really nervous messaging people so I always turn wifi/data off, send the text, and then turn it on. It's either this way or answering them 2 days later and then feeling guilty and shitty for doing it. I'm really tired of always feeling this way. I try to tell myself 'just live in the moment', 'don't overthink it' or 'just let things be' but it doesn't matter in the end, I always push people away. I used to be very afraid of rejection and changed how I act towards people so I could avoid it, but by doing that I've lost myself and now I can't even 'be myself' with anyone because I don't know how to do that anymore. I've forgotten how to be me. This applies not only to romantic interests (I can't tell for sure this dude was flirting or not it's just wishful thinking) but to friendship as well, I don't feel comfortable around the few friends I have, I'm so vigilant around people that I don't know how not to be like that anymore. So I just push everyone away. I really don't know what to do anymore.
0non-cybersec
Reddit
If pot were legal, would it be able to be smoked in public like cigarettes, or only certain places like alcohol?. I was trying to decide what I thought and kept giving myself reasons for both side... It's something I never really thought of before but something that has to be considered during a legalization process... What say you?
0non-cybersec
Reddit
Getting a reference to the class instance of a component. <p>I have a typescript class that extends <code>React.Component</code>:</p> <pre><code>class MyComponent extends React.Component&lt;{}, {}&gt; { constructor(props: {}) { super(props); } public render() { return &lt;span&gt;Test&lt;/span&gt;; } public MyMethod() { console.log("Working fine"); } } </code></pre> <p>Then there is a place where I manually have to create an instance and attach this to the DOM:</p> <pre><code>var component = MyComponent; var element = React.createElement(component, {}, null); ReactDOM.render(element, myDomElementContainer); </code></pre> <p>Due to architectural constraints of the system, I need to store a reference to my class instance for that component for later use, problem is that I can not find any reference to the instance of my class in the created element, it only have a reference to the class via the property <code>type</code>.</p> <p><code>React.createElement</code> is only allowing me to supply the class, and <code>ReactDOM.render</code> does not like a manually instantiated object.</p> <p>What should I in order to instantiate a custom component, attach it to the DOM and get a reference to the instance of my component class?</p>
0non-cybersec
Stackexchange
Adam Savage cutting a piece of fabric.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Since so many Redditors enjoyed my friend's first music video, here's his second: Staying In.
0non-cybersec
Reddit
You hella fine.
0non-cybersec
Reddit
Peru. Hello, sorry in advance for bad English. So, I arrived in Lima last night and going with Peruhop tomorrow to Cuzco. I will be stopping in chincha, paracas, ica, huachcina, nazca, Arequipa and puno. Will these city's be affected by the flooding and bad weather?
0non-cybersec
Reddit
Building a stream-cipher out of a hash function?. <p>I've already read this: <a href="https://crypto.stackexchange.com/questions/48/is-it-feasible-to-build-a-stream-cipher-from-a-cryptographic-hash-function">Is it feasible to build a stream cipher from a cryptographic hash function?</a></p> <p>However, my proposed construction differs…</p> <p>Suppose the hash generates N bits. These bits are split into two parts:</p> <ul> <li>$S$ bits are kept secret, </li> <li>$X$ bits are used for the encryption, xor'ing the bytes the usual way</li> <li>$S + X = N$</li> <li>$H_i^S$ is the $S$ bits of the current hash $H_i$, in iteration $i$</li> <li>$H_i^X$ is the $X$ bits of the same hash value</li> <li>$P_i^X$ is $X$ bits of buffered plaintext in iteration $i$</li> <li>$C_i^X$ is $X$ bits of ciphertext in iteration $i$</li> </ul> <p><strong>The algorithm:</strong></p> <ol> <li>generate a random key $K$ that will be shared between the peers </li> <li>$i=0$, generate $H_0 = hash(K)$ </li> <li>$C_i^X = P_i^X \oplus H_i^X$</li> <li>$H_{i+1} = hash(H_i^S|P_i^X)$ </li> <li>$i=i+1$, goto 3.</li> </ol> <p><strong>Analysis:</strong> </p> <p>Even if the attacker has the plaintext and thus can retrieve $H_0^X$, say in the first round, since $H_0^S$ is unknown, he will not be able to calculate $H_1$. If $S$ is sufficiently large, guessing/brute forcing will be unfeasible. On the receiver side, if the stream was tampered, the bytes decoded in that round will have the same bit errors, but then in the next round, the hash's avalanche effect will kick in, making decoding bytes in the next rounds impossible.</p> <p><strong>Note:</strong> </p> <p>The bytes used for xor'ing could come directly from the hash's state (<a href="/questions/tagged/keccak" class="post-tag" title="show questions tagged &#39;keccak&#39;" rel="tag">keccak</a> comes to mind), and the original bytes could go there, too, performing the specific bit mixing operations of the hash after each cipher round.</p> <p><strong>Eg:</strong> </p> <p>For SHA256, 128 bits could be used for $S$, and 128 bits for $X$. Or, 64 bits for $S$ and 192 bits for $X$. The later would result in less processing per byte, with somewhat less security.</p> <p>What is your take on this?</p>
0non-cybersec
Stackexchange
Drowning leopard in India is rescued amidst cheers from onlookers. .
0non-cybersec
Reddit
Turning off Bitlocker for second OS drive?. I have a laptop with two hard drives each running Windows 10. I'd like to have the first drive encrypted by bit locker and the second drive ignored. I can find references to ignoring a second drive if it is a data drive, but not if it is bootable. Is there a way to do this? Thanks!
0non-cybersec
Reddit
Dotted or dashed xrightarrow. <p>I need a dotted or dashed arrow with text like <code>\xrightarrow</code>. </p> <p>I am aware of the <code>MnSymbol</code> package, but <code>\dashedrightarrow</code> does not allow me to write text on the arrow. Is there a package to accomplish what I want to do?</p>
0non-cybersec
Stackexchange
Apache2 Site Only Accessable at Machine&#39;s IP Address. <p>I've got a Raspberry Pi broadcasting a wifi network, I have a 'Hello world' equivalent Python Flask application at /var/www/flask-dev. When I connect to the network on my computer and point my browser at the Pi's IP address (192.168.0.10) the flask application turns up, however, I am trying to get it to display at <a href="http://my.webtool/" rel="nofollow noreferrer">http://my.webtool/</a>. Any advice on how I could get the application to show up at <a href="http://my.webtool/" rel="nofollow noreferrer">http://my.webtool/</a> would be greatly appreciated. I'm sure the answer is going to be super simple, but I just haven't been able to figure it out.</p> <p>/etc/hosts</p> <pre><code>127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.1.1 pi-zero-arcade 127.0.0.1 unseen.arcade 192.168.0.10 my.webtool </code></pre> <p>/etc/apache2/ports.conf</p> <pre><code># If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default.conf Listen 80 &lt;IfModule ssl_module&gt; Listen 443 &lt;/IfModule&gt; &lt;IfModule mod_gnutls.c&gt; Listen 443 &lt;/IfModule&gt; # vim: syntax=apache ts=4 sw=4 sts=4 sr noet </code></pre> <p>/etc/apache2/sites-available</p> <pre><code>&lt;virtualhost *:80&gt; ServerName my.webtool WSGIDaemonProcess webtool user=www-data group=www-data threads=5 home=/var/www/flask-dev/ WSGIScriptAlias / /var/www/flask-dev/webtool.wsgi &lt;directory /var/www/flask-dev&gt; WSGIProcessGroup webtool WSGIApplicationGroup %{GLOBAL} WSGIScriptReloading On Require all granted &lt;/directory&gt; &lt;/virtualhost&gt; </code></pre> <p>/etc/apache2/sites-enabled only has my.webtool.conf inside it.</p> <p>/var/www/flask-dev/webtool.wsgi</p> <pre><code>import sys sys.path.append('var/www/flask-dev') from webtool import app as application </code></pre>
0non-cybersec
Stackexchange
Seth Rogan talking about weed.
0non-cybersec
Reddit
Permutations and combinations on letters. <p>I have given a few problems and i have been using the permutation and combination to solve the problems. However, i am suck at counting. but i do my best though. So, im here to ask a question.</p> <p>how many permutations of the letters abcdef contain at least one of the patterns aeb or bef?? </p> <p>I have my own computation but it seems wrong. </p> <p>I would like to know how you guys solve it. step by step. i have written down a formula and solved it. but my number came out really high which it seems wrong. </p> <p>Thank you</p>
0non-cybersec
Stackexchange
After 6 months of living on my own, I tried not eating out. I.. um... hope these don't kill me..
0non-cybersec
Reddit
OEM Office 2003 without media - how to reinstall?. <p>I'm re-installing windows and I found that I don't have the install disk for my office 2003 (standard edition). I extracted my CD key before the re-install. Where can I find an iso or installer so I can re-install office?</p> <p>There is a similar question <a href="https://superuser.com/questions/229718/oem-office-2010-without-media-how-to-reinstall">here</a> for office 2010 but Microsoft doesnt seem to have anything similar available for office 2003.</p>
0non-cybersec
Stackexchange
Ten Popular Celebrities Who Have Joined The Battle Against AIDS.
0non-cybersec
Reddit
The sunset outside of my work tonight. I usually try to get a photo every evening..
0non-cybersec
Reddit
Generate Centriods of Kmeans in Ascending Order. <p>I am trying to use Kmean algorithm in Python using Sklearn library. My question is, that is there any way in which I can generate centriods in ascending orders. for example here is my code:</p> <pre><code>kmeanDataFrame = pd.DataFrame({'x':X,'y':Y}) kmean = KMeans(init='k-means++',n_clusters = 6,random_state=0, n_init=10) kmean.fit(kmeanDataFrame) print(kmean.labels_) print(kmean.cluster_centers_) </code></pre> <p>Here X and Y are arrays, I am giving data of countries population ranking of different years. Centriods keep changing for instance when I give it 2011 it generates centriods like this:</p> <pre><code>[[ 4.22019639 2.88409457] [ 1.15267995 0.7954897 ] [ 2.49913831 1.64727509] [-1.71104298 -1.54454861] [ 6.99545873 6.08921786] [ 0.20412018 0.0517948 ]] </code></pre> <p>and when I pass in 2012, it generates like this:</p> <pre><code>[[ 0.94596298 0.64243913] [ 4.2710023 3.0083124 ] [-0.27485671 -0.35197801] [ 2.41465001 1.59198646] [-6.514922 -4.53656495] [ 7.77638888 7.18733868]] </code></pre> <p>Is there any way that I can generate centroids in ascending order (first negative points, then positive points) like this:</p> <pre><code>[[-1.71104298 -1.54454861], [ 0.20412018 0.0517948 ], [ 1.15267995 0.7954897 ], [ 2.49913831 1.64727509], [ 4.22019639 2.88409457], [ 6.99545873 6.08921786]] </code></pre>
0non-cybersec
Stackexchange
Bellevue declares emergency, imposes curfew amid protests.
0non-cybersec
Reddit
'Shocking,' 'Plain Stupid': UK's New PM, Theresa May, Shuts Climate Change Office - 'This reshuffle risks dropping climate change from the policy agenda altogether—a staggering act of negligence for which we will all pay the price'.
0non-cybersec
Reddit
Get state of activity (paused / resumed). <p>I am using a LoaderManager to get some data and when it finishes a child fragment should be shown. In some cases this happens when the activity is already in paused state and can not perform the fragment transaction.</p> <p>Is there a way to get the current state of the activity (seems to have a mResume flag)? Or do I have to maintain my own boolean?</p>
0non-cybersec
Stackexchange
Direct sum of compact operators is compact. <p>I have that $T_n$ are bounded operators on $H_n$ ($n\geq 1$) and that $\sup ||T_i||&lt;\infty$. Define $T=\oplus T_n$ and $H=\oplus H_n$. I want to show that $T$ is compact iff $T_n$ is compact for all $n$ and $||T_n||\rightarrow 0$. </p> <p>Here is what I have so far: </p> <p>Assume that $T$ is compact, and let $B_n$ be the unit ball in $H_n$. Then we have that $\overline{T_n(B_n)}$ is a closed subset of $\overline{T(B)}$ (the unit ball in $H$), so we get compactness of $T_n$, and to see that $|T_n|\rightarrow 0$ just note that if the limit didn't go to zero, then for some $\epsilon&gt;0$ there is an infinite subsequence $\{n_i\}$ such that $|T_{n_i}|&gt;\epsilon$. Pick $m$ large, and let $h_{n_i}\in H_{n_i}$ be such that $|T_{n_i}(h_{n_i})|\geq \epsilon$ for $i=1,...,m$. Let $h\in H$ be equal to $h_{n_i}$ in the $n_i$-position and $0$ elsewehere. Then, $|h|=\sqrt{m}$ so $|T(h)/\sqrt{m}|\geq \epsilon \sqrt{m}$, so letting $m\rightarrow\infty$ we get that $T$ is unbounded, a contradiction. </p> <p>For the other direction I am a little stuck, I was thinking of using a theorem that says that for a bounded operator $S$, we have that $S$ is compact iff there is a sequence $S_n$ of operators of finite rank such that $|S-S_n|\rightarrow 0$. Maybe call $S_i$ to be $T_1\oplus...\oplus T_i$, and arguing that $S_i$ has finite rank? I can see that $|T-S_n|\rightarrow 0$ for if $h$ is a unit vector, then $$|(T-S_n)(h)|=|\sum_{n+1}^\infty T_n(h_n)|\leq \sup_{i\geq n+1}|T_i|\rightarrow 0$$, but I don't know where to use the hypothesis that $\sup |T_n|&lt;\infty$ and how to show that $S_n$ has finite rank. </p>
0non-cybersec
Stackexchange
Dnsmasq and Iptables for routing. <p>I'm using a Raspberry Pi with two ethernet ports as a router. The network looks like this.</p> <pre><code>"Internet" &lt;--(…)--&gt; Fritz!Box &lt;--(172.16.x.y)--&gt; [eth1, dhcp] Raspberry Pi [eth0, static] &lt;--(192.168.178.z)--&gt; "Switches, PCs, etc." </code></pre> <p>The Raspberry Pi is running raspbian. It can connect to the internet, update, install software, etc..</p> <p>rc.local looks like this</p> <pre><code>#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi # # iptables-Regeln zum Routing von eth0 auf eth1 lan_if=eth0 wan_if=eth1 # Loopback-Traffic sollte aktiv sein. iptables -A INPUT -i lo -j ACCEPT # Traffic von LAN-Seite aus aktzeptieren iptables -A INPUT -i $lan_if -j ACCEPT ################################### # ROUTING ######################### ################################### # eth1 ist das WAN # eth0 ist das LAN # Aufgebaute Verbindungen zulassen iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Was ist "Masquerade" iptables -t nat -A POSTROUTING -o $wan_if -j MASQUERADE # Weiterleitung iptables -A FORWARD -i $wan_if -o $lan_if -m state --state RELATED,ESTABLISHED -j ACCEPT # Ausgehende Verbindungen von der LAN-Seite zulassen iptables -A FORWARD -i $lan_if -o $wan_if -j ACCEPT # exit 0 </code></pre> <p>dnsmasq.conf:</p> <pre><code>interface=eth0 dhcp-range=192.168.178.2,192.168.178.254,12h dhcp-host=28.D2.44.5B.99.A9,permutare,192.168.178.55,12h dhcp-option=3,192.168.178.1 </code></pre> <p>interfaces:</p> <pre><code># This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # WAN auto eth1 iface eth1 inet dhcp # address 172.16.0.2 # netmask 255.255.0.0 # gateway 172.16.0.1 # dns-nameservers 172.16.0.1 # LAN auto eth0 iface eth0 inet static address 192.168.178.1 </code></pre> <p>"resolvconf" ist installed.</p> <p>Computers in the "192.168.178.z"-network cannot access the internet or computers in the "172.16.x.y" network. They can resolve the IP-adresses of websites they never pinged before, though. What am I doing wrong?</p> <p>Thanks in advance,</p> <p>Markus</p>
0non-cybersec
Stackexchange
Time to stop by your local Goodwill. Decided to do a quick run through of a nearby goodwill today and found this. (https://i.imgur.com/jeGLOra.jpg) (https://i.imgur.com/gp9Wn0i.jpg) I was only going to grab a couple, but was informed by another boardgame thrifter that a nearby store had the same games at half price, sooo...... (https://i.imgur.com/feeU2V3.jpg) Total for everything was around $90 This is in St. Louis, MO. YMMV
0non-cybersec
Reddit
By using properties of determinants show that determinant is equal to $(1+a^2+b^2)^3$. <p>$$\begin{vmatrix}1+a^2-b^2&amp;2ab&amp;-2b\\ 2ab&amp;1-a^2+b^2&amp;2a\\ 2b&amp;-2a&amp;1-a^2-b^2\end{vmatrix}=(1+a^2+b^2)^3$$</p> <p>I have been trying to solve the above determinant. But unfortunately my answer is always coming as: $$1+3a^2+3a^4+a^6+3a^2b^4+3b^2+4a^2b^2+a^4b^2+b^6+3b^4$$ Please help me to solve this problem.</p>
0non-cybersec
Stackexchange
Lips, Colored Pencil. My first serious colored pencil piece!.
0non-cybersec
Reddit
A great beginner garden website... full of information easy to understand..
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
How 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
1 Molecular Communications with Longitudinal Carrier Waves: Baseband to Passband Modulation Weisi Guo1, Bin Li2, Siyi Wang3, Wei Liu4, Abstract—Traditional molecular communications via diffusion (MCvD) systems have used baseband modulation techniques by varying properties of molecular pulses such as the amplitude, the frequency of the transversal wave of the pulse, and the time delay between subsequent pulses. In this letter, we propose and implement passband modulation with molecules that exhibit longitudinal carrier wave properties. This is achieved through the oscillation of the transmitter. Frequency division multiplexing is employed to allow different molecular information streams to co- exist in the same space and time channel, creating an effective bandwidth for MCvD. I. INTRODUCTION Molecular communication has attracted significant research interest in recent years [1]. In terms of application, nano-robots in the medical domain will aim to track and operate on specific targets such as a tumor cell through sensing specific chemicals released by the cancerous region. Single robots of a few microns large that can perform specific simple tasks is already a reality [2]. However, communications between nano-robots in a nano-scale fluidic environment is needed, an environment that is hostile to the energy efficient generation and reliable propagation of acoustic and electromagnetic waves [3]. Molec- ular communications, which exists in nature at both the nano- scale and macro-scale [4], offers certain advantages over wave- based communication systems when there is a need for low energy transmission, as well as when there is an unacceptably high energy loss or input noise to wave propagation [5]. In such scenarios, traditional communication systems that rely on wave propagation may not achieve reliable communications. However, molecules that undergo random walk, which exhibit frequency-domain properties, may yet still assist with the delivery of information. This information is modulated onto the properties of molecules and together they can form an effective wireless information channel. 1 Weisi Guo is with the School of Engineering, The University of Warwick, Coventry, CV4 7AL, UK. (E-mail: [email protected]) 2 Bin Li is with the School of Information and Communication Engineering (SICE), Beijing University of Posts and Telecommunications (BUPT), Beijing, 100876 China. (Email: [email protected]) 3 Siyi Wang is with the Department of Electrical and Electronic Engineer- ing, Xi’an Jiaotong-Liverpool University, Suzhou 215123, China. (E-mail: [email protected]) 4 Wei Liu is with the Communications Research Group, Department of Electronic and Electrical Engineering, The University of Sheffield, Sheffield, S1 3JD, UK. (Email: [email protected]) This work of W. Guo has been supported by the University of Warwick’s International Partnership Fund. This work of B. Li has been supported by Natural Science Foundation of China (NSFC) under Grants 61471061 and the Fundamental Research Funds for the Central Universities under Grant 2014RC0101. The work of S. Wang has been in part supported by the Research Development Fund (RDF-14-01-29) of Xi’an Jiaotong-Liverpool University. A. Review: Molecular Baseband Modulation Fundamentally, molecular communications via diffusion (MCvD) involves modulating digital information onto the property of a single or a group of molecules. Regarding the diffusion channel, consider a 3-dimensional molecular diffusion channel with a transmitter and a receiver separated by distance d, with a molecular diffusivity D and positive drift velocity v. The diffusion channel transfer function as a function of time t is: h(t) = 1 (4πDt) 3 2 exp [ − (d− vt) 2 4Dt ] . (1) For a fixed transmission distance of d, one can observe that there are essentially two main properties to modulate: the number of transmitter molecules M ; and the pulse delay time Tk, such that the channel response is hk(t − Tk). For an input of binary symbols ak ∈ A = {0, 1}, k = 0, 1, . . . ,∞, the output of the baseband modulator is Mk. Existing pulse modulation can be summarized as being one of the following: • Amplitude or Concentration Shift Keying (ASK or CSK) [6], where the information is modulated into different levels of Mk, i.e., Binary ASK: Mk ∈M = {0,M}. • Frequency shift keying (FSK) [7], where a sinusoidal pulse of a variable frequency f is emitted Mk(fk) = M sin(2πfkt), i.e., Binary FSK: fk ∈ F = {0, f}. • Pulse Position Modulation (PPM) [8], where the informa- tion is modulated into the bit delay time T , i.e., Binary PPM: Tk ∈ T = {0, T}. All of the aforementioned modulation schemes has been successfully implemented in hardware, achieving reliable data transfer over a few metres of both free space [9] and maze environments [10]. In addition, the chemical type can be used to encode information, as it is common in nature, which is known as Molecule Shift Keying (MoSK) [11]. However, the complexity of synthesizing and detecting even a small number (∼ 10) of chemical compositions is complex, expensive, and remains largely theoretical [12]. B. Contribution: Molecular Passband Modulation The aforementioned modulations can be regarded as base- band modulation, whereby the resolution of the discrete modulation constellations is fundamentally limited by the inter-symbol-interference (ISI) and the stochastic behaviour of diffusion. Whilst significant efforts have been made towards reducing ISI through coding and signal processing means [13], [14], baseband MCvD communication can only achieve a limited data rate [8], typically less than 1 bit/s per chemical ar X iv :1 50 5. 00 18 1v 1 [ cs .E T ] 1 M ay 2 01 5 2 BASK Transmitted BFSK Transmitted 1, 0, 1, 1, 0, 0, 1, 1, 1, 1 Baseband Passband 1011001111 0 50 100 150 200 250 300 350 400 0 0.5 1 0 100 200 300 400 500 600 700 800 900 0 0.1 0.2 0.3 0.4 0 100 200 300 400 500 600 700 800 900 0 0.05 0.1 0.15 0.2 0.25 0 50 100 150 200 250 300 350 400 -1 -0.5 0 0.5 1 1.5 1, 0, 1, 1, 0, 0, 0, 0, 0, 0 0 100 200 300 400 500 600 700 800 900 0 0.02 0.04 0.06 0.08 0.1 0.12 1011000000 0 100 200 300 400 500 600 700 800 900 0 0.02 0.04 0.06 0.08 0.1 1011001111 1011000000 Received Signals Transmitted Signals Fig. 2. Illustration of two different MCvD modulation techniques and the resulting baseband and passband received signals. M u lt ip le x fc,1 Mk,1 fc,2 Mk,2 fc,N Mk,n … … … C o m m o n D if fu si o n C h a n e l, h (t ) D e -m u lt ip le x hk,1 hk,2 hk,N … … … FFT Band-Pass Filter, fc,1 Threshold Detector FFT Band-Pass Filter, fc,2 Threshold Detector FFT Band-Pass Filter, fc,n Threshold Detector l-wave carriers Fig. 1. Illustration of the modulation, multiplexing, de-multiplexing and demodulation process. type [9]. Without an achievable bandwidth, it is difficult to up- scale the data rate of molecular communications. The concept of a carrier wave, such as that associated with our pre-existing knowledge of electromagnetic (EM) wave communications, has been missing in MCvD. This is due to the fact that until now, MCvD systems lack a continuous wave concept in what is fundamentally a discrete Gaussian kernel diffusion model. This letter sets out to introduce how longitudinal-waves can be added to the aforementioned baseband modulation schemes to create a multiple access channel. We show that multiple independent data streams can be multiplexed and de-multiplexed together. II. CARRIER SIGNAL: LONGITUDINAL-WAVES In most practical molecular diffusion systems [9], real time communications is achieved with an initial release velocity v from the chemical emitter. In effect this creates molecules that exhibit a longitudinal compression wave (l-wave) property, which can be considered as a carrier wave, one that is indepen- dent of the aforementioned baseband modulation schemes (i.e., amplitude, pulse delay, and transversal frequency of pulses). By being able to control different longitudinal carrier wave frequencies fc,n, there is potential for a limitless number of orthogonal molecular communication channels. Let us now consider n ≤ N unique information streams, each transmitting using the same molecular compound and using the same baseband modulation technique. They share a common diffusion channel h(t). In order to reliably multiplex and de-multiplex N signals, we propose a carrier frequency concept. As shown in Fig. 1, each baseband signal Mk,n will be modified by a carrier frequency of fc,n. A. Oscillating Transmitter EM carrier signals are transverse waves, where the os- cillations occur perpendicular to the direction wave travels. In molecular communications, the wave generated by the movement of particles is longitudinal. Consider a transmitter and a receiver that is separated by a distance d0 and the transmitter is allowed to oscillate such that the instantaneous transmission distance varies according to: d(t) = d0 +Ac sin(2πfc,kt), (2) where Ac is the peak amplitude of oscillation and fc,k is the frequency of the carrier signal. Then, the channel response yk,n(t) derived from Eq.(1) is: yk,n(t) = Mk,n (4πDt) 3 2 exp [ − (d0 +Ac sin(2πfc,kt)− vt) 2 4Dt ] . (3) In Fig. 2, we show the baseband and passband results for 3 d(t) k m Transmitter Receiver Fig. 3. Illustration of a potential l-wave carrier signal generation method using an oscillating transmitter. −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 10 −4 10 −3 10 −2 10 −1 10 0 10 1 10 2 10 3 Normalized Frequency M a g n itu d e ( d B ) Signal of the 1st channel Signal of the 2nd channel Signal of the 3rd channel Fig. 4. Frequency response of N = 3 molecular signals multiplexed over a single diffusion channel. a binary ASK/CSK modulation and a binary FSK modulation scheme. In this time domain representation, it can be seen that an oscillatory component has been added, as well as non-linear effects due to the exponential term in the diffusion channel model given in Eq.(1). B. Multiplexing and De-multiplexing In terms of multiplexing implementation, one way this can be implemented is by attaching a spring of stiffness K (N/m) to each transmitter (mass m), such that the l-wave carrier frequency is given by: fc = 1 2π √ K m . This is illustrated in Fig. 3 for a well understood example of creating l-waves, where the spring stiffness can be adjusted to create differ- ent carrier frequencies. Alternative implementations are less mechanical, and can involve digitally controlled compression wave generators at the transmitter. As mentioned previously, the time domain output in Fig. 2 demonstrates non-linear effects of the diffusion channel. We now consider N = 3 independent data channels multiplexed together, each with the same baseband BASK modulation. At the common receiver, after FFT, the frequency response can be seen in Fig. 4. It can be seen that the baseband signal is at 0 normalized frequency. The first harmonic of each signal can be seen distinctively. To view the frequency response more clearly, we extract the n = 1 signal in Fig. 5(top) with its harmonic peaks. The first peak is the useful signal. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −2 10 0 10 2 S p e ct ru m o f re ce ri ve d s ig n a ls 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 −80 −60 −40 −20 0 Normalized Frequency F IR M a g n itu d e ( d B ) 2nd harmonic 3rd harmonic useful signal Fig. 5. (top) Frequency response of n = 1 molecular signal with its harmonic peaks; (bottom) FIR magnitude of the bandpass filter designed to filter the first harmonic (useful signal). 500 1000 1500 2000 2500 3000 −0.2 0 0.2 0.4 0.6 0.8 1 Discrete time index C o n ce n tr a tio n Binary information Filtered signal: 3 channels Fig. 6. Post-filtering results for a order 90 Kaiser bandpass filter. Fig. 5(bottom) shows the FIR magnitude of the bandpass filter designed to filter the useful signal. We use a Kaiser filter (parameter 3.3953) with a centre frequency of fc,n for each n signal and a transition bandwidth of 0.05 normalized frequency. Due to the narrow nature of the bandpass filter, the FIR filter order is 86. Fig. 6 shows the post-filtering results in the time domain for n = 1 in N = 3 multiplexed signals. The results show that the original modulated signal can be fully reconstructed. A similar set of results can also be found for using BFSK baseband modulation using the same methodology. The parameters for the simulated results are as follows: distance d0 = 5m for all channels, diffusivity D = 1cm2/s, the amplitude of oscillation is Ac = 1.67m, and the carrier frequencies for the N = 3 links are: fc,1 = 5Hz, fc,2 = 7.5Hz, and fc,3 = 12.5Hz. 4 0 500 1000 1500 2000 2500 3000 −0.2 0 0.2 0.4 0.6 0.8 1 Discrete time index C o n ce n tr a tio n Binary information Filtered siganl: high−pass filter Fig. 7. Post-filtering results for a order 47 Kaiser highpass filter. III. DISCUSSION AND FUTURE WORK One promising application of molecular communications is likely to be in the nano-scale dimension, especially enabling communication between nano-robots [3]. In order to build energy efficient transmitter and receiver circuits, one particular challenge faced at the receiver side is the need for low-order narrow band bandpass filters, particularly those that can deal with the non-linear effects of the channel. The aforementioned FIR Kaiser bandpass filter needs a FIR filter order of 86. This complexity can be further reduced by using a Kaiser highpass filter, which has a filter order 47. The result is that the sidebands will be included in the filtered signal, but it appears that due to the decaying nature of the sidebands, this has a negligible effect on the final de-multiplexed signal, as shown in Fig. 7. There is scope here for further investigation to find appropriate filter designs for optimal de-multiplexing of molecular signals, with special consideration to the non-linear nature of the channel and the complexity of the filters. Another area of challenge is transmit peak chemical concentration control (analogy to uplink power control). This paper has assumed that the transmission distance for all the channels is fixed and the same. In reality, a multiple access channel is likely to be shared with transmitters at different distances and act as co-chemical channel interference to each other. This is due to the sidebands exhibited in the passband signals shown in Fig.4. The sidebands can not be suppressed due to the diffusion nature of the channel, and any transmit pulse shapes will be diluted in the diffusion process. The sidebands of one channel effectively act as interference for other channels. In order to achieve a similar signal-to-interference ratio (SIR) to each other, careful transmit concentration control must be utilized. IV. CONCLUSION In this paper we have presented a viable way of scaling the data rate of molecular communications by combining baseband modulation techniques with a longitudinal carrier wave generated by an oscillating transmitter. This to the best of our knowledge is the first proven method to create bandwidth for multiple access molecular communications. Our results have shown that N independent data streams using a common baseband modulation technique such as ASK or FSK can be multiplexed together using different carrier waves and then reliably de-multiplexed using bandpass or highpass filters. The authors also point towards two promising areas of research for future work on communication between nano-robots, namely: low-complexity energy efficient filters suited towards non-linear molecular signals, and transmit concentration control for mobile molecular communications. REFERENCES [1] T. Nakano, A. Eckford, and T. Haraguchi, Molecular Communication. Cambridge University Press, 2013. [2] H. Jiang, S. Wang, W. Xu, Z. Zhang, and L. He, “Construcion of Medical NanoRobot,” in IEEE International Conference on Robotics and Biomimetics, 2005. [3] A. Cavalcanti, T. Hogg, B. Shirinzadeh, and H. Liaw, “Nanorobot Communication Techniques: a Comprehensive Tutorial,” in IEEE In- ternational Conference on Control, Automation, Robotics and Vision, Dec. 2006. [4] T. D. Wyatt, “Fifty years of pheromones,” Nature, vol. 457, no. 7227, pp. 262–263, Jan. 2009. [5] I. Llatser, A. Cabellos-Aparicio, and M. Pierobon, “Detection techniques for diffusion-based molecular communication,” IEEE Journal on Se- lected Areas in Communications (JSAC), vol. 31, no. 12, pp. 726–734, Dec. 2013. [6] M. Kuran, H. Yilmaz, T. Tugcu, and I. Akyildiz, “Modulation techniques for communication via diffusion in nanonetworks,” in IEEE Interna- tional Conference on Communications (ICC), 2011, pp. 1–5. [7] M. Mahfuz, D. Makrakis, and H. Mouftah, “On the characterization of binary concentration-encoded molecular communication in nanonet- works,” Elsevier Nano Communication Networks, vol. 1, pp. 289–300, Dec. 2010. [8] K. Srinivas, A. Eckford, and R. Adve, “Molecular Communication in Fluid Media: The Additive Inverse Gaussian Noise Channel,” IEEE Trans. on Information Theory, vol. 8, no. 7, pp. 4678–4692, Jul. 2012. [9] N. Farsad, W. Guo, and A. Eckford, “Tabletop molecular communica- tion: Text messages through chemical signals,” PLOS ONE, vol. 8, Dec. 2013. [10] S. Qiu, W. Guo, S. Wang, N. Farsad, and A. Eckford, “A molecular communication link for monitoring in confined environments,” in IEEE International Conference on Communications (ICC), pp. 718–723. [11] N. R. Kim and C. B. Chae, “Novel modulation techniques using isomers as messenger molecules for nano communication networks via diffusion,” IEEE Journal on Selected Areas in Communications (JSAC), vol. 31, Dec. 2013. [12] M. E. Ortiz and D. Endy, “Engineered Cell-Cell Communication via DNA Messaging,” Journal of Biological Engineering, vol. 6, Sep. 2012. [13] B. Yilmaz and C. B. Chae, “Simulation study of molecular communica- tion systems with an absorbing receiver: Modulation and ISI mitigation techniques,” Elsevier Simulation Model Practice and Theory, vol. 49, Dec. 2014. [14] S. Wang, W. Guo, and M. McDonnell, “Transmit pulse shaping for molecular communications,” in IEEE Conference on Computer Com- munications (INFOCOM) - Workshops, May 2014.
0non-cybersec
arXiv
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
W2C these pants or similar loose pants with taper?.
0non-cybersec
Reddit
Need help with direct proof. <p>So I'm learning about direct proofs, and the first example shown is giving me a headache because I can't figure out how did the professor came up with the end solution. Here's what we need need to prove:</p> <p><a href="https://i.stack.imgur.com/6KmOH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6KmOH.png" alt="enter image description here"></a></p> <p>and the actual proof:</p> <p><a href="https://i.stack.imgur.com/8ndVS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ndVS.png" alt="enter image description here"></a></p> <p>So, the third and the forth lines are really what is confusing to me, how he got there? Can anybody help with what is going on here ?</p>
0non-cybersec
Stackexchange
Choosing subset of vectors to approximate a subspace. <p>Suppose I have a high-dimensional vector space $X$, a subspace $V \subset X$, and a collection of $n$ vectors $\{x_i\}_{i=1}^n \subset X$.</p> <p>My question is: How can I choose a small collection $k &lt; n$ of the vectors $x_i$ so that the span of this smaller collection "well-approximates" the subspace $V$? </p> <p>The notion of "well-approximation" is intentionally left vague since, although it's intuitive that some subspaces approximate each other better than others, it's not clear to me the best way to introduce definitions that make this precise.</p> <p>For concreteness, in my scenario the sizes of the various objects are of the following orders $dim(X)\approx 10000$, $dim(V)\approx 20$, $n\approx 5000$, and $k$ can be varied but has a target of $k \approx 100$.</p> <p>It seems like this should be well studied, but I'm having trouble finding the right terms to search for. In particular, the subject of "subspace approximation" appears to deal with the opposite problem of choosing a subspace to approximate vectors, and the topic of "basis selection" appear to be interested with choosing linear combinations of basis vectors that make certain things sparse - both very different problems from this (as far as I can tell).</p> <p><strong>Edit:</strong> <em>some clarifications based on discussion below</em></p> <ul> <li>The dimension of the space $X$ is larger than the number of candidate basis vectors $x_i$, and the subspace $V$ does not necessairily lie in the span of the $x_i$'s.</li> <li>As an illustrative example of where it might be useful to consider more basis vectors than the dimension of the space being approximated, consider the following situation: $X=\mathbb{R}^4$, $V=span((1,0,0,0))$, $x_1=(1,1,\epsilon,0)$, $x_2=(1,-1,\epsilon,0)$, $x_3=(0,0,0,1)$. It would be useful to choose 2 vectors $x_1$ and $x_2$, even though the space to be approximated, $V$, has dimension 1. </li> <li>Or in 3D, consider the situation in the following picture. You can approximate the space 1D $V$ perfectly with 3 vectors $x_1,x_2,x_3$, very well with 2 vectors $x_1,x_2$, and poorly with only one vector. <img src="https://i.stack.imgur.com/ZlFBG.png" alt="enter image description here"></li> <li>One possible measure of how well a candidate space $\tilde V$ approximates the target space $V$ would be the expected value of the size of the projection of a random unit vector in $V$ onto $\tilde V$. Ie, for a uniformly distributed random unit vector $v \in V$, maximize $\mathbb{E}||\Pi_{\tilde V} v||$. If the approximation is exact this will be 1, otherwise it will be less than 1. Other definitions of "well approximation" may be better, this is just the first thing I thought of.</li> </ul>
0non-cybersec
Stackexchange
Resolution at 480 x 620. <p>I am quite new to Ubuntu and just booted recently it onto my built PC from a USB Stick. Everything works but the screen resolution is at 480x680. </p> <p>I tried:</p> <ul> <li>Going into Display, but the only options I have is 480 x 680.</li> <li>I did xrandr - s 2560x1440 (my resolution) and it says my min is 480x680, current is 480x680, and max 480x680... ah?!</li> <li>I looked at similar posts but they do not seem to apply to me. I am not running Virtual Box, and do not have any other OS but the current version of Ubuntu.</li> </ul> <p>(I also checked drivers, yet the only one I have is: "Using Processor microcode firmware for Intel CPU from intel-microcode. Also, my mobo is from MSI H110M, graphics card NVIDA GTX 1060, and CPU Intel i5 6600.) </p> <p>I hope to be able to use Ubuntu! Any help appreciated. Thanks!!</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Why is the unknotting number of Borromean rings 1?. <p>Wikipedia claims that the unknotting number of the <a href="https://en.wikipedia.org/wiki/Borromean_rings" rel="nofollow noreferrer">Borromean rings</a> is 1, which I believe means that they can be totally separated if we are allowed to pass the rings through themselves in a single place. However it seems that making a single crossing switch in the Borromean rings would always leave two of the rings more linked than they were to start with? What have I misunderstood?</p>
0non-cybersec
Stackexchange
explaining the rate of change of volume with divergence. <p>Now I have to solve this problem below:</p> <blockquote> <p>Show that for every <span class="math-container">$t$</span>, <span class="math-container">$$\dfrac{d}{dt}\text{Vol}(D_t)=\iiint_{D_t}\nabla\cdot\mathbf FdV$$</span></p> </blockquote> <p>Here, for a region <span class="math-container">$D\subset\mathbb R^3$</span> and a vector field <span class="math-container">$\mathbf F$</span>, <span class="math-container">$D_t$</span> is the image of a mapping <span class="math-container">$\Phi_t:D\rightarrow D_t\subset\mathbb R^3$</span>, while <span class="math-container">$\Phi_t$</span> satisfies the condition: <span class="math-container">$$\dfrac{d}{dt}\Phi_t(X)=\mathbf F(\Phi_t(X)),\;\Phi_0(X)=X$$</span> <span class="math-container">$\text{Vol}(D_t)$</span> means the volume of <span class="math-container">$D_t$</span>.</p> <p>I think this should be related to the divergence theorem <span class="math-container">$\displaystyle\iint_{\partial D_t}\mathbf F\cdot\mathbf ndS=\iiint_{D_t}\nabla\cdot\mathbf FdV$</span>, but the thing is that I did not learn the divergence theorem in 3 dimensions since I didn't learn about surface integrals. I also know for the fact that if a square matrix <span class="math-container">$A(t)$</span> is the identity matrix when <span class="math-container">$t=0$</span>, then <span class="math-container">$\left.\dfrac{d}{dt}\right|_{t=0}\det A(t)=\text{trace}\left.\dfrac{d}{dt}\right|_{t=0}A(t)$</span>. Also the definition of divergence I learned is if <span class="math-container">$\mathbf F=(f_1,f_2,f_3),\nabla\cdot\mathbf F=\dfrac{\partial f_1}{\partial x}+\dfrac{\partial f_2}{\partial y}+\dfrac{\partial f_3}{\partial z}$</span>.</p> <p>Any help would be appreciated.</p>
0non-cybersec
Stackexchange
After 25 years of browsing the internet, this is still the craziest video I've seen. Tianjin Explosion, August 12, 2015..
0non-cybersec
Reddit
Me Tarzan, you Jane.... When Jane first met Tarzan in the jungle, she was instantly attracted to him and during her questions about his life, she asked him if he had ever had sex. "Tarzan not know sex." he replied. Jane explained to him what it was. Tarzan said, "Ohhh...Tarzan use knot hole in trunk of tree." Horrified, Jane said, "Tarzan, you have it all wrong, but I will show you how to do it properly." She took off her clothing and lay down on the ground. "Here." she said, pointing to her privates, "You must put it in here." Tarzan removed his loin cloth, showing Jane his considerable manhood, stepped closer to her and kicked her right in the crotch! Jane rolled around in agony for what seemed like an eternity. Eventually, she managed to gasp for air and screamed, "What did you do that for?!" Tarzan replied, "Check for squirrel."
0non-cybersec
Reddit
You awaken, clothes smoking, in a ruined bunker in 1945 with a box containing a 2015-era laptop with Photoshop and Premiere Pro installed, a scanner, photo printer, analog-to-USB input converter and more than enough printer ink and card photo stock. How do you best start screwing with history?.
0non-cybersec
Reddit
Australian Teens Catch "Bacon of the Sea" or Mudcrabs.
0non-cybersec
Reddit
Where is the Keytool application?. <p>I need to use mapview control in android and I can't seem to understand how to run <code>keytool</code>. Is it installed with eclipse? I can't seem to find a download link.</p> <p>Thanks</p>
0non-cybersec
Stackexchange
Stuck in infinite loop. <pre><code>x0=[0.8, 0.8, 0.2, 0.2]'; m0=[0.5,0.5]'; tol=1e-6; syms x y z p m1 m2 h1=y-(x^3)-(z^2); h2=(x^2)-y-p^2; h=[h1;h2]; f=-x; L=f+ m1*h1+m2*h2; h0 = subs(h, {x,y,z,p}, [x0(1,1), x0(2,1), x0(3,1), x0(4,1)]); h0=double(h0); %the system h evaluated at the intial vector g1=gradient(h1, [x, y, z, p]); g2=gradient(h2, [x, y, z, p]); J=[g1 g2]; J0=subs(J, x, x0(1,1)); J0=subs(J0, y, x0(2,1)); J0=subs(J0, z, x0(3,1)); J0=subs(J0, p, x0(4,1)); %J evaluated at the intial vector J0=double(J0) n=size(J0,1); %number of rows in J0 m=size(J0,2); %number of columns in J0 DL=gradient(L, [x,y,z,p,m1,m2]); DL=subs(DL, y, x0(2,1)); DL=subs(DL, z, x0(3,1)); DL=subs(DL, p, x0(4,1)); DL=subs(DL, x, x0(1,1)); DL=subs(DL,m1, m0(1,1)); DL=subs(DL,m2, m0(2,1)); DL=double(DL) DLd=DL(1:n,1); H=hessian(L, [x,y,z,p]); H0 =subs(H,x,x0(1,1)); H0=subs(H0,y,x0(2,1)); H0=subs(H0,z, x0(3,1)); H0=subs(H0,p, x0(4,1)); H0=subs(H0,m1, m0(1,1)); H0=subs(H0,m2, m0(2,1)); H0=double(H0) [Q, R]= qr(J0); Y=Q(1:n,1:m); Z=Q(1:n, m+1:n); qz=Z'*DLd; qh=h0; while norm(qz)+ norm(qh) &gt; tol E=[Z'*H0;J0']; V=[Z'*DLd;h0]; s0=E\-V x0=x0+s0 %the new point J0=subs(J, x, x0(1,1)); J0=subs(J0, y, x0(2,1)); J0=subs(J0, z, x0(3,1)); J0=subs(J0, p, x0(4,1)); J0=double(J0); [Q, R]= qr(J0); Y=Q(1:n,1:m); Z=Q(1:n, m+1:n); r=R(1:m,1:m); T0=[-1 0 0 0]'; %T evaluated at the new vector x0 m0=r\-(Y'*T0); qz=Z'*DLd; h0 = subs(h, {x,y,z,p}, [x0(1,1), x0(2,1), x0(3,1), x0(4,1)]); h0=double(h0); qh=h0; end newvector=[double(x0); double(m0)]; </code></pre> <hr> <p>EDIT: Made some corrections in the code and updated qz and qh inside the loop. However, the code seems to loop forever. the stopping criteria is never violated and x0 continues to change but diverging from the actual solution which is x=(1,1,0,0). I changed the tol to a relatively larger value which is 0.7 and the code generated an output that is near the solution. Could the double precision be causing that problem when the tol=1e-6? </p>
0non-cybersec
Stackexchange
jqGrid Filter Toolbar initial default value. <p>I'm using jqGrid with the filter toolbar, i need to set an initial default filter value to one of the fields so that only rows with status 'Open' are displayed by default, but the user can display Closed rows if desired.</p> <p>At the moment i have a workaround like this</p> <p><code>setTimeout(function() {$('#gs_Status').val('Open');$("#eventsGrid")[0].triggerToolbar()},500);</code></p> <p>but it results in a second request and is pretty bad really.</p> <p>Does anybody know how to do this?</p> <p><strong>Edit</strong>: A bit more research tells me this is probably impossible :(</p>
0non-cybersec
Stackexchange
Set a Data Frame Column as the Index of R data.frame object. <p>Using R, how do I make a column of a dataframe the dataframe's index? Lets assume I read in my data from a .csv file. One of the columns is called 'Date' and I want to make that column the index of my dataframe.</p> <p>For example in Python, NumPy, Pandas; I would do the following:</p> <pre><code>df = pd.read_csv('/mydata.csv') d = df.set_index('Date') </code></pre> <p>Now how do I do that in R?</p> <p>I tried in R:</p> <pre><code>df &lt;- read.csv("/mydata.csv") d &lt;- data.frame(V1=df['Date']) # or d &lt;- data.frame(Index=df['Date']) # but these just make a new dataframe with one 'Date' column. #The Index is still 0,1,2,3... and not my Dates. </code></pre>
0non-cybersec
Stackexchange
Orange Cardamom Pistachio Ice Cream Sundaes[600x1000].
0non-cybersec
Reddit
How to configure display output in IPython pandas. <p>I'm trying to configure my IPython output in my OS X terminal, but it would seem that none of the changes I'm trying to set are taking effect. I'm trying to configure the display settings such that wider outputs like a big <code>DataFrame</code> will output without any truncation or as the summary info.</p> <p>After importing pandas into my script, I have a few options set where I tried a whole bunch, but any one (or all, for that matter) does not seem to take effect. I'm running the script from IPython using <code>%run</code>. Am I doing something wrong here?</p> <pre><code>import pandas as pd pd.set_option('display.expand_max_repr', False) pd.set_option('display.max_columns', 30) pd.set_option('display.width', None) pd.set_option('display.line_width', 200) </code></pre> <p>I've looked at <a href="https://stackoverflow.com/questions/11707586/python-pandas-widen-output-display">some threads</a> on Stack and the <a href="http://pandas.pydata.org/pandas-docs/stable/faq.html" rel="nofollow noreferrer">pandas FAQ</a> to no avail, even when using these under the display namespace (or without), as I've attempted here. </p> <p>I understand that there are some ways around this, such as calling <code>to_string()</code> or <code>describe()</code> methods on your output, but these are very manual, and don't always work as intended in some cases, like one where I have calling <code>to_string()</code> on a <code>groupby</code> object yields:</p> <pre><code> id type 106125 puzzle gameplay_id sitting_id user_id ... 106253 frames gameplay_id sitting_id user_id ... 106260 trivia gameplay_id sitting_id user_id ... </code></pre> <p>My terminal window size is more than sufficient to accommodate the width, and calling <code>pd.util.terminal.get_terminal_size()</code> is correctly finding the window size tuple, so it would seem that auto detecting the size isn't working either. Any insight would be appreciated!</p>
0non-cybersec
Stackexchange
How To Recover Deleted Photos the EASY Way.
0non-cybersec
Reddit
Coke Zero partners with Riot to form a LoL Challenger League as a feed league to LCS.
0non-cybersec
Reddit
New work gpu arrived today!.
0non-cybersec
Reddit
Excel Lookup In Table. <p>I am trying to lookup a value in a table based on the row and column headers (bolded).</p> <p>For example, I have a table:</p> <p><a href="https://i.stack.imgur.com/5cIVL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5cIVL.png" alt="Table"></a></p>
0non-cybersec
Stackexchange
Snoop proving smoking doesn't affect your motor skills.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
What are your thoughts on District 9? It seems to divide some Scifi fans.. I had a discussion with a friend who loved District 9, however i found the movie to be boring. He couldn't comprehend that and kept saying that i 'just didn't understand it'. My friend isn't exactly a big Sci fi fan and i wonder if that had something to do with it. **There are plenty of Sci fi fans on this sub so i wanted to know what you thought of the movie?** >*My ramblings on the movie* (don't bother reading if you don't want, its long and stupid) I think the reason i found it boring was that there was nothing new in the movie. The most interesting part for me was the beginning. I would have liked it if they had focused more upon the ships arrival but the movie only spends a few minutes explaining it. There is certainly a political and social message in there but i didn't feel the sci fi added anything to it. I had already seen Alien Nation so the concept of Alien refugees was nothing new to me. I don't think that the Aliens even needed to be in it. To me, the sci fi feels 'tacked on'. Its a political film first and a sci fi film second. The Science fiction in the movie seems no different to magic, it's never really explained and is only used when the plot needs to be moved along (the arm gun). I think i may have found the movie more interesting if it had abandoned the sci fi element all together. You could have told the same story in a fictional country with a fictional apartheid. If you really had to make it a Sci fi movie, set it 2000 years in the future on Mars and the refugees were the last survivors from a doomed Earth. At least that way i could relate to them. I couldn't relate to the Aliens. The movie brushes over the need for culture by saying that the Aliens were slaves. Even slaves throughout history had their own culture and the poorest favellas in Brazil have culture. There is no connection until the alien with a child pops up and that is portrayed in a very human way. So again i ask, what was the need for the aliens? I don't hate District 9 it was watchable but there was nothing in there for me, as a sci fi fan, to go back and see it again.
0non-cybersec
Reddit
Passing a lambda with moved capture to function. <p>I recently struggled with a bug hard to find for me. I tried to pass a lambda to a function taking a <code>std::function</code> object. The lambda was capturing a noncopyable object.</p> <p>I figured out, obviously some copy must happen in between all the passings. I came to this result because I always ended in an <code>error: use of deleted function</code> error.</p> <p>Here is the code which produces this error:</p> <pre><code>void call_func(std::function&lt;void()&gt; func) { func(); } int main() { std::fstream fs{"test.txt", std::fstream::out}; auto lam = [fs = std::move(fs)] { const_cast&lt;std::fstream&amp;&gt;(fs).close(); }; call_func(lam); return 0; } </code></pre> <p>I solved this by capseling the <code>std::fstream</code> object in an <code>std::shared_ptr</code> object. This is working fine, but I think there may be a more sexy way to do this.</p> <p>I have two questions now:</p> <ol> <li>Why is this error raising up?</li> <li>My idea: I generate many <code>fstream</code> objects and lambdas in a <code>for</code> loop, and for each <code>fstream</code> there is one lambda writing to it. So the access to the <code>fstream</code> objects is only done by the lambdas. I want do this for some callback logic. Is there a more pretty way to this with lambdas like I tried?</li> </ol>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
What is the advantage of using Path.Combine over concatenating strings with &#39;+&#39;?. <p>I don't quite see the difference. </p> <p>What could <code>Path.Combine</code> do better than perfectly working string concatenation?</p> <p>I guess it's doing something very similar in the background.</p> <p>Can anyone tell me why it is so often preferred?</p>
0non-cybersec
Stackexchange
Flexbox, space between cards and text outside the div. <p>Before posting this I saw several question, including</p> <ol> <li><a href="https://stackoverflow.com/questions/48743035/flexbox-space-between-behavior-issue">question</a></li> <li><a href="https://stackoverflow.com/questions/52411582/flexbox-space-between-does-not-generate-space-between-items">question</a></li> <li><a href="https://stackoverflow.com/questions/48743035/flexbox-space-between-behavior-issue">question</a></li> </ol> <p>and also the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" rel="nofollow noreferrer">guide to flex-box of css tricks</a>. However I don't understand how to solve a problem regarding the rendering of some cards that I made. </p> <p><strong><em>Problem</em></strong></p> <p>The behaviour of the cards is not OK: </p> <ul> <li>The text sometimes is going outside (I tried to use <code>word-break: keep all</code>) the cards and I don't understand why</li> <li>Sometimes the space between two cards is 0 pixels. </li> </ul> <p><strong><em>Expected behaviour</em></strong></p> <p>Cards with the text inside them, and that respect the space between them.</p> <p><strong><em>Code</em></strong></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.wrapper{ min-height: 100vh; background-color: lightgray; display: flex; flex-direction: column; } .content { height:auto; flex: 1; background: #FAFAFA; display: flex; color: #000; } .columns{ display: flex; flex: 1; } .main{ z-index:1; flex: 1; background: #eee; } .sidebar{ overflow: auto; text-align: center; z-index: 1; height: 100%; width: 40%; background: white; } .title{ font-size: 25; margin-bottom: -20px; width: 100%; } .photo{ border-top-left-radius: 10px; border-top-right-radius: 10px; background-position: center center; background-repeat: no-repeat; background-size: cover; width: 100%; height: 50%; } .rating{ font-size: 20px; } .card { cursor: pointer; text-overflow: ellipsis; background-color: white; text-decoration: none; border-radius: 10px; box-shadow: 1px 1px 50px black; margin:auto; width: 55%; height: 320px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; margin-top: 50px; margin-bottom: 50px; word-break:keep-all; padding: 0px; } a{ text-decoration: none; text-decoration-color: black; color: black; } .address{ font-size: 20px; padding: 20px; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Restosearch&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;link href="style.css" rel="stylesheet" type="text/css"&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- Menu down below --&gt; &lt;div class="circle"&gt;&lt;/div&gt; &lt;button class="btn"&gt; &lt;span class="btn__line"&gt;&lt;/span&gt; &lt;span class="btn__line"&gt;&lt;/span&gt; &lt;span class="btn__line"&gt;&lt;/span&gt; &lt;/button&gt; &lt;div class="full-menu"&gt; &lt;div class="layer"&gt;&lt;/div&gt; &lt;nav class="nav"&gt; &lt;ul class="nav__list"&gt; &lt;li class="nav__item"&gt; &lt;a href="#" class="nav__link"&gt; Home &lt;/a&gt; &lt;/li&gt; &lt;li class="nav__item"&gt; &lt;a href="#" class="nav__link"&gt; About &lt;/a&gt; &lt;/li&gt; &lt;li class="nav__item"&gt; &lt;a href="#" class="nav__link"&gt; Portfolio &lt;/a&gt; &lt;/li&gt; &lt;li class="nav__item"&gt; &lt;a href="#" class="nav__link"&gt; Contacts &lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/div&gt; &lt;!-- Menu up above --&gt; &lt;!-- Input, maps and cards down below --&gt; &lt;main&gt; &lt;div class="container"&gt; &lt;div class="box"&gt; &lt;div&gt; &lt;h2 style=""&gt;Search the closest restaurant&lt;/h2&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="downBox"&gt; &lt;input id="pac-input" class="controls" type="text" placeholder="insert here: yourNation, yourCity, yourStreet"&gt; &lt;/div&gt; &lt;div class="divider"&gt;&lt;/div&gt; &lt;div class="wrapper"&gt; &lt;section class="content"&gt; &lt;div class="columns"&gt; &lt;main class="main"&gt; &lt;div id="map"&gt;&lt;/div&gt; &lt;/main&gt; &lt;aside class="sidebar" style="background-color: gainsboro"&gt; &lt;/aside&gt; &lt;/div&gt; &lt;/section&gt; &lt;/div&gt; &lt;div class="divider"&gt;&lt;/div&gt; &lt;!-- this section will appear only when you click on a card --&gt; &lt;!-- Ricorda di settare i css per queste sezioni, il titolo deve essere circa alto 20/ 30 % --&gt; &lt;div class="wrapperTwo detail"&gt; &lt;section class="content"&gt; &lt;div class="columns"&gt; &lt;aside class="sidebarTwo" style=""&gt; &lt;div class="placeInfo"&gt; &lt;/div&gt; &lt;/aside&gt; &lt;main class="mainTwo"&gt; &lt;div class="detailtitle"&gt;&lt;h2&gt;Titolo del ristorante qua&lt;/h2&gt;&lt;/div&gt; &lt;hr&gt; &lt;div class="review"&gt; &lt;/div&gt; &lt;/main&gt; &lt;/div&gt; &lt;/section&gt; &lt;/div&gt; &lt;!-- Input, maps and cards up above --&gt; &lt;/main&gt; &lt;/body&gt; &lt;script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"&gt;&lt;/script&gt; &lt;script src="script.js"&gt; &lt;/script&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?key=MyApi&amp;libraries=places&amp;callback=initAutocomplete" async defer&gt;&lt;/script&gt; &lt;/html&gt;</code></pre> </div> </div> </p> <p>Every card is generated dynamically with this code:</p> <pre><code> $(".sidebar").append("&lt;div class=\"card\" id=\"" + idPlace +"\"&gt;&lt;img src=\"" + photoMarker + " \"class=\"photo\"&gt;&lt;div class=\"title\"&gt;&lt;h6&gt;" + name +"&lt;/h6&gt;&lt;/div&gt;&lt;div class=\"rating\"&gt;&lt;p&gt;Rating: " + rating + "&lt;/div class=\"address\"&gt;&lt;p&gt;" + address + "&lt;div class=\"space\"&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;"); </code></pre> <p>This is the resulting card in the HTML structure:</p> <pre><code>&lt;div class="card"&gt; &lt;img src="https://images.pexels.com/photos/7919/pexels-photo.jpg?auto=compress&amp;cs=tinysrgb&amp;dpr=2&amp;h=750&amp;w=1260" class="photo"&gt; &lt;div class="title"&gt;&lt;h4&gt;&lt;/h4&gt;&lt;/div&gt; &lt;div class="rating"&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;/div&gt; </code></pre> <p><strong><em>Codepen</em></strong></p> <p><a href="https://codepen.io/legeo/pen/MPavXb" rel="nofollow noreferrer">codepen here</a></p> <p>A note about this codepen: I don't understand why, but in Chrome the layout of the row into the div <code>wrapper</code> is fine, however in the codepen it is not. I'm definitely missing something, so any advice will be really appreciated.</p> <p><strong><em>Update</em></strong></p> <p>As suggested in the comments i updated the codepen, now you can see differents card in the right sidebar and as you can see the problems are: </p> <ul> <li>the text go outside the card space</li> <li>the cards are too closer</li> <li>the sidebar aren't able to read the property of the overflow, in my chrome as you can see the sidebar has a vertical scrollbar. </li> </ul>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
The mapping $T:(a,b)→ (at^2,bt^3)$ of $V_2$ (R) into itself is a linear transformation.. <p>The mapping <span class="math-container">$T:(a,b)→ (at^2,bt^3)$</span> of <span class="math-container">$V_2$</span> (R) into itself is a linear transformation.<br> is it a correct statement or not ?</p>
0non-cybersec
Stackexchange
Baby elephant doesn't want to share a pool (x-post from /r/babyelephantgifs).
0non-cybersec
Reddit
Cronuts: Half Doughnut Half Croissant [634x587].
0non-cybersec
Reddit
[B&A] My first before and after! I've been feeling bright colours with the recent arrival of spring. CCW..
0non-cybersec
Reddit
How do I reconnect my Amazon RDS database to my EC2 instance after restarting?. <p>I'm running a staging site through an EC2 instance which I stopped earlier tonight, without being aware that Amazon would give me a new IP address.</p> <p>I've already edited all my database info in my site files with the new IP info and pushed them live. I'm certain that everything is correct. The site is showing up at the proper IP address too.</p> <p>But I'm getting a "Unable to connect to database server. Please refresh in a few seconds." This would make me think that the database credentials were wrong, but I've double and triple checked them, and it turns out that the old database credentials are not working when I input them into Adminer (v4.3.1 in case it's important). It's like the database itself simply disappeared when I reset the server.</p> <p>I happen to have a backup copy of the database on my laptop, so I can restore a new one in case AWS did somehow manage to delete it.</p> <p>Can anyone clue me into what might be going on and how I might fix it? Thanks!</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
R - problem with foreach %dopar% inside function called by optim. <p>Calling a function that includes foreach %dopar% construct from optim causes an error:</p> <pre><code>&gt; workers &lt;- startWorkers(6) # 6 cores &gt; &gt; registerDoSMP(workers) &gt; &gt; t0 &lt;- Sys.time() &gt; &gt; optim(w,maxProb2,control=list(fnscale=-1)) &gt; &gt; Error in { : task 1 failed - "unused argument(s) (isPrebuilt = TRUE)" &gt; &gt; Sys.time()-t0 &gt; &gt; Time difference of 2.032 secs &gt; &gt; stopWorkers(workers) </code></pre> <p>The called function looks like that:</p> <pre><code>&gt; maxProb2 &lt;- function(wp) { &gt; &gt; r &lt;- foreach (i=s0:s1, .combine=c) %dopar% { pf(i,x[i,5],wp,isPrebuilt=TRUE) } &gt; &gt; cat("w=",wp,"max=",sum(r),"\n") &gt; &gt; sum(r) &gt; &gt; } </code></pre> <p>pf is some other function, x is a static table of pre-computed elements.</p> <p>Also calling the function to be optimized just once causes the same error:</p> <pre><code>&gt; workers &lt;- startWorkers(6) # 6 cores &gt; &gt; Warning message: &gt; In startWorkers(6) : there is an existing doSMP session using doSMP1 &gt; &gt; registerDoSMP(workers) &gt; &gt; maxProb2(w) &gt; Error in { : task 1 failed - "unused argument(s) (isPrebuilt = TRUE)" &gt; &gt; stopWorkers(workers) </code></pre> <p>What's strange, the identical code works fine when called directly a single time (optim calles the same function many times):</p> <pre><code>&gt; workers &lt;- startWorkers(6) # 6 - ilosc rdzeni &gt; &gt; Warning message: &gt; In startWorkers(6) : there is an existing doSMP session using doSMP1 &gt; &gt; registerDoSMP(workers) &gt; &gt; r &lt;- foreach (i=s0:s1, .combine=c) %dopar% { pf(i,x[i,5],w,isPrebuilt=TRUE) } &gt; &gt; sum(r) &gt; [1] 187.1781 &gt; &gt; stopWorkers(workers) </code></pre> <p>The called function (maxProb2) works fine, when %do% is used instead of %dopar%.</p> <p><strong>How can I correctly call a function including a foreach %dopar% construction?</strong></p> <p>UPDATE 2011-07-17:</p> <p>I have renamed the pf function into probf but the problem remains.</p> <p>probf functions is defined in the script, not in some external package.</p> <p>Two notes: OS: Windows 7, IDE: Revolution Analytics Enterprise 4.3</p> <pre><code>&gt; workers &lt;- startWorkers(workerCount = 3) &gt; &gt; registerDoSMP(workers) &gt; &gt; maxProb2(w) &gt; Error in { : task 1 failed - "could not find function "probf"" </code></pre>
0non-cybersec
Stackexchange
Hoth Easter Egg in Saints Row IV.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange