text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Epidemic spacial diffusion problem.. how to draw a graph of differential system of second order with partial derivative. <p>I'm currently working on how to simulate the diffusion of an epidemic in a population. If we don't consider that the population is moving in space, then the differential system is the following: <a href="https://i.stack.imgur.com/nkMMV.png" rel="nofollow noreferrer">Differential System SIS without spacial diffusion</a>. You'll find the corresponding program below. If we consider that the population (the infected people to be more specific) have an anarchic mobility, the differential system will contain a second order partial derivative in respect to the spacial variable x (the problem is considered in one spacial dimension only) as shows the following picture: <a href="https://i.stack.imgur.com/ERFbB.png" rel="nofollow noreferrer">Differential System SIS with spacial diffusion included</a>. The problem I have is how to implement that second order partial derivative in the program, and how draw the graphs of such a differential system.. (even though there is a spacial variable, the axes remain the same: Population and Time) If you take off the partial derivative, it becomes a simple differential system and the corresponding program I made is the following:</p> <pre><code>from scipy import arange from scipy.integrate import odeint import matplotlib.pyplot as plt import numpy as np N0 = 1000000 #Initial population number I0 = 100 #Initial infected number PopuIni = [N0,I0] b=1/3000000 #infection rate β g=1/20 #cure rate of Infected people ɣ d=5/1000 #death rate, not related to the epidemic (common between infected and susceptible) n=4/1000 #birth rate (vertical infection from parents to progeny is not considered here) def EpidEvol(N,t): S,I=N derS = n*(S+I) + g*I - d*S - b*S*I derI = b*S*I - d*I - g*I return [derS,derI] tmax=157 t=arange(0,tmax,0.1) N=odeint(EpidEvol,PopuIni,t) </code></pre> <p>Thank you for your attention.. I sincerely hope to receive help from you</p> <p><strong>UPDATE 1:</strong> I found this website which provides a method of solving partial differential equations, but I genuinely don't know how to implement this in my program.. <a href="http://hplgit.github.io/prog4comp/doc/pub/p4c-sphinx-Python/._pylight006.html" rel="nofollow noreferrer">http://hplgit.github.io/prog4comp/doc/pub/p4c-sphinx-Python/._pylight006.html</a></p>
0non-cybersec
Stackexchange
Missing Dog.
0non-cybersec
Reddit
Characteristic function of standard normal distribution using this method.. <p>Lets have $f(t)$ be this characteristic function. I am told that $f'(t)=-t \cdot f(t)$ and that this can be proven, I found using partial integration and the dominated convergence theorem. I am aware of these theorems. I unfortunately do not know how to do this. The attempts tried are not of value worth sharing.</p> <p>$$X:N(0,1)$$ $$f(t)=\int_{-\infty}^{\infty}e^{itx}\frac{1}{2\pi}e^{-\frac{x^2}{2}}dx$$ </p>
0non-cybersec
Stackexchange
Your July NoSleep Contest Winner is.... [nwf0165](http://www.reddit.com/user/nwf0165) with their story [I've been watching my friends on Netflix](http://www.reddit.com/r/nosleep/comments/2aj1t2/ive_been_watching_my_friends_on_netflix/)! Congratulations! As a reminder, the winner will receive: * A [NoSleep t-shirt!](http://nosleep.spreadshirt.com) * One month of reddit gold from the moderators * User flair in /r/NoSleep signifying the month in which they won the contest * Their story will be featured in an eBook that will be released approximately every three months. Thank you, /u/EtTuTortilla! * The winning story will be featured in an episode of [The NoSleep Podcast](http://www.thenosleeppodcast.com/) (providing the story is suitable for an audio adaptation)... AND they will receive a season pass! Thank you, /u/MikeRowPhone! In addition, the winner and second-place winner will each receive one of the following: * A license to [SmartEdit](http://www.smart-edit.com/), a new, first-pass-editing tool for creative writers and novelists. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-or- * A copy of [Scrivener](http://www.literatureandlatte.com/scrivener.php) provided by Literature and Latte. The eBook will henceforth include the top four stories (winner and three runners up) from each monthly contest. Also included in the next volume of the eBook will be: * [I shouldn't have connected to my new neighbor's WiFi....](http://www.reddit.com/r/nosleep/comments/2awr4u/i_shouldnt_have_connected_to_my_new_neighbors_wifi/) by [Crapple_Facts](http://www.reddit.com/user/Crapple_Facts) * [Her Name was Emma](http://www.reddit.com/r/nosleep/comments/29z7j8/her_name_was_emma/) by [alackofcoasters](http://www.reddit.com/user/alackofcoasters) * [21 day quarantine](http://www.reddit.com/r/nosleep/comments/29qusu/21_day_quarantine/) by [jdpatric](http://www.reddit.com/user/jdpatric) Vote counts can be seen [here](http://i.imgur.com/HqXO4Sd.png). If you would like to contribute an extra prize to the winners of the next contest, please don't hesitate to send a message to me or to modmail! Remember, if you didn't win this month, don't be discouraged! We will be running the contest in the middle of every month for as long as we can! *** Visit our facebook page: www.facebook.com/nosleepcommunity If you're interested in the NoSleep t-shirt, you can find that at http://nosleep.spreadshirt.com! Sales of these shirts fund contest prizes.
0non-cybersec
Reddit
Time complexity of counting triangles in planar graphs. <p>Counting triangles in general graphs can be done trivially in $O(n^3)$ time and I think that doing much faster is hard (references welcome). What about planar graphs? The following straightforward procedure shows that it can be done in $O(n\log{n})$ time. My question is two-fold:</p> <ul> <li>What is a reference for this procedure?</li> <li>Can the time be made linear?</li> </ul> <p>From the algorithmic proof of Lipton-Tarjan's planar separator theorem we can, in time linear in the size of the graph, find a partition of vertices of the graph into three sets $A,B,S$ such that there are no edges with one endpoint in $A$ and the other in $B$, $S$ has size bounded by $O(\sqrt{n})$ and both $A,B$ have sizes upper bounded by $\frac{2}{3}$ of the number of vertices. Notice that any triangle in the graph either lies entirely inside $A$ or entirely inside $B$ or uses at least one vertex of $S$ with the other two vertices from $A \cup S$ or both from $B \cup S$. Thus it suffices to count the number of triangles in the graph on $S$ and the neighbours of $S$ in $A$ (and similarly for $B$). Notice that $S$ and its $A$-neighbours induce a $k$-outer planar graph (the said graph is a subgraph of a planar graph of diameter $4$). Thus counting the number of triangles in such a graph can be done directly by dynamic programming or by an application of Courcelle's theorem (I know for sure that such a counting version exists in the Logspace world by Elberfeld et al and am guessing that it also exists in the linear time world) since forming an undirected triangle is an $\mathsf{MSO}_1$ property and since a bounded width tree decomposition is easy to obtain from an embedded $k$-outer planar graph.</p> <p>Thus we have reduced the problem to a pair of problems which are each a constant fraction smaller at the expense of a linear time procedure. </p> <p>Notice that the procedure can be extended to find the count of the number of instances of any fixed connected graph inside an input graph in $O(n\log{n})$ time.</p>
0non-cybersec
Stackexchange
Server over VPN?. <p>I don't know that much about VPN, so it could be that this is utterly impossible. Here's hoping, though.</p> <p>I would like to forward a port from my router to a machine connected to the network via VPN. That way, I could run a simple server on my laptop, and it would continue to work at the same address no matter where I am. The trick is that I don't want people connecting to the server to have to join the VPN. It should be completely transparent to the end-user.</p> <p>If it's not possible with VPN, is there some other technology that would make this possible? Basically just forwarding a port to a remote machine, one without a static IP.</p>
0non-cybersec
Stackexchange
A generous moderator of a subreddit walks into a bar.. And orders everyone around.
0non-cybersec
Reddit
trying to call a method in the where of a linq statment. <p>Below is the code I'm using but it replies with</p> <blockquote> <p>Method 'Boolean isUser(System.String)' has no supported translation to SQL.</p> </blockquote> <p>Any help? Btw I'm using <strong>linq to SQL</strong> data source</p> <pre><code>public void dataBind() { using (var gp = new GreatPlainsDataContext()) { var emp = from x in gp.Employees let k = isUser(x.ID) where x.ActivtyStatus == 0 &amp;&amp; isUser(x.ID) != false orderby x.ID select new { ID = x.ID, Name = x.FirstName + " " + x.MiddleName }; ListView1.DataSource = emp; ListView1.DataBind(); } } public static bool isUser(string ID) { int temp; bool x = int.TryParse(ID, out temp); return x; } </code></pre> <p>I found a solution to query the result of the first query as objects but is that good cause I will passing through my data twice.</p> <hr> <p>the updated code that worked in the end after using the like as advised by Anders Abel</p> <pre><code>public void dataBind() { using (var gp = new GreatPlainsDataContext()) { var emp = from x in gp.Employees where x.ActivtyStatus == 0 &amp;&amp; SqlMethods.Like(x.ID, "[0-9]%") orderby x.ID select new { ID = x.ID, Name = x.FirstName + " " + x.MiddleName }; ListView1.DataSource = emp; ListView1.DataBind(); } } </code></pre>
0non-cybersec
Stackexchange
SoundLink Mini I&#39;s Support for aac. <p>I'm using Soundlink Mini I with my macbook pro, running macOS High Sierra 10.13.6. I'm unable to get Soundlink Mini from using aac. This is what I have done:</p> <pre><code>Download and open "Bluetooth Explorer" Open "audio option" window Select "enable aac" Turn Soundlink Mini on. It won't connect (disconnect/reconnect repeatedly). Unselect "enable aac" Turn Soundlink Mini on. It connect immediately. </code></pre> <p>This is the log I get:</p> <pre><code>Process: Bluetooth Explorer 6.0.9 Operating System: Version 10.13.6 (Build 17G65) Date: 2020-02-16 05:17:32 +0000 Initializing Bluetooth... Bluetooth Support Initialization complete. updateChainPower error: 82 Audio Graph: Initializing... Audio Graph: Bluetooth Support Initialization complete. Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:17:44 +0000 Handle: 0xC disconnected, reason: 0x16 2020-02-16 05:17:44 +0000 Handle: 0xC disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected Feb 16 13:17:43 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.security.cloudkeychainproxy3[80827]): Service exited with abnormal code: 1 Feb 16 13:17:43 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.security.cloudkeychainproxy3): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Feb 16 13:17:44 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.bluetoothaudiod): Service only ran for 0 seconds. Pushing respawn out by 1 seconds. 2020-02-16 05:17:46 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:17:53 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:17:53 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:17:53 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:17:53 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:17:53 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:17:59 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:17:59 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:17:59 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:17:59 +0000 Handle: 0xC disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:17:59 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:18:05 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:05 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:05 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:18:05 +0000 Handle: 0xB disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:18:06 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:18:12 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:12 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:12 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:18:12 +0000 Handle: 0xC disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:18:13 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB Feb 16 13:18:11 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.mathpix.com-mathpix-snipping-tool-noappstore-helper[80863]): Could not find and/or execute program specified by service: 155: Refusing to execute/trust quarantined program/file: com.mathpix.com-mathpix-snipping-tool-noappstore-helper Feb 16 13:18:11 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.mathpix.com-mathpix-snipping-tool-noappstore-helper): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Feb 16 13:18:13 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.bluetoothaudiod): Service only ran for 0 seconds. Pushing respawn out by 1 seconds. 2020-02-16 05:18:19 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:19 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:19 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:18:19 +0000 Handle: 0xB disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:18:20 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:18:26 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:26 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:26 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:18:26 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:18:26 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:18:51 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:18:51 +0000 Handle: 0x0 disconnected, reason: 0x00 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:18:51 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:18:51 +0000 Handle: 0xB disconnected, reason: 0x08 Feb 16 13:18:49 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.qiuyuzhou.shadowsocksX-NG.http[80903]): Service exited with abnormal code: 1 Feb 16 13:18:49 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.qiuyuzhou.shadowsocksX-NG.http): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Feb 16 13:18:51 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.bluetoothaudiod): Service only ran for 0 seconds. Pushing respawn out by 1 seconds. 2020-02-16 05:18:56 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:19:09 +0000 Mode change 12 for handle: 0x2 2020-02-16 05:19:09 +0000 Mode change 12 for handle: 0x2 2020-02-16 05:19:10 +0000 Mode change 12 for handle: 0x0 2020-02-16 05:19:10 +0000 Mode change 12 for handle: 0x0 2020-02-16 05:19:10 +0000 Handle: 0xC disconnected, reason: 0x16 2020-02-16 05:19:10 +0000 Handle: 0xC disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:19:11 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:19:43 +0000 Mode change 11 for handle: 0x2 2020-02-16 05:19:43 +0000 Mode change 11 for handle: 0x2 2020-02-16 05:19:58 +0000 Mode change 11 for handle: 0x0 2020-02-16 05:19:58 +0000 Mode change 11 for handle: 0x0 2020-02-16 05:20:00 +0000 Handle: 0xB disconnected, reason: 0x16 2020-02-16 05:20:00 +0000 Handle: 0xB disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:20:01 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:20:14 +0000 Mode change 12 for handle: 0x2 2020-02-16 05:20:14 +0000 Mode change 12 for handle: 0x2 2020-02-16 05:20:17 +0000 Mode change 12 for handle: 0x0 2020-02-16 05:20:17 +0000 Mode change 12 for handle: 0x0 2020-02-16 05:20:49 +0000 Handle: 0xC disconnected, reason: 0x16 2020-02-16 05:20:49 +0000 Handle: 0xC disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:20:50 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:20:57 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:20:57 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:20:57 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:20:57 +0000 Handle: 0xB disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:20:57 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:20:57 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:20:57 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:21:03 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:03 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:03 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:21:03 +0000 Handle: 0xC disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:21:03 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:03 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:06 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:21:12 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:12 +0000 Handle: 0x0 disconnected, reason: 0x00 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:21:12 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:21:12 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:21:12 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:12 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:13 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC Feb 16 13:21:12 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.bluetoothaudiod): Service only ran for 0 seconds. Pushing respawn out by 1 seconds. Feb 16 13:21:13 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.mathpix.com-mathpix-snipping-tool-noappstore-helper[81044]): Could not find and/or execute program specified by service: 155: Refusing to execute/trust quarantined program/file: com.mathpix.com-mathpix-snipping-tool-noappstore-helper Feb 16 13:21:13 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.mathpix.com-mathpix-snipping-tool-noappstore-helper): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. 2020-02-16 05:21:18 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:18 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:21:19 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:21:19 +0000 Handle: 0xC disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:21:20 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:21:33 +0000 Handle: 0xB disconnected, reason: 0x16 2020-02-16 05:21:33 +0000 Handle: 0xB disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:21:34 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:21:38 +0000 Handle: 0xC disconnected, reason: 0x16 2020-02-16 05:21:38 +0000 Handle: 0xC disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected Feb 16 13:21:39 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.qiuyuzhou.shadowsocksX-NG.http[81087]): Service exited with abnormal code: 1 Feb 16 13:21:39 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.qiuyuzhou.shadowsocksX-NG.http): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Feb 16 13:21:40 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.bluetoothaudiod): Service only ran for 0 seconds. Pushing respawn out by 1 seconds. Feb 16 13:21:41 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.quicklook[81102]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook Feb 16 13:21:41 Joys-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.bluetoothaudiod): Service only ran for 0 seconds. Pushing respawn out by 1 seconds. 2020-02-16 05:21:43 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:21:54 +0000 Handle: 0xB disconnected, reason: 0x16 2020-02-16 05:21:54 +0000 Handle: 0xB disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:21:55 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:22:01 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:22:01 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:22:01 +0000 Handle: 0xC disconnected, reason: 0x08 2020-02-16 05:22:01 +0000 Handle: 0xC disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:22:01 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:22:01 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:22:01 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 05:22:07 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:22:07 +0000 Handle: 0x0 disconnected, reason: 0x00 2020-02-16 05:22:07 +0000 Handle: 0xB disconnected, reason: 0x08 2020-02-16 05:22:07 +0000 Handle: 0xB disconnected, reason: 0x08 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected Bose Mini SoundLink connected, handle: 0xC Bose Mini SoundLink connected, handle: 0xC 2020-02-16 05:22:09 +0000 Role change 0 for handle: 0xC00 2020-02-16 05:22:19 +0000 Handle: 0xC disconnected, reason: 0x16 2020-02-16 05:22:19 +0000 Handle: 0xC disconnected, reason: 0x16 Bose Mini SoundLink disconnected Bose Mini SoundLink disconnected 2020-02-16 05:22:20 +0000 Role change 0 for handle: 0xC00 Bose Mini SoundLink connected, handle: 0xB Bose Mini SoundLink connected, handle: 0xB 2020-02-16 06:22:16 +0000 Mode change 11 for handle: 0x2 2020-02-16 06:22:16 +0000 Mode change 11 for handle: 0x2 </code></pre> <p>When I run Bluetooth, it showed that this device supports aac. <a href="https://i.stack.imgur.com/MRhIe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MRhIe.png" alt="enter image description here"></a> It also throws two errors.<a href="https://i.stack.imgur.com/QbXvp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QbXvp.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
functions with positive Laplacian. <p>Information about the class of compactly supported smooth functions $u$ on $Ω\subset R^n$ such that $Δu≥0?$ Do a significant class of such function exist?</p> <p>NB. This type of function may be useful in the problems of controllability.</p> <p>In the case $n=1$, we can construct geometrically some functions with the above mentioned conditions.</p>
0non-cybersec
Stackexchange
Pictures after 7 years of working out. I've been lifting for almost 7 years now. I had accumulated more dedication and knowledge as the years passed by of course. I'm 5'8" and started at about 150 lbs. I'm now just over 190 with the intent of cutting to lose fat and lean up. Never used steroids. I'm sure there are people who have achieved more than me in the same amount of time. Main point of this is to illustrate the gains/time ratio. Many plateaus along the way Bench - 225 x 15-20 reps. 275 x 8-9 reps Squat - 455 lbs max Deadlift - Not sure, rarely do them. It is lower than my squat though :( [IMG]http://i.imgur.com/g601q5N.jpg[/IMG] [IMG]http://i.imgur.com/wRDksVP.jpg[/IMG] [IMG]http://i.imgur.com/bxLeZT6.jpg[/IMG] [IMG]http://i.imgur.com/97YfxvI.jpg[/IMG]
0non-cybersec
Reddit
Coreinfo reports i7-3770 CPU doesn&#39;t support EPT (aka SLAT) and VMX. <p>Here is the output I get when I run coreinfo:</p> <pre><code>Coreinfo v3.05 - Dump information on system CPU and memory topology Copyright (C) 2008-2012 Mark Russinovich Sysinternals - www.sysinternals.com Note: Coreinfo must be executed on a system without a hypervisor running for accurate results. Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz Intel64 Family 6 Model 58 Stepping 9, GenuineIntel HYPERVISOR * Hypervisor is present VMX - Supports Intel hardware-assisted virtualization EPT - Supports Intel extended page tables (SLAT) </code></pre> <p>According to Intel the CPU does have VMX and EPT support. Why is it not showing up in coreinfo?</p>
0non-cybersec
Stackexchange
Ramires goal vs Leicester (1-3).
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Cheap Tampa Limo Services - Affordable Limo Rentals Tampa Florida.
0non-cybersec
Reddit
PSA: The newly announced MacBook is not a MacBook Air. The new MacBook, albeit lighter and thinner than the early 2014 MacBook Air, is not a MacBook Air. It's a revival of the MacBook line that was discontinued in the summer of 2011. Please keep this in mind to avoid confusion in the discussions that will appear in this subreddit in the near future.
0non-cybersec
Reddit
Should an interpolation coincide the original function on the given data points?. <p>Suppose having a model $f(x)=y$ where $f$ is unkown. Moreover, suppose you have some data points for this model i.e. $(x_1,y_1), (x_2,y_2), \dots , (x_n,y_n)$. If one can find an approximate of $f $ called $\tilde{f}$ using the given data points. </p> <p>When such aproximation is called interpolation? should the approximation vanish on the given data points in order to be considered as an interpolation ( i.e. $\tilde{f}(x_i)=y_i$ for all $i$) ? Thank you in advance. </p>
0non-cybersec
Stackexchange
Derivative and limit question. <p>Suppose $f$ is differentiable on $[0,\infty)$. One may write $$ \frac{f(t)-f(0)}{t-0} = f&#39;(\epsilon) $$ for $t\in (0,1),\epsilon \in (0,t)$ by the Mean Value Theorem. I would like to then take the limit as $t\to 0$ (so $\epsilon \to 0$ as well) and say that this equals $f&#39;(0)$. But I think this would require continuity of the derivative, because we don't know how $\epsilon$ changes.</p> <p>However, if we just apply the definition of $f$ being differentiable we get $$ \lim_{t\to 0}\frac{f(t)-f(0)}{t-0} = f&#39;(0) $$ by definition.</p> <p>This doesn't feel right to me. I wouldn't think that applying the Mean Value Theorem would lose so much information that I cannot justify the limit anymore.</p> <p>I there a way to show the limit exists using the Mean Value Theorem like I tried? (Of course using the definition is better, but I just want to know if there is a way to do it with MVT).</p>
0non-cybersec
Stackexchange
Zappa & The Mothers - Let's Make The Water Turn Black & Harry, You're A Beast.
0non-cybersec
Reddit
Officer convincted of assault for pointing a gun at civilian's face - video in article.
0non-cybersec
Reddit
Neewbie. I am studying in computer science and I wish to learn more about this field .....I would like to know from where to get started and are there any website to learn all this stuff? Note :- my basic about networking are clear..so don't worry :)
1cybersec
Reddit
Server-side rendering + responsive design + inline styles -&gt; which breakpoint to use?. <p>I have a responsive web application built with ReactJS for which I want one day to support server-side rendering. </p> <p>According to the viewport size, the application layout/behavior changes. But all these changes can not only be done with plain CSS mediaquery: the JS behavior, and the underlying HTML structure also has to be changed according to the width. </p> <p>For example I could have:</p> <p><strong>Under 800px width</strong>:</p> <pre><code>&lt;div class="app"&gt; &lt;div class="menu-mobile"&gt;...&lt;/div&gt; &lt;div class="content"&gt;...&lt;/div&gt; &lt;div class="mobile-left-menu"&gt;...&lt;/div&gt; &lt;div class="footer-mobile"&gt;...&lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>Above 800px width</strong>:</p> <pre><code>&lt;div class="app"&gt; &lt;div class="menu"&gt;...&lt;/div&gt; &lt;div class="main"&gt; &lt;div class="left-menu"&gt;...&lt;/div&gt; &lt;div class="content"&gt;...&lt;/div&gt; &lt;div class="right-menu"&gt;...&lt;/div&gt; &lt;/div&gt; &lt;div class="footer"&gt;...&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now, I want to use server-side rendering for that application. But on the server I don't have the width, so I don't know which HTML structure to return to the client.</p> <p>Note that I'm not looking for a solution that use a static default server-side breakpoint, and that on the client correct the app. I am looking for a solution that would return to the client the proper html structure according to its device. So it should work fine if he disables javascript on his browser.</p> <hr> <p>One could argue that I could render the html needed for both, and hide/show the required parts with plain CSS mediaqueries and <code>display: none</code>, but it would complicates the app and make it render a lot of unused html elements because generally it's unlikely that the user move above/under the breakpoint (I mean if he has a mobile device, the html elements for desktop will never be used)</p> <p>Also, if I want to use inline-style, it becomes complicated because I have to render these inline styles for the correct width on the server.</p> <p>I've <a href="https://github.com/reactjs/react-future/issues/8#issuecomment-53353098" rel="noreferrer">seen</a> some people are thinking about sniffing the browser UA to make an estimated guess of their viewport size. But even with some unsecure screen dimension detection, I'm not sure we can know the device screen orientation on the server-side.</p> <p>Can I do anything to solve this problem?</p>
0non-cybersec
Stackexchange
Alpha Centauri Bb Five Years Later: The Search for Exoplanets Continues.
0non-cybersec
Reddit
I can&#39;t properly connect 2 monitors on my kubuntu setup with a NVIDIA NVS 310 GPU. <p>I tried to connect 2 monitors to my setup, but I can't configure them as 2 independent monitors. They always show the same screen.</p> <p>It might be that my GPU is not powerful enough, but I am not sure.</p> <p>I run Kubuntu 19.10.</p>
0non-cybersec
Stackexchange
Subselect in Oracle 12c with bad performance. <p>After migration from Oracle 11g to 12c we have a massive performance issue for example with the following select statement. The same statement works fine in 11g.</p> <p><strong>Table and Indexes</strong></p> <pre><code>-- Create table create table PS_CS_ADRART_TB ( cs_adressmandant VARCHAR2(5) not null, cs_person_id VARCHAR2(20) not null, cs_beziehung_id VARCHAR2(20) not null, seqnum INTEGER not null, effdt DATE, eff_status VARCHAR2(1) not null, cs_adrart_cd VARCHAR2(20) not null, cs_adress_id VARCHAR2(20) not null, cs_kdnr_as400 VARCHAR2(8) not null, cs_plzgk VARCHAR2(11) not null, cs_plz_pf VARCHAR2(15) not null, cs_aendgr_cd VARCHAR2(20) not null, cs_datasource_cd VARCHAR2(20) not null, cs_betrag NUMBER(14,4) not null, cs_belegdat DATE, cs_adrtyp_xl VARCHAR2(2) not null, cs_checked VARCHAR2(1) not null, cs_journal_xl VARCHAR2(4) not null, address2 VARCHAR2(55) not null, row_added_dttm TIMESTAMP(6), row_added_oprid VARCHAR2(30) not null, row_lastmant_dttm TIMESTAMP(6), row_lastmant_oprid VARCHAR2(30) not null, cs_recstat_xl VARCHAR2(4) not null, cs_update_count NUMBER(10) not null ) tablespace CS_APP pctfree 10 initrans 1 maxtrans 255 storage ( initial 102416K next 1M minextents 1 maxextents unlimited ); -- Create/Recreate indexes create unique index PSACS_ADRART_TB on PS_CS_ADRART_TB (CS_ADRESSMANDANT, CS_KDNR_AS400, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 20M next 1M minextents 1 maxextents unlimited ); create index PSBCS_ADRART_TB on PS_CS_ADRART_TB (CS_PERSON_ID) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 20M next 1M minextents 1 maxextents unlimited ); create index PSCCS_ADRART_TB on PS_CS_ADRART_TB (CS_BEZIEHUNG_ID) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 20M next 1M minextents 1 maxextents unlimited ); create unique index PS_CS_ADRART_TB on PS_CS_ADRART_TB (CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 20M next 1M minextents 1 maxextents unlimited ); create index PSDCS_ADRART_TB on PS_CS_ADRART_TB (CS_PLZ_PF) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 40K next 1M minextents 1 maxextents unlimited ); create index PS0CS_ADRART_TB on PS_CS_ADRART_TB (CS_ADRESS_ID, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 20M next 1M minextents 1 maxextents unlimited ); create index PS1CS_ADRART_TB on PS_CS_ADRART_TB (CS_KDNR_AS400, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 20M next 1M minextents 1 maxextents unlimited ); create index PS2CS_ADRART_TB on PS_CS_ADRART_TB (ROW_ADDED_DTTM, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 40K next 1M minextents 1 maxextents unlimited ); create index PS3CS_ADRART_TB on PS_CS_ADRART_TB (ROW_ADDED_OPRID, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 40K next 1M minextents 1 maxextents unlimited ); create index PS4CS_ADRART_TB on PS_CS_ADRART_TB (ROW_LASTMANT_DTTM, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 40K next 1M minextents 1 maxextents unlimited ); create index PS5CS_ADRART_TB on PS_CS_ADRART_TB (ROW_LASTMANT_OPRID, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 40K next 1M minextents 1 maxextents unlimited ); create index PS6CS_ADRART_TB on PS_CS_ADRART_TB (CS_RECSTAT_XL, CS_ADRESSMANDANT, CS_PERSON_ID, CS_BEZIEHUNG_ID, SEQNUM, EFFDT) tablespace PSINDEX pctfree 10 initrans 2 maxtrans 255 storage ( initial 40K next 1M minextents 1 maxextents unlimited ); </code></pre> <p><strong>Table Size</strong></p> <pre><code>select count(*) from ps_cs_adrart_tb a --&gt; 41367270 </code></pre> <p><strong>Select Statement</strong></p> <pre><code> SELECT A.CS_ADRESS_ID, A.SEQNUM, TO_CHAR(A.EFFDT, 'YYYY-MM-DD') from PS_CS_ADRART_TB A where A.CS_ADRESSMANDANT = '001' and a.cs_kdnr_as400 = '63916917' and a.effdt = (select max(b.effdt) from ps_cs_adrart_tb b where b.cs_adressmandant = a.cs_adressmandant and b.cs_person_id = a.cs_person_id and b.cs_beziehung_id = a.cs_beziehung_id and b.seqnum = a.seqnum and b.effdt &lt;= trunc(sysdate) ) </code></pre> <p><strong>Explain Plan Oracle 11g</strong></p> <pre><code> -------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | Time | -------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 89 | 2 | 00:00:01 | | * 1 | FILTER | | | | | | | 2 | TABLE ACCESS BY INDEX ROWID | PS_CS_ADRART_TB | 1 | 89 | 1 | 00:00:01 | | * 3 | INDEX RANGE SCAN | PSACS_ADRART_TB | 1 | | 1 | 00:00:01 | | 4 | SORT AGGREGATE | | 1 | 59 | | | | 5 | FIRST ROW | | 1 | 59 | 1 | 00:00:01 | | * 6 | INDEX RANGE SCAN (MIN/MAX) | PS_CS_ADRART_TB | 1 | 59 | 1 | 00:00:01 | -------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): ------------------------------------------ * 1 - filter("A"."EFFDT"= (SELECT MAX("B"."EFFDT") FROM "PS_CS_ADRART_TB" "B" WHERE "B"."EFFDT"&lt;=TRUNC(SYSDATE@!) AND "B"."SEQNUM"=:B1 AND "B"."CS_BEZIEHUNG_ID"=:B2 AND "B"."CS_PERSON_ID"=:B3 AND "B"."CS_ADRESSMANDANT"=:B4)) * 3 - access("A"."CS_ADRESSMANDANT"='001' AND "A"."CS_KDNR_AS400"='63916917') * 6 - access("B"."CS_ADRESSMANDANT"=:B1 AND "B"."CS_PERSON_ID"=:B2 AND "B"."CS_BEZIEHUNG_ID"=:B3 AND "B"."SEQNUM"=:B4 AND "B"."EFFDT"&lt;=TRUNC(SYSDATE@!)) </code></pre> <p><strong>Explain Plan Oracle 12c</strong></p> <pre><code> ------------------------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost | Time | ------------------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 140 | 34366 | 00:00:02 | | * 1 | HASH JOIN | | 1 | 140 | 34366 | 00:00:02 | | 2 | TABLE ACCESS BY INDEX ROWID BATCHED | PS_CS_ADRART_TB | 1 | 89 | 1 | 00:00:01 | | * 3 | INDEX RANGE SCAN | PS1CS_ADRART_TB | 1 | | 1 | 00:00:01 | | 4 | VIEW | VW_SQ_1 | 41889 | 2136339 | 34365 | 00:00:02 | | * 5 | FILTER | | | | | | | 6 | HASH GROUP BY | | 41889 | 2471451 | 34365 | 00:00:02 | | * 7 | INDEX RANGE SCAN | PS_CS_ADRART_TB | 12746381 | 752036479 | 34365 | 00:00:02 | ------------------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): ------------------------------------------ * 1 - access("A"."EFFDT"="MAX(B.EFFDT)" AND "ITEM_1"="A"."CS_ADRESSMANDANT" AND "ITEM_2"="A"."CS_PERSON_ID" AND "ITEM_3"="A"."CS_BEZIEHUNG_ID" AND "ITEM_4"="A"."SEQNUM") * 3 - access("A"."CS_KDNR_AS400"='63916917' AND "A"."CS_ADRESSMANDANT"='001') * 5 - filter('001'='001') * 7 - access("B"."CS_ADRESSMANDANT"='001' AND "B"."EFFDT"&lt;=TRUNC(SYSDATE@!)) * 7 - filter("B"."EFFDT"&lt;=TRUNC(SYSDATE@!)) Note ----- - dynamic sampling used for this statement </code></pre> <p>As you can see, from the index <code>PS_CS_ADRART_TB</code> only <code>CS_ADRESSMANDANT</code> and <code>EFFDT</code> are used to filter the data and that is quite bad.</p> <p>With the following slightly different select statements the index is used by Oracle 12c as expected to determine data of subselect.</p> <p><strong>Changing where condition of outer select</strong></p> <pre><code> SELECT A.CS_ADRESS_ID, A.SEQNUM, TO_CHAR(A.EFFDT, 'YYYY-MM-DD') from PS_CS_ADRART_TB A where a.cs_kdnr_as400 = '53916917' -- without CS_ADRESSMANDANT condition and a.effdt = (select max(b.effdt) from ps_cs_adrart_tb b where b.cs_adressmandant = a.cs_adressmandant and b.cs_person_id = a.cs_person_id and b.cs_beziehung_id = a.cs_beziehung_id and b.seqnum = a.seqnum and b.effdt &lt;= trunc(sysdate) ) -------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | Time | -------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 89 | 2 | 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID BATCHED | PS_CS_ADRART_TB | 1 | 89 | 1 | 00:00:01 | | * 2 | INDEX RANGE SCAN | PS1CS_ADRART_TB | 1 | | 1 | 00:00:01 | | 3 | SORT AGGREGATE | | 1 | 59 | | | | 4 | FIRST ROW | | 1 | 59 | 1 | 00:00:01 | | * 5 | INDEX RANGE SCAN (MIN/MAX) | PS_CS_ADRART_TB | 1 | 59 | 1 | 00:00:01 | -------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): ------------------------------------------ * 2 - access("A"."CS_KDNR_AS400"='53916917') * 2 - filter("A"."EFFDT"= (SELECT MAX("B"."EFFDT") FROM "PS_CS_ADRART_TB" "B" WHERE "B"."EFFDT"&lt;=TRUNC(SYSDATE@!) AND "B"."SEQNUM"=:B1 AND "B"."CS_BEZIEHUNG_ID"=:B2 AND "B"."CS_PERSON_ID"=:B3 AND "B"."CS_ADRESSMANDANT"=:B4)) * 5 - access("B"."CS_ADRESSMANDANT"=:B1 AND "B"."CS_PERSON_ID"=:B2 AND "B"."CS_BEZIEHUNG_ID"=:B3 AND "B"."SEQNUM"=:B4 AND "B"."EFFDT"&lt;=TRUNC(SYSDATE@!)) Note ----- - dynamic sampling used for this statement </code></pre> <p><strong>Using <code>min()</code> instead of <code>max()</code> in the subselect</strong></p> <pre><code> SELECT A.CS_ADRESS_ID, A.SEQNUM, TO_CHAR(A.EFFDT, 'YYYY-MM-DD'), a.cs_person_id from PS_CS_ADRART_TB A where a.cs_kdnr_as400 = '63916917' and a.cs_adressmandant = '001' and a.effdt = (select min(b.effdt) from ps_cs_adrart_tb b where b.cs_adressmandant = a.cs_adressmandant and b.cs_person_id = a.cs_person_id and b.cs_beziehung_id = a.cs_beziehung_id and b.seqnum = a.seqnum and b.effdt &lt;= sysdate ); --------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost | Time | --------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 109 | 2 | 00:00:01 | | 1 | NESTED LOOPS | | 1 | 109 | 2 | 00:00:01 | | 2 | TABLE ACCESS BY INDEX ROWID BATCHED | PS_CS_ADRART_TB | 1 | 89 | 1 | 00:00:01 | | * 3 | INDEX RANGE SCAN | PS1CS_ADRART_TB | 1 | | 1 | 00:00:01 | | * 4 | VIEW PUSHED PREDICATE | VW_SQ_1 | 1 | 20 | 1 | 00:00:01 | | 5 | SORT GROUP BY | | 1 | 59 | 1 | 00:00:01 | | * 6 | INDEX RANGE SCAN | PS_CS_ADRART_TB | 1 | 59 | 1 | 00:00:01 | --------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): ------------------------------------------ * 3 - access("A"."CS_KDNR_AS400"='63916917' AND "A"."CS_ADRESSMANDANT"='001') * 4 - filter("A"."EFFDT"="MIN(B.EFFDT)" AND "ITEM_1"="A"."CS_ADRESSMANDANT") * 6 - access("B"."CS_ADRESSMANDANT"='001' AND "B"."CS_PERSON_ID"="A"."CS_PERSON_ID" AND "B"."CS_BEZIEHUNG_ID"="A"."CS_BEZIEHUNG_ID" AND "B"."SEQNUM"="A"."SEQNUM" AND "B"."EFFDT"&lt;=SYSDATE@!) Note ----- - dynamic sampling used for this statement </code></pre> <p>Rebuilding indexes (as described above) and updating statistics by</p> <pre><code>EXEC DBMS_STATS.delete_table_stats('SYSADM', 'PS_CS_ADRART_TB'); -- EXEC DBMS_STATS.gather_table_stats('SYSADM', 'PS_CS_ADRART_TB'); EXEC DBMS_STATS.gather_table_stats(ownname =&gt; 'SYSADM', tabname =&gt; 'PS_CS_ADRART_TB', cascade =&gt; true ); </code></pre> <p>doesn't help.</p> <p>What is going on here? Any advice is highly appreciated. Thanks in advance.</p>
0non-cybersec
Stackexchange
Happy meal? Never heard of it. | Grumpy Cat 1.
0non-cybersec
Reddit
Declaring strings public static readonly versus public const versus public static const. <p>In each project we have there is a file used to store the various SQL statements used in that project. There are a handful of variations on how the class is declared and how the strings are declared.</p> <p>Example class declartions:</p> <pre><code>internal sealed class ClassName internal static class ClassName public sealed class ClassName public static class ClassName internal class ClassName </code></pre> <p>Example string declarations:</p> <pre><code>internal const string stringName internal static string stringName public static readonly string stringName public static string stringName public const string stringName </code></pre> <p>I don't understand what the performance implications are between the different declarations. Is there a best practice for this situation/scenario? </p>
0non-cybersec
Stackexchange
Run terminal as superuser. <p>How can I activate the terminal to be run as superuser? I don't see an icon nor know the command line to do so.</p>
0non-cybersec
Stackexchange
Codename - Stinger, Abrar Khan, Digital, 2019.
0non-cybersec
Reddit
Does brand/hardware limit the distributions that are safe to run?. <p>I recently tried running Fedora 16 on my laptop and had problems with the fan. In particular, the fan would start, run at full power, and never turn off. I spent a few hours online looking for solutions but didn't find any. I then reverted back to Ubuntu and had the problem disappear (after some minor configuration). </p> <p>I would really like to try different distributions, but I'm afraid that the hardware on my laptop would not be supported. Is there always a fix to these kinds of problems or should I just stick to what works? </p> <p>I have a Toshiba Satellite L305-S5945. </p>
0non-cybersec
Stackexchange
Convert number to words - first, second, third and so on. <p>Does anyone know how if it's possible to take an integer variable in SQL and convert it to the equivilent number of the form: First, Second, Third, Fourth etc?</p> <p>Thanks</p>
0non-cybersec
Stackexchange
Amazing brewing station design by Typefacemc.
0non-cybersec
Reddit
Ghostly ships with gruesome cargo hit Japan's shores..
0non-cybersec
Reddit
Afraid of People [56:58] - "Social anxiety is anxiety about social situations, interactions with others, and being evaluated or scrutinized by other people. The difference between social anxiety and normal apprehension of social situations is that social anxiety involves an intense feeling of fear".
0non-cybersec
Reddit
It’s my cake day so let’s see what you got.
0non-cybersec
Reddit
So I drew this during my Algebra class..
0non-cybersec
Reddit
How to move from dual boot to full installation?. <p>I've been running Ubuntu in parallel to Windows on my SSD for the past year, through a dual boot. I'm really happy with Ubuntu and do not use Windows anymore.<br> I'd like to get rid of Windows but I'm not willing to re-install Ubuntu because I don't want to reconfigure all my customisation.<br> How should I do? Would it be enough to delete the Windows' partition and extend the Linux's partition? </p>
0non-cybersec
Stackexchange
I (20) am planning on investing into stocks for retirement. Is this a good idea?. I currently make a dollar above minimum wage in Oklahoma (minimum is $7.25/hr , I'm currently making $8/hr.) It isnt mich, but I want to put small amounts of what I can into stocks via Robinhood, and when my career builds up I am able to invest more. Is this a good idea? I'm only 20 but want to get started on the retirement thingy. Ive heard of w240's if thats what they are called. I don't even think my job offers them because I'm a work-study at the university I go to. What is your advice? edit: holy cow! didn't expect all these comments! I extremely appreciate the help everyone! Please keep it coming! The more advice the better!
0non-cybersec
Reddit
50% Off Custom Canvas Prints from Canvas Press - Cyber Monday Sale.
0non-cybersec
Reddit
MacBook Pro 2012 HD locks on boot. <p>Today my laptop has started to lock the HD. When booted it either stays black with the fans going nuts or it loads up a dialog to reset pw. In this window I can choose startup disk from the top left menu. The dialog that opens allows me to unlock the HD but the system needs to reboot to use my HD as startup disk. And then it starts all over again...</p> <p>I've also tried both pram reset, Smc reset and verifying/repairing the HD in disk utility. It still keeps locking the HD when booting up.</p> <p>Any other suggestions?</p>
0non-cybersec
Stackexchange
Batch Script 32 bit limitation of integer. <p>Is there any way I can over come the 32 bit limitation of integer math operation of Batch. I am doing some addition operation in my script and the sum value becomes more than the range( 2^31 -1).</p> <p>I am looking for any idea even including some other scripting lines like VBscript or something like that in my batch script.</p>
0non-cybersec
Stackexchange
Solving PDE with Feynman-Kac Formula. <p>I have the following PDE:</p> <p>$$\begin{cases} \left (-\partial_t + \mu x \partial_x + \dfrac{1}{2} \sigma^2 x^2 \partial_x^2 \right )u = -f(t, x)\\ u(0, x) = 0 \end{cases}$$</p> <p>where $f(t, x) = x^2 \left ( (\mu + \sigma^2 ) e^{\mu t} - \left (\mu + \frac{1}{2}\sigma^2\right )\right )$.</p> <p>Since $\mu x \partial_x + \dfrac{1}{2} \sigma^2 x^2 \partial_x^2$ is the infinitesimal generator of a Geometric Brownian Motion with drift $\mu$ and volatility $\sigma$, by Feynman-Kac the solution should be given by:</p> <p>$$u(t, x) = \mathbb{E}^x \left (\int_0^t f(s, X_s)dx\right )$$</p> <p>where $X$ has dynamics</p> <p>$$dX_t = \mu X_t dt + \sigma X_t dW_t.$$</p> <p>I know that the exact solution should be $u(t, x) = \frac{1}{2} x^2 \left ( e^{(2\mu + \sigma^2) t} - 2e^{\mu t} + 1\right )$. However, when I try to compute the solution using Feynman-Kac, I get:</p> <p>$$u(t, x) = \int_0^t \mathbb{E}^x (f(s, X_s))ds = \int_0^t x^2 e^{(2\mu + \sigma^2) s}\left ( (\mu + \sigma^2 ) e^{\mu s} - \left (\mu + \frac{1}{2}\sigma^2\right )\right ) ds$$ which doesn't agree with the above solution.</p> <p>What am I doing wrong?</p>
0non-cybersec
Stackexchange
Stop Postfix sending email to [email protected]. <p>I configured a Postfix server in Ubuntu as satellite system to forward emails to an Exchange server.</p> <p>When I try to do <code>sudo -i</code> with a user that is not part of the <code>sudoers</code> group the incident is reporting sending an email. (I think using Postfix)</p> <p>On Exchange queue viewer I saw undelivered messages to an address <code>[email protected]</code> with the security incident report. That email does not exists. I changed <code>/etc/mailname</code> to use <code>domain.com</code> but then in Postfix's logs <code>/var/log/mail.log</code> I saw an email going to <code>[email protected]</code>.</p> <p>After the setup, I ran the </p> <pre><code>newaliases service postfix restart </code></pre> <p>My goal is to setup that postfix send the incident report to <code>[email protected]</code> instead of <code>[email protected]</code> or <code>[email protected]</code> </p> <p><strong>Note:</strong> I am currently sending email in multiple PHP scripts going to <code>[email protected]</code> and everything works fine.</p> <pre><code>hostname -f ns.domain.local cat /etc/hosts 127.0.0.1 ns.domain.local ns localhost 192.168.1.3 ns.domain.local ns cat /etc/hostname ns cat /root/.forward [email protected] cat /etc/aliases postmaster: root root: [email protected] cat /etc/mailname domain.local cat /etc/postfix/main.cf smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = ns.domain.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = ns.domain.local, localhost.domain.local, localhost, relayhost = 192.168.1.2 #(EXCHANGE_IP_ADDRESS) mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = loopback-only inet_protocols = ipv4 </code></pre> <p>Thank you for any help.</p>
0non-cybersec
Stackexchange
Conencting local machine to remote Domain. <p>I'm currently trying to connect my local machine remotely to my server in the office. The objective is to set this machine up as a domain oppose to workstation so it acts the same as if it was in the office.</p> <p>I've established a successful VPN to the Server with no problems. I tried connecting to the domain using xyz.local however it couldn't find it.</p> <p>I've then amended the ipv4 settings for the VPN for which the primary and secondary DNS are pointing to what the server gives out. Still no luck. </p> <p>I've also noticed using <strong>ipconfig /all</strong> the default gateway is 0.0.0.0 ? </p> <p>I tried disabling the WIFI adapter but that disconnects everything.</p> <p>Any suggestions?</p>
0non-cybersec
Stackexchange
Internet is down, want to play Oblivion and having some issues.. Internet is down and using my data on the phone to make this post. Want to play TES Oblivion offline, I own the disc, and I have the content installed. However, when booting up Oblivion, the game will just go back to the home page and stop booting up Oblivion. It doesn't appear like a crash, hell, once I made it to the menu of the game, but it constantly goes to the xbox one home page. Any trouble shoots or answers?
0non-cybersec
Reddit
Stephen Colbert: "If we let this happen in our name, we are a Feckless Country".
0non-cybersec
Reddit
Good resources for example process definitions of software development methodologies?. <p>Is there any website specifically for sharing and accessing actual software development processes implemented in software organizations? </p> <p>There are lots of resources that give advices and descriptions for implementing these processes. They are very useful. But I think having actual example process definitions would be very useful as well. Specifically, I am now looking for an example process definition in CMMI. I overviewed several books but none of them presents any specific example implementation. </p> <p>I think the authors are probably concerned that the readers might just copy these process definitions without understanding specific customization decisions in them. They are very rightful in this concern. But anyway, I think this is an important need for general software community. Understanding and interpreting an example document properly should be the responsibility of the reader. </p> <p>If you don't know any good resource that shares specific implementations of the processes, what do you think about this need? Don't you think that we, software engineers and developers, should share our process definitions as we share our code?</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Damn, some of the Mario clones on iPhone are becoming franchises in their own right..
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
connected sums of closed orientable manifold is orientable. <p>a general version: connected sums of closed manifold is orientable iff both are orientable. I think this can be prove by using homology theory, but I don't know how.Thanks.</p>
0non-cybersec
Stackexchange
How to monitor read &amp; write speed to specific device or mount point. <p>How can I monitor the read &amp; write speed to a specific device or mount point in Linux, for example <code>/dev/sdc2</code> which is mounted to <code>/mnt/data/</code>?</p> <p>Would like to display the speed in MB/s for example and update once or twice a second.</p>
0non-cybersec
Stackexchange
NETSH - How to import WIFI profile when WIFI NIC is not present. <p>I'm currently in process of creating standardised Winndows 10 image for kisok PC.</p> <p>Now the problem I'm facing is that during install, when I try to preload WIFI profile using <code>netsh wlan add profile file=C:\wifi.xml user=all</code>, I get the error stating that <code>There is no wireless interface on the system</code>. Now the error itself makes sense, since USB WIFI adapter is physically not yet connected to the PC (we connect adapters to the PCs when they are mounted into kisok stand, OS install is done way beforehand).</p> <p>I've already tried adding <em>fake</em> WIFI adapter using "Add legacy hardware" option in device manager, but unfortunately that didn't fool netsh into thinking that WIFI is present. </p> <p>Is there any way other way I can preload WIFI profile into my image when there is no WIFI adpater connected or trick that would convince netsh that WIFI card is present when actually it is not? Maybe using WISM or some other tool?</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Animate scroll to ID on page load. <p>Im tring to animate the scroll to a particular ID on page load. I have done lots of research and came across this:</p> <pre><code>$("html, body").animate({ scrollTop: $('#title1').height() }, 1000); </code></pre> <p>but this seems to start from the ID and animate to the top of the page?</p> <p>The HTML (which is half way down the page) is simply:</p> <pre><code>&lt;h2 id="title1"&gt;Title here&lt;/h2&gt; </code></pre>
0non-cybersec
Stackexchange
Had a little fun with a blood wood inlay on top of a dresser. Alder - Bloodwood..
0non-cybersec
Reddit
WPF: How to reference other controls within trigger Property property?. <p>I have a WPF page. Page has some content, but the last child component of page's root layout is a user control that I have created. It looks like this: </p> <pre><code>&lt;UserControl DataContext=UserControlViewModel&gt; &lt;UserControl.Resources&gt; &lt;BooleanToVisibilityConverter x:Key="visibilityConverter" /&gt; &lt;/UserControl.Resources&gt; &lt;Grid Name="grid" Visibility="{Binding IsOn, Converter={StaticResource visibilityConverter}}"&gt; &lt;!-- Border to dim everything behind my user control --&gt; &lt;Border Background="#000000" Opacity="0.4" /&gt; &lt;!-- The following border is red and holds the content --&gt; &lt;Border Width="{Binding ElementName=txt, Path=ActualWidth}" Height="{Binding ElementName=txt, Path=ActualHeight}" Margin="{Binding ElementName=txt, Path=Margin}" HorizontalAlignment="{Binding ElementName=txt, Path=HorizontalAlignment}" VerticalAlignment="{Binding ElementName=txt, Path=VerticalAlignment}" Background="Red"&gt; &lt;TextBlock Name="txt" Width="200" Height="100" Margin="20" HorizontalAlignment="Center" VerticalAlignment="Center" Text="This is my super awesome message!" /&gt; &lt;/Border&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre> <p>By default, the <code>IsOn</code> property of the <code>UserControlViewModel</code> object is set to <code>false</code>, i.e. the user control is not visible. I have implemented some logic that changes this property to <code>true</code> and then the user control is displayed in front of all other components which are dimmed. This works well. </p> <p>Now, I want to create a fade effect animation which would dim the components that are behind the user control once it becomes visible. Next, I want to make my red border that holds the content to fade in from the left hand side, so moving + fade. </p> <p>Let's start with the fade effect first. I wrote this style to the <code>Border</code> that is supposed to do the dimming of background components: </p> <pre><code>&lt;UserControl DataContext=UserControlViewModel&gt; &lt;UserControl.Resources&gt; &lt;BooleanToVisibilityConverter x:Key="visibilityConverter" /&gt; &lt;/UserControl.Resources&gt; &lt;Grid Name="grid" Visibility="{Binding IsOn, Converter={StaticResource visibilityConverter}}"&gt; &lt;!-- Border to dim everything behind my user control --&gt; &lt;Border Background="#000000" Opacity="0.4"&gt; &lt;!-- The following style is new code --&gt; &lt;Border.Style&gt; &lt;Style TargetType="Border"&gt; &lt;Style.Triggers&gt; &lt;Trigger Property="{Binding ElementName=grid, Visibility}" Value="Visible"&gt; &lt;Trigger.EnterActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.0" To="0.4" Duration="0:0:1" /&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/Trigger.EnterActions&gt; &lt;/Trigger&gt; &lt;/Style.Triggers&gt; &lt;/Style&gt; &lt;/Border.Style&gt; &lt;/Border&gt; ... </code></pre> <p>But there's the problem: I cannot set the binding on the trigger <code>Property</code>, because it is not a dependency property. I need a way to tell my trigger to fire once the <code>grid</code> has got the <code>Visibility</code> property set to <code>Visible</code>. Please help and thank you!</p> <p>Second problem is, I don't know how to do the moving of the red border, so I need help around some scale transformations as well, I guess... Thanks once again!</p>
0non-cybersec
Stackexchange
I really don't want to become an alcoholic.. Guess I'll just get to the point: I want to be the drunk me. Always. In any sort of social situation, drunk me is objectively a better person. Confident, an extrovert, quick witted with jokes, can't dance too well but *has the fucking confidence to just go and do it anyways.* I'm also a broke university student for the most part. Sometimes I find web design gigs to do. Mostly I live on a shitty diet, though, to save cash. Lately I've been spending nearly all of my income on vodka. I buy vodka specifically because I only want to become drunk and nothing else is really important to me. I need to be drunk to feel like I'm worth anything. The only situation in which not being drunk is worth it is when I'm doing maths or programming, I just can't do those activities productively when drunk. Other than that, sober me is an awkward, useless mess who will say no to everything. Don't really know what to do once my balance hits 0. Binge drinking gets expensive. Hiding not being sober can get pretty difficult. I usually need to drive somewhere at least twice a day. At least I don't really have people who depend on me; just vice versa. If something were to happen then I don't think it'd be all that dramatically bad. But yeah. I want to be constantly and permanently drunk because it makes me an objectively better person, but it's expensive and I can't afford this lifestyle for too much longer. Shit sucks.
0non-cybersec
Reddit
Why doesn&#39;t my if statement work?. <p>I'm debugging on android, and I have the following code. The <code>istrue</code> variable has the value <code>true</code>, but it seems that the <code>if</code> condition doesn't work.</p> <pre><code>String ok = objRestMan.getMensaje(); boolean istrue = ok.equals("ok"); if(istrue){ return antenaInformation; }else{ return null; } </code></pre> <p>As you can see in the next image, the <code>istrue</code> variable is <code>true</code>, but the if condition always takes the route else and returns <code>null</code>.</p> <p><a href="https://i.stack.imgur.com/EfdgG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EfdgG.png" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Cowboy Bebop Writer Dai Satō Frustrated With Industry, Says Anime Will Die Out.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
A look at how Uefa countries compare in terms of co-efficient and population (countries are ranked left to right in terms of highest co-efficent).
0non-cybersec
Reddit
I'm getting pretty hungry.. I haven't eaten all year!
0non-cybersec
Reddit
Will getting a cat make my dog more "tolerant" of cats?. I have a mixed [Rhodesian Ridgeback](http://i.imgur.com/0tyUV.jpg), and I love her. It's just that she has a really strong hunt drive which makes her go mental at the sight of cats. I have been training her and she is very obedient but cats are still an obstacle. I can handle her, but I'm afraid other house members might have a harder time or that one day she will make a wrong identificatio (cat vs small child, almost happened once). I don't like cats all that much (nil to none), but I have herd of a breed, [Pixie-Bob](http://en.wikipedia.org/wiki/Pixie-bob) that should have very convenient (dog like) characteristics and I don't mind getting one if it will ease her up. TL;DL: Will getting a cat ease my dog up when seeing other cats? Edit: For people who want the answer but skip the reading: 1. High prey drive doesn't go away, the dog was born with that instinct and getting a cat would (if they get along) probably only make the dog tolerant of that specific cat 2. Forcing a relationship between the dog and the cat (if they don't get a long or when trying to get them to get along) might might end up badly (usually for the dog's eye). 3. More specific for people who don't fancy cats: a cat is a long term commitment, getting one to serve a purpose rather then actually wanting one would be a bad idea (abandonment, which is bad mmkay). Thank you all for sharing!
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
How to 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
Redbean O/RM store &quot;date&quot; as varchar(255)?. <p>From this code:</p> <pre><code>$toolbox = RedBean_Setup::kickstartDev("mysql:*****************"); $r = $toolbox-&gt;getRedBean(); $test = $r-&gt;dispense("test"); $test-&gt;nom = 'Test #1'; $test-&gt;date = '2010-07-08'; $test-&gt;date_deux = '08/07/2010'; $test-&gt;num = 5; $id = $r-&gt;store( $test ); </code></pre> <p>I get this SQL:</p> <pre><code>CREATE TABLE IF NOT EXISTS `test` ( `id` int(11) unsigned NOT NULL auto_increment, `nom` varchar(255) collate utf8_unicode_ci default NULL, `date` varchar(255) collate utf8_unicode_ci default NULL, `num` tinyint(3) unsigned default NULL, `date_deux` varchar(255) collate utf8_unicode_ci default NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ; -- -- Dumping data for table `test` -- INSERT INTO `test` (`id`, `nom`, `date`, `num`, `date_deux`) VALUES (1, 'Test #1', '2010-07-08', NULL, NULL), (2, 'Test #1', '2010-07-08', 5, NULL), (3, 'Test #1', '2010-07-08', 5, '08/07/2010'), (4, 'Test #1', '2010-07-08', 5, '08/07/2010'), (5, 'Test #1', '2010-07-08', 5, '08/07/2010'); </code></pre> <p>is there a special way to use <code>date</code> with RedBean?</p>
0non-cybersec
Stackexchange
Utility method - Pass a File or String?. <p>Here's an example of a utility method:</p> <pre><code>public static Long getFileSize(String fileString) { File file = new File(fileString); if (file == null || !file.isFile()) return null; return file.length(); } </code></pre> <p>Is it a good practise to pass a String rather than a File to a method like this? In general what reasoning should be applied when making utility methods of this style?</p>
0non-cybersec
Stackexchange
Tsuruda - Move LP [Trap] (2017).
0non-cybersec
Reddit
The First Big Free to Play iOS Game Eliminate Shutting Down on 5/25.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Unable to use proxy with puppeteer. Error: ERR_NO_SUPPORTED_PROXIES gets thrown. <p>How to set up a proxy with puppeteer? I tried the following:</p> <pre><code>(async () =&gt; { const browser = await puppeteer.launch({ headless: false, args: [ '--proxy-server=http://username:[email protected]:22225' ] }); const page = await browser.newPage(); await page.goto('https://www.whatismyip.com/'); await page.screenshot({ path: 'example.png' }); //await browser.close(); })(); </code></pre> <p>But it does not work and I get the message:</p> <pre><code>Error: net::ERR_NO_SUPPORTED_PROXIES at https://www.whatismyip.com/ </code></pre> <p>on the console. How to use the proxy correctly? </p> <p>I also tried the following:</p> <pre><code>const browser = await puppeteer.launch({ headless: false, args: [ '--proxy-server=zproxy.luminati.io:22225' ] }); const page = await browser.newPage(); page.authenticate({ username: 'username', password: 'password' }) await page.goto('https://www.whatismyip.com/'); </code></pre> <p>but the same result.</p>
0non-cybersec
Stackexchange
I found a Teddy Bear paw today!! Complete with Donald Trump combover..
0non-cybersec
Reddit
What games has your group put away for good?. My group has tried so hard with Dark Darker Darkest, but every time we play it, it ends up with arguments, frustration, constantly checking rules, and overall just a general lack of fun whatsoever. So after this last time, I put the game up on my highest shelf, doubting it will ever see the light of day again. I really wanted to like this game ever since I backed it on Kickstarter. But since the purpose of game night is fun, and this game never provided us with any, we have unofficially retired it.
0non-cybersec
Reddit
Can&#39;t set up printer. <p>I'm trying to set up an HP OFficejet Pro 8500 A909a on my Windows XP machine over the network.</p> <p>I know the IP address of the printer but it's unclear to me how to set it up based on that. I have no idea how to troubleshoot this problem.</p>
0non-cybersec
Stackexchange
Apple Push Notifications in Bulk. <p>I have an app that involves sending Apple Push Notifications to ~1M users periodically. The setup for doing so has been built and tested for small numbers of notifications. Since there is no way I can test sending at that scale, I am interested in knowing whether there are any gotchas in sending bulk push notifications. I have scripts written in Python that open a single connection to the push server and send all notifications over that connection. Apple recommends keeping it open for as long as possible. But I have also seen that the connection terminates and you need to reestablish it. </p> <p>All in all, it is disconcerting that successful sends are not acknowledged, only erroneous ones are flagged. From a programmer's standpoint instead of simply checking one thing "if (success)" you now need to watch for numerous things that could go wrong.</p> <p>My question is: What are the typical set of errors that you need to watch out for to make sure your messages don't silently disappear into oblivion? The connection closing is an easy one. Are there others?</p>
0non-cybersec
Stackexchange
Prove that A&#39;,B&#39;,C&#39; are in a straight line.. <p><a href="https://i.stack.imgur.com/lLnJF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lLnJF.jpg" alt="Question Image"></a></p> <p>Be an ABC triangle and a point P of your plane. The perpendiculars to PA, PB and PC, traced by P, intersect the BC, CA and AB sides at three points, A ', B' and C '. Prove that these points are in a straight line.</p> <p>Can someone explain me how to do this question? I just found that <span class="math-container">$\angle APB'=\angle A'PB\\ \angle B'PC=\angle BPC'$</span> My first idea was to use Analytic Geometry, but I don't know what I have to do... Thanks for antetion. If someone has a solution by eucliidean geometry, I will love it!</p>
0non-cybersec
Stackexchange
Cameraman loses it on this one.
0non-cybersec
Reddit
My portrait of comedian Marc Maron who was close friends with Louis CK during their struggles to become great comedians. Photoshop Cs5..
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
getting this error &quot; $.toJSON is not a function &quot;. <p>I'm trying to use jQuery and Ajax and I use this method. but I get the error $.toJSON is not a function in my firebug . where is the problem? I use jquery 1.3.2 . thanks </p> <pre><code> $(document).ready(function () { $("#S1").click(function () { $("#t1").slideToggle("fast"); $("#S1").css("background-color", "yellow"); var ID = $("#HiddenField2").attr("Value"); var params = new Object(); params.Key = ID; $.ajax({ type: "POST", url: "viewMessages.aspx/readen", data: $.toJSON(params), contentType: "application/json", dataType: "json", success: function () { } }); }); }); </code></pre>
0non-cybersec
Stackexchange
Scientific soundness of computer science papers. <p>First of all, this question relates to an issue that affects several areas of science, but since StackExchange doesn't have a meta science section I'll make it specific to computer science, which is pertinent because the solution to the bigger problem may actually come from computer science.</p> <p>In the context of the news that <a href="http://retractionwatch.com/2014/02/24/springer-ieee-withdrawing-more-than-120-nonsense-papers" rel="nofollow">Springer and IEEE published more than 120 nonsense papers</a> my question is as follows:</p> <p>What rigourous set of methods can we apply to the process of publishing scientific papers so that we can quickly verify the reproducibility of the experiments?</p> <p>We already have systems like <a href="http://turnitin.com/" rel="nofollow">Turnitin</a> that are highly efficient at detecting plagiarism, yet I don't know of any system that can score a piece of work on its <em>scientific soundness</em>.</p> <p>Is there any ongoing work related to this? I found out about <a href="https://en.wikipedia.org/wiki/Semantic_publishing" rel="nofollow">Semantic Publishing</a> whilst composing this question, but I have no idea what other approaches, if any, are being actively worked on.</p>
0non-cybersec
Stackexchange
What&#39;s the file format of &quot;application/x-executable&quot;. <p>No no no no. I can run the file. My favorite game is that file format and I can run it just fine. Same as other programs with it. My question is what the file format of it? You know. Things like <code>.sh</code>, or <code>.exe</code>, <code>.txt</code>, <code>.rar</code>, etc, etc. So, if you know just tell me.</p> <p>So you know, the question isn’t about the game. It’s about the file format. The question has nothing to do about the game. And I already figured out about the file format. It’s <code>.86_64</code>. I didn’t notice the answer that was posted to this question so I had to figure it out myself. For anyone who is reading this now, I will close this question soon.</p>
0non-cybersec
Stackexchange
ITAP of a flower in front of a Bokeh Wall.
0non-cybersec
Reddit
How do you call a cffunction in a cfc from another cfm page using cfscript?. <p>I have a <code>test.cfm</code> page and would like to call a cfc with a <code>&lt;cffunction&gt;</code> named <code>errorEmail</code> using <code>&lt;cfscript&gt;</code> from that page (test.cfm) instead of </p> <pre><code>&lt;cfinvoke component = "#cfcPath#" method = "errorEmail" returnVariable = "myReturn" description = "get list of projman"&gt; &lt;/cfinvoke&gt; </code></pre> <p>I have tried: </p> <pre><code>&lt;cfscript&gt; errorEmail(cfcPath); &lt;/cfscript&gt; </code></pre>
0non-cybersec
Stackexchange
One big, happy family....
0non-cybersec
Reddit
My program&#39;s notifyicon get duplicated when using Form.Show() to call a preloader form. <p><strong>EDIT:</strong> Silly me. My preloader actually shows up all the time even with simple <code>Loading.Show();</code> but it just was below my web browser. I already posted a solution below. Please check it up if you interested.</p> <p>My program has no form but shows as a notifyicon in the notification area (My main form is actually hidden to use as dummy form for notifyicon and other controls). It run by getting called from web browser using URI scheme (<code>tkh</code>). If my program is already running and user called it from browser, it will do things according to its argument. For example, if an user called it with <code>tkh:readCard</code>, my program will do stuff in <code>readCard</code> function.</p> <p>Here's my code for reading argument from URI scheme</p> <pre><code>public string CommandLine { get; set; } public bool CheckForProtocolMessage(Uri uri) { if (uri.ToString().Length &gt; 1) { string[] args = uri.ToString().Split(':'); CommandLine = args[1]; if (args[0].Trim().ToUpper() == "TKH" &amp;&amp; args.Length &gt; 1) { if (args[1].Length &gt; 1) { switch (args[1].Trim().ToUpper()) { case "READCARD": if (hasCardReader == true) { var bw_readCard = new BackgroundWorker { WorkerReportsProgress = true }; bw_readCard.DoWork += delegate { preloaderShow(); readCard(); preloaderClose(); }; bw_readCard.ProgressChanged += delegate { }; bw_readCard.RunWorkerCompleted += delegate { }; bw_readCard.RunWorkerAsync(); bw_readCard.Dispose(); return true; } else { MessageBox.Show("Try again", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } case "READCARD_IDONLY": if (hasCardReader == true) { var bw_readCard_IDOnly = new BackgroundWorker { WorkerReportsProgress = true }; bw_readCard_IDOnly.DoWork += delegate { preloaderShow(); readCard_IDonly(); preloaderClose(); }; bw_readCard_IDOnly.ProgressChanged += delegate { }; bw_readCard_IDOnly.RunWorkerCompleted += delegate { }; bw_readCard_IDOnly.RunWorkerAsync(); bw_readCard_IDOnly.Dispose(); return true; } else { MessageBox.Show("Try again", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } } } } } return false; } </code></pre> <p><code>preloaderShow();</code> and <code>preloaderClose();</code> are for show and close a preloader form. (My preloader form named "Loading")</p> <p>Here's the <code>preloaderShow();</code> function</p> <pre><code>private void preloaderShow() { Loading Loading = new Loading(); Loading.Show(); } </code></pre> <p>and the <code>preloaderClose();</code> function</p> <pre><code> private void preloaderClose() { Loading Loading = new Loading(); Application.OpenForms .OfType&lt;Form&gt;() .Where(form =&gt; String.Equals(form.Name, "Loading")) .ToList() .ForEach(form =&gt; form.Close()); } </code></pre> <p>My problem is if the program isn't running, the preloader shows up and do stuff normally. But if it already running, the preloader won't show up but stuff in <code>readCard();</code> and <code>readCard_IDOnly();</code> works normally.</p> <p>If I change my preloaderShow(); like this,</p> <pre><code>private void preloaderShow() { Loading Loading = new Loading(); Form1 Form1 = new Form1(); // Declared this even without put Form1 into .Show() also make the program's notifyicon duplicate. Loading.Show(Form1); } </code></pre> <p>the preloader will show up and the notifyicon get duplicated Like below </p> <p><a href="https://i.stack.imgur.com/otuVK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/otuVK.png" alt="but notifyicon will duplicated and cannot be closed"></a></p> <p>I will need to close down "main" notifyicon to make it all gone.</p> <p>What do I need to do? Thanks.</p>
0non-cybersec
Stackexchange
Raising exception in a generator, handle it elsewhere and vice versa in python. <p>I'm thinking in a direction more advanced as well as difficult to find solutions this problem. Before coming to any decision, I thought of asking expert advice to address this problem. </p> <p>The enhanced generators have new methods .send() and .throw() that allow the caller to pass messages or to raise exceptions <em>into</em> the generator (coroutine).</p> <p>From python documentation: This can be very handy, especially the .throw() method that requests the generator to handle exceptions raised in the caller. </p> <p><strong>Request #1: Any example code for the above statement. I didn't find any code snippets for this explanation.</strong></p> <p>However, I'm considering the inverse problem as well: can a generator raise an exception, pass it to the caller, let the caller "repair" it, and continue the generator's own execution? That is what I would like to call a "reverse throw".</p> <p><strong>Request #2: Any example code for the above statement. I didn't find any code snippets for this explanation.</strong></p> <p>Simply raising exceptions in the generator is not OK. I tried "raise SomeException" in the generator, and that didn't work, because after a "raise" the generator can no longer be executed --- it simply stops, and further attempts to run the generator cause the StopIteration exception. In other words, "raise" is much more deadly than "yield": one can resume itself after yielding to the caller but a "raise" sends itself to the dead end.</p> <p>I wonder if there are simple ways to do the "reverse throw" in Python? That will enable us to write coroutines that cooperate by throwing exceptions at each other. But why use exceptions? Well, I dunno... it all began as some rough idea.</p> <p>CASE STUDY CODE:</p> <pre><code>class MyException(Exception):pass def handleError(func): ''' handle an error''' errors =[] def wrapper(arg1): result = func(arg1) for err in findError(result): errors.append(err) print errors return result return wrapper def findError(result): ''' Find an error if any ''' print result for k, v in result.iteritems(): error_nr = v % 2 if error_nr ==0: pass elif error_nr &gt; 0: yield MyException @handleError def numGen(input): ''' This function take the input and generates 10 random numbers. 10 random numbers are saved in result dictionary with indices. Find error decorator is called based on the result dictionary''' from random import randint result= {} errors = [] for i in range(9): j = (randint(0,4)) result[i] = input + j return result if __name__ == '__main__': numGen(4) </code></pre> <p>Could anyone explain please both the ideas based on case study example(Raising exception in a generator and handle it elsewhere vice versa)? I do expect pro's and con's of both methods.</p> <p>Thanks in advance.</p> <p>Looking for an answer drawing from credible and/or official sources.</p>
0non-cybersec
Stackexchange
CLAMAV on Centos Mail Server: Can&#39;t connect to UNIX socket clamd.sock. <p>In my Centos 6.4 server, I am using Postfix and Dovecot with Amavis/ClamAV filter. Lately I have been trying to solve my spam problem(only occurs in Gmail and Hotmail) so I've been tailing logs. </p> <p>Though I can send and receive e-mails, I have realized that Clamav causes error in /var/log/maillog so I think perhaps it can help my spam problem if I can solve this error. </p> <p>That's the main error, I think the rest of the process goes allright.</p> <pre><code>(!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.sock: No such file or directory </code></pre> <p>Test information:</p> <pre><code>XX.XX.XX.XX: Sender Client IP (This time Thunderbird) YY.YY.YY.YY: My mail server IP [email protected]: Sender address [email protected]: Receiver address (This time Gmail) </code></pre> <p>When I send an e-mail from a mail account in my server, Here's how /var/log/maillog looks: </p> <pre><code>postfix[3422]: warning: XX.XX.XX.XX: hostname XX.XX.XX.XX.static.ttnet.com.tr verification failed: Name or service not known postfix[3422]: connect from unknown[XX.XX.XX.XX] postfix[3422]: setting up TLS connection from unknown[XX.XX.XX.XX] postfix[3422]: Anonymous TLS connection established from unknown[XX.XX.XX.XX]: TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits) postfix[3422]: D894AC1E61: client=unknown[XX.XX.XX.XX], sasl_method=PLAIN, [email protected] postfix/cleanup[3429]: D894AC1E61: message-id=&lt;[email protected]&gt; postfix/qmgr[1310]: D894AC1E61: from=&lt;[email protected]&gt;, size=862, nrcpt=1 (queue active) amavis[3326]: (03326-01) ESMTP::10024 /var/amavis/tmp/amavis-20131030T102202-03326-IY7b8Pdi: &lt;[email protected]&gt; -&gt; &lt;[email protected]&gt; SIZE=862 Received: from host.mydomain.com ([127.0.0.1]) by localhost (mydomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for &lt;[email protected]&gt;; Wed, 30 Oct 2013 10:22:02 +0000 (UTC) amavis[3326]: (03326-01) Checking: MemHkAhbAuqt [XX.XX.XX.XX] &lt;[email protected]&gt; -&gt; &lt;[email protected]&gt; amavis[3326]: (03326-01) Open relay? Nonlocal recips but not originating: [email protected] amavis[3326]: (03326-01) (!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.sock: 2 amavis[3326]: (03326-01) ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.sock, retrying (1) postfix[3422]: disconnect from unknown[XX.XX.XX.XX] amavis[3326]: (03326-01) (!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.sock: No such file or directory amavis[3326]: (03326-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.sock, retrying (2) amavis[3326]: (03326-01) (!)connect to /var/run/clamav/clamd.sock failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.sock: No such file or directory amavis[3326]: (03326-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.sock (All attempts (1) failed connecting to /var/run/clamav/clamd.sock) at (eval 113) line 600.\n amavis[3326]: (03326-01) (!)WARN: all primary virus scanners failed, considering backups postfix[3433]: connect from unknown[127.0.0.1] postfix[3433]: E52C1C1E71: client=unknown[127.0.0.1] postfix/cleanup[3429]: E52C1C1E71: message-id=&lt;[email protected]&gt; postfix/qmgr[1310]: E52C1C1E71: from=&lt;[email protected]&gt;, size=1279, nrcpt=1 (queue active) amavis[3326]: (03326-01) FWD from &lt;[email protected]&gt; -&gt; &lt;[email protected]&gt;,BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E52C1C1E71 amavis[3326]: (03326-01) Passed CLEAN {RelayedOpenRelay}, [XX.XX.XX.XX]:33926 [XX.XX.XX.XX] &lt;[email protected]&gt; -&gt; &lt;[email protected]&gt;, Message-ID: &lt;[email protected]&gt;, mail_id: MemHkAhbAuqt, Hits: 0.106, size: 862, queued_as: E52C1C1E71, 14736 ms postfix/smtp[3430]: D894AC1E61: to=&lt;[email protected]&gt;, relay=127.0.0.1[127.0.0.1]:10024, delay=15, delays=0.53/0.01/0.01/15, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E52C1C1E71) postfix/qmgr[1310]: D894AC1E61: removed amavis[3326]: (03326-01) extra modules loaded: unicore/lib/gc_sc/Digit.pl, unicore/lib/gc_sc/SpacePer.pl postfix/smtp[3436]: E52C1C1E71: to=&lt;[email protected]&gt;, relay=gmail-smtp-in.l.google.com[74.125.142.27]:25, delay=1.2, delays=0.01/0.02/0.68/0.5, dsn=2.0.0, status=sent (250 2.0.0 OK 1383128540 x12si3704513igx.15 - gsmtp) postfix/qmgr[1310]: E52C1C1E71: removed dovecot: imap-login: Login: user=&lt;[email protected]&gt;, method=PLAIN, rip=::1, lip=::1, mpid=3439, secured dovecot: imap([email protected]): Disconnected: Logged out bytes=90/777 </code></pre> <p>And here's the source code of received mail in Gmail:</p> <pre><code>Delivered-To: [email protected] Received: by 10.68.54.102 with SMTP id i6csp217498pbp; Wed, 30 Oct 2013 03:22:20 -0700 (PDT) X-Received: by 10.50.6.99 with SMTP id z3mr1702938igz.27.1383128540254; Wed, 30 Oct 2013 03:22:20 -0700 (PDT) Return-Path: &lt;[email protected]&gt; Received: from host.mydomain.com (mydomain.com. [YY.YY.YY.YY]) by mx.google.com with ESMTPS id x12si3704513igx.15.2013.10.30.03.22.19 for &lt;[email protected]&gt; (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 30 Oct 2013 03:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of [email protected] designates YY.YY.YY.YY as permitted sender) client-ip=YY.YY.YY.YY; Authentication-Results: mx.google.com; spf=pass (google.com: domain of [email protected] designates YY.YY.YY.YY as permitted sender) [email protected] Received: from localhost (unknown [127.0.0.1]) by host.mydomain.com (Postfix) with ESMTP id E52C1C1E71 for &lt;[email protected]&gt;; Wed, 30 Oct 2013 10:22:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at mydomain.com Received: from host.mydomain.com ([127.0.0.1]) by localhost (mydomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MemHkAhbAuqt for &lt;[email protected]&gt;; Wed, 30 Oct 2013 10:22:02 +0000 (UTC) Received: from [192.168.2.15] (unknown [XX.XX.XX.XX]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by host.mydomain.com (Postfix) with ESMTPSA id D894AC1E61 for &lt;[email protected]&gt;; Wed, 30 Oct 2013 10:22:01 +0000 (UTC) Message-ID: &lt;[email protected]&gt; Date: Wed, 30 Oct 2013 12:21:47 +0200 From: mydomain Development Base &lt;[email protected]&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: [email protected] Subject: That's the mail Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"&gt; &lt;/head&gt; &lt;body text="#000000" bgcolor="#FFFFFF"&gt; &lt;font face="Helvetica, Arial, sans-serif"&gt;What's up?&lt;/font&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Though it all seems fine and have scanned by amavisd-new, it goes to spam. I don't necessarily ask why but if it's related to not being scanned correctly, I need to fix this issue. </p> <p>And here's how I use CLAMAV in /etc/amavisd.conf file:</p> <pre><code>['ClamAV-clamd', \&amp;ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.sock"], qr/\bOK$/m, qr/\bFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ], </code></pre> <p>The file clamd.sock is not exist under /var/run/clamav/ dir, and this dir is chowned by clamav user and group (the service doesn't start when it's not). I don't know if it's a dynamic file that is being created and deleted on runtime but I don't think there's any issue with permissions, perhaps some process or service is missing to create the file. </p> <p>Any ideas? Thanks in advance.</p>
0non-cybersec
Stackexchange
How to create custom section titles with a &quot;&lt;title&gt; &lt;number&gt;&quot; format in ConTeXt?. <p>I am making a book, with chapters titled "Week 1", "Week 2", "Week 3", etc., and sections titled "Activity 1", "Activity 2", "Activity 3", etc., and other sections titled "Presentation 1", "Presentation 2", "Presentation 3", etc.</p> <ul> <li>The preceding numbers, e.g. "1.1 Activity 1", are not used.</li> <li>No other text, e.g. "Week 1 Topic" appears in the text.</li> <li>The numbers for sections never reset.</li> </ul> <p>Here is a sample table of contents, showing how I hope it will appear:</p> <pre><code> ______________________ | | | Contents | | | | Week 1 | | Activity 1 | | Activity 2 | | Presentation 1 | | Week 2 | | Activity 3 | | Activity 4 | | Presentation 2 | |______________________| </code></pre> <p>The document occassionally has other orginary chapter and section titles as well. These should get the same font formatting, but otherwise, not be modified, and appear without any number, e.g., using chapter titles "Forward", "Conclusion", and a section title called "Notes":</p> <pre><code> ______________________ | | | Contents | | | | Forward | | Week 1 | | Activity 1 | | Activity 2 | | Presentation 1 | | Week 2 | | Activity 3 | | Notes | | Conclusion | |______________________| </code></pre> <p>I have tried my own solution, by removing the preceding numbers using <code>\setuphead[chapter][number=no]</code>, creating counters, e.g. <code>\definenumber[weekcount]</code>, then defining custom macros which call for chapter titles to use these counters, however, my solution does not work:</p> <pre><code>\definenumber[weekcount] \definenumber[activitycount] \definenumber[presentationcount] \setnumber[weekcount]{1} \setnumber[activitycount]{1} \setnumber[presentationcount]{1} \define\week{\chapter{Week~\getnumber[weekcount]}\incrementnumber[weekcount]} \define\activity{\section{Activity~\getnumber[activitycount]}\incrementnumber[activitycount]} \define\presentation{\section{Presentation~\getnumber[presentationcount]}\incrementnumber[presentationcount]} \setuphead[chapter][number=no] \setuphead[section][number=no] \starttext \week \activity This is some text. \activity This is some text. \presentation This is some text. \week \activity This is some more text. \activity This is some more text. \presentation This is some more text. \stoptext </code></pre> <p>This results in this:</p> <pre><code> ______________________ | | | Contents | | | | Week | | Activity | | Activity 1 | | Presentation | | Week | | Activity | | Activity 1 | | Presentation | |______________________| </code></pre> <p>If you remove <code>\setuphead[chapter][number=no]</code>, results are also unusual:</p> <pre><code> ______________________ | | | Contents | | | | 1. Week 1. | | 1.1 Activity 1. | | 1.2 Activity 1.1 | | 1.2 Presentation 1. | | 2. Week 2. | | 2.1 Activity 2 | | 2.2 Activity 2.1 | | 2.3 Presentation 2. | |______________________| </code></pre> <ul> <li>Why is the numbering of the counters appear in this manner, when used inside section titles?</li> <li>How can I create custom chapter titles using a "Week " format, and similarly formatted section titles?</li> </ul>
0non-cybersec
Stackexchange
Qualcomm’s Toq Smartwatch give you a chance to Text Without Typing.
0non-cybersec
Reddit
Yankees rumors: Braves, Giants interested in Joba Chamberlain.
0non-cybersec
Reddit
Supreme Court of India allows 13-year-old rape survivor to abort her 31-week-old foetus.
0non-cybersec
Reddit
Continuity of an extended rate of variation?. <p>Let $f:\mathbb R\to \mathbb R$ be a $C^1$ function. </p> <blockquote> <p>Then Prove or disprove that $g:\mathbb R^2\to \mathbb R$ define by $$g(x,y) = \begin{cases}\frac{f(x)-f(y)}{x-y}&amp;\text{if $x\neq y$}\\ f'(x)&amp;\text{if $x= y$}\end{cases}$$ is a continuous function.</p> </blockquote> <p>Note that $C^1$ Continuity must be crucial since a blatant counter example given by the function $$f(x) = \begin{cases}x^2\sin \frac{1}{x}&amp;\text{if $x\neq 0$}\\ 0&amp;\text{if $x= 0$}\end{cases}$$ which differentiable on $\mathbb R$ but not $C^1$ because the derivative is not continuous at $x=0.$</p>
0non-cybersec
Stackexchange
What separates Protect and Access from its rivals.
1cybersec
Reddit
pandas dataframe create new columns and fill with calculated values from same df. <p>Here is a simplified example of my df:</p> <pre><code>ds = pd.DataFrame(np.abs(randn(3, 4)), index=[1,2,3], columns=['A','B','C','D']) ds A B C D 1 1.099679 0.042043 0.083903 0.410128 2 0.268205 0.718933 1.459374 0.758887 3 0.680566 0.538655 0.038236 1.169403 </code></pre> <p>I would like to sum the data in the columns row wise:</p> <pre><code>ds['sum']=ds.sum(axis=1) ds A B C D sum 1 0.095389 0.556978 1.646888 1.959295 4.258550 2 1.076190 2.668270 0.825116 1.477040 6.046616 3 0.245034 1.066285 0.967124 0.791606 3.070049 </code></pre> <p>Now, here comes my question! I would like to create 4 new columns and calculate the percentage value from the total (sum) in every row. So first value in the first new column should be (0.095389/4.258550), first value in the second new column (0.556978/4.258550)...and so on... Help please </p>
0non-cybersec
Stackexchange
Is there a limit on how many stars could be in one solar system? Currently world building for a story, and wondering if a planet could realistically exist in a system more 3+ stars, and if so, what effects could that have on its climate and seasons..
0non-cybersec
Reddit
What&#39;s the framework mechanism behind dependency properties?. <p>I have been reading about dependency properties in several books but all have one thing in common, they just tell us how they are implemented( using <code>static readonly DependencyProperty</code> etc.) but does not tell the exact way they work from inside. </p> <p>I mean they are implemented as static but still applies to all objects.<br> Second point of confusion is attached properties. </p> <p>Is there any tutorial available that can explain all these concepts in an easy way?</p>
0non-cybersec
Stackexchange
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange