text
stringlengths 36
35k
| label
class label 2
classes | source
stringclasses 3
values | tokens_length
int64 128
4.1k
| text_length
int64 36
35k
|
|---|---|---|---|---|
Turn off tracking in entity framework model first. <p>I'm tring to receive an entity and then update it, but I want to get it with no tracking, so I can attach it back to the context.</p>
<p>I have the <code>EntityFramework.dll</code> referenced (4.1). I generated the database from the model. (not code-first).</p>
<p>Get user:</p>
<pre><code>db.Users.MergeOption = MergeOption.NoTracking;
IQueryable<User> query = db.Users;//.AsNoTracking(); //<-- apparently, this is code-first only.
return query;
</code></pre>
<p>Update user:</p>
<pre><code>db.Users.Attach(user); //error here.
ObjectStateEntry entry = db.ObjectStateManager.GetObjectStateEntry(user);
entry.SetModifiedProperty(propertyName);
db.SaveChanges();
return user;
</code></pre>
<p>Error:</p>
<blockquote>
<p>An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key.</p>
</blockquote>
<p>I call the method like this:</p>
<pre><code>var user = userRepository.GetUsers().FirstOrDefault(u => u.UserId == userId);
user.Identifiers.Add(someIdent);
userRepository.UpdateUser(user);
</code></pre>
| 0non-cybersec
|
Stackexchange
| 373
| 1,162
|
Is it possible to store python objects (specifically sklearn models) in memory mapped files?. <p>I have several large objects (sklearn models) that take up a lot of memory, and I want to share them between several process.
is there a way to do this?</p>
<ul>
<li>It has to be the "live" object, and not a serialized version</li>
<li>I know that there's a memory mapped version of numpy array, which are responsible for a significant part of the model memory - but using them will require significant changes to the sklearn source code, which would be hard to maintain </li>
</ul>
| 0non-cybersec
|
Stackexchange
| 148
| 582
|
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
| 349
| 1,234
|
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
| 349
| 1,234
|
I'm having a laproscopic cystectomy next week, and frankly I'm terrified.. Never-used account because can't make a throwaway via mobile for some reason....
Anyway, I have a 6cm cyst in my left ovary. I am going under the knife next week and would love to hear from any PCOS ladies that have had the procedure.
I haven't had surgery since getting my tonsils out when I was twelve, so even though I am having an outpatient procedure it's extremely scary for me. I know this surgery is pretty common and routine though, so maybe twoX can help...
Specifically:
- how much did your surgery cost?
- what should I expect afterwards?
- is there anything I should know that you wish you knew, before, day of, or after?
| 0non-cybersec
|
Reddit
| 171
| 712
|
Allow web users to write files into folder. <p>I have a web site running on Ubuntu server with Nginx installed and I made profile picture upload in Django. However when I try to upload a new profile picture it says</p>
<blockquote>
<p>[Errno 13] Permission denied:
'/home/xyz/djangodir/media/profile_pics/profilepicxyz.png'</p>
</blockquote>
<p>How can I allow users to write new files into the <code>/profile_pics</code> folder?</p>
<p>I am a beginner in Ubuntu and Nginx, so it might be a really easy solution.</p>
<p>My intuition is that it will be done using <code>chmod</code> or <code>chown</code> commands. </p>
| 0non-cybersec
|
Stackexchange
| 195
| 627
|
How to make it blindingly obvious which window is active. <p>I use keyboard shortcuts rather heavily. I have a dual monitor setup. I also have virtuawin so I can switch between desktops.</p>
<p>The result of all this is that sometimes I will start using keyboard shortcuts in the wrong window. This can have disastrous effects. For example, what if I think I'm in firefox and use Ctrl-L to go to the location bar, but instead I end up deleting a line in Visual Studio 2008 (without noticing it?!). This could be very, very bad.</p>
<p>Is there a way that I can make it blindingly obvious which window is active? For example, could I find some tool which will gray out any inactive windows?</p>
<p>I would be willing to use autohotkey or a variety of other advanced tools to set up a solution.</p>
<p>Thanks.</p>
| 0non-cybersec
|
Stackexchange
| 219
| 822
|
How to recover forgotten remote windows RDP password?. <p>I had found this example: <a href="http://www.nirsoft.net/utils/remote_desktop_password.html" rel="noreferrer">http://www.nirsoft.net/utils/remote_desktop_password.html</a></p>
<p>But it turns out it doesn't seem to work with the "newer" RDP save files.</p>
<p>Anybody have any tips to retrieve my lost RDP password?'</p>
<p>If I could simply change the ip address and use the same (hidden) login information for this one RDP file I would be saved! :S</p>
| 0non-cybersec
|
Stackexchange
| 163
| 517
|
Welcome page in Visual Studio Code How to get it. <p>I just downloaded <a href="https://code.visualstudio.com/" rel="noreferrer">Visual Studio Code</a> and started playing with it. </p>
<p>The you tube <a href="https://youtu.be/DmbvejtiyNo?t=133" rel="noreferrer">video here</a> recommends Quick Tour Videos. </p>
<p>So the question is how can I see the welcome page on Visual Studio code. When ever I open now, I am not seeing it. Probably when you open for the first time, you are shown this. But once you close that how do I reopen it?</p>
| 0non-cybersec
|
Stackexchange
| 167
| 545
|
Terminal not working, resource unavailable. <p>I had a terminal session open and after I woke my laptop up I cannot use the terminal nor create new sessions.</p>
<p>The error I get on the opened session is:</p>
<pre><code>-bash: fork: Resource temporary unavailable
</code></pre>
<p>The error when trying to open new terminal:</p>
<pre><code>[forkpty: Resource temporary unavailable]
[Could not create a new process and open a pseudo-tty.]
</code></pre>
<p>Looking deeper, I was able to open the <em>Activity Monitor</em> and I found that there was a very large number (thousands) of processes linked to the same application, <code>VShildScanner</code>. From here, I wasn't able to kill those processes. </p>
<p>I tried to restart or shutdown the system, since I wasn't able to do anything else, but those also failed. I was only able to power cycle.</p>
<p>My thought was to run a <code>killall</code> from the terminal but I can not get a functioning shell / terminal window once the system is blocked. </p>
<p>Are there better ways to handle such a situation when processes grow out of proportions?</p>
| 0non-cybersec
|
Stackexchange
| 304
| 1,115
|
A question about numbers. <p>Let $n=p_1^{\alpha_1}\cdots p_r^{\alpha_r}$ be the prime decomposition of the integer $n$. Define $$n' = n \sum_{i=1}^r \frac{\alpha_i}{p_i}\quad\text{and}\quad\Omega(n) = \sum_{i=1}^r \alpha_i\quad\text{and}\quad\omega(n) = r.$$ Let $a,b$ be relatively prime, i.e., $\gcd(a,b)=1$, and let $c = a+b$. Suppose that $$\Omega(c) = \min\bigl\{\Omega(a),\Omega(b),\Omega(c)\bigr\}.$$ Is it true that $$\Omega(\gcd(a,a'))+\Omega(\gcd(b,b'))+\Omega(\gcd(c,c')) \le \Omega(ab)-1?$$ From this it would follow that
$$\min\bigl\{\Omega(a),\Omega(b),\Omega(c)\bigr\} \le \omega(abc) - 1.$$</p>
<p>Edit: From the answer given by Kevin Buzzard, one can see, that the first inequality is wrong. It is unclear to me however, if the second inequality is also wrong.</p>
| 0non-cybersec
|
Stackexchange
| 296
| 784
|
Find the value of $W(y_1,y_2)(5)$.. <p>I have to solve the following exercise:</p>
<p>If $y_1$ and $y_2$ are linearly independent solutions of $ty'' + 2y' + te^ty = 0$ and if $W(y_1,y_2)(1) = 2$, find the value of $W(y_1,y_2)(5)$.
($W(y_1,y_2)(t_0)$ denotes the value of the Wronskian at $t = t_0$.)</p>
<p>I know that if $y_1$ and $y_2$ are linearly independent solutions of $$y'' + p(t)y' + q(t)y = 0$$ then the Wronskian is given by $W(y_1,y_2)(t_0) = c\exp[-\int p(t)dt]$. So I think I need to rewrite the original differential equation such that $y''$ has a coefficient of $1$. </p>
<p>Since I can't think of a way to do that now, I looked at the regular expression of the Wronskian: $W(y_1,y_2)(1) = y_1(1)y_2'(1) - y_1'(1)y_2(1) =2$. I tried to find more about this expression by looking at the differential equation at $t = 1$; $y''+ 2y' + ey = 0$, but this doesn't really get me anywhere either. </p>
<p>So my question is: How do I find the value of $W(y_1,y_2)(5)$?</p>
| 0non-cybersec
|
Stackexchange
| 400
| 985
|
Setting up SVN server on Windows 7. <h1>Short</h1>
<p>My OS is: Windows 7 Ultimate and IDE is Netbeans. Want to work with 2-3 devs on PHP projects. After research I found that it's possible with GIT. Found <a href="http://gitstack.com/" rel="nofollow noreferrer">this</a> solution. But it's installing apache server. (I don't need any web server: I already have one - IIS7)</p>
<h1>Question</h1>
<p>Is there any free solution (I mean not only GIT, maybe something else) that will work with Netbeans and allows to work with group of developers?</p>
<h1>Detailed</h1>
<p>I told with some devs. They suggested to use Github or BitBucket instead of running own git server. <strong>But</strong> </p>
<ul>
<li><p>first off, Github doesn't allow private projects for free, bitbucket allows but limited users.</p></li>
<li><p>second off, what if my project is confidential, and I don't want to
upload it to any public project server?</p>
<p>I want to find some solution that will work ONLY for small dev group. So want to serve my own repo.</p></li>
</ul>
<p>Some of hirep guys suggested, to install tortoisesvn. But how to give access to other users over internet to repo created by Tortoise?</p>
<p>Any suggestions? </p>
<p>Thx in advance.</p>
| 0non-cybersec
|
Stackexchange
| 386
| 1,248
|
PHP get URI parts of URL. <p>I have 2 strings and substitute them, so I get just URI parts.</p>
<pre><code>$base_url = 'http://localhost/project/';
$url = 'http://localhost/project/controller/action/param1/param2';
</code></pre>
<p>I am checking for URI parts.</p>
<pre><code>$only_segments = str_replace($base_url, '', $real_url);
</code></pre>
<p>Basicly I do: <code>{url} - {base_url} = {only_segments}</code></p>
<p>Then I can get segments: </p>
<pre><code>$parts = explode('/', $only_segments);
print_r($parts);
</code></pre>
<p><strong>Question:</strong></p>
<p>Am I on right path or can it be done easier with <strong>$_SERVER['REQUEST_URI']</strong> ?</p>
<p><em>Note: I don't want <code>project</code> in URI parts, it is sub-folder of localhost.</em></p>
| 0non-cybersec
|
Stackexchange
| 283
| 779
|
how to make use of t' in tx = Ax vs general case. <p><a href="https://i.stack.imgur.com/sxW7S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sxW7S.png" alt="Q1"></a></p>
<p>I ran into this problem on my differential equations homework set. Previously, the questions were in the form x' = Ax, and they were relatively straight forward and easy to complete.</p>
<p>I was gifted a hint that this problem revolves around variable coefficients.</p>
<p>I'm uncertain how to approach this problem.</p>
<p>My guess is we work backwards from the eigenvalue, to acquire r. And we can get the equations in terms of those variables? Thank you</p>
| 0non-cybersec
|
Stackexchange
| 198
| 663
|
Why is git not using identity set in ssh config file?. <p>I am trying to connect to my local <a href="https://gitea.io/en-us/" rel="nofollow noreferrer">Gitea</a> server. I have set it up to use the integrated SSH server on port 2222. I am running Windows. Gitea is running fine.</p>
<p>Now I want to connect using <a href="https://cygwin.com/git.html" rel="nofollow noreferrer">Cygwin's git</a>. For testing the connection to my repository I am using the <a href="https://superuser.com/a/833286/374087">ls-remote</a> command which works fine if I use the <a href="https://git-scm.com/docs/git#git-codeGITSSHCOMMANDcode" rel="nofollow noreferrer"><code>GIT_SSH_COMMAND</code></a> option like this:</p>
<pre><code>GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa" git ls-remote --exit-code -h ssh://username@localhost:2222/username/Repo.git
</code></pre>
<p>Next I want to simplify life using <code>~/.ssh/config</code>:</p>
<pre><code>host gitea
HostName localhost
Port 2222
IdentityFile ~/.ssh/id_rsa
User username
</code></pre>
<p>However, this does fail with error <code>Unable to open connection</code>:</p>
<pre><code>git ls-remote --exit-code -h ssh://gitea/username/Repo.git
</code></pre>
<p>Problem: <code>IdentityFile</code> is not applied. This works:</p>
<pre><code>GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa" git ls-remote --exit-code -h ssh://gitea/username/Repo.git
</code></pre>
<p>I am certain though, that my <code>~/.ssh/config</code> is correct, because connecting via directly <code>ssh -vv gitea</code> works. Output (extract):</p>
<pre><code>[...]
debug1: Connecting to localhost [::1] port 2222.
debug1: Connection established.
[...]
debug1: Offering public key: RSA SHA256:XXX /home/username/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug2: input_userauth_pk_ok: fp SHA256:XXX
debug1: Authentication succeeded (publickey).
Authenticated to localhost ([::1]:2222).
[...]
</code></pre>
<p>So why is <code>git</code> not using <code>IdentityFile</code> from <code>~/.ssh/config</code>?</p>
| 0non-cybersec
|
Stackexchange
| 736
| 2,083
|
Bootable Usb Thumb Drive. <p>I have a 'gotcha' type question. I want to make a Kali Linux bootable usb thumb drive on Mac. What would happen if I take it out after I boot into Kali? The reason I ask is because my wifi adapter I use for injection takes up 2 usb ports on my Mac! This means if I live boot and have to keep the usb plugged up, I wont be able to plug up my wifi adapter to use monitor mode because my mac only has 2 usb ports. I asked this question before and someone suggested a <code>permanent install</code>. After a google the term that came up was <code>dual boot</code>. Is this the answer I am looking for?</p>
| 0non-cybersec
|
Stackexchange
| 163
| 631
|
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
| 349
| 1,234
|
confused in the term "closed" in closed subgroup. <p>well, In Brian C Halls Book, I am not getting the definition of Matrix Lie group,
as he says : A matrix Lie Group is any subgroup $G$ of $GL_n(\mathbb{C})$ with the following property: If $A_m$ is any sequence of matrix in $G$ and and $A_m$ converges to $A$ then either $A\in G$ or $A$ is not invertible.
well, That may happen true, but after that page he gave an example of a subgroupof $GL_n(\mathbb{C})$ which is not closed hence not a matrix lie group!
could any one tell me clearly what is the definition?</p>
| 0non-cybersec
|
Stackexchange
| 174
| 582
|
philosophy statistics identity null hypothesis. <p>Many companies are experimenting with “flex-time,” allowing employees to choose their schedules with broad limits set by management. Among other things, flex-time is supposed to reduce absenteeism. </p>
<p>One firm knows that in the past few years, employees have averaged 6.3 days off from work (apart from vacations). This year the firm introduces flex-time. Management chooses a simple random sample of 100 employees to follow in detail, and at the end of the year, these employees average 5.5 days off from work, and the standard deviation is 2.9 days. </p>
<p>What is the null hypothesis? </p>
<p>(A) The average days off work for the employees in the sample is different from the average days off work for the employees overall.</p>
<p>(B) The average days off work for the employees in the sample is the same as the average days off work for the employees overall.</p>
<p>I think it would be B but I am not sure. I do not really understand null hypothesis. Would it be the contrary of what he is trying to prove?</p>
| 0non-cybersec
|
Stackexchange
| 264
| 1,080
|
How could I sort the coordinates according to the serpentine in the image?. <p>In this following binary image,</p>
<p><a href="https://i.stack.imgur.com/7QE0s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7QE0s.png" alt="enter image description here"></a></p>
<p>I have been able to get the <em>list of coordinates</em> where the value is 1.</p>
<p>The coordinates are stored from <em>left to right</em>.</p>
<p><strong>Question:</strong> <em>How could I sort the list of coordinates in such a way that they come one after the other and they follow the path of this serpentine?</em></p>
<p><strong><em>Source Code:</em></strong></p>
<pre><code>from __future__ import division
import numpy as np
import cv2
from skimage.morphology import skeletonize, skeletonize_3d, medial_axis
diff = cv2.imread('img.png', 0)
diff = diff.astype('uint8')
ret, thresh = cv2.threshold(diff, 1, 255, cv2.THRESH_BINARY)
thresh = cv2.dilate(thresh, None, iterations = 1)
sk = skeletonize_3d(thresh)
pixels = np.argwhere(sk==255)
pixels = np.asarray(pixels)
y = pixels[:,0]
x = pixels[:,1]
L = (x, y) # Question: How can I sort L?
np.savetxt("C:/test.csv", np.c_[L], delimiter = ',', fmt='%f')
</code></pre>
<p>Any idea how I could possibly go about with this and sort L according to the serpentine?</p>
| 0non-cybersec
|
Stackexchange
| 467
| 1,316
|
jQuery: get each element's width and sum them up. <p>How can I get each element's width and sum them up?</p>
<p>For instance, here is the HTML:</p>
<pre><code><div id="container">
<div class="block-item" style="width:10px"></div>
<div class="block-item" style="width:50px"></div>
<div class="block-item" style="width:90px"></div>
<div>
</code></pre>
<p>I can think of looping through each element, but how do I sum the numbers up?</p>
<pre><code>$('.block-item').each(function(index) {
alert($(this).width());
});
</code></pre>
<p>I want to get the total number of <code>150 (10 + 50 + 90)</code>.</p>
<p>Thanks.</p>
| 0non-cybersec
|
Stackexchange
| 265
| 679
|
Standard AES vs additional parameters with Rijndael - what is more secure?. <p>I know that Rijndael and AES are pretty similar and AES is just a subset of Rijndael, and I have read that Rijndael can have 256 bit blocks while AES has "only" 128 bit blocks.</p>
<p>The problem is that I have no real idea of cryptography my question is what is more secure? Is "standard AES" more secure or some of the tweaked options using Rijndael? Right now I am using <code>MCRYPT_RIJNDAEL_256</code> in PHP which is (as far as I can tell) Rijndael with 256 bit block and key size while AES-256 has 256bit key but "just" 128 bit blocks.</p>
<ol>
<li><p>The point is in the end whether to use AES or Rijndael?</p></li>
<li><p>Also what mode would be best for security/performance? Right now I have ECB since that was used in a tutorial at that time.</p></li>
<li><p>Is there another algorithm that is even more secure? It should be fast, since I am doing a lot of crypto stuff using it, but still stay secure.</p></li>
</ol>
| 0non-cybersec
|
Stackexchange
| 296
| 1,012
|
Secure Open Source?. <p>I want to make a delicate application of mine (an antivirus actually) open source but I want to have a control on who really obtains the source or not. Preferably they should apply and I or administrators approve their applications. Is there any online platform for this?</p>
<p>The main reason for the control/security is to possibly prevent malware makers to easily discover how to bypass the stealth checking methods it utilizes for malware detection. </p>
<p>Edit: I am looking for advice - possibly to hear from someone who has done something similar.</p>
<p>Thanks!</p>
| 0non-cybersec
|
Stackexchange
| 142
| 603
|
Gmail conversation view but how do I prevent it for a specific email?. <p>Say I have a CRM system which sends 20 emails to a single gmail account. </p>
<p>When sent all 20 emails come to Gmail inbox as a "Conversation" since they are coming from a single email. </p>
<p>I can switch off conversation view in Gmail settings to prevent this from happening. </p>
<p>But how do I do it so say if I sent 20 emails at once from my CRM systems email (e.g: [email protected] they get delivered separately but without SWITCHING OFF the conversation view. So it works for other emails but not the CRM systems email.</p>
| 0non-cybersec
|
Stackexchange
| 166
| 618
|
Networking Mac and PC - Firewall Issue?. <p>Here's the scenario:</p>
<p>Work network - I have a Mac and a PC - OS X is Snow Leopard - Windows 7</p>
<p>I am trying to connect to the PC from the Mac. IT ONLY works if I turn off the firewall in Windows.</p>
<p>I tried to trace the port and connection it was using, it appears to be on port 445 via TCP.</p>
<p>I really prefer not to leave this open, or is it OK?</p>
<p>How can I only allow this connection while still leaving the firewall on?</p>
| 0non-cybersec
|
Stackexchange
| 155
| 501
|
can't resolve local domain name with bind9. <p>I'm in the process of replacing my Windows server by an Ubuntu server. I've been at it for a week now and i'm making significant progress. However i'm stuck on this particular issue. I have a feeling i'm missing something obvious since it looks pretty simple, but i should point out i'm a total Linux beginner, and DNS configuration isn't my strong suit either. </p>
<p>Anyway, here is my issue :</p>
<p>I have a local webserver in need on local dns resolution, so i installed bind9 and configured it as best as i could. Right now, it's resolving the FQDN of my server (<strong>srvubuntu.domain.local</strong>) but not the domain name (<strong>domain.local</strong>). I guess something (not much) is missing in my config.</p>
<p>here are my config files :</p>
<p><strong>/etc/bind/named.conf.local</strong></p>
<pre><code>//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "domain.local" {
type master;
file "/etc/bind/db.domain.local";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.1.168.192.in-addr.arpa";
};
</code></pre>
<p><strong>/etc/bind/db.domain.local</strong></p>
<pre><code>$TTL 10800
@ IN SOA srvubuntu.domain.local. root.domain.local. (
20180202;
3h;
1;
1w;
1h);
@ IN NS srvubuntu.domain.local.
srvubuntu IN A 192.168.1.251
</code></pre>
<p><strong>/etc/bind/db.1.168.192.in-addr.arpa</strong></p>
<pre><code>$TTL 10800
$ORIGIN 1.168.192.in-addr.arpa.
@ IN SOA srvubuntu.domain.local. root.domain.local. (
20180202;
3h;
1h;
1w;
1h);
@ IN NS srvubuntu.domain.local.
251 IN PTR srvubuntu.domain.local.
</code></pre>
<p>Can someone point me to my mistake(s) ?</p>
| 0non-cybersec
|
Stackexchange
| 643
| 1,925
|
A,B,C and D vertices of a rectangle if we define a function in this region as product of the distance from $z$ to points show max f at the sides. <p><span class="math-container">$A,B,C$</span> and <span class="math-container">$C$</span> vertices of a rectangle on the plane we define a function on the region enclosed by the rectangle by <span class="math-container">$f(z)= |z-A||z-B||z-C||z-D|$</span> prove that the maximum value of <span class="math-container">$f$</span> attained on the boundary.
I know I need to use the maximum modulus theorem but how to prove that <span class="math-container">$f$</span> is holomorphic? Or is there any other way to prove that? Any hints? </p>
| 0non-cybersec
|
Stackexchange
| 202
| 686
|
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
| 349
| 1,234
|
Create parts of DSL as Quickfix from xtext grammar. <p>I currently experimenting with DSLs with xtext. I want to implement a quick fix for the dsl I'm writing and I'm wondering, if there is a possibility in xtext or xtend hook (or something else) to generate a dsl fragment code from the DSL grammar and a given Ecore node.</p>
<p>For example </p>
<pre><code>Model:
entities+=Entity*;
Entity:
'entity' name = ID ('extends' superType=[Entity])? '{'
attributes += Attribute*
'}';
</code></pre>
<p>I validate that the Supertype may not exist, and I want to suggest a Quickfix (Ctrl+1) to create a new Entity. I know how to do the validation part and know where to implement the quickfix. But since the DSL is in development i do not want to write two code generators (one for creating DSL code, and the second for the code derived from the model) since the DSL is subject to change. I guess, that there could be a more general solution, since the grammar is known, because of the xtext grammar definition and the Ecore node I want to create, whose name I know from the validator. I also guess I am not the only one providing such a "feature" and thus I assume there is already a solution which i did not found yet.</p>
<p>My Question, is there a generic way in xtext/xtend building an ecore node or AST and serialize that AST back into xtext based DSL using the xtext grammar?</p>
| 0non-cybersec
|
Stackexchange
| 368
| 1,400
|
Scared of the "L-word". My apology in advance as English is not my first language please bear with me, and thank you.
I am unsure of how to proceed and Valentine's Day is just around the corner.
My GirlFriend (29F) and I (29M) have first met in August and things have been going very well. However I have some reluctance concerning Valentine's Day. Neither of us have said that we love eachother yet in the relationship, and I am wondering if that would be a good time to do it on Valentine's Day. My hesitation is that in the past it has been very easy for me to know when it is apporpritate to say this but with this relationship, I am very worried that I may be moving too "fast" for her by saying it and I do not want to end things as she is very special girl to me.
Is it worth my chance to say on Valentine's Day? Do you think she is wait for me to say it?
​
Thank you again Victor
| 0non-cybersec
|
Reddit
| 227
| 899
|
Is this definition of diagonal matrix correct?. <p>I need to know if the following definition:</p>
<blockquote>
<p>Let $A:=\|a_{i,j}\|_{\substack{i=1,...,m \\ j=1,...,m}}$ be a square matrix. $A$ is diagonal matrix if $$i\neq j \implies a_{ij}=0, \quad\forall i,j \in \{1,...,m\}$$</p>
</blockquote>
<p>is correct?</p>
<p>Thanks in advance!</p>
| 0non-cybersec
|
Stackexchange
| 134
| 350
|
How to check if something was written to /dev/log?. <p>I'm writing application which is intended to log to syslog. In <a href="https://docs.python.org/2/library/logging.handlers.html#sysloghandler" rel="nofollow">documentation for SysLogHandler</a> (python, logging module) it is said that for UNIX systems it's usually '/dev/log'. I need to test if something was written there, how can one read the content of '/dev/log'?</p>
<p>I have Ubuntu 14.04</p>
| 0non-cybersec
|
Stackexchange
| 135
| 455
|
Difference between "Realtek Digital Input" and "Stereo Mix". <p>When trying to record sound through CamStudio on Windows Vista, I found that I had to change the recording device to from "Realtek Digital Input" to "Stereo Mix".
(Control Panel>sound>Recording>Show Disabled Devices>Enable Stereo Mix)</p>
<p>Are there any drawbacks to this? What is the difference between the "Realtek Digital Input" and "Stereo Mix", and what are some of the pro/cons of each?</p>
| 0non-cybersec
|
Stackexchange
| 133
| 484
|
Why a pdf is opened when I click a url when the url specifies its a zip ?Is this link trustworthy?. <p>So basically the href of the anchor tag is something like hxxtp://www.xxxx/xx.zip and the anchor tag text visible to user is something like xxxx.pdf ,when user clicks it Mozilla opens it as a .pdf but actually it is a .zip.</p>
<p>My doubt: Why is firefox opening it as a pdf when the url says it's a .zip ,does firefox read the header of the file and decide if its a pdf or a .zip ,is this not fooling a user into clicking a .zip, although he thinks that it's a pdf?</p>
| 1cybersec
|
Stackexchange
| 159
| 576
|
Real-time IIS monitoring. <p>We're looking for some monitoring software that will report and display real-time performance information for IIS. We're currently using perfmon to monitor requests executing, requests queued, etc..., but we're looking for a permanent solution that is able to generate reports, charts, and more.</p>
<p>Nagios seems to get a lot of praise, but we are looking for something that we can install on Windows. I stumbled across <a href="http://www.nimsoft.com/solutions/datacenter-network/applications/iis.php" rel="nofollow noreferrer">Nimsoft</a>, but was wondering if there are any alternatives?</p>
<p>We are only looking to monitor our web servers (less than 5 machines).</p>
| 0non-cybersec
|
Stackexchange
| 187
| 709
|
Send string to php gd through ajax request. <p>I try to create a captcha code image with php gd :</p>
<pre><code>$im = imagecreatetruecolor(100, 25);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
$imgstring=$_GET['captcha'];
$font = 'RAVIE.TTF';
imagettftext($im, 15, 0, 10, 20, $black, $font, $imgstring);
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
</code></pre>
<p>The GET value is send with ajax like this:</p>
<pre><code>var randstring;
function Captcha() {
randstring = Math.round((Math.pow(36, length + 1) - Math.random() * Math.pow(36, 5))).toString(36).slice(1);
$.ajax({
url: 'test_image.php',
data: {'captcha' : randstring},
method: 'GET',
success: function (data){
console.log(data);
},
error: function (){
alert('Error');
return false;
}
});
}
</code></pre>
<p>HTML:</p>
<pre><code><img src="test_image.php">
</code></pre>
<p>Though it gives no errors , the image is not generated . Yes, the request reach the php script , i already checked , but something blocks image from being generated...</p>
<p><strong>UPDATE</strong> Actually the image is generated, and also the ajax request is sent. But on the test_image.php script , $_GET['captcha'] ( the request ) is not recognized so it will just output a blank string in that image , though the image is there , but without a string .</p>
| 0non-cybersec
|
Stackexchange
| 497
| 1,648
|
Preventing user-installed routers from taking down a network?. I've just inherited a site that is an utter mess. It's a floor of an office building where individual offices aw rented out to different tenants. Something like 20-30 users.
The network was set up by someone who had no idea what they were doing, and as a result, performance was pretty bad. I wish I'd taken a picture of the patch panel to show you. The router is some kind of Linksys super duper consumer-grade dealio.
So to "fix" the bad network, the tenants began getting their own wifi routers to put in their offices. Because hey, all you need is a new router, right?
This results in the entire network going down whenever one of the tenants plugs in the router.
I've never had to deal with this exact situation before, so I wanted to ensure that going forward, once we've replaced the hardware, I can prevent users from attaching routing devices.
We'll most likely put in a Sonicwall TZ series and Unifi APs.
On mobile, sorry for whatever I've left out.
| 1cybersec
|
Reddit
| 246
| 1,032
|
Together we lost 150 pounds. During the first 20 years of marriage we had made many short term attempts at weight loss, but we remained overweight and out of shape. From starving ourselves to killing ourselves at the gym, nothing helped us achieve LONG term success. We were feeling hopeless and out of control in regards to our health and weight.
After seeing a friend's success on Facebook with Take Shape for Life, my wife skeptically gave it a try. I joined the program a week later.
The weight loss portion of the plan worked well for us. But it's a diet. And diets never worked long term for us. What was different about this plan was we got a free health coach who supported us with a phone call each week. Our coach led us through a book and workbook (called the Habits of Health) that really helped us identify the habits in our life that were leading to disease and obesity.
It took about 4.5 months for me to lose 50 pounds and 7 months for my wife to lose 100 pounds. (Results will vary. Typical weight loss is 2-5 lbs for the first two weeks and 1-2 lbs per week thereafter.) http://imgur.com/rhmQmgm
We have been maintaining a healthy weight for almost 2 years now. We knew if we wanted a change in our lives we needed to CHANGE our lifestyle. The plan taught us exactly how to have good nutrition, incorporate exercise, learning to get enough sleep and reducing our stress. There is no magic formula. It's all common sense.
Every day we wake up feeling truly blessed and grateful for finally being in this place of fitness and health. We have now become health coaches and it’s our desire to help others move from a place of feeling hopeless and helpless, to a place of optimal health.
Here is another before and after. http://imgur.com/KWvdTaF
| 0non-cybersec
|
Reddit
| 401
| 1,772
|
Statistics for Steam games released between 2016/12/12 to 2016/12/18. Greetings /r/games!
Here's this week's infographic covering mid-December: http://imgur.com/c8RDNWS
Honestly this week comes as something as a surprise to me with all the top level stats across the board being a vast improvement over the previous week. To put it in perspective this week's games were played by over 3 times as many people as the week before it. Incredible considering it was only a week before everyone's holidays began!
One interesting data point is that Shadow Tactics makes an appearance as a trending title just one week after its launch. Whilst I've said this is because of the 10% sale I'd be keen to hear what everyone else thinks. Personally I think it's likely due to the relatively unknown title really picking up steam after its first week, but I'm not 100% sure on that.
Until next week! :)
| 0non-cybersec
|
Reddit
| 212
| 892
|
How to select a li with a specific class?. <pre><code><ul id="attached_deals_tab" class="nav nav-tabs">
<li class="active">
<a data-toggle="tab" href="#Test1">Test1</a>
</li>
<li class="">
<a data-toggle="tab" href="#Test2">Test2</a>
</li>
</ul>
</code></pre>
<p>With a jquery like this, I could say get me all list items:</p>
<pre><code>$('#attached_deals_tab li');
</code></pre>
<p>But how can I say show me only the <code>li</code> that has <code>class="active"</code> ? In one line please.</p>
<p>I know how to negate it:</p>
<pre><code>$('#attached_deals_tab li:not(.active)');
</code></pre>
<p>But not the other way around...</p>
| 0non-cybersec
|
Stackexchange
| 298
| 718
|
What do you do when you overeat at breakfast?. This morning I brought a protein bar to work for breakfast. But before I got to my desk, I passed several boxes of free Dunkin' Donuts. Thinking, gee I better take advantage of free food, I grabbed two and scarfed them down, assuming they would be <200 calories per donut. I just looked up the calories and it was 750 total for the two!! Holy cow. Now what do I do for the rest of the day? Skip lunch? Eat extremely light? Eat normally? Do some extra cardio tonight? What do you do in this situation?
| 0non-cybersec
|
Reddit
| 145
| 557
|
Asterisk ghost calls. <p><strong>Problem</strong></p>
<p>We have an Asterisk server hosted externally. On four locations we've gotten ghost calls. These are calls with different numbers like 1000, 9999 or 6060. We don't use these numbers, not even that range. </p>
<p>NB: I've asked <a href="https://serverfault.com/questions/765352/phone-rings-but-no-call-and-no-log-entries-in-asterisk">a question about this</a> before, but that didn't result in a solution. </p>
<p>A while ago one phone (123) had this problem. This phone was used at home by an employer. I ordered it back, and gave the employer a new phone with a new number (124). I connected the 123-phone in my office, and never had a problem. The 124-phone started to have problems after several weeks, so not right away.</p>
<p>To me this seems like a problem that originates in the home network of the employee. </p>
<ul>
<li>We've had this problem in three different homes. </li>
<li>All these users have routers at home, so the phones are not connected to the internet directly. </li>
<li>We don't get this problem at the office, I suppose we have better protection there. </li>
<li>The problems don't stay forever. They come and go, then come back.</li>
</ul>
<p>I've looked in the Asterisk logs several times, but couldn't find anything related.</p>
<p><strong>Questions</strong></p>
<p>I would like to know how this works. </p>
<ul>
<li>Do these calls originate from the home LAN of these employers? </li>
<li>Does the Asterisk server play a role here? </li>
<li>What can cause this? Is this malware on a laptop? </li>
<li>Is it some harmeless process that connects to this phone and causes the phone to think a call is made?</li>
</ul>
<p>And of course:</p>
<ul>
<li><strong>How can we get rid of these calls?</strong></li>
</ul>
| 0non-cybersec
|
Stackexchange
| 537
| 1,808
|
I'm Going to court for my private student loans. I have no money for a lawyer. Are there any online resources that can help me prepare me for what will likely be one of the most horrible days of my life?. Long story short...lots of student loan debt. The case going to court is with a well known bank for over $25,000. I have a cosigner who is employed but I have recently lost my job. A mediation has been scheduled in one month. I just received a letter stating that there will be Interrogatories, Request for Admissions and Oral Depositions in October and November.
I am in the state of California. Any help would be greatly appreciated.
| 0non-cybersec
|
Reddit
| 146
| 641
|
Can't get heroku site updated on custom domain. <p>I have hosayif.com registered at GoDaddy, and I set up a cname for rails.hosayif.com to point to my heroku app at sharp-meadow-6535.herokuapp.com.</p>
<p>I set this up with a previous app, and it worked. I made a new app, renamed the old one, and then renamed the new one so that it is sharp-meadow-6535.herokuapp.com in hopes of not having to change anything at GoDaddy.</p>
<p>In theory, rails.hosayif.com and sharp-meadow-6535.herokuapp.com should be the same site, but they are not. Can someone tell me what I am doing wrong?</p>
| 0non-cybersec
|
Stackexchange
| 195
| 593
|
Semi-Casual fan looking to really get into the season.. I've always loved Basketball, but up until recently I haven't made any effort into following it. I had my favorite team and if they're game HAPPENED to be on TV I'd set the remote down and watch. Up until three years ago, I only had network television... And lived in a different state than my team. Needless to say, I didn't watch much unless it was the playoffs.
But now, I have cable, live in the same state as my team, and have fallen in love with the sport of basketball to the point that I want to actively follow the season. So what are some pointers I could get to do that? Is it worth DVRing games and going on media blackout until I can sit down and watch? Should I follow every team as much as possible, or do I just follow my favorite?
And final question, I've done some lurking here so I just want to make sure, always bet Knicks, right?
| 0non-cybersec
|
Reddit
| 220
| 909
|
Logs in Kubernetes Pod not showing up. <p>I have Kubernetes set up and running a grpc service in a pod. I am successfully hitting an endpoint on the service, which has a print() statement in it, but I see no logs in the log file. I have seen this before when I was running a (cron) job in Kubernetes and the logs only appeared after the job was done (as opposed to when the job was running). Is there a way to make kubernetes write to the log file right away? Any setting that I can put (either cluster-level or just for the pod)? Thanks for any help in advance!</p>
| 0non-cybersec
|
Stackexchange
| 139
| 567
|
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
| 349
| 1,234
|
How to protect an API key in a .NET application. <p>My application hits a number of web services, such as Twitter and Flickr. It uses API keys from those services, and I'd like to obfuscate them in my binaries. (I'm not really worried about piracy or anything, I just need to keep these keys secret.)</p>
<p>What's the best way to go about it?</p>
<p>If I store them as const <a href="http://msdn.microsoft.com/en-us/library/system.security.securestring.aspx" rel="nofollow noreferrer">SecureString</a>, does that keep them out of memory? The MSDN description says the text is "deleted from computer memory when no longer needed", but isn't a const always in memory?</p>
<p>Will Dotfuscator obscure it in my assembly? (Assuming I can get it to <a href="https://stackoverflow.com/questions/4937738/dotfuscator-doesnt-support-current-net-framework">work</a>.)</p>
| 1cybersec
|
Stackexchange
| 256
| 865
|
Getting just the "active" remote desktop sessions. <p>In windows I can get the remote desktop sessions on a particular server using:</p>
<pre><code>qwinsta /server:SERVER_NAME
</code></pre>
<p>But this gives me sessions of all different states(e.g.: Active, Disc, ... ).</p>
<p>Does any body know about a command or batchfile or script to just get the "active" sessions?
I want to be able to run it from an ordinary Windows 7 client.</p>
| 0non-cybersec
|
Stackexchange
| 131
| 451
|
Let $f_n=\sqrt{n}e^{-nx}$ on $(0,1)$ does $\int_{0}^{1}f_nh \to 0$ for all $h \in L^1$. <p>Let <span class="math-container">$f_n=\sqrt{n}e^{-nx}$</span> on <span class="math-container">$(0,1)$</span> does <span class="math-container">$\int_{0}^{1}f_nh \to 0$</span> for all <span class="math-container">$h \in L^1$</span></p>
<p>This is the last part of a problem I am solving. These are the previous parts i have shown:</p>
<p>1) <span class="math-container">$f_n \to 0$</span> but not uniformly</p>
<p>2) <span class="math-container">$\|f_n\|_2 \to 0$</span></p>
<p>3) <span class="math-container">$f_n \rightharpoonup 0 $</span> In <span class="math-container">$L ^2$</span></p>
<p>I am pretty sure the statement is false but I do not know how to prove it. It is a weaker statement than weak convergence in <span class="math-container">$L^{\infty}$</span> so I don't have any standard theorems to apply.</p>
| 0non-cybersec
|
Stackexchange
| 343
| 916
|
HKDF on output key material of previous HKDF. <p>I understand the typical way to use HKDF is to make one call to HKDF to obtain multiple keys. Is it safe to use HKDF the following way to generate different keys ? If not, why?</p>
<p>key0 = HKDF-extract-and-expand(0 salt, Z(DH key exchange), x co-ordinates of public points as info). </p>
<p>key1 = HKDF-expand(key0, info1)<br>
key2 = HKDF-expand(key1, info2) </p>
<p>Also, is it safe to replace HKDF-expand for key1 and key2 with sp800-108 or HMAC_SHA256(key0, counter)? i'm curious if there are any subtle differences between them that make them not interchangeable ?</p>
| 0non-cybersec
|
Stackexchange
| 203
| 629
|
How do Display Image Thumbnail before Form Submit in Vich Uploader?. <p>I'm using Vich Uploader Bundle to submit one image per form, I'd like to be able to display a thumbnail of the image before it's uploaded because as it is, the image is uploaded and nothing is shown or done to indicate that anything happened. I tried setting <code>inject_on_load</code> to true but this just puts the url of the image in the element that it appears.</p>
<p><strong>config.yml</strong></p>
<pre><code># Vich File Uploader
vich_uploader:
db_driver: orm
mappings:
image:
uri_prefix: /uploads/listings/images
upload_destination: '%kernel.root_dir%/../web/uploads/listings/images'
namer: vich_uploader.namer_uniqid
inject_on_load: false
delete_on_update: true
delete_on_remove: true
avatar_image:
uri_prefix: /uploads/avatars
upload_destination: '%kernel.root_dir%/../web/uploads/avatars'
namer: vich_uploader.namer_uniqid
inject_on_load: false
delete_on_update: true
delete_on_remove: true
agency_logo:
uri_prefix: /uploads/avatars
upload_destination: '%kernel.root_dir%/../web/uploads/avatars'
namer: vich_uploader.namer_uniqid
inject_on_load: false
delete_on_update: true
delete_on_remove: true
</code></pre>
| 0non-cybersec
|
Stackexchange
| 435
| 1,535
|
Covariance of squared bivariate normal random vector. <p>$\mathbf{Y}=(Y_1, Y_2)^T$ is a bivariate Gaussian random vector with mean zero.</p>
<p>I want to prove that $Cov[Y_1^2, Y_2^2]=2\times(Cov[Y_1, Y_2])^2$.</p>
<p>I know that</p>
<p>$$Cov[Y_1^2, Y_2^2]=E[Y_1^2Y_2^2]-E[Y_1^2]E[Y_2^2]=E[Y_1^2Y_2^2]-Var[Y_1]Var[Y_2]$$</p>
<p>and</p>
<p>$$2(Cov[Y_1, Y_2])^2=2(E[Y_1Y_2]-E[Y_1]E[Y_2])^2=2(E[Y_1Y_2])^2$$ as $\mu_{Y_1}$,$\mu_{Y_2}$ are 0.</p>
<p>What is the next step I should proceed?</p>
| 0non-cybersec
|
Stackexchange
| 289
| 496
|
What is the Fourier transform of this function?. <p>Consider the function
$$
f(x_1,x_2)=|x_1x_2|^{-\alpha/2}\int_{\mathbb{R}} \frac{e^{it(x_1+u)}-1}{i(x_1+u)} \frac{e^{it(x_2-u)}-1}{i(x_2-u)} |u|^{-\beta}du.
$$
It is <a href="http://link.springer.com/article/10.1007/BF01061262#page-1" rel="nofollow">known </a> that $f(x_1,x_2)\in L^2(\mathbb{R^2})$ if
$$
-1/2<\alpha<1, \quad-1/2<\beta<1,\quad \alpha+\beta>1/2.
$$
The question is to find an expression for the $L^2$-defined Fourier transform
$$
\hat{f}(w_1,w_2)=\int_{\mathbb{R^2}} f(x_1,x_2)e^{-ix_1w_1-ix_2w_2} dx_1dx_2.
$$</p>
<p>When $\alpha$ and $\beta$ are nonnegative, using the facts (1) $\int_0^t e^{isx}ds=\frac{e^{itx}-1}{ix}$, (2) $\int_{\mathbb{R}}e^{ixw} |x|^{a} dx=c|w|^{-a-1}$ for $a\in(-1,0)$ and (3) $\int_{\mathbb{R}}e^{ixw} dx=2\pi\delta(w)$, I have guessed (probably can be justified by some regularization argument) that
$\hat{f}(x_1,x_2)$ is up to some constant the following</p>
<ol>
<li><p>$\alpha>0$, $\beta>0$:
$$
\int_0^t\int_0^t |u-v|^{\beta-1}|u-x_1|^{\alpha/2-1} |v-x_2|^{\alpha/2-1} du dv.
$$</p></li>
<li><p>$\alpha>1/2$, $\beta=0$:
$$
\int_0^t |u-x_1|^{\alpha/2-1}|u-x_2|^{\alpha/2-1} du.
$$</p></li>
<li>$\alpha=0$, $\beta>1/2$:
$$
|x_1-x_2|^{\beta-1} I\{0<x_1,x_2<t\}.
$$</li>
</ol>
<p>But what about the cases: $\alpha>1/2$, $\beta<0$ and $\alpha<0$, $\beta>1/2$? I don't even know how to heuristically guess the answer.</p>
| 0non-cybersec
|
Stackexchange
| 729
| 1,468
|
XAMARIN (C#) - Is There A Way To Underline A TextView Programmatically?. <p>I know there are some other ways to do it (I think in Java you do something like this <code>.SetPaintFlags(Paint.Underline_Text_Flag);</code>) - and I do understand that it could be sort of emulated using the Draw Line and there is also a way to do it by predefining it in xml file as well.</p>
<p><strong>The question is how to accomplish it **programmatically</strong> <strong>in Xamarin (C#)?</strong> There should be a property on the object or some way to set it** </p>
| 0non-cybersec
|
Stackexchange
| 158
| 552
|
Extrapolating signals using wavelets. <p>I am an absolute beginner to wavelets, and I've read a few articles on how wavelets are used for predicting future points of a dataset, notably <a href="http://www.physics.ohio-state.edu/~kagan/phy596/Articles/Fractals/Chaos-WaveletBasedOilPrices.pdf" rel="nofollow">Wavelet prediction for Oil Prices</a> and <a href="http://rtsimage.di.uoa.gr/publications/iwssip98.pdf" rel="nofollow">1D Signal Prediction using wavelets</a></p>
<p>So, what I can not understand is that, for the N samples, how the N/2 detail coeffecients approximations are used for prediction.</p>
<p>I am using the PyWavelets package for python, and when I pass my N samples to the pywt.wavedec, I can see the approximation coeefficients show similar behavior to my dataset, but I don't understand how that is used together with the detail coefficients for prediction.</p>
| 0non-cybersec
|
Stackexchange
| 258
| 886
|
Reroute traffic between two VMs through another VM. <p>I'm trying to set up a really simple network topology, including two Ubuntu 16.04 as two hosts as follow:</p>
<blockquote>
<p>VM1 <--> VM2</p>
</blockquote>
<p>Both VMs are connecting to the VirtualBox host-only network with static IP address (10.0.0.1 and 10.0.0.2). The task here is that VM2 sends VM1 a packet with spoofed IP address (e.g., 10.0.0.3) and gets the returning packet. Sending a spoofed packet is easy, but I don't know how to get the returning packet because it will be sent to the spoofed address.</p>
<p>I'm thinking of having another VM acting as the router in the middle: </p>
<blockquote>
<p>VM1 <--> Router <--> VM2</p>
</blockquote>
<p>but not sure how to reroute all the outgoing traffic from VM1 to VM2?</p>
<p>Will appreciate any hint, including for the original problem because I stuck for few days and surprisingly there is no related question. </p>
| 0non-cybersec
|
Stackexchange
| 296
| 953
|
[Rant] Seriously HR?. I know we all probably have experience with last minute terminations and the occasional last minute new hire but this morning just blew all of my past experiences out of the water.
We have just been informed that we had a new hire start two and a half hours ago. Their manager called us asking why she couldn't log in.
We have a 4 page onboarding procedure. Licensing to purchase. Vendors to notify. Not to mention the 2-3 hours of training we normally do for this specific position.
I'm in shock. Onboarding isn't a new thing. It's been done the same way for at least two years. We have a super handy document with fields and drop downs for all the information IT needs. After years of hiring staff why wouldn't you just make it part of your procedure. After they accept the offer you notify IT. It seems beyond ridiculous. I'm just waiting for this to hit c-levels so I can hear about how IT doesn't do anything.
*slash rant*
So what fun stories do you have of HR throwing you not only under the bus but also hopping into the driver seat and doing some doughnuts just to be sure.
| 0non-cybersec
|
Reddit
| 259
| 1,117
|
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
| 349
| 1,234
|
PubNub publish message between two Private Channels. <p>I'm using Php and MySQL.</p>
<p>I have just signup for pubnub push API and successfully made my first push notification using the PHP Push API provided by Pubnub. I'm new into this Realtime technology so I have come up with some questions which I find confusing to understand myself. I have googled many times and searched all over stackoverflow. I didn't get any relevant suggestions or questions elsewhere, so I'm writing down my question here seeking your advice and expertise help.</p>
<p>Pubnub says it's not a good thing to create more than two channels per client. So, in my application, I have a requirement to create more than two channels to listen to notifications happening everywhere on my website but I will go with two channels for every logged in users as Pubnub suggested.</p>
<ol>
<li>Logged in users listens to Channel1-Public <br/></li>
<li>Logged in users listens to private UsersOwnDynamic-Channel to receive notifications related and only meant for him.</li>
</ol>
<p>FYI: <a href="https://help.pubnub.com/entries/21115547-how-do-i-allow-only-certain-users-to-subscribe-to-certain-channels" rel="nofollow noreferrer">This link in PubNub says about creating LongChannel names to avoid Channel Snooping</a></p>
<p>My questions are given below: <br/>
A. Do I always have to create a new private Dynamic channel name everytime I logged into the website. If so, how would other users know how to send a notification to my private Channel.Or, do I just need to have only one static channel name stored in database table, so that other authenticated users will query the table and get my private channel name to sent me notifications. If this is the case, don't you think if a hacker get hold of some private channel name of certain users, they will be able to listen to that channel?</p>
<p>B.I'm using PHP and MySQL, so I still cannot think out a way or come up with a solution to send message to private channels of another user. <br/>
Lets take an example for a simple friend request system. <br/>
- UserA sends a friend request to UserB. <br/>
- UserB is listening to his own dynamic private channel name called DynamicPrivateChannelB <br/>
(how will UserA find the channel name for UserB which is private? Im thinking the only way for this is that the private channel of UserB should be stored in a database table for every loggedin users to query. Am I thinking the right way ? )</p>
<pre><code><?php
//first way. How can i possibly achieve this.
$sqlquery = "sent friend request from userA to userB";
require('Pubnub.php');
$pubnub = new Pubnub( 'pubkey', 'subkey' );
$pubnub->publish( array(
'channel' => 'how do i find the private channel name for userB to sent this notification?',
'message' => array('friend_request' => 'A friend request') )
);
//2nd way ? Is this the right way ?
$sqlquery = "sent friend request from userA to userB";
$privatechannelofuserB = "get the channel name of userB from the db table";
require('Pubnub.php');
$pubnub = new Pubnub( 'pubkey', 'subkey' );
$pubnub->publish( array(
'channel' => '$privatechannelofuserB',
'message' => array('friend_request' => 'A friend request') )
);
?>
</code></pre>
<p>C. If we are always generating dynamic private channel names, storing in database table, updating whenever new dynamic channel names are generated. I think it will cause a problem because some message won't get delivered as new dynamic private channel names replaces old ones.</p>
<p>D. So, I have many notifications to sent to a single channel like New Friends request, New Private message replies, New gifts requests and many others like that. How do I sent all these data to a channel and how to find out and parse the incoming new notifications data. I know JSON is the format to send but im not sure about the format of sending.
<br/><br/></p>
<p>According to <a href="https://help.pubnub.com/entries/21115547-how-do-i-allow-only-certain-users-to-subscribe-to-certain-channels" rel="nofollow noreferrer">this link</a>, a single Pubnub channel can contain only up to 100 messages. Does it mean that if 200 messages comes at once to a single channel the first 100 gets delivered and the remaining is on queue ? How about if 10,000 messages comes at once to a single channel ? Do all the remaining messages stays in queue ? if so, how does it gets delivered to the subscriber in realtime ?
<br/><br/>
Let me give another simple scenario that I'm trying to achieve. <br/></p>
<blockquote>
<ul>
<li><strong>UserA</strong> is authenticated and logged in to the website. <br/></li>
<li><strong>UserA</strong> generates his own Dynamic channel name, <strong>UserAx732dsw3efsdfsdfsdf</strong> <br/></li>
<li><strong>UserA</strong> starts listening to his newly created channel <strong>UserAx732dsw3efsdfsdfsdf</strong> <br/> (Now, userA should start receiving messages from others) <br/></li>
</ul>
<p><br/>
- <strong>UserB</strong> sends a private message to <strong>userA</strong>. <br/> (Now, only userA should get notified on his private channel about the new private
message, how can <strong>userB</strong> or the <strong>System</strong> find out the channel
name <strong>UserAx732dsw3efsdfsdfsdf</strong> because, this is a private channel
generated dynamically by <strong>userA</strong> , neither the <strong>System</strong> or
<strong>userB</strong> has accessed to it. This same thing is happening for <strong>userB</strong> as well, if <strong>userB</strong> should be notified by any other entity or by the system again, there should be a way to find out the dynamic
channel name of <strong>userB</strong> . <br/>
<br/>
Another issue is this scenario is that, if a user is dynamically generating channel name everytime he/she logged in to the website. What will happen to all the messages that was sent to the dynamic channel ? Do pubnub saves all the created channel names on their server? Is there any way that a system or a user can find out whether a channel name is still being own and atleast one user is listening to the channel ?. <br/> <br/>
I'm curious to know this because of the following concepts that I have: <br/></p>
<ul>
<li><strong>UserA</strong> creates <strong>dynamicChannelA</strong> when he/she logged in to the website at <strong>1AM</strong>. <br/></li>
<li>UserA starts getting lots of notification pushout to his dynamic channel <strong>dynamicChannelA</strong> <br/></li>
<li>Now, <strong>UserA</strong> logs out from the website at <strong>1:30 AM</strong>, what will happen to the many other users who are still pushing out notification
to his <strong>dynamicChannelA</strong> because by the next time when <strong>UserA</strong>
logs into the website, <strong>UserA</strong> will be listening to different
dynamic channel name.<strong>UserA</strong> won't be listening to his previous
channel <strong>dynamicChannelA</strong> .</li>
</ul>
</blockquote>
<p><br/>
I'm thinking to use the method of retrieving channel name of a particular user from the database table. Is there any method or way to prevent unauthorised subscription of the channel? Because anybody can subscribe to the channel name if they have the subscribe key and channel name no matter how long the channel name is. I'm just curious because all subscription is happening in the client side and the subscription key and channel names are visible.</p>
| 0non-cybersec
|
Stackexchange
| 2,030
| 7,614
|
Define function in fish, use it with watch. <p>I want to define a function, and call that function every n seconds. As an example:</p>
<pre><code>function h
echo hello
end
</code></pre>
<p>Calling <code>h</code> works:</p>
<pre><code>david@f5 ~> h
hello
</code></pre>
<p>But when using watch, it doesn't...</p>
<pre><code>watch -n 60 "h"
</code></pre>
<p>...and I get:</p>
<pre><code>Every 60.0s: h f5: Wed Oct 10 21:04:15 2018
sh: 1: h: not found
</code></pre>
<p>How can I run <code>watch</code> in fish, with the function I've just defined?</p>
| 0non-cybersec
|
Stackexchange
| 224
| 601
|
Freeradius test mac auth. <p>I have just setup a freeradius server for testing purposes.</p>
<p>I have done a number of tests using PAP, various EAP formats and all went fine.</p>
<p>Now my boss wants me to setup a MAC auth server for internal uses and I have done so following this guide : <a href="http://wiki.freeradius.org/guide/Mac-Auth" rel="nofollow noreferrer">http://wiki.freeradius.org/guide/Mac-Auth</a></p>
<p>My problem now is testing the installation. I can start the server in debug mode with radiusd -X, but now I don't know how to test it. radtest takes username, password and secret as arguments, which are not used in my setup.</p>
| 0non-cybersec
|
Stackexchange
| 192
| 654
|
Misunderstanding Lax-Milgram. <p>I think I misunderstand the Lax-Milgram theorem. Suppose that I have a bilinear form <span class="math-container">$a$</span> satisfying the conditions of the Lax-Milgram theorem on a Hilbert space H. Then it must satisfy the same conditions on every Hilbert subspace of H. Therefore, the variational problem a(u,v)=l(v), where the linear form <span class="math-container">$l$</span> is continuous on H, has a unique solution on every Hilbert subspace of H. But from the point of view of PDE Hilbert subspaces are just additional conditions on the function. For example, let us consider the Poisson equation <span class="math-container">$\Delta u=f$</span> on a bounded domain <span class="math-container">$\Omega$</span>. This problem has a unique solution on <span class="math-container">$H^1_0(\Omega)$</span> by Lax-Milgram. Let's take a hyperplane <span class="math-container">$H$</span> in <span class="math-container">$H^1_0(\Omega)$</span> defined by <span class="math-container">$H=\{v\in H^1_0(\Omega)~|~\int_\Omega v=0\}$</span>. Then once again by Lax-Milgram there's a unique solution <span class="math-container">$u'$</span> on <span class="math-container">$H$</span>. But it must be the same solution since <span class="math-container">$u$</span> is unique. So we get that for any solution <span class="math-container">$u$</span> of <span class="math-container">$\Delta u=f$</span> on <span class="math-container">$H^1_0(\Omega)$</span> one has <span class="math-container">$\int_\Omega u=0$</span> which is not true. Where is the mistake?</p>
<p>Thank you! </p>
| 0non-cybersec
|
Stackexchange
| 481
| 1,612
|
openjdk-1.7.0_55 on ubuntu: Could not load the property file 'output_xml.properties' for output method 'xml'. <p>On openjdk-1.7.0_55 on ubuntu I am getting exception:</p>
<p>com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException: Could not load the property file 'output_xml.properties' for output method 'xml'</p>
<p>Can this be classpath issue?</p>
<p>I can find "output_xml.properties" in /usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/resources.jar.</p>
<p>Any help is appreciated.</p>
<p>Thanks!</p>
| 0non-cybersec
|
Stackexchange
| 205
| 543
|
can't select the shape in excel. <p>I have a problem today that is the first time I meet it. I have opened an old file (this file from 2005), then this contain of flowchart which made from excel's autoshape.
Then I want to make some revision for this file, But I have a problem when I want to select this shapes.</p>
<p>Before select (click the shape), I'm highlighted the shape using my mouse but my kursor icon change into (stop icon). So, this shapes can't be highlighted or selected.</p>
<p>Thanks for any advice.</p>
| 0non-cybersec
|
Stackexchange
| 141
| 528
|
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
| 349
| 1,234
|
Evaluating trigonometric limit $\csc^2(2x) - \frac{1}{4x^2}$. <blockquote>
<p>$$\lim_{x\rightarrow 0} \left[ \csc^2(2x) - \frac{1}{4x^2} \right]$$</p>
</blockquote>
<p>I've tried to use l'Hôpital's rules but still can't find the answer. Here's my approach:</p>
<p>$$
\begin{aligned}
&\lim_{x\rightarrow 0} \left[ \csc^2(2x) - \frac{1}{4x^2} \right] \\
=& \lim_{x\rightarrow 0} \left[ \frac{1}{\sin^2(2x)} - \frac{1}{4x^2} \right] \\
=& \lim_{x\rightarrow 0} \left[ \frac{4x^2-\sin^2(2x)}{4x^2(\sin^2(2x))} \right] \\
=& \lim_{x\rightarrow 0} \left[ \frac{8x-4\sin(2x)\cos(2x)}{8x\sin^2(2x)+16x^2\sin(2x)\cos(2x)} \right] \\
=& \lim_{x\rightarrow 0} \left[ \frac{8x-2\sin(4x)}{8x\sin^2(2x)+8x^2\sin(4x)} \right] \\
=& \lim_{x\rightarrow 0} \left[ \frac{4x-\sin(4x)}{4x\sin^2(2x)+4x^2\sin(4x)} \right] \\
\end{aligned}
$$</p>
<p>Am I using the correct way? How to solve it correctly?</p>
<p>P. S. I tried to use calculator and it outputs one third $1/3$.</p>
| 0non-cybersec
|
Stackexchange
| 475
| 987
|
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
| 349
| 1,234
|
android firebase crashlytics invalid key error. <p>I integrated firebase crashlytics using below url and it was working fine.
<a href="https://firebase.google.com/docs/crashlytics/get-started?authuser=0" rel="nofollow noreferrer">https://firebase.google.com/docs/crashlytics/get-started?authuser=0</a></p>
<p>Then I did git pull from other developer and went to build project and got following error:</p>
<p>Error:org.gradle.api.GradleException: Crashlytics Developer Tools error.
Error:com.crashlytics.tools.android.exception.PluginException: Crashlytics Developer Tools error.
Error:java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null.</p>
| 0non-cybersec
|
Stackexchange
| 203
| 671
|
Girlfriend wants to have sex. So my girlfriend really wants to sleep with me (no this isnt a bragging thread, just shut up and read). Ive been sketching about it (1st time, yada yada) but its resulted in me dropping a couple quality dad style jokes
Gf: "So where are you at with all this"
Me: " Well im trying to place my thoughts on a scale"
Gf: "What kind of scale?"
Me: "From being a pussy to getting pussy"
Gf: "Well youre the one who needs to wrap their head around it :P"
Me: "And youre the one who needs to wrap it around my head!"
| 0non-cybersec
|
Reddit
| 156
| 541
|
Error when value not present. <p>I am using the code below several times over in one sub for different values not just "CPNEC". It works fine where there is a range with that value on the spreadsheet but falls over it the value does not exist. This is a routine I want to use every month where there will sometimes be none of a certain value in my data so I need it to be able to move onto the next value without falling over. Can anyone help me please.</p>
<pre><code>Sub SelectCPNEC()
' Figure out where the "CPNEC" data starts.
For nRow = 1 To 65536
If Range("A" & nRow).Value = "CPNEC" Then
nStart = nRow
Exit For
End If
Next nRow
' Figure out where the "CPNEC" data ends.
For nRow = nStart To 65536
If Range("a" & nRow).Value <> "CPNEC" Then
nEnd = nRow
Exit For
End If
Next nRow
nEnd = nEnd - 1
'Select the range required
Range("A" & nStart & ":G" & nEnd).Select
'Now copy and paste into the right worksheet
Selection.Copy
Application.Goto ActiveWorkbook.Sheets("CPNEC").Cells(1, 1)
ActiveSheet.Paste
End Sub
</code></pre>
| 0non-cybersec
|
Stackexchange
| 353
| 1,146
|
Would Anyone be Interested in a DSLR Videography/Cinematography Class?. **Edit 2: The class page is now up! http://ureddit.com/class/39304/dslr-cinematography-and-videography**
_____________________________________
Edit: For those interested in this class, please feel free to subscribe to our /r/FilmClass subreddit, where the lessons will be posted (along with other film lessons.) I'll have a link to the class enrollment page up soon. Thanks!
______________________________________
Hello! I'm currently teaching the [Introduction to Screenwriting](http://ureddit.com/class/38566) class at the University of Reddit and posted [this](http://www.reddit.com/r/UniversityofReddit/comments/xzkib/offer_cinematography_classes/) asking what other film classes, mainly related to Cinematography, others might like to see in our /r/FilmClass subreddit. A couple people mentioned that they'd be interested in a Cinematography class covering video on DSLRs and one suggested I make a post here to see if there might be any interest for such a class on /r/photography
This would be a class aimed more at those less familiar with video formats, using follow focuses and matte boxes, or who may be new to DSLRs or to video altogether—as I'm sure many of you are already familiar with your video functions (if your camera has one) or have much video experience as well as in still photography.
Would this type of a class be of interest to you? And if so, what are some of the aspects of shooting video with DSLRs that you'd like covered? I'm just trying to gauge interest right now as this class is not set in stone—I may end up doing an Introduction to Cinematography course and just dedicate a lesson to DSLRs. Thank you for your time!
| 0non-cybersec
|
Reddit
| 418
| 1,731
|
frequent gnome shell crashes at boot. <p>Ubuntu 18.04.3
gnome-shell 3.28.4
x11 (X.Org 1.19.6)</p>
<p>I have struggled with this for many months, but recently it is getting much worse. </p>
<p>When I start up the computer, the process of booting frequently freezes with a black screen. Sometimes I end up with a desktop showing no desktop icons. Sometimes I am kicked back to the screen where I have to again select my user and reenter my password. In either case, I end up with a log file of the crash located in /var/crash. It usually runs from 50 MB to over 200 MB. But, I am not a technical person, I don't know how to interpret the contents of that file. I can obviously see that it says that gnome-shell crashed, but I already knew that. </p>
<p>As I wrote above, I am not a technical person. I don't know how to go about tracking down the problem, what tools to use to do that, etc. </p>
<p>I know there are a lot of gnome-shell crashing questions here and on the internet in general. But, I often do not understand what is being discussed, or, I can tell that the problem being discussed is different from mine. </p>
<p>I would include information here to show the problem, but I don't even know what information any of you would want to see. </p>
<p>For the my level of expertise, what I am asking is this: </p>
<p>1) How do I diagnose what the problem is? </p>
<p>2) What tools/commands should I be running to help me figure out what is wrong? </p>
<p>3) If Ask Ubuntu is not the proper place to be asking about this, any ideas on where I should be going to for help? </p>
<p>Thanks in advance. </p>
| 0non-cybersec
|
Stackexchange
| 475
| 1,641
|
How to restart centos 6 server from cron. <p>I realize this is frowned upon. Many will suggest they don't recommend doing a server restart from cron because it's not being monitored. In my case I would like to do this, the reason is because the server is used for only one task, in a node server environment. The server runs out of memory and I've been advised to just restart the whole server. I'm ok with this.</p>
<p>Currently in my cron file I have the following. (I got this off another stack question) . </p>
<pre><code>0 */4 * * * /usr/bin/reboot
</code></pre>
<p>However it doesn't work. When I manually go to this directory /usr/bin/
then type "<code>reboot</code>" it works. But executing like this /usr/bin/reboot from chron doesn't restart the server.</p>
<p>When I do <code>ls /usr/bin/reboot</code> the return is <code>/usr/bin/reboot</code>
When I do <code>which reboot</code> the return is <code>/sbin/reboot</code></p>
<p>How would I restart the server on centos 6 using cron?</p>
| 0non-cybersec
|
Stackexchange
| 303
| 1,010
|
Remote desktop from a mac to windows machine, using direct connection eg Ethernet. <p>I work primarily off a Mac-book. I have a windows machine on which I do some .net development. I simply need to be able to use windows remote desktop on my mac to remote desktop to the windows machine, but not over internet. I want the connection to be established over local WiFi, or over direct Ethernet connection between the two machines, if that is even possible. There are many postings on this topic, but non specific to my case.</p>
<p>The closest answer I have come across is <a href="https://apple.stackexchange.com/a/69374/88885">this here</a>, which only mentions the possibilities, but not the implementation.</p>
<p>Are there any resources I could use to help me set this up, or if anyone knows how to?</p>
| 0non-cybersec
|
Stackexchange
| 200
| 809
|
How do I calculate the mean of this quantity?. <p>Let's say I have an array of numbers that have a specific order, say:</p>
<p>$$x_1, x_2, x_3, \cdots x_n$$</p>
<p><strong>Problem:</strong> How do I calculate the mean of $\Delta x$, where
$\Delta x = x_{n+1}-x_n$
?</p>
<p>At first glance it might seem trivial:
$$\langle \Delta x \rangle = \frac1{n-1}\sum_{i=0}^n (x_{i+1}-x_i)$$
But let's look at an example. Suppose that I have the following four numbers:
$$1,5,8,11$$
Using the equation above would mean:
$$\langle \Delta x \rangle = \frac13\big[(5-1)+(8-5)+(11-8)\big] = \frac1310 \approx 3.33$$
But I could also sum the terms:
$$\frac{11-5}{2} \quad ; \frac{8-1}{2}$$
Which would mean:
$$\frac15\bigg[(5-1)+(8-5)+(11-8)+3+\frac72\bigg]=\frac{33}{10} = 3.3$$
Which is a different result. For me it seems that the first result is correct, because it agrees with the definition of mean.</p>
<p><strong>Question:</strong> Which one is correct, and why does taking the two extra terms I proposed gives an incorrect result?</p>
| 0non-cybersec
|
Stackexchange
| 367
| 1,033
|
Can one have 2 Domains pointing to the same IP and / or 2 IP's resolving to the same Domain?. <p>I am going to attempt to rewrite the initial question so that it makes more sense. </p>
<p>The issue I was being faced with is that I have my Company's website hosted on Site Ground but unfortunately because of the site builder the use, they are unable to transfer is under a different Addon Domain in that domains Document Root. The reason I wanted to have it moved, was because I finally registered the Domain Name that matches my Company name. Currently that website was being accessed from a temporary Domain Name which I never planned to keep as the Domain name for my Company..</p>
<p>To avoid confusion, my Company's Name is Systopian Solutions. My Public Company Branded home page was being temporarily (or so I thought) run under the Document Root for the Domain Name "systopian.com". I had fully planned that once I got my proper Company Domain Name "systopiansolutions.com" that I could add that Domain as another Addon Domain in Site Ground, and then have the actual contents of the site transferred from one Addon Domain to another, both on Site Grounds Hosting. </p>
<p>However, in my initial thinking that the site could be transferred, and before I opened the original question that was here, even if that transferred it, I was left with a slight problem. </p>
<p>I also have e VPS Server Hosted by Vultr. This Server runs all of my Company's Public Facing Invoicing, Billing, and Payment Processing Web App Site (Invoice Ninja) as well as a couple Internal Web App Sites which allow me to provide different services to my Client, </p>
<p>SIDE-NOTE:(and while I am aware, you should never run Public Sites, and Internal Sites on the save server, I have implemented a number of steps to insure that no one will be able to go snooping around. For 1. I have set up Aliases for all of my Internal Sites URLs, so that not one of them uses the commonly known URLs, should they know those Sites are there. 2, Invoice Ninja has a very robust security implementation, that will not allow anyone to choose any fqdn/dir unless it is allowed by Invoice Ninja for the functionality of that product, however, by using the /etc/phpmyadmin/apache2.conf, which is formatted completely different from the way a /etc/apache2/sites-available/site-name.conf file is configured. The syntax is completely different, but for reasons I can not explain, if I need to install a new site, rather then using the site-name.conf which will cause Invoice Ninja to reject access to any of the DocumentRoot paths, I use the /etc/phpmyadmin/apache2.conf and goto the bottom under the phpMyAdmins Config where I then create a new tag section using the markers and place the appropriate paths, mods, paths, and all other config required by the new site, save, then restart apache2. I do however take the security one step further since we are mixing Public and Internal sites on the same server, by adding the use of the .htpasswd and forcing who may try to access some internal site they may find if they poke hard enough, they are Required to the credentials for 1 of the only 2 users which are configured in the .htpasswd. Should they satisfy those credentials some how, the Web Apps Sites themselves each have their own user management / Login credentials required to access those sites. While I am of no illusion that what I have done is impermeable, I can assure you that it would take one VERY determined hacker, which years of experience to hack into the internal sites. There are enough layers, and the passwords chosen, are VERY Strong with a minimum Char length and the right combo of #'s, Special Chars, Upper/Lower Chars)</p>
<p>The slight problem I had was that I wanted my VPS Server which was hosting some of my Company's Public Sites, such as invoice ninja, to use the new Company Domain of systopiansoltions.com. In the case where the transfer of my Company's Home Page had been transferred to the new Addon Domain on my Site Ground Host, that would mena that I would have to different Servers, that would somehow need to use the systopiansoltions.com domain. And this is what I was asking, is there a way where I can have my site hosted by Site Ground, which the DNS A Record would have a different IP Address for the A Record to point the systopiansoltions.com domain to the Site Ground IP of 37.60.253.172 while somehow also pointing the Same DNS Servers A Record for my VPS Servers Sites to the IP Addr of my VPS sites which is 207.246.87.29. </p>
<p>The initial questions was more or less, without having any kind of a load balancer or router setup, is there anyway to have the same FQDN pointing in some ways to 2 different IP addresses. </p>
<p>Some thoughts I had that could possibly help me do this in the cleanest way possible, would be somehow to setup redirects, though I am not sure how that would work. </p>
<p>So this was the detailed explanation of my problem and question.</p>
<p>There was a second part to this question, which I mistakenly asked with the incorrect information, so I will ask that as well...</p>
<p>Since the VPS Host contains both Internal Sites and Public Customer Sites, I was wondering if there is a way to configure 2 different Domain Names each to a site based it's function...</p>
<p>Example: On the VPS server, the /etc/hosts had the following entries, (I am not including the "localhost" entries). And this is how it was configured up until today. The problem is that now that I registered the proper Company Domain Name, I would love to be able to have the systopian-web1.com Domain Name used for all of the Internal Sites, while somehow configuring the Public Customer Facing Invoice Ninja Site to use the systopiansoltions.com domain, however, I don't have a 3rd IP to usem and frankly, I am short of any kind of any Operational Budget for a while, so I can not afford to add a 3rd IP which would make this problem disappear all together. </p>
<blockquote>
<p>207.246.87.29 systopian-web1.com <--Primary IP</p>
<p>45.76.165.28 unms.systopian-web1.com <-- Secondary IP Added specifically for this app install as it required a dedicated IP Address.</p>
</blockquote>
<p>So, my question is, is there anyway to use 1 IP with 2 different Domain Names? Of does anyone know of some other way to accomplish this? </p>
<p>I do know that in my apache2/sites-available/invoice-ninja.conf I can change the following entries:
ServerName systopiansolutions.com
ServerAlias www.systopiansolutions.com
However, my initial thought was that in order to specify either of these two, the Domain Name needed to be defined in the /etc/hosts. Is that not the case? I am not sure how else these Domains would get resolved, since I know that I can not have two A Records where 2 Domain Names would point to the same IP address
ie have stopiansolutions.com resolve to 207.246.87.29 and then have my other domain name on the same VPS Server systopian-web1.com point to the Same IP 207.246.87.29, unless I was able to update the /etc/hosts contain the following</p>
<blockquote>
<p>207.246.87.29 systopian-web1.com <-- This Domain would be set for the internal websites that are used by me to provided functionality and services for my clients, but the Public does not have access to these sites</p>
<p>207.246.87.29 stopiansolutions.com <-- This Domain would be set for Invoice Ninja, since this is a Public Customer Facing Site, so I want all Public Customer facing sites, to use this domain.</p>
<p>45.76.165.28 unms.systopian-web1.com</p>
</blockquote>
<p>And just to remind you, that what I had asked earlier is still an open question, and that is, since my Public Company's Home Page is currently hosted on Site Ground, would there be any way to use the same Domain Name on two completely different servers each of which has a very different IP?** I may have resolved this another way, but the question still stands.</p>
<p>Short of that, I only have one other option, but I will explain that in a rewrite of my own reply, if I can modify that, if not, I will add another Reply.</p>
<p>I have one friendly request, especially when you guys reply to someone who you can clearly see if very green on using this site. Rather then respond the ways some of you did, which honestly had pushed me to the point that I was going to just leave the site, as I felt that the responses showed complete lack of tolerance towards those who are new, and are not yet all to familiar with the way things are here, and I was fairly ignorant to the expectations that some of you seemed to have regarding to how questions are posted, etc, but instead, try to be welcoming, and either send them a private message, or reply to their post and share with them the link that was later shared with me, after it was made clear to me that Green members, and their not well written questions, are anything but tolerated. This would have given me quite the incentive to have taken the time that I am now to rewrite the question. Sometimes people get so wrapped up in themselves, that they forget how far a small gesture of kindness goes. </p>
<p>If not for one of the other members taking the time to try and make sense of my question, and doing his best to provide me with a different way to consider my issue, I don't know that I would have ever return back again, which would have been a shame because, like many of you, I have 2 decades of Tech Support, Application Support Engineering, Systems Administration, Web Services, and Foreign Systems Integration & Migration Engineering Architect . I am quite sure at some point, I would have been able to share some of my many years of experience to assist others that do not have the Skill Levels that I do in many areas, and I love to help people. So while I am not trying to beat a dead horse, I would just ask that you approach new members with a little bit of forgiveness and acceptance, and rather then drop the reputation of the first post they make, try to point the in the right direction (as was done again, well after the fact) so they can learn how to write the most effective post, rather then making them feel unwelcome, and alienated from the membership. Hopefully, both my questions and what I just explained makes a difference and hopefully, the next person will not feel as rejected as I. </p>
<p>If anyone has any questions regarding the questions I posed as rewritten, please feel free to ask.</p>
<p>Cheers,</p>
<p>John</p>
| 0non-cybersec
|
Stackexchange
| 2,565
| 10,552
|
Size of indices (sub- and super- scripts). <p>I've been looking around for a way to change the size of indices (all through the manuscript).</p>
<p>I found a lot of stuff, which could work, but I refuse to use <em>without understandind</em>. (See for example <a href="https://tex.stackexchange.com/questions/46549/redefine-the-default-depth-of-superscript-and-subscript-document-wide">this post</a>)</p>
<p>I while ago, I asked about changing the size of the <code>\wedge</code> symbol and the answer was to define a command</p>
<pre><code>\newcommand{\w}{{\scriptstyle\wedge}}
</code></pre>
<p><strong>Question</strong></p>
<p>Is is possible to define something to make all indices a bit smaller?</p>
| 0non-cybersec
|
Stackexchange
| 220
| 707
|
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
| 349
| 1,234
|
Android MotionLayout autoTransition not working in beta7. <p>I want to automatically start an animation when my fragment gets displayed. I've set the <code>autoTransition</code> attribute to <code>animateToEnd</code>, but nothing happens.
I'm currently on constraintLayout beta7. When downgrading to beta6 or lower, nothing happens either except the animation being complete when the fragment enters the screen.
I've already attached a TransitionListener to the MotionLayout and observed the following:</p>
<ul>
<li><strong>On beta7</strong> OnTransitionChange is called once with a progress value so low I'll call it 0, OnTransitionEnd is never called and my TextView stays invisible</li>
<li><strong>On beta6 or lower</strong> OnTransitionChange is called twice, the first time with a rather random progress value between 0 and 0.5, and the second time with 1.0. After that, OnTransitionEnd is called and my TextView is immediatly visible, no animation there.</li>
</ul>
<p>This is the MotionScene xml file:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto">
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:duration="1000"
motion:motionInterpolator="easeInOut"
motion:autoTransition="animateToEnd">
</Transition>
<ConstraintSet android:id="@+id/start">
<Constraint android:id="@id/splash_head_TextView">
<Layout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="@id/topGuideLine"/>
<CustomAttribute
motion:attributeName="alpha"
motion:customFloatValue="0.0" />
</Constraint>
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint android:id="@id/splash_head_TextView">
<Layout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/splash_head"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toTopOf="@id/topGuideLine"/>
<CustomAttribute
motion:attributeName="alpha"
motion:customFloatValue="1.0" />
</Constraint>
</ConstraintSet>
</MotionScene>
</code></pre>
| 0non-cybersec
|
Stackexchange
| 889
| 3,092
|
$X = \{(a_n): a_n \in \mathbb{N} \text{ and } a_n \leq a_{n+1}$ for every $n \in \mathbb{N}\}$. <p>Let <span class="math-container">$X = \{(a_n): a_n \in \mathbb{N} \text{ and } a_n \leq a_{n+1}$</span> for every <span class="math-container">$n \in \mathbb{N}\}$</span></p>
<p>Prove <span class="math-container">$$\vert X\vert = \vert \mathbb R\vert=c$$</span></p>
<p>without using <span class="math-container">$2^{\aleph_0} = \aleph_0^{\aleph_0} = c$</span></p>
<h2>My Attempt</h2>
<p>I know that <span class="math-container">$\vert X\vert = \vert \mathbb R\vert=c$</span>, using this <span class="math-container">$$\forall n \geq 2, n^{\aleph_0} = \aleph_0^{\aleph_0} = c$$</span> (I still haven't proved that).<br>
I want to show this in another way.<br>
Probably looking for a surjective function between <span class="math-container">$X$</span> and <span class="math-container">$\mathbb{R}$</span> or the sucessions of natural numbers.</p>
<p>The thing is that the latter demonstration is after the exercise I'm asking about, so I believe that there is a way to prove it without using it, but I haven't found a way.</p>
| 0non-cybersec
|
Stackexchange
| 413
| 1,132
|
I am Pasquale Rotella, CEO of Insomniac, Electric Daisy Carnival and EDMBiz. Ask Me Anything.. **UPDATE: Pasquale will begin answering questions at 4:30 PM PST**
PROOF: https://twitter.com/PasqualeRotella/status/479699654666244097
Twitter: https://twitter.com/PasqualeRotella
Facebook: https://www.facebook.com/PasqualeRotella
**EDIT: I'm answering questions right now.** https://twitter.com/PasqualeRotella/status/479770564660174850
**2ND EDIT: Hey everyone, thanks so much taking the time to send in all these questions. It’s been a lot of fun. I’m gonna try and answer more of these at another time, but I’ve gotta head out to the Speedway. Let’s definitely do this again soon!**
| 0non-cybersec
|
Reddit
| 209
| 688
|
How to check if SQL Server Tables are System Tables. <p>Using the stored procedure <code>sp_msforeachtable</code> it's possible to execute a script for all tables in a database.</p>
<p>However, there are system tables which I'd like to exclude from that. Instinctively, I would check the properties <code>IsSystemTable</code> or <code>IsMSShipped</code>. These don't work like I expect - I have for example a table called <code>__RefactorLog</code>:</p>
<p><img src="https://i.stack.imgur.com/Wkfjg.png" alt="System table"></p>
<p>But when I query if this is a system or MS Shipped table, SQL Server reports none of my tables are system tables:</p>
<pre><code>exec (N'EXEC Database..sp_msforeachtable "PRINT ''? = '' + CAST(ObjectProperty(Object_ID(''?''), ''IsSystemTable'') AS VARCHAR(MAX))"') AS LOGIN = 'MyETLUser'
-- Results of IsSystemTable:
[dbo].[__RefactorLog] = 0
[schema].[myUserTable] = 0
</code></pre>
<p>and</p>
<pre><code>exec (N'EXEC Database..sp_msforeachtable "PRINT ''? = '' + CAST(ObjectProperty(Object_ID(''?''), ''IsMSShipped'') AS VARCHAR(MAX))"') AS LOGIN = 'MyETLUser'
-- Results of IsMSShipped:
[dbo].[__RefactorLog] = 0
[schema].[myUserTable] = 0
</code></pre>
<p>When I look into the properties of the table (inside SSMS), the table is marked as a system object. An object property like <code>IsSystemObject</code> doesn't exist though (AFAIK).</p>
<p>How do I check if a table is a system object, apart from the object property? How does SSMS check if a table is a system object?</p>
| 0non-cybersec
|
Stackexchange
| 494
| 1,522
|
[UPDATE] I[29F] just walked in on my husband[30M] making out with my sister[33]. Please help.. Thank you everyone for your kind words and PMs. Your words really helped me when I was in the lowest possible spot I have been in. A lot has happened since I woke up. First of all, I am no longer going to refer to Lisa as my sister because she is not my sister any longer.
I woke up this morning and felt like complete shit and didn't want to get up. I went and got a pregnancy test and thank fucking GOD I am not pregnant. It was bittersweet because we have been trying to get pregnant for a while now and I never thought I'd be so glad to see I wasn't pregnant.. I am really upset over the way things have turned out and now I am having these weird feelings that I want to be pregnant after all. I don't know whats going on but its just adding on another difficult layer of shit going on right now..
A little while later I left the house to get groceries and when I opened my mailbox there was a letter in it from Lisa. After I got home I opened it and read it. I am not going to rewrite it because I can not even stand to look at the letter again. Basically it said that she apologizes for how things turned out and she explained to me that she was very vulnerable after losing her husband. That after spending so much time with my husband she started to fall for him and that she thought she wouldn't ever love anyone else again so when she realized she loved my husband she knew she couldn't let him go. No one else can fill the hole in her heart.. Lisa promised they never physically did anything before that kiss I caught them in and she went on to say she needs me in her life and that she hopes I can forgive her. I can't write anymore about this right now I might add in the rest later. I am a fucking mess.
Rick called me a little while ago. I didn't pick up the phone so he texted me and told me that he still loves me and that we can find a way to work this out. I don't know what the fuck that means since he just left me for Lisa. Now I'm really confused because now that I'm not pregnant, I want to be, and I want my marriage to not be over even though I hate him for what hes done to me. And why would he text me that? Is he changing his mind? I am so confused. I wish these past few days never happened so there would be nothing wrong still.. I know I shouldn't forgive him if he wants another chance but 10 years of marriage... We were going to be parents.. Fuck I am so confused and hurt I can't even think straight..
TDLR: Rick left me for Lisa. I'm not pregnant but I am having weird feelings about that. Lisa left me a letter in my mailbox and then Rick attempted to call me. He texted me something that confused me even more. Now I have no idea what is going on and I don't know what to do. Is he changing his mind?
| 0non-cybersec
|
Reddit
| 664
| 2,841
|
Rotated table (90 degree in whole page) in two-column article. <p>I tried to make a table rotated in one page (according to ferahfeza's post in <a href="https://tex.stackexchange.com/questions/170205/rotate-table-90-degrees-and-stretch-to-fill-whole-page">rotate table (90 degrees) and stretch to fill whole page</a>) but when I paste the same code in two-column article format, it didn't work properly, the table is placed on text (i.e, the table didn't take a new page but instead it printed on text in the same page)</p>
<p>How to do that ?</p>
<p>Thank you</p>
| 0non-cybersec
|
Stackexchange
| 176
| 567
|
Reference for subsemigroups of $\mathbb{N}^n$. <p>A well known result about the natural numbers $\mathbb{N}$ says that for any finite subset $A \subset \mathbb{N}$ there exists $R \ge 0$ such that if $n$ is in the subgroup of $\mathbb{Z}$ generated by $A$ and if $n \ge R$ then $n$ is in the semigroup generated by $A$. </p>
<p>Are there any references to a higher dimensional version of this result? </p>
<p>The version I want goes like this. </p>
<ul>
<li>Take a finite subset $U$ of $\mathbb{N}^n$. Let $C_U$ be the smallest closed cone in $\mathbb{R}^n$ containing $U$, i.e. all non-negative real linear combinations of $U$. Let $G_U$ be the subgroup of $\mathbb{N}^n$ generated by $U$, i.e. all integer linear combinations. Let $S_U$ be the subsemigroup generated by $U$, i.e. all non-negative integer linear combinations. Then there exists $R>0$ such that for every $v \in G_U$, if the ball around $v$ of radius $R$ is contained in $C_U$ then $v \in S_U$.</li>
</ul>
| 0non-cybersec
|
Stackexchange
| 318
| 979
|
What is wrong with A Scanner Darkly?. I just watched A Scanner Darkly for the first time. I didn't have high expectations, because I knew that it generally wasn't well-received. I love sci-fi films and stories. I love unique or astonishing visuals in film. I love Philip K. Dick. I love *A Scanner Darkly* (the novel). I love Keanu Reeves, Robert Downey Jr, Wynona Ryder, and Woody Harrelson. I love stories about drugs and drug addiction. This film seemed like the perfect movie to me. So why didn't I like it very much? I'm really asking. Did anybody else have this experience?
I think I would have liked to see more about the company at which Keanu Reeves' character worked, like more explanation about their operations. I think I would have also liked to know more about the origins and history of Substance D. Instead it kind of just focused on the day-to-day lives of these addicts, which got kind of boring at times (such as the bike scene).
| 0non-cybersec
|
Reddit
| 232
| 950
|
Kerberos realm understanding. <p>Could someone summarise why realms are necessary in Kerberos and the advantages of the concept.</p>
<p>I'm struggling to isolate everything I know / beginning to understand into some well defined points for revision. My research just uncovers articles with so much depth can barely make sense of it. I understand what they are. I am aware that using them means that data is distributed thus advantageous in the event of a system failure and that it is easier to manage many small realms instead of one huge one.</p>
<p>Thanks in advance</p>
| 0non-cybersec
|
Stackexchange
| 133
| 576
|
General Solution of $\sin(mx)+\sin(nx)=0$. <p>Problem:</p>
<blockquote>
<p>Find the general solution of $$\sin(mx)+\sin(nx)=0$$</p>
</blockquote>
<p>My attempt:
$$$$
$$\sin(mx)=-\sin(nx)$$
$$=\cos\left(\dfrac{\pi}{2}-mx\right)=\cos\left(\dfrac{\pi}{2}+nx\right)$$
Using $\cos\theta=\cos\alpha\Rightarrow \theta=2n\pi\pm \alpha,$$$$$
$$\text{CASE } 1:\theta=2n\pi+ \alpha$$
$$\dfrac{\pi}{2}-mx=2p\pi+\left(\dfrac{\pi}{2}+nx\right)$$
$$\Rightarrow x=\dfrac{-2p\pi}{m+n}$$$$$$
$$\text{CASE } 2:\theta=2n\pi- \alpha$$
$$\dfrac{\pi}{2}-mx=2q\pi-\left(\dfrac{\pi}{2}+nx\right)$$
$$\Rightarrow x=\dfrac{(2q-1)\pi}{n-m}$$$$$$
$$\Longrightarrow x=\dfrac{-2p\pi}{m+n} \text{ or } x=\dfrac{(2q-1)\pi}{n-m}$$</p>
<p>I checked my calculations again and again, but was unable to notice any flaw. However, the book I use categorically mentions the solutions for $x$ as $x=\dfrac{2j\pi}{m+n}$ or $x=\dfrac{(2k+1)\pi}{m-n}$
I would be truly grateful if somebody could please show me my errors. Many thanks in advance!</p>
<p>PS. Kindly note that $p,q,j,k\in \mathbb Z$</p>
| 0non-cybersec
|
Stackexchange
| 428
| 1,063
|
The Number of Standard Young Tableau of a Frame. <p>Suppose $\mathbb{F}$ be a frame corresponding to a partition $m_1 \geqslant m_2\geqslant...\geqslant m_r>0$ and $f(\mathbb{F})$ represents the number of standard young tableaux.
Then i want to prove that</p>
<blockquote>
<p>$(n+1)f(\mathbb{F})=\sum_{j=1}^{r+1}f(m_i,m_j+1)$</p>
</blockquote>
<p>where we assume $m_{r+1}=0$ and $ n= \sum_{i=1}^{r}m_i$ and use $f(\mathbb{F})=\sum_{j=1}^{r}f(m_i,m_j-1)$ </p>
<p>Notation:
$f(m_i,m_j-1)$ denotes number of standard tableau corresponding to the partition obtained from mother partition by reducing $1$ in the $j$th place and all other remains same, we assume $f(m_1,...,m_k,0,0,0....)=f(m_1,...,m_k)$</p>
<p>My try:
I tried to do it inductively and tried to go from right to left as follows.</p>
<blockquote>
<p>$f(m_1+1,m_2,...,m_r)= f(m_i) +
f(m_1+1,m_2-1,...,m_r)+...+f(m_1+1,m_2,...,m_r-1)$
$f(m_1,m_2+1,...,m_r)=.............$</p>
</blockquote>
<p>and then adding side by side i got the proof. but suddenly i realised for the second equation if $m_1=m_2$ then quantity on the left side is always 0 while the quantity on the right side is always greater than zero as $f(m_i)>0$ so, </p>
<blockquote>
<p>where am i wrong?</p>
</blockquote>
| 0non-cybersec
|
Stackexchange
| 512
| 1,264
|
Schrödinger operator with delta (zero range) interaction.. <p>I am reading the book of Albeverio named Solvable models in quantum mechanics. In the first chapter it is explained how to realize the operator $"-\Delta+\delta_0"$ as a self adjoint operator on $L^2(\mathbb{R}^3)$. I explain the main idea.
At the beginning one has to consider $H:=-\Delta_{|_{C^{\infty}_0}(\mathbb{R}^3\setminus \{0\})}$. One has to show that such an operator admits some self adjoint extensions on $L^2(\mathbb{R}^3)$, that will be, by definition, our operators $"-\Delta+\delta_0"$.
There are two technical things that I didn't understand.
The first one: the book says that one can show (it is not trivial) that the adjoint of $H$ is $H^*=-\Delta$ with domain
$$\mathcal{D}(H^*)=\{g\in H^{2,2}_{loc}(\mathbb{R}^3\setminus \{0\})\cap L^2(\mathbb{R^3})\,\,s.t.\,\, \Delta g\in L^2(\mathbb{R^3})\}.$$
I really do not understand, maybe it is a very stupid thing, why this space is not equal to $H^2(\mathbb{R}^3)$.</p>
<p>I explain my doubt: I say that $g\in L^2(\mathbb{R}^3)$ and $\Delta g\in L^2(\mathbb{R}^3)$ allow me to consider their Fourier transform, getting $(1+|\xi|^2)\hat{g}\in L^2(\mathbb{R}^3)$, which says to me that $g\in H^2(\mathbb{R}^3)$. Why I'm wrong?</p>
<p>The second thing that i do not understand is the following.
The autor says that a straightforward calculation shows that
$$\psi(k,x)=\frac{e^{ik|x|}}{|x|},\,\, x\neq 0,\,\, \mathfrak{Im}(k)>0,$$
is the only one solution of
$$H^* \psi(k)=k^2\psi(k),\,\, \psi(k)\in\mathcal{D}(H^*),\,\, k^2\in \mathbb{C}\setminus\mathbb{R},\,\, \mathfrak{Im}(k)>0.$$
I do not know how to procede in proving this fact.</p>
<p>Can someone help me to understand this two facts?
I apologize for the technical, maybe stupid, question.
Thanks.</p>
| 0non-cybersec
|
Stackexchange
| 600
| 1,803
|
She's Still Here. I don't tell very many people this story because most just tell me "they were just dreams" or "you're thinking about it too much." I'm telling you right now, I have had my fair share of nightmares, and these are different. The story is a bit long, and for that I'm sorry, but I needed to get it out there.
It all started when I was in high school. I had this weird, really vivid dream where my sister and I were taking a tour of this huge mansion. Before we stepped through the door, the tour guide gave us a warning.
"Whatever you do, don't say her name."
She never said who, and she never mentioned the name or what would happen if we said it, but I was immediately filled with a sense of foreboding. My sister, just like in real life, didn't believe in these things. She laughed as we started the tour and asked if I was scared. I told her I was, that it was really creepy, and I asked her not to say the name. I begged her not to say the name.
I covered my ears as she yelled out the name, hoping that if I didn't hear it, it wouldn't be a problem. I never heard the name, and to this day I don't know what it was. The tour guide looked at us with pity and shook her head. I yelled at my sister, but she just kept laughing.
I was creeped out now, expecting something to happen. I calmed down after a while, thinking maybe it was just a story after all. Then I noticed the extra footsteps. I told myself I was imagining it, but then I noticed in the mirrors we passed a head that kept peeking around corners. She was following us.
Finally, in the dream we returned home to go to sleep. In those days my sister and I slept in the same room in a bunk bed. She had the top bunk, and I had the bottom. This is where the dream started to get even more strangely vivid. Normally in my dreams, the rooms are distorted in some way, but in this one everything was perfect, just like in real life. I sat in the dark and said a quick prayer, hoping that I had just imagined everything in the mansion. Then I noticed the figure in the middle of the room. It was a young girl, maybe ten years old. She had bobbed brown hair and was wearing a tattered, light colored dress with frills and patched with mud. She was staring at me, though in the dark it almost looked like she didn't have eyes.
My heart started pounding as she started walking toward me. I started chanting to myself, trying to wake up as she inched closer and closer.
"It's just a dream. It's just a dream. IT'S JUST A DREAM!"
I woke up. I looked around my room, still terrified. No matter what anyone says, I know I was awake. I made absolutely sure, just in case I was still asleep and the girl popped up again. Finally, satisfied that the nightmare was over, I lay back and drifted off into an uneasy sleep.
Only to open my eyes in my dream, back in my bedroom. I heard a sound above me and leaned out to look up at my sister's bunk. There, sitting on my sister's chest, was the girl. This time she really didn't have eyes, just black holes that seemed to go back forever into her head and she had an insane, toothless smile that was far too wide. She turned to me slowly with her head cocked unnaturally far to the right, and I will never, ever forget that creaky voice that escaped her lips.
"Nice try."
Needless to say, I found that whole dream very creepy. I told a few friends, we laughed about it, and I thought it was all over. But then I started noticing that in almost every dream I had, whether it was a nightmare or even just a silly or weird dream, it always seemed like someone was following me, watching me. If there was a mirror anywhere in the dream, there was always an extra figure lurking in it. Whenever I saw her or heard her footsteps, I would be seized by terror until she was gone, and then whatever the dream was would continue until she showed up again or I woke up. Then came the next vivid dream.
This time, I was walking around my house, when suddenly, my house slowly morphed into an entirely different house. I shrugged it off, as often happens in dreams, and began to explore. I walked down some stairs into what appeared to be the living room.
There she was in the middle of the room. She was smiling at me, but not the unnatural smile she'd had in the first dream. She looked normal this time, if a little pale. I thought about running, but she pointed to a little table she had set up next to a sliding glass door.
"We're going to have a tea party."
She didn't say it in a threatening way, but there was something about the way she smiled, or maybe it was the way she held her head at an odd angle, that made me feel like something wasn't right with her. I felt that if I didn't do what she wanted, she would snap and become the girl I had seen on my sister's chest that first night.
I sat down on the floor across from her at the little table, and she poured some tea for me and for herself. I didn't dare touch it, my arms pasted firmly to my side with fear, but she sipped at hers and began chatting cheerily at me. I don't remember much of what she said, my heart was pounding too loudly in my ears for me to hear clearly.
She babbled on for what seemed like forever before I noticed the other person. He was a shadow figure, lurking in the corner behind a TV set. He was very large and wide shouldered, wearing what looked like a hat and a coat. As the girl talked, he became clearer, more solid, but as he became more solid, her babbling became more and more frantic and crazed. Her smile was frozen in place, but her eyes became wider and more terrified as she spoke. Suddenly I became aware of what she was saying.
"...No need to be afraid. He won't hurt anyone. He's my friend. Won't hurt anyone. He's just wants to be my friend. He talks to me and plays with me. Never hurt anyone. He's my friend. Don't have to be afraid." And so on, getting faster and faster, as he kept getting bigger and bigger, almost touching the ceiling and blocking out most of the light.
She kept staring at me in terror as she spoke, until I finally woke up.
This time, I only told the story to friends that I knew would believe me. We talked about it, tried to figure out who the man was. Did he kill her? Was his presence linked with her insanity? Was he human or something else? She continued to haunt my every dream, always around the corner, always behind me in mirrors, always there.
Then came the third vivid dream. By this time, I was a sophomore in college, living in the dorms with a roommate, but in this dream I was back in a one-person dorm room that I had lived in while taking a summer course. I was doing my hair in the mirror when I started noticing things moving behind me. I would see books move, but they would be right where I left them when I turned around. The bed covers would crinkle up, but would be made up perfectly when I turned around. I realized that it was her again, though she never showed herself.
Suddenly, the covers lifted off the bed, a human shape underneath them with glowing eyes creeping towards me in the mirror. Finally, I had had it. I was scared and crying and I whirled around to face the girl and screamed with all my might.
"You always do this to me! You can't treat me like this! It's not fair!"
I was woken up by my roommate who said I had been whimpering in my sleep and mumbling.
It's been two years since then, and I haven't had another dream about the girl. I hope it stays that way, but every now and then in my dreams I feel someone watching me, or see a glimpse of a tattered dress whipping around a corner in a mirror, or hear extra footsteps when I walk, and I know she's still here.
| 0non-cybersec
|
Reddit
| 1,838
| 7,701
|
How to detect dark photos in Android. <p>I have an Android app where user takes a photo of himself with the front camera and then the photo is being uploaded to my server. I notice that many photos comes to my server too dark (sometimes almost impossible to cleary see the user face).</p>
<p>I would like to filter out such photos and show notification (eg. "Photo is too dark. Take one more picture") to the user in the app side. How I could accomplish such task in Android?</p>
<p><strong>EDIT:</strong></p>
<p>I have found out how to calculate brightness for one single pixel (thank's to this answer: <a href="https://stackoverflow.com/a/16313099/2999943">https://stackoverflow.com/a/16313099/2999943</a>): </p>
<pre><code>private boolean isPixelColorBright(int color) {
if (android.R.color.transparent == color)
return true;
boolean rtnValue = false;
int[] rgb = {Color.red(color), Color.green(color), Color.blue(color)};
int brightness = (int) Math.sqrt(rgb[0] * rgb[0] * .299 + rgb[1]
* rgb[1] * .587 + rgb[2] * rgb[2] * .114);
if (brightness >= 200) { // light color
rtnValue = true;
}
return rtnValue;
}
</code></pre>
<p>But still I don't have clear idea how to determine whole image brightness "status". Any suggestions?</p>
| 0non-cybersec
|
Stackexchange
| 396
| 1,306
|
Existence of a convergent series with a "sub-series" of smaller radius of convergence.. <p>This is a past qualifying exam question:</p>
<blockquote>
<p>True or false? There is a sequence of complex numbers $\{a_n\}_{n=0}^\infty$ and strictly increasing sequence of integers $\{p_n\}$ with $p_n \ge n$, such that the radius of convergence of
$$\sum_{n=0}^\infty a_nz^n$$
is one, but
$$\sum_{n=0}^\infty a_n z^{p_n}$$
is less than one.</p>
</blockquote>
<p>I can see that if we took the "sub-series" to be $\sum a_{p_n} z^{p_n}$, then the opposite would be true: that the radius of convergence for the "sub-series" would be $\ge$ the radius of convergence for the regular series. But this is not the problem at hand.</p>
| 0non-cybersec
|
Stackexchange
| 233
| 743
|
How to protect potentially destructive command line options?. <p>I'm curious if anyone can help me with what the best way to protect potentially destructive command line options is for a linux command line application?</p>
<p>To give a very hypothetical scenario: imagine a command line program that sets the maximum thermal setting for a processor before emergency power off. Lets further pretend that there are two main options, one of which is --max-temperature (in Celsius), which can be set to any integer between 30 & 50. There is also an override flag --melt which would disable the processor from shutting down via software regardless of how hot the processor got, until the system electrically/mechanically failed. </p>
<p>Certainly such an option like --melt is dangerous, and could cause physical destruction at worst case. But again, lets pretend that this type of functionality is a requirement (albeit a strange one). The application has to run as root, but if there was a desire to help ensure the --melt option wasn't accidentally triggered by confused, or not experience users how would you do that?</p>
<p>Certainly a very common anti-pattern (IMO) is to hide the option, so that --help or the man page doesn't reveal its existence, but that is security through obscurity and could have the unintended consequence of a user triggering it, but not being able to find out what it means.</p>
<p>Another possibility is to change the flag to a command line argument that requires the user to pass --melt OVERRIDE, or some other token as a signifier that they REALLY mean to do this. </p>
<p>Are there other mechanisms to accomplish the same goal?</p>
| 0non-cybersec
|
Stackexchange
| 381
| 1,677
|
Cannot enable migrations for Entity Framework in class library. <p>I just got on board with EF 5 and am using their code-first migrations tool but I seem to get an error when I try to enable migrations.</p>
<p>I type <code>Enable-Migrations</code> into the package manager console and then it says</p>
<blockquote>
<p>No classes deriving from DbContext found in the current project.<br>
Edit the generated Configuration class to specify the context to enable migrations for.<br>
Code First Migrations enabled for project MyApp.MvcUI.</p>
</blockquote>
<p>It then creates a Migrations folder and a Configuration class in my MvcUI project. Thing is, my DbContext lives in a class library project called MyApp.Domain. It should be doing all that in that project and should have no problem finding my DbContext.</p>
| 0non-cybersec
|
Stackexchange
| 213
| 821
|
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
| 349
| 1,234
|
Unix Shell/SSH config to allow TCP port forwarding without showing a command prompt. <p>I'm running a Debian Linux. I'd like to have a user account that is able to connect via SSH for TCP-forwarding <em>only</em>, without a command prompt.</p>
<p>e.g the following would work (from a remote computer):</p>
<pre><code>ssh -D1234 user@myhost
</code></pre>
<p>but no command prompt would appear.</p>
<p>Using a shell like /bin/false or /sbin/nologin is too restrictive as it doesn't even allow the user to log in. A shell that only allows the "exit" or Ctrl+D commands would do the job.</p>
<p>I know that something similar is possible to allow only SFTP, but I can't find the equivalent for TCP forwarding.</p>
<p>Thanks</p>
| 0non-cybersec
|
Stackexchange
| 219
| 729
|
Eventlog entry for allowed connection in Windows Firewall. <p>I was seeing a lot of entries in the eventlog:</p>
<pre><code>The Windows Filtering Platform has permitted a connection.
Application Information:
Process ID: 4
Application Name: System
Network Information:
Direction: Inbound
Source Address: 10.xxx.xxx.xxx
Source Port: 80
Destination Address: 10.xxx.xxx.xxx
Destination Port: 31773
Protocol: 6
Filter Information:
Filter Run-Time ID: 67903
Layer Name: Receive/Accept
Layer Run-Time ID: 44
</code></pre>
<p>We have a loadbalancer which checks every second to see if the application is still running (a health check).
The logs contain large amounts of this kind of entries, which makes the Event Viewer slow and it's difficult to find the more interesting logs.</p>
<p>How do I make sure these messages don't end up in the event logs?</p>
| 0non-cybersec
|
Stackexchange
| 250
| 1,032
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.