text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Connecting ice maker to a PVC water line. I will soon be taking delivery of a fridge with ice maker. This is the first fridge I've had which has an ice maker in it, so I need to run a water line to the fridge. I could find a copper line to tie into but most of what's near the fridge is PVC. Tying into a copper line looks dead simple with one of those vampire tap things, but I've not seen anything out there about tying into a PVC line.
Is there an easy, lazy-man way to tie into a PVC water line? Or is my only alternative to cut the PVC and install some sort of tee?
| 0non-cybersec
| Reddit |
old cats can be just a cute as kittens. | 0non-cybersec
| Reddit |
[Video] A players level select screen bugs out and reveals future content including strikes and raids. /u/Kinsey9 has responded with an update on the original video showing **ALL** the story missions. You can find the video below
* [Youtube video by Kinsey9 showing ALL the missions](https://www.youtube.com/watch?v=VD6Ypy3hozk&list=UUTy0wGcco_jw9C6pTbGPEag)
I have updated the details below with the story missions names and descriptions.
--------------------------------------------------------------------------------------------------------------------------
**DETAILS FROM THE VIDEO**
**Earth**
* Strike [Level 10] - The Jovian Complex: A new Hive brood gathers it's strength beneath the cosmodrome. Find their master and purge them all.
* Story Mission [Level 18] - The Veil Lifted: Root out the Hive beneath the Cosmodrome and discover a long-hidden secret of the Golden Age.
* Story Mission [Level 18] - The Seeding: Investigate the return of ancient Hive Wizards, preparing Earth for Crota's reign.
* Story Mission [Level 20] - Gone to Ground: Find a Wolves baron and his conspirators who have betrayed the Queen and are hiding in the Cosmodrone.
**Moon**
* Strike [Level 14] - The House of Wolves: No description
* Strike [Level 26] - The Summoning Pits: Xyor, the Unwed awaits your arrival at the bottom of the Hellmouth (part of an exotic bounty not new expansion content. Thanks to /u/The7ruth)
* **RAID [Level 28]** - Crota's End: He waits in the dark below
* Story Mission [Level 20] - The Wakening: Stop the Hive from summoning Crota and consuming our worlds.
**Venus**
* Story Mission [Level 20] - Wolves' Harvest: Track down the Queen's traitorous Wolves and recover what they've stolen from the Awoken.
* Story Mission [Level 22] - The Citadel: Ascend to the top of the Vex stronghold on Venus and assassinate the Wolves' Kell
**Mars**
* Strike [Level 20] - The Hypogeum: The ressurection of the Black Garden has begun. Stop the Vex before the Garden's heart beats again.
**Reef**
* **RAID [Level 28]** - Reef Raid: No Description
**Crucible**
* Skirmish [Special Event?] - Only the worthy may face the Trials of Osiris for only the worthy are strong enough to endure what is to come.
A string of victories will earn you great rewards - but lose three times and you're out.
* 3v3 Team Deathmatch
* Level Advantages Enabled
* Weekly Rewards
* **Trial Set Gear**
* Ascendant Materials
* Crucible Marks | 0non-cybersec
| Reddit |
solution set for congruence $x^2 \equiv 1 \mod m$. <p>if $m$ is an integer greater than 2, and a primitive root modulo $m$ exists, prove that the only incongruent solutions of $x^2 \equiv 1 \mod m$ are $x \equiv \pm 1 \mod m$.</p>
<p>I know that if a primitive root mod $m$ exists, then $m = 1, 2, 4, p^m,$ or $2p^m$, where p is an odd prime and $m$ is a positive integer. Obviously I can check the cases where $m = 1, 2, 4$ by hand but I am having trouble proving the other two cases.</p>
| 0non-cybersec
| Stackexchange |
Festival spot provides hours of fun. | 0non-cybersec
| Reddit |
Add event handler for body.onload by javascript within <body> part. <p>We want to include a maps from Google Maps API in our document. The documentation tells to initialize the map with a function called by the onload() event of the body.</p>
<p>The ordinary way to call:</p>
<pre><code><body onload="initialize_map();">
</code></pre>
<p>This doesn't work out for us because we're using Template::Toolkit and the <code><body></code> tag is already included in our wrapper. In short: The <code><body></code> tag is already printed when our javascript code starts running.</p>
<p>I tried something like this but it does only work for <code>onclick</code>, not <code>onload</code>. I guess that's because the javascript code is beneath the <code><body></code> tag itself.</p>
<pre><code>var body = document.getElementsByTagName("body")[0];
body.addEventListener("load", init(), false);
function init() {
alert("it works!");
};
</code></pre>
<p>Any help how to fire up a Google Maps map appreciated!</p>
| 0non-cybersec
| Stackexchange |
Burrows-Wheeler transform backward search: how to find suffix index?. <p>BWT backward search algorithm is pretty straightforward if we only need the multiplicity of a pattern. However I also need to find the suffix indices (i.e. positions in the reference string where a pattern occurs). e.g., given string <em>banana</em> and pattern <em>an</em>, it occurs twice at positions 1 and 3. </p>
<p>I could compute all suffixes and sort them, but that would increase the time complexity to O(nlogn), n being length of the reference string. Is there a way to do this and still keep the O(length of pattern) time complexity?</p>
| 0non-cybersec
| Stackexchange |
Buy Corvette Z06 Accessories | Customcorvetteaccessories.com. | 0non-cybersec
| Reddit |
My 9 year old son bought me these pansies with his own money! I love the color they add to the garden. | 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 |
Awesome picture from the most recent Legends video. | 0non-cybersec
| Reddit |
Why doesn't multiplying two matrices with NumPy work sometimes?. <p>Using NumPy and attempting to multiply matrices together sometimes doesn't work. For example</p>
<pre><code>import numpy as np
x = np.matrix('1, 2; 3, 8; 2, 9')
y = np.matrix('5, 4; 8, 2')
print(np.multiply(x, y))
</code></pre>
<p>can return </p>
<pre><code>Traceback (most recent call last):
File "vector-practice.py", line 6, in <module>
print(np.multiply(x, y))
ValueError: operands could not be broadcast together with shapes (3,2) (2,2)
</code></pre>
<p>I understand that I can't multiply these shapes, but why not? I can multiply these two matrices on paper, so why not in NumPy? Am I missing something obvious here?</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 |
No sound in Debian 7. <p>I've installed Debian 7 but there is no sound. The motherboard is H110M-D D3. Is there any way besides upgrading the kernel to make the audio work? </p>
<p>I've tried the most common solutions (mute in alsamixer, pulseaudio is running). A driver is loaded for the audio as far as I can see:</p>
<pre><code> lspci -k | grep -iA5 audio
00:1f.3 Audio device: Intel Corporation Device a170 (rev 31)
Subsystem: ASUSTeK Computer Inc. Device 86c7
Kernel driver in use: snd_hda_intel
</code></pre>
| 0non-cybersec
| Stackexchange |
Is there a Keyboard shortcut to close a Command Prompt window?. <p>Is there any keyboard shortcut to close the Command Prompt window in Windows 7? <code>Alt+F4</code> does not seem to work on a Command Prompt window.</p>
<p>I close it right now by typing <code>exit</code> and <strong>Enter</strong> at the prompt. Hoping there is a shorter trick.</p>
| 0non-cybersec
| Stackexchange |
Sync itunes media folder with library. <p>I'm embarrassed to admit I don't understand how iTunes works despite having a mac for 6 years. How can I clean out my music folder (iTunes media) and then get iTunes to update? I've made substantial changes, so I don't mind just reloading the library if that's what I should do.</p>
<p>Also, I have a "music" folder which is not organized at all and doesn't seem to be affected by me deleting files in the iTunes media folder. Are these just copies of the songs in the iTunes media folder? Can I delete them? </p>
<p>Thank you for your help, and I apologize if the answer to this question is glaringly obvious.</p>
| 0non-cybersec
| Stackexchange |
Help finding the limit of a sum. <p>Hi I'm trying to find the following limit:</p>
<p><span class="math-container">$$\lim_{n \rightarrow \infty} \frac{1}{n} \sum_{j=1}^{ n } (1 - e^{\frac{-jt}{n}} )$$</span></p>
<p>expressed as a function of t. You may even be able to get it from Mathematica I don't have access to a copy at the moment.</p>
<p>Attempts made: tried to justify using L'hopital's rule, attempted to convert to integral. </p>
| 0non-cybersec
| Stackexchange |
‘We have a right to privacy’, says Carol Adams, whose son was killed in San Bernardino. | 0non-cybersec
| Reddit |
Complexity for the function maxheight in a binary tree. <p>The function: </p>
<pre><code>MAX-HEIGHT(node)
if(node == NIL)
return -1;
else
return max(MAX-HEIGHT(node.leftChild), MAX-HEIGHT(node.rightChild)) + 1;
</code></pre>
<p>Suppose that we have N nodes and we call the function with <code>MAX-HEIGHT(root).</code></p>
<p>I think that the complexity of this function is O(N) because we need to visit each node.
However, I am not sure and I can not prove it rigorously. Please give me a good explanation why it is O(N), if it is O(N), and why not if it is not O(N).</p>
<p>So, what is the complexity? </p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange |
Did you know that Sea Lion Pups will often roll around in the sand to cover themselves in a beachy layer of sun protection?. | 0non-cybersec
| Reddit |
Find a non diagonalizable matrix that commutes with a given matrix. <p>We are asked to find a non diagonalizable matrix that commutes with
$\begin{pmatrix} 0 & 0 & -1 \\1 & 1 & 1 \\0 & 0 & 1\end{pmatrix}$.</p>
<p>What I tried: My first thought was the inverse, but this matrix is not invertible, and then I thought maybe the transpose (for some reason) and they don't commute.</p>
<p>How can I find such a matrix?</p>
| 0non-cybersec
| Stackexchange |
Request header field Access-Control-Allow-Headers is not allowed by itself in preflight response. <p>I have come across CORS issues multiple times and can usually fix it but I want to really understand by seeing this from a MEAN stack paradigm. </p>
<p>Before I simply added middleware in my express server to catch these things, but it looks like there is some kind of pre-hook that is erroring out my requests. </p>
<blockquote>
<p>Request header field Access-Control-Allow-Headers is not allowed by Access-Control-Allow-Headers in preflight response</p>
</blockquote>
<p>I assumed that I could do this:</p>
<pre class="lang-js prettyprint-override"><code>app.use(function(req, res, next) {
res.header("Access-Control-Allow-Headers","*")
})
</code></pre>
<p>or the equivalent but this doesn't seem to fix it. I also of course tried</p>
<pre class="lang-js prettyprint-override"><code>app.use(function(req, res, next) {
res.header("Access-Control-Allow-Headers","Access-Control-Allow-Headers")
})
</code></pre>
<p>Still no luck.</p>
| 0non-cybersec
| Stackexchange |
$R$ a DVR with fraction field $K.$ What are the $R$-submodules of $K^n?$. <p>It is known that if $R$ is a DVR with fraction field $K,$ then the $R$-submodules of $K$ are $0,K,x^nR,$ with $n$ any integer and $x$ a generator of the maximal ideal of $R.$ I was wondering if there is a simple structure theorem for the $R$-submodules of $K^n,$ the $n$-dimensional vector space over $K$ (similar to that for finitely generated torsion-free modules over a Dedekind domain). I know that the subroups of $\mathbb{Q}$ are somewhat complicated to describe, but was wondering, in particular, if the situation gets any nicer with, say, $\mathbb{Z}_P$-submodules of $\mathbb{Q}^n,$ where $P$ is a nonzero prime ideal of $\mathbb{Z}.$</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 |
What I think of every time I see the Playstation Move warning.. | 0non-cybersec
| Reddit |
Russia: Maybe reusing rockets isn't a crazy capitalist idea after all. | 0non-cybersec
| Reddit |
[I Ate] Spicy fried chicken sandwich. | 0non-cybersec
| Reddit |
Nonlinear Nuclear Operators ?. <p>Is there a "right" definition of the nuclear
operator in the nonlinear framework ? Of course, such an operator
must be compact, while a linear operator should be "nonlinearly"
nuclear iff it is nuclear as usual. [These are naive conditions, of course.]
Since here the Frechet derivative is useless. For example, the "cubing"
self-map of $\ell^{2}$, i.e., $(x_{n})$ $\rightarrow\(x_{n}^{3})$
, has nuclear derivative at each point, yet it is clearly noncompact.
OTOH, it seems that a [nonlinear] Lipschitz $p$-summing operator
need not to be power compact. Some thoughts ?</p>
| 0non-cybersec
| Stackexchange |
My first time - will this build explode when I put it together?. [Part list permalink](http://pcpartpicker.com/parts/partlist/ar/8px) / [Part price breakdown by merchant](http://pcpartpicker.com/parts/partlist/ar/8px/by_merchant)
Type|Item|Price
:----|:----|:----
**CPU** | [AMD Phenom II X4 955 Black 3.2GHz Quad-Core Processor](http://pcpartpicker.com/part/amd-cpu-hdz955fbgmbox) | $121.49 @ Amazon
**CPU Cooler** | [Cooler Master RR-B10-212P-G1 76.8 CFM Sleeve Bearing CPU Cooler](http://pcpartpicker.com/part/cooler-master-cpu-cooler-rrb10212pg1) | $29.51 @ Amazon
**Motherboard** | [MSI 870A-G54 ATX AM3 Motherboard](http://pcpartpicker.com/part/msi-motherboard-870ag54) | $99.99 @ Newegg
**Memory** | [G.Skill Ripjaws Series 4GB (1 x 4GB) DDR3-1600 Memory](http://pcpartpicker.com/part/gskill-memory-f312800cl9s4gbrl) | $49.99 @ Newegg
**Hard Drive** | [Samsung Spinpoint F3 1TB 3.5" 7200RPM Internal Hard Drive](http://pcpartpicker.com/part/samsung-internal-hard-drive-hd103sj) | $69.99 @ Newegg
**Video Card** | [MSI Radeon HD 5770 1GB Video Card](http://pcpartpicker.com/part/msi-video-card-r5770hawk) | $148.99 @ Mwave
**Case** | [Cooler Master HAF 912 ATX Mid Tower Case](http://pcpartpicker.com/part/cooler-master-case-rc912kkn1) | $59.99 @ Newegg
**Power Supply** | [Antec 650W ATX12V Power Supply](http://pcpartpicker.com/part/antec-power-supply-ea650green) | $79.99 @ Newegg
|| **Total**
| (Prices include shipping and discounts when available.) | $659.94
Questions about issues I know about:
* The CPU isn't listed on the [motherboard page](http://www.msi.com/product/mb/870A-G54.html#?div=CPUSupport), I think - is it actually supported, or not?
* The RAM is 1.5V - is that too low?
$700 is about my budget - I've never done this before, so thanks for your help and advice! | 0non-cybersec
| Reddit |
So Many Lives / Me / Photography, 2019. | 0non-cybersec
| Reddit |
When I posted a link and got 2 upvotes, shortly followed by 10 downvotes.. | 0non-cybersec
| Reddit |
Two Texans are sitting on a plane from Dallas and an old Jewish Texan is sitting between them.. The first Texan says, "My name is
Roger. I own 250,000 acres. I have 10,000 head of cattle and they call my place The Jolly Roger."
The second Texan says, "My name is John. I own 350,000 acres. I have 50,000 head of cattle and they call my place Big John's."
They both look down at the old man who says, "My name is Irving and I own only 300 acres."
Roger looks down at him and say, "300
Acres? What do you raise?"
“Nothing" Irving says.
"Well then, what do you call it?" Asked John.
"Downtown Dallas." | 0non-cybersec
| Reddit |
Received MRI results on an ISO 9660 Joliet CD. I can view the disc contents, but the files appear to be Windows-only (.exe, .dll). Any way to access the media on Mac?. Any options here?
**edit:** the suggestions to use OsiriX solved the problem. Thanks everyone. | 0non-cybersec
| Reddit |
How to ensure my CustomPaint widget painting is stored in the raster cache?. <p>I have an app that displays a black dot at the point where the user touches the screen like this:</p>
<p><a href="https://i.stack.imgur.com/YpTDS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YpTDS.png" alt="enter image description here"></a></p>
<p>The black dot can be moved by the user as he/she drags his finger on the screen.</p>
<p>The background is an expensive paint operation, so I have created two separate widgets in a stack, hoping that the background widget painting will be stored in the Flutter raster cache. But it's not stored - Flutter calls my expensive paint method every time the black dot moves.</p>
<p>What am I doing wrong?</p>
<p>Here's my code:</p>
<pre><code>import 'package:flutter/material.dart';
import 'dart:math';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
State createState() => new MyHomePageState();
}
class MyHomePageState extends State<MyHomePage> {
GlobalKey _paintKey = new GlobalKey();
Offset _offset;
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Stack(
fit: StackFit.expand,
children: <Widget>[
new CustomPaint(
painter: new ExpensivePainter(),
isComplex: true,
willChange: false,
),
new Listener(
onPointerDown: _updateOffset,
onPointerMove: _updateOffset,
child: new CustomPaint(
key: _paintKey,
painter: new MyCustomPainter(_offset),
child: new ConstrainedBox(
constraints: new BoxConstraints.expand(),
),
),
)
],
),
);
}
_updateOffset(PointerEvent event) {
RenderBox referenceBox = _paintKey.currentContext.findRenderObject();
Offset offset = referenceBox.globalToLocal(event.position);
setState(() {
_offset = offset;
});
}
}
class ExpensivePainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
print("Doing expensive paint job");
Random rand = new Random(12345);
List<Color> colors = [
Colors.red,
Colors.blue,
Colors.yellow,
Colors.green,
Colors.white,
];
for (int i = 0; i < 5000; i++) {
canvas.drawCircle(
new Offset(
rand.nextDouble() * size.width, rand.nextDouble() * size.height),
10 + rand.nextDouble() * 20,
new Paint()
..color = colors[rand.nextInt(colors.length)].withOpacity(0.2));
}
}
@override
bool shouldRepaint(ExpensivePainter other) => false;
}
class MyCustomPainter extends CustomPainter {
final Offset _offset;
MyCustomPainter(this._offset);
@override
void paint(Canvas canvas, Size size) {
if (_offset == null) return;
canvas.drawCircle(_offset, 10.0, new Paint()..color = Colors.black);
}
@override
bool shouldRepaint(MyCustomPainter other) => other._offset != _offset;
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Given that $ U_n=[x(1-x)]^n$ and $n\geq2$,$V_n=\int_{0}^{1}e^xU_ndx$,prove that $V_n+2n(2n-1)V_{n-1}-n(n-1)V_{n-2}=0$. <p>Given that $ U_n=[x(1-x)]^n$ and $n\geq2$,$V_n=\int_{0}^{1}e^xU_ndx$,prove that $V_n+2n(2n-1)V_{n-1}-n(n-1)V_{n-2}=0$<br></p>
<p>I tried to solve it by integration by parts,taking $U_n$ as first function and $e^x$ as second function.<br></p>
<p>$V_n=-\int_{0}^{1}n[x(1-x)]^{n-1}(1-2x)e^x dx=-\int_{0}^{1}nU_{n-1}(1-x-x)e^x dx$<br></p>
<p>I could not proceed further,how can i reach the desired result.Please help.</p>
| 0non-cybersec
| Stackexchange |
How to customize which will be the default Subreddits on the top of the page. | 0non-cybersec
| Reddit |
How to end a loop with a grep in a temporary file?. <p>I'm stuck!</p>
<p>I have a script. I want to check if a user is a system user (thanks to @pLumo).</p>
<p>I extract my no-system user in a temporary file and I grep to check if my variable is in my temporary file.
Problem is, I can't quit my loop when I press q cause the grep command doesn't find
the user "q" in the temporary file.</p>
<pre><code> read -p "Enter the username you want to delete (q to quit) " name
user=$( cut -d: -f1 /etc/passwd | grep -w "^$name$" ) 2>>/dev/null
awk -F: '$3 >= 1000 && $3 <= 60000 && $6 ~ /^\/home/ {print $1}' /etc/passwd >/tmp/testuser
if [ "$name" != "q" ]
then
until [ $(grep -w "$user" /tmp/testuser) ] && [[ "$name" =~ $regex ]] && [[ ! -z "$name" ]] && [ "$name" != "q" ]
do
read -p "User system or nonexistant, try again (q to quit) " name
user=$( cut -d: -f1 /etc/passwd | grep -w "^$name$" ) 2>>/dev/null
done
if [ "$name" = "q" ]
then
echo "You quit the program"
exit
fi
fi
</code></pre>
| 0non-cybersec
| Stackexchange |
directory sorting text. <p>I am running Ubuntu 12 and a while back I wrote a small script file to manipulate a text file which I use for a workshop index.</p>
<p>The most important function is to sort the file into alphabetical order that I did with the command<br>
<code>sort -df</code><br>
This worked well when first written as the directory sort paid attention to leading spaces and tabs placing lines of text with leading spaces at the head of the file. </p>
<p>It now will not do that and the same script file just does a straight alphabetical sort and ignores spaces. This is not what I need. Reading the manual (man) and other documentation seems to agree with me. </p>
<p>What can I do to return to what I need? Thanks for any help you can supply.
Regards Charlie</p>
| 0non-cybersec
| Stackexchange |
Turning hex string into readable chars. <p>I have this blob of hex data which can be found on
<a href="https://www.reddit.com/r/codes/comments/421xek/can_somebody_help_me_decode_this_blob/" rel="nofollow">https://www.reddit.com/r/codes/comments/421xek/can_somebody_help_me_decode_this_blob/</a></p>
<p>and I am looking to turn it into
<a href="https://www.dropbox.com/s/vhlbgmwn37ro7h0/example.csv?dl=0" rel="nofollow">https://www.dropbox.com/s/vhlbgmwn37ro7h0/example.csv?dl=0</a></p>
<p>I have done a lot of work and have taken a lot of advice from the online community, and I really do appreciate it. </p>
<p>I would LOVE more feedback on how I could handle this. </p>
<p>This field is in the db like this...
dropbox.com/s/vhlbgmwn37ro7h0/example.csv?dl=0</p>
<p>I am also trying to learn the process of what you advise so I can handle this on my own.</p>
| 0non-cybersec
| Stackexchange |
OpenVPN needs a gateway parameter fo a --route option. <p>I've got an OpenVPN client that isn't connecting to the vpn server. I've pasted the full log below, but in particular, I'm getting these issues with the route:</p>
<blockquote>
<p>OpenVPN ROUTE: OpenVPN needs a gateway parameter for a --route option and no default was specified by either --route-gateway or --ifconfig options</p>
<p>OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.8.0.1</p>
</blockquote>
<p>There are many clients with the same client config that are connecting just fine. This client (and a few others) was connected, lost its connection due to the system time becoming too far out of sync (I believe), has since synced the system time, but is now still unable to connect. Usually, restarting the system fixes the issue. So it doesn't appear to be an issue with the VPN configuration but something with the client system.</p>
<p>I don't really know enough to understand the route issues or fix them. I do need to deal with recovering from the time sync issue, but for now, why can't I manually start a VPN connection from this client? What would cause OpenVPN to now need a gateway parameter?</p>
<p><strong>log</strong></p>
<pre><code>$ openvpn gatewaymaster.conf
Fri Sep 30 12:03:07 2016 OpenVPN 2.2.1 arm-linux-gnueabihf [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
Fri Sep 30 12:03:07 2016 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Fri Sep 30 12:03:07 2016 LZO compression initialized
Fri Sep 30 12:03:07 2016 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Fri Sep 30 12:03:07 2016 Socket Buffers: R=[163840->131072] S=[163840->131072]
Fri Sep 30 12:03:07 2016 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Fri Sep 30 12:03:07 2016 Local Options hash (VER=V4): '41690919'
Fri Sep 30 12:03:07 2016 Expected Remote Options hash (VER=V4): '530fdded'
Fri Sep 30 12:03:07 2016 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Fri Sep 30 12:03:07 2016 UDPv4 link local: [undef]
Fri Sep 30 12:03:07 2016 UDPv4 link remote: [AF_INET]NNN.NNN.NNN.NNN:NNNN
Fri Sep 30 12:03:07 2016 TLS: Initial packet from [AF_INET]NNN.NNN.NNN.NNN:NNNN, sid=679c9108 60cb4eaf
Fri Sep 30 12:03:07 2016 VERIFY OK: depth=1, <redacted>
Fri Sep 30 12:03:07 2016 VERIFY OK: nsCertType=SERVER
Fri Sep 30 12:03:07 2016 VERIFY OK: depth=0, <redacted>
Fri Sep 30 12:03:08 2016 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Sep 30 12:03:08 2016 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Sep 30 12:03:08 2016 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Fri Sep 30 12:03:08 2016 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Sep 30 12:03:08 2016 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Fri Sep 30 12:03:08 2016 [server] Peer Connection Initiated with [AF_INET]NNN.NNN.NNN.NNN:NNNN
Fri Sep 30 12:03:10 2016 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Fri Sep 30 12:03:10 2016 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120'
Fri Sep 30 12:03:10 2016 OPTIONS IMPORT: timers and/or timeouts modified
Fri Sep 30 12:03:10 2016 OPTIONS IMPORT: --ifconfig/up options modified
Fri Sep 30 12:03:10 2016 OPTIONS IMPORT: route options modified
Fri Sep 30 12:03:10 2016 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Sep 30 12:03:10 2016 ROUTE default_gateway=10.1.10.1
Fri Sep 30 12:03:10 2016 OpenVPN ROUTE: OpenVPN needs a gateway parameter for a --route option and no default was specified by either --route-gateway or --ifconfig options
Fri Sep 30 12:03:10 2016 OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.8.0.1
Fri Sep 30 12:03:10 2016 TUN/TAP device tun1 opened
Fri Sep 30 12:03:10 2016 TUN/TAP TX queue length set to 100
Fri Sep 30 12:03:10 2016 GID set to nogroup
Fri Sep 30 12:03:10 2016 UID set to nobody
Fri Sep 30 12:03:10 2016 Initialization Sequence Completed
</code></pre>
<p><strong>server</strong></p>
<pre><code>port NNNN
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS NNN.NN.NNN.NNN"
push "dhcp-option DNS NNN.NN.NNN.NNN"
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
hand-window 120
</code></pre>
<p><strong>client</strong></p>
<pre><code>client
dev tun
proto udp
remote XXXXX.XXXXX.xxx NNNN
resolve-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3
</code></pre>
| 0non-cybersec
| Stackexchange |
Pro MFAdvice givers, sound off, with pics. . I see a lot of the same people giving advice on post after post, but no pictures of themselves. The advice usually seems great, but I want to know I'm not getting trolled by someone like Vest Guy (anyone remember him? With the messy apartment videos?). I won't name any names, but you know who you are. Put your camera where your mouth is. | 0non-cybersec
| Reddit |
Blasphemy law to be abolished in Greece under new criminal code.. | 0non-cybersec
| Reddit |
Access mails on server after moving mail DNS. <p>I've just moved mail for a domain over to Google Apps, from my web host. All is well, except for some mails in one account left on my host. I don't want to reverse all my dns changes just to retrieve these mails if I can get away without it.</p>
<p>I'm asking here because I'm unable to contact my hosting provider.</p>
| 0non-cybersec
| Stackexchange |
This is a really cool mural. | 0non-cybersec
| Reddit |
arrayFilters in mongodb. <p>I have the following schema.</p>
<pre><code>{
posts: [
{
_id: '5ayuunbdsyuuuyut778'
replies: [{
_id: "67hfudj7e9whduu888",
text: "something"
}]
}
]
}
</code></pre>
<p>I want to update the text in particular reply.
I am using mongoose.</p>
<p>I have written the query as follows</p>
<pre><code>Post.findOneAndUpdate(
{'posts.replies._id': _id},
{$set: {'posts.$[post].replies.$[reply].text': "something1"}},
{ arrayFilters: [{'post._id': postId}, { 'reply._id': _id }]}
)
</code></pre>
<p>This query is not updating the document.</p>
<p>Am I missing something? Do I need to cast ids using ObjectId</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 |
No, you are not.. | 0non-cybersec
| Reddit |
Tipping Point MindShaRE Posts. | 1cybersec
| Reddit |
How to install Anaconda?. <p>I installed Anaconda Python 2.7 for 64bit Ubuntu 16.04LTS But the navigator does not open up nor do any of it's applications like spyder or ipython show up when I search in the launcher. The root dirctory has anaconda2 folder. But when I try to use conda command on the terminal, it says "command not found"
How to get started?</p>
| 0non-cybersec
| Stackexchange |
New Leak: Catching multiple Pokemon of the same type. | 0non-cybersec
| Reddit |
From ESPN stats, only two Super Bowl teams have won the turnover and yardage battle, and still lost. Both were the Seahawks (05, 14).. | 0non-cybersec
| Reddit |
Unable to Debug/Install Watch App Extension. <p>I have been having this issue for quite some time and have been unable to fix this. About 90% of the time, my watch app fails to install on the device. The App will show installation to about 80% completion, then fail and quit, providing this error in the </p>
<p><strong>iPhone debug log console</strong> </p>
<pre><code><Error>: 0x4029b000 __106-[ACXCompanionSyncConnectioninstallWatchAppWithBundleID:withProvisioningProfileInfo:completionWithError:]_block_invoke_3: Failed to install app com.mea.AppName.watchkitapp : Error Domain=ACXErrorDomain Code=17 "Got error 17 in install done from remote side (MI error ApplicationVerificationFailed ; Extended 0xe8008017 ; Desc Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.))" UserInfo={FunctionName=-[ACXServerInstallOperation receivedDictionaryOrData:], SourceFileLine=524, NSLocalizedDescription=Got error 17 in install done from remote side (MI error ApplicationVerificationFailed ; Extended 0xe8008017 ; Desc Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.))}
</code></pre>
<p><strong>Watch Debug Log Console</strong>, these errors are thrown. </p>
<pre><code>Verification stage failed
Jul 21 09:46:59 Andrews-AppleWatch appconduitd[104] <Error>: 0x1f084000 __MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.)" UserInfo={LibMISErrorNumber=-402620393, LegacyErrorString=ApplicationVerificationFailed, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], NSLocalizedDescription=Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.), SourceFileLine=142}
</code></pre>
<p>Because of these pod frameworks (which apparently have been modified) that I am using in my watch extension.</p>
<pre><code>SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/Alamofire.framework/Alamofire
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/Realm.framework/Realm
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/RealmSwift.framework/RealmSwift
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/SwiftyJSON.framework/SwiftyJSON
</code></pre>
<p>Now, I understand that this has to do with code signing (right?), but how do I go about updating or verifying the correct code signature?</p>
<p>I see that other people have had a similar issue by having a non-alpha/non-numeric symbol in their Product Name, however, my Product name is AppNameWatch, and AppNameWatch Extension. Apple generates the Extension file with the space character in-between AppNameWatch and Extension, so I assume that that is fine and not the cause of the problem. </p>
<p>I have also tried cleaning/re-building/cleaning the build folder and deleting derived data.</p>
<p>Any help would be greatly appreciated, thank you. </p>
<p><strong>EDIT/UPDATE:</strong></p>
<p>Looks like this is an issue related to cocoapods. After moving all my frameworks to be managed by Carthage, the app is installing and running as it should with no errors related to modified resources. </p>
| 0non-cybersec
| Stackexchange |
Sql server 2008 filestream maximum number of rows. <p>We are using <strong>filestreams</strong> in <strong>Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) and Windows server 2008</strong> to store millions of files. Since there are millions of files all of them are grouped into 100 filegroups and inserted sequntially one after another filegroup. Now we have around 15K files in each filegroup and expected to grow to 20K soon. so we want to know is there any maximum limit of rows that a filegroup can have to give optimum performance or is there any maximum on the operating system side for optimum performace as we are storing or going to store around <20K files in single folder?</p>
<p>Any suggestion to the right resources will also be very helpful.</p>
<p>I have a link to msdn blog which states that</p>
<blockquote>
<p>4.Check if FILESTREAM directory containers do not have more than 300,000 files individually, as NTFS performance degradation may be an
issue especially when generation of 8.3 filenames is enabled.</p>
<blockquote>
<blockquote>
<blockquote>
<p><a href="http://blogs.msdn.com/b/blogdoezequiel/archive/2011/02/11/best-practices-on-filestream-implementations.aspx" rel="nofollow noreferrer">Msdn Blog Link</a></p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
What are the risks of in-person private currency exchanging for travellers?. <p><a href="https://bitcoin.stackexchange.com/a/3885/516">This answer</a> suggests popularity growth of people privately exchanging bitcoins for a physical currency, in person. This might occur in "coffee shops, hotels, hostels, hackerspaces, etc".</p>
<p>An example would be 2 travellers meeting in a hostel in, say, the UK. Traveller A has just been to the USA and traveller B is about to go there. Traveller A has US$200 that's no longer needed, so he agrees to exchange it for some of traveller B's bitcoins.</p>
<p>Definitely assume traveller B has a mobile phone or other internet access to perform the transfer, but please consider both cases of traveller A having and not having similar access at the time.</p>
<p>What are the risks of such a deal, and what can be done to improve the chances of a successful deal?</p>
| 0non-cybersec
| Stackexchange |
Derived functors in the category of sheaves. <p>I am studying derived functors and I came across a problem: given an additive left exact functor $F$ between two abelian categories $\mathcal{C}, \mathcal{D}$ with enough injectives one defines its right derived functor $RF : D^{-}(\mathcal{C}) \rightarrow D^{-}(\mathcal{D})$ by means of the universal property. Moreover one can define the <em>classical derived functors $R^{i}F(X) = H^{i}(RF(\mathcal{I}^{\bullet}_{X}))$</em> where by $\mathcal{I}^{\bullet}_{X}$ I mean an injective resolution of $X$.</p>
<p>As far as I understood $R^{i}F$ is meant to be a functor between $\mathcal{C}$ and $\mathcal{D}$, but here comes my question: if I consider $\mathcal{C} = \mathcal{D} = \{ \text{ sheaves of abelian groups on a topological space } \}$ then the cohomology groups of a complex of abelian sheaves need not to be abelian sheaves but only presheaves, so we need to sheafify. Is my reasoning correct or I am losing something?</p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange |
How can I find the earliest date from a set of rows identified by the same ID number?. <p>I am trying to figure out the right formula to copy the earliest date into a new column only if excel can identify that the same ID number in the row and the same ID numbers in column A are all scanned in the process. </p>
<p>So column A might have five rows of REQ100 all with varying dates. I would like another column added that scans all of those REQ100s and pulls out the earliest date into my new column. </p>
<p>I would like to do the same in another column for the latest date.</p>
<p>So far I have been trying MIN(IF... and MAX(IF... with no luck. Even trying the Control+Shift+Enter function to paste the formula into my spreadsheet isn't returning accurate results. <a href="https://i.stack.imgur.com/1rjGY.png" rel="nofollow noreferrer">Please click here for pictorial example of data. </a></p>
| 0non-cybersec
| Stackexchange |
Ring Bearer Box... How would you do the top?. | 0non-cybersec
| Reddit |
How to create a symbol for LMB (left mouse clicking) or RMB (right mouse clicking) in LaTeX?. <p>I'm searching now since 2 weeks for a LMB (left mouse click) or
RMB (right mouse click) symbol in LaTeX. I saw it once
in a manual, but I couldn't find it any more...</p>
<p>Now I want to write a manual and for easier understanding how to
use the software it would be great to integrate such easy symbols!</p>
<p>I already designed the symbol in illustrator. but now I don't know
how to import it into LaTeX or how to design with "special" packages
the symbols?!?</p>
<p>Picture is missing cause I'm new and I am not allowed to upload pictures.</p>
<p>It should look like an oval. In the oval on the top there is a reversed T.
if it should be the "left mouse click" the left side is black. If it should
be the "right mouse click" then the right side is black.</p>
<p>Hope the description is sufficient. If not, post and I'll send you the image.</p>
| 0non-cybersec
| Stackexchange |
How does Physical RAM affects file copy?. <p><strong>My setup:</strong></p>
<p><em>Source and destination Servers (installed in M1000e Dell enclosure):</em></p>
<ul>
<li>Dell Poweredge M620 (Blade servers) </li>
<li>2x Intel E5-2650 @ 2GHz
processors </li>
<li>192GB RAM (DDR3, 1333Mhz</li>
<li>Perc H310 Raid controller
(6Gbe per slot)</li>
<li>2x 1.7TB SSD (Sata) drives (RAID-0) </li>
<li><p>2x 10Gbe NICs
(MS-Team, Switch independent, Dynamic, All adapters active)</p></li>
<li><p>Windows 2012 R2 (Default installation) </p></li>
<li><p>System Managed Page file</p></li>
<li><p>Servers are connected to Internal enclosure's Force10 MXL 10Gb switch </p></li>
<li><p>Jumbo packets are configured (NICs and Switch ports)</p></li>
</ul>
<p><strong>Use Case:</strong></p>
<p>When copying (windows copy) a large file (over 200GB) between source and destination servers (doesn't matter in which direction -happens in both), copy start with a nice solid transfer rate of ~1GB/s (even though i was expecting ~2GB/s), however, somewhere along the way it drops to a few MB/s (!) for the rest of the transfer.<br>
<strong>Please see the below image for a clearer view</strong></p>
<p><img src="https://i.stack.imgur.com/D0rLa.jpg" alt="enter image description here"></p>
<p>It looks like RAM is affecting my copy action.<br>
How and why does it affects it? </p>
| 0non-cybersec
| Stackexchange |
Restricting access using IP address / Network Redirection?. <p>I have a situation where we have a web server (lets call it A) that is hosting a set of HTTP based services.</p>
<p>Due to some client requirements, this web server is not open to the outside world but rather has an IP address based restriction to allow only a certain fixed set of IP addresses.</p>
<p>The idea is that there will be another server that will be the outward public facing server (lets call it B) and this server will then redirect all requests to server A - which accepts requests only from Server A.</p>
<p>2 questions :-</p>
<ol>
<li>Does having such a server configuration add any value or any benefit which could not be achieved by just having "server A" alone?</li>
<li>If "server B" is only basically doing a redirect, can I do it using some networking hardware itself like a router etc rather than having a web server do it? And would that be more efficient?</li>
</ol>
| 0non-cybersec
| Stackexchange |
22[M] and 22[F].... Scared she will break up with me after a 3 year relationship...What do I do?. So let me just give some background information, me and my girlfriend have been dating over 3 years, and I love her a lot. But things lately havent been great I started working in a pub full time over, and she works in a office which means that we never see each other except for like maybe 3 hours a week on a afternoon I'm off, cuase I have week days off when she works until 6 and she has weekends off but I work until midnight then.
Before we used to see each other on the weekends before I got this job, for two days. Which was nice to spend time with her, anyway we been like a month in this situation lucky for me she was gonna quit her job soon cuase she wants to apply for some schemes as she doesn't like her current job. Which for me is good cuase I get to see her again.
So the real issue happen yesterday when we went out, we had a big fight. We went out as a group with some of her friends and mine. The fight started cuase she was talking and being friendly with a guy at the bar right in front of me. Now she didn't think it was a big deal but for me it was but when I tried to tell her about it she would just essentially run away to the bathroom and come back and pretend everything was fine. Which annoyed me quite a bit. I was going to drop it since she clearly didn't think it was a big deal but she kept on asking me what's wrong until I finally told her. To which she replied before I could explain why that annoyed me that I don't trust her and stormed off to the bathroom. I then sent her friend to check on her to see if she was alright and just went to get some water. When she came out of the toilet she just went home with her friend. She seemed upset but there wasn't much I could have said at that point cuase she clearly didn't't want to speak to me.
Now just to clarify I trust her and I trust her a lot, but lately she been acting a bit weird. I will just give some examples she went out one night a couple of weeks ago and was talking about how guys were hitting on her and I was like haha the wankers kind of thing and then she said something stupid like Ohhh see I have other options which I was like wait what?? When I asked her about it she said it was just a bad joke. Which I didn't get and still don't get she also been quite snappy with me which is weird. And the last really weird thing was that she always complains to me that she doesn't have any friends at work even though she was texting with a guy from work, which she made it seem like was just a colleague I asked her she didn't even mention that she was talking to him outside work and she said I was going to cuase you might find out anyway(i did cuase she got a message from him whilst I was with her) but she didn't't want to upset me. Now don't get me wrong she wasn't flirting with him or anything just didn't understand why she made it seem like she talked to no-one from work and she felt the need to hide this from me.
So yesterday I got annoyed and not cuase I don't trust her, but because for me its not nice to see my girlfriend being friendly with other guys right infront of me. That just annoys me and she knows that which is why I didn't understand why she would do it in the first place. Like for me if I talk to another woman in a bar or if another woman approaches me I just end the conversation as quickly as possible cuase I don't need to talk to random women who are trying to hit on me. But my girlfriend still get jealous and stuff which I'm like I get it I don't like it too. But the thing is when she does its meant to be fine cuase I have to trust her and that double standard annoys me.
So right now she said to me she needs time to think stuff over.... which sounds like she wants to break up with me. So what should I do?
P.s. sorry for writing so poorly my thoughts are all over the place, if you have any other questions just ask | 0non-cybersec
| Reddit |
[50/50] Facetime session with Destiny Hope NSFW | Cutting open an ovarian cyst NSFW/L. | 0non-cybersec
| Reddit |
TIL Cuba is a paradise of vintage American automobiles. | 0non-cybersec
| Reddit |
How can I connect a PC under route by Internet?. <p>I am an Linux newbie. </p>
<p>I have a PC with Ubuntu 18.04 on my campus, and the CN (campus network) is connected to the Internet. I cannot set the route.</p>
<p>I have successfully connected Ubuntu-PC using NAT penetration software. BUT! the software has a speed limit.
So I want to connect the Ubuntu-PC by internet directly. </p>
<p>I can get the Ubuntu-PC's external network IP like "183.192.20.118" and I also know the intranet IP like 10.10.0.132, but if I try to connect the Ubuntu-PC , I need know the the port number.</p>
<p>For example, I run ssh on Ubuntu-PC, the ssh use port 22 on Ubuntu-PC. HOW do I know which port on the route to connect? LIKE 183.192.20.118:xxxx
what the xxxx should be?</p>
<p>I can write some basic Java program on the Ubuntu-PC, and I can get some infomation by using NAT penetration software.</p>
<p>So how do I achieve THAT: connect the Ubuntu-PC by Internet without setting the route?</p>
| 0non-cybersec
| Stackexchange |
Script acts differently in different directories. <p>I have a simple script that I pulled out of a larger script dedicated to renaming files with odd characters in the name. I have run this successfully on the same machine within different directories, and as we speak, it is running successfully within a directory but for some reason when running it against a higher level directory it renames the files incorrectly.
For example I have run this against a folder called UnsortedMusic.
What it is supposed to do is: </p>
<pre><code>/UnsortedMusic/Dir 001/SubDir 001/Song To Sing.flac > /UnsortedMusic/Dir 001/SubDir 001/SongToSing.flac
</code></pre>
<p>it takes the spaces out of the name, I then have essentially the same code but dedicated towards directories to remove spaces in directory names: </p>
<pre><code>/UnsortedMusic/Dir 001/SubDir 001/SongToSing.flac > /UnsortedMusic/Dir001/SubDir001/SongToSing.flac
</code></pre>
<p>This has worked successfully on other directories but for some reason on one particular dir it is doing someting like this: </p>
<pre><code> /UnsortedMusic/Dir 001/SubDir 001/Song To Sing.flac > /UnsortedMusic/Dir001/SubDir001/UnsortedMusicDir001SubDir001SongToSingflacSongToSingflac
</code></pre>
<p>As you can see its not only renaming the file with all the directory names its also removing the "." in the .flac which means ill have to change this manually for thousands of files. </p>
<p>This snippet of code is listed below: </p>
<pre><code>#!/bin/bash
#set -e
FolderName="Unsorted" #Dir location to be sorted
# Log Location on Server.
LOG_LOCATION=$(pwd) #/home/user/scripts/logs
exec > >(tee -i $LOG_LOCATION/RenameFile.log)
exec 2>&1
Start by seeing if the new directory allready exists, if not, make it
echo "Looking in $FolderName for files with abnormal characters"
#Rename any directories that might have a weird name structure that could conflict
find ${FolderName} -type f \( -name "* *" -o -name "*(*" -o -name "*[*" -o -name "*&*" \) -print0 | sort -rz | while read -d $'\0' file;
do
mv -v "$file" "$(dirname "$file")/$(basename "${file//[^a-zA-z0-9_-.]/}")";
done
#echo "Log Location should be: [ $LOG_LOCATION ]"
echo "Finished Process"
</code></pre>
<p>Which is part of a larger process script shown below: </p>
<pre><code>#!/bin/bash
#set -e
NewDirName="TestDirV2" #New Dir name
FolderName="TestDir" #Dir location to be sorted
# Log Location on Server.
LOG_LOCATION=$(pwd) #/home/user/scripts/logs
exec > >(tee -i $LOG_LOCATION/Organizer.log)
exec 2>&1
#Start by seeing if the new directory allready exists, if not, make it
if [ ! -d ${NewDirName} ];
then
mkdir -p ${NewDirName}
chmod -R a+rwx ${NewDirName}
fi
echo "Looking in $FolderName for files with abnormal characters"
#Rename any files that might have a weird name structure that could conflict
find ${FolderName} -type f \( -name "* *" -o -name "*(*" -o -name "*[*" -o -name "*&*" \) -print0 | sort -rz | while read -d $'\0' file;
do
mv -v "$file" "$(dirname "$file")/$(basename "${file//[^a-zA-z0-9_-.]/}")";
done
echo "Looking in $FolderName for directories with abnormal characters"
#Rename any directories that might have a weird name structure that could conflict
find ${FolderName} -type d \( -name "* *" -o -name "*(*" -o -name "*[*" -o -name "*&*" \) -print0 | sort -rz | while read -d $'\0' file;
do
mv -v "$file" "$(dirname "$file")/$(basename "${file//[^a-zA-z0-9_-.]/}")";
done
for FileType in $(find $FolderName -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u)
do
echo "Finished removing odd characters that may result in problems"
NewDir=$(echo "${NewDirName}/${FileType}");
if [ ! -d ${NewDirName}/${FileType} ];
then
echo "$NewDir does not exist"
echo "Making $NewDir"
mkdir -p ${NewDir}
chmod -R a+rwx ${NewDir}
fi
echo "Now looking for renamed $FileType files"
for FileToMove in $(find ${FolderName} -name "*.${FileType}");
do
echo "Dir to move ${FileToMove}"
echo "File to move ${FileToMove##*/}"
SpecificFile=$(echo "${FileToMove##*/}");
echo "Checking to see if $SpecificFile already exist in $NewDir"
if [ -f ${NewDir}/${SpecificFile} ];
then
x=0
while [ -f ${NewDir}/${SpecificFile} ]
do
echo "File ${SpecificFile} already exists, renaming"
SpecificFile=${x}${SpecificFile}
x=$(( x++ ));
echo "Renamed to $SpecificFile"
done
fi
#rsync -rav --progress ${FileToMove} ${NewDir}/${SpecificFile}
mv -v ${FileToMove} ${NewDir}/${SpecificFile}
done
done
chmod -R a+rwx ${NewDir}
echo "Log Location should be: [ $LOG_LOCATION ]"
echo "Finished Process"
</code></pre>
| 0non-cybersec
| Stackexchange |
Dead meme but I hope it's still big pp. | 0non-cybersec
| Reddit |
Game Thread: New Orleans Saints (9-2) at Seattle Seahawks (10-1). ----
[New Orleans Saints](/r/saints#away) [at](#at) [Seattle Seahawks](/r/seahawks#home)
----
* CenturyLink Field
* Seattle, Washington
----
######[](#start-box-score)
| | | | | | |
| :-- | :-- | :-- | :-- | :-- | :-- |
| |**First**|**Second**|**Third**|**Fourth**|**Final**|
|**Saints**|0|7|0|0|**7**|
|**Seahawks**|17|10|7|0|**34**|
######[](#end-box-score)
----
* General information
*
----
| | | | | | |
| :-- | :-- | :-- | :-- | --: | --: |
| **Coverage** | | | **Game Insight** | | **Odds** |
| ESPN | | | [Statmilk](http://www.statmilk.com/NFL/MatchUp/15227/12350/) | | Seattle -6½ O/U 48½ |
| |
|:---|
| [39°F/Wind 2mph/Partly cloudy/0% chance of rain](http://www.yr.no/place/United_States/Washington/Seattle/#weather-3 "Weather forecast from yr.no, delivered by the Norwegian Meteorological Institute and the NRK") |
----
| | |
| :-- | --: |
| **Headlines** | **Communities** |
| [Percy Harvin gets cortisone shots, won't play on 'MNF'](http://www.nfl.com/news/story/0ap2000000291638/article/percy-harvin-gets-cortisone-shots-wont-play-on-mnf) | /r/seahawks |
| [Bengals and Steelers stay put on Sunday night in Week 15](http://profootballtalk.nbcsports.com/2013/12/02/bengals-and-steelers-stay-put-on-sunday-night-in-week-15/) | /r/saints |
| | |
----
* Game Stats
*
----
######[](#start-game-stats)
| | | | | | |
| :-- | :-- | :-- | :-- | :-- | :-- |
| **Passing** | | **Cmp/Att** | **Yds** | **Ints** | **Tds** |
|R.Wilson|[](/r/seahawks)|22/30|310|0|3|
|D.Brees|[](/r/saints)|23/38|147|0|1|
| **Rushing** | | **Car** | **Yds** | **Lng** | **Tds** |
|R.Wilson|[](/r/seahawks)|8|47|15|0|
|M.Ingram|[](/r/saints)|8|22|8|0|
| **Receiving** | | **Rec** | **Yds** | **Lng** | **Tds** |
|Z.Miller|[](/r/seahawks)|5|86|60|1|
|J.Graham|[](/r/saints)|3|42|20|1|
######[](#end-game-stats)
----
* Thread Notes
* [Message The Moderators](http://www.reddit.com/message/compose?to=%2Fr%2Fnfl)
----
| |
| :-- |
| Discuss whatever you wish. You can trash talk, but keep it civil. |
| Turning comment sort to ['new'](http://www.reddit.com/r/nfl/comments/1rycke/game_thread_new_orleans_saints_92_at_seattle/?sort=new) will help you see the newest comments. |
| Try Chrome Refresh or Firefox's ReloadEvery to auto-refresh this tab. |
| Use [reddit-stream.com](http://reddit-stream.com/comments/1rycke) to get an autorefreshing version of this page |
| Check in on the r/nfl chat: **#reddit-nfl** on FreeNode ([open in browser](http://webchat.freenode.net/?channels=reddit-nfl)). |
| Show your team affiliation - pick your team's logo in the sidebar. | | 0non-cybersec
| Reddit |
collection view cells not loading images correctly. <p>I'm developing an iOS application that loads posts from a server into a UICollectionView. The collection view cell includes a UIImageView that is fixed to the bottom of the cell. </p>
<p><a href="https://i.stack.imgur.com/Q2uk5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q2uk5.png" alt="UICollectionViewCell"></a></p>
<p>Whenever I start the application and the collection view loads, all the images do not load correctly but for the last image, which is the correct dimensions. All cells are being formatted the same way. </p>
<p><a href="https://i.stack.imgur.com/g65X0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g65X0.png" alt="UICollectionView"></a></p>
<p>I have tried a multitude of solutions but nothing so far has worked.</p>
<p>What I suspect is happening is that the images have not finished loading before being set to the UIImageView of each cell (except for the last one in this case). This doesn't seem possible though as the cells are reloaded after getting a successful response..</p>
<p>This is my code for that particular function (using Alamofire)</p>
<pre><code>func getAllPosts(){
let url = "\(Constants.baseURL)/posts/"
let parameters = ["user_id": "\(userProfile!.getId())"]
Alamofire.request(.POST, url, parameters: parameters, encoding: .JSON)
.validate(contentType: ["application/json"])
.responseString { response in
switch response.result {
case .Success:
var postsArray = Array<[String: AnyObject]>()
do {
let json = try NSJSONSerialization.JSONObjectWithData(response.data!, options: NSJSONReadingOptions.MutableContainers)
for post in json as! [AnyObject] {
postsArray.append(post as! [String: AnyObject])
}
//invert array of posts so that latest load first!
postsArray = postsArray.reverse()
} catch {
}
//convert json to Post objects and reload the view
self.initialisePosts(postsArray)
self.collectionView?.reloadData()
case .Failure(let error):
print(error)
}
}
}
</code></pre>
<p>All help is appreciated.</p>
<p>Edit: Below are the current constraints on the UIImageView</p>
<p><a href="https://i.stack.imgur.com/JPfB6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JPfB6.png" alt="Constraints"></a></p>
<p>Edit 2: Here is the code for formatting the cells</p>
<pre><code>override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
// get a reference to our postcell with no image
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifiers[0], forIndexPath: indexPath) as! PostCell
guard let _: Post? = posts[indexPath.row] else {
return cell
}
return configurePostCell(cell, post: posts[indexPath.row])!
}
func configurePostCell(cell: UICollectionViewCell, post: Post) -> PostCell?{
if let cell = cell as? PostCell {
cell.author.text = post.user_name
cell.date.text = formatter.stringFromDate(post.pub_date!)
cell.desc.text = post.desc
cell.layer.cornerRadius = 5 //set corner radius here
cell.advertImage.image = post.advert?.advert_image
return cell
}
return nil
}
</code></pre>
<p><strong>Update: Using @Michael's Advice I have found that the Cell images <em>are</em> loading correctly..</strong></p>
<p><a href="https://i.stack.imgur.com/8uWw1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8uWw1.jpg" alt="Correctly loading image"></a></p>
<p><strong>but that the cell height is being mysteriously cropped by 50px..</strong></p>
<p>Storyboard editor cell size</p>
<p><a href="https://i.stack.imgur.com/saX5w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/saX5w.png" alt="Storyboard editor cell size"></a></p>
<p>Cell size at run-time</p>
<p><a href="https://i.stack.imgur.com/JJpJs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JJpJs.png" alt="Cell size at run-time"></a></p>
<p>This seems to be the issue but I have not found a solution yet.</p>
<p>Update: With two hours left on the bounty I have decided to award it to @Michael because his answer helped me to further investigation of my issue, which is still ongoing. </p>
| 0non-cybersec
| Stackexchange |
Why are the numbers on keyboard numpads are not arranged like ATM or phone keypads?. <p>Why did designers not arrange the numbers on numpads like ATM or phone keypads? </p>
<p>I mean, <code>7 8 9 - 4 5 6 - 1 2 3 - 0</code> vs. <code>1 2 3 - 4 5 6 - 7 8 9 - 0</code>.</p>
<p>Does human brain work the reverse way when working with computer keyboard?</p>
<p><strong>Computer keyboard numpad:</strong></p>
<p><img src="https://i.stack.imgur.com/h8ZoW.gif" alt="comp"></p>
<p><strong>ATM keypad:</strong></p>
<p><img src="https://i.stack.imgur.com/tlGsL.jpg" alt="atm"></p>
<p><strong>Phone keypad:</strong></p>
<p><img src="https://i.stack.imgur.com/YtOxC.jpg" alt="tel"></p>
| 0non-cybersec
| Stackexchange |
netstat reports PID that doesn't exist - wtf and how do I close it?. <p>I have an app that listens on port 7001, which sometimes crashes but leaves the port open. netstat reports a PID that doesn't exist. How is that possible? How can I force the port to close without restarting the machine?</p>
<pre>
C:\>netstat -a -o
Active Connections
Proto Local Address Foreign Address State PID
...
TCP JD1:7001 JD1.intranet:0 LISTENING 6060
...
C:\>taskkill /pid 6060
ERROR: The process "6060" not found.
</pre>
| 0non-cybersec
| Stackexchange |
multi-thread CPU usage in C#. <p>My Program uses predetermined number of threads that each do independent work.
I use i7-2600 CPU but I shut down the hyper-thread module so it runs 4 threads on 4 cores.
When I run the program with 1 thread the CPU usage is 25% which is perfect since 1 thread is fully used, but when I run 4 or 3 thread I only get 60% CPU, why?</p>
<p>Like I mentioned before the threads are totally independent (there are no locks and no contentions) also when I run the program 4 times with 1 thread I get 100% CPU usage (i.e. when its 4 processes of 1 thread for each process I get proper CPU usage)</p>
<p>Any ideas?</p>
<p>some more info:</p>
<ol>
<li>I'm not using I/O while processing all the needed data is loaded into to the memory, each thread loads its own data prior to processing.</li>
<li>I do load the data from a database (using oleDb) but the issue I'm describing happens after the loading while all threads are processing (no loading is done).</li>
<li>The numbers are:
<ul>
<li>2 threads around 40% instead of 50 (85% for each thread).</li>
<li>3 threads around 50% instead of 75 (65% for each thread).</li>
<li>4 threads around 60% instead of 100 (60% for each thread).</li>
</ul></li>
<li>I use i7 2600 with 16GB memory but the memory usage on that process doesn't come close to that.</li>
<li>I ran windows performance monitor to look for contentions there are none.</li>
</ol>
| 0non-cybersec
| Stackexchange |
Scumbag Reddit. | 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 slice of bacon has around 50 calories. Does this include
the grease that renders out when you cook it?. I cooked up some bacon to put on my salad and used the bacon fat to make a suoer-delicious dressing. Now I'm trying to figure out if the bacon fat is included in the bacon calorie count or if I should add it up separately. Google gave me several different answers, so I'm hoping somebody here knows. Anybody? | 0non-cybersec
| Reddit |
Lada overtake denied by Lada. | 0non-cybersec
| Reddit |
What is the greatest "against all odds" victory in history?. I was recently playing Rome 2, and won* against a Roman army, when I was outnumbered 5-1.
I can't wait to hear some incredible stories when I wake up :) | 0non-cybersec
| Reddit |
I’m itching to go outside and plant spring crop. This will do for now.. | 0non-cybersec
| Reddit |
Nested generic syntax ambiguity >>. <p>Apparently, C# is as susceptible to '>>' lexer dilemma <a href="https://stackoverflow.com/questions/5771131/nested-templates-vs-shift-operator">as is C++</a>.</p>
<p>This C# code is pretty valid, it compiles and runs just fine:</p>
<pre><code>var List = new Dummy("List");
var Nullable = new Dummy("Nullable");
var Guid = new Dummy("Guid");
var x = List<Nullable<Guid>> 10;
var y = List<Nullable<Guid>> .Equals(10,20);
</code></pre>
<p>You'd have to overload '<' and '>>' operators for the Dummy class above.</p>
<p>But the compiler manages to guess that in 'x' case the meaning is to use List, Nullable and Guid local variables. And in 'y' case it suddenly decides to treat them as names of well-known types.</p>
<p>Here's a bit more detailed description with another example:
<a href="http://mihailik.blogspot.co.uk/2012/05/nested-generics-c-can-be-stinky.html" rel="nofollow noreferrer">http://mihailik.blogspot.co.uk/2012/05/nested-generics-c-can-be-stinky.html</a></p>
<p>The question is: how does C# compiler resolve 'a<b<c>>' to arithmetic expression or generic type/method?</p>
<p>Surely it doesn't try to have multiple 'goes' over the text of the program until it succeeds, or does it? That would require unbounded look-ahead, and a very complex too.</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 |
How do I escape "Quotes" in a powershell string?. <p>I need to send a simple string to a web api using Powershell, and I have to ensure the value in the HTML body has "Quotes" around it, because the content type has to be application/json.</p>
<p>For example:</p>
<pre><code>$specialKey = "101010"
Invoke-RestMethod -Method Put `
-Uri $keyAssignmentUri `
-Header @{"content-type"="application/json"} `
-Body "$specialKey"
</code></pre>
<p>When I inspect this call in Fiddler, I see that the body is 101010 instead of "101010". How do I send the body value with quotes?</p>
| 0non-cybersec
| Stackexchange |
PsBattle: Man showing off meteorite sample. | 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 |
My inspiration for the day! :) The sugar in a can of coke. | 0non-cybersec
| Reddit |
How do I execute a dry run of a tar compression?. <p>I want to execute a dry run of a tar compression and print the entries to stdout without actually creating the tar.</p>
<p>So far I've tried:</p>
<pre class="lang-bsh prettyprint-override"><code>// just spins
$ tar t -O Downloads
</code></pre>
<pre class="lang-bsh prettyprint-override"><code>$ tar c -O Downloads
tar: Option -O is not permitted in mode -c
</code></pre>
<p><code>tar --help</code> gives the following:</p>
<pre class="lang-bsh prettyprint-override"><code>⋊> ~ tar --help 08:06:22
tar(bsdtar): manipulate archive files
First option must be a mode specifier:
-c Create -r Add/Replace -t List -u Update -x Extract
Common Options:
-b # Use # 512-byte records per I/O block
-f <filename> Location of archive
-v Verbose
-w Interactive
Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ]
<file>, <dir> add these items to archive
-z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma
--format {ustar|pax|cpio|shar} Select archive format
--exclude <pattern> Skip files that match pattern
-C <dir> Change to <dir> before processing remaining files
@<archive> Add entries from <archive> to output
List: tar -t [options] [<patterns>]
<patterns> If specified, list only entries that match
Extract: tar -x [options] [<patterns>]
<patterns> If specified, extract only entries that match
-k Keep (don't overwrite) existing files
-m Don't restore modification times
-O Write entries to stdout, don't restore to disk
-p Restore permissions (including ACLs, owner, file flags)
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
</code></pre>
| 0non-cybersec
| Stackexchange |
comparing cubics. <p>Suppose I have cubic functions $$f(t)=a_0+a_1t+a_2t^2+a_3t^3$$ and $$g(t)=b_0+b_1t+b_2t^2+b_3t^3$$ where $t\geq 0$.</p>
<p>Let $$h(t)=f(\alpha t)+g((1-\alpha)t), \alpha\in[0,1].$$ What conditions do I impose on the coefficients of $f$ and $g$ for $$(1)\space{} h(t)\geq f(t)?$$ $$(2)\space{} h(t)\geq g(t)?$$</p>
<p>Initially, in (1) I considered that $h(t)-f(t)\geq 0$. But I got stuck because I cannot infer from there that the coefficients of $h(t)-f(t)$ would each be greater than or equal to zero, right? Is there a special theory that needs to be used to solve this kind of problem?</p>
| 0non-cybersec
| Stackexchange |
Detecting Red Blood Cell Damage in Real-time. | 0non-cybersec
| Reddit |
Why are some computers are slow during file copy process?. <p>I have a modern laptop (quad-core i5 2.5GHz, 4GB RAM, ) at work. But it is very slow and unresponsive when I copy files in the background.On the other side, at home I have a simple 2-core PC (E2180 2 GHz CPU, 2GB RAM) and I do not observe any reduction of the performance whenever I copy anything. Both computers have similar HDDs installed and both tested using same file systems, operating systems and drivers. So, I am trying to understand what can cause such performance drop. Is it a typical problem of all laptops? According to PassMark chart table my PC should be 2-times slower than my laptop, but it's not the case: my PC is much faster under high I/O load. Do you know any reliable performance chart which takes into account this kind of tasks (file copy, I/O)? </p>
| 0non-cybersec
| Stackexchange |
PsBattle: this tiny crab wearing a hat. | 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 |
I think the Darth Vader pop is the one that makes sense the most. | 0non-cybersec
| Reddit |
Prove that $ \sqrt{5} $ is irrational geometrically Hardy and Wright. <p>I am reading Hardy and Wright's Intro to Number Theory chapter about irrational number and there is a section proving that $ \sqrt{5} $ is irrational geometrically, but the proof is confusing me for some parts. The proof, extracted verbatim from the book, is presented below for convenience.</p>
<p>$ \textbf{Proof} $: We argue in term of $ \displaystyle x = \frac{\sqrt{5} - 1}{2} $. Then $ x^2 = 1 - x $. Geometrically, if $ AB = 1, AC = x $, then $ AC^2 = AB.BC $ and $ AB $ is divided in golden section by $ C $. (For the geometric figure, see <a href="https://books.google.com/books?id=P6uTBqOa3T4C&pg=PA52&lpg=PA52&dq=If%20we%20divide%201%20by%20x,%20taking%20the%20largest%20possible%20integral&source=bl&ots=Bevhw_eyfm&sig=GSU-KD5dWRyW5qIaKShrIcf1y7g&hl=en&sa=X&ved=0ahUKEwjdyJ7qmOTSAhXmIsAKHVKDAUQQ6AEIGjAA#v=onepage&q=If%20we%20divide%201%20by%20x%2C%20taking%20the%20largest%20possible%20integral&f=false" rel="nofollow noreferrer">Fig 4 here</a>.)</p>
<p>If we divide $ 1 $ by $ x $, taking the largest integral quotient, viz. $ 1 $, the remainder is $ 1 - x = x^2 $. If we divide $ x $ by $ x^2 $, the quotient is again $ 1 $ and the remainder is $ x - x^2 = x^3 $. We next divide $ x^2 $ by $ x^3 $, and continue the process indefinitely; $ \textbf{at each stage the ratios of the number divided,} $
$ \textbf{the divisor, and the remainder are the same.} $ I am confused about this bold sentence. I work out a few examples and I got:</p>
<p>$ 1 = 1.x + (1 - x) = 1.x + x^2 $</p>
<p>$ x = 1.x^2 + (x - x^2) = 1.x^2 + x^3 $</p>
<p>$ x^2 = 1.x^3 + (x^2 - x^3) = 1.x^3 + x^4 $</p>
<p>and so on, so the ratios of the number divided, the divisor, and the remainder are all $ \displaystyle \frac{1}{x} $, is that what they are implying here?</p>
<p>Continue the proof: </p>
<blockquote>
<p>Geometrically, if we take $ CC_{1} $ equal and opposite to $ BC $, $ AC $ is divided at $ C_{1} $ in the same ratio as $ AB $ at $ C $, i.e. in golden section; if we take $ C_{1}C_{2} $ equal and opposite to $ C_{1}A $, then $ C_{1}C $ is divided in golden section at $ C_{2} $; and so on. Since we are dealing at each stage with a segment divided in the same ratio, the process can never end.</p>
</blockquote>
<p>I currently stuck on this paragraph, what do they mean by "$ AC $ is divided at $ C_{1} $ in the same ratio as $ AB $ at $ C $?" At first I thought this means $ \displaystyle \frac{AB}{AC} = \frac{AC}{AC_{1}} $, but this is not true since $ \displaystyle \frac{AB}{AC} = \frac{1}{x} $ while $ \displaystyle \frac{AC}{AC_{1}} = \frac{x}{2x - 1} $.</p>
<p>Continue the proof: </p>
<blockquote>
<p>If $ x $ is rational, then $ AB $ and $ AC $ are integral multiples of the same length $ \delta $, and the same is true for $ C_{1}C, C_{1}C_{2}, \dots $, i.e. all the segments in the figure. Hence, we can construct an infinite sequence of descending integral multiples of $ \delta $, and this is plainly impossible.</p>
</blockquote>
<p>If $ x = AC $ is rational, then $ \displaystyle AC = \frac{a}{b} $ and $ AB = 1 $, then how can "$ AB $ and $ AC $ are integral multiples of the same length $ \delta $?"</p>
<p>Any insight is appreciated.</p>
| 0non-cybersec
| Stackexchange |
This dress from a local newscast- my daughter loved it and asked me to ask "that Reddit thing where they figure out stuff.". | 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 |
Multiple inheritance and unique_ptr destruction. <p>I have the classic (possible problematic) multiple inheritance diamond scheme.</p>
<ul>
<li>B inherits A</li>
<li>C inherits A</li>
<li>D inherits C and B</li>
</ul>
<p>I want to have a <code>std::vector</code> that can contain either <code>C</code> or <code>D</code>
objects so I make it as <code>std::vector<C></code> which is <code>D</code>'s dad and it
works fine.</p>
<p><strong>BUT</strong> when I use: <code>std::vector<std::unique_ptr<C>></code> then I have segmentation fault upon the destruction of the vector.</p>
<pre><code>** glibc detected *** ./a.out: free(): invalid pointer: 0x0000000009948018***
</code></pre>
<p>Why is there a difference? To me, even the first implementation is problematic.</p>
<p><strong>Code</strong></p>
<pre><code>#include <string>
#include <vector>
#include <memory>
class A
{
public:
A() = default;
};
class B : public virtual A
{
public:
B() = default;
};
class C : public virtual A
{
public:
C() = default;
};
class D : public B, public C
{
public:
D() = default;
};
int main()
{
{ // this crashes
std::vector<std::unique_ptr<C>> v;
std::unique_ptr<D> s1(new D());
v.push_back(std::move(s1));
std::unique_ptr<C> s2(new C());
v.push_back(std::move(s2));
}
{ // this is fine
std::vector<C> v;
D s1;
v.push_back(s1);
C s2;
v.push_back(s2);
}
return 0;
};
</code></pre>
| 0non-cybersec
| Stackexchange |
How to raise a LaTeX warning from within Lua code?. <p>I want to raise a warning from within Lua code. With advice from the <a href="http://wiki.luatex.org/index.php/Writing_Lua_in_TeX#Backslash">LuaTeX wiki</a> and <a href="http://texdoc.net/pkg/clsguide">LaTeX 2𝜀 for class and package writers</a>, I arrived at the following (working) solution:</p>
<pre><code>\documentclass{article}
\begin{document}
Foo
\directlua{
myvar = "\noexpand\\PackageWarning{mypackage}{Hello, I am a warning.}"
tex.print(myvar)
}
\end{document}
</code></pre>
<p>This seems unnecessarily complex, considering that raising an error is as easy as:</p>
<pre><code>\directlua{
tex.error("Hi, I'm an error!")
}
</code></pre>
<p>While I'm aware that <code>tex.error</code> is a generic TeX error and the warning I'm producing is a package-specific warning, I still think for both generic LaTeX warnings (if that exists?) and package-specific warnings (as well as package-specific errors, probably), there should be an easier way. Is there one?</p>
| 0non-cybersec
| Stackexchange |
Playground equipment can be hard to figure out sometimes. | 0non-cybersec
| Reddit |
Crontab not working in Lubuntu 18.04.2. <p><a href="https://pasteboard.co/I6ohPOy.png" rel="nofollow noreferrer">https://pasteboard.co/I6ohPOy.png</a></p>
<p>Double clicking on working.sh works.
Typing /home/paul/Desktop/working.sh works.
Rebooting does NOT make it work.</p>
<p>And also, what is the current way of making that command work from a keyboard combination shortcut, like ctrl+alt+9?</p>
| 0non-cybersec
| Stackexchange |
Shlohmo AMA. Hi I'm Henry aka Shlohmo. I just released an album called The End - [Spotify](https://open.spotify.com/album/4vjDYT5nXgLn12luv3mGjZ?si=Efo1_TvvS3-1sDpPw9JXpQ) l [Apple](https://itunes.apple.com/us/album/the-end/1449046080). Going on tour in Europe and North America next month. Ask me stuff. AMA :)
[bit.ly/shlohmo-tour](http://bit.ly/shlohmo-tour) | 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 |
You have been kidnapped, your kidnappers give you one chance to tell them why they shouldn’t kill you. What do you say, and do you think they let you live?. | 0non-cybersec
| Reddit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.