text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
[WP] An ordinary person suddenly gets sent to a magical world. However, nothing terrible is actually going on, and there's nothing that needs saving..
0non-cybersec
Reddit
The shower tiles in my apartment.
0non-cybersec
Reddit
How can I get the relative position of a cell in a range?. <p>I have a range of cells in a workbook, and I want to dynamically replicate them in another workbook. I don't want to use explicit cell references in case the range is moved, I always try to use named ranges for cross-workbook references. So I want to enter a formula in the replicated workbook that uses the named range to get the value that is in the same position. I need to calculate what values to use in the parameters to the OFFSET() function.</p> <p>What I want is something like this:</p> <pre><code>=OFFSET('Book1'!NamedRange,x,y) </code></pre> <p>What can I put into x and y to calculate the current cell's relative position within a same-sized area in Workbook 2?</p> <p>Or, is there another way to replicate a named range from one workbook into another?</p>
0non-cybersec
Stackexchange
How I shot a craft brewery.
0non-cybersec
Reddit
Let $p$ be a prime number. Prove that in the field $\mathbb Z_p$ the following is true $(x+y)^p= x^p + y^p$. <blockquote> <p>Let $p$ be a prime number. Prove that in the field $\mathbb Z_p$ the following is true $(x+y)^p= x^p + y^p$</p> </blockquote> <p>My idea to do this is to apply the binomial theorem, namely: <br> $$(x+y)^p = x^p + px^{p-1}y+ {p \choose 2}x^{p-2}y^2+ \dots+ {p \choose {p-2}}x^2y^{p-2}+ pxy^{p-1} + y^p$$ Now, I have made an observation (I do not know if this is true): <br> $$(\forall n)((n \in \mathbb Z_5 \land n \ne 0 \land n \ne p) \Rightarrow (\exists q\in \mathbb Z_p)({p\choose n}= pq) $$ And so all of these elements corresponding to $n \in \{1,2, \dots, p-2, p-1 \}$ will turn into zeros, and the only remaining elements will be $x^p$ and $y^p$. Is my reasoning good? If so, should I have used induction here?</p>
0non-cybersec
Stackexchange
Medieval Chess scene casemod, Analog and digital game in the same place..
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
Silver Screen Shower Scene. Imagine, if you will, you coming out of your bedroom to go to the bathroom in the middle of the night fresh out of rubbing one out. Your hand is still in your underwear, your face is flushed and you're missing a sock. It's darker than the devil's asshole in the hallway so you reach out for the switch with your cleaner hand and flick it on and you see at the end of the hall, staring right back at you, the very living example of all those aliens you saw on the discovery channel. Big fucking huge black eyes in a bigger head and a slender, slate gray body and spindly spider fingers at the end of its skinny arms. Your body stops and your heart goes supersonic as you feel the contents of your bladder empty into the tissue in your hand. It runs from your sight and you scream. Or at least try to. The only sound leaving your mouth is a dry gasp like some retarded fish out of water. And here you are, dick in hand, half-undressed and making your first impression on the one thing you hoped never to meet. That's when the white lights come on from every where with a noise not unlike the sound of God telling you to go fuck yourself and your second attempt at a scream results in your projectile vomiting all over the hallway floor before you faint and it all goes black. This was Tuesday.
0non-cybersec
Reddit
Spark 2.1: Out of Memory when Writing DataFrame to parquet file?. <p>I am trying to write a DataFrame (approx 14 million rows) to a local parquet file, but I keep running out of memory doing so. I have a big map <code>val myMap : Map[String,Seq[Double]]</code> and use this map in a <code>udf</code> for a very large DataFrame via <code>val newDF = df.withColumn("stuff",udfWithMap)</code>. I have 128G of RAM available and after persisting the DataFrame to DISK_ONLY and performing <code>df.show</code>, I still have around 100G of RAM left. However, when I try <code>df.write.parquet</code>, the amount of memory Spark needs skyrockets and I run out of memory. I have also tried broadcasting <code>myMap</code>, but doing so doesn't seem to have any effect on memory. What is the problem?</p> <p>This is a sample of my code:</p> <pre><code>scala&gt; type LookupMapSeq = (String, Seq[Double]) scala&gt; val myMap = sc.objectFile[LookupMapSeq]("file:///data/dir/myMap").collectAsMap() /* myMap.size is about 150,000 and each Seq[String] is of size 200 */ scala&gt; val combineudf = functions.udf[Seq[Double], Seq[String]] { v1 =&gt; val wordVec = v1.map(y =&gt; myMap.getOrElse(y, Seq.fill(200)(0.0))) wordVec.foldLeft(Seq.fill(200)(0.0)) { case (acc, list) =&gt; acc.zipWithIndex.map { case (value, i) =&gt; value + list(i) } } } scala&gt; import org.apache.spark.storage.StorageLevel scala&gt; val df6 = df3.withColumn("sum", combineudf(df3("filtered"))).persist(StorageLevel.DISK_ONLY) scala&gt; df6.show +--------+--------------------+--------------------+------------------- -+ | pmid| filtered| TFIDFvec| sum| +--------+--------------------+--------------------+--------------------+ |25393341|[retreatment, rec...|[0.0, 26.21009534...|[4.34963607663623...| |25394466|[lactate, dehydro...|[21.3762879413052...|[-17.550128685500...| |25394717|[aim, study, inve...|[3.11641169932197...|[-54.981726214632...| scala&gt; df6.write.parquet("file:///data/dir/df6") /* This results in out of memory */ </code></pre>
0non-cybersec
Stackexchange
How to log JDBC connection activity?. <p>How can I see when my pooling library (C3P0) is creating and closing JDBC connections?</p> <p>Note: I have done research on this and already found a solution. I'm posting it here so that it may be useful to others and I can refer back to it in case I forget it in future. </p> <p>Other approaches/answers are welcome.</p>
0non-cybersec
Stackexchange
Cable Management *_*.
0non-cybersec
Reddit
subprocess gets killed even with nohup. <p>I'm using <code>subprocess.Popen</code> to launch several processes.</p> <p>The code is something like this:</p> <pre><code>while flag &gt; 0: flag = check_flag() c = MyClass(num_process=10) c.launch() </code></pre> <p><code>MyClass</code> if something like the following:</p> <pre><code>MyClass(object) def __init__(self, num_process): self.num_process = num_process def launch(self): if self.check_something() &lt; 10: for i in range(self.num_process): self.launch_subprocess() def launch_subprocess(self): subprocess.Popen(["nohup", "python", "/home/mypythonfile.py"], stdout=open('/dev/null', 'w'), stderr=open('logfile.log', 'w'), shell=False) </code></pre> <p>In most of the cases, the launched subprocess dies, sometimes in the middle of the run. In some cases, it completes.</p> <p>However, if I use <code>subprocess.Popen</code> directly in the while loop, the process continues and finished timely.</p> <p>Could someone tell me how can I get the processes to run in the background by using subprocess in the way as I described above?</p>
0non-cybersec
Stackexchange
Master Scholarships in Management and Information Systems, University of Manchester.
0non-cybersec
Reddit
Difficulty understanding Javascript composing in this function. <p>Im following this course and came across this problem</p> <pre><code>const compose = (f, g) =&gt; (a) =&gt; f(g(a)); const add1 = (num) =&gt; num + 1; const add5 = (num) =&gt; num + 5; compose(add1, add5)(10) </code></pre> <p>As i understand it <code>g(a)</code> gets run first so <code>num = 1</code> makes <code>1</code> for <code>g</code> and <code>10</code> for <code>a</code>, that makes it <code>f(1(10))</code>. But how does the <code>1</code> and the <code>10</code> know to add, why doesn't it multiply or minus ?</p>
0non-cybersec
Stackexchange
PREPARE FOR TROUBLE.
0non-cybersec
Reddit
Package inputenc Error: Unicode character (U+200E) (inputenc) not set up for use with LaTeX. <p>I am new to LaTeX. I have searched my question but I couldn't find solution.</p> <p>When I export to PDF I am getting the error. ! Package inputenc Error: Unicode character (U+200E) (inputenc) not set up for use with LaTeX.</p>
0non-cybersec
Stackexchange
The heartbeat graphic continues in the door grain..
0non-cybersec
Reddit
Stabilizer of a 4 by 4 skew symmetric matrix by orthogonal matrix. <p>Matrices are over the field of complex numbers, and $X^t$ means transpose of a matrix $X$.</p> <p>Consider the group action of $O(4)=\{P\mid PP^t=I\}$ on $SK(4)=\{M\mid M^t=-M\}$ by $(P,M) \rightarrow PMP^t$. Does anyone know what is the stabilizer of a general $M$?</p> <p>Thank you!</p>
0non-cybersec
Stackexchange
How blockchain.info calculate the value transacted. <p>Having this address: <a href="https://blockchain.info/address/19tqZYnP9youKtbene2FZiZtZyJYaLeBDw" rel="nofollow noreferrer">https://blockchain.info/address/19tqZYnP9youKtbene2FZiZtZyJYaLeBDw</a></p> <p>The last transaction says that this address received <code>0.0236 BTC</code></p> <p>But even knowing the value in and the value out I am not able to calculate that value: <a href="https://blockchain.info/tx/831c976cb54f27e5a496db749fc9e865c8e077006225d1dfaf61d998fe5a3186" rel="nofollow noreferrer">https://blockchain.info/tx/831c976cb54f27e5a496db749fc9e865c8e077006225d1dfaf61d998fe5a3186</a></p> <pre><code>In: --- 15Rhv2dsEjFaHzMhPsjGmFxgqCRhCmggjj (0.04583825 BTC - Output) 13LwYeB93Bmo2aWqGyK1ybtF9JiupPFVey (0.029625 BTC - Output) 1BxdV34eTe1YJBJpScGx6jRRVDQBeRf5qj (0.00696224 BTC - Output) Out: ---- 1BTvKHzbfm3RjPMxDZSsG2YYuaEHgfdJNP - (Spent) 0.00045884 BTC 1NCLWFw6F2nJ2pgBWy96K37rbx7VSLZs66 - (Unspent) 0.00239111 BTC 1D7BNbWBPuL22TW6WuoSq5sRrbPAxeJw8g - (Spent) 0.0156 BTC 19tqZYnP9youKtbene2FZiZtZyJYaLeBDw - (Unspent) 0.0236 BTC 1wLbaePtYhh2t5Cgd5NF59LX6Pooe1yLH - (Spent) 0.00920259 BTC 3HXAkXTYvtLzYuudDfNZBMSoueUtvdwXAz - (Unspent) 0.03036754 BTC </code></pre> <p>What I tried is sum all the In's and then substract the Out that has been spent and the fees.</p> <p>What I am doing wrong? How I can calculate 0.0236 BTC</p>
0non-cybersec
Stackexchange
5 Best Google doodles of 2015 so far.
0non-cybersec
Reddit
How To Beat Iowa OWI.
0non-cybersec
Reddit
Using xargs to generate links. <p>I have a <code>file</code> that looks like this:</p> <pre><code>abc,123,x xabc,345,xy cabc,6234,ab abgc,12,yo jabc,9991,to </code></pre> <p>I need to generate a list of links:</p> <pre><code>http://www.mywebsite.com?param1=abc&amp;param2=123&amp;param3=x http://www.mywebsite.com?param1=xabc&amp;param2=345&amp;param3=xy </code></pre> <p>...and so on.</p> <p>How do I do this with <code>xargs</code>/<code>sed</code> or whatever?</p>
0non-cybersec
Stackexchange
UTF - 8 with JPA and Glassfish 4.0. <p>I am having difficulties with UTF-8 characters. This is a simple JSF project. I use JSF 2.2 and Glassfish 4.0</p> <p>I have a method where I go:</p> <pre><code>em.persist(user); </code></pre> <p>When I debug</p> <pre><code>user.getName() </code></pre> <p>in this point, I can see the utf-8 characters in my IDE. Also I keep the string in a session - bean and I can see them on the browser fine as well. </p> <p>Only when they are persisted to DB, they are persisted as: ?????</p> <p>I can also edit the DB myself and save utf-8 characters. What I mean is, my SQL configuration is good for UTF-8.</p> <p>The problem is somewhere in JPA. </p> <p>This is what I have tried: ( all together: )</p> <p>persistence.xml</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"&gt; &lt;persistence-unit name="Persistence" transaction-type="JTA"&gt; &lt;jta-data-source&gt;fus&lt;/jta-data-source&gt; &lt;class&gt;com.tugay.fup.core.model.User&lt;/class&gt; &lt;properties&gt; &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/fus?useUnicode=yes&amp;amp;characterEncoding=UTF-8"/&gt; &lt;/properties&gt; &lt;/persistence-unit&gt; &lt;/persistence&gt; </code></pre> <p>This is glassfish-web.xml:</p> <pre><code>&lt;glassfish-web-app&gt; &lt;parameter-encoding default-charset="UTF-8"/&gt; &lt;/glassfish-web-app&gt; </code></pre> <p>And I am using EntityManager managed by container (transaction type = JTA)</p> <p>So in JDBC connection pools in Glassfish I have:</p> <pre><code>jdbc:mysql://localhost:3306/fus?useUnicode=true&amp;connectionCollation=utf8_general_ci&amp;characterSetResults=utf8 </code></pre> <p>for: property: URL...</p> <p>However none of these help.</p> <p>Still characters not persisted correctly.</p>
0non-cybersec
Stackexchange
Everything you need to fuck with the NSA: DNA Spoofing, Stealth Wear, Anit Phone Tracking, Camoflash, etc.
0non-cybersec
Reddit
Ive been waiting all year to post this. This
0non-cybersec
Reddit
show file size and file owner. <p>I am checking the file sizes of /tmp directory using du -h, but I also would like to have the ownership information of those files. There is a simple way to do this? I looked at the du manual and it seems to not have any option for this. </p> <p>Thank's in advance. </p>
0non-cybersec
Stackexchange
How can I see whether the last Microsoft Windows 10 restart was caused by Windows update?. <p>How can I see whether the last Microsoft Windows 10 restart was caused by Windows update?</p> <p>I use Microsoft Windows 18.03 "Professional".</p>
0non-cybersec
Stackexchange
AITA for sleeping with my best friends ex gf?. So my bestfriend/roomate was dating this girl that he met from our job (we both work at the same UPS hub). He works the evening shift, while I work the graveyard shift and there's this girl I saw that I was really attracted to. I was reluctant to approach her because I am her indirect supervisor ( She wasn't my dedicated employee but I would frequently cover for her supervisor or relay directions to her group for operational purposes) Fast forward they have been dating for a year or more. One day he ends the relationship and they go their separate ways. He didn't feel the same way about her that she did towards him. I made no effort to talk to her whatsoever. Fast forward again about a year and a half later he has a new gf that he's really serious about. One day his ex reaches out to me to buy some weed from me (I was growing at the time and would post pictures om my snapchat). I met up with her to sell her some bud and she asked me to hangout for a little bit and I agreed. I had absolutely no intention of hooking up with her, because of her history with my roommate, but one thing led to another and we ended up sleeping together. It happened several more times after this mainly because I felt very comfortable around her and enjoyed her company. One day I decided to tell him what was going on, because I don't like to keep secrets from my close friends. Initially he just brushed it off, but the next day he told me he felt like I betrayed him and it was fucked up that I had hooked up with her on several different occasions. For me I feel like I did nothing wrong because i didn't initiate or seek her out, but also because he was the one who broke up with her and on top of that it has been well over a year AND he has a new gf who he is in love with. He said he still has strong feelings for her and if that's true than why did you end the relationship? He told me to promise him that I would never see her again and I agreed. Am I wrong for wanting to be around someone that makes me feel like I am cared about eventhough they have history with a very close friend of mine? I didn't want to get inimate with her, she initiated it and I didn't stop her because it felt right and I was very lonely. Is it more important that I keep him happy or pursue my own happiness? TLDR; my roommate broke up with his gf a year and a half ago and currently has a new gf. His ex contacted me and we ended up getting intimate with eachother unintentionally (at least on my behalf I can't speak for her intentions). I felt the need to confess this to him and he feels like I betrayed our friendship and wants me to promise never to talk to her again. He feels like he can't trust me anymore.
0non-cybersec
Reddit
Creating several precompiled header files using GNU make. <p>I use gcc (running as <code>g++</code>) and GNU make. I use gcc to precompile a header file <code>precompiled.h</code>, creating <code>precompiled.h.gch</code>; the following line in a Makefile does it:</p> <pre><code># MYCCFLAGS is a list of command-line parameters, e.g. -g -O2 -DNDEBUG precompiled.h.gch: precompiled.h g++ $(MYCCFLAGS) -c $&lt; -o $@ </code></pre> <p>All was well until i had to run <code>g++</code> with different command-line parameters. In this case, even though <code>precompiled.h.gch</code> exists, it cannot be used, and the compilation will be much slower. In the gcc documentation i have read that to handle this situation, i have to make a directory called <code>precompiled.h.gch</code> and put the precompiled header files there, one file for each set of <code>g++</code> command-line parameters.</p> <p>So now i wonder how i should change my Makefile to tell <code>g++</code> to create the gch-files this way. Maybe i can run <code>g++</code> just to test whether it can use any existing file in the <code>precompiled.h.gch</code> directory, and if not, generate a new precompiled header with a unique file name.</p> <p>Does gcc have support for doing such a test?</p> <p>Maybe i can implement what i want in another way?</p>
0non-cybersec
Stackexchange
Why can&#39;t I use a list as a dict key in python?. <p>I'm a bit confused about what can/can't be used as a key for a python dict. </p> <pre><code>dicked = {} dicked[None] = 'foo' # None ok dicked[(1,3)] = 'baz' # tuple ok import sys dicked[sys] = 'bar' # wow, even a module is ok ! dicked[(1,[3])] = 'qux' # oops, not allowed </code></pre> <p>So a tuple is an immutable type but if I hide a list inside of it, then it can't be a key.. couldn't I just as easily hide a list inside a module?</p> <p>I had some vague idea that that the key has to be "hashable" but I'm just going to admit my own ignorance about the technical details; I don't know what's really going on here. What would go wrong if you tried to use lists as keys, with the hash as, say, their memory location?</p>
0non-cybersec
Stackexchange
Python: Summing x elements in a list. <p>i wasn't able to find the answer using the search function so i am starting this thread.</p> <p>Consider having a list that is divideable by x. For example:</p> <pre><code>onetonine = [1,2,3,4,5,6,7,8,9] </code></pre> <p>The example x would be 3 in this case.</p> <p>Now i want to create a new list with </p> <pre><code>len(onetonine)/x </code></pre> <p>elements, which would mean 3 elements.</p> <p>The important part is, that i want the elements of the new list to be the sum of every x elements of the old list. This means:</p> <pre><code>newlist = [6, 15, 24] </code></pre> <p>So basically take x=3 elements of my old list and add them. Repeat until done.</p> <p>I wasn't able to get a working solution for this so i am asking for help.</p> <p>Thank you.</p>
0non-cybersec
Stackexchange
graphviz: record node with a bold title. <p>I'm trying to use graphviz to do something similar to UML class diagrams.</p> <p>I wonder whether there is a way to make a node of style 'register' have its first field in a bold font, to make it different from the other fields.</p> <p>My node looks like this:</p> <pre><code>digraph i { "node" [ label = "&lt;f0&gt; title | &lt;f1&gt; index | ... | &lt;f2&gt; field1 | &lt;f3&gt; field2" shape = "record" ]; } </code></pre> <p>I tried this but it doesn't work: (embedding html)</p> <pre><code>digraph i { "node" [ label = "&lt;f0&gt; &lt;B&gt;title&lt;/B&gt; | &lt;f1&gt; index | ... | &lt;f2&gt; field1 | &lt;f3&gt; field2" shape = "record" ]; } </code></pre>
0non-cybersec
Stackexchange
Ken and Josh, two good friends, are hiking up a mountain. Ken needs to take a piss, so he goes over to do his business. A snake slithers over and bites him on his manhood. Ken screams in pain and Josh runs down to the base camp to tell the medic. The medic explains that this type of snake has deadly venom and the only way Ken will survive is if Josh sucks the venom out. Josh runs back up to where Ken is writhing in pain. "What did the medic say?" Ken asks. Josh replies, "He says you're gonna die."
0non-cybersec
Reddit
POC and White Paper on Writing Values Regedit Cannot Export or Display.
1cybersec
Reddit
Facebook ‘Fundraises’ for NYC Attack Before Details Emerge.
0non-cybersec
Reddit
How small must $x$ be to have $\frac{1}{2} \cdot 10^{-8}$ accuracy?. <blockquote> <p>For small values of $x$, how good is the approximation $cos(x)\approx 1$? How small must $x$ be to have $\frac{1}{2} \cdot 10^{-8}$ accuracy?</p> </blockquote> <p>My teacher told me, it would be easier to do the second part of the question first, so I need to find out how small $x$ be to have $\frac{1}{2} \cdot 10^{-8}$ accuracy</p> <p>So as far as I understand, I need to solve for $x$ in the following equation </p> <p>$|cos(x)-1|&lt;\frac{1}{2} \cdot 10^{-8} \Rightarrow \\ |x| &lt; \ arccos(1-\frac{1}{2} \cdot 10^{-8}) \Rightarrow \\ x \in \ (-arccos(1-\frac{1}{2} \cdot 10^{-8}),arccos(1-\frac{1}{2} \cdot 10^{-8}))$</p> <p>but that just seems like a messy answer. Any ideas?</p>
0non-cybersec
Stackexchange
Holder Continuous Functions on $[0,1]$ are complete + Banach space. <p>I am studying for an Analysis prelim and I am stuck on how to show that the following space of Holder continuous functions is complete:</p> <p>$$\Lambda_{\alpha}([0,1]) = \{f: [0,1] \rightarrow \mathbb{R} \mid \sup_{x,y \in [0,1], x\neq y} \frac{|f(x) - f(y)|}{|x-y|^{\alpha}} &lt; \infty \text{ and } 0&lt; \alpha \leq 1\}$$ with the norm $\| \cdot \|_{\Lambda_{\alpha}}$ defined by $$\|f\|_{\Lambda_{\alpha}} = |f(0)| + \sup_{x,y \in [0,1], x\neq y} \frac{|f(x) - f(y)|}{|x-y|^{\alpha}}$$ I think its easy to see that $\Lambda_{\alpha}([0,1]) \subset B([0,1])$, i.e., it is a subset of bounded functions on $[0,1]$ which is complete. My thought is that if I let $\{f_n\}$ be a Cauchy sequence in $\Lambda_{\alpha}([0,1])$ and let $f \in B([0,1])$, such that $f_n \rightarrow f$ in the uniform norm, then we can show $f \in \Lambda_{\alpha}([0,1])$ and that $f_n \rightarrow f$ in the Holder norm defined above. Not sure how to show this though. Perhaps I could also somehow show that any absolutely convergent series converges in $\Lambda_\alpha$, but I'm not sure how to do this either. Any help would be appreciated.</p>
0non-cybersec
Stackexchange
[FRESH] Skepta "Top Boy" (Official Video).
0non-cybersec
Reddit
Nested objects have not been saved by Spring JpaRepository. <p>I have a Spring Roo application with GWT. On server-side I´ve got simple JpaRepository interfaces for all entities like:</p> <pre><code>@Repository public interface MyEntityRepository extends JpaSpecificationExecutor&lt;MyEntity&gt;, JpaRepository&lt;MyEntity, Long&gt; { } </code></pre> <p>There is a MyEntity class that has a One-To-One relationship to a MyOtherEntity class. When I call my entity-service persist method</p> <pre><code>public void saveMyEntity (MyEntity myEntity) { myEntityRepository.save(myEntity); } </code></pre> <p>only the myEntity object will be saved. All sub objects of MyEntity are ignored. The only way to save the myEntity object along with the myOtherEntity object is calling </p> <pre><code> myOtherEntityRepository.save(myOtherEntity); </code></pre> <p>before the above code. So is there a more elegant way to automatically save sub objects with JpaRepository interface?</p>
0non-cybersec
Stackexchange
Carved a Portal themed pumpkin! Complete with companion cube.
0non-cybersec
Reddit
Lagrange&#39;s identity in the complex form. <p>I am trying to show Lagrange's identity in the complex form; that is, $$ \Bigl\lvert\sum_{i = 1}^na_ib_i\Bigr\rvert^2 = \sum_{i = 1}^n\lvert a_i\rvert^2\sum_{i = 1}^n\lvert b_i\rvert^2 - \sum_{1\leq i\lt j\leq n} \lvert a_i\bar{b}_j - a_j\bar{b}_i\rvert^2 $$ Then \begin{align} \Bigl\lvert\sum_{i = 1}^na_ib_i\Bigr\rvert^2 &amp;= \Bigl(\sum_{i = 1}^na_ib_i\Bigr)\Bigl(\sum_{j = 1}^n\bar{a}_j\bar{b}_j\Bigr)\\ &amp;= \sum_{i,j=1}^na_i\bar{a}_jb_i\bar{b}_j\\ &amp;= \begin{aligned} a_1\bar{a}_1b_1\bar{b}_1 &amp;+ \cdots + a_n\bar{a}_1b_n\bar{b}_1+\\ \vdots\phantom{....} &amp; \phantom{...}\ddots\phantom{......}\vdots\phantom{.....}+\\ a_1\bar{a}_nb_1\bar{b}_n &amp;+ \cdots + a_n\bar{a}_nb_n\bar{b}_n \end{aligned} \end{align} I see that down the diagonals I will have $\sum_{i=1}^n\lvert a_i\rvert^2\sum_{i=1}^n\lvert b_i\rvert^2$ which leaves me with $$ \sum_{1\leq i\leq j\leq n}a_i\bar{a}_jb_i\bar{b}_j+a_j\bar{a}_ib_j\bar{b}_i\tag{1} $$ but I don't see how equation $(1)$ is equal to $$ \lvert a_i\bar{b}_j - a_j\bar{b}_i\rvert^2 = \lvert a_i\rvert^2\lvert b_j\rvert^2 + \lvert a_j\rvert^2\lvert b_i\rvert^2 - a_i\bar{a}_jb_i\bar{b}_j - a_j\bar{a}_ib_j\bar{b}_i. $$</p>
0non-cybersec
Stackexchange
From my experience.... it seems like if someone you haven't met uses the word pot or marijuana, they probably don't smoke. If they say weed or bud, then they usually do. Has anyone else noticed this? It's a good way to tell without having someone freak out if they do not condone its use.
0non-cybersec
Reddit
3 days after crashing his Bentley while driving drunk and threatening the police, this is how Viktoria Plzeň's David Limberský celebrated his goal.
0non-cybersec
Reddit
Remembrance Day is 4 days away. I recently finished Dan Carlin's Hardcore History WWI series 'Blueprint for Armageddon', and highly recommend listening to it this week leading up to Nov 11th..
0non-cybersec
Reddit
Simple method of detecting and reporting server outage?. <p>I'm looking for a super simple way to monitor one server from another, in case the other goes down (e.g. based on ping), and then send an email if it does. Is there anything out there like this installable via the standard package manager (debian)? I'm aware of things like nagios and monit, but these are much more complex than I need.</p> <p>(The servers are on a private network, so I can't use third party web services)</p> <p>Thanks</p>
0non-cybersec
Stackexchange
[PICTURE] Why I'm suspended on Monday.
0non-cybersec
Reddit
How To Make Ubuntu 13.04 Work With DisplayLink Monitor?. <p>I recently purchased an <a href="http://rads.stackoverflow.com/amzn/click/B0073BOCNU">AOC E2251FWU DisplayLink</a> monitor. When I plug this into my <a href="https://www.system76.com/laptops/model/gazp9">System76 Gazelle Professional</a> running Ubuntu 13.04 Raring Ringtail, nothing happens. Under 'displays', no additional display is detected. On Mac and Windows, this monitor is plug-and-play after installing DisplayLink's drivers.</p> <p>Having read that previous versions of Ubuntu had plug and play support for DisplayLink monitors, I'm surprised that Ubuntu 13.04 does not! The 'xserver-xorg-displaylink' driver is not available in the 13.04 repositories. I read that it has become baked into the Linux kernel.</p> <p>Does anybody know how to get a DisplayLink device to actually work on Ubuntu 13.04? I'm looking to get a simple extended display. I've done my due dilligence and Googled around, but no solution I can find works for me.</p> <pre><code>&gt; uname -a Linux tyrion 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux &gt; lsmod Module Size Used by joydev 17377 0 pci_stub 12622 1 vboxpci 23194 0 vboxnetadp 25670 0 vboxnetflt 23479 0 vboxdrv 320372 3 vboxnetadp,vboxnetflt,vboxpci parport_pc 28152 0 ppdev 17073 0 rfcomm 42641 0 bnep 18036 2 bluetooth 228619 10 bnep,rfcomm ip6t_REJECT 12545 1 snd_hda_codec_hdmi 36913 1 xt_hl 12521 6 ip6t_rt 12529 3 snd_hda_codec_via 51018 1 coretemp 13355 0 kvm_intel 132891 0 nf_conntrack_ipv6 18335 7 nf_defrag_ipv6 13201 1 nf_conntrack_ipv6 snd_hda_intel 39619 3 kvm 443165 1 kvm_intel ipt_REJECT 12541 1 xt_comment 12504 4 arc4 12615 2 xt_LOG 17400 10 snd_hda_codec 136453 3 snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel xt_multiport 12597 4 snd_hwdep 13602 1 snd_hda_codec xt_limit 12711 13 xt_tcpudp 12603 22 snd_pcm 97451 3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel xt_addrtype 12635 4 iwldvm 241872 0 uvcvideo 80847 0 nf_conntrack_ipv4 14487 7 snd_page_alloc 18710 2 snd_pcm,snd_hda_intel nf_defrag_ipv4 12729 1 nf_conntrack_ipv4 snd_seq_midi 13324 0 xt_state 12578 14 snd_seq_midi_event 14899 1 snd_seq_midi mac80211 606457 1 iwldvm videobuf2_vmalloc 13056 1 uvcvideo videobuf2_memops 13202 1 videobuf2_vmalloc snd_rawmidi 30180 1 snd_seq_midi videobuf2_core 40513 1 uvcvideo videodev 129260 2 uvcvideo,videobuf2_core ip6table_filter 12815 1 ip6_tables 27025 1 ip6table_filter snd_seq 61554 2 snd_seq_midi_event,snd_seq_midi nf_conntrack_netbios_ns 12665 0 nf_conntrack_broadcast 12589 1 nf_conntrack_netbios_ns snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi snd_timer 29425 2 snd_pcm,snd_seq nf_nat_ftp 12620 0 nf_nat 25867 1 nf_nat_ftp iwlwifi 173477 1 iwldvm nf_conntrack_ftp 13342 1 nf_nat_ftp nf_conntrack 83275 8 nf_nat_ftp,nf_conntrack_netbios_ns,nf_nat,xt_state,nf_conntrack_broadcast,nf_conntrack_ftp,nf_conntrack_ipv4,nf_conntrack_ipv6 microcode 22881 0 snd 68876 16 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_via,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device iptable_filter 12810 1 ip_tables 26995 1 iptable_filter psmouse 95870 0 rtsx_pci_ms 13011 0 cfg80211 510937 3 iwlwifi,mac80211,iwldvm lp 17759 0 soundcore 12680 1 snd mei 41158 0 lpc_ich 17061 0 memstick 16554 1 rtsx_pci_ms serio_raw 13215 0 mac_hid 13205 0 x_tables 29803 15 ip6table_filter,xt_hl,xt_comment,ip_tables,xt_tcpudp,xt_limit,xt_state,xt_LOG,xt_multiport,iptable_filter,ip6t_rt,ipt_REJECT,ip6_tables,xt_addrtype,ip6t_REJECT parport 46345 3 lp,ppdev,parport_pc dm_crypt 22820 1 udl 24771 0 drm_usb 13134 1 udl syscopyarea 12529 1 udl sysfillrect 12701 1 udl sysimgblt 12674 1 udl rtsx_pci_sdmmc 17475 0 ghash_clmulni_intel 13259 0 aesni_intel 55399 4 aes_x86_64 17255 1 aesni_intel xts 12885 1 aesni_intel lrw 13257 1 aesni_intel gf128mul 14951 2 lrw,xts ablk_helper 13597 1 aesni_intel cryptd 20373 4 ghash_clmulni_intel,aesni_intel,ablk_helper i915 600396 4 i2c_algo_bit 13413 1 i915 wmi 19070 0 drm_kms_helper 49394 2 udl,i915 video 19390 1 i915 ahci 25731 2 drm 286028 7 udl,i915,drm_usb,drm_kms_helper libahci 31364 1 ahci r8169 67446 0 rtsx_pci 33355 2 rtsx_pci_ms,rtsx_pci_sdmmc </code></pre>
0non-cybersec
Stackexchange
Confused about Linux &quot;route add&quot; commands for this diagram. <p>I am confused about this <a href="https://www.cs.umb.edu/~gghinita/it443/network-diagram.pdf" rel="nofollow noreferrer">network diagram</a>. </p> <p>In class the router R1 was assigned to me and other students were given various routers/workstations on the diagram. Our task was to set the network up with ifconfig and route commands. Since the main router only really had one physical interface, we used an alias as well (eth0 and eth0:1).</p> <p>I used the following commands to set up R1 (initially I had the gateways wrong) but my professor corrected me:</p> <pre><code># set interfaces (1 physical/1 virtual) ifconfig eth0 10.0.0.4/24 ifconfig eth0:1 10.0.14.252/24 # Add routes for remaining 4 LANs: route add -net 10.0.12.0 netmask 255.255.255.0 gw 10.0.14.27 route add -net 10.0.17.0 netmask 255.255.255.0 gw 10.0.14.34 route add -net 10.0.7.0 netmask 255.255.255.0 gw 10.0.14.27 route add -net 10.0.28.0 netmask 255.255.255.0 gw 10.0.14.34 # once everyone can ping eachother successfully # connect the entire 10.0.0.0/24 network to the # outside 192.168.104.0/22 network route add default gw 10.0.0.1 # set up forwarding to outside gateway sysctl -w net.ipv4.ip_forward=1 </code></pre> <p>I am most confused about why the gw's for the route commands are 10.0.14.34 and 10.0.14.27.</p> <p>What would the route commands and gateways be for R3 or R5? Or R2 and R4? I can see that a router's two adjacent networks get added with the two ifconfig commands; there is no need to set their routes. But I am really getting confused on what each side of each router is using for a gateway. </p> <p>Any help is very much appreciated! Thank you. </p>
0non-cybersec
Stackexchange
Hilbert-Schmidt operator defined by non-orthogonal basis. <p>I have the following operator on $L^2(0,1)$</p> <p>$$ Tf = \sum_{n \geq 0} 2^{-n}\langle f,v_n\rangle v_n$$</p> <p>Where $v_n(t) = t^n$.</p> <p>I was able to prove that it is Hilbert-Schmidt, but now I need to calculate its Hilbert-Schmidt norm, and its integral kernel. The problem is that it is defined through an indipendent system of vectors (the polynomials) which are dense but not orthogonal (if it had been $v_n(t) = \exp(2\pi i nt)$ it would have been much easier. How do I identify the eigenvectors?</p> <p>I was thinking about setting $t = \exp(2\pi i x)$ and reduce to the orthogonal case somehow but I reach incorrect results, I am not sure of where I am doing wrong.</p> <p>Can anybody help me?</p>
0non-cybersec
Stackexchange
Cardinals teammates believe Chandler Jones could collect 20 sacks in 2016.
0non-cybersec
Reddit
Is there other variations of alphabet soup? Like Arabic and Thai?.
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
Wealth doesn't trickle down – it just floods offshore, new research reveals.
0non-cybersec
Reddit
Music Of Variety Kind – Bollywood At Its Best.
0non-cybersec
Reddit
Playstation controller drivers?. Do I need to have Dualshock drivers to use playstation controllers? Also if I do where do I get them?
0non-cybersec
Reddit
Program for managing &quot;Profiles&quot; (Home, work...). <p>I'm looking for a program that manage profiles for System settings like Network, Displays, Mouse, Power etc. For example: One profile for work to enable new Proxy Settings, setting Brightness and turn Bluetooth on. Another Profile for home, to enable Wireless, disabling the Proxy settings and so on.</p> <p>Any ideas?</p>
0non-cybersec
Stackexchange
Same program, same JVM, but vastly different memory requirements and execution time on different machines - why?. <p>I'm trying to run a <a href="http://ccl.northwestern.edu/netlogo/" rel="nofollow noreferrer">NetLogo</a> (a java simulation framework) simulation on a cluster as part of a large experiment. I was surprised at the seemingly massive memory requirement of a (relatively) simple simulation. On the cluster it throws "java.lang.OutOfMemoryError: Java heap space" exceptions for anything less than "-Xmx2500M" heapsizes. A single execution takes 5 hours to run. I ran the same experiment on both my Macs (iMac and MacBook Pro), and they executed in less than one hour, with "-Xmx1024" giving no errors. The cluster jobs require "-XX:MaxPermSize=250M" whereas on my Macs no increase above default is required. I ran the same code, the same inputs, using the exact same jars in all cases. </p> <p>64 bit JVMs are used in each case (and as far as I know these are pretty similar):</p> <pre><code>&lt;on the cluster&gt; $ java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode) &lt;on my macs&gt; $ java -version java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-10M3646) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode) </code></pre> <p>And I am running Client JVM in all cases (was initially using Server on cluster, switching to client made no difference). I have tried executing on the cluster with java 7, same huge memory and execution time issues. </p> <p>I am completely perplexed, no one I have spoken to can explain this. Has anyone out there come across this before? Any help greatly appreciated!</p>
0non-cybersec
Stackexchange
What's blue and not very heavy?. Light blue
0non-cybersec
Reddit
Wifi Problem with dual booting Ubuntu 14.04 and Windows 8.1. <p>So I've installed both Windows 8.1 and Ubuntu (dual-booting), and the for the most part, I have followed instructions. However, right now I can't figure out why my wifi on my Ubuntu does not work. When I click on the Network icon, the "Enable Wifi" does not even appear. </p> <p>My machine is the Lenovo Flex 2, 15 inch.</p> <pre><code>$ lspci -knn | grep Net -A2 &amp;&amp; rfkill list 02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n[14e4:4365] (rev 01) Subsystem: Lenovo Device [17aa:0621] Kernel driver in use: bcma-pci-bridge 0: ideapad_wlan: Wireless LAN Soft blocked: no Hard blocked: no 1: ideapad_bluetooth: Bluetooth Soft blocked: no Hard blocked: no </code></pre>
0non-cybersec
Stackexchange
Why do people think this.
0non-cybersec
Reddit
Dual booting: 0xc000000e Windows Error when installing GRUB. <p><strong>Hi everyone!</strong><br> This is my first question so correct me please if I´m asking something wrong. </p> <p>So my Problem is:<br> I´ve got a Lenovo E31-70 with pre-installed Windows 10 home 64bit and I tried to dual-boot Kali Linux on it.<br> First I´ve created an Partition with 100GB. Than I installed Kali Linux and the GRUB loader from an .iso image from an USB. The Installation was working fine and finally I had all installed.Then I tried to boot Windows and I got a boot error, but Linux was working well.<br> For some reason i cannot upload an photo of the error, but: </p> <pre><code>File: \Boot\BCD Status: 0xc000000e Info: The Boot Configurations Data for your PC is missing or contains errors. </code></pre> <p>After a bit searching I found that: <a href="http://answers.microsoft.com/en-us/windows/forum/all/0xc000000e-boot-error/ef08ab00-e130-4301-bc80-79d5b414a81f?auth=1" rel="nofollow noreferrer">http://answers.microsoft.com/en-us/windows/forum/all/0xc000000e-boot-error/ef08ab00-e130-4301-bc80-79d5b414a81f?auth=1</a><br> <strong>THE SECOND ANSWER</strong></p> <p>So I downloaden an Windows 10 .iso on my USB, started Windows repair, and wrote<br> <code>bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd</code></p> <p>All worked fine, Windows was completly restored, but when I restarted the PC, GRUB doesn´t appear! I´ve tried restarting the Notebook several times, with the same result.</p> <p>Than I found this solution: <a href="https://forums.kali.org/showthread.php?20559-How-To-Repair-Kali-Linux-Grub-With-Kali-Linux-Live-Cd-Dual-Boot-With-Windows-7" rel="nofollow noreferrer">https://forums.kali.org/showthread.php?20559-How-To-Repair-Kali-Linux-Grub-With-Kali-Linux-Live-Cd-Dual-Boot-With-Windows-7</a></p> <p>Again all worked fine. When I rebooted the Notebook, GRUB appeared. I thought it was the end... It wasn´t.<br> Because when I´ve tried to start Windows, I got the same 0xc000000e Error again. </p> <p><strong>NOTE:</strong><br> Fast boot is turned off<br> Boot Mode is legacy(can switch to UEFI) </p> <p><strong>Conclusion:</strong> When repairing Windows, GRUB doesn´t appear. When repairing GRUB, Windows boot error.</p> <p>I guess that GRUB is overriding Windows boot data...</p> <p><strong>[EDIT]</strong><br> I can boot windows if i switch to UEFI. The problem is: I don´t want to switch in BIOS from UEFI to Legacy every time i need to boot another OS. Is there any way to boot Windows 10 in legacy or start GRUB in UEFI?</p>
0non-cybersec
Stackexchange
Bookmark all open tabs in mobile safari. <p>I've got an iPhone with ~500 open tabs (500 is the limit). I'd like to bookmark all of the tabs so I can review/read them later on other non Apple devices and potentially in non-apple browsers.</p> <p>Is there any app or solution (like a pinboard client) that will allow me to bookmark and close those tabs in mobile safari then, at a later time, view the bookmarks in another browser or on a desktop?</p>
0non-cybersec
Stackexchange
Security controls around data in motion?. <p>I am an Information Security Analyst, trying to understand the difference between data in transit and data in motion. I found the listed below definitions:</p> <p>Data In Transit is defined as data moving outside of the server such as between client and server, server to server, web app server to DB server and vice/versa.</p> <p>Data In Motion is defined as being in preparation of transmission, moving around or place to place on or within the server itself but not transiting off of the server, or sometimes between servers when the connection between servers is a direct private connection such as data moving from server to SAN/NAS, not over a traditional LAN.</p> <p>Reference - <a href="http://commonsensesecurity.net/difference-data-transit-data-motion" rel="nofollow noreferrer">http://commonsensesecurity.net/difference-data-transit-data-motion</a></p> <p>What security controls need to be in place to protect data in motion which are different than data in transit?</p>
1cybersec
Stackexchange
Ubuntu Server: Apache2 seems to attach .php to URI. <p>I'm using the php library tonic for web services. My resource is as example at </p> <pre><code>base-uri/myResource </code></pre> <p>Now if a file myResource.php exists in that directory, the url mod_rewrite gets to see is</p> <pre><code>base-uri/myResource.php </code></pre> <p>which then fails the rewrite conditions and my application breaks (app works on apache on windows)</p> <p>If I rename myResource.php to my myResourceClass.php (or anything else), it works.</p> <p>So it seem that apache or one if its modules assumes that with base-uri/myResource I want to call base-uri/myResource.php but only if myResource.php exists.</p> <p>Is this a general issue or can I somewhere configure this to not happen?</p> <p>thanks!</p> <p>EDIT:</p> <p>see</p> <p><a href="https://serverfault.com/questions/359290/how-to-set-up-a-basic-mod-rewrite">How to set up a basic mod_rewrite?</a></p> <p>The answer contains the same observation!</p> <p>ANSWER:</p> <p>The issue is the default Apache configuration on Ubuntu:</p> <pre><code>Options Indexes FollowSymLinks MultiViews </code></pre> <p>MultiViews is changing request_uri from myResource to myResource.php.</p> <p>Solutions:</p> <ul> <li>disable MultiViews in .htaccess: Options -MultiViews</li> <li>remove MultiViews from default config</li> <li>rename the file as example to myResourceClass</li> </ul> <p>I chose last option because that should work regardless of configuration and I only have 3 such files so the change took about 30 secs...</p>
0non-cybersec
Stackexchange
System won&#39;t boot up properly - screens turning off and on. Only when second monitor is plugged in. <p>So I have a very strange problem.</p> <p>My Ubuntu system refuses to boot up. It shows the boot screen, but after that, the monitors go black and they are going off and on every time. Hitting ctrl alt f2 doesn't work. I think it's some graphical issue. </p> <p>The login screen just doesn't come up. Both monitors go on and off and that's just going forever.</p> <p>System specs:</p> <p>i3 4130 8 GB of RAM GTX 750 Ti GA-H81M-HD3</p> <p><strong><em>Update</em></strong></p> <p>I̶ ̶c̶a̶m̶e̶ ̶t̶o̶ ̶a̶ ̶c̶o̶n̶c̶l̶u̶s̶i̶o̶n̶ ̶t̶h̶a̶t̶ ̶t̶h̶e̶r̶e̶ ̶i̶s̶ ̶s̶o̶m̶e̶t̶h̶i̶n̶g̶ ̶w̶r̶o̶n̶g̶ ̶w̶i̶t̶h̶ ̶m̶y̶ ̶N̶v̶i̶d̶i̶a̶ ̶d̶r̶i̶v̶e̶r̶s̶ ̶f̶o̶r̶ ̶m̶y̶ ̶G̶T̶X̶ ̶c̶a̶r̶d̶.̶ ̶I̶ ̶d̶i̶s̶a̶b̶l̶e̶d̶ ̶t̶h̶e̶ ̶G̶P̶U̶ ̶i̶n̶ ̶t̶h̶e̶ ̶B̶I̶O̶S̶ ̶a̶n̶d̶ ̶t̶u̶r̶n̶e̶d̶ ̶t̶h̶e̶ ̶I̶n̶t̶e̶l̶ ̶H̶D̶ ̶o̶n̶.̶ ̶I̶ ̶p̶l̶u̶g̶g̶e̶d̶ ̶m̶y̶ ̶m̶o̶n̶i̶t̶o̶r̶ ̶i̶n̶t̶o̶ ̶t̶h̶e̶ ̶m̶o̶t̶h̶e̶r̶b̶o̶a̶r̶d̶ ̶a̶n̶d̶ ̶t̶h̶e̶ ̶P̶C̶ ̶b̶o̶o̶t̶e̶d̶ ̶u̶p̶ ̶w̶i̶t̶h̶o̶u̶t̶ ̶a̶n̶y̶ ̶p̶r̶o̶b̶l̶e̶m̶s̶.̶ ̶I̶ ̶n̶o̶w̶ ̶h̶a̶v̶e̶ ̶t̶o̶ ̶f̶i̶n̶d̶ ̶a̶ ̶w̶a̶y̶ ̶t̶o̶ ̶r̶e̶i̶n̶s̶t̶a̶l̶l̶ ̶t̶h̶e̶ ̶d̶r̶i̶v̶e̶r̶s̶ ̶s̶o̶ ̶I̶ ̶c̶a̶n̶ ̶u̶s̶e̶ ̶t̶h̶e̶ ̶G̶T̶X̶ ̶c̶a̶r̶ d̶ ̶i̶n̶s̶t̶e̶a̶d̶ ̶o̶f̶ ̶t̶h̶e̶ ̶I̶n̶t̶e̶l̶ ̶H̶D̶ ̶g̶r̶a̶p̶h̶i̶c̶s̶.̶</p> <p><strong><em>Update 2</em></strong></p> <p>Nvidia driver isnt the issue here. It has something to do with 2 monitors being plugged in. I booted the machine with only ONE monitor plugged in the GTX card and it booted up fine. But when I plug two monitors on the GTX card, Ubuntu will simply not boot up.</p>
0non-cybersec
Stackexchange
400 kg of liquid chocolate leaked onto the street after the tank containing it fell of a trailer..
0non-cybersec
Reddit
Closed form of :$\int_{0}^{\pi}(\frac{\sin n x}{\sin x})^m$, with $n,m$ are integers?. <p>let $n, m$ be integers such that $m$ is odd integer , My simple Guess about evaluation of this :$\int_{0}^{\pi}(\frac{\sin n x}{\sin x})^m$ is to get the following , for $n$ is even integer the integrand is $0$ and for $n$ is odd the integrand is give something like : $k\pi$ with k is such form which i can't get it . My question here is What is the closed form of this:$$\int_{0}^{\pi}\left(\frac{\sin n x}{\sin x}\right)^m$$ for $m$ is odd ?</p>
0non-cybersec
Stackexchange
Lemon meringue and Cherry pie [4128x2322].
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 is the purpose of ValidationContext when implementing IValidatableObject. <p>I have implemented <code>IValidatableObject</code> several times and have never found out what the purpose of parsing <code>ValidationContext</code> to the Validate method is - my typical <code>IValidatableObject</code> implementation looks something like this:</p> <pre><code> public IEnumerable&lt;ValidationResult&gt; Validate(ValidationContext validationContext) { if (Prop1 == Prop2) { yield return new ValidationResult( "Prop1 and Prop2 must be different.", new[] {"Prop1", "Prop2"}); } } </code></pre> <p>Is there anything that I have missed that I could have used <code>validationContext</code> for?</p> <p>EDIT: I'm using ASP.NET MVC and this is implemented in the class - not in the controller.</p>
0non-cybersec
Stackexchange
Unity &quot;Sidebar&quot; - is it configurable/repositionable?. <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://askubuntu.com/questions/33605/can-i-move-the-unity-launcher-to-the-bottom-of-the-screen-like-windows-7">Can I move the Unity launcher to the bottom of the screen like Windows 7?</a> </p> </blockquote> <p>I was reading the introduction to Unity and it says the launcher was made into a sidebar for convenience on widescreen monitors. Is it configurable, say to move it along the bottom of the screen, for people like me who use a "widescreen" monitor in "Portrait" mode?</p> <p>If not, this is a dealbreaker for me, I'm afraid.</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
I visited my parents this weekend and raided the toy box. Sweet, sweet poisonous nostalgia..
0non-cybersec
Reddit
Aprils fools honey 🤗.
0non-cybersec
Reddit
How to import the class within the same directory or sub directory?. <p>I have a directory that stores all the <strong>.py</strong> files.</p> <pre><code>bin/ main.py user.py # where class User resides dir.py # where class Dir resides </code></pre> <p>I want to use classes from <strong>user.py</strong> and <strong>dir.py</strong> in <strong>main.py</strong>.<br> How can I import these Python classes into <strong>main.py</strong>?<br> Furthermore, how can I import class <code>User</code> if <strong>user.py</strong> is in a sub directory?</p> <pre><code>bin/ dir.py main.py usr/ user.py </code></pre>
0non-cybersec
Stackexchange
Samsung BD-P1600 Blu-ray Disc Player.
0non-cybersec
Reddit
Wisconsin expands investigation into untested rape kits.
0non-cybersec
Reddit
Spitfire 944.
0non-cybersec
Reddit
Can&#39;t install usermin or virtualmin: &quot;Expecting form-data encoding, but got normal encoding&quot;. <p>This is a fresh server, with webmin freshly installed-- in fact, installing usermin is the first action I'm (trying to) take with it. I'm logged in with a user that has sudo privileges, however I've also tried it as root.</p> <p>I select Usermin from the list of unused modules, then "Install Usermin tar.gz package". This brings me to an error screen that says "<strong>Expecting form-data encoding, but got normal encoding</strong>".</p> <p>The lack of help I've been able to find for this is disheartening. Either no one uses Usermin, or no one has ever had this error. In fact, "usermin" isn't even an existing tag here.</p> <hr> <p>Trying to install virtualmin gives a different error: <strong>Failed to install module from <a href="http://download.webmin.com/download/virtualmin/webmin-virtual-server_5.04.gpl_all.deb" rel="nofollow">http://download.webmin.com/download/virtualmin/webmin-virtual-server_5.04.gpl_all.deb</a> : Not a valid module file : tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors</strong>. </p> <p>To arrive at that I followed the <a href="http://www.webmin.com/vdownload.html" rel="nofollow">install instructions</a>: Go to Webmin Configuration-> Webmin Modules-> Install from ftp or http URL.</p> <hr> <p>Neither usermin or virtualmin are critical for me. I've never used them before, but I'm setting up a new server today, and thought a graphical UI might make my life a little easier. Webmin itself installed just fine.</p>
0non-cybersec
Stackexchange
Metric ($f$-divergence) on space of probability measures that satisfies pythagorean theorem. <p>Let <span class="math-container">$E$</span> be a polish space, <span class="math-container">$\mathcal{P}(E)$</span> the Borel probability measures on <span class="math-container">$E$</span> with the topology of weak convergence and <span class="math-container">$\mathcal{Q} \subset \mathcal{P}(E)$</span> a convex and compact set.</p> <p>First, the motivation for my question:</p> <p>The Kullback Leibler divergence (or relative entropy) <span class="math-container">$R : \mathcal{P}(E)\times \mathcal{P}(E) \rightarrow [0, \infty]$</span> is defined by <span class="math-container">$R(\nu, \mu) = \int \frac{d\nu}{d\mu} \log(\frac{d\nu}{d\mu}) d\mu$</span> if <span class="math-container">$\nu$</span> is absolutely continuous with respect to <span class="math-container">$\mu$</span> and <span class="math-container">$R(\nu, \mu) = \infty$</span>, else.</p> <p>Let <span class="math-container">$\theta \in \mathcal{P}(E)$</span> and <span class="math-container">$\theta^{\ast}_R := \arg\min_{\mu \in \mathcal{Q}} R(\mu, \theta)$</span> be the information projection of <span class="math-container">$\theta$</span> onto <span class="math-container">$\mathcal{Q}$</span>. As a consequence of the pythagorean like theorem for relative entropy (c.f. <a href="https://www.jstor.org/stable/2959270?seq=1#metadata_info_tab_contents" rel="nofollow noreferrer">Csiszár (1975)</a>, Theorem 2.2) it holds <span class="math-container">\begin{equation} \label{eq1} \forall \mu \in \mathcal{Q} : R(\theta^{\ast}_R, \theta) + R(\mu, \theta^{\ast}_R) \leq R(\mu, \theta) \end{equation}</span></p> <p>My question is whether there exists a <strong>metric</strong> <span class="math-container">$d$</span> on <span class="math-container">$\mathcal{P}(E)$</span> which satisfies the same kind of result. So if <span class="math-container">$\theta^{\ast}_d := \arg\min_{\mu\in\mathcal{Q}} d(\mu, \theta)$</span>, it should hold <span class="math-container">$$ \forall \mu \in \mathcal{Q}: d(\theta^{\ast}_d, \theta)^2 + d(\mu, \theta^{\ast}_d)^2 \leq d(\mu, \theta)^2 $$</span></p> <p>Ideally, the metric <span class="math-container">$d$</span> should metrize weak convergence, but I am thankful for any approaches or pointers.</p>
0non-cybersec
Stackexchange
ui grid save updated cell data to database. <p>I am working on ui grid edit cell feature. I need to update the edited cell value to the database using rest api. Also how can i get the list of rows selected in controller.</p> <p>My working code</p> <pre><code>var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.edit']); app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) { $scope.gridOptions = { }; $scope.gridOptions.columnDefs = [ { name: 'id', enableCellEdit: false}, { name: 'name' }, { name: 'age', displayName: 'Age' , type: 'number', width: '10%' } ]; $http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/500_complex.json') .success(function(data) { $scope.gridOptions.data = data; }); }]) </code></pre> <p><a href="http://plnkr.co/edit/kAQnXGTn12Z7v8w16RL9?p=preview" rel="nofollow noreferrer">Plunker</a> </p>
0non-cybersec
Stackexchange
I am Olivia Jordan, Miss USA 2015. For the past year I have worked as Miss USA. I competed at Miss Universe in December and made it to the top 3. I advocate for breast and ovarian cancer awareness, as well as Alzheimer's disease. I'm getting ready to pass on my crown on June 5th in Las Vegas! Ask me anything!! [My Proof](http://imgur.com/gDi5808) Thank you for all of the questions! I'm signing off, hope I answered most of them!!
0non-cybersec
Reddit
Problem with dual wifi. <p>I installed kubuntu 16.04.1 on my notebook ASUS R510VX-DM004D with dual wifi. I can connect without problems to the 2'4Ghz network and it works properly, but when i try to connect at the 5Ghz network connects correctly but I can not navigate. If i try to do a ping (to google dns for example) does not respond.</p> <p>I've been reading but can not find solution. Anyone with the same problem?</p> <p>Thanks.</p>
0non-cybersec
Stackexchange
Randomized Polynomial Hierarchy?. <p>I wonder, what would happen, if in the definition of $PH$ (Polynomial Hierarchy, see, e.g., <a href="https://en.wikipedia.org/wiki/Polynomial_hierarchy">here</a>), the role of $NP$ would be replaced by $RP$? </p> <p>It seems, we could still build a hierarchy, the same way as $PH$ is built, just using $RP$ everywhere instead of $NP$, and $coRP$ instead of $coNP$. Let us call it Randomized Polynomial Hierarchy ($RPH$). </p> <p>My first guess is that $RPH\subseteq BPP$, or maybe $RPH=BPP$. It is based on the known fact that $NP=RP$ implies $PH=BPP$. Nevertheless, if $P\neq RP$, then $RPH$ could still be a proper, infinite hierarchy within $BPP$. </p> <p>Of course, the edge of the issue is blunted by the fact that $P=RP$ is conjectured (even $P=BPP$), which would flatten $RPH$ into $P$. However, $P=RP$ is not known at this time, and it has resisted all proof attempts so far. Therefore, $RPH$ still has at least some chance to be a proper hierarchy.</p> <p>While $RPH$, admittedly, has a good chance to be "flat," could the concept still be useful for something nontrivial? Here is an example: if one can prove $RPH=BPP$, then it would yield that $P=RP$ implies $P=BPP$, which, I think, would be an interesting result.</p> <p>Is anything known about this?</p>
0non-cybersec
Stackexchange
Apply Credit Cards.
0non-cybersec
Reddit
CLT for Martingales. <p>I posted this question originally in math stack exchange, but I got no answer. (<a href="https://math.stackexchange.com/questions/2604591/clt-for-martingales">https://math.stackexchange.com/questions/2604591/clt-for-martingales</a>)</p> <p>In wikipedia, there is a version of a CLT for Martingales, which I cannot find any reference to. ( <a href="https://en.wikipedia.org/wiki/Martingale_central_limit_theorem" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Martingale_central_limit_theorem</a>)</p> <p>The theorem claims the following:</p> <blockquote> <p>Let $X_1,X_2,...$ be a martingale with bounded increments, i.e. $ \mathbb{E} [ X_{t+1}-X_t | X_1,...,X_t]=0$ and $|X_{t+1}-X_t|\le k$ almost surely for some $k$ and all $t$.</p> <p>Define $\sigma_{t}^2=\mathbb{E}[(X_{t+1}-X_t)^2|X_1,...,X_t]$, and let $\tau_\nu=\min\left\{t\ :\ \sum_{i=1}^{t} \sigma_i^2 \ge \nu\right\}$.</p> <p>Then $\frac{X_{\tau_{\nu}}}{\sqrt{\nu}}$ converges to $N(0,1)$ in distribution as $\nu \longrightarrow \infty$.</p> </blockquote> <p>I would like to know how to prove this or if there is any reference on the web.</p> <p>Thanks!</p>
0non-cybersec
Stackexchange
NEVER DO JAPANESE GOBLIN.
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
TIL that the original screenplay for the movie John Wick featured only 12 deaths, but every time Keanu Reeves was handed a new draft of the script, he added "he could still kill more". The final film has a body count of 119..
0non-cybersec
Reddit
Freaky ass painting I found for sale in an antique shop near me. who would have this on the wall?.
0non-cybersec
Reddit
Used Car Dealers Fort Myers.
0non-cybersec
Reddit
It's Elena - Scam of the Week (Please, correspond with me, I know you want a virus).
1cybersec
Reddit
Broadband Subsidy Bill Aims To Improve Rural Health Care Access.
0non-cybersec
Reddit
Does @media with no arguments do anything?. <p>I've inherited some code from a ... questionable ... web developer. There are hundreds of style sheets referenced from each page of the site and each of them is riddled with extra @media tags that appear to be malformed. They are just:</p> <pre><code>@media { /* A bunch of CSS rules */ } @media { /* A bunch more CSS rules */ } </code></pre> <p>I'm trying to simplify the code base so that it will be easier for me to maintain. My question is: Is there any possible purpose at all in having @media by itself like that with no media type or media function arguments?</p>
0non-cybersec
Stackexchange
Caught NSInternalInconsistencyException request for rect at invalid indexPath. <p>The following line crashes the program:</p> <pre><code>let cell = tableView.dequeueReusableCellWithIdentifier("ItemCell", forIndexPath: NSIndexPath(forRow: 0, inSection: 0)) as! ItemCell </code></pre> <p>The console log shows the following error: </p> <pre><code>"caught "NSInternalInconsistencyException", "request for rect at invalid index path (&lt;NSIndexPath: 0xc000000000000016&gt; {length = 2, path = 0 - 0})" </code></pre> <p>Here is a bullet point list of things I've checked:</p> <ul> <li>Correct Storyboard ID is listed in the identity inspector</li> <li>Correct custom class is listed in the identity inspector</li> <li>Attributes inspector has "ItemCell" in the Table View Cell identifier field</li> </ul> <p>Here is the full code:</p> <pre><code>import XCTest @testable import ToDo class ItemCellTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testSUT_HasNameLabel(){ let storyboard = UIStoryboard(name: "Main", bundle: nil) let controller = storyboard.instantiateViewControllerWithIdentifier("ItemListViewController") as! ItemListViewController _=controller.view let tableView = controller.tableView tableView.dataSource = FakeDataSource() let cell = tableView.dequeueReusableCellWithIdentifier("ItemCell", forIndexPath: NSIndexPath(forRow: 0, inSection: 0)) as! ItemCell XCTAssertNotNil(cell.titleLabel) } } extension ItemCellTests{ class FakeDataSource: NSObject, UITableViewDataSource { func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int { return 1 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell { return UITableViewCell() } } } </code></pre> <p>Here is the ItemCell.swift code:</p> <pre><code>import UIKit class ItemCell: UITableViewCell { @IBOutlet weak var titleLabel: UILabel! func configCellWithItem(item: ToDoItem){ } } </code></pre> <p>All properties that are tied to the storyboard are connected. What is being overlooked?</p>
0non-cybersec
Stackexchange
Mirror image.
0non-cybersec
Reddit
How likely is to win at least 50 times out of 120 rolls?. <p>It is played on a 6-sided dice where you would win on 5-6 but lose on 1-4 so a 1/3 chance of winning. I know the probability of winning is 0.033 or 3.3% but I don't know how to arrive at that answer.</p>
0non-cybersec
Stackexchange
Run the interactive F# in 32 bit mode on Mac. <p>When I'm inside <code>fsharpi</code> on Mac Os and I do</p> <pre><code>open System.Windows.Forms;; let f = new Form();; </code></pre> <p>I get the following warning</p> <blockquote> <p><strong>WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all</strong></p> <p>Fontconfig warning: ignoring UTF-8: not a valid region tag</p> <p>Fontconfig warning: ignoring UTF-8: not a valid region tag</p> <p>Fontconfig warning: ignoring UTF-8: not a valid region tag</p> <p>Fontconfig warning: ignoring UTF-8: not a valid region tag</p> <p>val f : Form = System.Windows.Forms.Form</p> </blockquote> <p>And in fact nothing works. Is there a way of using the 32bits Carbon driver? Or another way of running an F# app that uses windows forms on Mac?</p>
0non-cybersec
Stackexchange
Close one.
0non-cybersec
Reddit
Chuck Berry, Rock & Roll Innovator, Dead at 90.
0non-cybersec
Reddit