text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
A letter to my teeth. I am sorry for neglecting you for so many years. Even after I have become aware of how destructive it can be, I continue to wear down your enamel through my continuous drinking of acidic and hot drinks. Sometimes I don't even brush you, you seem to be the first thing I neglect when life gets overwhelming. Recently I have been flossing more than ever and plan to brush much more regularly. You are a piece of me, and I am a piece of you. I am grateful for you and the state you are in, even if you are now much more vulnerable and weaker due to my poor habits. I hope to make each tooth live a little longer than they were going to, extending your life as much as I can.
0non-cybersec
Reddit
Option clash xeCJK and fontspec. <p>I need to load the <code>fontspec</code> package with the <code>no-math</code> option while also loading the <code>xeCJK</code> package to include a few Japanese names in a large English document. Since the<code>xeCJK</code> package already loads the <code>fontspect</code> package without any options, I am running into problems. More precisely, the code</p> <pre><code>\documentclass{scrbook} \usepackage{xeCJK} \usepackage[no-math]{fontspec} \begin{document} \begin{CJK} 角谷静夫 \end{CJK} \end{document} </code></pre> <p>results in an option clash for the <code>fontspec</code> package whereas the code</p> <pre><code>\documentclass{scrbook} \usepackage[no-math]{fontspec} \usepackage{xeCJK} \begin{document} \begin{CJK} 角谷静夫 \end{CJK} \end{document} </code></pre> <p>results in the following error:</p> <pre><code> LaTeX Error: Environment CJK undefined. </code></pre> <p>Is there a way around this? I would also be happy with a solution to include snippets of Japanese using other packages than <code>xeCJK</code>.</p>
0non-cybersec
Stackexchange
Connection between the positive part of a Sobolev function and its trace. <p>Assume that $u\in W^{1,1}(\Omega)$, where $\Omega$ is a bounded domain in $\mathbb{R}^n$ having regular enough boundary (say Lipschitz). Then it is well known that also $u^+\in W^{1,1}(\Omega)$. Naturally, one could expect that $\mathrm{Tr}\, (u^+) = (\mathrm{Tr}\, u)^+$, but, to my surprise, I haven't found such a result in any book.</p> <p>So I was wondering if this is true at all and if so, whether there is some reference for it.</p> <p>Thank you very much for any help</p>
0non-cybersec
Stackexchange
TIL Where the expression "shit hit the fan" comes from.
0non-cybersec
Reddit
I just wrote a mini guide on how to learn hacking.
1cybersec
Reddit
This survival sugarcane farm regrows faster than you can harvest it..
0non-cybersec
Reddit
My Contribution to YAM.
0non-cybersec
Reddit
ObGyn recommended I look into freezing eggs as an option.. I'm turning 34 at the end of the summer, and I'm single with no one on the horizon. Even if I were to meet The One tomorrow and we follow the "traditional" route to establishing a family, the earliest I'll have a baby is 36 years old. I want at least two kids, so that takes me closer to 40. So far, everything else is healthy and I'm nowhere near menopausal, she's only recommending it because of the time horizon... Has anyone else gone through this or have thoughts on the subject? I'm just weighing all my options for now. *Edit: I'm sorry I'm getting downvoted already - maybe I'm breaking some rules I didn't know about? This is my first time posting in this community and just wanted to share for some other womens' experiences in the matter.
0non-cybersec
Reddit
higan says that OpenGL 3.2 is not available, but I should have 3.3. <p>I am running Trusty with gnome in crouton on a Toshiba Chromebook 2. I installed higan, and it reports: "Error: OpenGL 3.2 is not available." I googled this, and apparently the problem may be related to some weird way that OpenGL reports its version, distinguishing between "version" and "core profile version". I have no idea what this means.</p> <p>Here's my glxinfo and mesa-related packages. Please let me know if any more info would help.</p> <p><code>$ glxinfo | grep OpenGL</code>: </p> <pre><code>OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Bay Trail OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.3 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.0 Mesa 10.1.3 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: </code></pre> <p><code>$ dpkg -l | grep -i mesa</code>:</p> <pre><code>ii libegl1-mesa:amd64 10.1.3-0ubuntu0.1 amd64 free implementation of the EGL API -- runtime ii libegl1-mesa-drivers:amd64 10.1.3-0ubuntu0.1 amd64 free implementation of the EGL API -- hardware drivers ii libgl1-mesa-dri:amd64 10.1.3-0ubuntu0.1 amd64 free implementation of the OpenGL API -- DRI modules ii libgl1-mesa-glx:amd64 10.1.3-0ubuntu0.1 amd64 free implementation of the OpenGL API -- GLX runtime ii libglapi-mesa:amd64 10.1.3-0ubuntu0.1 amd64 free implementation of the GL API -- shared library ii libglu1-mesa:amd64 9.0.0-2 amd64 Mesa OpenGL utility library (GLU) ii libopenvg1-mesa:amd64 10.1.3-0ubuntu0.1 amd64 free implementation of the OpenVG API -- runtime ii libtxc-dxtn-s2tc0:amd64 0~git20131104-1.1 amd64 Texture compression library for Mesa ii libwayland-egl1-mesa:amd64 10.1.3-0ubuntu0.1 amd64 implementation of the Wayland EGL platform -- runtime ii mesa-utils 8.1.0-2 amd64 Miscellaneous Mesa GL utilities </code></pre>
0non-cybersec
Stackexchange
How can I apply a style to elements of a submatrix of a tikz matrix?. <p>I'm trying to apply a style for a submatrix of a matrix and ended up by passing arguments through two .list-handlers. Things don't work as I expected, again I'm just able to set either rows or columns but not both.</p> <p>What's the problem? Do you have another idea?</p> <pre><code>\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix,positioning} \tikzset{ rows/.style 2 args={ @/.style={row ##1 column #2/.style={nodes={rectangle,draw=black}}}, @/.list={#1} }, box/.style 2 args={ @/.style={rows={#1}{##1}}, @/.list={#2} } } \tikzset{square matrix/.style={ matrix of nodes, column sep=-\pgflinewidth, row sep=-\pgflinewidth, nodes={ minimum height=#1, anchor=center, text width=#1, align=center, inner sep=0pt }, }, square matrix/.default=1.2cm } \begin{document} \begin{tikzpicture}[] \matrix[square matrix, box={1,...,3}{3,2} % apply the style to cells {1,3},{2,3},{3,3},{1,2},{2,2},{3,2} ] { &amp; x &amp; x &amp; &amp; &amp; \\ &amp; &amp; x &amp; &amp; x &amp; \\ x &amp; x &amp; x &amp; x &amp; x &amp; \\ &amp; &amp; x &amp; &amp; &amp; \\ }; \end{tikzpicture} \end{document} </code></pre>
0non-cybersec
Stackexchange
Anyone know where I can get some good, cheap handstand blocks?.
0non-cybersec
Reddit
[K.C. Johnson] Wade on Ray Allen retirement: "I thank Ray Allen. The Game 6 shot that he hit saved our butts in Miami. I’ve always been a fan of Ray.".
0non-cybersec
Reddit
Universal electric guitar's humbuckers connections guide.
0non-cybersec
Reddit
How to install Zentyal on remote Ubuntu Server?. <p>I`m noob in linux, so be patient )))). How to install it on VPS (Ubuntu 13.04, OPENVZ)? Do I have to download image firstly to server and run it or should I install it from Ubuntu repository? I have only SSH connection to server. And how to connect to zentyal after installation? I know that have to set up vpn. </p>
0non-cybersec
Stackexchange
Jller, a robot that autonomously sorts rocks by geologic age.
0non-cybersec
Reddit
Crashlytics. Project dev is inactive. <p>When I'm trying to upload new flavor build, I get an error:</p> <blockquote> <p>WARN - Crashlytics had a problem uploading the distribution. Project dev is inactive</p> </blockquote> <p>How can I fix it and add new <code>flavor</code> for tests?</p>
0non-cybersec
Stackexchange
Scorpion-wasp? Flying scorpion? It turns out it's actually called a "scorpionfly." [OC].
0non-cybersec
Reddit
TCP Bandwidth and delay guarantees. <p>I was wondering if TCP can provide bandwidth and delay guarantees? Or does it have to implemented on the application layer? </p>
0non-cybersec
Stackexchange
Incremental File Backup With Super Easy End User Restore Interface?. <p>Don't ask why. I need to devise an incremental file backup solution (writing to a USB attached disk array) that has a super easy interface to allow any end user (like even a receptionist) to restore a version of any file to their local workstation.</p> <p>My initial thoughts would be to devise a solution that stores the last 10 versions (or all versions in the last 30 days) in the same target folder but with an incremental number appended to the filename (filename_1.ext filename_2.ext). The end user can see the filenames date-time to determine when that version was created. The end user could browse the files via a mapped drive in Windows Explorer using SAMBA. I can think of anything easier for the user than that.</p> <p>Here's some potential challenges on the server side that may need to be addressed:</p> <ul> <li><p>Frequency of backup related to performance. We're talking a data storage folder containing probably 100,000 files and 5TB of data. The incremental backup needs to be run at least once an hour. So it's got to be a solution that is architected to handle pretty large file collections. I'm anticipating this may not be an issue though as the volume of file changes is low, maybe 100 files change every hour at most.</p></li> <li><p>Data duplication. Yes, storage is cheap, but with multiple versions the back storage requirement will be large. I don't think it's possible to have data de-duplication and let the end user be able to browse versions of files with a simple SAMBA file share. (Looked into RDIFF and you need to run the rdiff command to restore.) </p></li> </ul> <p>So I'd be open to a solution (free or low-cost) that instead of the users mapping a drive to the backup folder, they could bring up a web interface to browse the files and download as needed. Not quite as simple as mapping a drive but this would allow the backend to handle rebuilding a file version. </p> <p>Any suggestions on solutions?</p>
0non-cybersec
Stackexchange
mod_rewrite rules logging &quot;Config variable ${REQUEST_URI} is not defined&quot; on every request. <p>I have the following .htaccess on an Apache/2.4.2-win32 server:</p> <pre class="lang-none prettyprint-override"><code># Turn mod_rewrite on RewriteEngine On # Allow direct loading of files in the static directory RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^/?static/(.+)$ - [L] # Send all other requests to controller RewriteCond ${REQUEST_URI} !^/?(spf/index\.php)?$ RewriteRule .* spf/index.php [L,QSA] </code></pre> <p>This works well and does exactly what I want it to. For those of you who can't be bothered working out what it does, it sends all requests through <code>spf/index.php</code> unless they are for a file that exists in the <code>static</code> directory.</p> <p>The file resides in the virtual host's documentroot.</p> <p>Every request that falls through this .htaccess generates the following error:</p> <pre class="lang-none prettyprint-override"><code>[Wed Aug 01 14:14:16.549835 2012] [core:warn] [pid 7100:tid 1076] AH00111: Config variable ${REQUEST_URI} is not defined </code></pre> <p>This is not actually causing a problem - every request works as expected - but it's filling up my error log and I don't like it.</p> <p>According to <a href="http://www.google.com/search?q=%22Config+variable+%24%7BREQUEST_URI%7D+is+not+defined%22" rel="noreferrer">Google</a>, no-one has ever had this error before. That's as far as I've got with debugging it, I don't really know where to go next.</p> <p>Anyone got any idea what's going on here?</p> <p><em>P.S. I'm aware this might be a question better suited to SF, if the general opinion is that it doesn't belong here I'll move it.</em></p>
0non-cybersec
Stackexchange
Transition probabilities for a nonlinear state space model. <p>I am trying to compute the transition probabilities of the model given by $X_{n+1} = f_{n+1}(X_n,W_{n+1})$ where $X_n's, W_n's$ are $R^k$ valued random variables for $n \geq 0$, $W_n's$ are independent and $f_n's$ are measurable. Also, define $\mathcal{F}_n=\sigma(X_0,W_1,\cdots,W_n)$. (From this definition we get that $X_n$ is $\mathcal{F}_n$ measurable).</p> <p>From these <a href="http://www.uni-bonn.de/~eberle/MarkovProcesses/MPSkript.pdf" rel="nofollow">notes</a>, the transition probabilites are defined as</p> <p>$$p_{n+1}(X_n,B) := P[X_{n+1}\in B|\mathcal{F}_n]$$</p> <p>Is it true that $$ P[X_{n+1}\in B|\mathcal{F}_n] (\omega) = P[f(X_n(w),W_{n+1})\in B]~a.s. $$ </p> <p>If so, what is methodology for the proof and if not, what are the transition probabilites for this model?</p> <p>Thanks for the help.</p>
0non-cybersec
Stackexchange
Is there any way to farm the Wendigo solo?. I've already finished the kills part of it, just need multi-kills and points. My problem is I've looked up ways to farm it and it seems like the all require you to load in with a group so you can just farm kills, whether it be lost sectors or well. The thing is I don't have a fireteam to run with so I'm stuck running regular strikes and its so much harder to get kills this way because blueberries just go through and kill everything. so it makes getting points hard and getting multi-kills even harder. Is there any way to solo farm this?
0non-cybersec
Reddit
libinput button scrolling: delay between button press and scroll. <p>I'm using libinput to enable "button scrolling" for my trackball, where holding a specific button down causes ball movement to translate to scroll movement.</p> <pre><code>xinput set-prop $TRACKBALL_ID "libinput Scroll Method Enabled" 0, 0, 1 xinput set-prop $TRACKBALL_ID "libinput Button Scrolling Button" 8 </code></pre> <p>However, there's a delay of probably a few hundred milliseconds between pressing the button and scroll-translation starting. The timeline goes like this:</p> <pre><code>+---+---+------- ^ ^ ^ | | +-- scrolling starts | +-- start moving ball +-- button down </code></pre> <p>It doesn't matter when I start moving the ball — the point is there's a fixed delay between "button down" and "ok, ready to translate movement to scroll".</p> <p>It seems that this delay exists to enable dual-mode button use. If I just press and release the button quickly, its normal function (browser "back" button) is executed.</p> <p>(Interestingly, the cursor is rendered stationary immediately upon pressing the button, even before scroll output begins.)</p> <p>Is there a way to configure this delay? I'm perfectly happy to sacrifice the dual-mode use if necessary. Even if not configurable, who defines this constant and where? Perhaps I can get it changed in source.</p>
0non-cybersec
Stackexchange
Chef Stephen Richards' Low Cal Chocolate Cake & Chocolate Icing Recipe.
0non-cybersec
Reddit
Pete Seeger at age 91: "It’s a very important thing to learn to talk to people you disagree with.".
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 prevent concurrent execution of a job in Grails?. <p>I have a quartz job in grails, that needs to be executed in every 5s, but I need this sequentially. In some situations the execution of the job exceeds this 5s, in this case I dont't want to be executed while the previouse exection is not finished. How to configure this in grails?</p> <p>(Of course the whole magic could be done with a static volatile flag, but is not a very elegant way to do this) (Also how can I configure for the job to be singleton?)</p> <p>thx</p>
0non-cybersec
Stackexchange
Codex Seraphinianus. Is it even crackable? Is it just rubbish?.
1cybersec
Reddit
Broken tip of screwdriver..
0non-cybersec
Reddit
Perfectly Timed Photos Moon.
0non-cybersec
Reddit
How do you find system manufacturer/model on Linux without root access?. <p>I'm working on a module for <a href="http://www.cs.wisc.edu/condor" rel="nofollow noreferrer">Condor</a> that will collect hardware information so that we can use realistic numbers to compute power savings, etc. The difficulty is that I don't maintain most of the client systems, so I have to write this with no assumptions as to what may or may not be installed on the system and I can't do anything that requires root access.</p> <p>I've looked at various utilities (lshal, lshw, hwinfo, etc) and none of them seem to be universal across both Debian- and RedHat-based systems. I have neither the authority nor the desire to force other departments on campus to have one of those packages installed. </p> <p>dmidecode seems to be pretty universal, but it's not helpful without root privileges. I haven't been able to find any files in /proc that contain the system manufacturer and model. Is there something I'm missing or do I need to try to get all of the distributed admins to install one of the aforementioned utilities?</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
Android CollapsingToolbarLayout collapse Listener. <p>I am using <code>CollapsingToolBarLayout</code> alongside with <code>AppBarLayout</code> and <code>CoordinatorLayout</code>, and they are working Fine altogether. I set my <code>Toolbar</code> to be fixed when I scroll up, I want to know if there is a way to change the title text of the Toolbar, when <strong><code>CollapsingToolBarLayout</code></strong> it is collapsed. </p> <p>Wrapping up, I want two different <strong>titles</strong> when <em>scrolled</em> and when <em>expanded</em>.</p> <p>Thank you all in advance</p>
0non-cybersec
Stackexchange
What Could You Buy for $8.5 Billion?.
0non-cybersec
Reddit
Vim visual mode to system clipboard?. <p>Using the vim text editor, I am looking for a method to copy content highlighted in visual mode to the system clipboard (i.e. I would then be able to <code>Ctr-v</code> that content say in a browser window). </p> <p>Is there a standard way to copy content directly to the system clipboard? If not is there a suited hack to enable it for Mac OS 10.7.3?</p>
0non-cybersec
Stackexchange
Group action on a subset. <p>having trouble with this problem. It's homework. We're given a finite set $S$ on which a finite group $G$ acts on transitively. If $U$ is a subset of $S$, I'm supposed to show that the subsets of $gU$ cover $S$ evenly. By evenly, I mean that each $s\in S$ is in the same number of sets $gU$.</p> <p>Things I know are that for any $g,g&#39;\in G$, $gU$ and $g&#39;U$ both have order $|U|$. I also know that, since the operation is transitive, there is only one orbit (and I suspect this is important). </p> <p>I also noticed that, when $|U| = 1$, this property is just the transitivity of the group action. I'm just having trouble generalizing this to where the sets overlap (ie, $s\in S$ is in more than one set $gU$.)</p>
0non-cybersec
Stackexchange
Find $ \mathbb P \{ \max(X, Y) - \min(X, Y) \gt 0.2 \} $.. <p>Let $X$ and $Y$ be iid random variables for which $X \sim \text{Expo}(2)$ and $Y \sim \text{Expo}(3)$.</p> <p>Find $ \mathbb P \{ \max(X, Y) - \min(X, Y) \gt 0.2 \} $.</p> <p>SOLUTION:</p> <p>There is a clever way to do this but, to convince myself, I tried to calculate it via "brute force," i.e., using convolution (or, rather, "cross-correlation," more specifically). However, I can't seem to get my answer to match with the given solution. Here's what I did:</p> <p>Let $T \sim \{ \max(X, Y) - \min(X, Y) \} $. Then, $T \sim \lvert X - Y \rvert$, and so</p> <p>$$ f_T(t) = \int_{0}^{\infty} f_X(t+y)f_Y(y)dy + \int_{0}^{\infty}f_X(y-t)f_Y(y)dy $$</p> <p>$$ = \int_{0}^{\infty} 2e^{-2(t+y)} 3e^{-3y} dy + \int_{0}^{\infty}2e^{-2(y-t)} 3e^{-3y}dy $$</p> <p>$$ = \frac{6}{5}\left(e^{-2t} + e^{2t}\right). $$</p> <p>Now, for the survival function of $T$, we have</p> <p>$$ \bar F_T(t) = 1 - \left[ \int_{0}^{t} \frac{6}{5}\left(e^{-2u} + e^{2u}\right) du \right] = 1 - \left[ \frac{6}{5} \sinh(2t) \right].$$</p> <p>So, for our desired probability, we only need to evaluate $\bar F_T(0.2):$</p> <p>$$\bar F_T(0.2) = 1 - \frac{6}{5} \sinh \left[ 2(0.2) \right] = 1 - \frac{6}{5} \sinh \left[ 2(0.2) \right] = 1 - \frac{6}{5} \sinh \left( 0.4 \right) \approx 0.5070972.$$</p> <p>However, the provided solution states that</p> <p>$$\bar F_T(t) = \frac{2}{5}e^{-3t} + \frac{3}{5}e^{-2t} $$</p> <p>and so the solution is $ \approx 0.6217$.</p> <p>Like I said, the provided solution goes about solving the problem in a much more clever (and quicker) way by conditioning on the cases in which $X \lt Y$ and $X \gt Y$, which I understand. My question here, rather, is why this brute force approach didn't work.</p>
0non-cybersec
Stackexchange
Is there any prime in the form of $10^n+1$ for $n&gt;2$?. <p>Is there any prime in the form of $10^n+1$ for $n&gt;2$ ? It can be seen that $n$ is the form of $2^k$ so that this number is prime.</p>
0non-cybersec
Stackexchange
Getting &quot;Error: you must authenticate to access this jenkins&quot; when trying to run &quot;Java -jar jenkins-cls.jar -s http://localhost:8080 /help&quot;. <p>Getting below error</p> <p><code>Error: you must authenticate to access this jenkins" when trying to run "Java -jar jenkins-cls.jar -s http://localhost:8080 /help</code></p> <p>Steps performed as below,<br> 1. Copied jenkins-cls.jar to the local drive.<br> 2. Opened command prompt and navigate to path where jenkins-cls.jar is saved.<br> 3. Type "Java -jar jenkins-cls.jar -s <a href="http://localhost:8080" rel="noreferrer">http://localhost:8080</a> /help" and press enter.</p> <p>It should ask for pass-code but instead, it displayed message "Error: you must authenticate to access this jenkins".</p> <p>Any help to resolve this query is highly appreciated.</p>
0non-cybersec
Stackexchange
After Hitler (2016) Europe after World War 2. The German defeat doesn’t promise a better tomorrow. In the five years that separated the end of the Second World War from the start of the Cold War, the world had hoped for a lasting peace, but instead found itself on the brink of apocalypse..
0non-cybersec
Reddit
OBD II scanner reverse engineering. <p>Newbie here. I'm working on an OBD II scanner and have made a hardware using STM32. It uses its inbuilt peripherals to communicate with the OBD bus (like CAN, K-Line, etc).</p> <p>Question: Are there any projects where one has reverse engineered an OBD II scanner to know what it is sending over the bus. I need to know what it is doing during initialization and PID requests so that I can improve my self-made system.</p> <p>Similar question asked in Motor Vehicle Maintenance and Repair:<a href="https://mechanics.stackexchange.com/questions/39093/how-to-reverse-engineer-the-manufacturer-specific-protocol-on-obd2-for-acquiring"> [Link]</a> But there were no answers.</p>
1cybersec
Stackexchange
So, I've removed some animations from Batman: the Telltale series.
0non-cybersec
Reddit
How exactly is xgboost model boosting from the initialized predictions?. <p>Suppose I have the following training data</p> <pre><code>train &lt;- structure(list(y = c(0.123126546349629, 5.08341738064507, 0.417169757659117, 11.3672537943004, -2.29483328843934), V1 = c(1.49320744893171, 1.30159237260313, -1.09176081656066, 0.370655592949594, -0.492654216879005 ), V2 = c(0.102550648823008, 1.51622697492906, 0.100275457460287, 2.30810553639935, -0.66650031535771), V3 = c(-0.296783627961752, 0.326261056538812, 0.114550707187058, -0.592954740596188, -0.313673257626249 )), row.names = c(NA, 5L), class = "data.frame") dtrain &lt;- xgb.DMatrix(as.matrix(train[, -1]), label = train[, "y"]) &gt; train y V1 V2 V3 1 0.1231265 1.4932074 0.1025506 -0.2967836 2 5.0834174 1.3015924 1.5162270 0.3262611 3 0.4171698 -1.0917608 0.1002755 0.1145507 4 11.3672538 0.3706556 2.3081055 -0.5929547 5 -2.2948333 -0.4926542 -0.6665003 -0.3136733 </code></pre> <p>and have a single testing observation:</p> <pre><code>test &lt;- structure(list(V1 = 1.8145292639671, V2 = -0.6291386853624, V3 = 0.340185971673589), row.names = 1L, class = "data.frame") dtest &lt;- xgb.DMatrix(as.matrix(test)) &gt; test V1 V2 V3 1 1.814529 -0.6291387 0.340186 </code></pre> <p>I specify my parameters, note that here, the <code>base_score</code> is set to 0.</p> <pre><code>params &lt;- list(max_depth = 2, eta = 0.1, subsample = 1, objective = "reg:squarederror", base_score = 0) </code></pre> <p>The resulting model is</p> <pre><code>mymod &lt;- xgb.train(params = params, data = dtrain, nrounds = 1) xgb.plot.tree(model = mymod) </code></pre> <p><a href="https://i.stack.imgur.com/x5v8o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x5v8o.png" alt="enter image description here"></a></p> <pre><code>&gt; predict(mymod, dtest) [1] -0.1147417 </code></pre> <p>This makes sense to me, because with my <code>test</code> observation, I end up in the top leaf, which has a value of -0.1147.</p> <p>Now I want to use <code>base_margin</code> to specify a set of initial values that I want to boost from. Suppose I set these values to 2 and predict on <code>test</code> again.</p> <pre><code>dtrain2 &lt;- xgb.DMatrix(as.matrix(train[, -1]), label = train[, "y"], base_margin = rep(2, nrow(train))) mymod2 &lt;- xgb.train(params = params, data = dtrain2, nrounds = 1) xgb.plot.tree(model = mymod2) &gt; predict(mymod2, dtest) [1] -0.1938634 </code></pre> <p>Now the tree is different because of the <code>base_margin</code> specification. The prediction is simply the leaf output, -0.1938634, but why is it not 2 + (-0.1938634) because I thought <code>base_margin</code> is specifying the baseline predictions for <code>mymod2</code> to boost from? <a href="https://i.stack.imgur.com/noo9P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/noo9P.png" alt="enter image description here"></a></p> <p>Would it be correct to specify <code>base_margin = 2</code> for my testing observation? i.e.</p> <pre><code>dtest2 &lt;- xgb.DMatrix(as.matrix(test), base_margin = 2) &gt; predict(mymod2, dtest2) [1] 1.806137 </code></pre> <p>This gives me 2 + (-0.1938634) = 1.806137</p>
0non-cybersec
Stackexchange
Few minutes before the alarm....
0non-cybersec
Reddit
makeinfo package missing in ubuntu 12.04. <p>Please can anybody give me a answer for this, I have already tried </p> <pre><code>sudo apt-get install makeinfo textinfo texi2html </code></pre> <p>but I still get the error "Unable to find the package."</p>
0non-cybersec
Stackexchange
Approximation of a function and second derivative. <p>While solving some exercise I came up with this problem:</p> <blockquote> <p>Assume that <span class="math-container">$f \in C^2[0,\infty]$</span> (i.e. <span class="math-container">$f$</span> has continuous second derivative on <span class="math-container">$[0,\infty)$</span> and there exists limit in <span class="math-container">$+\infty$</span> of <span class="math-container">$f$</span>) be such that <span class="math-container">$f''(0) = 0$</span>.</p> <p>Does there exist a sequence <span class="math-container">$(f_n) \subset C^2[0,\infty]$</span> such that <span class="math-container">$f_n \to f$</span> and <span class="math-container">$f''_n \to f''$</span> in the supremum norm (i.e. <span class="math-container">$\lVert f_n - f \rVert_{C[0,\infty]}$</span>, <span class="math-container">$ \lVert f''_n - f'' \rVert_{C[0,\infty]} \to 0$</span> ) and all <span class="math-container">$f_n$</span>'s satisfies <span class="math-container">$f''_n(0) = f'_n(0) = 0$</span>?</p> </blockquote> <p>Maybe I am wrong but I think it would be nearly enough to approximate in that sense linear (in some neighborhood of <span class="math-container">$0$</span>) functions.</p> <p>I will be grateful for any hints.</p>
0non-cybersec
Stackexchange
Does "Asking the real questions" have an origin?. Lately, people started to comment "asking the real questions" after someone else asked trivial, funny, sometimes dirty questions on the matter. Does this sentence have a distinct origin, or has it gone virally comment by comment?
0non-cybersec
Reddit
remember after refresh selected row in extjs grid. <p>I have a problem. I use extjs <code>grid</code>. This grid will be refreshed every <code>seconds</code>. </p> <p>I refresh with this function:</p> <pre><code>ND.refresh = function() { ND.commList.load(); } var refreshSeconds = refreshRate * 1000; var t = setInterval('ND.refresh()', refreshSeconds); </code></pre> <p>But when someone selected a row to highlight it it <code>reset</code> this selection. How can I remember the selected row and highlight it again after refresh?</p> <p>This is my grid:</p> <pre><code>var grid = Ext.create('Ext.grid.Panel', { autoscroll: true, region: 'center', store: ND.dashBoardDataStore, stateful: true, forceFit: true, loadMask: false, stateId: 'stateGrid', viewConfig: { stripeRows: true }, columns: [{ text: 'Vehicle', sortable: true, flexible: 1, width: 60, dataIndex: 'vehicle' }, { text: 'CCU', sortable: true, flexible: 0, width: 50, renderer: status, dataIndex: 'ccuStatus' }] }); </code></pre> <p>Thanks guys</p>
0non-cybersec
Stackexchange
The protagonist of the film was actually a ruthless murderess who is followed and threatened by his own conscience..
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
In multiple tables, how to align columns again after variable-width columns?. <p>There are multiple (e.g., 2) tables that contain similar information. Between them is one table row of white space. </p> <p>All tables have 3 columns. The first two columns belong together, which is why the second column has no heading. There should be a <code>\qquad</code> of white space between the longest text in the first column and the leftmost character of the second column. (It's ok to seek out the longest text manually and add the <code>\qquad</code> manually, like below.)</p> <p>Is there a nice way to align the third columns as illustrated below? It would be great if a solution existed without <code>\phantom</code> fiddling or breaking the table information totally apart in the source.</p> <pre><code>\documentclass{article} \usepackage{tabularx} \begin{document} \begin{tabular}[t]{@{}l@{}} \begin{tabular}[t]{@{}l@{}p{5cm}@{}|&gt;{\raggedleft}p{1.5cm}@{}} \textbf{Col1} &amp; &amp; \textbf{Col3} \tabularnewline Text1 &amp; Text1Description &amp; 0.1 \tabularnewline VerylongText2\qquad\null &amp; Text2Description &amp; 3 \tabularnewline Text3 &amp; Text3Description &amp; 2 \tabularnewline \end{tabular} \\ \\ \begin{tabular}[t]{@{}l@{}p{5cm}@{}|&gt;{\raggedleft}p{1.5cm}@{}} \textbf{Col1} &amp; &amp; \textbf{Col3} \tabularnewline Text4 &amp; Text4Description &amp; 3 \tabularnewline LongText5\qquad\null &amp; Text5Description &amp; 0.2 \tabularnewline Text6 &amp; Text6Description &amp; 0.34 \tabularnewline \end{tabular} \end{tabular} \end{document} </code></pre> <p><img src="https://i.stack.imgur.com/IeeIh.png" alt="enter image description here"></p>
0non-cybersec
Stackexchange
ML350p Gen8 with non HP SSD. <p>I have a HP ML350p Gen8 which I am looking to upgrade. I have seen this Kingston data centre SSD:</p> <p>DC500 2.5&quot; Enterprise SSD - 6GBps SATA SSD for Read-Centric and Mixed-Use Drives <a href="https://www.kingston.com/en/ssd/dc500-data-center-solid-state-drive?Model=Read-Centric&amp;Capacity=960GB" rel="nofollow noreferrer">https://www.kingston.com/en/ssd/dc500-data-center-solid-state-drive?Model=Read-Centric&amp;Capacity=960GB</a></p> <p>Though this should work (with the right SFF caddy) I have seen old (4yrs+) posts where the fans go into a high speed mode if they detect non HP drives as the temperature can't be checked. Is this still an issue? I can't find any HP SSD compatibility checker.</p>
0non-cybersec
Stackexchange
[Progress] From 6'4, 280lb Highschool lurch To 200lb gym addict.. Album: http://imgur.com/a/jDT5g ( I'm clueless as to posing, dont laugh too much!) Greetings Fittit, this is my first post to your sub. I'm a longtime viewer just usually too nervous to post. But I see everyone on here with great physiques inspiring others, and I want to share my story, and hopefully inspire others as well! I guess to start things out growing up I was a normal kid, probably on the small side until freshman year of high school. That's when I shot up and round. At my heaviest I was 280lbs. As evident by the first picture. I attribute it to a lot of soda and World Of Warcraft. Luckily when I got out of high school I got a job outside and started shedding weight, while keeping my soda drinking, WoW playing lifestyle. I kept that up until about 2012, when I was planning a cruise, and riding around on the forklift at work made my whole upper body jiggle. Decided I had enough. I quit sodas cold turkey and did a ton of cardio. That let the weight fly off me and kept me around 210lbs. Around January 2014 the weight lifting began and I absolutely FELL IN LOVE. Fast forward a few years and here we are. Up until April of this year I didn't take my diet into consideration and just did whatever. Boy that was the biggest mistake I made. I realized after I started counting calories and macros that I could have been SO much farther along had I did my diet correctly the entire time. Which is one thing I hope you guys can pick up on. After I started tracking my macros and calories everything changed. It's like my body was getting noob gains again. My plateau was shattered. Lifts started getting higher, body started looking better. Diet is paramount to a great physique and I just though people were exaggerating. Also, If anyone is interested I can share all my Diet / Macro info and my workout plan and a lot more detail when I get a chance in the morning. EDIT: Wow! This got a bit more attention than I anticipated. I'll try to post everything relevant to help out. Diet and macros seem to be what most people are interested in. Currently I'm in a cut, if anyone is interested or if it helps i use MyFitnessPal to track everything, and my profile is http://www.myfitnesspal.com/food/diary/noneyabidness1 If you can't view that profile or dont want to make an account. My typical day in a short form goes like this. (Copied from MFP) Breakfast Sargento - Lite String Cheese, 2 piece string cheese Food Should Taste Good - Multigrain Tortilla Chips, 28 g Milk - Reduced fat, 2% milkfat, 1.5 cup Peanut Butter and Co - White Chocolate Wonderful, 1 Tbsp (32g) Great Value - Rolled Oats, 0.75 cup 365 Organic - Cinnamon Squares Cereal, 1 cup Myprotein - Impact Whey Vanilla Raspberry, 125 g (5 scoops) Lunch Sweet Baby Rays - Original Bbq Sauce, 1 tbsp Dannon - Light & Fit Greek - Dannon 2x Protein Peach, 2 container (150g) Protein - Chicken Breast Skinless Boneless, 8 ounce Birds Eye - Protein Blend Southwestern Style, 1 cup Dinner Myprotein - Impact Whey Protein_strawberry cream, 50 g (2 scoops) Snacks Bear Naked - Oats and Honey, 0.25 cup Bananas - Raw, 1 medium (7" to 7-7/8" long) Daisy - 2% Cottage Cheese, 226 g Ghirardelli - 60% Cacao Bittersweet Chocolate Chips, 16 chips Right now I'm at 2,750 calories per day, with a 35% / 25% / 40% split on carbs/fat/protein(241C / 76F / 275P). My preferred protein powder is https://us.myprotein.com . For as much as I take their prices are insane, and they have great tests from labdoor. Highly recommend. I take Optimen Multivitamin and fish oil. For pre workout my preferred is either Pre-Jym or MP Assault / BPI sports 1.M.R. And I'm using Bulk-Supplements Creatine Mono. If you'll notice on the MFP profile. I take on average 4-8 scoops of protein per day. People all have differing opinions. But this is what works for my situation. I believe that protein is protein whether it comes from a powder or a chicken breast and the only thing you dont gain from taking powder is the micro-nutrients in actual food, but I supplement with a few vitamins and I feel great.I can barely stand to eat chicken anymore so I supplement my diet with protein powder. I probably still dont eat the best, but I get really close to my macros every day. I'm very strict on my diet, but I got some pretty good genetics from my dad (who is only 6'0) so that helps me a good bit. Workout Plan: For the past few months I've been following Layne Norton's PHAT program http://www.simplyshredded.com/mega-feature-layne-norton-training-series-full-powerhypertrophy-routine-updated-2011.html Fair warning though. It was a grueling workout starting out. But I've adjusted. I'll usually keep the main lifts the same as what he has but I'll change the accessory work every couple weeks or so. Pretty simple really. Another thing that might be surprising is that I do ZERO cardio. I can't stand it. I want to , and I probably need to. A few people have asked for my lift stats. Well being on a cut my lifts have suffered a slight bit But staying close to the same weight, just doing less reps has helped me keep size on a cut. And I very rarely max. But my stats from about 3 weeks ago are-- Benchpress- 280 lbs 2 reps Squat-(Leg got pulled into machinery and got messed up in 2011)- 315 lbs 1 rep Deadlift- 405 lbs 2 reps Overhead press 185lbs 1 rep. I hope theirs adequate information in the edit. Please let me know if I can answer any more questions!
0non-cybersec
Reddit
How to reorder included pdf-pages for bulk cutting ? [for paper saving]. <h1>How to reorder included pdf-pages for bulk cutting ? [for paper saving]</h1> <h3>Situation and Problem</h3> <p>I receive continuously updated lecture scripts as (A4) PDFs that I need to print. The text area apparently fits onto A5 paper due to the large margins (that are usual with default LaTeX-documents). In order to save some paper, I would like to print these A4 files as A5 but without resizing them (things become too small), but rather cutting edges. Since I don't know how many pages this will be in the end, I can not use <code>signature</code>.</p> <p>I know that this is bad from an aesthetical standpoint.</p> <p>In the MWE below you can see, that I am trimming the included pages (try to use not <code>nup=1x2, landscape</code> but <code>frame, noautoscale</code>) from margins I found with <code>\layout</code> command. However, I am unable to rearrange the order of the <code>nup=1x2</code> pages such that I could cut them in bulk and get ordered usual A5 sheets. Later on I want to cut the pages and manually either glue- or hole-punch-bind them together.</p> <h3>Question</h3> <blockquote> <p>How to reorder included <code>pdfpages</code> with <code>nup=1x2, landscape</code> to get bulk cut-able A5 pages?</p> </blockquote> <p>Let me show the desired order with an adapted scheme from <a href="https://tex.stackexchange.com/questions/60934/how-to-sort-the-order-of-pages-so-that-they-can-be-printed-in-a-folded-book">here (please give Village credit)</a>. It would be more practical for processing bigger volumes if the order was like this:</p> <pre><code>(front of 1st paper) (back of 1st paper) (stacking order) ________ ________ ________ ________ /|======&gt;&gt;/| ...==&gt;&gt;/| | | | | | | 1 -&gt;/ | 3 -&gt;/ | h-1-&gt;/ | | | | | | | / | / | / | | | | | | | / 2 | / 4 | / h | |_____1__|___h+1__| |__2_____|__h+2___| |\ | |\ | |\ | | \ | | \ | ... | \ | (front of 2nd paper) (back of 2nd paper) | \ | \ | \ ________ ________ ________ ________ | | | | | | | | | | | | |h+1| |h+3| |n-1| | | | | | | \ | \ | \ | | | | | | | \ |&lt;-h+2 \ |&lt;-h+4 \ | &lt;- n |_____3__|___h+3__| |__4_____|__h+4___| \|======&gt;&gt;\| ...==&gt;&gt;\| ... (front of last paper) (back of last paper) ________ ________ ________ ________ | | | | | | | | | | | | | | | | | | |___h-1__|___n-1__| |__h_____|__n_____| </code></pre> <p>... for <code>n</code> pages with <code>h := n/2</code>.</p> <code>MWE</code> <pre><code>\documentclass[ 12pt, twoside ]{article} \usepackage[a4paper]{geometry} \usepackage{pdfpages} % Border space as numbered in layout scheme ( https://tex.stackexchange.com/a/376643/ ) % top = 2 - 4 + 5 + 6 \newlength{\distup} \setlength{\distup}{\dimexpr\voffset+1in+\topmargin+\headheight+\headsep\relax} % looks good with geometry a4paper but not without % % left = 1+3 \newlength{\distleft} \setlength{\distleft}{\dimexpr1in+\hoffset+\oddsidemargin\relax} % \addtolength{\distleft}{20pt} % doesnt work due to twosided import % % bottom = 11 + ? // = paperheight - oben - textheight \newlength{\distdown} \setlength{\distdown}{\dimexpr\paperheight-\distup-\textheight\relax} % \addtolength{\distdown}{5pt} % we can cut a little more % % right = 9 + 10 + ? // = paperwidth - link - textwidth \newlength{\distright} \setlength{\distright}{\dimexpr\paperwidth-\distleft-\textwidth\relax} % \addtolength{\distright}{20pt} % doesnt work due to twosided import % % \begin{document} \includepdf[ pages=-, nup=1x2, landscape, clip, trim={{\distleft} {\distdown} {\distright} {\distup}}, offset={-9pt 0pt}, % -9pt centers // works with twoside but not nup=1x2, landscape % noautoscale, frame ]{testfile.pdf} \end{document} </code></pre> <p>I am using a given PDF but this should work for the MWE (though I noticed, that my margins don't seem to fit here?):</p> <code>testfile.tex</code> <pre><code>\documentclass[ 12pt ]{article} \usepackage{pdfpages} \usepackage{lipsum} \begin{document} \lipsum \end{document} </code></pre> <hr> notes: <p>The first case "(might be easier to implement ?)" is solved in my own answer below, but not the remaining above. I will keep this question up in order to focus on and accept answers for that part.</p>
0non-cybersec
Stackexchange
PTES Handbook. I am looking for the "700 page+ book associated with the website" that covers the PTES that I have heard multiple people speak of. I clearly heard Chris Nickerson of Lares mention the "book" in a talk of his but I cannot find any such thing on www.pentest-standard.org . Am I missing something? Was the "book" just vaporware?
1cybersec
Reddit
Tigerfish catches flying bird.
0non-cybersec
Reddit
I just don't get what's wrong with me. Why can't I make real friends? Why does it feel like people ignore me?. I honestly wish someone could watch how I interact with people on a day to day basis and tell me what I could be doing wrong. As far as I know, I'm not doing anything wrong. But for some reason, people just act weird around me sometimes. And I can never manage to maintain any friendships. I work as a cashier, and a lot of times, I'll have a pleasant interaction with a customer, and then at the end when they're leaving and I wish them a good day, suddenly, they seem to get all cold and say "You as well" instead of "You too". I know I might be reading too much into it, but it just seems like a distant and less friendly thing to say than the latter. I just don't know, guys. All I want is to change. That's what I've wanted for 10 years now, and it just never seems to happen, no matter what I read or if I do anything to change my behavior.
0non-cybersec
Reddit
Amateur radio astronomer looks for ZUMA - instead finds lost 'IMAGE' satellite sending signal 12 years after NASA deemed it dead.
0non-cybersec
Reddit
WCGW If I boardslide this rail?.
0non-cybersec
Reddit
iTunesConnect beta testing. <p>I am trying to use the new iTunesConnect beta testing. I am trying to invite a user to test however he already has an iTunes Developer account and it won't let me invite him because it of this:</p> <blockquote> <p>The email address you entered already belongs to an iTunes Connect account. To continue, enter a different email address.</p> </blockquote> <p>I searched around but found no solution. What are my options in this case?</p> <p>Thanks.</p>
0non-cybersec
Stackexchange
TIL there's a paved cemetery in the middle of Greenville Mall's parking lot in North Carolina.
0non-cybersec
Reddit
Brown Sugar Cookies.
0non-cybersec
Reddit
What do you call the term in a sequence that has a number as its primitive divisor?. <p>I have seen different things from difference sources. For example, in "Factorizations of <span class="math-container">$b^n\pm 1$</span>", the rank of N is used to mean the first term in <span class="math-container">$b^n-1$</span> it divides. Is this unique to this sequence because it would be synonymous with multiplicative order in this case? For example, <a href="https://stackoverflow.com/questions/9223901/what-is-position-in-terms-of-a-sequence">https://stackoverflow.com/questions/9223901/what-is-position-in-terms-of-a-sequence</a>, states that rank refers to the number of terms less than a number in a sequence. Also in this link, it says that "position" refers to the position specific number in the sequence, of course, but not necessarily the first term a number <span class="math-container">$N$</span> <span class="math-container">$divides$</span>. </p> <p>Edit: If there is no ubiquitous term for this, could I simply call it a <span class="math-container">$primitive$</span> <span class="math-container">$index$</span>, as it refers to the term for which a number is a <span class="math-container">$primitive$</span> <span class="math-container">$divisor$</span>? Or is this somehow incorrect or ignorant-sounding? </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
Cardinality of the following sets. <p><a href="https://i.stack.imgur.com/7YRJg.png" rel="nofollow noreferrer">Cardinality of set question</a></p> <p>Please Correct if I am wrong at any point since at some points I must go wrong in my basic understanding of the question and data.</p> <p>My understanding of this is that set A={1,2,3..,n} refers to a set, A, having n number of natural numbers in order for example if n=5 A={1,2,3,4,5} and if n=10 A={1,2,3,4,5,6,7,8,9,10}. The Cardinality of a set is the number of elements in the set for example if n=5 set A has a cardinality of 5 and etc.</p> <p>For the question itself my understanding is that they've defined a set {a,S} such that, a, is a member of, S, and, S, is a member of the power set of, A, and I'm supposed to find the number of elements in this set. My current understanding is: The Cardinality of P(A) is 2^n. S, is a member of P(A) so therefore should have the same cardinality and, a, is a member of, S, and so should have the same cardinality making the overall set have a cardinality of 2^2n.</p> <p>However this answer is completely wrong, the answer says that there a n choices for a and 2^(n-1) choices for S since we can choose the set of S \ {a} in 2^(n-1) ways giving us the answer of n2^(n-1).</p>
0non-cybersec
Stackexchange
Isn't it illegal for schools and teachers to take phones from students?. It seems like theft to me because the phone is the property of the student, they have no authority to take it.
0non-cybersec
Reddit
Oh you, stop it..
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
Instead of paying the MPAA/RIAA millions of dollars with no results, why doesn't the entertainment industries just bill/invoice the downloaders for the things they downloaded?. Instead of trying to sue / bankrupt citizens / their potential customers, why doesn't the property right owner just invoice them for what they download MSRP? If I got caught a couple times I would just say, "Fuck it, I'm just going to buy the movie cheap on amazon or get a netflix account." They pay these asshats boatloads of money to "protect" their licenses but most of the time they don't get paid or they literally ruin someone's life. I realize that there are a lot of technical things I don't understand and that entertainment companies have to take a hard / ignorant stance on piracy due to their old ass CEO's etc, but I personally feel like this is a compromise from both sides. People who are more tech savvy will still get away scot-free, single mothers won't be fined $200k for 20 songs and the companies could add to their bottom line. I know it's a little naive to thing that a mega-corp would do this, but it seems pretty reasonable to me. And hey, now those dudes selling DVD's on the street corner will make some extra bucks now too! edit: forgot to ask what everyone's opinion / reservations on this are. Tell me where I'm wrong. edit 2: uggg, I just realized I fucked up the title. C'est La Vie.
0non-cybersec
Reddit
Is static universally &quot;evil&quot; for unit testing and if so why does Resharper recommend it?. <p>I have found that there are only 3 ways to unit test (mock/stub) dependencies that are static in C#.NET:</p> <ul> <li><a href="http://research.microsoft.com/en-us/projects/pex/" rel="noreferrer">Moles</a></li> <li><a href="http://www.typemock.com/typemock-isolator-product3/" rel="noreferrer">TypeMock</a></li> <li><a href="http://www.telerik.com/products/mocking.aspx" rel="noreferrer">JustMock</a></li> </ul> <p>Given that two of these are not free and one has not hit release 1.0, mocking static stuff is not too easy.</p> <p>Does that make static methods and such &quot;evil&quot; (in the unit testing sense)? And if so, why does resharper want me to make anything that can be static, static? (Assuming resharper is not also &quot;evil&quot;.)</p> <p><strong>Clarification:</strong> I am talking about the scenario when you want to unit test a method and that method calls a static method in a <em>different</em> unit/class. By most definitions of unit testing, if you just let the method under test call the static method in the other unit/class then you are <strong>not</strong> unit testing, you are <em>integration</em> testing. (Useful, but not a unit test.)</p>
0non-cybersec
Stackexchange
Changing the font for &quot;alert&quot; in beamer. <p>I would like to change the behaviour of <code>\alert</code> so that the text is still red but now boldfaced, say. How can I do this? I have Googled, but all I can find is how to change the colour, as in <a href="https://tex.stackexchange.com/questions/9637/changing-style-of-alert-environment-in-beame">Changing style of alert environment in beamer</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
Facebook >finally< delivered. NSFW.
0non-cybersec
Reddit
Tracking eye pupil in camera preview, with most watched part of the screen. <p>I have live camera preview, now project requires eye pupil movement tracking (which is different from Eye is open/close). Means which part of the screen is being seen by the user this time and what is the most viewed part of screen at the end of Video stream. Although, I tried with OpenCV &amp; Google Vision api, but they are not able to perform the task perfectly. Please suggest if you have any solution.</p> <p><a href="https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c" rel="nofollow noreferrer">https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c</a></p> <p><a href="https://developers.google.com/vision/" rel="nofollow noreferrer">https://developers.google.com/vision/</a></p>
0non-cybersec
Stackexchange
How do you convert a Rails 5 API app to a rails app that can act as both API and app?. <p>I initially created it in rails 5 with the --api tag.</p> <p>From <a href="http://edgeguides.rubyonrails.org/api_app.html" rel="noreferrer">http://edgeguides.rubyonrails.org/api_app.html</a>,</p> <p>I removed <code>config.api_only = true</code></p> <p>I changed </p> <pre><code>class ApplicationController &lt; ActionController::API end </code></pre> <p>to</p> <pre><code>class ApplicationController &lt; ActionController::Base end </code></pre> <p>The problem I'm having now is when the view is getting rendered, ex. <code>welcome/index.html.erb</code>, the corresponding CSS file <code>assets/stylesheets/welcome.css.scss</code> is not.</p> <p>Any idea how I can fix this, or more generally convert the API application to a full app?</p> <p>Thanks!</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
TOP CASH MAKING APPS +FREE FOOD APPS 2018 *REAL NO CLICKBAIT.
0non-cybersec
Reddit
Do first impressions really count?. <p>So, i am currently writing something up for a college class. Problem is everything is hypothetical. I need some proof. I believe a first impression on a website is imperative so that people actually use it and in my case, buy your product or services as well.</p> <p>Basically I'm wondering has there been any studies that shows how a better web design will increase revenue for any kind of services? I don't just mean selling products like a T-shirt, but labor services as well. </p> <p>If someone wanted their computer fixed and searched for companies that can do so, will a first impression on the website help them make their decision to use your company? Are there any studies like this? White papers maybe?</p> <p>Thanks!</p>
0non-cybersec
Stackexchange
Getting &quot;\andnext undefined&quot; errors compiling latex code. <p>When I try to use pdflatex to compile the following latex code, it throws errors:</p> <pre><code>[steevmi1@phusca-L24500][21:01] [~/] % cat ./bar.tex % Created 2012-05-02 Wed 20:57 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[minted,minion]{org-preamble-pdflatex} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \providecommand{\alert}[1]{\textbf{#1}} \title{bar} \author{Steeves} \date{\today} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs Org-mode version 7.8.09}} \begin{document} \maketitle % Org-mode is exporting headings to 3 levels. \section{This is heading one} \label{sec-1} Some text \subsection{This is heading two} \label{sec-1-1} Some more text \end{document}% [steevmi1@phusca-L24500][21:01] [~/] % pdflatex ./bar.tex This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011/MacPorts 2011_5) restricted \write18 enabled. entering extended mode (./bar.tex LaTeX2e &lt;2009/09/24&gt; Babel &lt;v3.8l&gt; and hyphenation patterns for english, dumylang, nohyphenation, et hiopic, arabic, farsi, pinyin, croatian, bulgarian, russian, ukrainian, czech, slovak, danish, dutch, ukenglish, usenglishmax, finnish, basque, french, german -x-2009-06-19, ngerman-x-2009-06-19, german, ngerman, swissgerman, monogreek, g reek, ancientgreek, ibycus, hungarian, assamese, bengali, gujarati, hindi, kann ada, malayalam, marathi, oriya, panjabi, tamil, telugu, sanskrit, italian, lati n, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, afrikaans, ar menian, coptic, esperanto, estonian, icelandic, indonesian, interlingua, irish, kurmanji, lao, romanian, serbian, serbianc, slovenian, turkish, uppersorbian, welsh, polish, portuguese, spanish, catalan, galician, swedish, turkmen, loaded . (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/opt/local/share/texmf-texlive-dist/tex/latex/base/size11.clo)) (/opt/local/share/texmf-texlive-dist/tex/latex/base/inputenc.sty (/opt/local/share/texmf-texlive-dist/tex/latex/base/utf8.def (/opt/local/share/texmf-texlive-dist/tex/latex/base/t1enc.dfu) (/opt/local/share/texmf-texlive-dist/tex/latex/base/ot1enc.dfu) (/opt/local/share/texmf-texlive-dist/tex/latex/base/omsenc.dfu))) (/Users/steevmi1/Library/texmf/tex/kjhealy/org-preamble-pdflatex.sty (/opt/local/share/texmf-texlive-dist/tex/latex/base/ifthen.sty) (/opt/local/share/texmf-texlive-dist/tex/latex/base/fontenc.sty (/opt/local/share/texmf-texlive-dist/tex/latex/base/t1enc.def)) (/opt/local/share/texmf-texlive-dist/tex/latex/base/fixltx2e.sty) (/opt/local/share/texmf-texlive-dist/tex/latex/wrapfig/wrapfig.sty) (/opt/local/share/texmf-texlive-dist/tex/latex/rotating/rotating.sty (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphicx.sty (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/keyval.sty) (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphics.sty (/opt/local/share/texmf-texlive-dist/tex/latex/graphics/trig.sty) (/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/graphics.cfg) (/opt/local/share/texmf-texlive-dist/tex/latex/pdftex-def/pdftex.def (/opt/local/share/texmf-texlive-dist/tex/generic/oberdiek/infwarerr.sty) (/opt/local/share/texmf-texlive-dist/tex/generic/oberdiek/ltxcmds.sty))))) (/Users/steevmi1/Library/texmf/tex/kjhealy/memoir-article-styles.sty ! LaTeX Error: \andnext undefined. See the LaTeX manual or LaTeX Companion for explanation. Type H &lt;return&gt; for immediate help. ... l.17 \renewcommand*{\andnext} {% ? I'm assuming that this is an issue where it's looking at the "memoir-article-styles.sty" file before it's loaded the actual memoir class, but I'm not sure how to fix it. </code></pre> <p>The contents of the org-preamble-pdflatex.sty file:</p> <pre><code>%% Preamble/settings for documents exported from .org files to .tex files when the %% tex engine is pdflatex. %% %% Usage: \usepackage{org-preamble-pdflatex} in your document %% preamble. \usepackage[minion]{org-preamble-pdflatex} %% activates the MinionPro package instead of Times New Roman. The %% actual Minion Pro font files must be installed first, in accordance %% with the instructions in the MinionPro package. %% \usepackage[minted]{org-preamble-xelatex} activates the minted %% package for code highlighting. Minted requires that pygments be %% installed (http://pygments.org/) and that \write18 support be %% enabled in your tex compiler. %% Kieran Healy %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{org-preamble-pdflatex}[2011/02/21 v0.01 Bundling of Preamble items for Org to pdfLaTeX export (including MinionPro)] \RequirePackage{ifthen} \newboolean{@minion} \newboolean{@minted} \setboolean{@minion}{false} % minion is off by default \setboolean{@minted}{false} % minted is off by default \DeclareOption{minion}{ \setboolean{@minion}{true} } \DeclareOption{minted}{ \setboolean{@minted}{true} } \ProcessOptions \RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc} \RequirePackage{fixltx2e} \RequirePackage{wrapfig} \RequirePackage{rotating} \RequirePackage{memoir-article-styles} \RequirePackage[american]{babel} \RequirePackage[babel]{csquotes} \RequirePackage[svgnames]{xcolor} \RequirePackage{soul} %%% If \RequirePackage[minion]{org-preamble-pdflatex} is set, %%% MinionPro and microtype setup (requires full installation of MinionPro font) %%% If MinionPro is not specified, use Times instead. \ifthenelse{\boolean{@minion}}{ \RequirePackage[fullfamily,opticals,footnotefigures]{MinionPro} \RequirePackage[scaled=0.78]{beramono} \RequirePackage{microtype} \RequirePackage[toc,eqno,enum]{tabfigures} \renewcommand{\scdefault}{ssc} %% nicer small-caps headings }{ \RequirePackage{times} \RequirePackage[config=mt-ptm]{microtype} \RequirePackage[scaled=0.74]{beramono} } \RequirePackage[colorlinks=true, urlcolor=DarkSlateBlue, citecolor=DarkSlateBlue, filecolor=DarkSlateBlue, plainpages=false, pdfpagelabels, bookmarksnumbered]{hyperref} \RequirePackage{etoolbox} %% Biblatex % \RequirePackage[authordate, backend=biber, babel=hyphen, bibencoding=inputenc, strict, isbn=false, uniquename=false]{biblatex-chicago} % biblatex setup \RequirePackage[style=authoryear, bibstyle=authoryear, citestyle=authoryear-comp, uniquename=false, hyperref=true, backend=biber, babel=hyphen, bibencoding=inputenc]{biblatex} %% Fix biblatex's odd preference for using In: by default. \renewbibmacro{in:}{% \ifentrytype{article}{}{% \printtext{\bibstring{}\intitlepunct}}} %% Basic bibliography \addbibresource{/Users/kjhealy/Documents/bibs/socbib.bib} %% these tweak the biblatex-chicago format to conform to AJS style. \DeclareFieldFormat[article]{title}{\mkbibquote{#1}} \DeclareFieldFormat[book]{title}{% \mkbibemph{#1}\isdot} % for books \DeclareFieldFormat{booktitle}{\mkbibemph{#1}} % for edited volumes %% bibnamedash: with Minion Pro the three-emdash lines in the %% bibliogrpaphy end up separated from one another, which is very %% annoying. Replace them with a line of appropriate size and weight. \renewcommand{\bibnamedash}{\rule[3.5pt]{3em}{0.5pt}\,} %% Pagestyle \pagestyle{kjh} %% If [minted] option is chosen, activate minted \ifthenelse{\boolean{@minted}}{ \RequirePackage{minted} \usemintedstyle{tango} \definecolor{bg}{rgb}{0.95,0.95,0.95} \setkeys{Gin}{width=1\@textwidth} }{} \endinput </code></pre> <p>For the sake of completeness, the contents of memoir-article-style.sty are at <a href="https://github.com/kjhealy/latex-custom-kjh/tree/master/needs-memoir" rel="nofollow">https://github.com/kjhealy/latex-custom-kjh/tree/master/needs-memoir</a> (the file is fairly large at 551 lines, so I'm putting a link to it rather than the actual contents).</p>
0non-cybersec
Stackexchange
Branch names not showing in Mercurial&#39;s tab completion. <p>I have a development machine running mercurial 1.6.3. Tab completion in bash works great for completing commands, tags and branch names. I've set up a new machine with the same mercurial version (both running python 2.6), but when I try to use tab completion, I only get hg commands and tags to show - no branch name. Is there anything I need to configure to have branch names included as well? thanks.</p>
0non-cybersec
Stackexchange
How do I convince programmers in my team to do TDD?. <p>I am aware of this question: <a href="https://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd">https://stackoverflow.com/questions/428691/how-to-encourage-implementation-of-tdd</a></p> <p>In my team, we write a lot of unit tests. But, in general the programmers tend to write unit tests after wrting the code. So, we first finish the module functionality and then write tests. Our coverage is around 70% for most modules. I have tried convincing my technical manager and my team members to do pure TDD wherein we first write tests and then the code, but invain. I think writing tests first allows us to discover design better. Am I just being finicky, especially when our coverage is quite high? If the answer to this question is no, then how do I talk to people to have a test-first approach.</p> <p><strong>EDIT:</strong> I think writing tests after writing code is an easier thing to do. People in my team have got accustomed to do this and are opposing any change.</p>
0non-cybersec
Stackexchange
[Help] Best puzzle toy?. I ordered one of those balls that you can put treats in, but it was a bit too small inside for the treats I use so I am returning it. I just want something to keep my Shiba busy for a little bit after I get home. Something that will wear him out mentally.
0non-cybersec
Reddit
If the bisectors of three interior angles of a convex quadrilateral $ABCD$ intersect at a point $P$, then $P$ is also on the fourth interior bisector.. <blockquote> <p>Show that if the bisectors of three interior angles of a convex quadrilateral <span class="math-container">$ABCD$</span> intersect at a point <span class="math-container">$P$</span>, then <span class="math-container">$P$</span> is also on the fourth interior bisector.</p> </blockquote> <p>Need to solve it fast, it's really important it might sound as a elementary problem but yeah :) And I tried to do it with angles but it didn't work out well.</p>
0non-cybersec
Stackexchange
Philippines Backpacking: Literally Everything You Need To Know.
0non-cybersec
Reddit
I'm singer and songwriter Kat Edmonson- ask me anything about my album Old Fashioned Gal and about other stuff- AMA!. I am a singer and a songwriter. I released a new album on Friday, April 27 called Old Fashioned Gal. It's my fourth record. I wrote and produced it and it's my version of a soundtrack to a musical from the 1950s. Incidentally, I wrote an outline for a screenplay to go with the album (in case somebody feels like making a musical for film with me!). I travel around the United States and the world singing my music. Sometimes, I throw in a jazz standard or two to my set because I love the Great American Songbook and those songs go well with my songs. I call my music vintage pop. I've been in a couple movies: Angels Sing which is always on The Hallmark Channel around the holidays and Woody Allen's Cafe Society. I love acting. I plan to do more. Link to my website: http://katedmonson.com/ FB: https://www.facebook.com/katedmonsonmusic/ Old Fashioned Gal (2018): On Spotify: https://open.spotify.com/album/2tY6NYTP8xlgEjnUhpZlyN On Amazon: https://www.amazon.com/dp/B078H3B194/ On Tidal: http://tidal.com/track/82658531 On Google Play Music: https://play.google.com/store/music/album/Kat_Edmonson_Old_Fashioned_Gal On iTunes / Apple Music: https://itunes.apple.com/us/album/old-fashioned-gal/1327810175 Music Videos: "A Voice" https://www.youtube.com/watch?v=H8n7sFahSLA "Old Fashioned Gal" https://www.youtube.com/watch?v=CnsB4Ri2oIY Proof: https://i.redd.it/80e77kltd4v01.jpg
0non-cybersec
Reddit
Musical Road in Lancaster, CA at 100mph.
0non-cybersec
Reddit
Joe Coleman is a genius.
0non-cybersec
Reddit
[S5][Books] Followup for non-readers: "Kill the Boy".
0non-cybersec
Reddit
Finding the value $h, $ given $f(x,y) = \frac{sin (x-y)}{x-y}$. <p>I was studying for some quizzes when I stumbled upon this question:</p> <p>The function $f(x,y) = \frac{sin (x-y)}{x-y},$ $x$ is not equal to $y,$ and $f(x,y) = h,$ $x = y$ is continuous. What is the value of $h$?</p> <p>My work:</p> <p>I noticed that the answer found in my book is $h = 1,$ so I think I can get $h = 1$ by doing this:</p> <p>$$lim_{{x-&gt;0}\space and \space {y-&gt;0}} \frac{sin (x-y)}{x-y} = 1$$</p> <p>because everybody knows that</p> <p>$$lim_{x-&gt;0} \frac{sin x}{x} = 1$$</p> <p>Is my train of logic correct?</p>
0non-cybersec
Stackexchange
Finally below 200lbs!. 18 year old male; 6''1 uni student. When I started university in September of last year I was 220lbs, but now 4 months later I am 199lbs. It feels good. I definitely tripped up a lot along the way; I was horrible at counting calories and the binge drinking definitely slowed it down. But now that I'm far more aware of the calories, going clubbing less and hitting the cardio more, I have finally cut down to below 199lbs. Goal is around 160-165lbs.
0non-cybersec
Reddit
Net Core: Using OData in Onion Architecture, Convert Query Parameters Into Linq. <p>We are creating a Search Function to return Matching Address Records in large database.</p> <p>Address Table contains 20+ columns in SQL table, needs to query using different OData parameters, (EqualTo, Contains, Starts With, etc).</p> <p>Trying to use OData, without injecting DBContext into API Controller. This is not allowed in current architecture. How can code written to allow this?</p> <p>*We have it working utilizing ProjectTo. However OData Http specific features are being passed into Non-Api levels. Currently have ODataQueryOptions in the AppServices.</p> <p>How Can We convert the Whole ODataQueryOptions to a Linq expression query (regardless of what is passed in), this resource is only for the filter, <a href="https://stackoverflow.com/questions/16445062/how-to-transform-odata-filter-to-a-linq-expression">How to transform OData filter to a LINQ expression?</a></p> <p>DBContext--&gt;DomainLayer--&gt;Dto--&gt; Then API Level,</p> <p>The two middle layers. Mappers map from EF DBContext to Domain to Dto.</p> <p>Repository methods bring data.</p> <p>AppService Methods converts to Dto.</p> <p><strong>Current Solution with ProjectTo:</strong></p> <p><strong>Controller API:</strong></p> <pre><code>[HttpGet] public async Task&lt;ActionResult&lt;IList&lt;AddressTypeDto&gt;&gt; GetAddressAPI(ODataQueryOptions&lt;AddressTypeDto&gt; queryOptions) { return Ok(await _service.GetAddressTypeDto(queryOptions)); } </code></pre> <p><strong><strong>Application Service:</strong></strong></p> <p>(How can we apply ODataModelBuilder mapping in Startup here?)</p> <pre><code>public async Task&lt;AddressTypeResponse&gt; GetAddressTypeDto(ODataQueryOptions&lt;AddressTypeDto&gt; queryOptions) { var dto = (IQueryable&lt;AddressTypeDto&gt;)queryOptions.ApplyTo(_addressRepository.GetAddressTypes().ProjectTo&lt;AddressTypeDto&gt;(_mapper.ConfigurationProvider)); var dtoList = await dto.ToListAsync(); return dto; } </code></pre> <p><strong><strong>Repository:</strong></strong></p> <pre><code>[EnableQuery] public IQueryable&lt;LkAddressType&gt; GetAddressTypesData() { return _ctx.LkAddressType.AsNoTracking(); } </code></pre> <p><strong>Classes:</strong></p> <pre><code> public class AddressTypeDto { public int AddressTypeId { get; set; } public int? LastModifiedByUserId { get; set; } public string AddressTypeCode { get; set; } public string AddressTypeDescription { get; set; } public bool? Status { get; set; } public DateTime? CreateDate { get; set; } } public LkAddressType() { public int LkAddressTypeId { get; set; } public int? LastModifiedByUserId { get; set; } public string AddressTypeCode { get; set; } public string AddressTypeDescription { get; set; } public bool? Status { get; set; } public DateTime? CreateDate { get; set; } public DateTime? EffectiveStartDate { get; set; } public DateTime? EffectiveEndDate { get; set; } } </code></pre> <p>Using C# Net Core 2.2, Entity Framework, Sql Server Database</p> <p><strong>Resource:</strong> Attempting to utilize this also</p> <p><a href="https://stackoverflow.com/questions/26628521/how-do-i-map-an-odata-query-against-a-dto-to-another-entity">How do I map an OData query against a DTO to another entity?</a></p>
0non-cybersec
Stackexchange
[FRESH] Playboi Carti & Lil Uzi Vert - Rocket.
0non-cybersec
Reddit
Maximize, Minimize, Exit in the global menu. <p>When I have a program like Firefox and the terminal maximized I have the minimize, maximize and exit controls in the global menu (at the top).</p> <p>I really don't like it, is it possible to get it to the program like in GNOME or Windows?</p>
0non-cybersec
Stackexchange
Glob not giving me any results. <p>I'm trying to use PHP's Glob to get a list of files based on a wildcard, namely the extension.</p> <pre><code>$images = glob('/content/big/'.$item['id'].'.{jpg,jpeg,png,gif}', GLOB_BRACE); </code></pre> <p>I know there is a file in this directory, namely: 23.png but it doesn't show in array $images. I don't have a clue why not. I've tried making the URL even more absolute (or explicit) like:</p> <pre><code>$images = glob('http://www.website.com/content/big/'.$item['id'].'.{jpg,jpeg,png,gif}', GLOB_BRACE); </code></pre> <p>Without result.</p> <p>Could it be that Glob isn't installed properly inside PHP? Or is there another reason this doesn't give any results?</p>
0non-cybersec
Stackexchange
Translate local url address to full url. <p>I have a configured <code>VPN</code> that let's me work from home, but I can not access the remote tools as I do when I am at work, example:</p> <p>At work I can type to a browser:</p> <pre><code>jenkins/ </code></pre> <p>from home I have to add an extension to the domain name:</p> <pre><code>jenkins.local.private </code></pre> <p>Is there a way to make the first one work from home too? knowing that this is just an example, I want a general solution.</p> <p>Thanks</p>
0non-cybersec
Stackexchange
TIME Magazine's cover page (resubmitted without imposed words).
0non-cybersec
Reddit
The band Bad Company has a song titled 'Bad Company' on their album Bad Company. Can you name others like this?. The only other instance I can think of is Iron Maiden, who has a song titled 'Iron Maiden' on the album Iron Maiden. Can anybody name others? EDIT: Holy Cow, I was away for a few hours and I cannot believe how many people commented! I also didn't realize how many of these songs I actually own! Keep it going everybody!!
0non-cybersec
Reddit
How to print all digits of a large number in python?. <p>So, I have a very large number that I'm working out in python, but when I try to print it I get something like this:</p> <pre><code>3.101541146879488e+80 </code></pre> <p>How do I print all the digits of my lovely number?</p>
0non-cybersec
Stackexchange
Kid shoots lights out at MJ camp as he tries to win Air Jordans for the whole team..
0non-cybersec
Reddit
Invalid time on FreeBSD. <h1>Problem</h1> <p>My FreeBSD is always 2 hours behind when I'm offline although my BIOS clock shows the UTC time and my time zone is set to CET in /etc/localtime.</p> <p>I'd like FreeBSD to look at the clock in BIOS, assume that it is UTC, check what time zone is chosen and then set the time on the machine accordingly.</p> <hr> <h1>Details</h1> <p>I've already tried removing <code>/etc/wall_cmos_clock</code> and running <code>adjkerntz -a</code> after I changed <code>machdep.adjkerntz</code> with <code>sysctl</code> from <code>-7200</code> to <code>0</code>. I rebooted the machine several times in different configurations during that process. </p> <p>I am not interested in solutions utilizing the ntpd utility as it requires an Internet connection.</p> <p>It is a dual boot system. The second system is Ubuntu 17.04 and it is its GRUB which boots FreeBSD via chain loading.</p> <h2>Workaround</h2> <p>I couldn't find any solutions online so I decided to change the time manually with <code>date(1)</code>.</p> <pre><code># date +%H%M 1426 # date 1626 </code></pre> <p>I'd love to know if there is a better solution however.</p> <hr> <h3>References</h3> <ul> <li><a href="https://forums.freebsd.org/threads/56345/" rel="nofollow noreferrer">Wrong time but right timezone</a> @ the FreeBSD Forums.</li> <li><a href="http://www.freebsddiary.org/daylight.php" rel="nofollow noreferrer">Daylight saving time - how time is stored, how to change it</a> @ the FreeBSD Diary.</li> </ul>
0non-cybersec
Stackexchange