text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
PostgreSQL using COALESCE or other Conditional Expressions to SET field. <p>I have a PostgreSQL v10 DB with the following values:</p> <pre><code>CREATE TABLE test ( id INT, custom_fields jsonb not null default '{}'::jsonb, guest_profile_id character varying(100) ); INSERT INTO test (id, custom_fields) VALUES (1, '[{"protelSurname": "Smith", "servicio_tags": ["protel-info"], "protelUniqueID": "[{\"ID\":\"Test1-ID\",\"Type\":\"21\",\"ID_Context\":\"GHA\"}{\"ID\":\"4842148\",\"Type\":\"1\",\"ID_Context\":\"protelIO\"}]", "protelGivenName": "Seth"}, {"value": "Test", "display_name": "Traces", "servicio_tags": ["trace"]}, {...}]'); INSERT INTO test (id, custom_fields) VALUES (2, '[{"protelSurname": "Smith", "servicio_tags": ["protel-info"], "protelUniqueID": "[{\"ID\":\"Test2-ID\",\"Type\":\"21\",\"ID_Context\":\"GHA\"},{\"ID\":\"4842148\",\"Type\":\"1\",\"ID_Context\":\"protelIO\"}]", "protelGivenName": "Seth"}, {"value": "Test2", "display_name": "Traces", "servicio_tags": ["trace"]}, {...}]'); INSERT INTO test (id, custom_fields) VALUES (3, '[{"value": "Test3-ID", "display_name": "Test", "servicio_tags": ["profile-id"]}, {...}]'); INSERT INTO test (id, custom_fields) VALUES (4, '[{"value": "Test4-ID", "display_name": "Test", "servicio_tags": ["person-name"]}, {...}]'); </code></pre> <p>I have a query, which works and saves values from the custom_field row to the guest_profile_id column in the same row:</p> <pre><code>UPDATE guest_group SET guest_profile_id = ( SELECT x -&gt;&gt; 'ID' FROM jsonb_array_elements(custom_fields) AS field, jsonb_array_elements((field -&gt;&gt; 'protelUniqueID') :: jsonb) AS dd(x) WHERE value @&gt; '{"servicio_tags": ["protel-info"]}'::jsonb AND x-&gt;&gt;'ID_Context' = 'protelIO' ); </code></pre> <p>But this only works for the first two rows. Therefor I want to use the next query-snippets in order to copy Test3-ID in row 3 to the guest_profile_id column and Test4-ID in row 4 to the guest_profile_id column.</p> <p>1.</p> <pre><code>SELECT field -&gt;&gt;'value' cross join lateral jsonb_array_elements(custom_fields) AS field WHERE value @&gt; '{"servicio_tags": ["profile-id"]}'::jsonb </code></pre> <p>2.</p> <pre><code>SELECT field -&gt;&gt;'value' cross join lateral jsonb_array_elements(custom_fields) AS field WHERE value @&gt; '{"servicio_tags": ["person-name"]}'::jsonb </code></pre> <p>My problem: I do not know how to use <code>COALESCE</code> or other Conditional Expressions in order to chain those small queries. Because this should be possible if the first query uses <code>NULL</code> to set the field, <code>COALESCE</code> should help me to ignore this value and jump to the next query-snippet.</p> <p>Desires result: I want that all the TestX-ID values from the table above are copied to the <code>guest_profile_id</code> column into the same row.</p> <p>My try: </p> <pre><code> UPDATE test SET guest_profile_id = COALESCE(( SELECT x -&gt;&gt; 'ID' FROM jsonb_array_elements(custom_fields) AS field, jsonb_array_elements((field -&gt;&gt; 'protelUniqueID') :: jsonb) AS dd(x) WHERE value @&gt; '{"servicio_tags": ["protel-info"]}'::jsonb AND x-&gt;&gt;'ID_Context' = 'protelIO'),( SELECT field -&gt;&gt;'value' cross join lateral jsonb_array_elements(custom_fields) AS field WHERE value @&gt; '{"servicio_tags": ["profile-id"]}'::jsonb),( SELECT field -&gt;&gt;'value' cross join lateral jsonb_array_elements(custom_fields) AS field WHERE value @&gt; '{"servicio_tags": ["person-name"]}'::jsonb)); </code></pre> <p>Gives me: </p> <blockquote> <p>ERROR: syntax error at or near "cross" LINE 9: cross join lateral jsonb_array_elements(custom_fields) ...</p> </blockquote> <p>Thanks a lot for the help!</p>
0non-cybersec
Stackexchange
Reminiscing about old posts.
0non-cybersec
Reddit
Freehand WIP by London Reese at The Vatican Studios in Lake Forest, CA.
0non-cybersec
Reddit
Keep tabbing within modal pane only. <p>On my current project we have some modal panes that open up on certain actions. I am trying to get it so that when that modal pane is open you can't tab to an element outside of it. The jQuery UI dialog boxes and the Malsup jQuery block plugins seem to do this but I am trying to get just that one feature and apply it in my project and it's not immediately obvious to me how they are doing that.</p> <p>I've seen that some people are of the opinion that tabbing shouldn't be disabled and I can see that point of view but I am being given the directive to disable it.</p>
0non-cybersec
Stackexchange
Haven't missed a single payment. Not even once..
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
Hibernate @ManyToOne Referenced Class using @NaturalId instead of @Id. <p>I have some Hibernate/JPA annotations (still don't know the difference to be honest) that are allowing me to create an association class. This class is combining two items that are related into one object. I originally was using <code>@JoinTable</code> but realized I needed a lot more meta data with the associations, so had to convert the code over into another object type.</p> <p>For now I am using <code>@Id</code> to mark the <code>ID</code> column for my objects, and using <code>@NaturalId (mutable = false)</code> for a <code>String uuid</code>.</p> <p>My association class is using <code>@ManyToOne</code> and creates the table just fine, but when I look into it the table is using the <code>@Id</code> field as the mapping column. I would prefer to have this association class use the <code>@NaturalId uuid</code> for ease of transferring relationship/associations across to other systems.</p> <p>How can I get the relationship to use the correct identifier?</p> <p>For reference, my DB's and Java code look like this:</p> <pre><code>AssociationsTable ---------------------------------------------- | ID | META DATA | ID ASSOC. 1 | ID ASSOC. 2 | ---------------------------------------------- | 1 | stuff | 1 | 2 | ---------------------------------------------- Objects ------------------------------ | ID | META DATA | UUID | ------------------------------ | 1 | stuff | FOO-123 | ------------------------------ | 2 | stuff | BAR-456 | ------------------------------ Association Class{ ObjA main; ObjA sub; @ManyToOne getMain() @ManyToOne getSub() } ObjA Class{ Long id; @Id @GeneratedValue(generator="increment") @GenericGenerator(name="increment", strategy = "increment") @XmlElement @Column(name = "ID", unique = true, nullable = false) getId() String uuid; @NaturalId (mutable = false) @GeneratedValue(generator = "uuid") @GenericGenerator(name = "uuid", strategy = "uuid2") @Column(name = "uuid", unique = true) getUUID() } </code></pre>
0non-cybersec
Stackexchange
problem with setting up multiboot ISO usb using syslinux. <p>I have followed this tutorial: <a href="http://blog.jakgibb.com/2013/01/03/creating-a-multiboot-usb-stick-using-syslinux/" rel="nofollow">http://blog.jakgibb.com/2013/01/03/creating-a-multiboot-usb-stick-using-syslinux/</a></p> <p>I want to boot linux live ISOs directly from USB drive using syslinux instead of method provied here: <a href="http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/" rel="nofollow">http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/</a></p> <p>Here is my syslinux.cfg:</p> <pre><code>default vesamenu.c32 prompt 0 timeout 300 menu title Geek USB menu background /bg.png MENU TABMSG Created by Salman MENU WIDTH 72 MENU MARGIN 10 MENU VSHIFT 3 MENU HSHIFT 6 MENU ROWS 15 MENU TABMSGROW 20 MENU TIMEOUTROW 22 menu color title 1;36;44 #66A0FF #00000000 none menu color hotsel 30;47 #C00000 #DDDDDDDD menu color sel 30;47 #000000 #FFFFFFFF menu color border 30;44 #D00000 #00000000 std menu color scrollbar 30;44 #DDDDDDDD #00000000 none label HardDisk menu label Continue to Boot from ^First HD (default) KERNEL chain.c32 APPEND hd1 MENU DEFAULT label MY menu label ^MY loopback loop /ubuntu-12.04.3-desktop-i386.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-12.04.3-desktop-i386.iso noeject noprompt splash -- initrd (loop)/casper/initrd.lz label MIX menu label ^MIX insmod loopback insmod iso9660 set isofile="/ubuntu-12.04.3-desktop-i386.iso" loopback loop $isofile kernel (loop)/casper/vmlinuz append boot=casper initrd=(loop)/casper/initrd.lz splash -- label MIX2 menu label ^MIX2 set isofile="/ubuntu-12.04.3-desktop-i386.iso" loopback loop $isofile kernel (loop)/casper/vmlinuz append boot=casper live-media-path=(loop)/casper/ file=(loop)/preseed/ubuntu.seed initrd=(loop)/casper/initrd.lz splash -- label MIX3 menu label ^MIX3 loopback loop /ubuntu-12.04.3-desktop-i386.iso kernel (loop)/casper/vmlinuz append boot=casper live-media-path=(loop)/casper/ file=(loop)/preseed/ubuntu.seed initrd=(loop)/casper/initrd.lz splash -- </code></pre> <p>My USB is booting and syslinux is working and boot menu (<strong>syslinux.cfg</strong>) is displaying fine but menus are not working, don't know why? No menu is booting ubuntu-12.04.3-desktop-i386.iso. The worst part is that no error is coming when I select a menu and hit enter, screen blinks and return to main menu.</p> <p>What is wrong with my code?</p>
0non-cybersec
Stackexchange
Looking for programmers to sell their products on The Poison Market. Also looking for Moderators and Admins..
1cybersec
Reddit
Two colors in one text field using Actionscript 3. <p>Is it possible to have two text colors in one text field using Actionscript 3.0? </p> <p>ex: how can i make like the first string black and the second string red?</p> <p>Here is my code when using a single color:</p> <pre><code> public function logs(txt) { if (txt == '') { textLog.text = "Let's Open up our treasure boxes !!!"; } else { textLog.text = '' + txt + ''; } textLog.x = 38.60; textLog.y = 60.45; textLog.width = 354.50; textLog.height = 31.35; textLog.selectable = false; textLog.border = false; var format:TextFormat = new TextFormat(); var myFont:Font = new Font1(); format.color = 0x000000; format.font = myFont.fontName; format.size = 18; format.align = TextFormatAlign.CENTER; format.bold = false; textLog.embedFonts = true; textLog.setTextFormat(format); this.addChild(textLog); } </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
How do I select a cell range using the keyboard while editing a formula?. <p>When your typing a formula, you can hit one of the arrow keys to select a cell with your keyboard:</p> <p><a href="https://i.stack.imgur.com/ZpTXx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZpTXx.jpg" alt="enter image description here"></a></p> <p>That's nifty because you don't have to reach for your mouse to select a cell. However, while editing a function after you've already typed it out, you can't select a cell with your keyboard (I can understand if excel blocks out the left and right arrow keys because it'd then be confusing for the program to know whether I want to move the cursor within the active cell or whether I'm trying to move out of the cell to select a range -- but why block the up and down keys as well?)</p> <p>So, when you're trying to edit a function, say, like here where I want to change the cell "D5" by clicking on a appropriate cell), you can't use your keyboard:</p> <p><a href="https://i.stack.imgur.com/7FsR8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7FsR8.jpg" alt="enter image description here"></a></p> <p>Any workarounds?</p>
0non-cybersec
Stackexchange
In ActiveDirectory, how are security audit events transmitted to the Domain Controller&#39;s event log? How does the mechanism scale?. <p>In a multi-domain-setting, I want to collect security file access audit events at a central place.</p> <p>In ActiveDirectory, it is possible to enable file access auditing at the Domain Controller by creating a GPO. Additionally, at a different 'file server' computer, that is a member of one of the domains, a SACL has to be configured at the file system objects that I want to be audited (and that are included in a network share).</p> <p>Once this is done, the file access events are recorded and somehow magically transfered to the event log of the domain controller.</p> <p>I would really like to know:</p> <ul> <li>How and when are these events transfered? Is the transfer encrypted?</li> <li>Is it possible to directly select another (additional) receiver of those events, apart from the domain controller? I know that it is possible to forward those log events later on, but are they by default forwarded to the Domain Controller? Is there an implicit forwarding configured?</li> <li>How much traffic is going to be generated, with respect to network load?</li> </ul>
0non-cybersec
Stackexchange
Beamer: how to keep an image at its location while using only to uncover text. <p>This question is essentially the same as one of my <a href="https://tex.stackexchange.com/questions/424116/beamer-displaying-four-images-how-to-pre-allocate-space-for-the-first-image">earlier one</a>, except the only difference is that I am using "only" to change the text at the same location (i.e., <a href="https://tex.stackexchange.com/questions/109677/latex-beamer-how-to-uncover-formulas-text-at-a-location-of-an-ununcovered-fo">this question</a>). In other words, I am destroying my earlier text as I go, and not adding new ones underneath the previous ones. </p> <p>Since the text for the first "only" is shorter than the second "only", therefore the image will shift location. I would like for the image to remain at its location. </p> <p>Here is an example <a href="https://i.stack.imgur.com/LKZFR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LKZFR.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/Kf2P3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kf2P3.png" alt="enter image description here"></a></p> <p>it may not be obvious but the second image is higher up than the first.</p> <p>The code is here, can someone find a solution?</p> <pre><code>\documentclass{beamer} \usepackage{graphicx} \title[Title]{Presentation} \author{Sandro Botticelli} \institute{Italy} \date{1484} \begin{document} \begin{frame} \begin{figure} \includegraphics[scale = 0.8]{Venus} \caption{Nascita di Venere} \end{figure} \only&lt;1&gt;{In the centre the newly-born goddess Venus stands nude in a giant scallop shell. Its size is purely imaginary, and is also found in classical depictions of the subject. } \only&lt;2&gt;{Alternative identifications for the two secondary female figures involve those also found in the Primavera; the nymph held by Zephyr may be Chloris, a flower nymph he married in some versions of her story, and the figure on land may be Flora. Flora is generally the Roman equivalent of the Greek Chloris; in the Primavera Chloris is transformed into the figure of Flora next to her, following Ovid's Fasti, but it is hard to see that such a transformation is envisaged here.} \end{frame} \end{document} </code></pre>
0non-cybersec
Stackexchange
Calculate $2^{-1000000}(\frac{5+3\sqrt{3}}{i}-\frac{1}{1+\sqrt{3}i})^{999999}$. <p>what's an easy way to calculate</p> <p>$2^{-1000000}(\frac{5+3\sqrt{3}}{i}-\frac{1}{1+\sqrt{3}i})^{999999}$ ?</p> <p>My idea is that it must somehow be possible to merge -1000000 and 999999 to 1, but I just can't figure out what to do!</p> <p>I would be glad if someone could solve this riddle!</p>
0non-cybersec
Stackexchange
Why is $-1&gt;0$ not enough?. <blockquote> <p><strong>Theorem</strong>: Prove that no order can be defined in the complex field that turns it into an ordered field.</p> <p><strong>Proof</strong>: Suppose complex field is an ordered field. So, either <span class="math-container">$i$</span> or <span class="math-container">$-i$</span> must be positive. Suppose <span class="math-container">$i&gt;0$</span>. Hence <span class="math-container">$i^2=-1&gt;0$</span>, but then <span class="math-container">$(-1)^2=1&gt;0$</span>. But this is contradiction as both <span class="math-container">$x$</span> and <span class="math-container">$-x$</span> cannot be true in an ordered field, where <span class="math-container">$x$</span> belongs to that ordered field.</p> </blockquote> <p>My question: Why was <span class="math-container">$-1&gt;0$</span> not itself a contradiction an end of the proof?</p>
0non-cybersec
Stackexchange
To type the word, "dimples".
0non-cybersec
Reddit
New iPhone Case Doubles As a 650-Volt Stun Gun!.
0non-cybersec
Reddit
Delicious Web Notifications in the HTML and CSS Advent 2012.
0non-cybersec
Reddit
Did you know the most commonly used search term on Google is "butt plug"?. Well, it's not. I just pulled that out of my ass.
0non-cybersec
Reddit
Reload Vim highlight setting and colorscheme. <p>If I change Vim's <code>highlight</code> setting, how do I "reload" it for colorschemes to take effect?</p> <p>So, in my case, I remove <code>highlight</code>'s cursor line number—</p> <pre><code>se hl-=N:CursorLineNr </code></pre> <p>Changing <code>highlight</code> from—</p> <blockquote> <p>highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:Mor eMsg,M:ModeMsg,n:LineNr,<strong>N:CursorLineNr</strong>,r:Question,s:StatusLine,S:StatusLineNC,c:Vert Split,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:D iffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:Spel lCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine, #:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn</p> </blockquote> <p>To</p> <blockquote> <p>highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:Mor eMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v :Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffCh ange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRar e,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_: TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn</p> </blockquote> <p>(I've emphasized the change.)</p> <p>But the cursor line number is still "highlighted"!</p> <p>Changing <code>highlight</code> doesn't update the colorscheme—so how do I "force" an update? I've tried setting syntax coloring off then on again and changing colorschemes to no avail.</p> <p>(Cross-posted from <a href="https://stackoverflow.com/questions/14213381/reload-vim-highlight-setting-and-colorscheme">StackOverflow</a>.)</p>
0non-cybersec
Stackexchange
[WP] They call him Cliff Hanger. No matter what mortal danger may confront him, all he has to do is yell "To be continued!" and he'll be given a week to figure a way out of it..
0non-cybersec
Reddit
Solving Recurrence Relation with substitution. <p>How to solve T(n) = T(n-2) + n using iterative substitution</p> <pre><code>Base case: T(0) = 1 T(1) = 1 Solve: T(n) = T(n-2) + n </code></pre> <p>Currently I have:</p> <pre><code>T(n) = T(n-2) + n = T(n-4) + n - 2 + n = T(n-4) + 2n - 2 = T(n-6) + n - 4 + n - 2 + n = T(n-6) + 3n - 6 = T(n-8) + n - 6 + n - 4 + n -2 + n = T(n-8) + 4n - 12 = T(n-10) + n - 8 + n - 6 + n - 4 + n - 2 + n = T(n-10) + 5n - 20 </code></pre> <p>The pattern I see is: </p> <p>$$\ T(n-2 \sum_{i=1}^k i) + n \sum_{i=0}^k i - \sum_{i=0}^{k-1} i(i+1) $$</p> <p>but this may be wrong because I am completely stuck after this</p>
0non-cybersec
Stackexchange
Numerical integration over a surface of a sphere. <p><img src="https://i.stack.imgur.com/UFKd6.jpg" alt="enter image description here"></p> <p>I am integrating a double integral in spherical coordinates over the surface of a sphere in MATLAB numerically. Although I have changed the relative and absolute tolerance I get the feeling that this algorithm never terminates. And when I checked the values of my function that MATLAB had evaluated everything looked fine, no huge oscillations, no singularities. </p> <p>Do you know whether there are other algorithms that I could use which work faster and still give me reliable results?</p> <p>So the sphere sits at $(0,0,0)$ and has a radius of $10^{-6}$. Don't be confused that the $y$-component is not shown, I took this one as being fixed in order to plot this.</p> <p>Okay, maybe I define my problem a little bit better: I want to perform this integration as fast as possible with an accuracy that should be about $10^{-1}$ or $10^{-2}$, this is sufficient. Of course, I thought about adding this lower precision to the integral2 function, but still, this function is so slowly that it is useless for what I am currently doing here.</p>
0non-cybersec
Stackexchange
5 holiday palettes to avoid and what to get instead -- Navigate the maze of holiday palettes out there right now with this article.
0non-cybersec
Reddit
$|S_X|=|S_Y| \Leftrightarrow |X|=|Y|$. <p>Reading <a href="https://math.stackexchange.com/questions/73566/if-omega-1-2-3-cdots-then-s-omega-is-an-infinite-group">this problem</a> I remembered trying to solve the following problem. For a set $A$, denote by $S_A=\{ f : A \to A | f \text{ is bijective }\}$. Denote by $|X|$ the cardinal number of $|X|$.</p> <blockquote> <p>Prove that for two sets $X,Y$ we have $|X|=|Y| \Leftrightarrow |S_X|=|S_Y|$.</p> </blockquote> <p>I didn't manage to solve the case where $X,Y$ are infinite, and don't even know how to start. I tried to represent $X$ as a subset of $Y$( if $|X|&lt;|Y|$) and maybe find a permutation in $S_Y \setminus S_X$.</p>
0non-cybersec
Stackexchange
Initial Block Download Problem. <p>I started a new Bitcoin Core(testnet) and the download of blocks worked perfectly till 15% and then i don't know what happened, but i got the following error: unknown new rules activated (versionbit 1) What should i do? <a href="https://i.stack.imgur.com/nfTt8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nfTt8.jpg" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
I contributed to the death of my friend.. No, I did not deliberately murder him, or even harm him in any way. I wish that was the case though, because then at least I could process my emotions and know for certain that I did, in fact, kill my friend. Back in 2005, I was a 16 year old kid living in London, UK, and was therefor in "Secondary school", which is the equivalent of High School in the U.S. For those who do not know, 15 to 16 year olds here are expected to sit their GCSE examinations during this time, which can add a lot of pressure to a young mans life. At this time, I was trying to come to terms with my sexuality and the fact that I was bisexual. And so, when, in about February or march, my friend called me a "Fag", I was understandably very hurt. It messed me up, since I had felt that I might be able to come out to him in the future. Being young and dumb, I stormed off and left him there in the yard. Two days went by, and I refused to speak to him, until one night when he calls me on the phone. I pick it up, and he sounds really upset; more upset than id ever heard him before. Now, I was still angry, and thought that, if I hung up, I would be in a better position to talk to him the next day. So, when he said "I need to speak to you", I put the phone down with a smug, childish sense of satisfaction creeping over my face. Then, I went to bed. Well, he wasn't there the next day, which was unusual, and I began to panic thinking that it had been something serious. Later that day, when I returned home, my mum seemed very upset and immediately sat me down. My friend had hung himself, after swallowing a large amount of hard proof vodka. There. I said it, something I've never said to anyone before. The guilt is just horrible. If there is anything I've learnt, its this; The punishment for murder is not the jail time, it is the guilt of knowing that you played a part in the ending of someone's life.
0non-cybersec
Reddit
Sleep over.
0non-cybersec
Reddit
Automatically delete git branch after merge to master. <p>We will be attempting a work flow in github where every ticket is a branch off of master.<br> After the ticket is complete, the work is merged into staging where regression and integration tests are performed before it is merged into master.</p> <p>A team lead brought up the issue of the old ticket branches after a merge will start to build up. </p> <p>I found <a href="http://clauswitt.com/Removing-Unused-git-branches-Automatically.html" rel="noreferrer">this</a> script and want to know if this would work in our environment. We only want to delete branches that have been merged into master.</p>
0non-cybersec
Stackexchange
Milka. My parents wont allow me to take her home but I feed her and pet her for hours everyday..
0non-cybersec
Reddit
The tobacco industry manipulated the renowned children’s rights agency UNICEF for more than a dozen years, from 2003 until at least 2016, during which time UNICEF’s focus on children’s rights to a tobacco-free life was reduced, according to new research by UCSF..
0non-cybersec
Reddit
KVM: how do I add host route when VM starts?. <p>Is there a way to automatically add a host route (pointing to the VM IP) when VM starts ? ATM I'm doing this by hand. I've also tried to add a route via <code>/etc/sysconfig/network-scripts/route-virbr0</code> file, but it doesn't work, probably due to the fact that I don't have the appropriate <code>ifcfg-virbr0</code> file.</p> <p>Adding just a static route pointing to the VM doesn't work for obvious reason - there's no appropriate network interface (<code>virbr0</code>) when the host enters the multiuser mode, so route addition just fails.</p>
0non-cybersec
Stackexchange
Warriors rally back from a 3-1 series deficit to take the Western Conference Finals..
0non-cybersec
Reddit
How to store multiple foreign key values in a single field?. <p>I have following two tables in an <strong>MS SQL-Server</strong> Database:</p> <pre><code>user_info ( user_id PRIMARY KEY, email, password ) </code></pre> <p>and </p> <pre><code>messages ( time_stamp, message, sender, recipients, FOREIGN KEY(sender) REFERENCES user_info (user_id), FOREIGN KEY(recipients) REFERENCES user_info (user_id) ) </code></pre> <p>I am wondering if it is possible to store multiple <code>user_id</code> values in the recipients field of <code>messages</code> table. I am a newbie, please help me how to solve this problem.</p>
0non-cybersec
Stackexchange
Yahoo hack aftermath. So I know that yahoo account owners got a notice from yahoo about the hack. Were there any other e-mails from other services that you got in relation to it? I'd assume there would be a fair number of phishing e-mails sent to yahoo users, as well as legitimate notices from other services that have your yahoo account as primary for your email. Also If you were an owner of third party service that has an e-mail of hacked provider, would you block, warn or let potential perpetrators use your service?
1cybersec
Reddit
Mmm... cream puffs and eclairs - I'm not very good at this but I'll bet they'll eat [1600x1060][OC].
0non-cybersec
Reddit
If $xR=I$ we can say that $x\in I$?. <p>Probably this is a dumb question, I lack knowledge on abstract algebra. Suppose that <span class="math-container">$R$</span> is a ring without unity and <span class="math-container">$I\subset R$</span> is a non-trivial ideal.</p> <p>If <span class="math-container">$xR=Rx=I$</span> for some <span class="math-container">$x\in R$</span>, we can says that <span class="math-container">$x\in I$</span>? If not, there is some other conditions that ensures that <span class="math-container">$x\in I$</span>?</p>
0non-cybersec
Stackexchange
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
Prop Energy Sword.
0non-cybersec
Reddit
restart program when it crashes / closes by self. <p>Hi i am wanting to restart a program which i need to have it run 24/7 the app is minergate.</p> <p>The issue I am having is that the app / program feezes and shuts down - this is a known issue with the 8.1 version.</p> <p>However until 8.2 comes out I have no other option but to bite my lips and bear it. I am wondering is there away to listen for the program, and if it crashes to restart the app and continue the ETH mining?</p>
0non-cybersec
Stackexchange
AddEntityFrameworkStores can only be called with a role that derives from IdentityRole in .NET Core 2.0. <p>I have changed a project from the .NET Core 1.1 to 2.0 version, but I'm getting an error from the Identity, when It tries to add the stores:</p> <pre><code>services.AddIdentity&lt;ApplicationUser, IdentityRole&lt;long&gt;&gt;() .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;() .AddDefaultTokenProviders(); </code></pre> <p>The thrown error is:</p> <blockquote> <p>AddEntityFrameworkStores can only be called with a role that derives from IdentityRole</p> </blockquote> <p>These are my classes:</p> <pre><code>public class ApplicationUser : IdentityUser&lt;long&gt; { } public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser, IdentityRole&lt;long&gt;, long&gt; { public ApplicationDbContext(DbContextOptions options) : base(options) { } } </code></pre> <p>Someone could help me?</p>
0non-cybersec
Stackexchange
TOR routing when using an open TOR proxy. <p>My question is about how TOR handles routing of traffic. Here's the situation: User has laptop1 and server1 on a LAN. The server runs a hidden service (say a webserver) sharing over TOR only, i.e. open to localhost only, at xxyyzzaabbcc.onion. The server allows TOR proxy connections from the LAN. </p> <p>If the user points configures his laptop to use server1:9050 as a proxy and navigates to xxyyzzaabbcc.onion, does the local TOR instance on server 1 recognize that traffic as local and simply forward the request to localhost, or does the traffic first go out over the TOR network, then back to server1's localhost to get to the webserver?</p> <p>Put another way, if someone on the LAN uses server1's proxy to access that proxy's hidden service, does the traffic stay local?</p>
0non-cybersec
Stackexchange
If Niantic added new Pokestops as much as they are removing currently existing ones, that would be great.. Pokemon GO just got released in my country today, so I decided to wander around the neighborhood today. I've played Ingress beforehand to get a better grasp of the concept of an augmented reality game, so I already knew which spots would be Pokemon infested and which spots would be Pokestops/Gyms. In my neighborhood, there's currently one Gym (currently inhabited by a Pinsir) and 3 - 4 Pokestops. Overall, it's good enough for me, the only problem being that the Pokestops are a tad bit too far for me to casually walk to regularly. There's a town hall and a basketball court nearby which would make excellent Pokestops, but for some reason, they aren't. I'm not sure how I would go about reporting these locations as potential stops, since I faintly recall being able to do the same in Ingress. Anyway, recently, there's been news of Pokestops being removed for no apparent reason in certain places (such as [public libraries](https://www.reddit.com/r/pokemongo/comments/4we4su/removal_of_pokestops_is_becoming_pretty_ridiculous/). The most unusual cases are when the authorities of the locations had absolutely no problems with the game, and in some cases even welcome the flooding attention. The most reasonable explanation would be some people decided to report these Pokestops as being "problematic" (even though there is no apparent issue in the first place). This got me thinking; if it's this easy to remove a stop, then shouldn't it be as easy to add a new one? I know Niantic kinda has their hands full at the moment, but in the future, they should allow us to give suggestions for new Gyms or Pokestops. If that's too easy, then they should allow us to vote for them as well so that we don't see random Pokestops being placed in random places.
0non-cybersec
Reddit
Generators of $PSL(3,2)$. <p>Is it true that a set of generators for $PSL(3,2)\simeq SL(3,2)$ is: $$\alpha=\left(\begin{array}{ccccccc} 0&amp;0&amp;1\\ 0&amp;1&amp;0\\ 1&amp;0&amp;0\\ \end{array}\right),$$ $$\beta=\left(\begin{array}{ccccccc} 1&amp;0&amp;0\\ 0&amp;0&amp;1\\ 0&amp;1&amp;0\\ \end{array}\right),$$</p> <p>$$\gamma=\left(\begin{array}{ccccccc} 1&amp;0&amp;0\\ 0&amp;1&amp;0\\ 0&amp;1&amp;1\\ \end{array}\right)?$$ How can I check/prove this fact? Thanks!</p>
0non-cybersec
Stackexchange
Problems on Ubuntu Budgie 17.04 with Ryzen CPU and Gigabyte Motherboard. <p>In order to fix the issues (as described by another user on <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1671360" rel="nofollow noreferrer">Launchpad</a> with the Gigabyte AM4 Motherboard, I installed a modified 4.10.3 kernel with CONFIG_PINCTRL_AMD disabled. I downloaded it from <a href="http://www.nextized.net/repo/linux/ubuntu-linux-4.10.3_ryzen01_amd64_generic.tar.gz" rel="nofollow noreferrer">here.</a> After booting with this kernel, everything worked fine. But now the system frequently crashes and there are a few weird things in /var/log/syslog:</p> <p>1.</p> <pre><code>May 1 13:37:55 Ava gnome-software-service.desktop[3074]: 11:37:55:0582 GLib g_strv_length: assertion 'str_array != NULL' failed </code></pre> <p>These messages appeared very often, but they could be entirely due to Budgie (version 10.3.1) and its integration with gnome programs being buggy.</p> <p>2.</p> <pre><code>May 1 13:41:28 Ava budgie-panel.desktop[2987]: process 3387: arguments to dbus_connection_unref() were incorrect, assertion "connection-&gt;generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794. May 1 13:41:28 Ava budgie-panel.desktop[2987]: This is normally a bug in some application using the D-Bus library. </code></pre> <p>This line, with different ../../dbus/dbus-connection.c lines, makes up more than half of the syslog.</p> <ol start="3"> <li><p>On startup, this line, with different addresses, appears hundreds of times:</p> <pre><code>May 1 17:07:59 Ava kernel: [ 1.069692] AMD-Vi: Event logged [ May 1 17:07:59 Ava kernel: [ 1.069693] IO_PAGE_FAULT device=09:00.0 domain=0x0003 address=0x000000f4007def00 flags=0x0010] </code></pre></li> </ol> <p>At the end of this block of messages is says:</p> <pre><code>May 1 17:07:59 Ava kernel: [ 1.111308] [AVFS] Something is broken. See log! </code></pre> <p>I have a RX 480 and I had previously tried to install the AMDGPU-PRO driver, which didn't work, so I removed it with <code>amdgpu-pro-uninstall</code>.</p> <p>Booting with the modified 4.11-rc8 kernel from the Launchpad Bug thread (linked above) results in the same IO_PAGE_FAULTS as above, although I have not encountered any of the other issues yet.</p> <p>I will try the new modified 4.11.0 kernel from Launchpad.</p>
0non-cybersec
Stackexchange
Good boy loves Santa.
0non-cybersec
Reddit
"Please Mr Starch, I don't want to go...".
0non-cybersec
Reddit
YSK which fire extinguisher to use depending on what type of fire it is.
0non-cybersec
Reddit
Levelplot color key - range and extremes. <p>Is it possible in R to create a color key like the one below? (this one comes from the software Grid Analysis and Display System - Grads). </p> <p><a href="https://i.stack.imgur.com/NoqbH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NoqbH.jpg" alt="enter image description here"></a></p> <p>There are two features that I can't reproduce in R:</p> <ol> <li>The sequence is non linear however it is displayed as if</li> <li>Values bigger than 200 are grey / Values smaller than 0 are white</li> </ol> <p>I'm using levelplot from rastervis that plots rasters using the lattice levelplot:</p> <pre><code>require(raster) require(rasterVis) set.seed(200) X = seq(-40,0,by=1) Y = seq(-60,-40,by=1) grid = expand.grid(list(X=X,Y=Y)) Z = rnorm(nrow(grid),mean=10,sd=100) data = data.frame(grid,Z) r = rasterFromXYZ(data) mapTheme &lt;- rasterTheme(region=c('#EEF7FA','#D6F8F7',"#BEDAFF",'#5DA4FF',"#0000FF","#D4F9E2","#00FF7F","#008000","#FFFF00","#FFD27F", "#FFB732" ,"#EE7600", "#D53E4F","#FF6A6A")) my.at = c(0,1,5,10,15,20,25,30,40,50,75,100,150,200) myColorkey &lt;- list(at=my.at, space="bottom", labels=list(at=my.at)) p=levelplot(r, par.settings=mapTheme,at = my.at, colorkey=myColorkey,margin=F) print(p) </code></pre> <p>The result:</p> <p><a href="https://i.stack.imgur.com/Z4KPw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z4KPw.png" alt="enter image description here"></a></p> <p>As you can see, both values smaller than 0 and bigger than 200 are white, I've no idea how to set values bigger than or smaller than a certain value to appear as a specific color. Morover, how can I make the space between consecutive thick marks in the color key to have the same size although the intervals are not the same?</p>
0non-cybersec
Stackexchange
Don't forget about your loved ones on this special day.
0non-cybersec
Reddit
Subring of an artinian unital ring.. <p>Is there any unital artinian ring such that it have a unital subring isomorphic to itself?</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
Publicly Accessible TSPLib95 Solutions. <p>I have asked <a href="https://math.stackexchange.com/questions/2602183/where-are-the-optimal-tours-of-tsplib-95-instances">this question on MSE</a>, but besides earning a TumbleWeed award, there was no feedback. </p> <p>My question is, where I can download <em>all</em> optimal tours of the TSPLib95 library? I already did a lot of googling and found that the original resource of the <a href="https://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/" rel="nofollow noreferrer">University of Heidelberg</a> hasn't been upated since 2008 and has not all optimal tours available. Also the distance calculations of the X-ray problems are hard to understand/find online. </p> <p>I would be a bit surprised if <em>the</em> standard collection of TSP problems were not maintained and available anymore; I am currently checking new heuristics for the TSP problem and would like to be able to provide results that are based on a collection of standard instances. </p> <p>Any help would be greatly appreciated.</p>
0non-cybersec
Stackexchange
Estimating product of the primes dividing N.. <p>I am running through a proof by Stefan A. Burr which uses the result that is as follows. Where $p$ is a prime and $\text{N}\in\mathbb{Z}$:</p> <p>$$\prod_{p|N}{(1+1/p)} = O(\text{log(log(3N)})$$</p> <p>Can anyone explain to me why this is the case? </p>
0non-cybersec
Stackexchange
how to access display of a pre-owned server?. <p>hey guys i purchased this server at an auction and i'm using it for my own home server for web development. It came without a cable for the back so i bought one off amazon (VGA CABLE) It's a server from 2007, the Dell Poweredge 2950 and it's still got some power in it. Depending on how these next few weeks go i'll install a remote access card in the back (far left, first picture is where the port goes). that keyhole is locked, inside is accessible.<a href="https://imgur.com/a/6fxPY3L" rel="nofollow noreferrer">two picutres, front and back of the server</a></p> <p>Now when i hooked it up to my monitor with the VGA cable the screen was fully black but it looks like it's on but black screen. i googled around and someone wrote that if the screen is black it could be access with with pressing the ESC key, that hasn't worked. my screen when on VGA <a href="https://imgur.com/JcGkyvk" rel="nofollow noreferrer">https://imgur.com/JcGkyvk</a></p> <p>Is there a way to format this servers without display, what options do i have accessing this>? Command line access?</p>
0non-cybersec
Stackexchange
Best Terraforming Mars expansions to play with Turmoil?. Decided we're going to play our first game with Turmoil and wondering if anyone has any ideas on what expansions we should play with it. I figured we'd do Prelude regardless, but didn't know if any others would be good with it
0non-cybersec
Reddit
The Weeping Angels.
0non-cybersec
Reddit
I’ll just leaf this heckin gud boi here.
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
Man in wheelchair struck by car, gets ticket for not crossing road fast enough.
0non-cybersec
Reddit
Eigenvalues of a $20 \times 20$ symmetric matrix. <p>$$\left[\begin{smallmatrix} 19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;17&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;16&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;0&amp;1&amp;0&amp;11&amp;0&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;17&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;16&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;15&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;16&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;17&amp;0&amp;1&amp;1&amp;1&amp;1\\ 1&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1&amp;0&amp;1&amp;1&amp;1&amp;0&amp;1&amp;0&amp;11&amp;0&amp;1&amp;0&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;0&amp;16&amp;1&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19&amp;1&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;0&amp;1&amp;1&amp;17&amp;1\\ 1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;1&amp;19 \end{smallmatrix}\right] $$</p> <p>Using a software, I found that $18$ is an eigenvalue of this matrix, with multiplicity $9$. I need to prove it mathematically. Since the matrix is real and symmetric, I thought of finding the nullity of $A-18I$ but that's tough to compute. Is there any other way to prove it ?</p>
0non-cybersec
Stackexchange
Oh south park.
0non-cybersec
Reddit
My school put Braille on a laminated paper sign.
0non-cybersec
Reddit
God has a Flan for All of Us. . ..
0non-cybersec
Reddit
Should rxjs subjects be public in the class?. <p>Let's say I have two classes, where you can observe over some observables.</p> <p>First example, with public subject:</p> <pre><code>class EventsPub { public readonly onEnd = new Subject&lt;void&gt;(); } </code></pre> <p>Second example, with private subject and registering method:</p> <pre><code>class EventsPriv { private readonly endEvent = new Subject&lt;void&gt;(); public onEnd(cb: () =&gt; void): Subscription { return this.endEvent.subscribe(cb); } } </code></pre> <p>The first example is somehow unsafe because anyone can call <code>eventsPub.endEvent.next()</code> from outside the class and introduce side effects, however, comparing to example 2 It allows for pipes, which is a big plus since developers can for ex. register only for the first event with <code>eventsPub.onEnd.pipe(first()).subscribe(cb)</code>.</p> <p>The second example also allows for one-time subscription but requires more code and ugly unsubscribing.</p> <pre><code>const subscription = eventsPriv.onEnd(() =&gt; { // logic.. subscription.unsubscribe() }); </code></pre> <p>From your point of view, which is the best way to go? Or maybe there is a better solution?</p>
0non-cybersec
Stackexchange
First-principles benchmark of CFD solver. <p>A decade ago I saw a ~20 coupled state + random number problem that was used as a benchmark for meteorological CFD tools. It had a fractal dimension (of the chaotic attractor) around 2.3, I think. I saw matlab code for it.</p> <p>I'm looking for the method now, and can't remember what it was called. To be clear it was entirely synthetic. It was not flow in 2d or 3d. It wasn't a cylinder, cavity, or other plausible mechanical system. It was something like 20 nonlinear coupled states, and a random number generator.</p> <p>Can you help me find this method? It would be able to differentiate between ensemble Kalman filter or 4dvar in terms of performance, I think.</p>
0non-cybersec
Stackexchange
[I Ate] Chicago style Deep Dish pizza.
0non-cybersec
Reddit
my crush called me beautiful. We were facetiming last night and he made a joke that made me laugh. When I was laughing he said “You’re so beautiful.” My heart did so many flips and I told him, “You’re so handsome.” His face got all red and my heart melteddd. UPDATE: we facetimed the next night and had one of the deepest conversations i’ve ever had. his friend texted me later that night and told me that my crush was planning on asking me out. i’m so happy!!
0non-cybersec
Reddit
Macdonald&#39;s &quot;Symmetric Functions and Hall Polynomials&quot; Section 1.5 Example 9. <p>I'm trying to follow Example 9 in Section 1.5 of the 2nd edition of Macdonald's book "Symmetric Functions and Hall Polynomials". I have trouble with understanding some points.</p> <p>Before stating my question, I will first explain the example briefly. If <span class="math-container">$R$</span> is a root system, then the Weyl denominator formula for <span class="math-container">$R$</span> is <span class="math-container">$$\sum_{w\in W}\varepsilon(w)e^{w\rho}=\prod_{\alpha\in R^{+}}(e^{\alpha/2}-e^{-\alpha/2}),$$</span> where <span class="math-container">$W$</span> is the Weyl group of <span class="math-container">$R$</span>, <span class="math-container">$R^{+}$</span> is the set of positive roots (relative to some base), <span class="math-container">$\rho$</span> is the half-sum of the positive roots and <span class="math-container">$\varepsilon(w)$</span> is the sign of <span class="math-container">$w\in W$</span>. The goal of the example is to express the products <span class="math-container">$$\prod_{i&lt;j} (1-x_{i}x_{j}),\quad\prod_{i}(1-x_{i})\prod_{i&lt;j}(1-x_{i}x_{j}),\quad\prod_{i}(1-x_{i}^{2})\prod_{i&lt;j}(1-x_{i}x_{j})$$</span> as linear combinations of Schur functions using the Weyl denominator formula for root systems of types <span class="math-container">$D_{n}, B_{n}, C_{n}$</span>, respectively. More precisely, <span class="math-container">\begin{align*} \prod_{i&lt;j}(1-x_{i}x_{j})&amp;=\sum_{\pi}(-1)^{|\pi|/2}s_{\pi}(x_{1},\ldots,x_{n})\\ \prod_{i}(1-x_{i}^{2})\prod_{i&lt;j}(1-x_{i}x_{j})&amp;=\sum_{\mu}(-1)^{|\mu|/2}s_{\mu}(x_{1},\ldots,x_{n})\\ \prod_{i}(1-x_{i})\prod_{i&lt;j}(1-x_{i}x_{j})&amp;=\sum_{\nu}(-1)^{(|\nu|+p(\nu))/2}s_{\nu}(x_{1},\ldots,x_{n}), \end{align*}</span> where the first sum ranges over all partitions <span class="math-container">$\pi=(\alpha_{1}-1,\ldots,\alpha_{p}-1\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span>, the second sum ranges over all partitions <span class="math-container">$\mu=(\alpha_{1}+1,\ldots,\alpha_{p}+1\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span>, the third sum ranges over all self-conjugate partitions <span class="math-container">$\nu=(\alpha_{1},\ldots,\alpha_{p}\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span> and <span class="math-container">$p(\nu)=p$</span>.</p> <p>Now I'm ready to state my question. Here I will just consider the first product. Let <span class="math-container">$\epsilon_{1},\ldots,\epsilon_{n}$</span> be the standard basis for <span class="math-container">$\mathbb{R}^{n}$</span>. The root system <span class="math-container">$R=D_{n}$</span> is given by <span class="math-container">$$\{\pm(\epsilon_{i}\pm\epsilon_{j}):i\neq j\},$$</span> and the subset <span class="math-container">$$\Delta=\{\epsilon_{1}-\epsilon_{2},\epsilon_{2}-\epsilon_{3},\ldots,\epsilon_{n-1}-\epsilon_{n},\epsilon_{n-1}+\epsilon_{n}\}$$</span> is a base. Then <span class="math-container">\begin{align*} R^{+}&amp;=\{\epsilon_{i}\pm\epsilon_{j}:1\leq i&lt;j\leq n\},\\ \rho&amp;=(n-1)\epsilon_{1}+(n-2)\epsilon_{2}+\cdots+\epsilon_{n-1}. \end{align*}</span> On the other hand, the reflection <span class="math-container">$\sigma_{\epsilon_{i}-\epsilon_{i+1}}$</span> in the orthogonal complement of <span class="math-container">$\epsilon_{i}-\epsilon_{i+1}$</span> switches <span class="math-container">$\epsilon_{i}$</span> with <span class="math-container">$\epsilon_{i+1}$</span>, and <span class="math-container">$\sigma_{\epsilon_{i}+\epsilon_{i+1}}$</span> switches <span class="math-container">$\epsilon_{i}$</span> to <span class="math-container">$-\epsilon_{j}$</span> and <span class="math-container">$\epsilon_{j}$</span> to <span class="math-container">$-\epsilon_{i}$</span>. Thus the Weyl group <span class="math-container">$W$</span> can be identified with the group of all elements that permute <span class="math-container">$n$</span> elements as well as switching an even number of their signs, hence isomorphic to <span class="math-container">$S_{n}\ltimes\mathbb{Z}_{2}^{n-1}$</span>. If we replace <span class="math-container">$e^{-\epsilon_{i}}$</span> by <span class="math-container">$x_{i}$</span>, the right-hand side of the denominator formula becomes: <span class="math-container">\begin{align*} \prod_{\alpha\in R^{+}}(e^{\alpha/2}-e^{-\alpha/2})&amp;=e^{\rho}\prod_{\alpha\in R^{+}}(1-e^{-\alpha})\\ &amp;=x_{1}^{-(n-1)}x_{2}^{-(n-2)}\cdots x_{n-1}^{-1}\prod_{i&lt;j}(1-x_{i}x_{j})\left(1-\frac{x_{i}}{x_{j}}\right)\\ &amp;=(x_{1}\cdots x_{n})^{-(n-1)}\prod_{i&lt;j}(1-x_{i}x_{j})\left(x_{j}-x_{i}\right). \end{align*}</span> The product <span class="math-container">$\prod_{i&lt;j}(1-x_{i}x_{j})$</span> is the product we are interested in and the product <span class="math-container">$\prod_{i&lt;j}(x_{j}-x_{i})$</span> is involved in the definition of Schur function. So it remains to relate the left-hand side of the denominator formula to the partitions <span class="math-container">$\pi=(\alpha_{1}-1,\ldots,\alpha_{p}-1\mid\alpha_{1},\ldots,\alpha_{p})$</span> with <span class="math-container">$\alpha_{1}\leq n-1$</span>. But I have no idea. If someone has any idea, please let me know. Thank you for reading.</p> <p>This question was posted in Math Stack Exchange a few days ago by myself (<a href="https://math.stackexchange.com/questions/2967011/macdonalds-symmetric-functions-and-hall-polynomials-section-1-5-example-9">https://math.stackexchange.com/questions/2967011/macdonalds-symmetric-functions-and-hall-polynomials-section-1-5-example-9</a>). I didn't get an answer yet, so I repost the question here.</p>
0non-cybersec
Stackexchange
These talking GlaDOS Curiosity Spheres probably want to kill you.
0non-cybersec
Reddit
Humans are just life support for our reproductive systems..
0non-cybersec
Reddit
Installing upgreek.sty with macports. <p>How to install <code>upgreek.sty</code> using macports? Which of texlife-* packages should I install for it?</p>
0non-cybersec
Stackexchange
North West looking like half of this sub.
0non-cybersec
Reddit
Prove that $(\mathbb{N}^\mathbb{N},d)$ is complete.. <p>Baire space $\mathbb{N}^\mathbb{N}$ is the set of sequences with natural number as entries. For example, $(n)_{n=1}^\infty \in \mathbb{N}^\mathbb{N}.$</p> <p>Equip Baire space with a metric $d$ given by $$d(f,g) = \frac{1}{2^{n+1}}$$ where $n$ is the least element of $\mathbb{N}$ such that $f(n)\neq g(n)$ for all $f,g\in\mathbb{N}^\mathbb{N}.$ If $f=g,$ then define $d(f,g)=0.$</p> <blockquote> <p><strong>Question:</strong> Prove that $(\mathbb{N}^\mathbb{N},d)$ is complete. </p> </blockquote> <p>My attempt: Let $(f_n)_{n=1}^\infty$ be a Cauchy sequence in $\mathbb{N}^\mathbb{N}.$ Fix $\varepsilon&gt;0.$ Then there exists $N\in\mathbb{N}$ such that for all $m&gt;n\geq N,$ we have $$d(f_n,f_m)&lt;\varepsilon.$$ Fix $k\in\mathbb{N}.$ Let $k$ be the smallest natural number such that $$\frac{1}{2^{k+1}}&lt;\varepsilon.$$ I stuck here. </p> <p>My intention is to construct a limit $f\in\mathbb{N}^\mathbb{N}$ by letting its $k$ entries to be the same as $f_n$ when $n$ is large. However, I fail to express it using mathematics.</p> <p>Any hint would be appreciated.</p>
0non-cybersec
Stackexchange
help in the Donalds B. Johnson&#39;s algorithm, i cannot understand the pseudo code (PART II). <p>i cannot understand a certain part of the paper published by Donald Johnson about finding cycles (Circuits) in a graph.</p> <p>More specific i cannot understand what is the matrix Ak which is mentioned in the following line of the pseudo code :</p> <p>Ak:=adjacency structure of strong component K with least vertex in subgraph of G induced by {s,s+1,....n};</p> <p>to make things worse some lines after is mentins " for i in Vk do " without declaring what the Vk is...</p> <p>As far i have understand we have the following: 1) in general, a strong component is a sub-graph of a graph, in which for every node of this sub-graph there is a path to any node of the sub-graph (in other words you can access any node of the sub-graph from any other node of the sub-graph)</p> <p>2) a sub-graph <b>induced </b> by a list of nodes is a graph containing all these nodes plus all the edges connecting these nodes. in paper the mathematical definition is " F is a subgraph of G induced by W if W is subset of V and F = (W,{u,y)|u,y in W and (u,y) in E)}) where u,y are edges , E is the set of all the edges in the graph, W is a set of nodes.</p> <p>3)in the code implementation the nodes are named by integer numbers 1 ... n. </p> <p>4) I <b>suspect</b> that the Vk is the set of nodes of the strong component K.</p> <p>now to the question. Lets say we have a graph G= (V,E) with V = {1,2,3,4,5,6,7,8,9} which it can be divided into 3 strong components the SC1 = {1,4,7,8} SC2= {2,3,9} SC3 = {5,6} (and their edges)</p> <p>Can anybody give me an example for s =1, s= 2, s= 5 what if going to be the Vk and Ak according to the code?</p> <p>The pseudo code is in my previous question in <a href="https://stackoverflow.com/questions/2908575/help-in-the-donalds-b-johnsons-algorithm-i-cannot-understand-the-pseudo-code">Understanding the pseudocode in the Donald B. Johnson&#39;s algorithm</a></p> <p>and the paper can be found at <a href="https://stackoverflow.com/questions/2908575/help-in-the-donalds-b-johnsons-algorithm-i-cannot-understand-the-pseudo-code">Understanding the pseudocode in the Donald B. Johnson&#39;s algorithm</a></p> <p>thank you in advance</p>
0non-cybersec
Stackexchange
Noise Pollution an Untouched Technology and Threat..
0non-cybersec
Reddit
Bought a second monitor someone recommended! love it so far! what am i missing looking for improvement! thanks.
0non-cybersec
Reddit
A little “soft” glam.
0non-cybersec
Reddit
Shower thought are just "highdeas" without the constant talk of marijuana..
0non-cybersec
Reddit
Where to find buyers for your prints?. Just set up a website and I am now selling my photos as prints on canvas, paper, and even metal. Problem: how do I find the buyers!? I have 50k insta followers and no one seems to really care or act when I promote the website with my artwork Question: how to find buyers? P.s. I sell photos of nyc streets etc
0non-cybersec
Reddit
10 of the Best Audiobooks of 2016 So Far.
0non-cybersec
Reddit
Python is very slow to start on Windows 7. <p>Python takes 17 times longer to load on my Windows 7 machine than Ubuntu 14.04 running on a VM (inside Windows on the same hardware). Anaconda3 distribution is used on Windows and Ubuntu default python3.4.</p> <p>From a Bash prompt (Git bash on Windows):</p> <pre><code>$ time python3 -c "pass" </code></pre> <p>returns in 0.614s on Windows and 0.036s on Linux</p> <p>When packages are loaded the situation gets worse:</p> <pre><code>$ time python3 -c "import matplotlib" </code></pre> <p>returns in 6.01s on Windows and 0.189s on Linux</p> <p>Spyder takes a whopping 51s to load on Windows and 1.5s on Linux.</p> <p>I have not had any luck determining why I have this performance problems. Does anyone have any ideas what I should try next?</p> <p>edit:</p> <p><a href="https://stackoverflow.com/questions/10150881/why-is-python-so-much-slower-on-windows">Why is python so much slower on windows?</a> has been suggested as a possible duplicate but my performance different is far greater and not explained simply by different library dependencies and compilers. This seems to me to be related to filesystem differences.</p> <p>I had suspected antivirus on-access scans but disabled the antivirus just in case.</p> <pre><code>&gt;&gt;&gt; sys.path ['', 'c:\\Anaconda3\\python34.zip', 'c:\\Anaconda3\\DLLs', 'c:\\Anaconda3\\lib', 'c:\\Anaconda3', 'c:\\Anaconda3\\lib\\site-packages', 'c:\\Anaconda3\\lib\\site-packages\\Sphinx-1.2.3-py3.4.egg', 'c:\\Anaconda3\\lib\\site-packages\\cryptography-0.8-py3.4-win-amd64.egg', 'c:\\Anaconda3\\lib\\site-packages\\nose-1.3.4-py3.4.egg', 'c:\\Anaconda3\\lib\\site-packages\\win32', 'c:\\Anaconda3\\lib\\site-packages\\win32\\lib', 'c:\\Anaconda3\\lib\\site-packages\\Pythonwin', 'c:\\Anaconda3\\lib\\site-packages\\setuptools-14.3-py3.4.egg'] </code></pre> <p>Update:</p> <p>A fresh install of Windows 8.1 Pro on the same PC solved the problem. After reinstalling all applications and Anaconda3 Python performance is the best I have seen. Unfortunately the root cause of this issue is still unknown.</p> <p>Correction:</p> <p>After my IT dept installed Sophos SafeGuard encryption software and MS Endpoint Protection the problem returned. Same slow start as before. Disabling the extra software did not solve the problem so we are trying tests on other machines to trace the problem. </p>
0non-cybersec
Stackexchange
The Tale of Peter Rabbit: iPad eBook.
0non-cybersec
Reddit
How to completely wipe laptop disk for a fresh Ubuntu install?. <p>I have a USB flash drive with Ubuntu 18.04 LTS, I want to completely wipe my machine of Windows 10 and start again with a new install of Ubuntu.</p> <p>I have installed Ubuntu on a laptop PC but the old Windows 10 installation is still causing me issues, and now I can't boot into Ubuntu again (after some sort of Ubuntu EFI update for Dell XPS). I may have screwed the pooch by removing some of the old filesystems via gparted, as I combined all partitions into a data partition that I mounted successfully, but after that update the restart resulted in a reboot quagmire.</p> <p>At this point, I assume it may be easiest to just completely wipe the system clean and install Ubuntu as the only OS. I would like to remove all vestiges of Windows as I do not need a dual boot. I have not found an easy way to do this, and <a href="https://www.avoiderrors.com/completely-remove-windows-10-and-install-ubuntu/" rel="nofollow noreferrer">installing Ubuntu using the option to erase all old partitions</a> didn't get me out of the woods, as I am now getting a "Dell Support Assist" screen when I boot that runs a memory check and then gets me into an all blue screen with no further progress.</p> <p>The machine is a Dell XPS 15 9570.</p> <p>Thanks in advance for any comments or suggestions.</p>
0non-cybersec
Stackexchange
Should you change salt when changing password?. <p>Assume a password storage scheme using a computationally-expensive hash algorithm and a CSPRNG salt. User ID, salt, and hash value are stored in a table; if the table is compromised, all three values are available to an adversary.</p> <p>Is there any value in computing a new salt when a user changes his password? </p> <p>(I think this question only makes sense if the adversary has before and after copies of the password table, but I could be very wrong about that.)</p>
0non-cybersec
Stackexchange
E/SelfBrailleClient(11344): Failed to bind to service. <p>I keep getting following error in Logcat of my Android apps.</p> <pre><code>08-18 12:20:10.030: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.450: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.650: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.650: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.650: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:10.981: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:11.942: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:11.942: E/SelfBrailleClient(11344): Failed to bind to service 08-18 12:20:11.942: E/SelfBrailleClient(11344): Failed to bind to service </code></pre> <p>I seem to notice this in several of my applications.</p> <p>Thanks.</p>
0non-cybersec
Stackexchange
Prevent Windows PowerShell console from flashing up. <p>CustomApp is registered with a URI Scheme in Windows 10 so it launches when Chrome browser visits CustomApp://userid@departmentid</p> <p>Computer\HKEY_CLASSES_ROOT\CustomApp\shell\open\command</p> <pre><code>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\Program Files\CustomApp\bin\launch-customapp.ps1" -uri "%1" </code></pre> <p>Works great for launching the CustomApp but the blue Windows PowerShell console flashes up briefly during execution. How can I prevent it from popping up?</p> <p>I've tried these parameters but the console window still flashes up.</p> <pre><code>-WindowStyle Hidden -NonInteractive -NoLogo </code></pre>
0non-cybersec
Stackexchange
Tim Lott – Zen Buddhism and Alan Watts.
0non-cybersec
Reddit
This Post.
0non-cybersec
Reddit
Is there a flash/html5 audio player that allows links to jump to a specfic time?. <p>I am looking for a web audio player to embed on my website that allows links to jump to a specific time in the audio, a la youtube.</p> <p>I am uploading lecture audio from lectures that are over an hour. I'd like to provide a way to link to specific times in the audio to jump to different topics, just like in youtube comments where users can enter 00:33 and have it turned in to a link that, when clicked, will jump to 00:33 part of the video. I can't seem to find anything that can do this.</p> <p>The site is only for myself and a few friends, FYI, so wide compatibility is not required. </p>
0non-cybersec
Stackexchange
Is storing redundant data part of the (CouchDB) self-contained data concept?. <p>The <a href="http://docs.couchdb.org/en/2.1.1/intro/why.html#a-better-fit-for-common-applications" rel="nofollow noreferrer">CouchDB concept</a> speaks about self-contained documents. In other words: ALL related data is stored in a single concept, instead of splitting them in multiple tables and reference each other using FKs. </p> <blockquote> <p>An invoice contains all the pertinent information about a single transaction the seller, the buyer, the date, and a list of the items or services sold.</p> </blockquote> <p>But this means that we end with redundant data in our database. Let's consider the invoice example: I buy 10 products over a period of time, which results in 10 invoices. Now several information are redundant, e.g. my billing address, delivery address and so on. That's at least a waste of space. </p> <p>Considering other use-cases, updating data can be very complex. If we have a blogging-cms like WordPress, every post-document contains metadata like author name/email and so on. If those information changes, we've to update a lot of documents. And we have to know the structure from all of them. E.g. the email could be used in posts, comments, log entrys and so on. </p> <p>When you think that the CouchDB allow a different form for any document, updating such information looks like a horrible tasks. I used MySQL as relational database for years and it seems much more meaningful to normalize such information, put e.g. users in a user table/collection, so that we can refer to some kind of PK. </p> <h3>What is the purpose behind those concept in CouchDB?</h3> <p>So my question is: Did I understood the concept of CouchDB properly, that they drop normalisation completely? I see the (theoretically?) benefit of having a better performance when no joins are required. Is the concept that we get a database with high throughput, but have to live with a (possible massive) amount of redundant data and we have to deal with a complex update-process when related metadata changes? </p>
0non-cybersec
Stackexchange
What is a thorough method to manually generate a random number between $1$ and $100$?. <p>The other day, I got an idea. I would like to generate a random number between $1$ and $100$ , however <em>by hand.</em> You often want to use these random numbers to play games or even for practical purposes. </p> <p>And only using simple tools like a desk clock and pen and paper.</p> <p>What might be a reliable way to do this?</p>
0non-cybersec
Stackexchange
How do you shut down a stale Apollo-Client websocket connection?. <p>I have a page that is loading connected apollo-client pages as widgets inside of a main page. My GraphQL server is self-hosted. They are served up through iFrame (self-hosted), connecting back to my own server. Communications are done through a 3rd party's iFrame communications SDK. </p> <p>For some reason the widgets are not cleared out from the window when they are stale (I have no control over this). However I do have access to know when they are "stale". When they turn stale I want to disconnect / shutdown the websocket connection. The trouble is the still-connected clients are eating up my back-end's CPU. I am watching the websocket connection through chrome dev-tools. I notice every 5 seconds it sends a keep-alive request to the websocket sever. Every so often I see a stop request, and I want to figure out how to replicate that. </p> <p>Im my react apollo-connected component I tried calling these two commands, but after they are called with no errors, the keep-alive flags are still being sent to the websocket server. </p> <pre><code>this.props.client.stop() this.props.client.clearStore(); </code></pre> <p>How do I tell the apollo-client to shut itself down? </p>
0non-cybersec
Stackexchange
Just looking back I have a story I have to share with you all!. When I was in sixth grade, there was a beautiful girl named Ruby in my class. I didn't have many friends, but she seemed to like me and one day invited me and a few other girls over her house. At eleven years old I was a tall bony kid, covered in freckles, huge red frizz-ball of hair, snaggle-toothed and flat chested. I didn't care much for beauty. Ruby turns to one of the other girls and whispered something in her ear. "Let's give DontDieInAWildFire a make-over!" As you could imagine, I was a little apprehensive, I knew kids could be mean but part of me wanted to trust the girls, why not right? Ruby was my friend. So they decide it will be a surprise makeover, I'm not allowed to see what they put on my face or anything until they're done. I close my eyes. It must have taken a half hour, as I heard them debate eye shadows, felt brushes rub what I imagined was powder all over my face and neck, I feel them touching my lips, and smudging away things they didn't like. I keep my eyes shut. Finally, after much debate, I am given permission to look. Holy #$%*. I look beautiful, probably the most beautiful I've ever looked in my entire life! "Look how red your cheeks are" said Ruby. "Look how long your eye lashes are, how pink your lips, how smooth your skin..." I was in shock. "How? What did you do to make me look like this?" She smiled. "We didn't put a single bit of makeup on you." She showed me the q-tips, the clean brushes, the glass of water. "You're beautiful just as you are." We were eleven years old and Ruby had the knowledge to give me the greatest gift anyone has ever given me, the ability to be comfortable in my own skin. I'm 19 now and just finishing up my first year at college. I hope you all remember how beautiful you are, just as you are.
0non-cybersec
Reddit
Can&#39;t type the password while logging in the Non-Graphical interface (Ctrl+Alt+F3). <p>I have managed to log before, but now its different. I can type the Login normally and press enter. It asks for the password. But what I type is not displayed on the screen. I have to press enter, what moves it one line down, to start typing the password. Because of that, the password is seem as "incorrect". If I dont press enter it just wont display my password on the screen. </p> <p>PS: Even trying to type it on "invisible" wont let me in. </p> <p>PS2: I can log in the Graphical interface without a single digit problem.</p> <p>What might be causing the problem?</p>
0non-cybersec
Stackexchange
Can&#39;t stop list dividers being treated as list items. <pre><code>$(document).on("click", "li", function() {alert("A list item was clicked");} </code></pre> <p>I'm using the above code to perform an action on every list item but list dividers are also proccing this event.</p> <p>I managed to exclude my close button using </p> <pre><code>$(document).on("click", "li", function() { if (this.id !== "closeButton") { alert("A list item was clicked"); } }); </code></pre> <p>however I can't stop it from occurring on list dividers. I've tried to no avail</p> <pre><code>$(document).on("click", "li", function() { if (this.class !== "ui-li-divider") { alert("A list item was clicked"); } }); </code></pre> <p>Here's a JSFiddle with the problem: <a href="http://jsfiddle.net/2g3w5/" rel="nofollow">http://jsfiddle.net/2g3w5/</a></p>
0non-cybersec
Stackexchange
Bourne shell: trailing `-` operator in parameter substitution. <p>I'm reading a shell script for adding a progress bar to certain processes (found <a href="http://www.theiling.de/projects/bar.html" rel="nofollow noreferrer">here</a>). I'm having trouble understanding this (optional) line:</p> <pre><code>#BAR_EXT=${BAR_EXT-} </code></pre> <p>The comment says that this will add an extension to each file, and maybe I just need to read further, but I'm not familiar with that use of the - operator.</p> <p>I know about this kind of substitution, as found in the <a href="https://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion" rel="nofollow noreferrer">Bash Reference Manual</a>:</p> <pre><code>${parameter:-word} </code></pre> <p>I also know that the above will replace a null value for <code>parameter</code> with <code>word</code>, whereas <code>${parameter-word}</code> will not. (At least, I think I know that.)</p> <p>But with nothing specified after the <code>-</code> here, I'm not sure what's going on. Will this simply replace <code>parameter</code> with a null value? Generally, I would accept that as a working guess and just keep reading, but with the comment mentioning <em>adding</em> extensions to files.</p>
0non-cybersec
Stackexchange
What keyboard layout has @ on Ctrl+Alt+2?. <p>My girlfriend is looking for the keyboard layout that she always has used, where she says that to do the @ sign, its Ctrl+Alt+2.</p> <p>So what keyboard configuration has that shortcut for the @ sign? We cant see to find it.</p>
0non-cybersec
Stackexchange