text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Crispy Garlic Chips. This is a kinda weird garnish I like to make. Found it on a bowl of ramen in Hawaii once. I just remember being kinda amazed and wondering how they did it. I kinda assumed it was something you would buy. But then I got to talking to a buddy who was a sous chef at at a huge restaurant with a wide breadth of influence, so they kinda had a lot of room to experiment with stuff. Meaning that, if you find yourself wondering how to do some weird, random thing, chances are he's made it. Sure enough, they had put these on a crudo or something at one point. He explained that the trick is the milk soak. I also later found a Thomas Keller recipe for these. A little bit of an adventure. Deep frying is always a hassle, but this is a fun project, and I love these little [crispy garlic flakes](https://craftlog.com/us/cooking/crispy-garlic-chips-36hn8). Awesome topping for ramen.
**Ingredients**
- 6 cloves garlic
- 2 cups milk or almond milk
- fryer oil
**Directions**
1. Peel and slice the garlic. You want it really thin and even. I have a little fine microplane that works great. It's actually a cucumber slicer, like, for spa treatments. Works great for thin veg slices though.
2. Place your garlic slices in a small pan and cover with milk. Bring just to a boil, then strain. You have to repeat this goofy task 4 times, at least, with fresh milk each time. It seems kinda weird, but the hot milk removes the bitterness from the garlic. I've done a lot of experimenting here. Even if you only steep the garlic 3 times, it will still come out bitter. You gotta do 4 steeps. Not a single steep fewer. Four is the magic number. Five is just ridiculous. Rinse the slices in hot water when you're done.
3. Heat your fryer oil to 300F and gently drop in your garlic slices. I like to use chop sticks to separate the slices and move them around as they cook. Remove the garlic chips when they're just beginning to turn brown. They'll continue cooking a little after you remove them from the oil, so don't let them go too far or they taste gross. | 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 |
Nameserver not working, no A record found. <p>I'm having trouble setting up a nameserver for my domain, we recently changed the nameserver of my domain because of an application that said our nameservers were not working fine. But now my domain does not respond to requests. I have no idea what were the last nameservers that were working. My domain is registered on Go Daddy, I did try to register my domain name to nameservers from zoneedit.com wich they say my domain has been correctly added to these nameservers : NS1.NAMERESOLVE.COM, NS2.NAMERESOLVE.COM, NS3.NAMERESOLVE.COM, NS4.NAMERESOLVE.COM which i put in Go Daddy nameserver setup. When i use intoDNS.com to check on my domain, i get 2 errors (which is a lot less than before, i use to have errors about the nameservers) : </p>
<p>MX - MX Records : Oh well, I did not detect any MX records so you probably don't have any and if you know you should have then they may be missing at your nameservers!</p>
<p>WWW - WWW A Record ERROR: I could not get any A records for www.datahex.ca!</p>
<p>(I only do a cache request, if you recently added a WWW A record, it might not show up here.) </p>
<p>An other thing is that my domain actually work for half my clients. My emails are not working.</p>
<p>So how can I fix this? </p>
<p>My domain is datahex.ca
I do have an other domain called datahex.com which works fine and is the same website and ip adresse has datahex.ca but is nameservers don't work with my other domain.</p>
<p>thank you.</p>
<p>Here is what i can do in dns manager on zoneedit.</p>
<p>DNS Management help </p>
<pre><code>datahex.ca A 69.70.171.98 Delete
</code></pre>
<p>Sub Domain Priority Mail Server / MX<br>
datahex.ca<br>
Only enter data in the ____________ (Add new MX record)
first field if you<br>
need a MX record for a
sub domain. </p>
<p>Sub Domain CName Server<br>
datahex.ca _____________ (Add new CNAME record)
Only enter data in the
first field if you<br>
need a CNAME record
for a sub domain.</p>
<p>Sub Domain IP Address / A<br>
datahex.ca _____________ (Add new A record)</p>
<p>Only enter data in
the first field if you
need a A record for
a sub domain.</p>
<p>Sub Domain Text Record / TXT<br>
datahex.ca _______________ (Add new TXT record)</p>
<p>Only enter data in
the first field if you
need a TXT record for
a sub domain.</p>
| 0non-cybersec
| Stackexchange |
How to create a multi partition SD disk image without root privileges?. <p>Is it possible to create a complete SD image in linux without having root privileges (that is, no loopback mount)? I'm looking for a way to automate embedded system image creation. The image should include a specific partition structure and partitions formatted to FAT and ext2 populated with files from the build system.</p>
| 0non-cybersec
| Stackexchange |
Whats some of the most inspirational places in the world to travel when you're young?. I am 19 and have recently been considering traveling the world while i'm young. I am looking for inspirational places to visit where english is the primary language and the outdoors are plentiful (hikes, biking, boating etc). Would love to hear abour your own experiences and how it all inspired you after visiting :)
Any suggestions on when would be the best time in youth to travel? eg. After college, before, during?
| 0non-cybersec
| Reddit |
Script - Print out commands also. <p>I'm trying to use the <code>script</code> command to run some tests on a <code>C</code> program I wrote and save the shell history to a file.</p>
<p>The problem I'm facing is that the resulting file does not show the actual commands, it only shows the outputs...</p>
<p>I'm currently using :</p>
<pre class="lang-bsh prettyprint-override"><code>$ script -c `./tests.sh` shell.txt
</code></pre>
<p>Where <code>tests.sh</code> is a bash script containing tests.</p>
<p>But that only writes what should appear on the standard output (similar as if I'd used a <code>></code> redirection...</p>
<p>Do you know what I'm doing wrong, or if I've misread a man page ?</p>
<p>Cheers</p>
| 0non-cybersec
| Stackexchange |
Breaking an equivalence relation into equivalence classes. <blockquote>
<p>Consider the relation $S$ defined on the set $X = \{1, 2, \cdots, 99\}$ as$$
x\mathrel{S}y \Longleftrightarrow x − y \text{ is a multiple of } 11.
$$
Into how many classes does it partition the set $X$?</p>
</blockquote>
<p>According to what was explained, equivalence classes are subsets all having elements $y$ that could go with one value of $x$.</p>
<p>The above question, according to the solution, has the answer as $11$ classes from $\{1,12,23,\cdots,89\}$ to $\{11,22,33,\cdots,99\}$ with each class starting from $n = 1, \cdots, 11$. But why is there not the set $\{12,23,34,\cdots,89\}$? Is it because those numbers have already appeared in the previous sets?</p>
<p>And for this relation, how many equivalence classes are there?</p>
<blockquote>
<p>$$S = \{0,1, 2, \cdots,9\}\\
R = \{(A, B) ∈ P(S) × P(S) : A = S \setminus B \text{ or } A = B\}
$$</p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Inequality : $\Big(\frac{x^n+1+(\frac{x+1}{2})^n}{x^{n-1}+1+(\frac{x+1}{2})^{n-1}}\Big)^n+\Big(\frac{x+1}{2}\Big)^n\leq x^n+1$. <p>I have the following problem to solve :</p>
<blockquote>
<p>Let <span class="math-container">$x,y>0$</span> and <span class="math-container">$n>1$</span> a natural number then we have :
<span class="math-container">$$\Big(\frac{x^n+y^n+(\frac{x+y}{2})^n}{x^{n-1}+y^{n-1}+(\frac{x+y}{2})^{n-1}}\Big)^n+\Big(\frac{x+y}{2}\Big)^n\leq x^n+y^n$$</span></p>
</blockquote>
<p>The problem is equivalent to :
<span class="math-container">$$\Big(\frac{x^n+1+(\frac{x+1}{2})^n}{x^{n-1}+1+(\frac{x+1}{2})^{n-1}}\Big)^n+\Big(\frac{x+1}{2}\Big)^n\leq x^n+1$$</span>
Or (<span class="math-container">$y^2=x$</span>):
<span class="math-container">$$\Big(\frac{y^{2n}+1+(\frac{y^2+1}{2})^n}{y^{2(n-1)}+1+(\frac{y^2+1}{2})^{n-1}}\Big)^n+\Big(\frac{y^2+1}{2}\Big)^n\leq y^{2n}+1$$</span>
I try the following identity :
<span class="math-container">$$ch^2(x)-sh^2(x)=1$$</span></p>
<p>So we put <span class="math-container">$y=sh(x)$</span> we get :
<span class="math-container">$$\Big(\frac{sh^{2n}(x)+1+(\frac{ch^2(x)}{2})^n}{sh^{2(n-1)}(x)+1+(\frac{ch^2(x)}{2})^{n-1}}\Big)^n+\Big(\frac{ch^2(x)}{2}\Big)^n\leq sh^{2n}(x)+1$$</span></p>
<p>And after I'm stuck...</p>
<p>If you have a hint it would be cool .</p>
<p>Thanks a lot !</p>
| 0non-cybersec
| Stackexchange |
Downloadable map data usable in applications. <p>I wish to create a small pathfinder application with maps. </p>
<p>Where can I download navigation European map data and find documentation about their formats?</p>
| 0non-cybersec
| Stackexchange |
Language member explanation. <p>Given the following formal language $L$:</p>
<p>$$ L=\{ww \mid w\in\{a,b\}^*\}$$</p>
<p>Why is $a$ not a member of this language?</p>
<p>So what is $\{a,b\}^*$ exactly? I thought it means $(a+b)^*$?</p>
| 0non-cybersec
| Stackexchange |
uiwebview and huge memory loss. <p>I have a problem using UIWebViews, I've seen the same question here but there wasn't helpful answer. the question is here: <a href="https://stackoverflow.com/questions/2950907/uiwebview-memory-management">UIWebView memory management</a> . I will quote it:</p>
<blockquote>
<p>I am developing an application that makes heavy use of UIWebView. This app generates dynamically lots of UIWebViews while loading content from my server. Some of these UIWebViews are quite large and have a lot of pictures.</p>
<p>If I use instruments to detect leaks, I do not detect any. However, lots of objects are allocated and I suspect that has to do with the UIWebViews.</p>
<p>When the webviews release because no longer needed, it appears that not all memory is released. I mean, after a request to my server the app creates an UITableView and many webviews (instruments say about 8Mb). When user tap back, all of them are released but memory usage only decrements about 2-3 Mb, and after 5-10 minutes using the app it crashes.</p>
</blockquote>
<p>I have created simple test app and have the same results.</p>
<p>It's a tableView, I'm creating DetailsView like this:</p>
<pre><code>DetailsVC *detailViewController = [[DetailsVC alloc] initWithNibName:@"DetailsVC" bundle:nil];
detailViewController.n = indexPath.row;
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
</code></pre>
<p>in DetailsVC I have a webView created in IB. I load html like this:</p>
<pre><code> NSString *urlAddress;
if (self.n == 0)
{
urlAddress = @"http://www.google.com";
}
else
{
urlAddress = @"http://www.yahoo.com";
}
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:requestObj];
</code></pre>
<p>I also do:</p>
<pre><code>- (void)viewDidUnload {
self.webView = nil;
}
</code></pre>
<p>That's it, every time I choose any webView in RootViewController I'm loosing 2-3 Mb of memory, Is there a solution to this problem?</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
Hugo Lloris makes an amazing kick-save against Besiktas. | 0non-cybersec
| Reddit |
How to enable Facebook Chat Heads and Stickers on your iOS device. | 0non-cybersec
| Reddit |
Hanged. | 0non-cybersec
| Reddit |
Crabs fleeing the scene. | 0non-cybersec
| Reddit |
The NFL’s 11 best slot receivers. | 0non-cybersec
| Reddit |
Taking spoon pics day 2. | 0non-cybersec
| Reddit |
How to fill color inside tiles using tile co-ordinates Google Maps?. <p>I have a tile overlay on google map.I would like to shade or fill color the tile(10,15) as red.I here by attached the image how the result should be. here is the link to my code .<a href="https://jsfiddle.net/60fhd57b/3/" rel="nofollow noreferrer">https://jsfiddle.net/60fhd57b/3/</a></p>
<pre><code>function CoordMapType(tileSize) {
this.tileSize = tileSize;
}
CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) {
var div = ownerDocument.createElement('div');
div.innerHTML = coord;
div.style.width = this.tileSize.width + 'px';
div.style.height = this.tileSize.height + 'px';
div.style.fontSize = '10';
div.style.borderStyle = 'solid';
div.style.borderWidth = '1px';
div.style.borderColor = '#AAAAAA';
return div;
};
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 5,
center: {lat: 41.850, lng: -87.650}
});
map.overlayMapTypes.insertAt(
0, new CoordMapType(new google.maps.Size(200, 200)));
}
</code></pre>
<p><a href="https://i.stack.imgur.com/dXt4b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dXt4b.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
initialize string pointer in struct. <p>Go Newbie question: I am trying to init the following struct, with a default value. I know that it works if "Uri" is a string and not pointer to a string (*string). But i need this pointer for comparing two instances of the struct, where Uri would be nil if not set, e.g. when i demarshal content from a json file. But how can I initialize such a struct properly as a "static default"?</p>
<pre><code>type Config struct {
Uri *string
}
func init() {
var config = Config{ Uri: "my:default" }
}
</code></pre>
<p>The code above fails with</p>
<pre><code>cannot use "string" (type string) as type *string in field value
</code></pre>
| 0non-cybersec
| Stackexchange |
MRW, as a grown man hitting a firefly while driving and having to watch the glowy stuff slowly fade.. | 0non-cybersec
| Reddit |
Gragas needs a Winnie the Pooh skin and his barrel can be a pot of honey. ^Title | 0non-cybersec
| Reddit |
How can i get the traefik controller config and some question about ingress path. <p>My ingress controller is traefik, I want to configure a domain name in ingress with multiple paths for different services.but When I configured and reapply it. I can only access the service corresponding to the root of the domain name, while the other services corresponding to the path are all 404
there is my ingress config:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: web-ingress
namespace: runsdata
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
tls:
- secretName: traefik-cert
rules:
- host: testenv.runsdata.com
http:
paths:
- backend:
serviceName: nginx-svc
servicePort: 8088
- host: testenv.runsdata.com
http:
paths:
- backend:
serviceName: traefik-web-ui
servicePort: 8006
path: /traefik
</code></pre>
<p>I can access the nginx-svc by the url:<code>https://testenv.runsdata.com:12840/</code> . But I can't access the traefik-web-ui service by the url: <code>https://testenv.runsdata.com:12840/traefik</code>. Is there anything wrong with my configuration. Another question is how can I see the rules that ingress maps to traefik.I want to see if the mapping is correct. I exec the command <code>kubectl exec -it traefik-ingress-controller-5c5dc68dd4-jxk84 /bin/bash</code>. I wanted to go inside the container and have a look.But it seems that there is no command installed, the command does not exist</p>
| 0non-cybersec
| Stackexchange |
Topological vs pro fundamental groups. <p>Consider the following two structure-adding refinements of the fundamental group of a topological space:</p>
<ul>
<li><p>the set $\pi_1(X)$ inherits a quotient topology from the compact-open topology of $X^{S^1}$, under which it is sometimes a topological group. This was discussed <a href="https://mathoverflow.net/questions/26680/fundamental-group-as-topological-group">here</a>.</p></li>
<li><p>the topos of sheaves on X has a fundamental group, which is in general a <a href="http://ncatlab.org/nlab/show/progroup" rel="nofollow noreferrer">pro-group</a>, reducing to an ordinary group if X is locally simply connected.</p></li>
</ul>
<p>Pro-groups and topological groups are not unrelated concepts; in particular, both have a common "generalization" to localic groups. Are there any known relationships between the "topological" and "toposophic" fundamental groups of a space? Do they capture similar or different information?</p>
<p><strong>Edit:</strong> As Theo pointed out in a comment, one difference is that the toposophic fundamental group is defined in terms of coverings rather than paths. This makes it better-behaved for non-locally-path-connected spaces, where there may not be very many maps out of $S^1$. But if the space is "nice" enough so that there are "enough paths to retain all the information about coverings," we can still ask about comparing the quotient topology on the group of paths with the pro-structure on the group of coverings. It might be that imposing that "niceness" condition already trivializes the extra information in one or the other or both, but if so then that would be a good answer to the question!</p>
| 0non-cybersec
| Stackexchange |
What is the density of $Y = X^3$ if $X > 0$ and $Y = X^2$ of $X < 0$?. <p>Let X be a continuous random variable with a density:\[
f_X(x) =
\begin{cases}
\frac 2{\pi}(1-x^2)^{1/2}, & \text{if |x| < 1} \\[2mm]
0, & \text{otherwise} \\
\end{cases}\]
Find the density of:\[
Y =
\begin{cases}
X^3, & \text{if X > 0} \\
X^2, &\text{if X < 0} \\
\end{cases}\]</p>
<p>I think that I'm supposed to separate the pdf into when 0 < x < 1 and when -1 < x < 0, but I don't know how to proceed.</p>
| 0non-cybersec
| Stackexchange |
Group of women lifting toppled car.. | 0non-cybersec
| Reddit |
Logstash-forwarder TLS handshake error - Server selected unsupported protocol version 301. <p>I have the problem below just with windows. I tried with linux and it works fine.</p>
<p>When I run:</p>
<pre><code>.\logstash-forwarder-master.exe -config .\logstash-forwarder2.conf
</code></pre>
<p>With logstash-forwarder2.conf:</p>
<pre><code>{
"network": {
"servers": [ "10.0.1.136:5034" ],
"ssl key": "C:\\Program Files (x86)\\logstash-forwarder-master\\certs\\logstash-forwarder.key",
"ssl certificate": "C:\\Program Files (x86)\\logstash-forwarder-master\\certs\\logstash-forwarder.crt",
"ssl ca": "C:\\Program Files (x86)\\logstash-forwarder-master\\certs\\logstash-forwarder.crt",
"timeout": 15
},
"files": [
{
"paths": [
"C: \\logs\\example.log"
]
}
]
}
</code></pre>
<p>I receive the following error:</p>
<pre><code>Failed to tls handshake with 10.0.1.136 tls: Server selected unsupported protocol version 301
</code></pre>
<p>Nevertheless when I run: </p>
<pre><code>C:\OpenSSL-Win32\bin\openssl.exe s_client -showcerts -connect 10.0.1.136:5034
</code></pre>
<p>I receive:</p>
<pre><code>Loading 'screen' into random state - done
CONNECTED(00000118)
depth=0 C = AU, ST = Some-State, O = Internet Widgits Pty Ltd
verify error:num=18:self signed certificate
verify return:1
depth=0 C = AU, ST = Some-State, O = Internet Widgits Pty Ltd
verify return:1
---
Certificate chain
0 s:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
i:/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
-----BEGIN CERTIFICATE-----
omitted
-----END CERTIFICATE-----
---
Server certificate
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
issuer=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
---
No client certificate CA names sent
---
SSL handshake has read 1012 bytes and written 621 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : RC4-SHA
Session-ID: 54B3A8D9594F45F1562FA16A462766CE72918E11A2E92EC1429FFD721F6637E5
Session-ID-ctx:
Master-Key: 7C59315873B89D1C8DE678BECDF11F4E458A6B987BB2C8A55548207BD95121156889FC14F1247F38DB1CD0F9D794D050
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1421060929
Timeout : 300 (sec)
Verify return code: 18 (self signed certificate)
---
</code></pre>
| 0non-cybersec
| Stackexchange |
Fallout 4 How To Be a Asshole. | 0non-cybersec
| Reddit |
Found the license plate that comes after mine.. | 0non-cybersec
| Reddit |
Any way to run multiple fullscreen EGL applications?. <p>This came up while trying to launch Retroarch from Kodi on a Raspbian without X, both applications built to run on top of KMS/DRM with OpenGL ES2/EGL as the backend.</p>
<p>While the first application (Kodi) is running, I can launch the other one (Retroarch) and I can hear the audio from the latter in the background, but the display and input are being held by Kodi.</p>
<p>I was looking for some way to have basic task switching in this mode, i.e. make Kodi yield the display and input while Retroarch is running and then obtain it back.</p>
<ol>
<li>Is there perhaps some tool to launch DRM applications allowing them to grab the display and input?</li>
<li>Maybe I could launch the applications in separate VTs? </li>
<li>Something else?</li>
</ol>
<p><strong>Edit</strong>: Today I obtained a result where the two applications were visible on top of each other, no idea what made it possible. Anyway, it shows that it should be possible for two applications to share an EGL display simultaneously in principle.</p>
| 0non-cybersec
| Stackexchange |
Passing a task as parameter. <p>I am not sure whether this is possible, so here me out:</p>
<p>I have a sequence of action to perform multiple </p>
<pre><code>async Task MethodA(...)
{
// some code
// a call to specific Async IO bound method
// some code
}
</code></pre>
<p>there are also <code>MethodB()</code>, <code>MethodC()</code>, etc, and all of the have exactly the same code, except for the call to specific Async IO bound method. I am trying to find a way to pass a task pointer to a method, so that we can execute it later in a Method().</p>
<p>What i am currently doing is this:</p>
<pre><code>private async Task Method(Func<Task<Entity>> func)
{
// some code
var a = await task.Run(func);
// some code
}
var task = async () => await CallToIOBoundTask(params);
Method(task);
</code></pre>
<p>This code, however, pulls a new thread each time, which is not required for IO bound task, and should be avoided.</p>
<p>So, is there a way to refactor the code so that no ThreadPool thread is used? A goal is to have a code like this:</p>
<pre><code>private async Task Method(Task<Entity> task)
{
// some code
var a = await task;
// some code
}
</code></pre>
<p>It is also important to mention that different IO calls have different method signatures. Also, a task can start to execute only in <code>Method()</code> body, and not before.</p>
| 0non-cybersec
| Stackexchange |
This fan is very small. | 0non-cybersec
| Reddit |
Interesting evolution of the style of LeBron James throughout his career (r/nba crosspost). | 0non-cybersec
| Reddit |
Most people had the Celtics as the second seed in the East before the season started, what happened?. Asking because I haven't watched many of their games. What's their problem? Why aren't they winning games? | 0non-cybersec
| Reddit |
TIL that to Italians, the correct way to eat spaghetti is with only a fork. Eating spaghetti with a fork and spoon means you're either an amateur, a child, or have really bad table manners. . | 0non-cybersec
| Reddit |
Icelandic newscasters can't stop laughing after pronouncing a difficult name. | 0non-cybersec
| Reddit |
HTC’s blockchain phone takes over a century to mine enough crypto to pay for itself. | 0non-cybersec
| Reddit |
What piece of the last update could break keyboard switcher, systray, clipboard and Adobe Flash in Xubuntu 11.04?. <p>I was succesfully using Xubuntu 11.04 for some days, but after today update (I haven't updated during the last 2 days) lots of things stopped working: Adobe Flash Firefox plugin, clipboard, notification area panel applet, keyboard layout switcher panel applet, sound volume panel applet, cpu meter panel applet.</p>
<p>Lack of clipboard really annoys.</p>
<p>What could be the reason? Is there a a way to fix this?</p>
| 0non-cybersec
| Stackexchange |
lil lion. | 0non-cybersec
| Reddit |
How IPMI works on Dell R210 server?. <p>I have Dell R210 1U server (W2008R2 Enterprise).The box is currently in another country on colocation. I am thinking of moving it to another colocation.</p>
<p>I was told that if my box supports IPMI I could power-cycle it remotely in new environment. I have no idea how IPMI works..</p>
<p>Do I need to set something in the Bios? in Windows? Do the colo provider connect something physical to the box to make it work (a cable?).</p>
<p>How would you go about it if the box is only accessible through RDP? And you wanted to ensure IPMI will work and also to ask all the right question before move (because their 'remote hands' are very expensive).</p>
| 0non-cybersec
| Stackexchange |
Bring ya heat. | 0non-cybersec
| Reddit |
Rick and Morty on Twitter: "We found a goat online that sounds just like @JustinRoiland. Enjoy.". | 0non-cybersec
| Reddit |
cursed_tiktok. | 0non-cybersec
| Reddit |
Sorry if this is the wrong place to post this, but I figured people might at least listen to me here.. Got home from work last night and my fiancé (common law at this point), Allie, had made me dinner (steak, potatoes, and caesar salad). She was seriously in the best spirits I'd seen her in months (her brother committed suicide two days after Christmas, last year. It's been a slow, but understandable process of recovery from the trauma that the whole thing caused her). So we were having an amazing night (to be honest it was probably the happiest I've been in months as well - stress/pain tends to rub off), and we ended up falling asleep watching Finding Nemo on the couch (it's her favorite movie). Woke up around 1 a.m. and we went to our bedroom (I wasn't sure whether she was sleeping before, because as soon as I woke up she was already smiling at me/giving me "the look"). So anyways, she was really aggressive in bed, again probably taking out the stress of the past few months (I figured, anyways). The sex was incredible.
In the morning I woke up alone in bed, the covers still ruffled where Allie had slept. I smelt burned toast coming from the kitchen, ran out to find black toast and the kitchen window (normal size, above the sink) shattered, with what looked like blood on it. Obviously I panicked, ran to the window to look down. Allie was hanging there, her nightgown had caught something and was holding her up. I instantly grabbed her arm, but right away she screamed the most horrible scream I have ever heard. I think she was saying "*I hate you*". Then she ripped her dress and fell. My apartment is on the 9th floor. I had a panic attack and passed out.
When I woke up I was shaking - but not myself, someone was shaking me violently. I know this sounds stupid/insane, but it was Allie. Allie was standing over me, shaking me, screaming my name. She said she got a call from her Dad around 4 p.m., that her mother had fallen and wasn't moving. She had a massive heart attack, died instantly (pretty much painless, at least). Allie was at the hospital until 5 a.m., got home around 6:30. She said she found me on the floor in the kitchen, and was extremely upset about the broken window. The blood was still there (I told her it was ketchup that had splashed up when I was doing dishes).
What the hell happened to me? I always read that when you go crazy you don't realize it, but I think I might be going crazy. I don't believe in "ghosts" or whatever else, but I was reading some stories on [/r/nosleep](/r/nosleep) earlier that reminded me of my situation, and I figured at this point at least somebody here might listen to what I have to say. I do take Temazepam to help me sleep most nights (though I didn't last night). | 0non-cybersec
| Reddit |
I'm a huge Chelsea fan. Remind me, again, who they are?. I got this idea from you guys.
As of April 1 (or do they say 1 April in soccer? *I'm so confused!*) I'm a huge Chelsea fan.
I'm looking for some information about my diehard obsession of a football club. I have only read the top bit of the wikipedia page. I was hoping you could fill in some gaps.
[Brief About Me Section: In real life, I'm a Buffalo Bills fan. I have played soccer, rugby, and football, but none at anywhere close to a professional level. I know vague basics about international rugby, a lot about Gridiron Football, and nothing about international soccer.]
I like that Chelsea has been English champions 4x, and League Cup champions 4x. Bills were AFC champs 4x *in a row*. I'm sure these things are entirely similar.
I see that they came in second last year. Did they lose in some sort of spectacular fashion, or did this cause some sort of grudge?
That headbutt guy Zidane. Does he have anything to do with them? I know he's actually really good and doesn't just headbutt, but it's the only soccer player I know not married to Posh Spice.
That butthead guy Beckham. Does he have anything to do with them?
-----
What's the team personality like?
Who do I hate? Do I have any friendly camaraderie with any teams?
I feel like I don't like Man U or the French. I presume we are rivals because of being near each other and because Chunnel. Is this correct?
Is there some championship or cup or something that I particularly crave?
**TL;DR** What are the three things every Chelsea fan knows? | 0non-cybersec
| Reddit |
The Master Guide for I.T.. It may be the TED Talks again or the philosophy of the NGO I'm contracted to, but I want to start a website that has solutions to EVERY PROBLEM that people in the IT World face. From basic troubleshooting to Teleconferencing alternatives to reviews about products such as CRMs, Monitoring, Ticketing Systems, etc.
The whole thing should be run by various people of various IT positions. I'm definitely going for this, but will need some help from the best SysAdmins around.\
**Edit:** I'm loving the feedback guys, PM me your email/g+ accounts and we can get started.
I do like the 'helpdeskers.com" name, but I want this to be used by multiple sides of IT. I'm thinking something for business, SysAdmin, Helpdesk, Networking, etc. Any suggestions for a name? | 0non-cybersec
| Reddit |
On Heroku in production, how can I copy database A to database B on command?. <p>From my local terminal, I can use the following commands to do what I need to do:</p>
<pre><code>heroku pgbackups:capture --expire
heroku pgbackups:restore charcoal --confirm max-kiosk
</code></pre>
<p>However, I want to do this from the controller of my rails app, when the Version model is udpated. Locally, I'm using:</p>
<pre><code>env = Rails.env
%x{pg_dump -Fc master_bankkiosk_#{env} > database.dump}
puts "I'm dumping..."
%x{pg_restore --clean -d bankkiosk_#{env} database.dump}
puts "I'm restoring..."
</code></pre>
<p>I have come to understand that running heroku commands on the heroku server do not work (because the toolbelt is not installed there ?)</p>
<p>I've tried to use pg_dump command on heroku server as well. I've read a few SO questions that seems similar but the OP are satisfied with answers that include <code>heroku pgbackups:blah</code>, and I can't use that.</p>
| 0non-cybersec
| Stackexchange |
Sad life for us all. | 0non-cybersec
| Reddit |
I drew "The Great Wave Off Kanagawa" on my friend's face, in an "invisible man" style [MISC]. | 0non-cybersec
| Reddit |
Calculating area of quadrilateral when distance of vertices from an arbitrary point is known. <blockquote>
<p>Given a convex quadrilateral $ABCD$ circumscribed about a circle of diameter $1$. Inside $ABCD$ there is a point $M$ such that $MA^2 + MB^2 +MC^2 + MD^2 =2$. Find the area of the quadrilateral. </p>
</blockquote>
<p><strong>My attempt at a solution:</strong>
I tried to solve it using coordinate geometry. I guessed $M$ to be on centre of circle and taking $ABCD$ as a square, the sides come out to be $1$. Hence, area comes out to be $1$ unit sq.</p>
<p>However I was looking for a proper solution for the question.</p>
| 0non-cybersec
| Stackexchange |
I'm thinking of buying a macbook air for ios development, Thoughts?. I need a mac because i'll be starting a class in ios development next week and would like to be able to have a mac of my own to work on. I was just wondering if people think a macbook air would be powerful enough and, if anyone owns one, what they think about it?
EDIT: thanks for the comments guys, I've decided to go ahead and buy it. I'll be using an external monitor for a lot of my work i think(not an apple one, they're too expensive) but i'll be glad to be able to have a laptop that i can bring everywhere and not have to think about it, I've owned 17" laptops in the past, they're a nightmare. | 0non-cybersec
| Reddit |
Does anyone feel weird running?. After you lose a considerable amount of weight has anyone noticed how weird it feels to run? Your legs feel unrealistically light and move so freely and easily that it feels like you're floating on the air, and you can move them as such speed it's hard to keep up with the body and maintain balance. I remember running a very long time ago, it was never like this. | 0non-cybersec
| Reddit |
Torsion version of HNN extensions. . <p>I am thinking of a version of HNN extensions as follows: </p>
<p>Assume $H,K$ are subgroups of a group $G$ and $\phi:H\to K$ is an isomorphism. We define
$ G_{\phi,n}$ to be the group generated by $G$ and $x\notin G$ satisfying the conditions $x h x^{-1}=\phi(h)$ and $x^n=1$. </p>
<p>I was wondering if such a construction has appeared in the literature before? What are the main properties (and the name) of these groups? </p>
<p>I appreciate any references.</p>
| 0non-cybersec
| Stackexchange |
Fabric won't let me link my Firebase app. <p>I have an app on my Firebase project that I'm trying to link to Fabric.</p>
<p>When I go to Fabric -> Firebase -> Set up integration and select the app, it says "Already linked".</p>
<p>But if I go to Firebase console -> Project settings -> Integrations -> Fabric, I don't see it linked there. I do see some other apps linked, but not the one that I'm trying to link right now.</p>
<p>Any idea why this could be happening? If I had an old Firebase <-> Fabric link, I should at least see it here and be able to remove it, but there's nothing there. So why does Fabric think that my app is already linked, when it's clearly not?</p>
| 0non-cybersec
| Stackexchange |
Is there a conprehensive guide on how to take a LED display apart? (ant stuck inside). <p>The ant is not on the very first layer.</p>
<p>I thought about taking it apart but I haven't been able to find something with a detailed description on how it is done. <img src="https://i.stack.imgur.com/YanwD.jpg" alt="enter image description here"></p>
| 0non-cybersec
| Stackexchange |
Natural arch off the coast of Santa Cruz, California [OC] [3000x1862]. | 0non-cybersec
| Reddit |
Refused to let an elderly lady sit down during rush hour. Said she was 14 so she didn’t have too.. | 0non-cybersec
| Reddit |
Simple Questions: May 01, 2018. Welcome readers,
To our newest regular feature. Have you ever wanted to ask something but you didn't feel like it deserved its own post but it isn't covered by one of our other scheduled posts? Allow us to introduce you to our new Simple Questions thread! Twice a week, every Tuesday and Saturday, a new Simple Questions thread will be posted for you to ask anything you'd like. And please look for other questions in this thread that you could also answer!
Thank you and enjoy!
| 0non-cybersec
| Reddit |
Cannot send mail to top domain. <p>I have a webserver with the domain name server1.mydomain.com, mydomain.com is currently directed to another server.</p>
<p>If a mail is send to an e-mail address with my top domain, eg [email protected], I get an error in the exim/mainlog 'T="Mail delivery failed: returning message to sender" from <>'.
Other mail addresses work fine.</p>
<p>My hosts file currently looks like this:</p>
<pre><code>Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
120.113.245.121 server1.mydomain.com server1
</code></pre>
<p>Anyone an idea what the problem could be?</p>
| 0non-cybersec
| Stackexchange |
What exactly is the cause(s) of blow-up for too-large step size in a method like RK4?. <p>I have been working on creating a few home-made numerical methods, and I am using them to visualize text-book problems from my Strogatz dynamics textbook. It feels like a good way to learn numerical methods and dynamics at the same time. </p>
<p>A recent problem from the book deals with "Critical Slowdown" and is exemplified by comparing <span class="math-container">$\dot{x} = -x^3$</span> with <span class="math-container">$\dot{x} = -x$</span>. I can't pretend to understand anything except that one decays more quickly than the other.</p>
<p>I decided to run both through my little home-made RK4 algorithm and graph them. What I found is that I get overflow for too-large step size, and I was wondering why. Conceptually, what causes this type of behavior? </p>
<p>I know that the step size should be chosen in accordance with how quickly the solution varies, or error will be very high. What I don't get is the overflow errors I'm getting. </p>
<p>Code (The ODE's are defined and solved at the bottom. To see the overflow, replace .001 with .1 in the step-size argument.: </p>
<pre><code>def rk4(dt, t, field, y_0):
y = np.asarray(len(t) * [y_0])
for i in np.arange(len(t) - 1):
k1 = dt * field(t[i], y[i])
k2 = dt * field(t[i] + 0.5 * dt, y[i] + 0.5 * k1)
k3 = dt * field(t[i] + 0.5 * dt, y[i] + 0.5 * k2)
k4 = dt * field(t[i] + dt, y[i] + k3)
y[i + 1] = y[i] + (k1 + 2 * k2 + 2 * k3 + k4) / 6
return y
def vf_grapher(fn, t_0, t_n, dt, y_0, lintype='-r', sup_title=None,
title=None, xlab=None, ylab=None):
t = np.arange(t_0, t_n, dt)
y_min = .0
y_max = .0
fig, axs = plt.subplots()
fig.suptitle(sup_title)
axs.set_title(title)
axs.set_ylabel(ylab)
axs.set_xlabel(xlab)
for iv in np.array(y_0, ndmin=1, copy=False):
soln = rk4(dt, t, fn, iv)
plt.plot(t, soln, lintype)
if y_min > np.min(soln):
y_min = np.min(soln)
if y_max < np.max(soln):
y_max = np.max(soln)
x = np.linspace(t_0, t_n + dt, 11)
y = np.linspace(y_min, y_max, 11)
X, Y = np.meshgrid(x, y)
theta = np.arctan(fn(X, Y))
U = np.cos(theta)
V = np.sin(theta)
plt.quiver(X, Y, U, V, angles='xy')
plt.xlim((t_0, t_n - dt))
plt.ylim((y_min - .05 * y_min, y_max + .05 * y_max))
plt.show()
if __name__ == '__main__':
def crit_slow(t, x):
return -x**3
def exp_decay(t, y):
return -y
# graph an ODE modelling critical slow down (has discontinuities in it's
second derivative)
vf_grapher(crit_slow, 0., 10., .001, 10.)
# graph an ODE modelling exponential decay (compare to critical slowdown)
vf.vf_grapher(exp_decay, 0., 10., .001, 10.)
</code></pre>
| 0non-cybersec
| Stackexchange |
Raspberry Pi 2 - Need Suggestions. I'm looking to get my new RPi2 that I got as a gift up and running. I'm interested in turning it into a mini pentesting device.
I would like it to have a screen 3.5in or larger, a case that can incorporated the screen. A couple of wifi adapters for MitM and AP attacks, and a battery at or above 20,000mh maybe with solar so it can potentially be used indefinitely.
Can you guys suggest with links, wifi adaptors, screen, and battery?
Thanks!
Searching has caused a lot of frustrations and I just want to get some ideas based on what others have gotten up and running with low/no hassle. | 1cybersec
| Reddit |
Who would win? Dinosaur vs Zombies. | 0non-cybersec
| Reddit |
Cubes in cube puzzle. <p>It can be easily shown that a square may be cut in any number of (not necessarily same-sized) squares, except in 2, 3 or 5 squares. Are there any results regarding the same question for cubes? Is there a maximum number n without a cube-cutting solution?</p>
| 0non-cybersec
| Stackexchange |
Does TCP open a new connection for every packet that is sent?. <p>This might be a silly question but a me and few buddies have been discussing the potential limitations of TCP. We have an application that is going to listen for clients (think of a gateway) and route all connected clients data through a single connected kafka publisher to one topic.</p>
<p>One of my buddies is saying that TCP will be a problem for this gateway because it is going to establish a new connection for every message it sends (not kafka but the underlying transportation protocol itself is the issue), requiring a new port each time. At the rate we'll be sending these clients messages (gigabytes), kafka will run out of ports to read from??</p>
<p>I've done development for several years and have never heard of this before and would like to get a lower level understanding (which I thought I had) of how TCP works. My understanding is that when you establish a TCP connection, that connection remains open until it is timed out by the application or forcibly closed by either the server or client. Data that is sent over this connection is a stream and won't open / close new connections regardless of the 3 V's (volume, velocity, variety).</p>
<p>As far as the ports go, one port is used for broadcasting and the internal file descriptor port is something the application manages for read / write of individual clients. I've never understood TCP to establish new connections for every packet that it writes.</p>
<p>I apologize in advance if this question is not direct and or too vague. I really am baffled and am hoping someone could provide some more context to what my colleagues are saying?</p>
| 0non-cybersec
| Stackexchange |
Left-aligning nested labels in enumerate. <p>I'm trying to tweak the way nested lists appear for enumerate. Right now, using <code>enumitem</code> package, I've got something like this:</p>
<pre><code>\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label*=\arabic*.,leftmargin=0pt]
\item First
\begin{enumerate}[label*=\arabic*.,leftmargin=0pt]
\item Second
\begin{enumerate}[label*=\arabic*.,leftmargin=0pt]
\item Third
\end{enumerate}
\end{enumerate}
\item Fourth
\end{enumerate}
\end{document}
</code></pre>
<p>The above creates a list like:</p>
<pre><code> 1. First
1.1. Second
1.1.1. Third
2. Fourth
</code></pre>
<p>And I'd like it to look like:</p>
<pre><code>1. First
1.1. Second
1.1.1. Third
2. Fourth
</code></pre>
<p>This will be an extremely long 'list,' as it is actually a procedure, and could contain hundreds of steps with varying substeps. This is really the one thing I can't seem to figure out for my needs. I believe I can do it with trial/error by customizing varying alignments using <code>\SetLabelAlign</code>, but if there's an easier/simpler way - that would be wonderful.</p>
<p>Also, if there's a better way in general to do what I want, (step numbering with nested steps from # to #.#.#.) I'm all ears.</p>
| 0non-cybersec
| Stackexchange |
Salt and Ice Challenge (Whole in Arm!). | 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 |
Why is my answer to this security exam prep question incorrect?. <p>I'm studying for a security exam and am confused by one of the chapter review questions in the book I'm using. It reads: </p>
<blockquote>
<p>When scanning a network via a hardline connection to a wired-switch
NIC in promiscuous mode, what would be the extent of network traffic
you would expect to see? </p>
<p>A. Entire network.<br>
B. VLAN you are attached to.<br>
C. All nodes attached to the same port.<br>
D. None</p>
</blockquote>
<p>My chosen answer was <strong>D</strong>. According to the book, the correct answer is <strong>C</strong> with the following explanation: </p>
<blockquote>
<p>Because each switchport is its own collision domain, only nodes that reside on the same switchport will be seen during a scan. </p>
</blockquote>
<p>While I agree that each port on a switch becomes its own separate collision domain (in the case of half-duplex connectivity), I don't see how multiple nodes can be attached to "the same port". Wouldn't this be physically unlikely (if not impossible)?</p>
<p>I checked with the book publisher but didn't see any additional clarification or errata notes. What am I missing here? </p>
| 0non-cybersec
| Stackexchange |
How do I download a macOS beta point update?. <p>What this question is not about</p>
<ol>
<li>Downloading macOS Developer Beta Access Utility</li>
<li>Downloading a stable/GM release of macOS</li>
<li>Downloading the .0 release of a new macOS beta (when it is released at WWDC)</li>
</ol>
<p>Say I want to install a macOS beta point update to a Mac that is never online (say if I had a lake house Mac or something). How would I download a .dmg or something so that I could install it on another machine. The macOS Developer Beta Access Utility just starts the update process on the machine it runs on.</p>
| 0non-cybersec
| Stackexchange |
BBC: "Mother's diet during pregnancy alters baby's DNA". Is this actually what was found or is this bad reporting?. Non-biologist here. [The BBC](http://www.bbc.co.uk/news/health-13119545) and [a load of others](http://www.google.co.uk/search?&q=Mother's%20diet%20during%20pregnancy%20alters%20baby's%20DNA) are reporting this story. Quotes:
* "A mother's diet during pregnancy can alter the DNA of her child ..."
* "... eating low levels of carbohydrate changed bits of DNA"
My understanding is that if there was *actual altering of DNA in response to the environment*, this would be a massively important story. However, I suspect that the paper (which I don't have access to---anyone?) actually reports epigenetic changes that don't physically alter the genome.
Am I right to say this story (yes, along with 90% of all science stories in the media, I know) is misleading? | 0non-cybersec
| Reddit |
Restore a deleted workflow in Sharepoint. <p>A colleague of mine just did something rather stupid and deleted a vital workflow on a production machine running Sharepoint 2010.</p>
<p>Since we're not hosting the machine, there's no backup (yes yes, I know... I KNOW... it's not my fault and the person responsible for this lack of foresight needs to have some very bad things done to him) but there's a complete transaction log weighting over 50GBs.</p>
<p>Is there any way to get that workflow back?</p>
<p>EDIT: Actually, there ARE backups, but they're currently inaccessible (don't ask me why - I don't know). Supposedly after the weekend these should be available, but it would be nice to restore the system to a working condition sooner.</p>
| 0non-cybersec
| Stackexchange |
Adding Sleep command to shell script?. <p>How can I add a 10sec sleep to my loop after each page is processed?</p>
<pre><code>#!/bin/sh
for page in {1..50}
do
wget -q -U Mozilla "http://admin.domain.com/products_search/?p=$page" -O - \
| tr '"' '\n' | grep "^Product photo for " | cut -d ' ' -f 3 > bproduct.txt
done
</code></pre>
| 0non-cybersec
| Stackexchange |
What do I need to buy (clippers, specific scissors) so that my roommate can give me a haircut?. | 0non-cybersec
| Reddit |
LPT: Multitask, learn something you didn't know and also practice your speed reading.. I'm kicking myself as you read this for not doing this as soon as I found out about the site (which I found while reading on reddit)
http://spreeder.com/app.php?intro=1
This is a site that advertises a speed reading program, it lets you test out its services. You can replace the text given with whatever you want to read. Just now, I realized I could just copy and paste comments from ELI5 (explain like I'm 5), ELAP (explain like a pro), and TIL (Today I Learned).
I can read what I was going to read anyway AND practice speed reading.
Oh, after you paste what you wish to read, press "speed!" and then press the "s" button on your keyboard to access settings. Change them so you have a rather easy time reading the words flashing on your screen. Note it and then increase it so it becomes slightly difficult for you to keep up with it. You can also change the # of words that are shown at a time. Keep increasing as you start to become comfortable with the speed you're on.
Before you know it, you'll be a speed reader! | 0non-cybersec
| Reddit |
What use is there for 'ends' these days?. <p>I came across a subtle bug a couple of days ago where the code looked something like this:</p>
<pre><code>ostringstream ss;
int anInt( 7 );
ss << anInt << "HABITS";
ss << ends;
string theWholeLot = ss.str();
</code></pre>
<p>The problem was that the <code>ends</code> was sticking a '\0' into the <code>ostringstream</code> so <code>theWholeLot</code> actually looked like <code>"7HABITS\0"</code> (i.e. a null at the end)</p>
<p>Now this hadn't shown up because <code>theWholeLot</code> was then being used to take the <code>const char *</code> portion using <code>string::c_str()</code> That meant that the null was masked as it became just a delimiter. However, when this changed to use strings throughout, the null suddenly meant something and comparisons such as:</p>
<pre><code>if ( theWholeLot == "7HABITS" )
</code></pre>
<p>would fail. This got me thinking: Presumably the reason for <code>ends</code> is a throwback to the days of <code>ostrstream</code> when the stream was not normally terminated with a null and had to be so that <code>str()</code> (which then cast out not a <code>string</code> but a <code>char *</code>) would work correctly.</p>
<p>However, now that it's not possible to cast out a <code>char *</code> from a <code>ostringstream</code>, using <code>ends</code> is not only superfluous, but potentially dangerous and I'm considering removing them all from my clients code.</p>
<p>Can anyone see an obvious reason to use <code>ends</code> in a <code>std::string</code> only environment?</p>
| 0non-cybersec
| Stackexchange |
How to restrict main port by iptables and allow service at other port. <p>Simple configuration with mail server with 993 imap port.
Local IP is static natted at main router to public IP.
I need to restrict access to 993 port by local lan and allow connection to imapl port by "special" myknown ports.
Understand that source IP connecting to "special" ports are public.
So I wonder can it be performed by local iptables or do I need to route "special" ports by other local host? What did I miss?</p>
<pre><code>iptables -A INPUT -p tcp --dport 33333 -j ACCEPT
iptables -A INPUT -p tcp --dport 33334 -j ACCEPT
iptables -A INPUT -p tcp -s 192.168.0.0/24 --dport 993 -j ACCEPT
iptables -A PREROUTING -t nat -p tcp --dport 33333 -j REDIRECT --to-port 993
iptables -A PREROUTING -t nat -p tcp --dport 33334 -j REDIRECT --to-port 993
</code></pre>
<p>Update:
I need to open ports 33333 and 33334 for internet and local lan and keep opened 993 port for local lan only.
33333 and 33334 ports are forwarded to 993.
Forwarding doesn't work in case 993 restricted:
<code>-s 192.168.0.0/24</code>.
Server has one ethernet interface.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
1
SECURING CLOUDS – THE QUANTUM WAY
Marmik Pandya
Department of Information Assurance
Northeastern University
Boston, USA
1 Introduction
Quantum mechanics is the study of the small particles that make up the universe – for
instance, atoms et al. At such a microscopic level, the laws of classical mechanics fail to
explain most of the observed phenomenon. At such a state quantum properties exhibited
by particles is quite noticeable.
Before we move forward a basic question arises that, what are quantum properties? To
answer this question, we'll look at the basis of quantum mechanics – The Heisenberg's
Uncertainty Principle. The uncertainty principle states that the more precisely the position
is determined, the less precisely the momentum is known in this instant, and vice versa.
For instance, if you measure the position of an electron revolving around the nucleus an
atom, you cannot accurately measure its velocity. If you measure the electron's velocity,
you cannot accurately determine its position.
Equation for Heisenberg's uncertainty principle:
Where σx standard deviation of position, σx the standard deviation of momentum and ħ is
the reduced Planck constant, h / 2π.
In a practical scenario, this principle is applied to photons. Photons – the smallest measure
of light, can exist in all of their possible states at once and also they don’t have any mass.
This means that whatever direction a photon can spin in -- say, diagonally, vertically and
horizontally -- it does all at once. This is exactly the same as if you constantly moved east,
west, north, south, and up-and-down at the same time.
Quantum entanglement is a physical phenomenon that occurs when pairs or groups of
particles are generated or interact in ways such that the quantum state of each particle
2
cannot be described independently—instead, a quantum state may be given for the system
as a whole. Consider the scenario in which a physical process creates a pair of photon such
that the total spin of the system is null. Now, if a photon is examined by a human observer
after it has already traveled a million light year, and its spin is vertical. Then it is certain
that another photon which is two million light years away from the first one at that point
will have horizontal spin. Up to the point of measurement, the polarization of both photons
is unknown. It is hard to believe, but the act of measurement will actually cause the other
photon to commit to a certain state. Many experiments have proved this concept. Einstein's
famous quote, "God does not play dice with the universe" was a comment on the bizarre
effects of quantum mechanics.
Nonetheless, we do not know everything there is to know about this complex science. In
the words of physicist Richard Feynman: "I can safely say that nobody understands
quantum mechanics". This uncertainty partially explains the difficulty engineers and
scientists alike have encountered in the task of building a quantum computer.
2 Quantum Cryptography
CIA triad – Confidentiality, Integrity, and Availability are basic goals of security
architecture. To ensure CIA, many authentication scheme has been introduced in several
years. Currently deployment of Public Key Infrastructure (PKI) is a most significant
solution. PKI involving exchange key using certificates via a public channel to a authenticate
users in the cloud infrastructure. However, there is a certain issue pertaining to the PKI
authentication where the public key cryptography only provide computational security
because PKI is based on Asymmetric Key Cryptography. It is exposed to widespread
security threats such as eavesdropping, man in the middle attack, masquerade et al. This
paper aims to look into basic security architecture in place currently and further it tries to
introduce a new proposed security architecture, which makes use of the knowledge of
Quantum Mechanics and current advances in research in Quantum Computing, to provide
a more secure architecture.
2.1 Importance of Qubits
In a classical computing system, a bit would have to be in one state or the other. However
in a quantum computing system, quantum mechanics allows the qubit to be in
a superposition of both states at the same time. In quantum computing,
a qubit or quantum bit (sometimes qbit) is a unit of quantum information—the quantum
https://en.wikipedia.org/wiki/Quantum_superposition
https://en.wikipedia.org/wiki/Quantum_computing
https://en.wikipedia.org/wiki/Quantum_information
3
analogue of the classical bit. A qubit is a two-state quantum-mechanical system, such as
the polarization of a single photon: here the two states are vertical polarization and
horizontal polarization.
System Qubit State
Electron Spin
Photon Polarization
Table 1: Examples of Physical Qubits
A qubit has a few similarities to a classical bit but is overall very different. There are two
possible outcomes for the measurement of a qubit—usually 0 and 1, like a bit. The
difference is that whereas the state of a bit is either 0 or 1, the state of a qubit can also be
a superposition of both.[4] It is possible to fully encode one bit in one qubit. Hence, a qubit
can hold even more information, e.g. up to two bits using superdense coding.
2.2 Shor’s Algorithm
In 1994, Shor proposed an algorithm for period finding and then subsequently integer
factorization problem. Later, Shor also proposed an efficient quantum algorithm for the
discrete logarithm problem. Shor’s algorithm consists of Classical Part and Quantum Part.
Quantum part of the algorithm, uses quantum Fourier transform to find the period of a
certain function, which is infeasible with classical computers, but in 2001 a group at IBM,
who factored 15 into 3 × 5, using an NMR implementation of a quantum computer with
7 qubits.
Shor mathematically showed that the quantum part runs in time O ((log n) 2 (log log n)(log
log log n)) on a quantum computer. Next, it must perform O (log n) steps of post
processing on a classical computer to execute the continued fraction algorithm.
Factorizations and discrete logarithm problem are two of the most difficult problems
arising in the breaking of current cryptographic algorithms. If the Shor’s algorithm is
implemented on Quantum Computers, no application using this algorithm will be able to
withstand the attackers.
System Underlying Hard Problem
RSA Factorization
Rabin’s Cryptosystem Factorization
https://en.wikipedia.org/wiki/Bit
https://en.wikipedia.org/wiki/Two-state_quantum_system
https://en.wikipedia.org/wiki/Photon_polarization
https://en.wikipedia.org/wiki/Photon
https://en.wikipedia.org/wiki/Quantum_superposition
https://en.wikipedia.org/wiki/Qubit#cite_note-4
https://en.wikipedia.org/wiki/Superdense_coding
https://en.wikipedia.org/wiki/Nuclear_magnetic_resonance_(NMR)_quantum_computing
https://en.wikipedia.org/wiki/Qubits
4
KMOV Factorization
Diffie-Hellman Key Exchange Discrete Logarithm Problem
El Gamal Discrete Logarithm Problem
Elliptic Curve Cryptography (ECC) Discrete Logarithm Problem
Digital Signature Algorithm (DSA) Discrete Logarithm Problem
Table 2: Cryptosystems broken by Shor’s algorithm
2.3 Quantum Cryptography
The uncertainty principle, possible of indivisible quanta and the quantum entanglement
forms the basis of the quantum cryptography. The no-cloning theorem, presented by
Wootters and Zurek in 1982, forms another basis of Quantum Cryptography. As a direct
application of no cloning theorem – Eavesdropper cannot interpret the unknown qubits i.e.
the unknown quantum states, which makes the use of qubits in key transmission for
asymmetric cryptography resistant to man in the middle attack. Hence, it is attracting
considerable attention as a replacement for other contemporary cryptographic methods,
which are based on computational security.
Quantum Cryptography doesn’t reinvent the wheel as a whole. Internally, it works just like
a traditional asymmetric cryptographic system. But while cryptographic methods like RSA,
use computational difficulty in breaking the key, Quantum Cryptographic system that uses
quantum physics for key transmission. Quantum cryptographic transmission encrypts the
0s and 1s of a digital signal on individual particles of light - photons. Each type of a photon's
spin represents one piece of information - usually a 1 or a 0, for binary code. This code uses
strings of 1s and 0s to create a coherent message. For example, 01101000 01101001 could
correspond with “hi”. Now, a binary code can be assigned to each photon -- for example, a
photon that has a vertical spin ( | ) can be assigned a 1 and a photon with a horizontal spin,
can be assigned 0. Alice can send her photons through randomly chosen filters and record
the polarization of each photon. She will then know what photon polarizations Bob should
receive. Now, even if eve detects (eavesdrops on) the signal, the information on the photons
is suddenly transformed, meaning both that it is immediately noticeable that
eavesdropping has appeared and that the third party is not able to decrypt the information.
5
Figure 1: The working of Quantum Cryptography
2.3.1 Quantum Key Distribution (QKD)
Quantum Key Distribution is the most famous application of Quantum Cryptography.
Before understanding the basics of QKD, let’s see current encryption standards. Currently,
in public key cryptography, before transferring data, both Alice and Bob agrees upon a
shared secret key. Alice uses the public key of Bob to transfer the shared secret key to Bob
and that encrypted key can be decrypted only by Bob’s private key. Now, Bob uses his
private key to decrypt the shared key and then using that shared secret key, Bob can
decrypt all the encrypted messages that Alice sends. This type of system is susceptible to
Man in the Middle attack since the assumption used for transmission of shared key is that
decrypting it without the key is, computationally infeasible. But with Shor’s algorithm, even
this isn’t computationally infeasible anymore.
This is where QKD walks in. The Quantum Key Distribution is a method used in the
framework of quantum cryptography in order to produce a perfectly random key which is
shared by a sender and a receiver while making sure that nobody else has a chance to learn
about the key, e.g. by capturing the communication channel used during the process. The
best known and popular scheme of quantum key distribution is based on the Bennet–
Brassard protocol (i.e. BB84). It depends on the no-cloning theorem for non-orthogonal
quantum states.
6
The basic principle of the Quantum Key Distribution (QKD) using the BB84 protocol,
involves sending decryption keys as quantum particles. Thanks to the quantum properties
of these particles, sender, and the receiver can surely identify if their communication was
subjected to man in the middle attack.
To detect the intruders, the photons can be randomly sampled for different properties.
Now, since the measurement in one property results in uncertainty in the measurement of
other property, Alice and Bob independently chooses to measure each proton for different
properties, say polarization or spin. They then exchange which property they measured on
each photon, and examine whether the values are the same on photons that they measured
are same or not. If there is a large difference, it is likely the signal was intercepted, and the
communication should be dropped. If results are similar, then the values can be stored as
binary data; for instance, left spin = 0, right spin = 1. This is the shared key.
Once both Alice and Bob have agreed upon the shared secret key, they use the normal
channel to transfer the data encrypted with the shared key.
Figure 2 – Quantum Key Distribution
7
3 Application of QKD into Public Key Cryptography
3.1 PUBLIC KEY CRYPTOGRAPHY USING RSA ALGORITHM
Factoring is the underlying presumably hard problem upon which several public-key
cryptosystems are based.
Factoring is widely believed to be a hard problem and the best algorithm for solving it is
the Number Field Sieve with a sub-exponential running time. The principal threat comes
from a quantum computer on which factoring can be solved efficiently using Shor’s
algorithm. The most popular cryptosystem based on factorization is RSA. RSA was invented
by Rivest, Shamir and Adelman in 1978. It can be summarized as follows:
1. Key generation:
• Choose two large primes p and q and compute the RSA modulus N = pq.
• Choose an integer e that is coprime to (p − 1) (q − 1).
• Compute d using ed ≡ 1 (mod (p − 1) (q − 1)).
• Publish the public key (N, e) and keep the private key (N, d).
2. Encryption:
• Represent the message to be transmitted as a positive integer m < N.
• Encrypt m with the public key (N, e) using c ≡ me (mod N).
3. Decryption:
• The receiver decrypts the message using m ≡ c d (mod N).
• Transform the positive integer m into the original message.
The idea of breaking RSA with a quantum computer using Shor’s algorithm was a powerful
motivator for the design and construction of quantum computers and for the study of new
quantum computer algorithms and cryptosystems that are secure from quantum
computers.
3.2 IMPLEMENTING RSA ALGORITHM WITH QKD
Factorization is the underlying hard part in RSA algorithm. Using the Shor’s algorithm, it is
easy to break the message that has been encrypted using RSA. So, here we can introduce
QKD for key generation and distribution and use underlying principles of RSA to transmit
the message.
8
Following are the steps for the new improvised RSA.
1. Alice sends a request to QKD to initiate a conversation with Bob.
Alice → QKD: EPR-ALICE ( IDALICE || IDBOB ).
2. QKD logs the Alice’s Request and notifies Bob about the possible connection
QKD → BOB: EPU-BOB ( IDALICE || IDBOB )
3. Bob replies by accepting the connection.
Bob → QKD: EPR-BOB ( IDALICE || IDBOB )
4. QKD creates a session key using quantum bases (+, X) in some order and starts distributing
those to Alice and Bob, Alice and Bob will use those bases to communicate.
QKD → Alice: EPU-ALICE ( IDALICE || IDBOB || SK )
QKD → Alice: EPU-BOB ( IDALICE || IDBOB || SK )
5. Alice encrypts the message using the session key and sends it to Bob over a Quantum
Channel. Next, Alice also sends random bits to QKD.
Alice → BOB: EPR-ALICE ( ESK (Message) || IDBOB )
6. Bob decrypts the message using the Session Key and sends the random bits to QKD.
7. QKD checks the random bits to know if there’s any intruder. If there’s an intruder QKD
notifies Alice and Bob and discards the Session Key to create a new Session Key.
9
Figure 3: RSA Algorithm Using Quantum Key Distribution
4 Secure Cloud Computing
With the success of Internet, there has been a rapid and significant success in the
development of data processing and data storage technologies. These advancements
in storage techniques alongside SaaS techniques have enabled a different computing
model – Cloud Computing. Examples of such service providers include big players like
Google, Microsoft, Apple, Amazon et al. Since the data transfer for such an application
occurs through the classical network, storage on the same server for many users
where resource allocation and scheduling is provided by the cloud service provider
and with the breakthrough in malicious programs, cloud security becomes an
important issue. Every day hackers are trying to hack into some cloud or the other
and recently with the security of giants like Apple and Dropbox being compromised,
10
cloud security has become a hot topic. Here, I’m trying to propose a new hybrid
security architecture for the cloud which uses benefits of current protocols like
Kerberos and security benefits of Quantum Cryptography.
4.1 Current Work
Currently, deploying public key infrastructure (PKI) is one of the most elegant
solutions for securing clouds. PKI works by exchanging keys using certificate via the
public channel for authentication purposes. PKI based architecture works on public
key cryptography. As seen before public key cryptography provides only with the
computational security and with the arrival of Quantum Computers, using Shor’s
algorithm, it’ll be easy to break the public key cryptographic algorithms. Apart from
this, Asymmetric Key Cryptography is also vulnerable to many kinds of security
threats like the man in the middle attack, masquerade et al. Apart from this PKI
infrastructure is too complex, involving a lot of entities which is very difficult to
deploy.
Another method for secure authentication on Cloud is using Kerberos. Many
researchers have proposed a Kerberos-based model for secure data storage and
secure authentication on the cloud. There are many benefits for using Kerberos in
cloud computing, with the major one being the property of Kerberos that allows the
nodes to connection points of the various cloud networks, and to communicate with
each other. Apart from this compared to PKI, Kerberos is easy to deploy and it uses a
session key which enables the possibility of Single Sign On.
11
Summary of Kerberos Message Exchange in Cloud Service:
Figure 4: Cloud Computing with Kerberos authentication [Source: Yaser Fuad Al-
Dubai and 2Dr. Khamitkar S.D , 2013, A PROPOSED MODEL FOR DATA
STORAGE SECURITY IN CLOUD COMPUTING USING KERBEROS
AUTHENTICATION SERVICE]
4.2 Proposed Model
As shown above, implementation of Kerberos model to cloud computing, is a
very advantageous. But Kerberos also uses algorithms like DES and AES to generate
the key. With the help of Groover’s Algorithm, searching an unsorted database with
N entries in O(√N) time rather than the usual O(N) time. For AES-256, it currently
takes an average of n/2 guesses to break, i.e. 2255. However with quantum computers
this can be done in 2128 time, which is very much faster. Now that's only the brute
force for AES-256, with the cleverer attacks like using rainbow tables, it can be broken
even faster. Hence, for the Post Quantum world, using QKD for Key Generation and
Key Distribution within KDC alongside classical Kerberos implementation, would
result in better security. Also with the world moving towards the Internet of Things
(IoT) Revolution, Single Sign On solution provided by the Kerberos Model could be
the ideal security solution. Also, at the brink of this IoT revolution, security issues are
of great concern and the possibility of Quantum Computers in near future would
mean, when they arrive nothing will be secure. Hence, using QKD inside of the KDC
could be the ideal solution.
12
For the basic approach for cloud computing with Kerberos authentication, the given
architecture is almost similar to the Architecture mentioned in the previous section.
The only difference is that the Data Transmission between the Cloud and the Client
happens through Quantum Channel and there is a QKD inside the KDC.
Now, to use the services of the cloud, a cloud customer should supply a ticket. A ticket
for a cloud service is a series of bits with the attribute that it has been enciphered
using the private key for that cloud service. That Session key is stored in the global
database shared between the cloud service itself and the Kerberos. Only KDC has the
write access to the Database so the cloud service can be confident that any
information that exists within the database regarding ticket originated from
Kerberos. Kerberos will have placed the identity of the cloud customer inside the
database matched with the Session Key, so the cloud service that receives a ticket can
look up to the database to find the session key to decrypt the data. To help ensure that
one customer does not steal and reuse another customer’s tickets, the cloud customer
accompanies the ticket with an authenticator. (In addition, tickets expire after a
specified lifetime, which is usually within a few hours.). The cloud customer gets a
ticket by sending a message to KDC naming the principal identifier of the desired
cloud service, the principal identifier of the (alleged) cloud customer and the
reference to the current time of day. In response, the KDC authenticates the sender
since the request is encrypted using his password. Once the client is authenticated,
KDC replies back with the Ticket granting Ticket. Anyone can intercept the message
and get the ticket granting ticket, but the TGT has the client identification embedded
inside and it is encrypted using the KDC’s private key. The cloud customer will be able
to unseal this message, obtain the ticket. No other customer without the named cloud
customer’s private key [password] can correctly decrypt the reply to produce the
sealed tickets and corresponding session key.
Once a cloud customer gets a ticket and wants to use the cloud service, it generates a
random quantum bases and sends it to a KDC along with the ticket. Now, anyone can
intercept this message but it is of no use to them since they don’t have the password
to decrypt and even after the brute force attack, to generate the session key they
require server’s Quantum Bases. In return, KDC generates the Session key and stores
it in the database and sends back the Server’s Quantum Bases to the Client via a
quantum channel. If someone intercepts, the bases change and the session key that
client will generate will not match to the session key in the database, which will not
let the communication go through.
The client computes the session key using it's Quantum Bases and Server’s Quantum
Bases and then uses the quantum channel to transmit data. Cloud service can identify
the client in the database using client ID and then get the session key to decrypt the
13
message. If the session key cannot decrypt the message Cloud service provider can
conclude that somewhere along the line, there is an intruder and entire will have to
be repeated again
Steps:
First the Cloud Service Provider generates random Quantum base and shares it
with KDC.
When a Client logs in, it first sends the request containing Client Name et al. to
the KDC encrypted with its own password using the classical channel.
Client → KDC: EPASSWORD-CLIENT (Client Address) || IDCLIENT.
Authentication Server inside the KDC authenticates the client and sends it the
ticket-granting ticket (TGT).
KDC → Client: EPASSWORD-CLIENT (TGT).
When a client wants to access the cloud, it generates the random quantum base
and sends it to the KDC along with TGT encrypted with its own password via the
classical channel.
Client → KDC: EPASSWORD-CLIENT (QBCLIENT || TGT) || IDCLIENT.
KDC generates a session key by comparing the quantum bases of the cloud
service provider and client and stores the session key in the global database.
After KDC generates the session key, it communicates the base to the client via
quantum channel, due to which client can compute the session key itself using the
it’s base.
KDC → Client: EPASSWORD-CLIENT (QBCLOUD-SERVICE-PROVIDER).
Once, the client computes the session key, it uses that session key to encrypt and
send data to the server via a quantum channel. The client doesn’t encrypt its
Client ID since server uses the client ID to find the session key to decrypt the
data.
Client → Service Provider: ESESSION-KEY (FILE) || IDCLIENT.
The major advantage of using this model is that it uses ease of deployment of a
Kerberos Model along with the security benefits of Quantum Cryptography.
Kerberos allows the nodes to connection points of the various cloud networks to
communicate with each other which in turns helps in providing Single Sign-On
14
solution for using various cloud networks by signing on only once. Any Encryption
Algorithm AES, DES et al. can be used for encrypting data.
FIGURE 5: Cloud Computing with Kerberos and QKD based authentication and
Key Distribution
5 Conclusion and Future Works
In a nutshell, this paper has introduced a new security architecture for Cloud Computing.
This new method builds on top of the pre-existing architecture of using Kerberos for Single
Sign-On authentication for flexibility and scalability but gives a workaround for the
limitation of classical cryptographic algorithms by using QKD inside the KDC for key
distribution and using Quantum Channel for transmission. This paper introduced a new
15
cloud computing environment, which suggested integrates and uses ease and simplicity of
Classical Cryptography models and secure benefits of QKD as a new hybrid technique.
Compared to current models, my attempt is better than existing models in following ways:
1. Gives the flexibility and the scalability of an ideal Kerberos-based solution
2. QKD based method for sharing keys is more secure than existing cloud computing
architecture deployed upon AES and/or PKI.
3. Since, there’s less computation included compared to PKI or AES for key
generation, it’s faster than existing models.
Since, “There’s always a hack for everything”, in future potential attacks on this like
Large Pulse attack, Time Shift Attack, Fake State Attacks et al. can be studied into and
workarounds can be addressed. Apart from this in future, although tremendously complex,
proper deployment architecture and the statistical evidence of the benefits could be
studied.
References
Zukarnain, Zuriati Ahmad, and Roszelinda Khalid. "Quantum Key Distribution Approach for
Cloud Authentication: Enhance Tight Finite Key." International Conference on Computer
Science and Information Systems (ICSIS’2014) (2014): N.p., N.d.
Abderrahmane Nitaj. "Quantum and Post Quantum Cryptography." Lecture Notes in Computer
Science (2013): n.d., n.p.
Hughes, Richard J., D. M. Alde, P. Dyer, G. G. Luther, G. L. Morgan, and M. Schauer.
"Quantum Cryptography." Springer Reference (2011): n.d., n.p.
Kilor, Payal P., and Pravin D. Soni. "Quantum Cryptography: Realizing next Generation
Information Security." International Journal of Application or Innovation in Engineering &
Management (IJAIEM) 3.2 (2014): n.d., n.p.
C. H. Bennett and G. Brassard, “QuantumCryptography: Public Key Distribution and Coin
Tossing”, In Proceedings of IEEE International Conference onComputers Systems and Signal
Processing, Bangalore, India, pp. 175-179, December 1984. (Bennet–Brassard protocol)
R.L. Rivest, A. Shamir and L. Adleman, "A Method of obtaining Digital Signatures and Public
Key Cryptosystems", Communication of the ACM, 21, 2(1978), pp 120-126
16
Odeh, Ammar, Khaled Elleithy, Muneer Alshowkan, and Eman Abdelfattah. "Quantum Key
Distribution by Using Public Key Algorithm (RSA)." ResearchGate. N.p., n.d.
Auburn,Bruce R. "Quantum Encryption – A Means to Perfect Security?" SANS Institute 2003,
Web.
https://www.sans.org/reading-room/whitepapers/vpns/quantum-encryption-means-perfect-
security-986. (Accessed 10 24, 2015).
Omer K. Jasim, Safia Abbas, El-Sayed M. El-Horbaty, and Abdel-Badeeh M. Salem ‘Cloud
Computing Cryptography "State-of-the-Art"’ World Academy of Science, Engineering and
Technology, N.p., N.d.
Yaser Fuad Al-Dubai and Dr. Khamitkar. “A Proposed Model For Data Storage Security In
Cloud Computing Using Kerberos Authentication Service” International Journal of Computer
Engineering and Technology (IJCET), 4, 6, 11(2013)
Clark, Josh. HowStuffWorks. HowStuffWorks.com, n.d. Web.
http://science.howstuffworks.com/science-vs-myth/everyday-myths/quantum-
cryptology3.htm. (Accessed 10 24, 2015).
"Uncertainity Principle." Wikipedia. Wikimedia Foundation, n.d.
https://en.wikipedia.org/wiki/Uncertainty_principle. (Accessed 10 24, 2015).
"Quantum Entanglement" Wikipedia. Wikimedia Foundation, n.d.
https://en.wikipedia.org/wiki/Quantum_Entanglement. (Accessed 10 24, 2015).
“Heisenberg - Quantum Mechanics, 1925-1927: The Uncertainty Principle”. N.p., n.d.
https://www.aip.org/history/heisenberg/p08.htm. (Accessed 10 24, 2015).
https://www.sans.org/reading-room/whitepapers/vpns/quantum-encryption-means-perfect-security-986
https://www.sans.org/reading-room/whitepapers/vpns/quantum-encryption-means-perfect-security-986
http://science.howstuffworks.com/science-vs-myth/everyday-myths/quantum-cryptology3.htm
http://science.howstuffworks.com/science-vs-myth/everyday-myths/quantum-cryptology3.htm
https://en.wikipedia.org/wiki/Uncertainty_principle
https://en.wikipedia.org/wiki/Quantum_Entanglement
| 1cybersec
| arXiv |
The Biggest PS4 Games Coming In 2019. | 0non-cybersec
| Reddit |
“I want a black SUV for $2400. It has to run perfectly, and if it doesn’t, I’ll sue you!”. | 0non-cybersec
| Reddit |
First course on scheme theory - opinions and comparisons, what text a novice should use?. <p>I would like this thread to contain possibly useful information about books and approaches on studying scheme theory for the first time.
I'm truly sorry if one finds it inapproprite for this site, but from the experience I had with math.stackexchange I think that I've seen more "vague" threads.</p>
<p>Nowadays we have a massive number of introductions to modern algebraic geometry (scheme-theoretic, not complex, though in my humble opinion "algebraic geometry" is a bad name for the study of complex manifolds, "complex analytic geometry" describes the subject better) developed by Grothendieck and his school. I'll list the ones I know:</p>
<ul>
<li><p>Ravi Vakil - "Foundations of Algebraic Geometry" (free on his website, very conversational and leaves a lot of stuff to exercises)</p></li>
<li><p>Robin Hartshorne - "Algebraic Geometry" (the classic, but studies only Noetherian schemes and possibly too formal for first times)</p></li>
<li><p>Ulrich Goertz and Torsten Wedhorn - "Algebraic Geometry: Part I: Schemes. With examples and exercises" (600 pages of scheme theory, but no cohomology which is reserved to yet unpublished second volume)</p></li>
<li><p>Joe Harris and David Eisenbud - "Geometry of Schemes" (introductory text on schemes, not a complete course on algebraic geometry, rather a text which tries to develop reader's intuition for studying schemes)</p></li>
<li><p>Kenji Ueno - "Algebraic Geometry 1/2/3" (was published in 1999 by AMS, but apparently not well known by western community as well as by me)</p></li>
<li><p>David Mumford and Tadao Oda - "Algebraic Geometry II" (expanded and updated version of Mumford's famous "Red book", seems neat and friendly)</p></li>
<li><p>Liu Qing - "Algebraic Geometry and Arithmetic Curves" (arithmetically flavoured text)</p></li>
<li><p>Alexander Grothendieck and Jean Dieudonne - "Elements of Algebraic Geometry" (the first "book" on algebraic geometry, very abstract and complete, 1800 pages-long, but exists only in French and possibly contains more than an beginner needs to know. But, maybe, even if all 1800 pages are not needed to <strong>learn</strong> scheme theory, they can be helpful to <strong>master</strong> it)</p></li>
</ul>
<p>The (not algebraic, mind you) variety of books is definitely a good thing. But it can be daunting for a novice to choose which one to use? For example,</p>
<ul>
<li><p>If one's inclinations lies in category theory and homological algebra/algebraic topology, which books emphasizes the "categorical" and "homological" modern approach? Introducing as much homological algebra as can be useful for the basics of scheme theory? (EGA is a possible candidate, people say it's very abstract)</p></li>
<li><p>If one likes to think about mathematical objects from a "geometric" point of view, which book emphasized geometric intuition and connections with other areas of geometry more? (Eisenbud-Harris could be a candidate along with some course on classical algebraic geometry, as the sole purpose of the former is to help a reader to develop an intuition for abstract machinery)</p></li>
<li><p>Which books is better for a classically-minded reader who is interested mostly in classical algebraic geometry, but wants to understand the modern approach? (possibly, Hartshorne? As he himself says in the preface that he is the classical algebraic geometer, and his books contain a review of classical AG and 2 chapters of applications of the machinery to classical questions, in particular, study of curves and surfaces)</p></li>
</ul>
<p>I hope this thread and possible answers could be a useful resource for those starting learning algebraic geometry for the first time. </p>
| 0non-cybersec
| Stackexchange |
tcpdump unknown device. <p>I am trying to run tcpdum on Solaris 10 as root user.<br>
I always get unknown device - even though I am using the name provided by </p>
<blockquote>
<p>ifconfig -a</p>
</blockquote>
<p>How can I find out the right device name?</p>
| 0non-cybersec
| Stackexchange |
Unity bar Personal Folder Icon open a new icon on the unity bar when clicked. <p>Since Ubuntu 11.10 the Personal folder Icon of unity bar act differently than 11.04.
In 11.04, when clicked, it opens a file manager window pointing to the personal folder and it is still associated with the icon (ie when I click again on the icon, it bring back the opened window at front).</p>
<p>In 11.10, it opens the file manager window pointing to the personal folder but associate it with a newly created file manager icon on the bar, so if I click again on the personal folder icon it opens a new window and does not bring back to front the already opened one.</p>
<p>Is there a way to restore previous behaviour ?</p>
<p>(I have this problem on two different computers)...</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
I made a funny Smash bros video about jigglypuff. | 0non-cybersec
| Reddit |
Remove lines that contain non-english (Ascii) characters from a file. <p>I have a text file with characters from different languages like (chinese, latin etc)</p>
<p>I want to remove all lines that contain these non-English characters. I want to include all English characters (a-b), numbers (0-9) and all punctuations.</p>
<p>How can I do it using unix tools like awk or sed.</p>
| 0non-cybersec
| Stackexchange |
Limit of $A^k b$ for $k$ large. <p>My textbook references the fact that for any matrix $A$ and any non-zero $b$ we have $$\lim_{k\rightarrow \infty} A^k b = v$$ Where $v$ is the eigenvector of $A$ with the largest eigenvalue. The proof isn't obvious to me, could someone give a hint how to prove this?</p>
| 0non-cybersec
| Stackexchange |
UK: A couple in their mid-20s whose baby was adopted after they were wrongfully accused of abuse have been told that they unlikely to have the child returned. | 0non-cybersec
| Reddit |
Automatic reference of figures in normal text. <p>I am a new user of latex and using with texniccenter. As I am working on my thesis. As I have to add lot of tables and figures. I have to give reference to these figures and tables in my text. is there a way to automatically way to include the reference number of figures/tables. OR every time manually I have to write by myself? For example: In reference to table(x.a), abc abc abc.... </p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
If $X$ is path-connected and has a finite fundamental group then every covering map from $X$ to $X$ is an homeomorphism.. <p>If $X$ is path-connected and has a finite fundamental group then every covering map from $X$ to $X$ is an homeomorphism.
I am trying to prove that the covering space has just one sheet since the number of elements in the fundamental group is related with the sheets. But this tell me I have a finite number of sheets: how do I prove I only have one?</p>
| 0non-cybersec
| Stackexchange |
Anamorphic sculptures. | 0non-cybersec
| Reddit |
MoviePy VideoFileClip instance has no attribute 'reader'. <p>I've searched for a few days regarding this issue but have come to no solution. I have a big script (I'm trying to concatenate large number of videos, ~100-500), which is why I was getting the error "Too many files open". Reading Zulko's responses to other issues, I saw that it was necessary to delete each VideoFileClip instance manually like this:</p>
<pre><code>del clip.reader
del clip
</code></pre>
<p>The issue I'm facing is that I have a simple hello_world trying to do this, but get the error <code>VideoFileClip instance has no attribute 'reader'</code>
Here's the code:</p>
<pre><code>from moviepy.editor import *
rel_path = "main.py"
file_path="hello_world.mp4"
newVideo = VideoFileClip(file_path)
del newVideo.reader
del newVideo
</code></pre>
<p>I'm using El Capitan (OS X), have updated MoviePy, Numpy, ImageMagick, and all packages I've seen as required, but I'm still getting this error. The problem is my computer ends up freezing sometimes because it's using so much memory. I'm currently concatenating chunks of 25 videos, and trying to delete all 25 "opened files", concatenate the next 25, and so forth. After that I'd concatenate the longer videos.</p>
<p>Please note that without the line del newVideo.reader I still get the error Too many files open</p>
<p>When I try running the real script, I get the following error if I don't add newVideo.reader</p>
<pre><code>Traceback (most recent call last):
File "/Users/johnpeebles/mispistachos/vines/video/reader.py", line 135, in compile_videos
newVideo = VideoFileClip(videoPath).resize(height=finalHeight,width=finalWidth).set_position('center').set_start(currentDuration)
File "/Library/Python/2.7/site-packages/moviepy/video/io/VideoFileClip.py", line 55, in __init__
reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
File "/Library/Python/2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 32, in __init__
infos = ffmpeg_parse_infos(filename, print_infos, check_duration)
File "/Library/Python/2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 237, in ffmpeg_parse_infos
proc = sp.Popen(cmd, **popen_params)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1223, in _execute_child
errpipe_read, errpipe_write = self.pipe_cloexec()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1175, in pipe_cloexec
r, w = os.pipe()
OSError: [Errno 24] Too many open files
Error compiling videos
Exception AttributeError: "VideoFileClip instance has no attribute 'reader'" in <bound method VideoFileClip.__del__ of <moviepy.video.io.VideoFileClip.VideoFileClip instance at 0x136e46908>> ignore
</code></pre>
<p>As requested by Tynn, I'm posting the "real code". What I'm doing here is, as I explained above, compile videos in chunks of 25 videos, then compile all these pre-compiled videos into one big video. I'm getting the error <code>Too Many Files Open</code> right now (if I don't add del clip.reader)</p>
<pre><code> for videoObject in data["videos"]:
counter+=1
#Download video and thumbnail
downloader=urllib.URLopener()
videoId = videoObject[API_VIDEO_ID]
videoUrl = str(videoObject[API_VIDEO_URL])
videoPath =os.path.join(file_dir, "tmp",str(videoObject[API_VIDEO_ID].replace("/",""))+'_video.mp4')
thumbPath =os.path.join(file_dir, "tmp",str(videoObject[API_VIDEO_ID].replace("/",""))+'_thumb.jpg')
currentVideoDimension = videoObject[API_VIDEO_DIMENSIONS]
currentVideoWidth = currentVideoDimension[0]
currentVideoHeight = currentVideoDimension[1]
thumbUrl = str(videoObject[API_THUMB_URL])
finalWidth = w*1.0
finalHeight = h*1.0
videoProportion = (float(currentVideoWidth)/float(currentVideoHeight))
if currentVideoWidth >= currentVideoHeight:
finalHeight = finalWidth/videoProportion
else:
finalWidth = finalHeight*videoProportion
try:
download(videoUrl, videoPath)
download(thumbUrl, thumbPath)
except Exception as e:
print("Exception: "+str(e))
print("Video ID: "+str(videoId))
traceback.print_exc()
continue
#Create new video and update video duration's offset
newVideo = VideoFileClip(videoPath).resize(height=finalHeight,width=finalWidth).set_position('center').set_start(currentDuration)
#If it's not squared we append a video first
if videoProportion != float(1):
backgroundClip = ColorClip(size=((w,h)), col=colors.hex_to_rgb("#000")).set_position("center").set_start(currentDuration).set_duration(newVideo.duration)
videos_and_subtitles.append(backgroundClip)
#Append new video to videos
videos_and_subtitles.append(newVideo)
#Append subtitle to Subtitles
# newSubtitleText = max_text(videoObject[API_NAME],videoObject[API_AUTHOR])+" \n\n"+videoObject[API_AUTHOR]
videoName = clean(videoObject[API_NAME])
videoAuthor = clean(videoObject[API_AUTHOR])
newSubtitleText = clean(max_text(videoName,videoAuthor)+" \n\n"+videoObject[API_AUTHOR])
newSubtitle = ( TextClip(newSubtitleText,fontsize=70,color='white',font='Helvetica-Narrow',align='center',method='caption',size=titleDimensions).set_start(currentDuration).set_position((videoOffset+w,0)).set_duration(newVideo.duration) )
videos_and_subtitles.append(newSubtitle)
currentDuration+=newVideo.duration
#Preprocess videos
if counter%50==0 or len(data["videos"])==(counter):
if closure_video_path != None and closure_video_path != "" and len(data["videos"])==(counter):
newVideo = VideoFileClip(closure_video_path).resize(height=finalHeight,width=finalWidth).set_position((videoOffset,titleOffset)).set_start(currentDuration)
videos_and_subtitles.append(newVideo)
currentDuration+=closure_video_duration
currentFilename=os.path.join(file_dir, "tmp",str(videoNumber)+fileName)
result = CompositeVideoClip(videos_and_subtitles,size=movieDimensions,bg_color=colors.hex_to_rgb(background_color)).set_duration(currentDuration).write_videofile(filename=currentFilename,preset='ultrafast',fps=24)
del result
preprocessedVideos.append(VideoFileClip(currentFilename))
#Close files
#close_files(videos_and_subtitles)
for clip in videos_and_subtitles:
try:
if not (isinstance(clip,ImageClip) or isinstance(clip,TextClip)):
del clip
else:
del clip
except Exception,e:
print "Exception: "+str(e)
#End Close files
videos_and_subtitles = []
videos_and_subtitles.append(left_holder)
currentDuration = 0
videoNumber+=1
if (videoObject==data["videos"][-1]):
break
print("Next video")
print("Compiling video")
filepath = os.path.join(file_dir, "tmp",fileName)
result = concatenate_videoclips(preprocessedVideos).write_videofile(filename=filepath, preset='ultrafast')
#result = CompositeVideoClip(videos_and_subtitles,size=movieDimensions,bg_color=(0,164,119)).set_duration(currentDuration).write_videofile(filename=directory+"/"+fileName,preset='ultrafast')
print("Video Compiled")
now = datetime.datetime.now()
print("Finished at: "+str(now))
return filepath
except Exception as e:
print("Exception: "+str(e))
print("Video ID: "+str(videoId))
traceback.print_exc()
rollbar.report_exc_info()
return None
</code></pre>
| 0non-cybersec
| Stackexchange |
Leonard Cohen - Hallelujah [Folk]. | 0non-cybersec
| Reddit |
virtualenvwrapper commands aren't working. <pre><code>tow-81-235:Projects pessimisticoptimism$ mkvirtualenv development
-bash: mkvirtualenv: command not found
tow-81-235:Projects pessimisticoptimism$ sudo pip install virtualenvwrapper
Password:
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Cleaning up...
tow-81-235:Projects pessimisticoptimism$ mkvirtualenv development
-bash: mkvirtualenv: command not found
</code></pre>
<p>Why am I getting this error? I have <code>virtualenv</code> and <code>virtualenvwrapper</code> installed. I'd like to use <code>mkvirtualenv</code> and <code>workon</code>. I find it odd that <code>virtualenv</code> is working, but <code>virtualenvwrapper</code> isn't.</p>
| 0non-cybersec
| Stackexchange |
What was Gödel's real achievement?. <p>When I first heard of the existence of Gödel's theorem, I was amazed not just at the theorem but at the fact that the question could be made precise enough to answer: how on earth, even in principle, could one show that it was impossible to prove something in a given system? That doesn't bother me now, and that is not my question.</p>
<p>It seems to me that Gödel's theorem is a combination of at least three amazing achievements, namely these.</p>
<ol>
<li><p>Formalizing the notions of proof, model, etc. so that the question could be considered rigorously.</p></li>
<li><p>Daring to think that there might be true but unprovable statements in Peano arithmetic.</p></li>
<li><p>Thinking of the idea of Gödel numbering and getting the proof to work.</p></li>
</ol>
<p>One might think that 3 constitutes two separate achievements, but I think that actually getting the proof to work, though pretty good going, is somehow a technicality once you have had the idea that in principle a proof along those lines might be possible. (I'm not saying I could have done it, but Gödel would have been deeply immersed in these ideas.)</p>
<p>My guess is that pretty well all the credit for 2 and 3 goes to Gödel (except that the idea of diagonal proofs was not invented by him). My question is how much he contributed to 1 as well. Had it occurred to anyone else that it might be possible to think about such questions rigorously, or did an entirely new way of thinking appear pretty well out of nowhere? Popular accounts suggest the latter, but common sense would suggest the former, at least to some extent. </p>
| 0non-cybersec
| Stackexchange |
John Kenneth Galbraith once noted that the fact that the departure of a CEO had so little effect on the value of a coporation's stock was strong evidence that CEOs were vastly overpaid. For further proof check Apple's stock, which fell less than 1% with the departure of Steve Jobs. . | 0non-cybersec
| Reddit |
Skew-triangular (?) matrices and their properties. <p>I'm asking this just out of curiosity because a brief googling failed to give me the answer. </p>
<p>By skew-triangular matrices I mean matrices with this
$$
\begin{bmatrix}
\times & \times & \times & \times \\
\times & \times & \times \\
\times & \times \\
\times \\
\end{bmatrix}
$$
or this
$$
\begin{bmatrix}
& & & \times \\
& & \times & \times \\
& \times & \times & \times \\
\times & \times & \times & \times \\
\end{bmatrix}
$$
sparsity pattern. Simple experiments with Mathematica show that the inverse of the first type is a matrix of the second type (and vice versa, of course).</p>
<p><strong>1. Do these matrices have their real name and where do they occur?</strong></p>
<p><strong>2. What other interesting properties do they possess?</strong></p>
| 0non-cybersec
| Stackexchange |
Office for iOS may be coming, but does it really matter?. | 0non-cybersec
| Reddit |
You kids, with your "cloud computers" and "Googly Docs". | 0non-cybersec
| Reddit |
"I have watched Madoka Magica 10 times. What to do now??" - "Find the trailer and watch it.". | 0non-cybersec
| Reddit |
Moving case sensitive Linux files via Windows. <p>the company I work for is currently trying to move a Magento installation from one server to another - however, the product images are saved in folders alphabetically indexed folders - but with an added twist, some of the letters are the same but have a different case - </p>
<p>i.e. </p>
<p>a, A, b, C, D, e, E, f, F, G, h, I</p>
<p>That being the case, when we try to drag those files down from FTP in order to move them, Windows does not honour the case sensitive distinction and we are losing several image folders. Is there a simple workaround for this issue? Any help is greatly appreciated.</p>
<p>regards
SWK</p>
| 0non-cybersec
| Stackexchange |
I [25F] told my recent ex [24M] that I never want to hear from him again. Did I do the right thing?. My ex and I were together for almost three years and broke up just under a week ago. He had to move for work and we were going to be semi long distance for a few months (he lives about an hour and a half away, and works over 70 hours per week), and things were a little uncertain beyond that. I think we both knew a breakup was a possibility, but I never thought it would end like this.
Everything was great up until he left. He took me out for dinner and bought me a nice gift before he left and everything seemed fine. We were even making plans for months in the future when he would be back. Then he went out drinking with his friends one night, and I barely heard from him at all for the next few days. I feel like something must have happened that night because he went from being sweet and loving to completely cold, literally overnight. A few days later he broke up with me over the phone, saying he was too busy with work to continue our relationship.
He left some clothes - including one of his favorite t-shirts - and other things at my place. I texted him asking when he would come get his things and he told me I could just throw them away. He doesn't live that far away but claims that his schedule is too busy to come get his things. Hearing that he couldn't be bothered to face me even to pick up his stuff was surprisingly painful. I feel like I've done a reasonable amount of healing in the last week and hearing that just reversed all of it. I told him I am not keeping the gift he bought me before he left and, as it was somewhat expensive, asked if he wanted it back. He said no. I'll admit that on some level I did this to hurt him, as he was pretty excited about this gift when he gave it to me. It was petty, I know. I ended the conversation by basically telling him never to contact me again, and now I feel like I'm back at stage one of the grieving process and feel completely devastated again.
Was this the right thing to do? Objectively, I think that going no contact is for the best for us. I keep thinking I was too harsh and that I didn't want to hurt him, but then I remember that after all this time he broke up with me over the phone and I just feel angry. I think maybe I just feel like I was too harsh because some pathetic part of me really wants to hear from him again. I don't feel like I've gotten any real closure.
Was this the right thing to do? Has anyone else here felt blindsided by a breakup, and how do you move on from it?
TL;DR: Told my ex I want to go no contact, wondering if I was too mean. | 0non-cybersec
| Reddit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.