text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Can a black hole be pried open with another black hole?. If two black holes were to move very close to each other, could their gravity pulling in opposite directions reduce the escape velocity near the event horizons enough to make it possible for matter that once crossed over to escape? | 0non-cybersec
| Reddit |
Pulled Pork about to come off the smoker. | 0non-cybersec
| Reddit |
scalacheck, scalatest, specs - which one has the lower barrier to entry?. <p>Between the following test frameworks which one is the easiest to use and learn?</p>
<ul>
<li><a href="http://code.google.com/p/scalacheck/" rel="noreferrer">scalacheck</a></li>
<li><a href="http://www.scalatest.org/" rel="noreferrer">ScalaTest</a></li>
<li><a href="http://code.google.com/p/specs/" rel="noreferrer">specs</a></li>
</ul>
<p>I'm using 2.8.0 and <a href="http://code.google.com/p/simple-build-tool/" rel="noreferrer">sbt</a> for building, so working nicely with it is a factor. I'm not necessarily looking at the most full featured. As best I can tell my criteria are in order:</p>
<ul>
<li>allow unit testing for Scala code</li>
<li>painless set-up</li>
<li>working with sbt</li>
<li>tutorials</li>
<li>rich documentation</li>
</ul>
| 0non-cybersec
| Stackexchange |
How can I copy all links displays in all opened webpages (tabs)?. <p>How can I copy all links displays in all the webpages I have opened in Chrome (I can use another browser if needed). Please note that I don't want to copy the urls of the tabs themselves, but the urls that are shown as links within each of the opened tabs.</p>
| 0non-cybersec
| Stackexchange |
honoring graves on memorial day. | 0non-cybersec
| Reddit |
Win8.1 Someone logged into my PC by adding a new Account. <p>I have just started using win8.1. Yesterday I locked my PC and went to a lecture. Then when I came back, I saw that my lockscreen was changed. I navigated to log-in screen, and saw a different username: XIT (XIT is the abbreviation for my university's IT service. But there should not be any user on my PC named XIT!) Then I switched user, logged into mine, checked user account settings and saw that XIT had admin rights. How can that be possible?</p>
<p>On my PC, there is only one user and that is me. XIT did not install win8.1, I installed it. They control our network, but I do not think that someone from our university's IT, would just crack into my PC for fun. Maybe someone else did it and named the user account after XIT.</p>
<p>What I am wondering is, is there a way to add a new account without logging into my account? Is there a hotkey or something?</p>
| 0non-cybersec
| Stackexchange |
And a successful arrival!!. | 0non-cybersec
| Reddit |
Configure Evince to open maximized with 100% zoom level?. <p>I have Ubuntu 12.04.5 LTS installed on my computer.</p>
<p>If I open PDF in Evince for the first time, the window is always un-maximized and zoom level is 70%. I want Evince to be maximized and the zoom level set to 100% every time I open a PDF.</p>
<p>I have tried to adjust the settings and clicked "Save Current Settings as Default" but when I open a new PDF, Evince is un-maximized and zoom level is 70%.</p>
<p>How can I get Evince to open maximized and with zoom level 100%?</p>
| 0non-cybersec
| Stackexchange |
Adding/Enabling windows feature using chef. <p>I am writing chef cookbook to add/enable some of the windows feature. For enabling I am using <code>powershell_script</code> resource and below is the powershell script.</p>
<pre><code>Import-Module Servermanager
Add-WindowsFeature Print-LPD-Service
</code></pre>
<p>For some reason, during chef-client run windows feature is not enabled. But the recipe ran successfully.</p>
<p>When I manually executed the command in powershell shell it works fine.</p>
<p>I am not aware of any security settings to be enabled to achieve this requirement. So, how we can enable windows feature using chef. Any pointers will be helpful. </p>
| 0non-cybersec
| Stackexchange |
Reset messed up certificate data in Firefox and Thunderbird?. <p>I am running Firefox 7.0.1 and Thunderbird 7.0.1 on Mac OS X 10.6.8.</p>
<p>I was exploring/nosing around their Preferences, and deleted many Authorities in the Certificate Manager.</p>
<p>Afterwards I started to get lots of messages from Firefox and Thunderbird that looks like this:</p>
<blockquote>
<p>[domain ...:443] uses and invalid security certificate.</p>
<p>The certificate is not trusted because the issuer certificate is not
trusted.</p>
<p>(Error code: sec_error_untrusted_issuer)</p>
</blockquote>
<p>There are only two buttons I could click on: "View Certificate" and "Cancel". Regardless of which one I choose, the messages repeatedly pop up whenever I load a webpage.</p>
<p>Interestingly, I even have trouble logging onto websites (Gmail, superuser, etc.) even on other browsers on <em>other</em> computers. For instance, when browse to superuser.com, I am logged in. But when I ask a question, I am asked to log in, yet I can't log in with my Google Account (which I always use for stackexchange sites).</p>
<p>I don't even know how to troubleshoot this problem, or if there is some way to reset my system's certificate information?</p>
<p>This is really weird, and impedes my normal web browsing. </p>
| 0non-cybersec
| Stackexchange |
migrating DNS while retaining email hosting from Microsoft 365. <p>The title might be a bit misleading but I don't know how else to describe my situation.</p>
<p>Situation: Client have registered a domain through company A, which from the record it is currently pointing to company A DNS. Client also purchase a Microsoft 365 subscription with the email hosting service through company A and they have set it up for him. From what I see from the DNS MX/A record, it has the root domain pointing to outlook.com for the microsoft 365 email hosting. </p>
<p>Now he wants a website from us, and since he does not have a web hosting service, naturally the new website will be hosted with us, which will be a shared hosting account we have with a hosting provider. He would like to retain his current email hosting so he can keep all the email and continue using the Microsoft 365.</p>
<p>I have setup new domain for web hosting as well as migrating the whole web hosting and e-mail hosting from another hosting provider before. While I think it should not be any difference, I have never have case where e-mail and web hosting need to be in different server, and to dealt with Microsoft 365 before.</p>
<p>I believe all I need to do is point the domain to my hosting DNS, and copy the current DNS setting in company A including the MX/A record to my web hosting DNS. Is that what should be done? Will the SPF record of Microsoft 365 need to reset and what else do I need to do to ensure smooth transition?</p>
<p>I do not want to do anything for my client before I know what to do.</p>
| 0non-cybersec
| Stackexchange |
Regarding apartment shootings. | 0non-cybersec
| Reddit |
Vulture takes a bath. (PC: Chamilton James, National Geographic). | 0non-cybersec
| Reddit |
Acer Aspire One 756 and windows 7. <p>I bought laptop Acer Aspire One 756 containing windows 7. Can anybody give hints, how to reinstall the windows and divide hard disc into partitions C and D? Thank you for hints.</p>
<p>Recards</p>
| 0non-cybersec
| Stackexchange |
Why You Might Want to Store Your Passwords in Plain Text [xpost from /r/programming]. | 1cybersec
| Reddit |
How to reset the npm registry in global npm config. <p>Is there any way to change or reset the global npm registry.</p>
<p>Appreciate your assistance. </p>
| 0non-cybersec
| Stackexchange |
Derivation of the Euler spiral (clothoid). <p>The Euler spiral is a planar curve, whose curvature increases linearly with arc length from the origin. This <a href="http://en.wikipedia.org/wiki/Euler_spiral#Formulation" rel="nofollow noreferrer">Wikipedia</a> article features a derivation of its equation based on the fact, that the curvature is in fact the rate of change of the angle of the tangent vector. I was wondering what an alternative derivation would look like, that would start with an unknown parametrization:</p>
<p><span class="math-container">$$\binom{x(t)}{y(t)}$$</span></p>
<p>and based on the formulas for curvature:</p>
<p><span class="math-container">$$k(t) = \frac{x'(t)y''(t) - y'(t)x''(t)}{(x'(t)^2+y'(t)^2)^{3/2}}$$</span></p>
<p>and arc length:</p>
<p><span class="math-container">$$L(t) = \int _0 ^t \sqrt{x'(\tau)^2+y'(\tau)^2} \ d\tau$$</span></p>
<p>would get to something like:</p>
<p><span class="math-container">$$const. = \frac{(x'(t)^2+y'(t)^2)^{3/2}}{x'y'' - y'x''} \cdot \int _0 ^t \sqrt{x'(\tau)^2+y'(\tau)^2} \ d\tau$$</span></p>
<p>Here I am stuck, one should probably simplify this by using a parametrization by the arc length..? And where do the sine and cosine in the resulting parametric equations come from?</p>
| 0non-cybersec
| Stackexchange |
Beachten Sie, dass Software-Programme zeigen können, wer Sie sind oder was Sie tun, basiert auf Ihrer Freundesliste auf einer Social Network-Website.. | 0non-cybersec
| Reddit |
If only there was a second circle to use for an eyehole.... | 0non-cybersec
| Reddit |
Soon to be first time parent - looking for advice on all the "best" things?. What has been a product that you would never want to parent without? (obviously focused on newborns)
​
we are planning on having multiple kids, excited to start our family. Our first will be a boy! Started looking at strollers and cribs and this and that. The market is beyond flooded. Looking for some concise advise on must-have things. Something that is totally worth the money! Also - what product would you definitely not recommend?
​
As far as basics I am not really concerned, know we need diapers and wipes and binky etc. etc. I do have other new parents in my life to ask as well but figured instead of reading reviews on amazon I would ask here!
​
thanks so much :) | 0non-cybersec
| Reddit |
Competitive gaming is ruining my favorite past time. So like many here, I grew up on pc gaming back in the dial up days when online gaming was at best playing with a friend in a private match (think warcraft 2/ AOE). But it was mainly playing solo. So many developed their own strategies and found what play style they particularly enjoyed. Some were great and some inferior. But who cares, it was just fun and a release from the stressors of the real world. However, there has been a shift. Now with the ease of access to the internet, optimal strategies are at everyones fingertips. And this is great for people who want to win all the time, they have all the data you can imagine. But the cost of this is that you can not rock a strat that is rewarding to an individual player if it isn't competitive. You have to adhere to the meta game. This has permiated almost every major multiplayer game and at all skill levels (think about the bitching on a silver game in CSGO). You no longer can just have fun doing what you like without getting yelled at in chat. I do not know when this shift happened but somehow gaming, which was a relief from the daily world, has become something similar to actual work. Maybe we can blame everyone wanting to be a famous twitch streamer or maybe its just that this is a culture that has developed over time and new players just assume it is the norm. I do not know what is happening but it kindof sucks. Nothing more. Sorry for the rant.
Edit: Thanks for the feedback. This has validated a bunch of assumptions about peoples motivations. This seems to be a dividing issue but its nice to see input explaining why people act as they do in most online games. Transparency on things you do not agree with is always a good thing. | 0non-cybersec
| Reddit |
Does the urge to overeat ever go away? Or do you just get better at controlling it?. What I'm asking is if at some point there is a moment where you can be completely indifferent to a cake or something laying on the kitchen counter.
Right now while I can control myself it's still super distracting if I'm at home. | 0non-cybersec
| Reddit |
Wait.. she did WHAT?!. | 0non-cybersec
| Reddit |
Most Embarrassed Person Ever.. | 0non-cybersec
| Reddit |
Combining share decryption on Paillier threshold scheme. <p>I am trying to implement the <a href="https://pdfs.semanticscholar.org/964e/280c7c050a8689d0c8f70acc0796a5bc1000.pdf" rel="nofollow noreferrer">Paillier threshold scheme described by Fouque, et al</a>, but I am having an issue when combining share decryptions.</p>
<p>The scheme calculates the plaintext <span class="math-container">$M$</span> with the formula:</p>
<p><span class="math-container">$M = L\left(\prod\limits_{j \in S} c_{j}^{2\mu_{0,j}^{S}} \mod n^{2}\right) \times \frac{1}{4\mu^{2}\theta} \mod n$</span></p>
<p>Where <span class="math-container">$\mu_{0,j}^{S} = \Delta \times \prod_{j' \in S \setminus \{j\}} \frac{j'}{j' - j} \in \mathbb{Z}$</span></p>
<p>For a list of shares <span class="math-container">$S$</span>, where on code it is represented by a list of objects <span class="math-container">$(id: i, value: c_i)$</span> where <span class="math-container">$i$</span> is the share ID and <span class="math-container">$c_i$</span> the value, I am trying calculate <span class="math-container">$\mu_{0,j}^{S}$</span> with the following <strike>pseudocode</strike> Python code:</p>
<pre><code>def combine(shares: Set[Decryption], key, params) -> int:
n = key.n
n_squared = n * n
threshold, Δ = params.threshold, params.Δ
c = 1
shares = shares[:threshold]
for i in shares:
µ = Δ
for j in shares:
print(i.id, j.id)
if i is j:
continue
µ *= j.id // (j.id - i.id)
c *= pow(i.value, 2 * µ, n_squared)
L = 4 * Δ * Δ
c //= L * key.θ
return ((c - 1) // n * modular_inverse(L, n)) % n
</code></pre>
<p>The problem is when I get to the second iteration, where <code>i.id</code> is 2, and the inner for starts with <code>j.id</code> as 1. Thus, <span class="math-container">$\mu$</span> is negative when I calculate <span class="math-container">$\frac{j'}{j' - j}$</span> because <span class="math-container">$j'$</span> (<code>j.id</code>) is smaller than <span class="math-container">$j$</span> (<code>i.id</code>), then <span class="math-container">$j' - j$</span> becomes negative.</p>
<p>The effect is that <span class="math-container">$\mu$</span> is negative (every other iteration yields positive factors to multiply), so <span class="math-container">$c_{j}^{2\mu_{0,j}^{S}}$</span> elevates <span class="math-container">$c_j$</span> to a negative exponent.</p>
<p>Did I miss something from the paper, or is it working as expected and I have to handle this negative exponent some other way?</p>
| 0non-cybersec
| Stackexchange |
Cookit, I'm in over my head.. I can't browse r/cooking without seeing an article about pork shoulder and the deliciousness contained therein. So when I saw a deal on it at the grocery store yesterday, I said, "Hey, why the hell not? I can cook things. I'm pretty sure we have a slow cooker at home, too. I can figure it out."
Well I was wrong, my friends. I have 8 pounds of pig in my fridge, and it's taunting me.
"Aren't you going to cook me?" it says. "Sure, I just barely fit in your six quart slow cooker. And yeah, all of the recipes you're finding are for two or three pound pieces of meat. No big deal. You can do it... *pussy*."
Help me. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to change desktop theme periodically. <p>Is it possible change desktop theme In each hour </p>
| 0non-cybersec
| Stackexchange |
So ... this happened at work today. Still not sure how he got in.. | 0non-cybersec
| Reddit |
True ending. | 0non-cybersec
| Reddit |
MRW I submit something and immediately get a downvote. | 0non-cybersec
| Reddit |
Windows 10 - Perl vs. dsadd/dsquery. <p>I created a perl script for adding users to Active Directory a few months ago. On Windows 7 it runs fine. On Windows 10 perl is not able to run "dsquery" or "dsadd" but I can really not understand this.</p>
<p>When I run "dsquery" from the same command line, it works. Trying with the perl script... It won't!</p>
<pre><code>Der Befehl "C:\Windows\System32\dsquery.exe" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
</code></pre>
<p>(= Command dsquery could not be found...)</p>
<p>Some code snippets from the perl script:</p>
<pre><code>$datetime = strftime("%d.%m.%Y %H:%M:%S", localtime);
&GetOptions ("-v=s" => \$fname,
"-n=s" => \$sname,
"-u=s" => \$uname,
"-p=s" => \$pwd,
"-noshare" =>\$noshare,
"-test" =>\$test,
"-noquota" =>\$noquota,
"-sshpw=s" =>\$sshpw );
unless ($fname) {
print "Vorname: ";
$fname = <STDIN>;
chomp $fname;}
unless ($sname) {
print "Nachname: ";
$sname = <STDIN>;
chomp $sname;}
unless ($uname) {
$uname = substr($fname, 0, 1);
$uname = "$uname.$sname";}
$uname = lc($uname);
if (`C:\\Windows\\System32\\dsquery.exe user -samid $uname`){
print "Benutzer $uname existiert bereits!";
exit;}
</code></pre>
<p>At this point it already stops.
But, when I run:</p>
<pre><code>c:\windows\system32\dsquery.exe user -samid ANYUSER
</code></pre>
<p>it works.</p>
<p>What is happening right here? Can anyone undestand this??</p>
<p>Cheers,
Lukas</p>
| 0non-cybersec
| Stackexchange |
Contemplation in green, Me, Digital, 2019. | 0non-cybersec
| Reddit |
windows 10 creator how to start pinned visual studio 2017 solution in admin mode always. <p>Is there a way to ensure that all pinned solutions from Visual Studio 2017 always start visual studio 2017 in admin mode?</p>
<p>I have checked the other related answers to this question and all relate to either earlier versions of Windows 10 (registry entries missing now, etc.) or earlier versions of Windows itself. I have yet to see this addressed in the Creator version (v 1703) of Windows 10.</p>
<p>If there is, will you please share it as I am used to having that feature "just work" and now it fails. </p>
<p>What is of particular annoyance is that Visual Studio 2017 (v15.3) <em>will</em> start in admin mode every time! Just the pinned solutions fail to do so.</p>
<p>In particular, is there a group policy setting that I am not aware of that needs tweaking? I should clarify and say that this <em>does</em> work on the old home box (which is NOT part of a domain) but does not work on the work machine, which IS part of a domain. <== This is the part that makes this different from the standard answers.</p>
<p>At the time I posted this, I did not have access to the standard methods (attempting to change the status of devenv flat failed due to a lack of the "run as administrator" option and trying to change vslauncher gave me a security violation. I spoke with the DevOps guys, found out they were "fiddling" with things (we just moved to Win10 not too long ago) which caused my original problem. The follow up of being able to launch VS as admin just fine but not a pinned solution from the start bar had them going for awhile, just as one of their mods prevented one of my colleagues from starting multiple copies of VS, admin or not - made no difference, he got one copy and that was it. They have relaxed the rules quite a bit now, thus the supplied solution worked for my environment.</p>
| 0non-cybersec
| Stackexchange |
condition number. <p>Hi
I have the following matrix</p>
<p>A=[a_11 a_12 a_13 1;
a_21 a_22 a_23 1;
.
.
.
a_n1 a_n2 a_n3 1]</p>
<p>I have seen that when some of a_ij are big for instance in the order of 200 , then condition
number is also big.</p>
<p>I would like to know is it possible to show it theoretically. </p>
<p>Is it possible to find a lower bound for this problem?</p>
<p>Regards,</p>
<p>Reza</p>
| 0non-cybersec
| Stackexchange |
xen host with 48gb ram for 32bit guests. <p>I have a Linux rhel xen host which will be running many 32 bit guests. (The guests have to be 32bit). The server has 48gb of ram, and currently it runs a xen kernel but this only sees 16gb of ram on the dom0.</p>
<p>Is there a way to avoid this problem ? Each guest only needs 256-512mb </p>
<p>Not hopeful, but any suggestions would be great.</p>
| 0non-cybersec
| Stackexchange |
NSFW Lace Bluebird. Done by Sal Tino at Ritual Tattoo in Denver, CO.. | 0non-cybersec
| Reddit |
Browsing very slow in Windows. <p>I have formatted and reinstalled my i5 PC a few months ago. A while ago, browsing became very slow.
I can't remember installing any special browser addons, but it could be since I download a lot of stuff.</p>
<p>How can I find out what's slowing down the browser? I have purchased AVG antivirus which didn't find anything abnormal.</p>
| 0non-cybersec
| Stackexchange |
How I feel when I look at texts that I sent without thinking. | 0non-cybersec
| Reddit |
Call to a member function count() on a non-object (Laravel 5). <p>I have a list of projects, where I can click on and it (needs to) show the project name, and the list of the projects' tasks (ToDo application)</p>
<p>But when I click on a certain project I get this error.</p>
<p>(The "H2" project name will show up)</p>
<pre><code>h2>{{{ $project->name }}}</h2>
@if ( !$project->tasks->count())
There are no tasks for this project.
@else
<ul>
@foreach( $project->tasks as $task)
<li><a href="{{ route('projects.tasks.show', [$project->slug, $task->slug]) }}">{{ $task->name }}</a></li>
@endforeach
</ul>
@endif
</code></pre>
| 0non-cybersec
| Stackexchange |
Rent A Car Lahore | slashdot.org. | 0non-cybersec
| Reddit |
How to read non-ASCII characters from CLI standard input. <p>If I type <code>å</code> in CMD, fgets stop waiting for more input and the loop runs until I press <code>ctrl-c</code>. If I type a "normal" characters like a-z0-9!?() it works as expected.</p>
<p>I run the code in CMD under Windows 7 with UTF-8 as charset (<code>chcp 65001</code>), the file is saved as UTF-8 without bom. I use PHP 5.3.5 (cli).</p>
<pre><code><?php
echo "ÅÄÖåäö work here.\n";
while(1)
{
echo '> '. fgets(STDIN);
}
?>
</code></pre>
<p>If I change charset to <code>chcp 1252</code> the loop doesn't break when I type <code>å</code> and it print "> å" but the "ÅÄÖåäö work here" become "ÅÄÖåäö work here!". And I know that I can change the file to ANSI, but then I can't use special characters like ╠╦╗.</p>
<p><strong>So why does fgets stop waiting for userinput after I have typed åäö?</strong></p>
<p><strong>And how can I fix this?</strong></p>
<p>EDIT:</p>
<p>Also found a strange bug.
<code>echo "öäåÅÄÖåäö work here! Or?".chr(10);</code> -> <code>��äåÅÄÖåäö work here! Or? re! Or?</code>.
If the first char in echo is <code>å/ä/ö</code> it print strange chars AND the end output duplicate's with <code>n - 1</code> char.. (n = number of åäö in the begining of the string).</p>
<p>Eg: <code>echo "åäö 1234" -> ??äö 123434</code> and <code>echo åäöåäö 1234</code> -> <code>??äöåäö 1234 1234</code>. </p>
<p><strong>EDIT2 (solved):</strong></p>
<p>The problem was <code>chcp 65001</code>, now I use <code>chcp 437</code> (<a href="http://msdn.microsoft.com/en-us/goglobal/cc305156" rel="nofollow">chcp 437</a>).
Big thanks to Timothy Martens!</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 |
Cardboard Asus Strix GTX 1080 , When you can't afford the real thing :<. | 0non-cybersec
| Reddit |
Met SO tool coworker and need to vent. I went to an afterwork party with my SO and was making the rounds, being introduced and making small talk. We get to the last set of couples and they ask what I do. I tell them I'm a teaching and mid-explanation of where/what I do, he starts saying "oh, my teacher was so hot. I mean, tiny waist, big boobs..." and I'm thinking "Ok, cool story bro" and get the vibe we aren't going to get along.
So I start talking to another couple, but I can still hear him. Literally, the ONLY thing he talked to his date about was how hot/ugly every single female at the party was. Regardless of gender, I think it's rude and shallow to discuss such things with a date.
He also made some shitty comments about my relationship with my SO about me wearing the pants, to which my SO handled beautifully.
Anyway, thanks for letting me rant TwoX | 0non-cybersec
| Reddit |
Checking whether a relation is transitive. <p>I'm currently preparing for my maths exam and one of the questions is to check whether or not a relation is transitive or not. I'm unsure on how to check if there is a transitive relation given an equation.</p>
<p>The questions I would be getting is like this.</p>
<p>Let $Q$ denote the relation on set $\mathbb Z$ of integers, where integers $x$ and $y$ satisfy $xQy$ if and only if</p>
<p>$$x - y = x^2 + y^2 - 2xy$$</p>
<p>I know how to figure out if it is symmetric and reflexive but I'm unsure on how to check the transitive part. Any help is appreciated, thank you.</p>
| 0non-cybersec
| Stackexchange |
Karma alwaya gets you. | 0non-cybersec
| Reddit |
Eve Online is now free to play, I have worked super hard on this guide, it is a complete walkthrough for Alpha Players, it contains ship fittings, advice, industry help, all of it.. | 0non-cybersec
| Reddit |
The Craziest Things In Our Universe. | 0non-cybersec
| Reddit |
Inactive window scrolling not working with excel. <h3>Inactive window scrolling:</h3>
<p>With windows 10 there is a new feature called inactive window scrolling, which means if your mouse hovers over a window you can scroll on it, without it needing to be the active window.</p>
<h3>Problem:</h3>
<p>This feature is pretty great, but it does not work with Microsoft excel. If excel has the focus, you scroll in excel wherever your mouse is.<br />
So most of the time when I am working with excel and browsing in the web at the same time I almost always accidentally scroll my excel table away.</p>
<p>Is there some kind of setting or feature or workaround to fix the problem?
Thanks in advance</p>
| 0non-cybersec
| Stackexchange |
Our little Blackfoot warrior.. | 0non-cybersec
| Reddit |
Is there a way to do in-place C macro expansion in VS code?. <p>I am using Visual Studio Code 1.34 and ms-vscode.cpptools 0.24.1. In a C file, when I hover over a statement containing a C macro, VS Code is kind enough to expand the macro in a hover box.</p>
<p>I can select this expanded piece of code and then manually replace the macro's 'call' side with it. But I was wondering if there is a way in vscode or in one of its extensions to do this macro expansion in-place, e.g. using some key shortcut. From what I have read from the documentation, I think you cannot do this with ms-vscode.cpptools alone.</p>
<p>It would be a nice bonus if back-slash line breaks were substituted with actual new lines in the in-place expension.</p>
| 0non-cybersec
| Stackexchange |
Need advice for night wakings. I am super sleep deprived so I am apologizing for my rambling and awful sentence structuring now. So this is what's up:
I have a one year old and we have been trying to gently sleep train her for months with no progress, we have been bedsharing up until last night. Last night I succumbed to trying to CIO with me in the room with her in the crib (in her own room) and me in a mattress so I could stay with her while she cried. She cried for fourty minutes then finally went to sleep, I felt awful and cried too so please only constructive comments. Anyway she went to sleep but then woke up 2.5 hours later at 11:30 wanting to breastfeed and I let her, she actually seemed hungry. Then she fell asleep on my lap and I put her in crib again right away but she went to sleep, I was surprised but relieved. She then woke up again at 2:00am and we did the same thing, and again at 3:30am then again at 5:00 am but I had to take her back In our bed because I was exhausted and she wouldn't go back to sleep without being next to me. So I know that I need to at least cut the feeds in half. I also wonder if this is habitual waking because the whole reason I needed to start sleep training is because she was waking every two hours to feed in our bed and it got so out of control. So I'm unsure if I should try to go in an hour before the usual wake time and stir her a bit to get her to try to get out of this habitual waking. I also don't know what method to use to get baby to go back to sleep without feeding. I have a three year old so I try to get her back to sleep in the middle of the night without crying. I'm not sure if I can get away with getting her to sleep on her own without a feed without crying but I want too. She also was/is a Velcro baby, I don't know if this info is pertinent, she is pretty willful. I guess I don't know what my next steps are and I'm trying it figure out what to do, and how I should go about tackling these wakings and weaning on the feedings. I'm pretty hopeless.
| 0non-cybersec
| Reddit |
How to Best Minimize Damage After Loss of Computer. <p>Myself and the rest of my coworkers on my (former) employer’s dev team were all just laid off from our jobs, and the employer took our MacBook Pros without letting us clear of our personal information or log out from web services. </p>
<p>Now, I’ve covered the bases the best I can by changing those web passwords, and I was smart enough to use a unique password for logging into this machine and used 2FA on all sites that supported it.</p>
<p>I know that I’m screwed when it comes to the files that were stored on my computer; I lost months of work on personal projects. (To be fair, I shouldn’t have been using it for personal things… but alas, this is the situation I currently find myself in. Live and learn.)</p>
<p>Something that does bother me a lot is that my private signing key and Apple iOS dev certs were on the computer as well.</p>
<p>I’m just really paranoid that something bad is going to come from this. I’ve <em>never</em> let anything like this happen before, but this caught me and my coworkers by surprise; we didn’t have any time to back up or wipe anything. They called us into to a different room, told us the bad news, and unceremoniously escorted us out without letting us go back to our computers.</p>
<p>What steps can and should I take from here on out to help prevent further damage from this?</p>
<p><strong>TL;DR: Laid off, wasn’t able to clear personal data, remove private keys, or log out of websites. What can I do at this point to at least <em>minimize</em> Bad Things™?</strong></p>
| 0non-cybersec
| Stackexchange |
TIL Charles Manson studied Scientology to learn how to manipulate people.. | 0non-cybersec
| Reddit |
[Houston Chronicle] Texans' Bill O'Brien, wife Colleen donating $100,000 to Houston Food Bank. | 0non-cybersec
| Reddit |
I couldn't pick any... | 0non-cybersec
| Reddit |
For the life of me I can’t get this handle off.. | 0non-cybersec
| Reddit |
Marina Abramović Made Me Cry. | 0non-cybersec
| Reddit |
Ladies, what's your advice?. I'm really starting to get tired of banking off meeting girls at bars, clubs and tinder/bumble. Ladies, what's a comfortable environment for you to meet guys and what's a good approach? I.E. A coffee shop, would you have coffee with a stranger if they approached you in a manner you like?
Curious to hear thoughts! | 0non-cybersec
| Reddit |
How to add constraint on a varchar column to have at least one non numeric character. <p>I am trying to implement some constraints on tables so that there is no tampering of the data from what is expected.</p>
<p>One of the constraints is on a varchar column. It should at least contain one non-numeric character. </p>
<p>How can I implement this constraint in SQL Server, and if I implement it, What will be the effect on the performance if any?</p>
| 0non-cybersec
| Stackexchange |
Theme WAYWT - Techwear Challenge - July 21, 2016. **THIS IS THE WAYWT THREAD**
=
______
[Link to the announcement thread]( https://www.reddit.com/r/malefashionadvice/comments/4su3bn/announcement_techwear_challenge_thursday_072116/)
______
**What Do?**
Show us your creativity
=
This is the techwear WAYWT challenge, if you are not ready to fight for the freedom of the dystopic future then sit this one out. Let those who dare to try to become cyborgs reap their glory as enhanced beings. Regular WAYWT will be posted tomorrow.
______
***WAYWT and extra special Thursday rules apply.*** So if you think techwear is dead then you should probably just leave right now.
_____
For a full reference of the 2016 Spring WAYWT Theme Challenge schedule, [please see this post]( https://www.reddit.com/r/malefashionadvice/comments/4ervu2/mfa_challengetheme_waywt_schedule_spring_2016/) - This are nearing the end of the season. Lets finish strong! | 0non-cybersec
| Reddit |
My brother and his wife welcomed this little guy into their family today.. | 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 |
Recommendation for Tattoo Artist in Melbourne Australia for chest piece (link inside to idea). All. Ive been thinking about getting a chest piece for awhile now. Ive been inspired by something like this: http://imgur.com/iE1LKMc and http://imgur.com/gQticBv
I was thinking Emily Rose Murray, but looks like it could be a lifetime wait. Would love any suggestions from anyone else on some melbourne tattoo artists. | 0non-cybersec
| Reddit |
How to make a CriteriaBuilder join with a custom "on" condition?. <p>I want make a query where I join 2 tables, using the CriteriaBuilder. In MySQL the query I'm trying to make would look like this:</p>
<pre><code>SELECT * FROM order
LEFT JOIN item
ON order.id = item.order_id
AND item.type_id = 1
</code></pre>
<p>I want to get all orders and if they have an item of type #1, I want to join with this item. However, if no item of type #1 is found, I still want to get the order. I can't figure out how to make this with the CriteriaBuilder. All I know how to make is:</p>
<pre><code>CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Order> cq = cb.createQuery(Order.class);
Root<Order> order = cq.from(Order.class);
Join<Order, Item> item = order.join(Order_.itemList, JoinType.LEFT);
Join<Item, Type> type = order.join(Item_.type, JoinType.LEFT);
cq.select(order);
cq.where(cb.equal(type.get(Type_.id), 1));
</code></pre>
<p>This query is broke, since it results in something like this in MySQL:</p>
<pre><code>SELECT * FROM order
LEFT JOIN item
ON order.id = item.order_id
WHERE item.type_id = 1
</code></pre>
<p>The result will only contain orders with items of type #1. Orders without are excluded. How can I use the CriteriaBuilder to create a query like in the first example?</p>
| 0non-cybersec
| Stackexchange |
Implication of Area Formula (Measure Theory). <p>In the book <strong>Measure Theory and Fine Properties of Functions</strong> of <em>Evans and Gariepy</em> has the theorem:</p>
<p><strong>Theorem (Area Formula)</strong>: Let $f: \mathbb{R}^n \longrightarrow \mathbb{R}^m$ be Lipschitz, $n\leq m$. Then for each $\mathcal{L}^n$-measurable subset $A\subset \mathbb{R}^n$, $\int_A Jfdx=\int_{\mathbb{R}^m} \mathcal{H}^0(A\cap f^{-1}(y))d\mathcal{H}^n(y)$.</p>
<p>Where, $\mathcal{H}^n$ and $\mathcal{H}^m$ are Hausdorff measure. $\mathcal{H}^0$ is counting measure. $J(f)$ is the Jacobian of $f$.</p>
<p>After the theorem has the remark,</p>
<p><strong>Remark</strong>: Using the Area Formula, we see $f^{-1}(y)$ is at most countable for $\mathcal{H}^n$ a.e $y\in \mathbb{R}^m$.</p>
<p><strong>My question</strong>: How to prove this remark?</p>
| 0non-cybersec
| Stackexchange |
Is there a way to ignore an error return value in Golang?. <p>I'm trying to initialize a struct in Go, one of my values is being which returns both an int and an error if one was encountered converted from a string using <code>strconv.Atoi("val")</code>.</p>
<p>My question is : Is there a way to ignore an error return value in Golang?</p>
<pre><code>ts := &student{
name: td[0],
ssn: td[2],
next: students.next,
age: strconv.Atoi(td[1]),
}
</code></pre>
<p>which gives the error</p>
<pre><code>multiple-value strconv.Atoi() in single-value context
</code></pre>
<p>if I add in the err, which i don't want to include in my struct, I will get an error that I am using a method that is not defined in the struct.</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 |
Non-metric distances. <p>Could anybody suggest practically important distances that are significantly non-metric and are not Bregman divergences? For instance, they are non-symmetric and not equivalent to the Euclidean distance.</p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
Congruence numbers. <p>Having read about <a href="https://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind" rel="nofollow">Stirling numbers of the second kind</a> I am curious. The article says it shows the number of equivalence relations on a set $n$ with $k$ equivalence classes which makes sense to me from the definition. I am curious, is there any such number/process to acquire the the <a href="https://en.wikipedia.org/wiki/Congruence_relation" rel="nofollow">congruence relation</a> count? I realize this would be heavily determined by the operations on but it could possibly exist, couldn't it?</p>
| 0non-cybersec
| Stackexchange |
What is the AngularJS equivalent to Backbone's Collections?. <p>Is there an equivalent to <a href="http://backbonejs.org/#Collection" rel="nofollow noreferrer">Backbone's Collection</a> or <a href="http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.data.Store" rel="nofollow noreferrer">Ext JS's Store</a> in Angular JS? I'm learning about <a href="http://docs.angularjs.org/api/ngResource/service/$resource" rel="nofollow noreferrer">$resource</a>, but not quite getting this aspect.</p>
<h2>Controller</h2>
<pre><code>// This is the "collection" I'm interested in.
$scope.foos = [];
// Foo is a $resource.
Foo.query(function (foos) {
// This works, but is there a smarter "collection" object?
$scope.foos = foos;
});
$scope.createFoo = function (data) {
var foo = new Foo(data);
foo.$save(function (shinyNewFoo) {
$scope.foos.unshift(shinyNewFoo);
});
};
</code></pre>
<h2>Explanation</h2>
<p>In <code>$scope.createFoo</code> I'm making a new Foo, persisting it, then adding it to my <em>poor man's collection</em>, an array. This works and the view is updated correctly, but I'm too lazy for this. Ideally, I'd like to have a "collection" I can add to and remove from that will automatically POST/DELETE. Maybe something like the following.</p>
<h2>Pretend Implementation</h2>
<pre><code>$scope.fooCollection = new CoolCollection({
// specify the type of resources this collection will contain
itemsResource: Foo
});
// Creates new Foo, saves, adds to collection.
$scope.fooCollection.add(data);
</code></pre>
<p>Does something like this exist? The $resource docs mention a collection, but I didn't really get it. <a href="https://stackoverflow.com/questions/12762574/backbone-style-models-in-angularjs">This answer</a> seemed promising, but didn't explain the collection idea. Am I missing something or just not thinking about this <em>the Angular way</em>?</p>
<hr>
<h1>Addendum</h1>
<p>In the MEAN.io boilerplate, <a href="https://github.com/linnovate/mean/blob/master/public/js/controllers/articles.js" rel="nofollow noreferrer">the article controller</a> suggests that the "collection" is managed manually (see the <code>splice</code> below).</p>
<pre><code>$scope.remove = function(article) {
if (article) {
article.$remove();
for (var i in $scope.articles) {
if ($scope.articles[i] === article) {
$scope.articles.splice(i, 1);
}
}
} else {
$scope.article.$remove();
$location.path('articles');
}
};
</code></pre>
<p>If this elusive "collection" existed, I suppose they would have used it. Instead, they're managing an array manually.</p>
| 0non-cybersec
| Stackexchange |
Is it bad to break out of a labelled block in Java?. <p>I sometimes write Java code that looks like:</p>
<pre><code>success: {
fail: {
if (...) break fail;
// some code
if (...) break fail;
// some code
if (...) break fail;
// some code
break success;
}
// failure handling code
}
</code></pre>
<p>Is this bad practice? I could extract this to a method that returns an <code>Optional<SomeResultClass></code>, and then call that method from the main method, but I'm worried that this will be bad for performance.</p>
| 0non-cybersec
| Stackexchange |
How to typeset this symbol with \mathcal?. <p>I want to typeset the symbol $(C_m)$ by using <code>\mathcal</code>, I tried</p>
<pre><code>\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{calrsfs}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[mathscr]{euscript}
\begin{document}
$\mathcal{(C}_m)$
\end{document}
</code></pre>
<p>The results are not beautiful. I can not use $\mathcal{(C_m)})$ How can I typeset this symbol?</p>
| 0non-cybersec
| Stackexchange |
Got an error reading communication packets. <p>I have a server application that's using MySQL INNODB databases to store its data. I know that this application has worked as is in the past, but I don't know anything about the database server configuration it was using. Now while interacting with said server application using its respective client application I get the following MySQL error:</p>
<pre><code>Aborted connection XX to db: '...' user: '...' host: '...' (Got an error reading communication packets)
</code></pre>
<p>The server application meanwhile has this to say:</p>
<pre><code>[ERROR] Database Execution Error - query '{ call sp_x8(?,?,?) }, message '[MySQL][ODBC 5.2(w) Driver][mysqld-5.6.19]Lost connection to MySQL server during query'
[ERROR] 08S01 : try to reconnect : 08S01
[ERROR] Database Execution Error - can't execute stored procedure '{ call sp_x8(?,?,?) }'
[ERROR] Database Error - query '{ call sp_x8(?,?,?) }', param : 1(int64), 0(int), -1(int),
[ERROR] Database Execution Error - query 'rollback', message '[MySQL][ODBC 5.2(w) Driver][mysqld-5.6.19]MySQL server has gone away'
[ERROR] 08S01 : try to reconnect : 08S01
[ERROR] Database Execution Error - can't execute stored procedure 'rollback'
[INFO] UnhandledException
</code></pre>
<p>This happens at the same spot every time. It runs other stored procedures before just fine, but the one where the error happens is part of a larger transaction that runs several stored procedures. From the general log file:</p>
<pre><code>23 Query set autocommit = off
23 Prepare call sp_x1(?,?,?)
23 Execute call sp_x1('1','1','0')
23 Close stmt
23 Query commit
23 Query set autocommit = on
46 Query set autocommit = off
46 Prepare call sp_x2(?,?)
46 Execute call sp_x2('1','')
46 Close stmt
46 Prepare call sp_x3(?)
46 Execute call sp_x3('1')
46 Close stmt
46 Query set autocommit = off
46 Prepare call sp_x4(?,?,?)
46 Execute call sp_x4('1','10','0')
46 Close stmt
46 Query commit
46 Query set autocommit = on
46 Query commit
46 Query set autocommit = on
45 Query set @@sql_select_limit=DEFAULT
45 Query set autocommit = off
45 Prepare call sp_x5(?,?)
45 Execute call sp_x5('1','1024')
45 Close stmt
45 Prepare call sp_x6(?,?,?)
45 Execute call sp_x6('1','1','-1')
45 Close stmt
45 Prepare call sp_x7(?,?,?)
45 Execute call sp_x7('1','1','0')
45 Close stmt
45 Prepare call sp_x8(?,?,?)
</code></pre>
<p>This is the entire log for this session, since after that last prepare the connection is lost. I doesn't matter if I make it not run <em>that</em> SP either, it will fail on the next one coming after it then.</p>
<p>First I tried running the applications with the latest MySQL servers and ODBC connectors, but that actually resulted in this and other errors happening even earlier. Since the application was developed around 2014~2015 I downgraded to ODBC 5.3.4 and MySQL server 5.6.19, which got me this far.</p>
<p>Now the internet is full of tips about how to solve this error message, but the usual solutions are tweaking the various <code>timeout</code> and <code>max_allowed_packet</code> settings. However, changing these settings made no difference to me, the error kept happening in the same spot. Right now these settings are as follows. I know that they're ridiculous high, but I was just hoping for <em>some</em> kind of change that never came as I raised them further and further.</p>
<pre><code>max_allowed_packet = 1024M
interactive_timeout = 600000
wait_timeout = 600000
connect_timeout = 600000
net_read_timeout = 600000
net_write_timeout = 600000
innodb_buffer_pool_size = 2G
innodb_log_buffer_size = 64M
innodb_log_file_size = 1024M
innodb_log_files_in_group = 3
</code></pre>
<p>I should also mention that all this happens in the span of seconds, so even default timeouts of 30 seconds shouldn't cause these errors I believe, because that entire general log snippet above takes place over the span of maybe 5 seconds.</p>
<p>I'm at my wits' end and I'm hoping someone might have an idea what else could be causing this error, or which versions the application might've targeted.</p>
| 0non-cybersec
| Stackexchange |
Is being lame on social media a turn off?. I’m not good with social media and I don’t have much interest in getting better at it HAHA. I have very few followers and I usually lose a follower every time I post something (which is rare). I never gave it much thought until I overheard someone saying they were interested in someone but that they had a lame Instagram. At first I thought- wow that person is shallow. But now every time I start talking to someone they ask for my Instagram handle and I’m worried they’ll judge me based off of my sub par content and few followers.
I feel lame even typing this out, please be kind :) | 0non-cybersec
| Reddit |
Seahawks to make Russell Wilson Highest Paid QB. | 0non-cybersec
| Reddit |
Nice phone, can I have it?. | 0non-cybersec
| Reddit |
Chaos Definition vs stretching and folding. <p>As recalled by <a href="https://en.wikipedia.org/wiki/Chaos_theory" rel="nofollow noreferrer">Wikipedia</a>: </p>
<blockquote>
<p>Although no universally accepted mathematical definition of chaos
exists, a commonly used definition originally formulated by Robert L.
Devaney says that, to classify a dynamical system as chaotic, it must
have these properties:</p>
<ul>
<li>it must be sensitive to initial conditions, </li>
<li>it must be topologically transitive</li>
<li>it must have dense periodic orbits.</li>
</ul>
</blockquote>
<p>I also know that a way to obtain chaos in phase space is when the system causes trajectories to stretch and fold. I would like to understand the connection between the stretching and folding process and the properties of aforementioned definition. The sensitivity to initial conditions is probably related to stretching dynamics but is the "folding" related to other two properties? And if yes, why?</p>
<p>Answers, books and articles are welcome. Thanks!</p>
| 0non-cybersec
| Stackexchange |
Passing user identity to an internal REST service. <p>I have two services - A and B - which both expose a HTTP/REST API. Service A is exposed to the public and authenticates its users. It delegates part of the workload to service B which also has to know the identity of the authenticated user and perform some access control. Service B has no public IP address and only accepts connections from services in the same internal network (service A being one of them).</p>
<p>As I consider the connection between A and B trusted (they are both behind two firewalls), I simply pass the user identity in a custom HTTP header. Are there vulnerabilities in this setup I'm not thinking of? Are there standard ways of passing the user identity instead of using a custom HTTP header? </p>
| 0non-cybersec
| Stackexchange |
Lyx - disable auto-jumping to cursor when clicking on math/table/etc.?. <p>As the title says I don't want to have <em>any</em> auto-scrolling/jumping etc. when writing my documents. Is there a way to disable that <em>feature</em>? I'd go so far to recompile and edit source code myself if there is one available because I can <strong>not</strong> use the program in its current state. </p>
<p>Thanks in advance.</p>
| 0non-cybersec
| Stackexchange |
Apparently Lady Gaga is the queen of the universe. Oh, and she doesn't pay her employees overtime.. | 0non-cybersec
| Reddit |
How to create your own API for a site?. I am just curious how people do this, like here: https://github.com/unixpickle/kahoot-hack
How do you 'reverse engineer' the requests a site makes? Is it as simple as monitoring the network tab to see the activity? I have tried similar things in the past, but for big sites like kahoot there is so much data in the request that I can't accurately reproduce it in, say, Python.
Maybe someone can give a simpler example? :D | 0non-cybersec
| Reddit |
Holomorphic function with reals to reals. <p>Suppose that $f$ is an entire function and that there is a bounded sequence of real numbers $a_1, a_2, ... $ such that $f(a_n)$ is real for all $n$. Show that $f(x)$ is real for all real $x$.</p>
<p>Thoughts so far: Since $a_n$ is a bounded sequence of real numbers, we now that the set ${a_n}$ has an accumulation point. Now, since we're given that the function is entire, my first thought was to apply Liouville's Theorem somehow, but I can't get it to work out. A hint would be much appreciated.</p>
<p>Context: I'm studying for a qual, so just a hint at this point would be most helpful. </p>
| 0non-cybersec
| Stackexchange |
PsBattle: Grumpy Obama's. | 0non-cybersec
| Reddit |
pandas apply typeError: 'float' object is not subscriptable. <p>I have a dataframe <code>df_tr</code> like this:</p>
<pre><code> item_id target target_sum target_count
0 0 0 1 50
1 0 0 1 50
</code></pre>
<p>I'm trying to find the mean of the target but excluding the target value of the current row, and put the mean value in a new column. The result would be:</p>
<pre><code> item_id target target_sum target_count item_id_mean_target
0 0 0 1 50 0.02041
1 0 0 1 50 0.02041
</code></pre>
<p>where I computed <code>item_id_mean_target</code> value from the formula:</p>
<pre><code>target_sum - target/target_count - 1
</code></pre>
<p>...with this code:</p>
<pre><code>df_tr['item_id_mean_target'] = df_tr.target.apply(lambda x: (x['target_sum']-x)/(x['target_count']-1))
</code></pre>
<p>I think my solution is correct but instead I got: </p>
<pre><code>TypeError: 'float' object is not subscriptable
</code></pre>
| 0non-cybersec
| Stackexchange |
I just need to rant for a quick minute.. I love racist jokes. They're my favorite, over all, because they're just jokes. It's so ridiculous that someone would actually believe that being born a different color or choosing a different faith makes them inherently better than those who differ from them. People need to understand that it's a just a goddamn joke and that being offended by something intended to lighten a mood is just a waste of energy when you just let that hater hate.
I love when people provoke stereotypes because if I truly dislike any group of people in the world, it's those people who embody the bad stereotypes within all of their power. It's the most annoying bullshit that I've ever known.
I honestly believe that Morgan Freeman knows the truest way to rid the world of racism. He says the way to get rid of racism is to stop talking about it. There is not a larger and more apparent truth in the history of anything, because children are more impressionable than a group of the most gullible folks on the face of the earth. Children become ignorant because they are taught ignorance. I was a toddler, I was a middle-class honkey who had no clue about the idea of racism. Some of my best friends were black and latino. I never looked down on anybody, never made fun of anyone. I just wanted to have friends, so I made friends out of everybody. There was no thought in my mind that the black kid was any different from me, sure I recognized his skin color, but more I recognized that we both fucking loved Power Rangers. I taught myself to except others for what their thoughts had in common with my own. Race was never an issue to me because no one brought it to my attention that I should think differently of others based upon their race or religion. It actually took me longer to accept the idea that racism exists because I didn’t understand the idea someone would look down on an entire group of people just because they were a different skin color. There are still black people that despise white people because they were raised on “the white man is the devil.” I despise anybody who would dare teach their children that my skin color automatically decides whether or not I am a trustworthy person. Saying that I look trustworthy because I’m an average sized white man with no piercings or tattoos is just as ignorant as saying the 6’4” tattooed black man looks untrustworthy.
Is it hypocritical that I hate racism but love racist jokes? I don’t think so. I love racist jokes for the illogicality that is racism, but I hate racism because it’s so goddamn illogical.
P.S.: Hey, white teenager. Stop calling your friends “nigga.” You’re only allowed to use that word in a demonstrative form. I don’t care if your black friend said it’s alright, my black friend says it’s definitely not alright. Cut that shit out. | 0non-cybersec
| Reddit |
The “zero gravity detector” detecting zero gravity. | 0non-cybersec
| Reddit |
NSFL gory chainsaw execution| Swedish lesbian threesome. | 0non-cybersec
| Reddit |
Odd derivatives of a function $f$ satisfying $f(1/z)=-f(z)$. <p>Suppose <span class="math-container">$f$</span> is a function in <span class="math-container">$z$</span> such that for all <span class="math-container">$z$</span>, <span class="math-container">$$f\left(\frac{1}{z}\right)=-f(z).$$</span> (Examples are <span class="math-container">$\frac{1-z}{1+z}$</span> and <span class="math-container">$\log z$</span>.) It turns out that for odd <span class="math-container">$k$</span>, <span class="math-container">$f^{(k)}(1)$</span> is independent of <span class="math-container">$f^{(j)}(1)$</span> for all <span class="math-container">$j<k$</span>, whereas for even <span class="math-container">$k$</span>, <span class="math-container">$f^{(k)}(1)$</span> depends on all <span class="math-container">$f^{(j)}(1)$</span> for odd <span class="math-container">$j<k$</span>. </p>
<p>Is there a way to see that without computing individual derivatives and successively solving for <span class="math-container">$f^{(k)}(1)$</span>? Perhaps, combinatorially? This can be derived from the properties of the <a href="https://oeis.org/A105278" rel="nofollow noreferrer">Lah triangle</a>, but I wonder if there is a proof that avoids those heavy computations. To see why the Lah numbers are involved, see exercise 7 on page 157-158 of <a href="https://archive.org/details/Comtet_Louis_-_Advanced_Coatorics/page/n83" rel="nofollow noreferrer">Comtet</a> (the case of <span class="math-container">$\alpha=-1$</span>).</p>
| 0non-cybersec
| Stackexchange |
Plot for every 10 minutes in datetime. <p>The 'df' I am using has multiple rows for each <code>datetime</code>. I want to plot a scatterplot of all coordinates with the same <code>datetime</code> for every 10 minutes. There is a data entry for every location, every 10 minutes in <code>df_data</code></p>
<p>It works if I manually input the times into <code>t_list = [datetime(2017, 12, 23, 06, 00, 00), datetime(2017, 12, 23, 06, 10, 00), datetime(2017, 12, 23, 06, 20, 00)]</code>but I want to replace this with something that uses the dates from <code>df</code> so I can use it for multiple datasets. </p>
<pre><code>import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
import numpy as np
df_data = pd.read_csv('C:\data.csv')
df_data['datetime'] = pd.to_datetime(df_data['TimeStamp'] )
df = df_data[(df_data['datetime']>= datetime(2017, 12, 23, 06,00, 00)) &
(df_data['datetime']< datetime(2017, 12, 23, 07, 00, 00))]
##want a time array for all of the datetimes in the df
t_list = [datetime(2017, 12, 23, 06, 00, 00), datetime(2017, 12, 23, 06, 10, 00),
datetime(2017, 12,
23, 06, 20, 00)]
for t in t_list:
t_end = t + timedelta(minutes = 10)
t_text = t.strftime("%d-%b-%Y (%H:%M)")
#boolean indexing with multiple conditions, you should wrap each single condition in brackets
df_t = df[(df['datetime']>=t) & (df['datetime']<t_end)]
#get data into variable
ws = df_t['Sp_mean']
lat = df_t['x']
lon = df_t['y']
col = 0.75
#calc min/max for setting scale on images
min_ws = df['Sp_mean'].min()
max_ws = df['Sp_mean'].max()
plt.figure(figsize=(15,10))
plt.scatter(lon, lat, c=ws,s=300, vmin=min_ws, vmax=max_ws)
plt.title('event' + t_text,fontweight = 'bold',fontsize=18)
plt.show()
</code></pre>
<p>I have tried a few ways of attempting to make a copy of <code>datetime</code> as an iterable list which haven't given me the results I am after, the most recent below: </p>
<pre><code>date_arrray = np.arange(np.datetime64(df['datetime']))
df['timedelta'] = pd.to_timedelta(df['datetime'])
</code></pre>
<p>example dataset </p>
<p><a href="https://i.stack.imgur.com/FWroW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FWroW.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
Ewww not productive enough! Get this app outta my face.... | 0non-cybersec
| Reddit |
Have you ever experienced "lost time" or a time slip?. I'm not sure what the correct term for lost time is; but any time that passed and you had no memory of it. | 0non-cybersec
| Reddit |
java.lang.AbstractMethodError when spy the LinkedList in Android. <p>I want to spy the Linkedlist in android.</p>
<pre><code>List list = new LinkedList();
List spyData = Mockito.spy(list);
spyData.add("xxxx");
</code></pre>
<p>However, the exception occured.</p>
<pre><code>java.lang.AbstractMethodError: abstract method "boolean org.mockito.internal.invocation.AbstractAwareMethod.isAbstract()"
at org.mockito.internal.invocation.InvocationImpl.callRealMethod(InvocationImpl.java:109)
at org.mockito.internal.stubbing.answers.CallsRealMethods.answer(CallsRealMethods.java:41)
at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:93)
at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29)
at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:38)
at com.google.dexmaker.mockito.InvocationHandlerAdapter.invoke(InvocationHandlerAdapter.java:49)
at LinkedList_Proxy.add(LinkedList_Proxy.generated)
at com.app.test.testmethod(mytest.java:202)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1858)
</code></pre>
<p>The dependencies of libs are</p>
<pre><code>dexmaker-1.2.jar
dexmaker-mockito-1.2.jar
mockito-core-1.10.19.jar
</code></pre>
<p>Even I update <code>mockito-core-1.10.19.jar</code> to <code>mockito-core-2.0.31-beta.jar</code>,</p>
<p>the problem still exists.</p>
<p>But <code>Mockito.mock(Linkedlist.class)</code> is ok, I have no ideas about this problem.</p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange |
How do you develop a sense of humour?. At some point or another, people within their social circles want to be a comedian. They want to be the person that brings a smile to others faces. How do you develop a sense of humour? | 0non-cybersec
| Reddit |
How to include custom non-system folder under This PC in Windows 8.1?. <p>I've recently upgraded from Windows 8 to 8.1 and noticed the restructured <em>This PC</em> folder, formerly <em>Computer</em>. </p>
<p><em>What I want to achieve is to include custom folder under "This PC".</em></p>
<p><img src="https://i.stack.imgur.com/LpQQI.png" alt="This PC"></p>
<p>What I've found after googling is that what is displayed under "This PC" is stored in registries under </p>
<p><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace</code></p>
<p>However those folders (such as <em>Desktop</em>, <em>Documents</em>, etc) are referenced via <em>CLSID</em> and the folder I want to include in the list does not have <em>CLSID</em>.</p>
| 0non-cybersec
| Stackexchange |
Ricotta, onion sauteed in herbs, fig, prosciutto. Tonight's pizza.. | 0non-cybersec
| Reddit |
Specify a different username for default Postgres user. <p>I have the same issue as:
<a href="https://dba.stackexchange.com/questions/126926/specifying-a-username-while-running-initdb-causes-error-in-log-on-start-of-postg/126939#126939?newreg=77007c9fbf4949cc8cbe32c1fe0aac32">Specifying a username while running initdb causes error in log on start of PostgreSQL process</a></p>
<p>but I am working on setting up PostgreSQL on Ubuntu 17.04 instead of CentOS. I've read that calling <code>initdb</code> directly in this environment is discouraged because the suite of tools packaged with the software such as <code>pg_createcluster</code>, etc. What differences should I consider if I try initializing with a user other than the default postgres user?</p>
| 0non-cybersec
| Stackexchange |
A 13-year-old blogger and programmer wrote this. | 0non-cybersec
| Reddit |
Selected references without hyperlink. <p>When using the <code>hyperref</code> package, is it possible to tell LaTeX not to create a link for some references?</p>
<p>In my case the page number is displayed in the footer in</p>
<pre><code>\fancyhf[FC]{\thepage\ of \pageref{pg:end}}
</code></pre>
<p>which is what I want. Unfortunately every single page in the document then has a link to the final page, which is a bit silly.</p>
<p>Any ideas on how to fix that?</p>
| 0non-cybersec
| Stackexchange |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.