text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Practical way to store a "reasonably large" amount of data that hardly ever changes?. <p>Think in terms of pre-computed lookup tables or something. At what point does it make more sense to use a database instead of hardcoding values in my application? The values are not going to change, and they're nicely segregated away from maintenance developers. 100 values, 1k, 10k, 100k? I'm wanting to store about 40k values. Right now it's a machine-generated <code>switch</code> statement (which VS2010 is unhappy about).</p>
<p>edit:</p>
<p>If anyone is curious, here's how I approached this: My data was storable in two 100k-element float arrays, so that's what I did. It took about 20 seconds to generate the data, so I did that once, and serialized it to an embedded resource with a BinaryFormatter. Unpacking the data takes about 5 milliseconds at application startup, and outperforms the database implementation I was replacing (these hard-coded values were stored there prior) by almost 45,000x.</p>
| 0non-cybersec
| Stackexchange |
rate-limiting a function call in rails per user. <p>Anyone have any idea how I might go about this? Having a pretty hard time finding information online. Best I found is the curbit it gem but I can only think of how to implement that application-wise.</p>
| 0non-cybersec
| Stackexchange |
Postgresql WITH clause in crosstab queries. <p>I create a large query as a Common Table Expression - month_index using <code>WITH</code> clause. Is it possible to refer this Common Table Expression in a crosstab query's source sql? </p>
<p>When I did gets an error
relation "month_index" does not exist</p>
<pre><code>WITH month_index AS
(
SELECT ...
)
SELECT * FROM CROSSTAB(
'SELECT rowid AS row_name,
CONCAT(''m'',monthno) AS category,
nic5dindex AS value
FROM month_index',
'*<categorysql>*')
AS ct(..)
</code></pre>
<p>I use Postgresql 9.3.</p>
| 0non-cybersec
| Stackexchange |
Why is there such a need in the workplace to "look busy" even if you don't have much to do? Why can't employers seem to accept that some jobs have a bit of downtime?. I've never understood this. If I worked at a retail store for example and the shelves are stocked and there's no customers, why can't I sit down for awhile instead of having to find busy work that's ultimately a waste of energy?
In office jobs, why do people have to pretend they're working when the boss walks by? That's so common that it's almost become a running joke. Why can't people just say "I'm done with my work for now boss, I'm going to take a long poop and play solitaire for awhile." and have that be ok instead of shuffling papers and tapping at the keyboard for no reason? | 0non-cybersec
| Reddit |
Compact set and a sequence of closed sets, the intersection of all of them is empty. <p>I'm having a hard time to prove this. The problem is:</p>
<p>Let $V \subset \mathbb{R}^d $, be a nonempty compact set and $(A_n)_{n\in\mathbb{N}}$ a sequence of closed nonempty sets in $\mathbb{R}^d$ with the property: </p>
<p>\begin{align} V\cap(\bigcap_{n=1}^{\infty}A_n)=\emptyset \end{align}</p>
<p>Prove there is $N\in\mathbb{N}$ that satisfies: $V\cap(\bigcap_{n=1}^{N}A_n)=\emptyset$</p>
<hr>
<p>I tried the following:</p>
<p>Let $(K)_{n\in\mathbb{N}}$ be open cover for $V\cup \mathcal{A}$, where $\mathcal{A}:=\bigcap_{n=1}^{\infty}A_n$ . So, $V\cup\mathcal{A} \subset \bigcup_{n=1}^{\infty}K_n$.</p>
<p>Now we have:</p>
<p>\begin{align}(V\cup\mathcal{A})\setminus\mathcal{A}\subset(\bigcup_{n=1}^{\infty}K_n )\setminus\mathcal{A}\end{align}
\begin{align} V \subset \bigcup_{n=1}^{\infty}K_n\setminus\bigcap_{n=1}^{\infty}A_n \end{align}</p>
<p>I thought that would help me, because I can find a finite subset that covers V. I don't know what to do next...</p>
| 0non-cybersec
| Stackexchange |
Why are cons lists associated with functional programming?. <p>I have noticed that most functional languages employ a singly-linked list (a "cons" list) as their most fundamental list types. Examples include Common Lisp, Haskell and F#. This is different to mainstream languages, where the native list types are arrays.</p>
<p>Why is that?</p>
<p>For Common Lisp (being dynamically typed) I get the idea that the cons is general enough to also be the base of lists, trees, etc. This might be a tiny reason.</p>
<p>For statically typed languages, though, I can't find a good reasoning, I can even find counter-arguments:</p>
<ul>
<li>Functional style encourages immutability, so the linked list's ease of insertion is less of an advantage,</li>
<li>Functional style encourages immutability, so also data sharing; an array is easier to share "partially" than a linked list,</li>
<li>You could do pattern matching on a regular array just as well, and even better (you could easily fold from right to left for example),</li>
<li>On top of that you get random access for free,</li>
<li>And (a practical advantage) if the language is statically typed, you can employ a regular memory layout and get a speed boost from the cache.</li>
</ul>
<p>So why prefer linked lists?</p>
| 0non-cybersec
| Stackexchange |
Definition of S(n) for graded ring S. <p>In Hartshorne's <em>Algebraic Geometry</em>, the twisting sheaf of Serre $\mathscr{O}(n)$ is defined to be $S(n)^\sim$, where $S$ is an $\mathbb{N}$-graded ring. But I couldn't find the definition of $S(n)$ anywhere in the book (if any one knows where it is, please let me know). It is presumably the regrading of $S$ by $n$, but I wanted to make sure there is absolutely no room for misunderstanding. For example, regrading in which direction? It is probably $S(n)_i=S_{n+i}$, but did Hartshorne use this convention? And presumably $S(n)_i=0\quad\forall i<n$ ?</p>
| 0non-cybersec
| Stackexchange |
Eigenpairs of a sparse symmetric block tridiagonal matrix with diagonal blocks on the outer diagonals. <p>I'm looking at methods to find the eigenpairs of symmetric block tridiagonal matrices, with sparse blocks on the main diagonal and diagonal blocks on the outer diagonals. Has any research been done on similar matrices ?</p>
<p><span class="math-container">$$
M = S+D = \\
\begin{pmatrix}S_1&&&\\&.&&\\&&.&\\&&&S_n\end{pmatrix}+\begin{pmatrix}&D_1&&\\D_1&&.&\\&.&&D_n\\&&D_n&\end{pmatrix}\\
=\begin{pmatrix}S_1&D_1&&\\D_1&.&.&\\&.&.&D_n\\&&D_n&S_n\end{pmatrix}\\
\text{$S_i$ : sparse symmetric blocks}\\\text{$D_i$ : diagonal blocks}
$$</span></p>
<p>I've been looking at eigensolvers for the more general problem of block tridiagonal matrices : either tridiagonalization based (DSBEV, DSBEVD, DSBEVX in LAPACK) or working directly on the block matrix (<a href="https://www.researchgate.net/publication/220493316_An_extension_of_the_divide-and-conquer_method_for_a_class_of_symmetric_block-tridiagonal_eigenproblems" rel="nofollow noreferrer">Block Divide & Conquer</a> and <a href="https://www.sciencedirect.com/science/article/pii/S0377042711003967" rel="nofollow noreferrer">Twisted Block Factorization</a>).</p>
<p>I'm interested in methods that take advantage of the matrix structure, maybe relating the eigenpairs of M to those of S and D, or getting rid of the <span class="math-container">$S_i$</span> through some similarity transformation ? Given my math background i'm not sure i'd be able to devise such methods by myself, which is why i'm asking for help here.</p>
| 0non-cybersec
| Stackexchange |
Can MSTest Data Driven Tests Be Run in Parallel?. <p>A similar question was asked several years ago for VisualStudio2010 and never answered here:</p>
<p><a href="https://stackoverflow.com/questions/4046362/how-to-parallelize-a-data-driven-unit-test-in-visual-studio-2010">How to parallelize a Data-Driven unit test in Visual Studio 2010?</a></p>
<p>I'm hoping that perhaps this functionality exists now in VS2012.</p>
<p>My situation is just like the one above, I have a data driven login test that runs the same test for multiple clients.</p>
<p>I've tried different threading solutions by triggering threads in ClassInitialize and TestInitialize, and waiting for all the tests to be done before cleaning up. Anything I've tried hasn't worked for these data driven tests.</p>
<p>I'm worried that attempting this is fundamentally wrong with how MSTest works with dd tests. Basically what I've found is that the next dataset will not run until TestCleanup is finished, and TestCleanup won't finish without the test being finished and the test results being recorded. So basically, the next test can't start until the previous test results are recorded. Is that true? Or is there a way to parallelize these using the MSTest framework?</p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
Tyler produced Bound 1.. | 0non-cybersec
| Reddit |
how much do you think looks matter men and women or reddit?. If you could leave gender and age in your comment it’d be appreciated! i wanted to know your opinion and preferences when it comes to choosing a partner in terms of “how much does looks matter to you when dating?” | 0non-cybersec
| Reddit |
How to get feed output of a grunt task to another grunt task?. <p>I'm not sure if grunt can do this. I have two grunt tasks that I want to run. The first task is to create a mock post and the second is to run <code>penthouse</code> task to inline css. Any hacky way is welcome. </p>
<p>This is the <code>exec</code> task that I have to run to create a blog post in WordPress. </p>
<pre><code> exec: {
create_mock: {
cmd: 'cd ~/MyProjects/project/vip-quickstart && vagrant ssh -c \'sh /srv/www/wp-content/themes/vip/the-theme/bin/mock-post.sh\'',
callback: function(err, stdout, stderr) {
grunt.log.write('stdout: ' + stdout); // This is the url of the created post.
}
}
},
</code></pre>
<p>The output is the url that the blog post was created and I have this <code>penthouse</code> task to run which I need to feed in the url that this task will look to get all the above-the-fold css.</p>
<pre><code> penthouse: {
singular: {
outfile: 'assets/css/inline/_singular.css',
css: 'assets/css/theme.css',
minify: true,
url: $URL, // << I want to feed in the url from the previous task to here.
width: 1300,
height: 900
}
},
</code></pre>
<p>The hacky way I can think of is to save the out to a file and read that in <code>penthouse</code> task but I think there's must be a better way to do this. </p>
<p>Thanks a lot.</p>
| 0non-cybersec
| Stackexchange |
what is the relationship between EXPOSE in the dockerfile and TARGETPORT in the service YAML and actual running port in the Pod?. <p>What is the relationship between EXPOSE in the dockerfile and TARGETPORT in the service YAML and actual running port in the Pod ?</p>
<p>In my dockerfile</p>
<pre><code>expose 8080
</code></pre>
<p>in my deployment</p>
<pre><code>ports:
- containerPort: 8080
</code></pre>
<p>In my service</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: xtys-web-admin
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
selector:
app: xtys-web-admin
</code></pre>
<p>In my pod</p>
<pre><code>kubectl exec xtys-web-admin-7b79647c8d-n6rhk -- ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 100 *:8332 *:*
</code></pre>
<p>So, in the pod actually running 8332( from some config file).
my question is how does it still works ? it works,but i doubt it, someone can clarify it?</p>
| 0non-cybersec
| Stackexchange |
Roll20 or TableTop Forge. I am looking to continue a campaign I started back home, but am now headed to college and was wondering if you guys suggest a specific online table top and if there is any good online website to put character sheets on to share. Also we are playing 3.5 | 0non-cybersec
| Reddit |
People of Earth.... | 0non-cybersec
| Reddit |
All in one money making solution, turn your time into money - PAIDERA. | 0non-cybersec
| Reddit |
If $k$ identical six-sided dice are thrown, and $n$ identical coins are tossed, how many results can be distinguished?. <p>I'm being ask this combinatorics question: </p>
<blockquote>
<p>"If <span class="math-container">$k$</span> identical six-sided dice are thrown, and <span class="math-container">$n$</span> identical coins are tossed, how many results can be distinguished?"</p>
</blockquote>
<p>I found that there are <span class="math-container">$\binom{k+5}{5}$</span> distinguished results for the dice. However, I'm not sure how to combine them with the distinguished results for the coins.</p>
<p>Thank you so much for helping!</p>
| 0non-cybersec
| Stackexchange |
A quick reminder about the /r/socialskills spam filter. Hi guys! You friendly neighborhood ~~spiderman~~ erm, mod, here. I've been seeing an awful lot of great posts get caught in the spam filter recently and although I fish them out as soon as I can, you can really help me out by sending me a message if your post doesn't appear after a few minutes. I'll usually check the mod queue at least once a day, but I'll get to your post much sooner if you send me a message and let me know your post is stuck.
Thanks! I'm really excited to see how this community has grown, and I appreciate everyone that has taken the time to submit links, ask questions, and offer advice. If you have any questions or suggestions for me, I'm just a quick modmail away! | 0non-cybersec
| Reddit |
nginx: [emerg] "server" directive is not allowed here. <p>I'm having issues with my nginx server conf.</p>
<p>When I run <code>nginx -t</code> it says that everything is correct, but when I check my config file per file, it's KO.
It says :</p>
<blockquote>
<p>nginx: [emerg] "server" directive is not allowed here in
/etc/nginx/sites-available/thebishop.fr.conf:1</p>
</blockquote>
<p>here some conf files :
nginx.conf</p>
<pre><code>user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
more_set_headers 'Server: 185.216.27.123';
client_max_body_size 20M;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
</code></pre>
<p>thebishop.fr.conf : </p>
<pre><code>server {
listen 80;
server_name thebishop.fr www.thebishop.fr;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name thebishop.fr;
ssl_certificate /etc/letsencrypt/live/thebishop.fr/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/thebishop.fr/privkey.pem; # managed by Certbot
return 301 $scheme://www.thebishop.fr$request_uri;
}
server {
listen 443 ssl;
server_name www.thebishop.fr;
root /var/www/html/thebishop.fr;
index index.html index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
error_log /var/log/nginx/thebishop.fr_error.log;
access_log /var/log/nginx/thebishop.fr_access.log;
ssl_certificate /etc/letsencrypt/live/thebishop.fr/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/thebishop.fr/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# Redirect non-https traffic to https
# if ($scheme != "https") {
# return 301 https://$host$request_uri;
# } # managed by Certbot
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
</code></pre>
| 0non-cybersec
| Stackexchange |
Hugo with React?. <p>Is it possible/ideal to use something like Hugo with React? I am aware of Gatsby, but would Hugo work as well. I have limited knowledge of combining the two but my understanding would be that Hugo would be used for all your templating and static web pages and then React would be used for the web application type of things, and a headless CMS somewhere in there? Can someone with experience comment why Hugo or Gatsby are sometimes good to use with React? Or an overview of the relationship between the frameworks?</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 |
Europe electric car sales up 77% in 2014. The big driver of that growth was Norway, which saw its sales increase 302% compared to the first half of 2013. | 0non-cybersec
| Reddit |
What audited server programs are shipped in a default OpenBSD install?. <p>OpenBSD has a process by which they <a href="http://www.openbsd.org/security.html" rel="nofollow">audit programs</a> by doing a "comprehensive file-by-file analysis of every critical software component". Which OpenBSD programs have been audited? Is there a list? I know <code>httpd</code>, <code>ftpd</code>, and <code>sshd</code> have been audited, but I can't find a comprehensive list</p>
| 0non-cybersec
| Stackexchange |
Schröder-Bernstein, check proof. <p>Theorem: if $r:A\to B, s:B\to A$ are injections, there is a bijection $t:A\to B$.</p>
<p>I will prove this lemma: "if exist $f:A\to B\subset A$ injective, then exist $h:A\to B$ bijective.</p>
<p>With this lemma, consider the injective function $f=s\circ r:A\to s(B)\subset A$, and exist $h:A\to s(B)$ bijective. Now, $s_{|B}:B\to s(B)$ is bijective. Finally, $t= s_{|B}^{-1}\circ h:A\to B$ is a bijection.</p>
<p>I want check the proof of lemma:
Put $Y=A-B$, $X=Y\cup (\bigcup_{i\in \mathbb{N}}f^i(Y))$, where $ f^i(Y)=f(f(...f(Y)...)), i$ times.</p>
<p>Because $Y\cap B=\emptyset$, $ f^k(Y)\subset B$ and $Y$ are disjoint. Because $f$ is injective, $Y\cap f^k(Y)=\emptyset \to f^m(Y)\cap f^{m+k}(Y)=\emptyset $ for all $k,m$. Note in the definition of $X$ that the union is disjoint, and $X=Y\cup f(X)$.</p>
<p>Finally, Note that $A-X=(Y\cup B)-(Y\cup f(X))=B-f(X)$.</p>
<p>If we define $h:A\to B$ as $h=f$ in $X$ and $h=id$ in $A-X$, is bijective.</p>
| 0non-cybersec
| Stackexchange |
How to convert scala list to javascript array?. <p>Is there a simpler way of doing this?</p>
<pre><code> $(document).ready(function () {
var jsArray = []
@if(scalaList != null) {
@for(id <- scalaList) {
jsArray.push('@id');
}
}
...
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Honking back at someone who blows their horn at you for your driving is the “no u” of the vehicle world.. | 0non-cybersec
| Reddit |
Riemann zeta function functional equation proof explanation. <p>In Riemann zeta function functional equation proof I arrived to a following equation
$$\frac{\Gamma\left(\frac{s}2\right) \zeta(s)}{\pi^{\frac{s}2}}=\sum_{n=1}^\infty \int_0^\infty x^{\frac{s}2-1}e^{-n^{2}\pi x}dx,$$
where $s\in \mathbb{C}$ and Re$(s)>1$. Next step is to prove that
$$\frac{\Gamma\left(\frac{s}2\right) \zeta(s)}{\pi^{\frac{s}2}}=\int_0^\infty x^{\frac{s}2-1}\sum_{n=1}^\infty e^{-n^{2}\pi x}dx.$$</p>
<p>Why exactly can we change the order of integration and summation? I'm having trouble with this equation, since $s\in \mathbb{C}$. What exactly should I use?</p>
| 0non-cybersec
| Stackexchange |
Deep discount on Navali leather messenger- slightly damaged bags for $50. | 0non-cybersec
| Reddit |
Table cell with unwanted black background. <p>I'm trying to create the following table, but the first cell has a black background. How can I get rid of it? I need alternate colors and multiple rows feature provided by <code>tabularx</code>. </p>
<p><a href="https://i.stack.imgur.com/MzBUo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MzBUo.png" alt="enter image description here"></a></p>
<pre><code>\documentclass[]{article}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\begin{document}
\begin{table}[h]
\centering
\caption{Points}
\label{tab:Points}
\begin{tabularx}{.9\textwidth}{cccX}
\hline
\textbf{Heading 1} & \textbf{Heading 2} & \textbf{Heading 3} & \textbf{Heading 4} \\
\hline
1 & a & 10 & Some text, Some text, Some text, Some text, Some text \\
\rowcolor[gray]{0.90}1 & b & 4 & \\
1 & c & 4 & \\
\rowcolor[gray]{0.90}1 & d & 4 & Some other text, Some other text \\
1 & e & 4 & \\
\hline
Total & & 26 & \\
\rowcolor[gray]{0.90} \hline
\end{tabularx}
\end{table}
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange |
Find $a,b,c$ that minimize $F(a,b,c) = \int_{-1}^1 (t^2-a-bt-c\cos t)^2 dt$. <blockquote>
<p>Find <span class="math-container">$a,b,c$</span> that minimize <span class="math-container">$F(a,b,c) = \int_{-1}^1 (t^2-a-bt-c\cos
t)^2 dt$</span></p>
</blockquote>
<p>I'm studying numerical methods and we're seeing least squares method and projection of things like polynomials and <strong>orthogonality</strong> and so. How should I minimize that thing in this context?</p>
<p>I think the first thing I should do it to see this as the orthogonal projection of something onto something like <a href="https://math.stackexchange.com/a/415897/166180">here</a>. Can somebody help me?</p>
| 0non-cybersec
| Stackexchange |
Offline time synchronisation in cascade. <p>I have the following setup :</p>
<pre><code>[Group1] :
- Server 1 (Linux)
- Client 1 (Windows)
- Client 2 (Windows)
...
- Client n (Windows)
[Group2] :
- Server 2 (Linux)
- Client 1 (Windows)
- Client 2 (Windows)
...
- Client n (Windows)
</code></pre>
<p>All computers in group 1 are on the same switch.<br>
All computers in group 2 are on the same switch.</p>
<p>Sometimes, group 1 and group 2 are connected (with an ethernet cable between the two switches).<br>
Sometiles, they are not.</p>
<p>When Group 1 and Group 2 are used separatly (they are disconnected) I want every computer in group 1 to be time-synchronized and every computer in group 2 to be time synchronized (I do not care if group 1 and group 2 do not share the same time).<br>
When Group 1 and Group 2 are used together (they are connected), I want every computer (in group 1 and group 2) to be time-synchronized.</p>
<p>None of the computers will ever be on the Internet.<br>
I absolutly do not care if they do not have the "right time" (if they think it is 5:47:33 when it's actually 4:22:17) all I want is that they share the same time (if it is 5:47:33 on one computer, then it must be 5:47:33 on every connected computers).</p>
<p><strong>What I managed to do this far :</strong></p>
<ul>
<li>Use server 1 as a NTP server. It uses its own system time and serves it on the network.</li>
<li>Sync group 1's clients with the server (using nettime).</li>
</ul>
<p><strong>What I tried :</strong></p>
<ul>
<li>Configure server 2 as a NTP server, using server 1 as primary source and its own system time as a secondary source.<br>
<strong>Problem :</strong> it doesn't work.
And I get why : NTP is not made for that. If the two sources provides vastly different times, it has to figure out a way to "find the truth". In fact, NTP is way more complicated than what I need...</li>
</ul>
<p><strong>What I'm considering :</strong></p>
<ul>
<li>Configure server 2's NTP server exactly like server 1's (ie telling it to use its own system time as a reference) and syncing server 2's system time on server 1's.<br>
<strong>Problem :</strong> I cannot find a way to tell ntpd to act as a server, and only as a server, and to use another client to sync the system time.</li>
</ul>
<p>Do you have any idea ?</p>
<p>Thank you !</p>
| 0non-cybersec
| Stackexchange |
Why does showering with hot water feels so good, even though being outside in hot temperatures is uncomfortable?. Was thinking about this in the shower this morning, thought there might be a sciency explanation. | 0non-cybersec
| Reddit |
"Oh man, are you okay?". | 0non-cybersec
| Reddit |
How can I perform a case insensitive replace in JavaScript?. <p>I current have the following code:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const pattern = "quick";
const re = new RegExp(pattern, "gi");
const string = "The quick brown fox jumped over the lazy QUICK dog";
const replaced = string.replace(pattern, "<b>" + pattern + "</b>");
console.log(replaced);</code></pre>
</div>
</div>
</p>
<p>It produces the following:</p>
<pre><code>The <b>quick</b> brown fox jumped over the lazy QUICK dog
</code></pre>
<p>What I want is:</p>
<pre><code>The <b>quick</b> brown fox jumped over the lazy <b>QUICK</b> dog
</code></pre>
<p>I'm having two issues.</p>
<p>Firstly, why isn't <code>QUICK</code> being replaced when I'm using a case insensitive regex?</p>
<p>Secondly, how do I ensure that <code>QUICK</code> is replaced with <code><b>QUICK</b></code> and not <code><b>quick</b></code>?</p>
| 0non-cybersec
| Stackexchange |
How can I grab all email addresses associated with a "label" in Gmail?. <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://webapps.stackexchange.com/questions/9813/get-e-mail-addresses-from-gmail-messages-received">Get e-mail addresses from Gmail messages received</a> </p>
</blockquote>
<p>In Gmail, you can tag one or more emails with a Label:</p>
<p><img src="https://i.stack.imgur.com/dZeqV.gif" alt="enter image description here"></p>
<p>I know I can select the label to see the emails in question, but what I want is to get everyone's <em>email address</em> associated with these labels for export. In the above image, I'd want the email addresses of Lifestreams Blog, Ozh, and WordPress since they're tagged 'planetozh'.</p>
<p>EDIT:</p>
<p>Let's assume I can download all the emails into Mozilla Thunderbird and view the emails in an ordered list with the label set correctly (using IMAP). How could I export the list of email addresses (duplicates are not a problem) this way?</p>
| 0non-cybersec
| Stackexchange |
Blood transfusions from younger people won't slow the aging process. | 0non-cybersec
| Reddit |
What do you hope happens to SW as a whole after Episode 9?. Disney said they'll keep making movies as long as they can sell them. As such, I think it will be hard to keep going with the Skywalker family as the main focus.
What do you think about it being like Trek in a way, maybe set in a different part of the galaxy, a different timeline, etc?
I personally hope they go forward in time, not backward.
Also, how would you feel if Jedi and force users were not a central focus for a while?
What do you think? | 0non-cybersec
| Reddit |
TIL that there is a man in Sweden who received disability benefits for his "addiction" to heavy metal. He reportedly went to 300 concerts in one year which left him unable to hold down a job.. | 0non-cybersec
| Reddit |
A window that behaves both modally and non-modally. <p>I want to create a WPF window that behaves as a modal dialogue box while at the same time facilitating selected operations on certain other windows of the same application. An example of this behaviour can be seen in Adobe Photoshop, which offers several dialogues that allow the user to use an eyedropper tool to make selections from an image while disabling virtually all other application features.</p>
<p>I'm guessing that the way forward is to create a non-modal, always-on-top dialogue and programmatically disable those application features that are not applicable to the dialogue. Is there an easy way to achieve this in WPF? Or perhaps there's a design pattern I could adopt.</p>
| 0non-cybersec
| Stackexchange |
Where to meet new people?. I'm 22f and have not been in a relationship since high school. I think that I have not had a boyfriend since then is because of how few people I know. I'm starting to panic because I'm in my last year of university and I'm afraid it'll even be harder to meet people once I graduate. When/where did you meet your significant other? Any advice would be helpful! | 0non-cybersec
| Reddit |
npm install -g npm is not updating. <p>I cannot seem to update npm with npm install: </p>
<pre><code>$ npm -v
5.6.0
$ sudo npm install -g npm@latest
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 11.905s
$ npm -v
5.6.0
</code></pre>
| 0non-cybersec
| Stackexchange |
Proxy a WebComponent's constructor that extends HTMLElement. <p>So, in a library that I'm creating that uses custom elements, you obviously need to define the class in the <code>CustomElementsRegistry</code> before you may instantiate it.</p>
<p>As of right now, this is being solved with a decorator:</p>
<pre><code>class Component extends HTMLElement {
static register (componentName) {
return component => {
window.customElements.define(componentName, component);
return component;
}
}
}
@Component.register('my-element')
class MyElement extends Component { }
document.body.appendChild(new MyElement());
</code></pre>
<p><strong>This works</strong>, however, I would like to automatically register the custom element upon instantiation of the class (so that the author does not have to add the decorator to every single component that they write). This could maybe be accomplished via a <code>Proxy</code>.</p>
<hr>
<p>My problem, though, is that when I attempt to use a Proxy on the constructor, and attempt to return an instance of the target, I still get <strong><code>Illegal Constructor</code></strong>, as if the element has never been defined in the registry.</p>
<p>This obviously has to do with the way I am instantiating the class inside of the proxy, but I'm unsure of how to do it otherwise. My code is as follows:</p>
<p><strong>Please run in latest Chrome:</strong>
<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>class Component extends HTMLElement {
static get componentName () {
return this.name.replace(/[A-Z]/g, char => `-${ char.toLowerCase() }`).substring(1);
}
}
const ProxiedComponent = new Proxy(Component, {
construct (target, args, extender) {
const { componentName } = extender;
if (!window.customElements.get(componentName)) {
window.customElements.define(componentName, extender);
}
return new target(); // culprit
}
});
class MyElement extends ProxiedComponent { }
document.body.appendChild(new MyElement());</code></pre>
</div>
</div>
</p>
<p>How can I continue the chain of inheritance inside of the proxy without losing the context of the fact that I'm instantiating the <code>MyElement</code> class so that it doesn't throw the <strong><code>Illegal Constructor</code></strong> exception?</p>
| 0non-cybersec
| Stackexchange |
Enabling SSL For GitLab Results in ERR_CONNECTION_REFUSED. <p>I have had an existing GitLab installation for a few months, and I decided it was time to add a real SSL certificate (not self-signed).</p>
<p>Following the documentation, I change the following line:</p>
<pre><code>external_url 'http://<domain>.com'
</code></pre>
<p>to:</p>
<pre><code>external_url 'https://<domain>.com'
</code></pre>
<p>And uncommented the following lines:</p>
<pre><code>nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] "/etc/gitlab/ssl/gitlab.key"
</code></pre>
<p>And just to be sure, I double-checked the key files:</p>
<pre><code>root@host:/etc/gitlab# cat /etc/gitlab/ssl/gitlab.crt
-----BEGIN CERTIFICATE-----
...
root@host:/etc/gitlab# cat /etc/gitlab/ssl/gitlab.key
-----BEGIN PRIVATE KEY-----
...
</code></pre>
<p>Then I ran <code>gitlab-ctl reconfigure</code>, and I got a successful message at the end. However, navigating to the GitLab URL, I get an <code>ERR_CONNECTION_REFUSED</code>. When I comment out all the lines above and run <code>gitlab-ctl reconfigure</code>, everything goes back to normal on HTTP port 80.</p>
<p>What might cause nginx to refuse connections when I feed the configuration file two certificates and adjust the URL? Thanks!</p>
| 0non-cybersec
| Stackexchange |
YSK that “should’ve” is a contraction for “should have” not “should of”. always irks me when people write “should of” | 0non-cybersec
| Reddit |
Can memoization be applied to any recursive algorithm?. <p>I am new to the concepts of recursion, backtracking and dynamic programming. </p>
<p>I am having a hard time understanding if at all I can apply memoization to a particular recursive algorithm and if there is a relation between memoization being applicable ONLY to top down recursive algorithms. Any explanation on the same would be greatly appreciated.</p>
<p><strong>The Background to this question:</strong></p>
<p>I have a naive inefficient recursive solution(below) a and wish to incorporate memoization but don't know if it is possible.</p>
<p><strong>Problem Statement: Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, Print the number of ways (non-distinct sets) this can be achieved.</strong></p>
<pre><code>Ex: Ex: N = 4 , S = {1, 2, 3}
1 1 1 1
1 1 2
1 2 1
1 3
2 1 1
2 2
3 1
</code></pre>
<p>My code:</p>
<pre><code>public static int change(int n, int count, int sum) {
if(sum == n) {
return 1;
}
if(sum > n) {
return 0;
}
for(int i = 1; i <=3; i++) {
sum = sum + i;
count += change(n, 0, sum);
sum = sum - i;
}
return count;
}
</code></pre>
| 0non-cybersec
| Stackexchange |
How to talk about theory. <p>I realize this might be a contentious question, but this seemed like the right place to ask. Please redirect me if not.</p>
<p>The background is that I am a "practitioner" (PhD student, I don't study CS theory) but I have a reasonable foundation in undergraduate algorithms and math. Nevertheless, discussions with theorists are usually very surface-level, as if they're afraid to use mathematical terms with me in case I get scared. In reality, I'm perfectly comfortable with and interested in theory, but I'm just not used to discussing it so I probably don't always use terms that would flag me as "theorist". I find that the direct approach ("please tell me the details") doesn't always work, particularly if the theorist in question has assumed a condescending tone that sets a high bar for expertise (this happens often).</p>
<p>As theorists, if you filter people in this way, do you have recommendations for how a practitioner can avoid being "flagged" by your filter?</p>
| 0non-cybersec
| Stackexchange |
How to remove page numbers behind acronyms?. <p>I would like to remove the page numbers behind my acronyms. Is there a way to do this? </p>
<p><a href="https://i.stack.imgur.com/dma1t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dma1t.png" alt=""></a></p>
<p>I create my acronyms the following way:</p>
<pre><code>\makenoidxglossaries
\setacronymstyle{long-short}
...
\begin{document}
...
\printnoidxglossary[type=acronym]
</code></pre>
| 0non-cybersec
| Stackexchange |
Just got a Mabook. Former PC user.. What should I know to start off??. I just received a Macbook Pro as a graduation gift and I must say I like the feel of it so far. My favorite things would have to be the backlit keyboard, the fact that it doesn't overheat in two minutes (compared to my old HP) and, of course, the trackpad and it's gestures.
I just want to know what things are essential to know for someone who has never owned a Mac computer before. Any tips would be greatly appreciated. Thanks a ton guys and gals.
Also, what is the touchpad gesture for right clicking? Or do I have to press control every time?? | 0non-cybersec
| Reddit |
High Sierra Rootkit Infected. Hey guys and girls :)
I have downloaded some programs for my high sierra from a random developer.
When running chkrootkit the results that I got were:
Checking `timed'... INFECTED
awdl0 is PROMISC
I did a format of my hard disk and reinstalled the High Sierra 10.13.1
The results were:
Checking `timed'... INFECTED
So awdl0 was fixed but the ‘timed’ is still infected. Any idea how to fix it? Thank you!
| 0non-cybersec
| Reddit |
HoN 2.0 aims to take a bite out of League of Legends share of the casual market (Dota genre). | 0non-cybersec
| Reddit |
(19/f) My boyfriend (20/m) looking up girls online?. Just to give you some background, my boyfriend and I have been dating for a year. He has never cheated on me or given me a reason not to trust him but in past relationships I have been cheated on and I have bad trust issues because of it. I moved recently and we are in a LDR.
I saw him this weekend and was on his phone at one point and decided to look at his instagram. I looked at his searches because I've noticed before that he checks up on a specific ex's instagram. It made me feel terrible because I feel like you wouldn't have any need to check up on an ex unless you still had lingering feelings for them. It also bugs because his ex constantly posts pictures of herself half naked.
His searches this time actually showed he looked up a bunch of girls, all of them he has dated before or hooked up with. I wasn't even in the list of searches lol. ALL of these girls are really attractive and post a lot of revealing pictures of themselves also. This made me feel horrible.
I feel like I'm not good enough. I feel like he's looking at this pictures of exes in a sexual way (I mean how could he not! the pictures are scandalous haha). Is he getting off to them?! He never really likes me to look at his phone and I think this is why. I almost want to break up with him over this, being cheated on before has burned me so bad that feeling like someone doesn't have eyes for only me makes me want to pull away fast.
Am I overreacting or do I have a right to be upset? I'm looking for advice on what I should do now.
Tl;dr Saw my bf's searches on instagram and he looked up a bunch of girls who he has dated or hooked up with before. These girls all happen to post lots of slutty photos. This really hurt me and I don't know what to do now.
| 0non-cybersec
| Reddit |
Vue-google-map autocomplete two way binding not working. <p>I am using <a href="https://github.com/xkjyeah/vue-google-maps/" rel="nofollow noreferrer">vue-google-maps</a>, and I have implemented the plugin and it works flawlessly, but there is a small problem ( or maybe I am not able to do it correctly ). When I implemented the autocomplete functionality it works one way. I enter the address and the map points me to the selected place but when I drag the pointer it doesn't update the address in the search field.
<strong>I am using Vuejs 2</strong>
and <a href="https://github.com/xkjyeah/vue-google-maps/" rel="nofollow noreferrer">vue-google-maps</a></p>
<p>This is what I am doing:</p>
<pre><code><template>
<div>
<label>
AutoComplete
<GmapAutocomplete :position.sync="markers[0].position" @keyup.enter="usePlace" @place_changed="setPlace">
</GmapAutocomplete>
<button @click="usePlace">Add</button>
</label>
<br/>
<gmap-map
:center="center"
:zoom="7"
map-type-id="terrain"
style="width: 100%; height: 500px"
>
<gmap-marker
@dragend="updateMaker"
:key="index"
v-for="(m, index) in markers"
:position="m.position"
:clickable="true"
:draggable="true"
@click="center=m.position"
></gmap-marker>
</gmap-map>
</div>
</template>
<script>
export default {
data() {
return {
center: {lat: 10.0, lng: 10.0},
markers: [{
position: {lat: 11.0, lng: 11.0}
}],
place: null,
}
},
description: 'Autocomplete Example (#164)',
methods: {
setPlace(place) {
this.place = place
},
setDescription(description) {
this.description = description;
},
usePlace(place) {
if (this.place) {
var newPostion = {
lat: this.place.geometry.location.lat(),
lng: this.place.geometry.location.lng(),
};
this.center = newPostion;
this.markers[0].position = newPostion;
this.place = null;
}
},
updateMaker: function(event) {
console.log('updateMaker, ', event.latLng.lat());
this.markers[0].position = {
lat: event.latLng.lat(),
lng: event.latLng.lng(),
}
},
}
}
</script>
</code></pre>
| 0non-cybersec
| Stackexchange |
Has Overwatch Gone Too Far?. | 0non-cybersec
| Reddit |
How to shut down Lubuntu immediately with the power button instead of a logout method dialog prompt. <p>I would like the computer to shut down directly after I press the power button. At the moment, Lubuntu opens a shutdown method dialog box when I press the shutdown button. </p>
<p>I suspect I can simply modify the Lubuntu-rc.xml file in the .config/openbox/ folder. I used that file to easily change other shortcut keys. If this is the case, I believe I have found the proper line of code where the shutdown command should be. But when I enter the command "sudo shutdown - now" in the appropriate place, it doesn't work. Is there another command I should enter for the physical power button to shutdown the computer immediately?</p>
<pre><code>`<!-- Launch logout when push on the shutdown button -->
<keybind key="XF86PowerOff">
<action name="Execute">
<command>lxsession-default quit</command>
</action>
</keybind>`
</code></pre>
| 0non-cybersec
| Stackexchange |
TIL...the name for this thingy.. | 0non-cybersec
| Reddit |
"I'll never gain the weight back.". I hit my goal weight in February. I was stoked. It took me 2 years to lose 30 pounds - horrible, I know. But I did it! Every day was a daily struggle for me. I never once was able to relax and eat what I wanted. Everything was measured and tracked. Yet I was so sure I would never gain the weight back.
As soon as I hit my goal weight, my eating changed dramatically. I felt skinny and I loved being the skinny girl eating pizza, fast food, ice cream. Even as I logged everything and saw my daily average creep up - 1600, 1800, 2000, and more - it didn't really concern me. Okay, I was gaining a few pounds, but it was water weight. I'll lose it soon.
Then mid-March I weighed myself. I had somehow stopped weighing myself daily. Not "somehow" - I always had an excuse. I don't want to weigh myself, I ate pizza last night! It won't be accurate. Oh, now it's the end of the day, I'm too heavy, I'll do it tomorrow. etc. I didn't stop caring. I just wasn't consistent.
Then one day I did step on the scale. I had gained 10 pounds. It takes me like a year to lose that!!! I felt horrible. I resolved to lose it all. I signed up for a personal trainer/meal plan and paid $$$$. I started working out and kept it up. I took new progress pictures.
Now it's been a month. My diet has been tracked but inconsistent. I took new pictures and there's literally zero change. I was crushed. Then I checked MyFitnessPal. My average calorie intake over the past month: 1800 per day. No wonder I've been maintaining.
So now I'm tightening up my diet all over again. I never thought eating 1200 calories would be so hard after all the months and weeks spent doing so. It's like back at the beginning, but at least a bit lighter.
Anyway. I used to say to myself, when I read about people gaining weight back, that won't be me. My lifestyle has changed. But all it took was one month to undo so much progress. Everyone is different but if you relate to this post at all: stay vigilant. You probably can't and won't be the skinny person eating whole pizzas and extra large fast food meals. But you can be the person that doesn't end up like me, re-losing weight that should never have been gained! | 0non-cybersec
| Reddit |
Converting a string representation of a list into an actual list object. <p>I have a string that looks identical to a list, let's say:</p>
<pre><code>fruits = "['apple', 'orange', 'banana']"
</code></pre>
<p>What would be the way to convert that to a list object?</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 |
Bill Nye. | 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 |
First hop redundancy vs. Routing protocol. This is not a textbook question, I’m really doing this on my production network! Say I have one pair of routers (RA and RB) running HSRP facing another pair of routers (R1 and R2) running HSRP:
---- RA ----- R1 ----
| X |
---- RB------R2 ----
And let’s further say that I have no need to exchange routes between the two networks on either side of these router pairs; I just need to maintain highly available connectivity between these two networks.
in this scenario is there any disadvantage to the HSRP solution? What specific failure modes is this HSRP solution liable to, which a routing protocol would survive?
EDIT: HSRP in this scenario uses preemption and I have cross links RA-R2 and RB-R1. | 1cybersec
| Reddit |
Remove Thunderbird from the indicator-messages. <p>Ubuntu 14.04. I accidentally started Thunderbird once, I do not use it.</p>
<p>Now I cannot remove Thunderbird from the indicator-messages menu.</p>
<p>As per the <a href="https://wiki.ubuntu.com/MessagingMenu#API" rel="nofollow">doc</a>, I have tried to:</p>
<ul>
<li><p>copy the file <code>/usr/share/indicators/messages/applications/thunderbird</code> to <code>~/.config/indicators/messages/applications-blacklist/</code></p></li>
<li><p>rename <code>/usr/share/indicators/messages/applications/thunderbird</code> but not to remove it altogether</p></li>
</ul>
<p>Any reason why this would not work?</p>
| 0non-cybersec
| Stackexchange |
Cant believe that they let him put that in our schools news paper. | 0non-cybersec
| Reddit |
RecursionError: maximum recursion depth exceeded while calling a Python object when using pickle.load(). <p><em>Firstly I'm aware that there have been multiple questions already asked regarding this particular error but I can't find any that address the precise context in which it's occurring for me. I've also tried the solutions provided for other similar errors and it hasn't made any difference.</em> </p>
<p>I'm using the python module <code>pickle</code> to save an object to file and the reload it using the following code:</p>
<pre><code>with open('test_file.pkl', 'wb') as a:
pickle.dump(object1, a, pickle.HIGHEST_PROTOCOL)
</code></pre>
<p>This doesn't throw any error but then when I try and open the file using the following code:</p>
<pre><code>with open('test_file.pkl', 'rb') as a:
object2 = pickle.load(a)
</code></pre>
<p>I get this error:</p>
<pre><code>---------------------------------------------------------------------------
RecursionError Traceback (most recent call last)
<ipython-input-3-8c5a70d147f7> in <module>()
1 with open('2test_bolfi_results.pkl', 'rb') as a:
----> 2 results = pickle.load(a)
3
~/.local/lib/python3.5/site-packages/elfi/methods/results.py in __getattr__(self, item)
95 def __getattr__(self, item):
96 """Allow more convenient access to items under self.meta."""
---> 97 if item in self.meta.keys():
98 return self.meta[item]
99 else:
... last 1 frames repeated, from the frame below ...
~/.local/lib/python3.5/site-packages/elfi/methods/results.py in __getattr__(self, item)
95 def __getattr__(self, item):
96 """Allow more convenient access to items under self.meta."""
---> 97 if item in self.meta.keys():
98 return self.meta[item]
99 else:
RecursionError: maximum recursion depth exceeded while calling a Python object
</code></pre>
<p>I'm aware other people have seen this same error (<a href="https://stackoverflow.com/questions/2134706/hitting-maximum-recursion-depth-using-pickle-cpickle">Hitting Maximum Recursion Depth Using Pickle / cPickle</a>) when doing <code>pickle.dump</code> and I've tried increasing the maximum recursion depth by doing <code>sys.setrecursionlimit()</code> but this doesn't work, I either get the same error as above or I increase it further and python crashes with the message: <code>Segmentation fault (core dumped)</code>.</p>
<p>I suspect that the root of the problem is actually when I save the object with <code>pickle.load()</code> but I don't really know how to diagnose it. </p>
<p>Any suggestions? </p>
<p>(I'm running python3 on a windows 10 machine)</p>
| 0non-cybersec
| Stackexchange |
Bi-Directional Player Watervator. | 0non-cybersec
| Reddit |
How to remove tcp header of packets captured with dumpcap?. <p>The traffic from Wireshark saved into a file with dumpcap.
In this file a have for example : </p>
<pre><code>€ X `þ $À6
@ íëÃNxXÀ¨£ P&E»kKí¨<`PEà;
HTTP/1.1 200 OK
Cache-Control: private
</code></pre>
<p>And I want to see only :</p>
<pre><code>HTTP/1.1 200 OK
Cache-Control: private
On windows 7 and I use this commands :
cd\pro*
cd wires*
tshark -D
dumpcap -i 5 -s 96-w packets.cap
</code></pre>
| 0non-cybersec
| Stackexchange |
How to show that the Fourier's series of $f(x)=x$ uniformly converges?. <p>How to show that the Fourier's series of $f(x)=x$ uniformly converges?</p>
<p>After finding its coefficient, I got: </p>
<p>$$\sum\limits_{n=1}^{+\infty}\frac{2(-1)^{n+1}}{n}\sin(nx)$$</p>
<p>I showed the pointwise convergence.</p>
<p>$\frac{u_{n+1}}{u_n}=-\frac{n}{n+1}\frac{\sin((n+1)x)}{\sin(nx)}$</p>
<ul>
<li>And I'm not even sure that's always negative. But I assume that it
show its decreasing.</li>
<li>$\lim\limits_{n\longrightarrow+\infty}\frac{2(-1)^{n+1}}{n}\sin(nx)=0$</li>
<li>And as far as $u_n$ is an alternated series</li>
</ul>
<p>By Leibniz's rule $\sum u_n$ converges pointwise.</p>
<p>I want to study the uniform convergence, but I don't know how to manage it... <strong>can you give a method</strong>?</p>
| 0non-cybersec
| Stackexchange |
People are suing Disney because they don’t understand that ADA compliant is not the same as walking on a ride. | 0non-cybersec
| Reddit |
How to make the user login for an offline web app?. <p>I am building an offline web app targeting iPhone and other mobile devices. Is there any way we can keep the user authentication saved using WebSql local storage? </p>
<p>So when you open the web app while it's offline, I want Either user to be logged in already or the user should be able to log in.</p>
| 0non-cybersec
| Stackexchange |
Find the winners from these soccer betting systems. | 0non-cybersec
| Reddit |
What is the next step of this file upload attack?. <p>Yesterday I discovered somebody had uploaded <a href="https://web.archive.org/web/20130311112355/https://www.broadlink.com.np/userfiles/image/exploit1.txt" rel="nofollow noreferrer">this PHP code</a> to my server as a .jpg file via my asp.net MVC application's "Upload your profile picture" form. I believe the attack was unsuccessful for a number of reasons (the images are given random filenames, then resized, and they're stored in a non-execute directory). The file was leftover because I failed to clean up the temporary file if the resizing failed, which I've now fixed.</p>
<p>But it worries me that I don't understand what the next step of this attack would be...Say he'd successfully uploaded a .jpg file that had malicious PHP code in it to my Windows/IIS server, and he knew the file's URL. Now what? He would need to get IIS to interpret that .jpg file as PHP code rather than an image, right? What might his plan have been to accomplish that? </p>
<p>The only thing I can think of is if it were an apache server and .php files were being filtered out but .htaccess files weren't, he maybe could have managed it. Is there any equivalent approach that might have worked in IIS?</p>
| 1cybersec
| Stackexchange |
Can you guys please give me motivation to draw. I really need to get a drawing done. | 0non-cybersec
| Reddit |
When it comes about storing a large amount of data, storing it in a number of variables is surely cumbersome, and not a good programming practice. Arrays will always be there for your rescue. Get to know more about operations on array in C, and numerous implementations of it.. | 0non-cybersec
| Reddit |
P/poly algorithm for polynomial identity testing. <p>By the Schwartz–Zippel lemma, "Is this arithmetic formula identically zero?" is in coRP $\subseteq$ BPP $\subset$ P/poly, with the second inclusion by Adleman's theorem. By basically following the proof, but using the improved error bound that comes from the original algorithm only having one-sided error, one gets an algorithm that computes suitable advice. (equivalently, a suitable circuit)</p>
<p>Is there any known P/poly algorithm for this problem with advice that can be computed faster?</p>
<p>(I already know about www.cs.sfu.ca/~kabanets/Research/poly.html)</p>
| 0non-cybersec
| Stackexchange |
Can someone help me understand this GPL license. <p>I can't understand the last line of this GPL license.</p>
<blockquote>
<p>Copyright (C) 2011 Some Name</p>
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA</p>
<p>Linking SOMEAPP statically or dynamically with other modules is making
a combined work based on SOMEAPP. Thus, the terms and conditions of
the GNU General Public License cover the whole combination.</p>
<p><strong>In addition, as a special exception, the copyright holders of SOMEAPP
give you permission to combine a portion of SOMEAPP with other binary
code ("Program") under any license the copyright holders of Program
specified, provided the combined work is produced by SOMEAPP.</strong></p>
</blockquote>
<p>I want to know can I use this code in a shareware application.</p>
| 0non-cybersec
| Stackexchange |
Find matrices $S$ and $Q$ which satisfy $B = S^t AS$ and $A=Q^tQ$. <p>For</p>
<p>$ A:= M_{\mathcal{A}}(< \cdot,\cdot>); B:= M_{\mathcal{B}}(< \cdot,\cdot>) $ with $\mathcal{A} = (1, x, x^2,x ^3); \mathcal{B} = (1+x^2, x-2x^2, -2x+x^2+x^3, 1+x^3)$ and $<f; g>:=\int_{-1}^1f(x)g(x)\,dx$</p>
<p>I found</p>
<p>$ A = \begin{pmatrix} 2 & 0 & \frac{2}{3} & 0 \\ 0 & \frac{2}{3} & 0 & \frac{2}{5} \\ \frac{2}{3} & 0 & \frac{2}{5} & 0 \\ 0 & \frac{2}{5} & 0 & \frac{2}{7}\end{pmatrix}, B = \begin{pmatrix} \frac{56}{15} & -\frac{32}{15} & \frac{16}{15} & \frac{8}{3} \\ -\frac{32}{15} & \frac{34}{15} & -\frac{26}{15} & -\frac{14}{15} \\ \frac{16}{15} & -\frac{26}{15} & \frac{184}{105} & \frac{16}{105} \\ \frac{8}{3} & -\frac{14}{15} & \frac{16}{105} & \frac{16}{7}\end{pmatrix}$</p>
<p>I hope these are right. Now I have to find matrices $S \in GL_4(\mathbb{R})$ and $Q \in GL_4(\mathbb{R})$ which satisfy $B = S^t AS$ and $A=Q^tQ$. But I don't have any clue how to find those. Can someone point me into the right direction?</p>
| 0non-cybersec
| Stackexchange |
I'm almost 30, and, despite having practically unlimited opportunities, I have accomplished nothing.. I was born into privilege - my parents are doctors, I went to good schools (public, but in a bougie town), and my parents even paid for college. I got all As and was very involved in extracurriculars, and I graduated with a pretty good resume and couple of job offers.
But since then, I've just been foundering. I've never held a job longer than a year, so I've never had a promotion. I've completely relied on my husband financially. I've never finished a major writing project. I don't think I have the experience to get into any kind of graduate school. My resume is now a total mess of inability to stick with anything. I learned to code, but was never good enough to get a software engineering job (and after a year of teaching myself, I was too depressed to keep trying).
I am finally getting some direction - I've been doing a lot of volunteer work with youth, and going back to community college - but I'm still embarrassed when I look back on my 20s and all I see is that I went from relying on my parents to relying on a man. I've never stood on my own two feet. I'm an embarrassment to women.
It makes me sick that I have been literally handed everything and have nothing to show for it.
Edit: advice is fine, but please no "tough love." I get that I should just do something and be grateful and I'm spoiled brat. I don't need anyone to tell me that. | 0non-cybersec
| Reddit |
Put black garbage bags in the pool for a cheaper heating solution.. | 0non-cybersec
| Reddit |
[USA] My dashcam caught a girl trying to dance inconspicuously while waiting for light to change. Nice to see happy people for a change!. | 0non-cybersec
| Reddit |
For a friend. | 0non-cybersec
| Reddit |
Is randomly picking random numbers more random?. <p>I know that it is impossible to generate truly random numbers on a deterministic device. My question is if I paired multiple pseudo-random number generators (PRNG), would that make the outcome more random. Say device 1 generates 10 numbers and device 2 generates a single number to use as an index to select a number from device 1. What would their total randomness be? Would it be more random? Does randomness add? Like resistors in parallel? In series?</p>
<p>I'm not sure how to define "more random", but I mean it in the sense that people say that some PRNGs are cryptographically secure (CSPRNG) and others are not. What would be the result if device 1 was CSPRNG and device 2 was not? What about the other way around?</p>
<p>My intuition tells me that in this implementation the result couldn't be less random than device 1 and that device 2 might not have any impact (so randomness_device1 + randomness_device2 = randomness_device1).</p>
| 0non-cybersec
| Stackexchange |
Why you shouldn't share links on Facebook. | 1cybersec
| Reddit |
Does anyone here have ancestors that fought in WW2? What were their stories?. | 0non-cybersec
| Reddit |
How to add tags from a UITableView to another UITableView. <p>I have 2 <code>ViewControllers</code> and each ViewController have a <code>UITableView</code>.
In the MainViewController I have few rows and I want to add for each row different Tags from the second ViewController.
My tags are saved in a Dictionary (I don't know if is the best way but I was thinking that maybe I will avoid to append a tag twice using a Dict instead of Array).
The problem is that I don't append correctly the selected tags and I don't know how I should do it.
Here I've created a small project which reflect my issue: <a href="https://github.com/tygruletz/AppendCommentsToCells" rel="nofollow noreferrer">https://github.com/tygruletz/AppendTagsToCells</a></p>
<p>Here is the code for Main VC:</p>
<pre><code>class ChecklistVC: UIViewController {
@IBOutlet weak var questionsTableView: UITableView!
//Properties
lazy var itemSections: [ChecklistItemSection] = {
return ChecklistItemSection.checklistItemSections()
}()
var lastIndexPath: IndexPath!
var selectedIndexPath: IndexPath!
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
questionsTableView.reloadData()
}
}
extension ChecklistVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
let itemCategory = itemSections[section]
return itemCategory.checklistItems.count
}
func numberOfSections(in tableView: UITableView) -> Int {
return itemSections.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "checklistCell", for: indexPath) as! ChecklistCell
let itemCategory = itemSections[indexPath.section]
let item = itemCategory.checklistItems[indexPath.row]
cell.delegate = self
cell.configCell(item)
cell.vehicleCommentLabel.text = item.vehicleComment
cell.trailerCommentLabel.text = item.trailerComment
cell.tagNameLabel.text = item.vehicleTags[indexPath.row]?.name
return cell
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "goChecklistAddComment" {
let addCommentVC = segue.destination as! ChecklistAddCommentVC
addCommentVC.delegate = self
}
if segue.identifier == "goChecklistAddTag" {
let checklistAddTag = segue.destination as! ChecklistAddTagVC
checklistAddTag.indexForSelectedRow = self.selectedIndexPath
checklistAddTag.tagsCallback = { result in
print("result: \(result)")
let item = self.itemSections[self.lastIndexPath.section].checklistItems[self.lastIndexPath.row]
item.vehicleTags = result
}
}
}
}
</code></pre>
<p>Here is the code for Tags ViewController:</p>
<pre><code>class ChecklistAddTagVC: UIViewController {
// Interface Links
@IBOutlet weak var tagsTitleLabel: UILabel!
@IBOutlet weak var tagsTableView: UITableView!
// Properties
var tagsDictionary: [Int: Tag] = [:]
var tagsAdded: [Int:Tag] = [:]
var tagsCallback: (([Int:Tag]) -> ())?
var indexForSelectedRow: IndexPath!
override func viewDidLoad() {
super.viewDidLoad()
tagsTableView.tableFooterView = UIView()
tagsDictionary = [
1: Tag(remoteID: 1, categoryID: 1, name: "Tag1", colour: "red"),
2: Tag(remoteID: 2, categoryID: 1, name: "Tag2", colour: "blue"),
3: Tag(remoteID: 3, categoryID: 1, name: "Tag3", colour: "orange"),
4: Tag(remoteID: 4, categoryID: 1, name: "Tag4", colour: "black")
]
print("Received index for SelectedRow: \(indexForSelectedRow ?? IndexPath())")
}
}
extension ChecklistAddTagVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return tagsDictionary.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "defectAndDamageTagCell", for: indexPath) as! ChecklistAddTagCell
cell.configCell()
cell.delegate = self
cell.tagNameLabel.text = tagsDictionary[indexPath.row + 1]?.name.capitalized
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 60
}
}
extension ChecklistAddTagVC: ChecklistAddTagCellDelegate{
// When the user press Add Tag then will be added in a dictionary and sent to ChecklistVC using a callback closure.
func addTagBtnPressed(button: UIButton, tagLabel: UILabel) {
if button.currentTitle == "+"{
button.setTitle("-", for: UIControl.State.normal)
tagLabel.textColor = UIColor.orange
tagsAdded = [0: Tag(remoteID: 1, categoryID: 1, name: tagLabel.text ?? String(), colour: "red")]
print(tagsAdded[0]?.name ?? String())
tagsCallback?(tagsAdded)
}
else{
button.setTitle("+", for: UIControl.State.normal)
tagLabel.textColor = UIColor.black
tagsAdded.removeValue(forKey: 0)
print(tagsAdded)
tagsCallback?(tagsAdded)
}
}
}
</code></pre>
<p>Here is a capture with my issue:</p>
<p><a href="https://i.stack.imgur.com/gSeL1.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gSeL1.gif" alt="enter image description here"></a></p>
<p>Thank you for reading this !</p>
| 0non-cybersec
| Stackexchange |
NFS4: rpc.idmapd or nfs.idmap upcall?. <p><a href="https://www.kernel.org/doc/Documentation/filesystems/nfs/idmapper.txt" rel="nofollow noreferrer">https://www.kernel.org/doc/Documentation/filesystems/nfs/idmapper.txt</a> states:</p>
<pre><code>The file /etc/request-key.conf will need to be modified so /sbin/request-key can
direct the upcall. The following line should be added:
#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...
#====== ======= =============== =============== ===============================
create id_resolver * * /usr/sbin/nfs.idmap %k %d 600
This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap.
</code></pre>
<p>This entry does not exist in request-key.conf as of Ubuntu 12.04. I have seen several different conflicting reports about this:</p>
<ol>
<li>nfs.idmap upcall is obsolete and rpc.idmapd should be used instead</li>
<li>rpc.idmapd is obsolete and nfs.idmap should be used instead</li>
<li>The kernel automatically juggles between the two (which does it prefer?)</li>
</ol>
<p>Can anyone shed any light on this?</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
Why do finite limits commute with filtered colimits in the category of abelian groups?. <p>I'm reading Borceux - Handbook of categorical algebra 1, p.80-81</p>
<p>There is a proposition I had no problem understanding it: The forgetful functor $U:\textbf{Ab}\rightarrow \textbf{Set}$ preserves and reflects filtered colimits.</p>
<p>However, there appears a corollary right after this proposition that I do not understand why it follows from the above proposition. That is, "In $\textbf{Ab}$, finite limits commute with filtered colimits". How does this follow from the preceding proposition?</p>
<p>Let $\mathscr{C}$ be a small filtered category and $\mathscr{D}$ be a finite category and $F:\mathscr{C}\times \mathscr{D}\rightarrow \textbf{Ab}$ be a covariant functor.
I know that $U$ preserves limits and filtered colimits, and filtered colimits commute with finite limits in $\textbf{Set}$.</p>
<p>Hence, we have the identifications as below:</p>
<p>$U(colim_C (lim_D F(C,D)))\cong colim_C(U(lim_D(F(C,D)))\cong colim_C(lim_D( U\circ F (C,D))) \cong lim_D(colim_C(U\circ F(C,D)))\cong lim_D(U(colim_C F(C,D)))\cong U(lim_D(colim_C F(C,D)))$.</p>
<p>However, this does not imply that $colim_C (lim_D F(C,D))\cong lim_D (colim_C F(C,D))$. How do I prove the corollary from the given proposition?</p>
| 0non-cybersec
| Stackexchange |
Do Fluent conventions break lazy loading? (uNhAddIns). <p>I have a simple entity class in a WPF application that essentially looks like this:</p>
<pre><code>public class Customer : MyBaseEntityClass
{
private IList<Order> _Orders;
public virtual IList<Order> Orders
{
get { return this._Orders; }
set {this._Orders = new ObservableCollection<Order>(value);}
}
}
</code></pre>
<p>I'm also using the Fluent automapper in an offline utility to create an NHibernate config file which is then loaded at runtime. This all works fine but there's an obvious performance hit due to the fact that I'm not passing the original collection back to NHibernate, so I'm trying to add a convention to get NHibernate to create the collection for me:</p>
<pre><code>public class ObservableListConvention : ICollectionConvention
{
public void Apply(ICollectionInstance instance)
{
Type collectionType =
typeof(uNhAddIns.WPF.Collections.Types.ObservableListType<>)
.MakeGenericType(instance.ChildType);
instance.CollectionType(collectionType);
}
}
</code></pre>
<p>As you can see I'm using one of the uNhAddIns collections which I understand is supposed to provide support for both the convention and INotification changes, but for some reason doing this seems to break lazy-loading. If I load a custom record like this...</p>
<pre><code>var result = this.Session.Get<Customer>(id);
</code></pre>
<p>...then the Orders field does get assigned an instance of type PersistentObservableGenericList but its EntityId and EntityName fields are null, and attempting to expand the orders results in the dreaded "illegal access to loading collection" message.</p>
<p>Can anyone tell me what I'm doing wrong and/or what I need to do to get this to work? Am I correct is assuming that the original proxy object (which normally contains the Customer ID needed to lazy-load the Orders member) is being replaced by the uNhAddIns collection item which isn't tracking the correct object?</p>
<p>UPDATE: I have created <a href="http://www.ppl-pilot.com/files/NHibernateTest.zip">a test project demonstrating this issue</a>, it doesn't reference the uNhAddins project directly but the collection classes have been added manually. It should be pretty straightforward how it works but basically it creates a database from the domain, adds a record with a child list and then tries to load it back into another session using the collection class as the implementation for the child list. An assert is thrown due to lazy-loading failing.</p>
| 0non-cybersec
| Stackexchange |
Create domain user offline. <p>Can I add domain users to a database, when Sql Server <strong>A</strong> (the <em>development</em> server) is not part of the domain and has absolutely no access to the domain?</p>
<p>The domain users are of course not expected to work on server <strong>A</strong>, but these users are already configured on Sql Server <strong>B</strong>, the <em>production</em> sql server. </p>
<p>When a backup is taken on the <em>development</em> server <strong>A</strong> and deployed on the <em>production</em> server <strong>B</strong>, currently these users have to be re-added to the database on server <strong>B</strong>.</p>
<p>(The users do not have sysadmin rights on server B. As far as I know, if they had sysadmin rights, they would automatically have rights to access any new databases anyway)</p>
<p>Is it somehow possible to <code>CREATE USER domain\xy</code> on <em>development</em> server <strong>A</strong>, so that they will work when restoring a backup on the <em>production</em> server <strong>B</strong>?</p>
<p>Or as a workaround, could I take a blank database backup with only the users from server <strong>B</strong>, and then use that backup as a base to create new databases on server <strong>A</strong>?</p>
| 0non-cybersec
| Stackexchange |
Windows, Apache and MSSQL Authentication. <p>I have a create database script written in perl. I remember it working just fine another machine. A couple years later using a Vista machine I am trying to use it again and it keeps failing. </p>
<p>The main difference is that now I am using Apache instead of IIS. In the script the <code>IUSR</code> account is granted permissions as it needs to write to the database as a part of another program. IIS has been uninstalled on this machine but the <code>IUSR</code> account still exists. </p>
<p>The <code>NT AUTHORITY\IUSR</code> is also seen in the logins drop down in MSSQL(2012). The machine is running Vista Home Edition. However when running the script I get errors that say that <code>NT AUTHORITY\IUSR</code> cannot be found. </p>
<p>I tried also with <code>COMPUTERNAME\IUSR</code> just for the heck of it and of course it was not found. I also tried with <code>IUSR</code> alone and for some reason the user isn't being "found"?</p>
<p>Any ideas?</p>
| 0non-cybersec
| Stackexchange |
Ubuntu studio/xubuntu 12.04 instead of Ubuntu 12.04/12.10 for CAD/ arhcitectural workflow. Worth it?. <p>I am currently using Ubuntu 12.10. So, as described in the title I am planning to install Ubuntu studio. The programs i use are Blender, Maya 2013, NukeX, Bricscad, Sketchup (with wine) and also i am planning to install revit architecture through VirtualBox. Well, I am using a quad-core CPU and i want to have all the power of my system for rendering/modelling. So, i decided to try a more lightweight desktop than unity.
Also, what made me to decide this, is that when i tried to install Bricscad v12 the program does not work. So, i thought that if i want something more professional for my work i should have only LTS versions of lightweight Ubuntu.</p>
<p>So, my 2 questions are :1) Worth it?
2) Can i have global menu(close,minimize,maximize buttons, menu) like ubuntu/unity?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
Gmail Customer Care Support Service Number. | 0non-cybersec
| Reddit |
[US] The Accountant of Auschwitz (2018) Documentary about the trial of a 93 year old SS Officer and the history of legal proceedings against Nazis in Germany. | 0non-cybersec
| Reddit |
Long before color-sensitive films were invented, Russian photographer Prokudin-Gorsky used to take 3 individual black-and-white photos, each with a filter (Red, Green, Blue) to create high-quality pictures in full color. This self portrait of him is 107 years old!. | 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 |
Computing the matrix of the linear map $X\rightsquigarrow AXA^t$, where $A=\left[\begin{smallmatrix}2&1\\0&1\end{smallmatrix}\right]$. <blockquote>
<p>Let $V$ be the vector space of real $2\times 2$ symmetric matrices
$X=\begin{bmatrix}x&y\\y&z\end{bmatrix}$ and let
$A=\begin{bmatrix}2&1\\0&1\end{bmatrix}$. Determine the matrix of the
linear operator on $V$ defined by $X\rightsquigarrow AXA^t$ with
respect to a suitable basis.</p>
</blockquote>
<p>So far, I got $AXA^t=\begin{bmatrix}4x+4y+z&2y+z\\2y+z&z\end{bmatrix}$</p>
<p>I need to find a matrix $C$ such that $CX=AXA^t$, but not find $C$. Am I doing anything wrong. Please someone tell me what is wrong here.</p>
| 0non-cybersec
| Stackexchange |
Build a Twitch.tv Chat Bot in 10 minutes with Node.js. http://youtu.be/K6N9dSMb7sM | 0non-cybersec
| Reddit |
Window manager freezes when triggering Exposé on macOS Sierra?. <p>On my MacBook Pro (Early 2015), I've been struggling with a problem since I upgraded to Sierra.</p>
<p>I don't use Exposé very often, but some times, when I trigger it accidentally with a swipe on the trackpad, it freezes the window manager.</p>
<p>What happens is that the windows start moving inwards (like they do for Exposé) for a beat, but then stops again almost immediately. And after that, the window manager appears to be frozen. I can't bring up any menus, get the “Force Quit” window to appear or change active windows. I can bring up the Cmd-Tab switcher and select a different window, but doing so does nothing – the app that had focus keeps focus, and the windows stay as they were. I can open Siri or Alfred via keyboard shortcuts, but neither receives keyboard focus or reacts to the mouse. I can talk to Siri, but since she can't log me out or kill a process or something like that, that's also useless.</p>
<p>I've only found two ways out of this problem. One is to do a hard reboot (which I'm not fond of), and the other is to SSH in from another machine and do a “sudo killall Dock”, which does alleviate the issue, but requires some logistics.</p>
<p>Any suggestions on how I can stop these freezes, or at least get easier out of them?</p>
| 0non-cybersec
| Stackexchange |
Left most Digits of $5^n$. <p>Prove that for every integer <span class="math-container">$m$</span> there is an integer <span class="math-container">$n$</span> such that the digits of <span class="math-container">$5^n$</span> start with <span class="math-container">$m$</span> (left most digits). For example for <span class="math-container">$m=156$</span>, <span class="math-container">$n=6$</span> is the solution, because <span class="math-container">$5^6 = \color{red}{156}25$</span>.
I put a lot of thinking into it and I didn't even find a way to handle it.</p>
| 0non-cybersec
| Stackexchange |
How to remove extra line space on GitHub markdown bullets/lists?. <p>The GitHub markdown code:</p>
<pre><code>1. First item
* subitem
1. Second item
</code></pre>
<p>Generates a big space between the <code>First</code>, <code>Second</code> and the <code>subitem</code>:</p>
<p><a href="https://i.stack.imgur.com/RskTi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RskTi.png" alt="enter image description here"></a></p>
<p>How to make the <code>subitem</code> close to the first item, instead of exactly on the middle of them?</p>
<p>This is a Photoshop I did to illustrate the correct output:</p>
<p><a href="https://i.stack.imgur.com/eY9Hd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eY9Hd.png" alt="enter image description here"></a></p>
<hr>
<p>Related questions:</p>
<ol>
<li><a href="https://meta.stackexchange.com/questions/192894/multi-paragraph-list-items-or-preventing-numbered-list-auto-formatting">Multi paragraph list items, OR preventing numbered list auto formatting</a></li>
<li><a href="https://stackoverflow.com/questions/19037311/markdown-problems-with-numbered-list-paragraphs-containing-code-element">Markdown: Problems with numbered list paragraphs containing code element</a></li>
</ol>
| 0non-cybersec
| Stackexchange |
El Capitan causing built-in trackpad and keyboard to freeze intermittently. <p>I have a MacBook Pro 15" Early 2008, 2x 2GB RAM. Since upgrading to El Capitan including update 10.11.1 the built-in keyboard and multitouch trackpad freeze intermittently for about 4 seconds randomly at least once every 60 seconds. Booting from an external drive with Yosemite or Mountain Lion doesn't exhibit this issue so the hardware is fine. Using a bluetooth Magic Trackpad in El Capitan also works fine. I've reset PRAM and SMC. If I don't type or touch the built-in trackpad, interacting using only the Magic Trackpad then there are no stalls and no Console error messages but when using the built-ins at random intervals at least once every 60 seconds the keyboard pauses and loses all keystrokes entered during the interval, and the pointer freezes then eventually snaps to a new location. So, the system is unusable with El Capitan. </p>
<ul>
<li><p>Have reinstalled El Capitan 10.11.1 twice after reformatting the internal HD. Disk Utility reports no problems with the drive. </p>
<p>No third party software, hardware or kernel extensions are installed,
either at the system or user level - LaunchAgents & LaunchDaemons are
empty. </p>
<p>The only Login Item is iTunesHelper (unchecked). This appears to be the default.</p>
<p>It's a pure, plain and simple default Apple install onto the
reformatted OEM internal HD. </p>
<p>Interestingly this issue even occurs when booting the 10.11 Recovery
environment, and during the El Capitan installer.</p></li>
</ul>
<p>Running in normal user mode with the Console open displays the following messages every time a freeze occurs, which you can deduce is filling up this log:</p>
<pre><code>11/1/15 7:57:04.000 PM kernel[0]: AppleUSBMultitouchDriver::_deviceGetReport - DeviceRequest returned error 0xe00002cd (interface 0, reportID 0x0)
11/1/15 7:57:04.000 PM kernel[0]: AppleUSBMultitouchDriver::handleSuspend - SuspendPort returned error 0xe00002e2.
11/1/15 7:57:06.000 PM kernel[0]: AppleUSBMultitouchDriver::handleReport - not in path binary mode, received 0x44 data packet of length 54
11/1/15 7:57:20.000 PM kernel[0]: USBF: 7969.165 IOUSBHIDDriver(AppleUSBMultitouchDriverNoShim)::RearmInterruptRead returning error 0xe00002d8 (device is not ready), not issuing any reads to device
</code></pre>
<p>Any suggestions on what else to try or investigate to debug this? It's as if the Apple native IOUSBHID or multitouch driver shipping with El Capitan is incompatible with this (aka my) older MBP. If it didn't still work fine when booting with the earlier OS versions I'd think it was faulty hardware.</p>
| 0non-cybersec
| Stackexchange |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.