text
stringlengths 36
35k
| label
class label 2
classes | source
stringclasses 3
values | tokens_length
int64 128
4.1k
| text_length
int64 36
35k
|
---|---|---|---|---|
Deploying SSIS (SQL Server 2012) Project Outside Network. <p>I have built an SSIS project on my PC, and am connecting to an SQL 2012 Server outside our network (via SQL Authentication) while executing the package. It is now time to deploy the project to that same server, but I have hit a wall. While going through the built-in deployment wizard, I enter the Server Name (just as I have entered it to connect to the database withing the connection managers) and get an “untrusted domain” error (it is requiring Window’s Authentication rather than SQL Authentication). </p>
<p>I think it may also be relevant that I am using parameters to set environment-specific values in the project. </p>
<p>How do I deploy an SSIS project to a SQL Server outside the network?</p>
<p>I should also add that in my searches, I did come across someone who was struggling to do this with a VPN connection (with no resolution posted), is that how this is typically done?</p>
| 0non-cybersec
| Stackexchange | 237 | 962 |
Show system of equations with one number and centered. <p>I have an equation which I rearrange in several steps. I want to show this, by having a single numbered equation, which has an aligned equal sign on the right, and the terms left of the equal sign are centered in each line.
So basically it looks like this:</p>
<pre><code> (a+b)^3 =
(a+b)(a+b)^2 =
(a+b)(a+b)(a+b) = (1)
(a^2+2ab+b^2)(a+b) =
(a^3+3a^2b+3ab^2+b^3) =
</code></pre>
<p>I know about aligned, gather and split, but neither seems to achieve, what I want.</p>
<p>Update:
This is no duplicate to the linked question, as I want a fixed sign on the right, and a horizontal centered alignement on the left. The linked question has no horizontal centering in it.</p>
| 0non-cybersec
| Stackexchange | 250 | 766 |
Knit error in RStudio: pandoc conversion failed with error 23. Extension ascii_identifiers is not supported for markdown. <p>Trying to knit a doc into html, RStudio would hang on the conversion to html part. I looked around and it looked like this happened to other folks when they were using an out of date pandoc version. I updated pandoc to 2.8. I received the error in the title. Looking around again, it appeared that v 2.5 seemed stable. I installed that, restarted my computer, and still get the same error.</p>
<p>repex is the default example when you create an RMarkdown file in RStudio: file -> New file -> R Markdown -> html.</p>
<pre><code>---
title: "repexpandocerror23"
author: "Adam Korejwa"
date: "11/22/2019"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for
authoring HTML, PDF, and MS Word documents. For more details on using R
Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that
includes both content as well as the output of any embedded R code chunks
within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to
prevent printing of the R code that generated the plot.
</code></pre>
| 0non-cybersec
| Stackexchange | 440 | 1,527 |
Testing against -n option in BASH scripts always returns true. <p>I am writing a bash script, in which I am trying to check if there are particular parameters provided. I've noticed a strange (at least for me) behavior of <code>[ -n arg ]</code> test. For the following script:</p>
<pre><code>#!/bin/bash
if [ -n $1 ]; then
echo "The 1st argument is of NON ZERO length"
fi
if [ -z $1 ]; then
echo "The 1st argument is of ZERO length"
fi
</code></pre>
<p>I am getting results as follows:</p>
<ol>
<li><p><strong>with no parameters:</strong></p>
<pre><code>xylodev@ubuntu:~$ ./my-bash-script.sh
The 1st argument is of NON ZERO length
The 1st argument is of ZERO length
</code></pre></li>
<li><p><strong>with parameters:</strong></p>
<pre><code>xylodev@ubuntu:~$ ./my-bash-script.sh foobar
The 1st argument is of NON ZERO length
</code></pre></li>
</ol>
<p>I've already found out that enclosing <code>$1</code> in double quotes gives me the results as expected, but I still wonder <strong>why both tests return true when quotes are not used and the script is called with no parameters?</strong> It seems that <code>$1</code> is null then, so <code>[ -n $1 ]</code> should return false, shouldn't it?</p>
| 0non-cybersec
| Stackexchange | 391 | 1,217 |
AITA for telling my husband of 15 years that I never want to have sex again?. My husband and I have been married for about 15 years, dating for much longer. He's my soulmate and I can't imagine being with anyone other than him, he feels the same way. I've never really enjoyed sex that much, but my husband has an incredibly high sex drive so we used to have sex every other day. I've had sex with many partners (upwards of 30) in both relationships and hookups and I've just never really enjoyed it. It's inevitable that you're going to ask, but yes they can make me orgasm, I just don't like orgasming with a partner versus orgasming with myself. It just doesn't feel good to me.
​
There's something about sex that I just don't really like (please don't say I need therapy, it's insulting to think that everybody must LOVE sex. I've also been to therapy before and we've come to the conclusion that it's mostly just a preference). I also don't identify as asexual though, because I do get horny and love masturbating, but I find it more of a release if that makes sense? It's more of an intimate moment with myself. I can try and explain more in the comments if this doesn't really make sense, but it's more a nonsexual release and enjoyment of exploring my own body.
​
As we've gotten older with kids we've stopped having sex as frequently, two to three times a month *at most.* He knows I've never been a huge fan of sex, but I've recently told him that I want to stop having sex. I find it more a chore and I don't really gain much pleasure from it. He was so hurt and upset saying that I'm going to trap him in a loveless and sexless marriage.
​
I told him that if he really wanted to have sex with other people, he could have sex with other women, I just wouldn't wanna know about it. He was so upset and said that I was the only woman he wants to have sex with and that he could never imagine having sex with somebody else. A couple days ago he caught me mastubating (something I do once a day) and he was even more hurt. He said how come you get horny but you don't want to have sex with me? I tried explaining what I typed above but he got even more hurt. We really love each other and have an amazing relationship aside from this, but he thinks I'm an asshole for making an executive decision about our sex life and trapping him in a lifetime without sex. So AITA for having a preference?
​
tl;dr have never really liked sex, decided I still want to masturbate but no longer have sex with my husband
​
edit: everyone seems to think my husband is going to divorce me over this, we've discussed it and divorce isn't even something he's considering. Redactors are so quick to pull the divorce card when in reality there are so many other aspects to a heathy relationship that can't be explain in 3000 characters. Our marriage is strong, supportive and loving in many other ways. I don't feel like we need sex to still love each other | 0non-cybersec
| Reddit | 712 | 2,987 |
secure certain data on my webserver. <p>I've developed a website where people add their sensitive data. Not credit cards, but lets say they share things about themselves which are private and it wouldn't be good if other people see that info. Some of the data is private, some is public.</p>
<p>I want to keep the private data private as in... If someone breaks into the server I want them to be able to extract encrypted versions, rather than plane text about my users' accounts.</p>
<p>What I've thought about so far is the following.
1. SSL certificate (doesn't really protect the data on the server, but the connection)
2. the data which is market private to be encrypted by a series of algorithms (I would imagine that would be heavy on the server)
3. encrypt the php functions which encodes/decodes the data.</p>
<p>I'm not very well prepared for this tho, so I would like to know what is considered best practice for my situation? Am I overcomplicating the process?</p>
<p>The thing is that the app is not generating any income so I can't afford a sys admin, nor I'm able to look after the traffic 24/7. I'm looking for a solution which will take care on its own. Also I can't spend $$$ on sophisticated software that would do the job. I'm looking to bootstrap the app as much as possible. I can afford the SSL cert but not a 600$ Zend Guard for instance.</p>
<p>PS.
I've used codeigniter so far to write my php code if that matters.</p>
<p>Suggestions?</p>
| 0non-cybersec
| Stackexchange | 372 | 1,471 |
How to cross join unnest a JSON array in Presto. <p>Given a table that contains a column of JSON like this:</p>
<pre><code>{"payload":[{"type":"b","value":"9"}, {"type":"a","value":"8"}]}
{"payload":[{"type":"c","value":"7"}, {"type":"b","value":"3"}]}
</code></pre>
<p>How can I write a Presto query to give me the average <code>b</code> value across all entries?</p>
<p>So far I think I need to use something like Hive's <a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-explode" rel="nofollow noreferrer">lateral view explode</a>, whose equivalent is <a href="https://prestodb.io/docs/current/migration/from-hive.html#use-unnest-to-expand-arrays-and-maps" rel="nofollow noreferrer">cross join unnest</a> in Presto.</p>
<p>But I'm stuck on how to write the Presto query for <code>cross join unnest</code>.</p>
<p>How can I use <code>cross join unnest</code> to expand all array elements and select them?</p>
| 0non-cybersec
| Stackexchange | 325 | 960 |
The Torbjorn Balancing Act. As we've learned from Star_'s first impressions video, Torbjorn might be dramatically underpowered at the moment. Much like the Engie in TF2, he needs scrap to build his turrets. Unlike the Engie in TF2, he doesn't have an easy supply to it. Apparently the only way to get it is by killing enemies and cleaning up dead bodies, which puts him in a front-lines position where he's likely much less useful that most direct-combat heroes like Reaper or McCree.
I think the Shoutcast demonstration match showed these problems off as well. We didn't see Torbjorn hardly at all short of his "Kill Dozer" near the end, which required his ult.
So how can we help our poor Svedish Dwarf not be a one-trick pony that's only useful when he gets his ult up? My recommendation would be allowing him to gradually generate metal over time. Not enough that him being in the fight and gathering off of corpses wouldn't still be key, but still allow him to get some lvl 2 or lvl 3 sentries up without his ult.
Thoughts? | 0non-cybersec
| Reddit | 255 | 1,032 |
Flushing numpy memmap to npy file. <p>Is there a method to save a numpy memmap array into a <code>.npy</code> file? Apparently, there is a method to load such an array from a <code>.npy</code> file as follows</p>
<pre><code>data = numpy.load("input.npy", mmap_mode='r')
</code></pre>
<p>but flushing the file is not equivalent to storing it in a <code>.npy</code> format.</p>
<p>If flushing is the only way to go then is there a way to infer the shape of the stored array? I would prefer to have dynamic shape which is automatically stored and retrieved (possibly as memmap again) in another script.</p>
<p>I have searched on various places about this but didn't find get any result. I way to store into <code>.npy</code> I do now is</p>
<pre><code>numpy.save(output.filename, output.copy())
</code></pre>
<p>which defeats the idea of using memmap but preserves the shape.</p>
<p><strong>NOTE:</strong> I know about hdf5 and h5py but I was wondering if there is a pure numpy solution to this.</p>
| 0non-cybersec
| Stackexchange | 305 | 1,004 |
How to show alert message when closing a window?. <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/333665/how-to-prevent-closing-browser-window">How to prevent closing browser window?</a> </p>
</blockquote>
<p>I want to show an alert message "Please logout before closing the window" with an logout button, when an user tries to close the window and after clicking on logout button the window can be closed. How to achieve this?</p>
| 0non-cybersec
| Stackexchange | 139 | 494 |
An application of Holder's Inequality. <p>Suppose <span class="math-container">$1\leq p,q\leq \infty$</span> and <span class="math-container">$1/p+1/q=1$</span>. Let <span class="math-container">$f\in\mathcal{L}^p(E)$</span>. Show that <span class="math-container">$f=0$</span> a.e. if and only if
<span class="math-container">\begin{align*}
\int_E f\cdot gdm=0
\end{align*}</span>
for all <span class="math-container">$g\in \mathcal{L}^q(E)$</span>. Hint: Choose a smart <span class="math-container">$g$</span> so that <span class="math-container">$\int_Ef\cdot gdm=\|f\|_p^p$</span>.</p>
| 0non-cybersec
| Stackexchange | 233 | 599 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
iOS Firebase Crash Reporting - Error running build script. <p>I get the following error when running the script to upload symbol files (everytime I try and build my project):</p>
<blockquote>
<p>upload-sym-util.bash:351: error: symbolFileUploadLocation: The API Key and the authentication
credential are from different projects.</p>
</blockquote>
<p>Here is my build script:</p>
<pre><code>if [ "$CONFIGURATION" == "Debug" ]; then
GOOGLE_APP_ID=<app-id>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey-Dev.json
else
GOOGLE_APP_ID=<app-id>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey.json
fi
</code></pre>
<p>Things I've done/checked:</p>
<ol>
<li>The <code>GOOGLE_APP_ID</code> and <code>CrashReportingKey*.json</code> are associated with the same project.</li>
<li>My <code>GoogleService-Info*.plist</code> files have the <code>API_KEY</code> field.</li>
<li>Checking "Run script only when installing" box, which allows me to run the app, but doesn't actually run the script in a development environment. So crashes are sent to Firebase, but they aren't symbolicated.</li>
</ol>
<p>I'm open to any ideas. Thanks!</p>
| 0non-cybersec
| Stackexchange | 422 | 1,248 |
Why not seeing shell globs as a "dialect" of regex?. <p>I often confuse Bash 3.x shell globs:</p>
<pre><code>? # Match any single character.
* # Match any string of characters (up until the asterisk).
[set] # Match any character in set (but not the entire set itself).
[!set] # Match any character not in set.
</code></pre>
<p>with regex (especially <a href="https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions" rel="nofollow noreferrer">PCRE</a>).</p>
<p>My question is why not seeing these as "Bash regex" (just as we have "JavaScript regex" for example)?</p>
<p>Why not seeing these as just another "dialect" of regex?</p>
<p>Of course it would be unorthodox, but I'm not sure there isn't any formal-logical reason not to.</p>
| 0non-cybersec
| Stackexchange | 247 | 770 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
What tape backup device can read a DC 2120 XL cartridge?. <p>While preparing to move to a new house, I came across two forgotten tape backup mini cartridges from 1996. I know they hold the only backup I made of my original Remote Access BBS, with all my original Star Trek themed ANSI art, DOS/OS2 shareware, and 1000+ users.</p>
<p>I'd love to be able to resurrect this time-capsule, but what hardware device can actually read this?</p>
<p>I think I originally used a 50pin Wide-SCSI external backup, narrower & longer than an external CD-Rom drive (caddy-style). Backup restoration software I'm not worried about as I'm certain I can find something on Linux to suffice, I just need to find the hardware ;)</p>
<p>Here is the mystery cartridge in question:</p>
<p><img src="https://i.stack.imgur.com/xqeOU.jpg" alt="DC 2120 XL Minicartridge"></p>
<p>The cartridge size is:</p>
<ul>
<li>3 3/16"(w) x 2 3/8"(h) x 5/8"(d), or</li>
<li>8cm(w) x 6cm(h) x 1.5cm(d)</li>
</ul>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange | 325 | 997 |
mongoDB: querying for a document that has an object reference. <p>I have a widgets collection that has records like this:</p>
<pre><code>{ "_id" : ObjectId("55a6abe193819c033d4d755a"), "name" : "widget1"}
{ "_id" : ObjectId("55a6abe193819c033d4d755a"), "name" : "widget2", "loc" : ObjectId("55a69475da314d9984fc6201") }
</code></pre>
<p>I also have a locations collection that looks like this: </p>
<pre><code>{ "_id" : ObjectId("55a69475da314d9984fc6201"), "abbrev" : "CAN", "description" : "Canada" }
{ "_id" : ObjectId("55a6948eda314d9984fc6202"), "abbrev" : "USA", "description" : "United States" }
{ "_id" : ObjectId("55a69496da314d9984fc6203"), "abbrev" : "MEX", "description" : "Mexico" }
</code></pre>
<p>If I want to find all widgets that are located in Canada, using the Objectid, I know I can do this: </p>
<pre><code>> db.widgets.find( { loc: ObjectId("55a69475da314d9984fc6201")})
{ "_id" : ObjectId("55a6abe193819c033d4d755a"), "name" : "widget2", "loc" : ObjectId("55a69475da314d9984fc6201") }
</code></pre>
<p>But what if I want to search for locations not using the objectid but the abbreviation or the description? How would I do that? </p>
| 0non-cybersec
| Stackexchange | 439 | 1,169 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
TIFUpdate: TIFU by possibly tearing the cords of my eyeball. [I'M OK! :D]. Just got back from the optometrist in Peterborough!
The eyedrops made my pupils dilate to the point where there was like a 2mm ring around my pupil, nothing more. Couldn't see shit.
The optometrist said that what happened was most likely inflammation caused by dryness in the eye.
The cause of this? My hypothyroidism.
I was given some eyedrops to take if it happens again.
I have two more appointments for this on the 19th of April and on the 1st of May.
tl;dr: Why would you need one?
Actual tl;dr: Had Optic Neuritis, but it was NOT linked to MS.
-----------------------------------------------
Previous update thread: http://www.reddit.com/r/tifu/comments/1b5dhb/tifupdate_tifu_by_possible_tearing_the_cords_of/
-----------------------------------------------
Original post: http://www.reddit.com/r/tifu/comments/1b0jy2/tifu_by_possibly_tearing_the_cords_of_my_eyeball/ | 0non-cybersec
| Reddit | 286 | 962 |
Python: sending data between two computers via sockets. <p>I am working on a script that would transmit the data between two distinct computers with access to the internet. I am using python's socket standard module. It works fine when I run both client and server on single computer but I am not able to make the things work when they run on different computers. </p>
<p>Here is a part of my server code:</p>
<pre><code>import socket, time,os, random
class Server():
def __init__(self,Adress=('',5000),MaxClient=1):
self.s = socket.socket()
self.s.bind(Adress)
self.s.listen(MaxClient)
def WaitForConnection(self):
self.Client, self.Adr=(self.s.accept())
print('Got a connection from: '+str(self.Client)+'.')
s = Server()
s.WaitForConnection()
</code></pre>
<p>And here is a part of my client code:</p>
<pre><code>import socket
class Client():
def __init__(self,Adress=("Here is the IP of the computer on which the \
server scrip is running",5000)):
self.s = socket.socket()
self.s.connect(Adress)
c = Client()
</code></pre>
<p>When I run these scripts on two different computers with internet access the client is unable to connect and raises an error and the server is waiting for connections forever. </p>
<p>What am I doing wrong?</p>
| 0non-cybersec
| Stackexchange | 382 | 1,337 |
Using ActionCable with multiple identification methods. <p>I develop a Ruby on Rails 5.1 application using ActionCable. <a href="https://rubytutorial.io/actioncable-devise-authentication/" rel="noreferrer">User authentification via Devise</a> works fine for several channels. Now, I want to add a <strong>second type of channels</strong> which does not require any user authentification. More precisely, I would like to enable anonymous website visitors to chat with support staff.</p>
<p>My current implementation of <code>ApplicationCable::Connection</code> for authenticated users looks like this:</p>
<pre><code># app/channels/application_cable/connection.rb
module ApplicationCable
class Connection < ActionCable::Connection::Base
identified_by :current_user
def connect
self.current_user = find_verified_user
end
protected
def find_verified_user
user = User.find_by(id: cookies.signed['user.id'])
return user if user
fail 'User needs to be authenticated.'
end
end
end
</code></pre>
<p>Anonymous users will be identified by some random UUID (<a href="https://ruby-doc.org/stdlib-2.2.3/libdoc/securerandom/rdoc/SecureRandom.html#method-c-urlsafe_base64" rel="noreferrer"><code>SecureRandom.urlsafe_base64</code></a>).</p>
<p><strong>Question:</strong></p>
<p>How do I best add this new type of channels? Could I add a boolean flag <code>require_authentification</code> somewhere, override it in my inherited channel class for anonymous communication, and switch the identification method in <code>Connection</code> depending on this attribute? Or would I rather have to implement a completely new module, say <code>AnonymousApplicationCable</code>?</p>
| 0non-cybersec
| Stackexchange | 478 | 1,721 |
Fucking wife's hot friend. A guy had a crush on his wife's hot friend, so he invited her for a camping trip.
while camping he wanted to get rid of his wife so he told her:Honey, why don't you go grab us some flowers? as soon as the wife went.
husband: I'll give you 20$ for a blowjob
friend: No
husband:50$
friend:No
husband:75$
random stranger passing by:75$ for a blow job!! you are a moron man, there is a lady picking flowers down there who let me fuck her in the ass for 2$ | 0non-cybersec
| Reddit | 145 | 485 |
[Build Complete] First build, done by my dad and me.. I am a teenager who has had interest in building a PC for a while now. And since I have a lot of time now with it being summer I decided to approach my dad about the whole thing. He said he'd be willing to do it with me, so we picked our parts over a few days. We wanted to go with more or less the cheapest build possible that was still practical and we came out with this:
[PCPartPicker part list](http://ca.pcpartpicker.com/p/sjdJdC) / [Price breakdown by merchant](http://ca.pcpartpicker.com/p/sjdJdC/by_merchant/)
Type|Item|Price
:----|:----|:----
**CPU** | [AMD 2650 1.45Ghz Dual-Core Processor](http://ca.pcpartpicker.com/part/amd-cpu-sd2650jahmbox) | $34.00 @ DirectCanada
**Motherboard** | [ASRock AM1B-M Micro ATX AM1 Motherboard](http://ca.pcpartpicker.com/part/asrock-motherboard-am1bm) | $32.75 @ Vuugo
**Memory** | [Patriot Viper Xtreme 4GB (1 x 4GB) DDR3-1600 Memory](http://ca.pcpartpicker.com/part/patriot-memory-px34g1600c11) | $29.35 @ DirectCanada
**Storage** | [Patriot Blaze 60GB 2.5" Solid State Drive](http://ca.pcpartpicker.com/part/patriot-internal-hard-drive-pb60gs25ssdr) | $46.80 @ shopRBC
**Case** | [Fractal Design Core 1100 MicroATX Mini Tower Case](http://ca.pcpartpicker.com/part/fractal-design-case-fdcacore1100bl) | $54.75 @ Vuugo
**Power Supply** | [EVGA 400W ATX Power Supply](http://ca.pcpartpicker.com/part/evga-power-supply-100n10400l1) | $37.25 @ Vuugo
**Keyboard** | [Logitech MK120 Wired Slim Keyboard w/Optical Mouse](http://ca.pcpartpicker.com/part/logitech-keyboard-920002565) | $11.01 @ DirectCanada
| *Prices include shipping, taxes, rebates, and discounts* |
| Total (before mail-in rebates) | $255.91
| Mail-in rebates | -$10.00
| **Total** | **$245.91**
| Generated by [PCPartPicker](http://pcpartpicker.com) 2015-08-16 11:32 EDT-0400 |
After few weeks of waiting for stuff to get here we built the thing yesterday. I did roughly 75% of the building with my dad helping out when some elbow grease was required. We finished the build in about two and a half hours and I installed Linux Mint on it. We also plan on slowly upgrading it over time instead of building other builds from scratch when we want do do more of this stuff.
[Here](http://imgur.com/a/Lvems) are the pictures of parts taken by my dad. Anyway I hope you found this interesting and feel free to leave advice and feedback on the build in the comments. I have a lot of learning to do. | 0non-cybersec
| Reddit | 793 | 2,474 |
HDD/ATA password incorrect after system crash. <p><strong>Initial situation</strong></p>
<p>I have an Acer Aspire V 15 Nitro with Win 8.1 and 2 hard drives.
mSATA Liteon SSD (256 GB) - operating system
Samsung SSD 840 EVO 500GB - Data</p>
<p>More than a year ago I set a password in the BIOS for both hard disks and the BIOS itself (the same for all three). When switching on I was asked for the passwords and after input, the hard disks were unlocked and the system started.</p>
<p>My problem and how it happened. I have working for a while as always and around noon the system hung/crashed, windows not responding then I did a hard reset (pressed long the power key). After that I have restarted and as with every start, the passwords promt for the hard disks pops up. I could unlock the first hard disk, then entered the password for the second hard disk and I get "Incorrect Password" message. Since then I can't unlock the hard drive.</p>
<p>It's been a week now and since then I can't unlock the hard drive and I've read and tried many things but without success.</p>
<p><strong>Summary Samsung Support</strong></p>
<p>I have contact the Samsung Support, that's the result.
They claim that they didn't have something like this yet and just offer me to send the SSD to them and they delete it completely after that I can use it again. However, no option for me I need the data.</p>
<p>The ATA security concept knows two different passwords, the user password and the master password. I got this back on the request of the master password:</p>
<blockquote>
<p>Unfortunately, we have no instruction on how the ATA security concept
works. Please contact the motherboard manufacturer directly and ask
how to unlock the hard drive. Unfortunately we don't have a special
tool or master passwords. We can only unlock the SSD in our Repair
Center.</p>
</blockquote>
<p>But according to <a href="https://www.samsung.com/us/pdf/memory-storage/840PRO_25_SATA_III_Spec.pdf" rel="nofollow noreferrer">this document</a> there is such a password<br>
At point 5.2.1 SECURITY (page 11) the master password is mentioned.</p>
<blockquote>
<p>5.2.1 SECURITY mode default setting
The 840 PRO is shipped with master password set to 20h value (ASCII blanks) and the lock function disabled.
The system manufacturer/dealer may set a new master password by using the SECURITY SET PASSWORD command, without enabling the lock function.</p>
</blockquote>
<p>However, the support did not react directly to the document.</p>
<p><strong>My attempts to unlock the SSD with hdparm</strong></p>
<pre><code>ubuntu@ubuntu:~$ sudo hdparm -I /dev/sdb
/dev/sdb:
ATA device, with non-removable media
Model Number: Samsung SSD 840 EVO 500GB
Serial Number: S1DHNSAD903633N
Firmware Revision: EXT0BB6Q
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x0039)
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 130 130
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 131040
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 976773168
Logical Sector size: 512 bytes
Physical Sector size: 512 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 476940 MBytes
device size with M = 1000*1000: 500107 MBytes (500 GB)
cache/buffer size = unknown
Nominal Media Rotation Rate: Solid State Device
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 1 Current = 1
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
* Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* WRITE_{DMA|MULTIPLE}_FUA_EXT
* 64-bit World wide name
Write-Read-Verify feature set
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Phy event counters
* READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Asynchronous notification (eg. media change)
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
* reserved 69[4]
* DOWNLOAD MICROCODE DMA command
* SET MAX SETPASSWORD/UNLOCK DMA commands
* WRITE BUFFER DMA command
* READ BUFFER DMA command
* Data Set Management TRIM supported (limit 8 blocks)
Security:
Master password revision code = 65534
supported
enabled
locked
not frozen
not expired: security count
supported: enhanced erase
Security level high
2min for SECURITY ERASE UNIT. 8min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50025388a0031dde
NAA : 5
IEEE OUI : 002538
Unique ID : 8a0031dde
Checksum: correct
</code></pre>
<p>This <a href="https://serverfault.com/questions/712849/how-to-unlock-a-ssd-disk-with-hdparm/733784#733784">article</a> served as help.</p>
<p>I have tried all security-unlock and disable commands with and without --user-master m, and pass the password also as scancode.</p>
<pre><code>sudo hdparm --security-unlock $(printf '\x12\x12\x12\x12\x12\x12') /dev/sdb
</code></pre>
<p>Anything without success, always get SG_IO: bad/missing sense data</p>
<pre><code>ubuntu@ubuntu:~$ sudo hdparm --security-unlock "password" /dev/sdb
security_password: "password"
/dev/sdb:
Issuing SECURITY_UNLOCK command, password="password", user=user
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 40 01 21 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
</code></pre>
<p>This is what I found about the code</p>
<pre><code>70 response code=Current information (about the error etc.)
00
05 sense code=Illegal Request
00 00 00 00 (not valid)
0a additional 10 bytes
04 51 40 01 (command specific)
21 04 additional sense code=Unaligned Write Command
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
</code></pre>
<p>Master passwords I found and tested in every possible length from 1 - 32 characters and also as ScanCode:</p>
<ul>
<li>my password</li>
<li>Blank (" ")</li>
<li>"ttttttttttttttttttttttttttttttttttttttttttttt" (32 times t)</li>
<li>h20insyde</li>
</ul>
<p>Since the security level of the SSD is set to "high" it means that you can unlock the hard disk with the master password without losing the data and according to the master password revision code = 65534 the master password has not been changed and should still have the default value.</p>
<p>I also built the Samsung SSD into an identical notebook and a computer all without success.</p>
<p>The university of texas has published an interesting article <em><a href="https://security.utexas.edu/education-outreach/BreakingATA" rel="nofollow noreferrer">Breaking ATA Password Security</a></em>, they could remove the ATA Password with A-FF Repair Station but I can not try the software because the website is offline, via the web archive I could download the software but you need a login and this can not be created.</p>
<p>I hope one of you can help me to unlock the SSD.</p>
| 0non-cybersec
| Stackexchange | 2,548 | 8,663 |
multi line equation with full left brace, small right brace and text at right bottom of right brace. <p>I want to write a three line equation with left curly brace for all three, right curly brace for bottom two ones and some text at right bottom of right curly brace. All with proper alignment. I wrote following code.</p>
<pre><code>\documentclass{article}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{flexisym}
\begin{document}
\begin{equation*}
\begin{aligned}
K_{\mathbb{A}_{Ui}} =\begin{cases}
D =\ g^{ \frac{ (\alpha + r) }{\beta} }\\
\left.\begin {aligned}
&D_j &=\ &g^r . H(j)^{r_j} \\
&D_j\textprime &=\ &g^{r_j}
\end{aligned}\right\} \forall j \in \mathbb{A}_{Ui}
\end{cases}
\end{aligned}
\end{equation*}
\end{document}
</code></pre>
<p>It is giving some problems.</p>
<ol>
<li><p>Second and Third lines are aligned but they are not aligned with the first one. I want alignment to occur at start of "D", "=" and "g" for all three.</p></li>
<li><p>Right now, the text at right of right curly brace is coming at center. I want it to shift down and come at bottom.</p></li>
</ol>
<p>Please help. Thanks in advance.</p>
| 0non-cybersec
| Stackexchange | 395 | 1,291 |
Decorator or Facade. <p>I face an issue if to use a decorator or facade pattern to accomplish my needs.</p>
<p>Imagine a client wants to play a video. He can use the interface </p>
<pre><code>public interface IVideoPlayer
{
// Prepares everything to set up and plays the video
void Play();
}
</code></pre>
<p>The client should not be concerned with the preparation, so the interface's method's summary states that preparation is done by the <code>Play()</code> method.</p>
<p>Preparation may include different things like connecting to the internet, logging in to the service and so on. There are different preparation steps for different systems.</p>
<h1>Facade pattern</h1>
<p>I could implement <code>IVideoPlayer</code> using the facade pattern as follows</p>
<pre><code>VideoPlayerFacade : IVideoPlayer
{
ctor(...)
void Play()
{
_internetConnection.Connect();
_loginService.Login();
_actualVideoPlayer.Play();
}
}
</code></pre>
<p>What I dislike with this approach:</p>
<ul>
<li>The preparation (connecting, logging in) seems more like an addition to the actual playing algorithm, which leads me more to the decorator pattern. I rather understand the facade pattern to compose some "equal level" steps to achieve a common goal, like <code>CreateCar()</code> delegating to <code>CreateEngine()</code>, <code>CreateCarBody()</code> and so on.</li>
<li>I face a naming issue because the interface the type of <code>_actualVideoPlayer</code> implements could also be named <code>IVideoPlayer</code>, because it IS the actual video player, which also guides me to the decorator pattern. I would need two almost identical interfaces (one with and one without preparation) with quite similar names, which I cannot imagine at the moment.</li>
</ul>
<h1>Decorator pattern</h1>
<p><code>IVideoPlayer</code> could be implemented with the actual playing algorithm as follows</p>
<pre><code>VideoPlayer : IVideoPlayer
{
void Play()
{
// do stuff and algorithms
}
}
</code></pre>
<p>The preparation could be done in a decorator as follows</p>
<pre><code>PreparatingVideoPlayer : IVideoPlayer
{
ctor(...)
void Play()
{
_internetConnection.Connect();
_loginService.Login();
_decoratee.Play();
}
}
</code></pre>
<p>What I dislike with this approach:</p>
<ul>
<li><p>Actually the <code>VideoPlayer</code> violates the LSP because it does not conform to the interface by not doing all preparation in the <code>Play()</code> method, which rather leads me to the facade pattern. Or doesn't it violate the LSP because it will always be decorated by the <code>PreparatingVideoPlayer</code> when it is injected into the system?</p></li>
<li><p>What if another client wants to play video without preparation (because the client knows everything is prepared or prepared everything himself)? He wouldn't be able to because letting <code>IVideoPlayer</code> be injected will always result in getting the <code>PreparatingVideoPlayer</code>, which would lead me to the facade pattern again.</p></li>
</ul>
<h1>Conclusion</h1>
<p>So which pattern is more appropriate or are these patterns appropriate at all? Are my concerns valid?</p>
| 0non-cybersec
| Stackexchange | 883 | 3,239 |
proving the composition of two linear transformations is a linear transformation. <p>$U$ and $V$ are vector spaces, their Cartesian product is defined by</p>
<p>$$U\times V = [(u,v): u \in U, v \in V]$$</p>
<p>addition and multiplication defined by</p>
<p>$$(u_1,v_1) + (u_2,v_2) = (u_1+u_2, v_1+v_2)$$
$$r(u,v) = (ru,rv)$$</p>
<p>Let the $T_1: V \rightarrow W$ and $T_2:V\rightarrow W$ be linear transformations, and define a transformation $S: V \times V \rightarrow W \times W$ by</p>
<p>$$S[(v_1,v_2)] = (T_1(v_1),T_2(v_2)$$</p>
<p>how do I go about proving the linear transformation here? I know the idea behind proving linear transformations for composition when they are $T_1(T_2(v_1))$ for example but I am not sure how to prove it in this case.</p>
<p>To prove addition I have gotten this far but I don't know where to go from here:</p>
<p>$$S[(v_1,v_2)+(v_3,v_4)] = S[(v_1,v_2)] + S[(v_3,v_4)]$$
$$=[T_1(v_1),T_2(v_2)] + [T_1(v_3),T_2(v_4)]$$</p>
| 0non-cybersec
| Stackexchange | 404 | 965 |
Tip: If you're considering getting your first dog and you think you want a dog that's "really smart," trust me, you don't.. A really smart dog will drive you out of your mind, especially if you're new to dog ownership. You think he'll be smart in a way that benefits you, but no. He'll be smart in a way that benefits *him.* Every. Time.
Case in point: I wanted to teach my sheltie/eskimo Henry to ignore barking dogs. He learned it really fast. Then he realized that in order for him to get a treat for ignoring a barking dog, that dog has to bark first. So now he taunts other dogs until they bark, then he runs to me and sits like an angel with an "I'd like my treat now" expression. Jerk. | 0non-cybersec
| Reddit | 183 | 699 |
Name that book! Trying to remember the name of a series I read a few years ago.. G'day, I would love some help trying to find the name of a series I read a few years ago. Thanks in advance.
The book:
It was a near future scifi series with three parts I believe. It was based around a future where everyone has nanobots in and on them to enhance certain abilities. The world had two factions, the larger tech world who loved the nanobots and were always after the next best app which would provide a new experience and oceania a group of people in the pacific who refused to use the nanobot tech.
The story is set around a development team who are trying to create the next best app which has some huge ramifications.
They use augmented reality to visually code with shapes. The main characters name may have been 'Nat', but I might be mistaken.
I don't want to say too much in case it is spoilery.
Any hints or suggestions for the book or series name would be greatly appreciated.
All the best,
Adam | 0non-cybersec
| Reddit | 238 | 1,007 |
The Green Boy With the Snake Eyes. I used to live in a small (ish) town it Wisconsin. I lived on a dead end road, but it wasn't a scary street. I drew on my street with calk, I road my bike up and down the short road in the summer time, and the other kids and I would play soccer in the street. It was a nice place to live, but my house always felt... off.
I don't know much about the history of the house, but I do know that the house was built in the late 40's or early 50's. And the previews owners were a sweet old couple. That's all I know.
No one ever wanted to spend the night more than once or twice. The attic was boarded up for an unknown reason. I never felt completely alone in the house, but I never expected anything as terrifying as the following story.
In order to fully understand the story you need to understand the layout of my house. The house was two floors, including the basement. The kitchen and living room were connected, And there was a hallway that connected all the rest of the rooms. My and my sisters room was at the end of the hall close to the living room ad kitchen, and my parents room was way at the other end of the hall.
I was around 4 or 5 when this happened. I was sleeping On my side or the room. I don't remember why I woke up, but I did. I remember looking towards the center of the room and seeing a boy at the side of my bed. But he didn't look like a normal boy. I know this sounds crazy, but he was glowing green, And his had slit peoples like a snake or a cat. He didn't say anything, her just stared and smiled at me. I remember his smile being to big for his face. Like the clown from american horror story, freak show.
I didn't scream, or move, I just sat staring back at him. With no warning he bolted out of my room. I immediately Threw off my covers and ran after him. As i ran out into the hallway, I saw a green glow wiz into my parents room. I ran into my parents room after him. When I got there I saw him sitting between my mom and dad gripping the covers and smiling widely, still just staring at me, but this time it felt more sinister than when he was in my room.
"Mommy, Daddy there's a boy in your bed" I yelled. As soon as i did so he Faded away. When he did, it looked like when you throw sand in the air and it dissipates. My mom bolted up and looked to her side. I don't remember the rest of the night.
When i was older my mom told me she got really scared when i yelled because seconds before hand She felt a small child crawl in bed with her. | 0non-cybersec
| Reddit | 614 | 2,523 |
Add a date picker to system.xml on custom module. <p>As stated in the subject, I am trying to add a date field with its date picker in the System > Configuration area for a custom module (thus using etc/system.xml).</p>
<p>I tried to get inspiration from the thread below :
<a href="https://stackoverflow.com/questions/3054429/magento-add-a-button-to-system-xml-with-method-attached-to-it">Magento - Add a button to system.xml with method attached to it</a></p>
<p>but no success.</p>
<p>I'm sure this is a question of creating the right block or method to create a custom html field but I cannot read thru the Magento Matrix :)</p>
<p>I am stuck at the step where I need to code the class (Datefield.php): </p>
<pre><code> <?php
class Namespace_Module_Block_Datefield extends Mage_Adminhtml_Block_System_Config_Form_Field {
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
// ----> Am I wrong in calling ..._Abstract? Should I call Varien_Data_Form_Element_Date? I've tried but no success either...
$this->setElement($element);
$html = // ------------------> what to put here? Call a block or some other method?
->setFormat('d-m-Y')
->setLabel($this->__('Choose date'))
->toHtml();
return $html;
}
}
?>
</code></pre>
<p>Do you have a trick on how to do that ?</p>
<p>Thanks a lot.
Hervé</p>
| 0non-cybersec
| Stackexchange | 460 | 1,532 |
A mysterious sickness. On monday, the day before yesterday, I went to work in the morning as usual. I biked the same route to work, at the same time, on the same bicycle, as I have every day in the past two years. I drank the same coffee, dispensed from the same coffee machine, out of the same cup, as I have every day in the past two years. I checked my email, I checked Reddit, and I started work, the same way as I have every day in the past two years.
I'm 27 years old.
I started to feel a bit nauseous, so I went to the bathroom to clear my head. Once there, I found I was *very* nauseous, and wanted to puke, but I couldn't. I wanted to go back to the office to have somebody drive me home, but I couldn't manage to get out of the bathroom stall. My balance was shot so I couldn't walk or stand. I tried puking again and again, but my body refused to. I started losing my balance even when crouched down or seated, and my head hit the bathroom wall with a hollow **thunk**.
**Thunk**, **thud**, *groaaan*, **thunk**, **THUNK**, *uuuuughhh*...
A colleague heard the noise, came in, and helped me up and out of the bathroom. He plunked me into a chair. I couldn't talk. I could see, I recognized faces, but there was no meaning. People asked me questions, and I couldn't answer them. I tried to form words, but I don't know if the words made sense. Doesn't matter, because my mouth didn't make the right sounds anyway.
An ambulance was called. I remember the stretcher, the cold outside air, and the rivets in the metal side or ceiling of the ambulance.
In the hospital: more questions, I don't want to answer. It's so hard. I keep drifting off. The doctors snap their fingers in my face and slap my cheeks to keep my attention. It doesn't work. They take vial after vial after vial of blood for testing. They catheterize me for a urine sample. They keep asking questions, shine flashlights in my eyes, and keep prodding. They're so pushy - if they just gave me a chance to gather my thoughts... but my thoughts drift off to oblivion...
I wake up, and the world is a little less confusing. Talking is still difficult, but I *think* I know when I don't make any sense and have to try again.
I steadily feel better. The doctors come back around lunch-time the next day. Must be tuesday, because I was admitted on monday. A team of 6 doctors form a semicircle around my bed, and look down upon me. I ask them if they know what the problem is.
They don't have the slightest idea, not even a plausible theory.
I ask if I may go home. They tell me I am free to go, so I grab my things, walk to the bus stop, and take the bus home. | 0non-cybersec
| Reddit | 683 | 2,647 |
Projective cover of the trivial $\mathbb{k}G$ module $\mathbb{k}$.. <p>What I've been trying to understand is the projective cover of the trivial module $\mathbb{k}$ over the group algebra $\mathbb{k}G$, for $G$ a finite group and $\mathbb{k}$ some field of positive characteristic $p$. In that category, we know that the projective cover of a module always exists (and is unique up to isomorphism). But in practise, when want to write down that module then what do we have?</p>
<p>If someone notices the construction in the proof of it, then realises that this projective cover is nothing but the direct sum of the indecomposable projective modules, occurring in the decomposition of the module after has been factored out by its radical, which <em>by definition</em> is a sum of some simple modules. In the trivial case of (the trivial module) $\mathbb{k}$, one natural candidate for the projective cover, should be the group algebra $\mathbb{K}G$ itself along with the augmentation homomorphism. It is free $\mathbb{K}G$-module, hence projective and since $\mathbb{k}$ is simple it's just enough to prove that is indecomposable. How do we prove/disprove the latter though? Can you help me out? Also, if something doesn't make sense please do let me know!</p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange | 314 | 1,282 |
Can an enriched functor be expressed as a colimit of representable functors?. <p>Suppose that $\mathcal C$ is an ordinary category and $F:\mathcal C^{op}\longrightarrow Set$ a functor. Then, we can form the category $\mathcal C/F$ as follows : each object is a morphism of functors from $h_X\longrightarrow F$, where $X\in \mathcal C$ and $h_X=Hom(\_\_,X):\mathcal C^{op}\longrightarrow Set$ is the representable functor. </p>
<p>In other words, we are looking at the category of pairs $(X,x)$, where $X\in \mathcal C$ and $x\in F(X)$. This is clear from Yoneda lemma. </p>
<p>Then, we can write down the functor $F$ as a colimit : </p>
<p>$$F=\underset{(X,x)\in \mathcal C/F}{colim}\textrm{ }h_X $$</p>
<p>My question is whether we have a version of this for enriched categories. In other words, suppose that $\mathfrak D$ is a category enriched over a closed symmetric monoidal category $(\mathcal V,\otimes,1)$. </p>
<p>Let $\mathcal F:\mathfrak D^{op}\longrightarrow \mathcal V$ be an enriched functor. For each $X\in \mathfrak D$, we already have a representable functor:</p>
<p>$$H_X: \mathfrak D^{op}\longrightarrow \mathcal V\qquad H_X(Y):=\mathfrak D(Y,X)$$ for any $Y\in \mathfrak D$. </p>
<p>Can we construct a category $\mathfrak D/\mathcal F$ in this case and express $\mathcal F$ itself as a colimit of the form:</p>
<p>$$\mathcal F = \underset{??}{colim}\textrm{ }H_X$$</p>
<p>Of course the key must be an enriched form of Yoneda lemma. In the case of enriched categories, there are 2 forms of Yoneda lemma, the weak form and the strong form. I would prefer if the answer can be given with the help of the weak form. </p>
<p>Of course it would be great if there is a reference where this formula is clearly explained. </p>
<p>Thanks! </p>
| 0non-cybersec
| Stackexchange | 540 | 1,767 |
Instance Angular 2 Component Two times. <p>I'm trying to learn Angular 2, so I was making some <code>hello world</code> examples.
Here is my code:</p>
<p><strong>boot.ts</strong></p>
<pre><code>import {bootstrap} from 'angular2/platform/browser'
import {AppComponent} from './app.component'
import {DataService} from './app.dataservice'
bootstrap(AppComponent, [DataService]);
</code></pre>
<p><strong>index.html</strong></p>
<pre><code>...
<body>
<hello-world>Loading...</hello-world>
<hello-world>Loading...</hello-world>
</body>
...
</code></pre>
<p><strong>app.component.ts</strong></p>
<pre><code>import {Component} from 'angular2/core';
import {DataService} from './app.dataservice'
@Component({
selector: 'hello-world',
template: '<h1>Hello {{ item }}</h1>'
})
export class AppComponent {
items: Array<number>;
item: number;
constructor(dataService: DataService) {
this.items = dataService.getItems();
this.item = this.items[0];
}
}
</code></pre>
<p><strong>app.dataservice.ts</strong></p>
<pre><code>export class DataService {
items: Array<number>;
constructor() {
this.items = [1,2,3];
}
getItems() {
return this.items;
}
}
</code></pre>
<p>The code seems to work fine since the first <code>hello-world</code> custom tag is being correctly showed with the code inside the <code>ts</code>. However, the second <code>hello-world tag is not transformed</code>. Only one custom element is shown.</p>
<p>Can't be more than 1 custom tag? How can I do that?</p>
<p><strong>EDIT</strong></p>
<p>I have added the new import inside app.components.ts</p>
<pre><code>import {ByeWorld} from './app.byeworld';
</code></pre>
<p>and in <strong>app.byeworld.ts</strong></p>
<pre><code>import {Component} from 'angular2/core';
@Component({
selector: 'bye-world',
template: '<h1>Bye World</h1>'
})
export class ByeWorld {
constructor() {
}
}
</code></pre>
| 0non-cybersec
| Stackexchange | 714 | 2,044 |
Proving that every boolean function can be represented as a propositional logic formula.. <p>I'm currently struggling a bit on this question. I tried induction on the number of parameters. </p>
<p>Induction.</p>
<p>Start $n=0$:</p>
<p>Let $f$ be a boolean function with $0$ parameters.</p>
<p>2 Cases: $f()=0$ or $f()=1$</p>
<p>For case 1 we have a formula like $a \land \lnot a$</p>
<p>Case 2 formula $a \lor \lnot a$</p>
<p>Now the induction step is where i am struggling:</p>
<p>$f(x_1,x_2,...x_n,x_{n+1})=1$ or</p>
<p>$f(x_1,x_2,...x_n,x_{n+1})=0$</p>
| 0non-cybersec
| Stackexchange | 236 | 565 |
Let $\phi : G\twoheadrightarrow H$. Suppose $W, K$ are conjugate in $H$. Show $\phi^{-1}(W), \phi^{-1}(K)$ are conjugate in $G$.. <p>In trying to answer <a href="https://math.stackexchange.com/q/1854193/104041">this question</a> on MSE, I got stuck. This taunts me because I think I should be able to do it.</p>
<h2>The Question:</h2>
<blockquote>
<p>Let <span class="math-container">$\phi : G\twoheadrightarrow H$</span> be an epimorphism of groups. Suppose <span class="math-container">$W$</span> and <span class="math-container">$K$</span> are conjugate in <span class="math-container">$H$</span>. Show that <span class="math-container">$\phi^{-1}(W)$</span> and <span class="math-container">$\phi^{-1}(K)$</span> are conjugate in <span class="math-container">$G$</span>.</p>
</blockquote>
<h2>My Attempt:</h2>
<p><a href="https://math.stackexchange.com/questions/1854193/pre-image-of-conjugate-subgroups?r=SearchResults#comment3795230_1854193"><em>Following @DerekHolt's comment . . .</em></a></p>
<blockquote>
<p>It is true and straightforward <span class="math-container">$g\phi^{-1}(W)g^{\color{red}{-1}} = \phi^{-1}(K)$</span>. Just do the normal thing and show that any element of the LHS is in the RHS and vice versa.</p>
</blockquote>
<p><em>So here goes . . .</em></p>
<p>Let <span class="math-container">$h\in g\phi^{-1}(W)g^{-1}$</span> for some <span class="math-container">$g\in G$</span>. Then there exists a <span class="math-container">$w\in W$</span> for which <span class="math-container">$h=g\phi^{-1}(w)g^{-1}$</span>. But since <span class="math-container">$gWg^{-1}=K$</span>, there exists a <span class="math-container">$k\in K$</span> such that . . . I don't know.</p>
<p>It's not immediately obvious what I should do, even given the hint. I think I did something simple wrong already.</p>
<hr>
<p><em>NB:</em> It's 00:41 here . . . now. That's my excuse.</p>
| 0non-cybersec
| Stackexchange | 679 | 1,901 |
SQL Server 2008 Replicating Linked Server Tables. <p>I have a SQL2008 server with a linked Sybase server. I have several tables on the SQL2008 server that I need have merge replicated to some SQL2008 Express clients. I also need to get two tables from the linked Sybase server down to the SQL2008 Express clients. These two tables won't be updated at all on the SQL2008 Express clients, but are just used in a read only fashion to augment information in the other tables. Ideally I would also want to filter data from these two tables using a join filter based on one of the SQL tables that is replicating down.</p>
<p>Is there anyway for me to do this short of creating two corresponding tables in SQLServer 2008 and programatically inserting the rows I need replicated into these two new tables?</p>
| 0non-cybersec
| Stackexchange | 177 | 803 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
Warning: UIAlertController is already presenting. <p>I am a novice in swift and XCode so please forgive me the probably really messy code!
When running my code I get the following warning:
Warning: Attempt to present on which is already presenting </p>
<p>I have already checked the forum and found a post regarding that issue....I applied the help suggested as in:</p>
<pre><code>if presentedViewController !== nil {
self.presentViewController(alertController, animated: true, completion: nil)
} else{
self.dismissViewControllerAnimated(false, completion: nil)
self.presentViewController(alertController, animated: true, completion: nil)
}
</code></pre>
<p>However, it still gives me the same warning....So I guess I must have done something wrong there. It would be great if someone could help me out please :) Also if there any suggestion as to how I can "clean" up my code are appreciated :)</p>
<pre><code>import UIKit
class ViewController: UIViewController {
@IBOutlet var Label: UILabel!
@IBOutlet var ukFlag: UITextView!
@IBOutlet var movie: UITextView!
@IBOutlet var piano: UITextView!
@IBOutlet var book: UITextView!
@IBOutlet var dance: UITextView!
@IBOutlet var paint: UITextView!
@IBOutlet var row: UITextView!
@IBOutlet var envelope: UITextView!
@IBOutlet var dragon: UITextView!
@IBOutlet var instagram: UITextView!
func londonPuzzle(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func misleadOne(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func bestival(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func rosieProject(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func misleadTwo(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func misleadThree(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func misleadFour(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func voucher(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func welsh(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func hulk(sender: UIPanGestureRecognizer) {
let translation = sender.translationInView(self.view)
sender.view!.center = CGPoint(x: sender.view!.center.x + translation.x, y: sender.view!.center.y + translation.y)
sender.setTranslation(CGPointZero, inView: self.view)
self.ifCollided()
}
func ShowAlertWrong(){
let alertController = UIAlertController(title: "Sorry", message: " Guess again!", preferredStyle: .Alert)
let okAction = UIAlertAction( title: "Ok", style: UIAlertActionStyle.Default) {
UIAlertAction in
self.ukFlag.center = CGPointMake(150, 225)
self.movie.center = CGPointMake(150, 225)
self.piano.center = CGPointMake(150, 225)
self.dance.center = CGPointMake(150, 225)
self.paint.center = CGPointMake(150, 225)
self.row.center = CGPointMake(150, 225)
self.envelope.center = CGPointMake(150, 225)
self.dragon.center = CGPointMake(150, 225)
self.instagram.center = CGPointMake(150, 225)
}
let resetAction = UIAlertAction( title: "Reset", style: UIAlertActionStyle.Default) {
UIALertAction in
self.ukFlag.center = CGPointMake(150, 225)
self.movie.center = CGPointMake(150, 225)
self.piano.center = CGPointMake(150, 225)
self.dance.center = CGPointMake(150, 225)
self.paint.center = CGPointMake(150, 225)
self.row.center = CGPointMake(150, 225)
self.envelope.center = CGPointMake(150, 225)
self.dragon.center = CGPointMake(150, 225)
self.instagram.center = CGPointMake(150, 225)
}
alertController.addAction(okAction)
alertController.addAction(resetAction)
self.presentViewController(alertController, animated: true, completion: nil)
}
func ShowAlertWin(){
let alertController = UIAlertController(title: "Congrats🎉", message: " You are correct!👏🏻", preferredStyle: .Alert)
let okAction = UIAlertAction( title: "Ok", style: UIAlertActionStyle.Default) {
UIAlertAction in
self.book.center = CGPointMake(150, 150)
}
/* let resetAction = UIAlertAction( title: "Reset and hope the mood has changed", style: UIAlertActionStyle.Default) {
UIALertAction in
self.Angry.center = CGPointMake(150, 150)
}*/
alertController.addAction(okAction)
// alertController.addAction(resetAction)
if presentedViewController !== nil {
self.presentViewController(alertController, animated: true, completion: nil)
} else{
self.dismissViewControllerAnimated(false, completion: nil)
self.presentViewController(alertController, animated: true, completion: nil)
}
}
@IBAction func ifCollided(){
if CGRectIntersectsRect(Label.frame, ukFlag.frame) {
ShowAlertWrong()
}
else if CGRectIntersectsRect(Label.frame, movie.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, piano.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, dance.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, paint.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, row.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, envelope.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, dragon.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, instagram.frame){
ShowAlertWrong()
} else if CGRectIntersectsRect(Label.frame, book.frame){
ShowAlertWin()
}
}
override func viewDidLoad() {
super.viewDidLoad()
ukFlag.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.londonPuzzle(_:))))
movie.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.misleadOne(_:))))
piano.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.bestival(_:))))
book.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.rosieProject(_:))))
dance.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.misleadTwo(_:))))
paint.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.misleadThree(_:))))
row.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.misleadFour(_:))))
envelope.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.voucher(_:))))
dragon.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.welsh(_:))))
instagram.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(self.hulk(_:))))
}
}
</code></pre>
| 0non-cybersec
| Stackexchange | 2,761 | 8,896 |
My [26F] mom [61F] is my best friend but she constantly vents to me about her personal problems and I don't know how to get her to stop.. Let me start off by saying my mom is my best friend and I love her more than anything. We have a very open relationship where I can go to her for anything and vice versa. She has a heart of gold but she's a very emotional person.
However, lately more than ever before, she's been texting me multiple times throughout the day dumping all of the issues she's spontaneously dealing with onto my lap, from waiting at the hair salon too long to way bigger issues. Most of the time it's little stuff, but recently it's been really personal stuff involving my family members, like her issues with my dad (she's even said she wants to divorce him), how my brother disrespects her and my dad, how she's broken inside over all of this..... things that I really shouldn't be listening to and stuff she really shouldn't be venting to me about. Sometimes I'll get 5 or 6 texts in a row, even if I don't respond. Paragraphs of sad stories and how she just can't deal with it anymore.
I tell her she needs a therapist or another friend to go to because I'm not the right person to talk to about these things. She says she doesn't need a therapist. She says sorry and that she'll stop, but then immediately gives me a guilt trip about how she's sad and just needs to vent. Then she does it all over again when something new happens and she just needs to vent.
It's really emotionally draining for me to deal with and it's recently causing my anxiety to act up which is why I'm writing about this here. I don't know if it's selfish to feel this way or not and I feel bad if it is, but it's so depressing and stressful listening to all of her personal problems that I really can't do anything to change. I don't even want to give her suggestions on how to handle these problems because they're literally so close to home and I don't want to be caught in the middle.
I moved out a year and a half ago because I couldn't deal with living in the house anymore from all the stress going on... after all this time, it's still going on, and it's still in my face through text messages, and I just don't know what to do from here.
How do I get her to stop doing this in the nicest way possible? I love her and I want her to know she can come to me with stuff she wants to talk about but there has to be a line drawn somewhere. I just don't know how to draw it at this point.
tl;dr - my mom frequently texts me really personal problems and it's becoming a severe emotional burden for me to deal with. | 0non-cybersec
| Reddit | 607 | 2,623 |
Let $R$ a ring with maximum common divisor. If $a,b,c \in R$ such that $a|bc$ and $(a,b)=1$ then $a|c$.. <p>Let $R$ a ring with maximum common divisor. Show that if $a,b,c \in R$ such that $a|bc$ and $(a,b)=1$ then $a|c$.</p>
<p><strong>Comments:</strong> I tried to use the Bezout's theorem, but in my course we saw it only applies to principal domains, I tried to use the setting as well, but could not finish.</p>
| 0non-cybersec
| Stackexchange | 149 | 418 |
Create Excel Chart Data Series based on Cell Contents. <p>all. I do not see an answer to my problem in this site, so hopefully I can find help from you all.
I have a table of data, reflecting pseudo-Project Management data. The table is 7,000+ rows long but only 4 columns wide. Here is a very simplified example:</p>
<pre><code>**PROJECT_NAME MILESTONE_TYPE MILESTONE_DATE REPORT_DATE**
Project A Project Start 10/16/2017 6/1/2017
Project A Beta Finished 2/1/2017 6/1/2017
Project A Project Complete 11/1/2017 6/1/2017
Project A Project Start 10/16/2018 1/1/2018
Project A Beta Finished 3/1/2017 1/1/2018
Project A Project Complete 2/1/2018 1/1/2018
Project B Project Start 5/1/2018 6/1/2017
Project B Beta Finished 8/1/2018 6/1/2017
Project B Project Complete 2/1/2019 6/1/2017
Project B Project Start 5/1/2018 1/1/2018
Project B Beta Finished 8/1/2018 1/1/2018
Project B Project Complete 3/1/2019 1/1/2018
</code></pre>
<p>I want to display data for one project at a time (I expect to use a filter), although there are actually over 70 Projects. The 36 Report Dates are snapshots (progress reports, really) of anticipated Milestone Dates. </p>
<p>I want to show whether any Milestone Dates have slipped for a particular project, using a line graph that will indicate any changes to <strong>Milestone Dates</strong> over time. Each <strong>Milestone Type</strong> should be its own curve/line, and I want the line to track all report dates for that particular milestone along the x-axis. So, the Y-axis will reflect target dates for each milestone, while the X-axis will reflect dates each data point was gathered, as a "trend line."</p>
<p>I am very familiar with Office/VBA/etc. but very new to <em>Pivot Tables</em> and <em>Pivot Charts</em>. I found <a href="https://superuser.com/questions/515272/how-do-i-create-a-chart-in-excel-with-dynamic-series-based-on-the-data-content">another similar question</a> in this forum, but the solution is given for Excel 2010; I am working with Office 365, which means the settings referred to don't match (as far as I can see.)</p>
<p>I feel I'm this close, but I can't get it. Please help!</p>
<p>(Thanks!)</p>
| 0non-cybersec
| Stackexchange | 692 | 2,330 |
How to undo intermediate file deletion. <p>I have a software stack that creates some intermediate files as a part of build process. There is some problem come up and the build breaks. I want to have a look at those intermediate generated files. To my surprise those files are being deleted as a part of build process.</p>
<pre><code>Removing intermediate files...
rm fact_test_without_proxies.c fact_test_main.c fact_test_without_proxies.o
</code></pre>
<p>I went through the Makefiles I don't see any explicit rules deleting them. Can there be any implicit rules to delete intermediate files. If yes how can I disable those implicit rules ?</p>
<p>I see the print <code>Removing intermediate files...</code> only if make is executed with <code>--debug</code> option.</p>
<pre><code>skmt@tux:~/coding/factorial/ut$ make --debug
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Reading makefiles...
Updating goal targets....
File `check' does not exist.
File `test_dept_run' does not exist.
File `fact_test' does not exist.
File `fact_using_proxies.o' does not exist.
File `fact_test_without_proxies' does not exist.
File `fact_test_without_proxies.o' does not exist.
File `fact_test_without_proxies.c' does not exist.
File `fact_test_main.c' does not exist.
Must remake target `fact_test_main.c'.
nm -p fact_test.o | build_main_from_symbols >fact_test_main.c
Successfully remade target file `fact_test_main.c'.
Must remake target `fact_test_without_proxies.c'.
cp fact_test_main.c fact_test_without_proxies.c
Successfully remade target file `fact_test_without_proxies.c'.
Must remake target `fact_test_without_proxies.o'.
gcc -I../src -c -o fact_test_without_proxies.o fact_test_without_proxies.c
Successfully remade target file `fact_test_without_proxies.o'.
Must remake target `fact_test_without_proxies'.
gcc fact_test_without_proxies.o fact.o fact_test.o -o fact_test_without_proxies
fact.o: In function `unknown':
fact.c:(.text+0x67): undefined reference to `do_update'
collect2: ld returned 1 exit status
make: *** [fact_test_without_proxies] Error 1
Removing intermediate files...
rm fact_test_without_proxies.c fact_test_main.c fact_test_without_proxies.o
</code></pre>
| 0non-cybersec
| Stackexchange | 773 | 2,549 |
Use Fiddler with Basic Authentication to access RESTful WebAPI. <p>I have a WebAPI that works without issue. I have tested locally and deployed to my server and configured this service in IIS to use Basic Authentication. I am able to browse to my service and I receive the Authentication challenge I expect and all works swimmingly! Now I want to use Fiddler to test this and I have constructed a POST to a specific url and I got a 401 (Unauthorized) error. So I decided to add a base64 string in my Request Header and I am now getting a 500 error.</p>
<p>What I would like to know is, does my Request Header look correct? I am obviously going to obfuscate my Host and base64 string which contains the format username:password for the Authentication challenge.</p>
<pre><code>User-Agent: Fiddler
Host: xxx.xxx.xxx.xxx:xxxx
Content-Length: 185
Content-Type: text/json
Authorization: Basic jskadjfhlksadjhdflkjhiu9813ryiu34
</code></pre>
| 0non-cybersec
| Stackexchange | 254 | 943 |
Count in contain Cakephp 3. <p>I have a table <strong>Post</strong> and this has a <strong>has-many</strong> association with a table <strong>Stars</strong>. </p>
<p>I can get all the associated data using:</p>
<pre><code>$this->Posts->find()->contain(['Stars']);
</code></pre>
<p>That works well.</p>
<p>But I want to count the Stars. I have tried this but its not working:</p>
<pre><code>$this->Posts->find->contain([
'Stars' => function($q) {
return $q->select(['total' => $q->func()->count('Stars.post_id')]);
}
]);
//I've also tried this
...
...$q->select(['total' => "COUNT(Stars.post_id)"]);
...
//Also fail
</code></pre>
<p>This does not return the number of associated Stars.</p>
<p>Is there something wrong or should do it some other way?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange | 314 | 831 |
Mysql Connector crash on SQL Server 2008. <p>I would like to create a linked Server betwenn my MYSQL Server and a SQL Server 2008. I already installed the MYSQL Connector ODBC drivers 5.1 (previously the 5.3 Version but same problem) on my SQL Server 2008 (Virtual Machine, 64-Bit). I would to create a New System DNS in the ODBC Data Source Administrator Menu. Furthermore I enter the Connection Data from the MYSQL Server (IP-Adress, User, Password, etc.) and hit "Test". After I hit "Test" I get a few seconds later "No Response" and the Mysql Connector Window crashes. Do you know any solution or anything that I can do, to solve this issue? Thanks in Advance.</p>
<p>/edit:
After some testing I get finally an error Message with the Result: </p>
<pre><code>Connection Failed: [08S01] [MySQL][ODBC 5.1 Driver] Lost connection to MySQL server at 'reading initial communication packet', system error: 0
</code></pre>
<p>Does this help?</p>
| 0non-cybersec
| Stackexchange | 257 | 945 |
How can I affordably retrieve data from Amazon Glacier?. <p>I have a bit of an odd question. I stored several hundred gigabytes of disk image files (100+ GB each) on Amazon Glacier several years ago, shortly after Amazon Glacier launched. I'm not a web or app developer and just uploaded the files using SAGU (Simple Amazon Glacier Uploader). Now I'd like to retrieve my files without spending a fortune. When I first uploaded the files to Amazon I had no understanding of Glacier's download pricing structure. Twice I accidentally racked up huge bills, which Amazon very, very graciously forgave.</p>
<p>What should I do next? Is there a way to cheaply move the data into something designed for more flexible downloading and then download it from there? As I said before, I'm not an AWS developer; but I am comfortable using a command line if I'm told what to do.</p>
| 0non-cybersec
| Stackexchange | 210 | 870 |
Stiefel-Whitney class of unordered configuration space. <p>Let $S^m$ be the $m$-sphere and $$F(S^m,2)/\mathbb{Z}_2=\{(a,b)\mid a,b\in S^m, a\neq b\}/(a,b)\sim (b,a)$$ be the $2$-nd unordered configuration space on $S^m$. How to compute the total Stiefel-Whitney class of the tangent bundle of $F(S^m,2)/\mathbb{Z}_2$
$$
w(TF(S^m,2)/\mathbb{Z}_2)?
$$</p>
<p>Is $F(S^m,2)/\mathbb{Z}_2$ homeomorphic to $\mathbb{R}P^m\times \mathbb{R}^m$ or not?</p>
<p>Moreover, if we change $S^m$ to other manifolds, for example, projective spaces, Grassmannians, then how to compute the corresponding Stiefel-Whitney class? The question is on <a href="https://mathoverflow.net/questions/217408/characteristic-classes-of-tangent-bundle-of-2-nd-unordered-configuration-space">characteristic classes of tangent bundle of 2-nd unordered configuration space</a></p>
| 0non-cybersec
| Stackexchange | 303 | 847 |
The minimum of a sum of absolute values of inner products in $\mathbb{R}^d$. <p>Consider a collection of unit vectors $v_1, \ldots, v_n$ in $\mathbb{R}^d$ (we think of $n$ being much larger than $d$). I would like to minimize the sum:</p>
<p>$$\sum_{i\neq j}|\langle v_i,v_j\rangle|.$$</p>
<p>Clearly, if $n=d$, the minimum is attained by taking $v_i=e_i$. Could it be that for $n>d$ in order to minimize the latter expression it is still best to take the vectors $v_i=e_{i\, \text{mod}\, d}$? </p>
| 0non-cybersec
| Stackexchange | 178 | 504 |
Negate `.Where()` LINQ Expression. <p>I understand that you can do the following:</p>
<pre><code>enumerable.Where(MethodGroup).DoSomething();
</code></pre>
<p>and that this achieves the same thing as:</p>
<pre><code>enumerable.Where(x => MyMethod(x)).DoSomething();
</code></pre>
<p>However, I wish to achieve the inverse of this and to select the items where the method returns false. It is obvious how to do this for the second case:</p>
<pre><code>enumerable.Where(x => !MyMethod(x)).DoSomething();
</code></pre>
<p>Yet, for the first, this is not the case as you cannot apply the <code>!</code> operator to a <code>MethodGroup</code>. Is it possible to achieve this sort of "<code>.WhereNot</code>" effect with <code>MethodGroups</code> in a similar fashion or do I have to roll my own (or use lambdas)?</p>
| 0non-cybersec
| Stackexchange | 254 | 824 |
Passing multiple Id parameter to Web Api GET or DELETE request. <p>I have a Bussiness Entity that is recognized by 2 Keys, for example:</p>
<pre><code>class UserItem {
[Key]
[Column(Order = 1)]
public string UserId {get;set;}
[Key]
[Column(Order = 2)]
public string ItemName {get; set;}
public int Count {get; set;}
}
</code></pre>
<p>Now using ASP.NET Web Api, how can I make an HTTP GET or HTTP DELETE to accept multiple parameters? Currently, the default generated template only accept 1 key:</p>
<pre><code>class ItemController : ApiController {
.....
//api/item/[key]
[HttpGet]
[ResponseType(typeof(UserItem))]
public async Task<IHttpActionResult> GetUserItem(string id)
{
UserItem item = await db.useritems.FindAsync(id);
......
}
......
}
</code></pre>
<p>db is my datacontext, i'm using EntityFramework 6 with ASP.NET Web Api 2</p>
| 0non-cybersec
| Stackexchange | 296 | 932 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
Outlook - Out Of Office can't set. <p>Exchange 2007, Outlook 2010
Error when setting Out Of Office (Automatic Replies) from Outlook:
Your automatic reply settings cannot be displayed because the server is currently unavailable. Try again later.</p>
<p>Setting this through OWA works fine. </p>
<p>Autodiscover is working, and all addresses are resolvable through DNS.
Outlook profile created from scratch.
Anonymous access disabled for EWS/OWA (IIS on Exchange box).</p>
<p>I'm out of steam for troubleshooting. Any ideas?</p>
| 0non-cybersec
| Stackexchange | 151 | 537 |
How to set the connection and read timeout with Jersey 2.x?. <p>In jersey 1 we had a function <a href="https://jersey.java.net/apidocs/1.1.5/jersey/com/sun/jersey/api/client/Client.html#setConnectTimeout%28java.lang.Integer%29" rel="noreferrer">setConnectTimeout</a> in the class <code>com.sun.jersey.api.client.Client</code>.</p>
<p>In jersey 2 the <code>javax.ws.rs.client.Client</code> class is used where this function is missing.</p>
<p>How to set connection timeout and read timeout in jersey 2.x?</p>
| 0non-cybersec
| Stackexchange | 174 | 510 |
Is there any reason not to use \let to redefine a deprecated control sequence to the currently recommended one?. <p>I understand that <code>\bf</code> and <code>\it</code> are both deprecated in the current version of LaTeX. To the best of my knowledge, the correct control sequences replacing them are <code>\bfseries</code> and <code>\itshape</code>. </p>
<p>Is there any reason(s) not to use <code>\let</code> to redefine <code>\bf</code> to <code>\bfseries</code> and <code>\it</code> to <code>\itshape</code> as in,</p>
<pre><code>\let\bf\bfseries
\let\it\itshape
</code></pre>
<p>so that if the old form of control sequence is used by mistake, it will nonetheless still be correct when compiled?</p>
| 0non-cybersec
| Stackexchange | 217 | 710 |
How do I use Automator to add files download via Transmission to iTunes?. <p>Here's the setup…</p>
<p>Computer A
- Running Transmission
- placing files in a Dropbox folder
- Uses iTunes Match to load music from Computer B's iTunes library
- Is always running</p>
<p>Computer B
- Shares Dropbox folder with Computer A
- Is "master" computer for iTunes Match account
- Is not always running</p>
<p>Current process
1. Download files via transmission to dropbox folder
2. Start computer B, wait for dropbox folder to synchronize
3. COPY files to "Automatically Added to iTunes folder"</p>
<p>What I want is to have a folder action that when Computer B sees new files in the dropbox folder it will wait till all file transfers are complete, then copy just the new filed into "Automatically added to iTunes"</p>
<p>all of my current tries have caused Automator to re-add all files in the dropbox folder to iTunes, creating duplicates. </p>
<p>one limitation to be aware of — unaltered versions of the files must stay in the dropbox folder</p>
| 0non-cybersec
| Stackexchange | 275 | 1,047 |
Keto in Brazil - it's working!. Hey, fellow keto adapts!
Wanted to send a huge shoutout to the community that inspired me for this life change.
As I finish my first week on keto, my starting weight was 270.1 and I have incredibly lost exactly 12 pounds, closing my week at 258.1. I live in south Brazil and I'm lucky to have this resource as true keto, because I can only find bullshitty fake low-carb crap here.
I don't expect to keep this crazy pace, but what I have to say is: I've more than halved the amount of food I used to eat, I'm never hungry and I'm quite strict with my macros. Never been a huge carb eater (so I thought but discovered I was indirectly) so that was a facilitator, and I've never felt better in my life: energized, I sleep like a baby and my blood pressure is at 12/8 every day.
Just wanted to incentive anyone coming in: IT WORKS! WATCH YOUR MACROS AND CALORIES AND YOU'LL DO IT TO.
Ando to the Reddito r/keto family, #KCKO! | 0non-cybersec
| Reddit | 262 | 961 |
Prevent organization's code from being leaked or stolen. <p>I am wondering how I can control the organization's code from being leaked or stolen.</p>
<p>Currently we are using GitHub, in order to protect the code I am planing to use GitLab on a local server, so the code will be pulled and accessed only from the office.<br>
My question is, even if I implement this, it will still be possible for the code to be leaked. If the the developer is using the machine in the office he/she can pull from the local server and send it somewhere from the machine he/she is using.</p>
<p>Is there anyway to solve this problem ?</p>
| 1cybersec
| Stackexchange | 158 | 627 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
Trying to Understand an Answer: Continuously Extending Bases. <p>The following question was asked <a href="https://math.stackexchange.com/questions/1308289/continuously-extending-a-set-of-independent-vectors-to-a-basis?rq=1">here</a></p>
<blockquote>
<p><strong>Question:</strong> Let $I=(a,b)$ be an interval and let
$$v_i:I\to\mathbb{R}^n,\quad i=1,\ldots,k$$
be continuous curves such that $v_1(t),\ldots,v_k(t)$ are linearly independent in $\mathbb{R}^n$ for every $t\in I$. Can we always find continuous curves
$$v_{k+1},\ldots,v_n:I\to\mathbb{R}^n$$
such that $v_1(t),\ldots,v_n(t)$ forms a basis for $\mathbb{R}^n$ for each $t\in I$?</p>
</blockquote>
<p>And the following response was posted by @A.P.</p>
<blockquote>
<p><strong>Solution.</strong> Let's call the continuous functions $v_1, \dotsc, v_k$ linearly independent (resp. a basis) if the vectors $v_1(t),\dotsc,v_k(t)$ are linearly independent (resp. a basis) in $\Bbb{R}^n$ for every $t \in I$.
We shall proceed by induction. If $n = 1$ then $k = 0$, so you can choose $v_1$ to be the constant function with value $e \in \Bbb{R}^*$. Now that the base case is cleared we assume that $v_1,\dotsc,v_{n-1}$ are linearly independent functions and we are going to complete them to a basis.
For each $t \in I$ consider the space $V_t \subset \Bbb{R}^n$ spanned by $v_1(t),\dotsc,v_{n-1}(t)$. Since the $v_j$ are continuous in $t$ we can also see $V_t$ as the section of a surface $V \subset X := I \times \Bbb{R}^n$ by the hyperplane $\{x_0 = t\}$. It isn't hard to see that $V$ is homeomorphic to $I \times \Bbb{R}^{n-1}$: for example consider the map
$$
(t, a_1v_1(t) + \dotsb + a_{n-1}v_{n-1}(t)) \mapsto (t,a_1e_1(t) + \dotsb + a_{n-1}e_{n-1}(t))
$$
where $e_1,\dotsc,e_{n-1}$ are the constant functions with values in the standard basis of $\Bbb{R}^{n-1}$. In particular, this means that $V$ divides $X$ in two halves. You can choose as $v_n$ any continuous curve which takes exactly one value for every $t \in I$ and which is entirely contained within one of those halves (without touching $V$).</p>
</blockquote>
<p>It is not clear to me what is meant by $V$ in the above proof. Can somebody please explain the meaning of it, and perhaps elaborate the proof more. I asked @A.P. about the meaning of $V$ in a comment but I did not get a response.</p>
| 0non-cybersec
| Stackexchange | 819 | 2,342 |
Quoting/Escaping variables in mail body. <p>I am feeling a bit awkward, because I am generating a mail-body with PHP without escaping the variables. In HTML I am using htmlspecialchars() or similar functions, for command lines escapeshellarg(), but for mails? For example something like this:</p>
<pre><code><?php
$usercontent = $_GET['usercontent'];
mail("[email protected]", "My Subject", "My body with $usercontent included");
?>
</code></pre>
<p>What could a possible attacker do with a script like the one above and how could I protect against such an attack? Or is PHP mail() save and why?</p>
<p><strong>Update</strong></p>
<p>Please refer to the example:</p>
<ul>
<li>Only the body is affected (No Headers!)</li>
<li>Content-Type is text/plain</li>
<li>Some proof to the answer would be nice</li>
<li>MTA is a postfix sendmail with "/usr/sbin/sendmail -t -i"</li>
</ul>
| 0non-cybersec
| Stackexchange | 277 | 889 |
All Devices on Network Being Redirected to Malware Download. <p>I have a curious problem.</p>
<p>I received a compromised email from an address on my university's domain.
Not realizing it was faked, I clicked a link in the email to a url on my university's domain, and was then put through to an automatic download of a fake version of Flash. This exec file says it is made by Mandiant. I did some googling, and apparently there is a ransomeware attack that says it is a piece of Mandiant software. I promptly removed the files.</p>
<p>This all makes sense to me. The part that I don't understand is that now <strong>all</strong> of my family's devices (iPhones, android phones, pc and mac laptops) receive the same redirection/download when they hit <strong>any</strong> of my university's domains from any network (tested two different wifi networks and cellular connections so far). </p>
<p>How could this work? The university's system is clearly compromised to some degree. Could they have gotten all of the MAC addresses for devices on my network, and now be rerouting traffic based on this?</p>
<p>I should also note that a friend of mine has no issue accessing any of the university domains. He has had no exposure to my network.</p>
| 1cybersec
| Stackexchange | 304 | 1,246 |
iOS 13 - Buggy Large Title UINavigationBar while pushing. <p>With the iOS 13 update, I've got an annoying bug that I still wasn't able to solve when I have the <code>prefersLargeTitles = true</code> on my <code>UINavigationBar</code> and I perform a push segue.
Plus, even if I'm not 100% sure if it's related to it, my view controller has a collection view embedded.</p>
<p>Anyway the bug/glitch I'm talking about is the following:</p>
<p><a href="https://i.stack.imgur.com/k9jA8.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/k9jA8.gif" alt="enter image description here"></a></p>
<p>Basically the text doesn't animate as I would expect when I'm pushing, and it continues to stay there till the new screen is presented. Any tips? Thanks</p>
| 0non-cybersec
| Stackexchange | 234 | 757 |
Is there an USB adapter for secondary display with RCA output?. <p>I need to use my TV as a second monitor for my notebook. But I'd like to use the TV's AV input (RCA).</p>
<p>My notebook's VGA output is broken, so I'll need to buy an external video adapter. I've seen many USB to VGA adapters, and I've seen also some VGA to RCA converters. so, that would do the trick.</p>
<p>But I was wondering, <strong>does anyone know about a USB adapter for secondary display with a VGA output?</strong></p>
| 0non-cybersec
| Stackexchange | 145 | 500 |
Efficient (on Ryzen) way to extract the odd elements of a __m256 into a __m128?. <p>Is there an intrinsic or another efficient way for repacking high/low 32-bit components of 64-bit components of AVX register into an SSE register? A solution using AVX2 is ok.</p>
<p>So far I'm using the following code, but profiler says it's slow on <strong>Ryzen 1800X</strong>:</p>
<pre><code>// Global constant
const __m256i gHigh32Permute = _mm256_set_epi32(0, 0, 0, 0, 7, 5, 3, 1);
// ...
// function code
__m256i x = /* computed here */;
const __m128i high32 = _mm256_castsi256_si128(_mm256_permutevar8x32_epi32(x),
gHigh32Permute); // This seems to take 3 cycles
</code></pre>
| 0non-cybersec
| Stackexchange | 234 | 675 |
Android pinning SSL handshake Exception after SSL renewal of website. <p>i've an android app with ssl pinned it was working fine but after i've renewed the SSL now its throwing exception </p>
<blockquote>
<p>javax.net.ssl.SSLHandshakeException:
java.security.cert.CertPathValidatorException: Trust anchor for
certification path not found.</p>
</blockquote>
<ul>
<li>does renewel of SSL supposed to be stop the existing app?</li>
<li>what can i do so the old app will work without releasing the new app with new SSL pinning?</li>
<li>The New renewed SSL dont have any chain issues as per SSL lab test</li>
</ul>
| 0non-cybersec
| Stackexchange | 178 | 619 |
Can I properly change pip-2.7 command to pip?. <p>Basically trouble is that I have <code>pip-2.7</code> command in terminal but not <code>pip</code>. First thought was <code>sudo port select --list pip</code> will help, but it doesn't even has that group</p>
<pre><code>Romans-iMac:~ holms$ sudo port select --list pip
Warning: Unable to get active selected version: The specified group 'pip' does not exist.
Error: The 'list' command failed: The specified group 'pip' does not exist.
</code></pre>
| 0non-cybersec
| Stackexchange | 146 | 500 |
Moving guy wanted paid for doing no moving.. Not 100% sure this is a CB situation.
A few weeks ago I decided to hire 3 moving guys for a few hours to move as much as they could into a POD i rented. I mostly wanted them there to get a few large furniture items from upstairs down into the pod as it is just myself, 16 month of old son and pregnant wife.
They were scheduled to show up at 10 a.m. and work two hours until noon, at which point i had a code i would give them and they would get paid for their work. Super easy, have used the service before. I took off and got a trailer for my Jeep incase there was any overflow and to take things we would need before the POD arrived. I get back to the house at 9:30 a.m., 30 minutes before they are set to arrive and they had been there for 15 minute already talking to my wife, this is how it went down the moment I walked in the door;
Wife: These mover guys have been lecturing me for 15 minute on how they cant do their job correctly unless they have shrink wrap for the couch.
Me: Well I got 4 packages of moving blankets and that should be more than enough to cover things in the POD.
Head mover guy: We can't guarantee your things wont get scratched a little if we don't have shrink wrap.
Me: Thats fine, I mostly hired you guys to get the heavy stuff in the POD and pack what you can in during the time you are here.
HMG: Ok boss. (then he gives me this weird salute)
He then tells his two guys, both young dudes there to just move stuff and get the job done, to move stuff downstairs as i had "hired them to move heavy stuff downstairs." I would say a solid 10 minutes go by before my wife come storming into the garage, where i was packing last minute items, visibly mad and at her ends wit.
Wife: They said they wont move the gun safe until we open it and prove there are no guns in there (i had locked the key in an ammo box that was already packed).
Me: Just tell them to leave it and I will do it later (It is not a high quality one and one person can move it with a dolly very easily, think drying machine)
2 seconds later the head moving guy comes storming out to the garage as well, visibly flustered and says he cant move anything more because of hostile working conditions. Apparently my wife said in passing that we hired two highschool kids one time and they moved all our stuff in a few hours and he thought that was the biggest affront to his abilities that she could have possibly done.
HMG: I am going to need cash or check upfront to finish this job or i'm going to have to charge my two hour minimum and leave (conveniently the same amount as if they did the work)
Me: Well I will pay you after you do your job, through the moving service as agreed upon. (Im assuming at this point he looks for any excuse to cut out the middleman and get paid directly, and does this often)
HMG: At this point, after working in these conditions and lacking the proper supplies needed (shrink wrap) I can't complete this job and will need my two hour minimum.
Me: (i can see the pod from where i'm standing, empty and they had been there 45 minutes) You guys haven't even loaded a single thing into the POD, you have been moving things from room to room and telling my pregnant wife she is hostile and unprofessional.
HMG: I can see you are stressed, who wouldn't be moving, but we cant work with her in there and lacking the correct supplies.
Me: Look man, you can finish the job I hired you to do and you will get paid at the end of the job, or you can get off my property and I will hire someone else.
HMG: That is actually called Theft of service and the police will come out to arrest you if you don't pay my two hour minimum.
Me: That's not how that works, and if you have your lawyers contact info i will be glad to let mine know he will have some work soon.
HMG: Really bro? you would pay a lawyer over just paying me and my guys my minimum? If you dont we will have to call the police for theft of service (used this term like 80 times, assuming it works for him usually)
Me: ok, you can get off my property and I am calling the police.
I hoped that was the clue he needed that i wasn't going to give in to his scam, but he was sticking to his guns! Amazingly the sheriff's department showed up in record time, about 20 minutes and started talking to the guy. My wife insisted on talking to the officer since she had the most contact with the guy so she did first, then me. Shockingly, not doing a job you were hired to do then demanding money is not theft of service. The poor officer was out in front of our house talking to this guy for almost 2 hours, yelling at my neighbors about how cheap we are and demanding we pay his workers $100 since we held him up so long. after brining us weird contracts saying "I agree to pay $100 because I demanded the impossible" they finally left without a red cent.
Funny thing is, if they had just done their job they would have been out of there an hour earlier with $200 in their pockets. We couldn't find any mover available on such short notice so i ended up moving everything myself. Took me all day and I was pretty much dead by the end of it, but that CB didn't get his money for nothing.
I did learn not to hire the cheapest movers, more you spend the less crazy comes with it.
**Edit - TLDR;** Moving guys show up 45 minutes early, say its impossible to move without shrinkwrap, move things from room to room and nothing into a POD, Stop working, demand money, get cops called, leave empty handed.
**Edit 2** Since this seems to be the running theme here are some clarifications:
1. No, my wife is not a bitch and i don't just lick her boots. She is an incredibly kind person and soft spoke, but everyone has their breaking points. Moving + the movers finding every little thing possible to blow up about will get even the most saintly of us flustered. If one pregnant woman can make 3 grown men walk off a job and demand payment, I don't know what to tell you.
2. The gun safe was empty, but they couldn't verify because i had locked it and packed the key. YES i should have kept it open but I didn't, they key acts as the opening handle. I told them I would move it myself and they agreed.
3. I don't know what happened in the time frame of after the gunsafe questions and my wife mentioning we hired two high school kids last time. I don't think she said it in a snide way, but in passing comparing out last move since they were being difficult. That's when everyone charged into the garage like it was some principle and everyone was about to fight at the end of the pavement.
That's all I got, stop calling my wife a bitch :) | 0non-cybersec
| Reddit | 1,657 | 6,915 |
Wireless router configured as AP using dd-wrt drops packets. <p>I am using a new D-Link DIR-825 flashed with dd-wrt v24preSP2 build 18024.</p>
<p>The router is set up as an Access Point (AP) simply extending the network. We have used <a href="http://www.dd-wrt.com/wiki/index.php/Wireless_Access_Point" rel="nofollow noreferrer">this guide</a> to set it up.</p>
<p>The router seems to drop packets. We need to reload pages when browsing the net, and outlook connections are going up and down. The problem seems to be the same on both android phones, iphones and osx laptops. On my windows 7 machine I don't seem to have the same problem, but the network feels somewhat slower when browsing.</p>
<p>I don't know if it's relevant but my networks speeds are as follows:<br>
With cable I get close to 94 Mbit/s downstream 11 Mbit/s upstream.<br>
Wireless I get 19Mbit/s downstream 11 Mbit/s upstream.</p>
<p>How can I troubleshoot the router?</p>
| 0non-cybersec
| Stackexchange | 284 | 947 |
Making vector points blink using Raphael and Javascript. <p>I'm using the <a href="http://raphaeljs.com/index.html" rel="nofollow">Raphael JS</a> library, and I'm trying to figure out how to make a point appear on screen, then disappear.</p>
<p>I use a for loop to create the points, and then I make them fade in. Is there a way that they can also fade out, and I can remove them?</p>
<p>I'm quite new to Javascript, so I don't know the best strategy for dealing with this. I could not see how to to this in the Raphael documentation.</p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>blink point</title>
<script src="js/raphael.js"></script>
<!--<script src="https://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js"></script>-->
<script type="text/javascript">
window.onload = function () {
//Point Array
pointList = new Array ();
// Create Canvas
var r = Raphael(10, 50, 600, 600);
// Make a 'group' of points
for( i=0; i<20; i++){
//Create Point
pointList[i] = r.circle(10*i, 10*i,5);
pointList[i].attr({stroke: "none", fill: "#999", opacity: 0});
//Fade in
pointList[i].animate({opacity: 1}, 1000 );
}
// Remove points, starting with the first
for( i=0; i<20; i++){
//Try fading them out
//pointList[i].animate({opacity: 0}, 1000 );
}
};
</script>
</head>
<body>
<div id="holder"></div>
</body>
</html>
</code></pre>
<hr>
<p>I also was not able to get the online link to the Raphael library to work, so it might be necessary to download the library.</p>
| 0non-cybersec
| Stackexchange | 635 | 2,052 |
Symfony2 translation yaml array and twig loop. <p>I am trying to have twig convert an array from the translation file</p>
<p>// messages.en.yml</p>
<pre><code>termsAndConditions:
title: Terms and Conditions
paragraph:
- Paragraph text...blah blah...1
- Paragraph text...blah blah...2
- Paragraph text...blah blah...3
- Paragraph text...blah blah...n
</code></pre>
<p>// termsandconditions.html.twig</p>
<p>// tried...</p>
<pre><code>{% for i in range(1,termsAndConditions.paragraph|length) -%}
<p>{% trans %}termsAndConditions.paragraph. {{ i }}{% endtrans %}</p>
{%- endfor %}
</code></pre>
<p>// and tried...</p>
<pre><code>{% for i in range(1,termsAndConditions.paragraph|length) -%}
<p>{{ 'termsAndConditions.paragraph.' ~ i ~ |trans }}</p>
{%- endfor %}
</code></pre>
| 0non-cybersec
| Stackexchange | 308 | 831 |
WPF vertical gridsplitter not working. <p>I have a vertical gridsplitter, but I get an horizontal one instead.
here is my XAML</p>
<pre><code><GroupBox Header="Phase Management">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="70*"/>
<RowDefinition Height="30*"/>
</Grid.RowDefinitions>
<Button>Test column 0</Button>
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="#FFFFFF" ResizeBehavior="PreviousAndNext"/>
<Button Grid.Column="2">Test column 2</Button>
</Grid>
</GroupBox>
</code></pre>
<p><img src="https://i.stack.imgur.com/Wa9OB.png" alt="enter image description here"></p>
<p>in the grid I have a stack panel, a data grid and some text boxes.
Any idea of why I'm having the wrong behavior?</p>
| 0non-cybersec
| Stackexchange | 381 | 1,234 |
everybody isn't here anymore. 1.
I grew up in a house full of vanishing things. I wonder if that's what happened to my dad. He disappeared when I was three.
My brother was two years older than I was. I would ask him what happened to dad, and he would just stare at me.
You shouldn't ask about stuff like this, he would say. You should never ask about some things.
2.
Sometimes people move away, I didn't. I live where I grew up. I sleep in the same bedroom. I boarded up my mother's old room, just like I boarded up my brother's room before that.
I drive to work everyday. I come home and pull into the driveway and stare at the windows for a moment before I go in. I'm looking to see if i can see anything moving behind those blacked out windows in those boarded rooms. So far, I haven't seen anything.
I still hear things at night.
3.
We lost our cat when I was nine. She was three years old. Her name was Beluga. I named her. I was learning about whales.
The sunlight in the house seemed like it never worked. She could never find any place to lay down. Shadows moved too fast across the carpets, up and down the stairs, into the basement.
Sometimes I world see shadows seem to slip into the heating grates, pushing in between the holes.
Beluga wasn't around one morning when I went down for cereal. My brother was already there. He hadn't touched his cereal. He looked tired. I asked him if he had seen there. He didn't say anything.
He had stopped talking that year at school and at home. He only spoke to the neighbor kids outside, to the girls who got pregnant at 13, to the boys who got shot and died, after they made the girls pregnant.
Everything in my neighborhood was full of life, even if it died.
The school said my brother had selective mutism. I said he was being a dick. My mom hit me when I said that. He didn't say anything.
I never saw my cat again.
4.
I work downtown. I drive my car to work every morning though the tunnels. Every time I go into them, for a second I start to scream. Like the darkness and the ceiling are going to swallow me alive. Like I'm driving into a mouth. And one day it'll swallow me.
They've been doing construction on the tunnels from midnight to 5 AM. I'm always one of the first cars in. Whatever work they're doing leaves holes in the wall that are all filled up with shadows.
Yesterday I saw something in the holes.
5.
The year my cat disappeared my house stayed the same size, but all the shadows got bigger.
My mom was getting smaller. Her clothes didn't fit right. Her smiles got small, smaller, then they were gone. Her voice shrank until all she ever said was a whisper.
Our food leaked out of our cabinets, too. Everyday there would be less. The refrigerator light went out. I stopped opening the door. The shadows took that room.
Before I fell asleep one night, with the windows open to let in hot streetlight air through the wide rips in the screens, I saw a hole. It was on my ceiling; a black spot on a black surface, spreading like oil on the ocean. It looked wet, and full of nothing. Paralyzed, under my sheets, I watched it, until all of the sudden it was morning and the only sound in the house was the coughing ignition of cars on the street.
6.
I asked someone at my work what they were doing to the tunnels.
"I think they're just like, fixing them," she said, distracted at the coffee maker.
"What's wrong with them?" I asked. "What needs fixing?"
"Oh, who knows what's wrong with things? The insides are all probably rotting."
7.
The notices that my brother was missing went up two days after I saw him last. It was almost fall. The days felt warm still, but there was a breeze that made you cough with its raw edge.
I put up some of the flyers myself. A girl I knew he talked to saw me struggling with the stapler against the telephone pole. She stopped her bike and got off.
"What happened," she said to me.
I shrugged and didn't say anything.
"I saw him a week ago," she said. "He said he was scared."
"Why," I asked. The sky was all blue crayon colored.
"He said there was something taking things from him," she explained, "and it told him it was going to need more. He said it took his voice when he was there but it needed more."
I didn't say anything. I just turned around and put up the picture of him, with "missing, please help" written on it. I heard her get back on her bike and ride away.
That night I heard his voice through the heating grates. He sounded far away.
"Nate," he said, all echoey, "it's going to need more."
8.
My mom didn't answer her door one day when I knocked. When I opened the door, she wasn't in her room. Everything was empty.
In the garage, there were boards. I covered her door with them, and my brother's too.
I started to bring things home. Small things at first. Cats, mice, stuff like that. I'd take them to the attic. I think the shadows came from the attic. I put them in there and close the door and run to my bedroom. I'd feel a rush in the air, a change of pressure.
I could always tell when the holes needed something. I could feel them starting to gnaw at the edges. And one night, they started to talk to me, to explain to me, they needed more than the small things I was bringing them. I needed to bring it larger things. Or it would take me.
9.
Everyday in the tunnel, I watch the shadows growing. I wonder if they'll get even bigger. I'll wonder if it's my house they're getting out of, or somebody else's, or if maybe they're just starting to grow everywhere. They haven't talked to me yet, so I don't know if I'll need to feed them, or if they can catch their own.
Driving home, I pass all the "Missing Please Help" signs. There seem to be more of them everyday.
| 0non-cybersec
| Reddit | 1,459 | 5,773 |
.Net 4.6 breaks XOR cipher pattern?. <p>In .NET 4.5 this cipher worked perfectly on 32 and 64 bit architecture. Switching the project to .NET 4.6 breaks this cipher completely in 64-bit, and in 32-bit there's an <strong><em>odd</em></strong> patch for the issue.</p>
<p>In my method "DecodeSkill", <em>SkillLevel is the only part that breaks on .NET 4.6.</em>
The variables used here are read from a network stream and are encoded.</p>
<p>DecodeSkill (Always returns the proper decoded value for <em>SkillLevel</em>)</p>
<pre><code> private void DecodeSkill()
{
SkillId = (ushort) (ExchangeShortBits((SkillId ^ ObjectId ^ 0x915d), 13) + 0x14be);
SkillLevel = ((ushort) ((byte)SkillLevel ^ 0x21));
TargetObjectId = (ExchangeLongBits(TargetObjectId, 13) ^ ObjectId ^ 0x5f2d2463) + 0x8b90b51a;
PositionX = (ushort) (ExchangeShortBits((PositionX ^ ObjectId ^ 0x2ed6), 15) + 0xdd12);
PositionY = (ushort) (ExchangeShortBits((PositionY ^ ObjectId ^ 0xb99b), 11) + 0x76de);
}
</code></pre>
<p>ExchangeShortBits</p>
<pre><code> private static uint ExchangeShortBits(uint data, int bits)
{
data &= 0xffff;
return (data >> bits | data << (16 - bits)) & 65535;
}
</code></pre>
<p>DecodeSkill (<em>Patched</em> for .NET 4.6 32-bit, notice "var patch = SkillLevel")</p>
<pre><code> private void DecodeSkill()
{
SkillId = (ushort) (ExchangeShortBits((SkillId ^ ObjectId ^ 0x915d), 13) + 0x14be);
var patch = SkillLevel = ((ushort) ((byte)SkillLevel ^ 0x21));
TargetObjectId = (ExchangeLongBits(TargetObjectId, 13) ^ ObjectId ^ 0x5f2d2463) + 0x8b90b51a;
PositionX = (ushort) (ExchangeShortBits((PositionX ^ ObjectId ^ 0x2ed6), 15) + 0xdd12);
PositionY = (ushort) (ExchangeShortBits((PositionY ^ ObjectId ^ 0xb99b), 11) + 0x76de);
}
</code></pre>
<p>Assigning the variable as SkillLevel, in 32-bit only, will cause SkillLevel to always be the correct value. Remove this patch, and the value is always incorrect. In 64-bit, this is always incorrect even with the patch.</p>
<p>I've tried using MethodImplOptions.NoOptimization and MethodImplOptions.NoInlining on the decode method thinking it would make a difference.</p>
<p>Any ideas to what would cause this?</p>
<p>Edit:
I was asked to give an example of input, good output, and bad output.
This is from an actual usage scenario, values were sent from the client and properly decoded by the server using the "patch" on .NET 4.6.</p>
<p>Input:</p>
<pre><code>ObjectId = 1000001
TargetObjectId = 2778236265
PositionX = 32409
PositionY = 16267
SkillId = 28399
SkillLevel = 8481
</code></pre>
<p>Good Output</p>
<pre><code>TargetObjectId = 0
PositionX = 302
PositionY = 278
SkillId = 1115
SkillLevel = 0
</code></pre>
<p>Bad Output</p>
<pre><code>TargetObjectId = 0
PositionX = 302
PositionY = 278
SkillId = 1115
SkillLevel = 34545
</code></pre>
<p>Edit#2:</p>
<p>I should include this part, definitely an important part to this.</p>
<p>EncodeSkill (<strong><em>Timestamp</em></strong> is Environment.TickCount)</p>
<pre><code> private void EncodeSkill()
{
SkillId = (ushort) (ExchangeShortBits(ObjectId - 0x14be, 3) ^ ObjectId ^ 0x915d);
SkillLevel = (ushort) ((SkillLevel + 0x100*(Timestamp%0x100)) ^ 0x3721);
Arg1 = MathUtils.BitFold32(SkillId, SkillLevel);
TargetObjectId = ExchangeLongBits(((TargetObjectId - 0x8b90b51a) ^ ObjectId ^ 0x5f2d2463u), 19);
PositionX = (ushort) (ExchangeShortBits((uint) PositionX - 0xdd12, 1) ^ ObjectId ^ 0x2ed6);
PositionY = (ushort) (ExchangeShortBits((uint) PositionY - 0x76de, 5) ^ ObjectId ^ 0xb99b);
}
</code></pre>
<p>BitFold32</p>
<pre><code> public static int BitFold32(int lower16, int higher16)
{
return (lower16) | (higher16 << 16);
}
</code></pre>
<p>ExchangeLongBits</p>
<pre><code> private static uint ExchangeLongBits(uint data, int bits)
{
return data >> bits | data << (32 - bits);
}
</code></pre>
| 0non-cybersec
| Stackexchange | 1,413 | 4,075 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
What is paragraph TE000128012 OR what is \u switch for TOC in MS word?. <p>I am reading a web page about the codes for TOC in MS word <a href="https://support.office.com/en-us/article/Field-codes-TOC-Table-of-Contents-field-1f538bc4-60e6-4854-9f64-67754d78d05c?ui=en-US&rs=en-US&ad=US" rel="nofollow noreferrer">here</a>.<br>
It explains the possible switches when creating a TOC, one of them being <code>\u</code>.</p>
<blockquote>
<p>\u</p>
<p>Builds a table of contents by using the applied paragraph TE000128012.</p>
</blockquote>
<p>What do they mean by "paragraph TE000128012" ?</p>
<p>a google search gave only three results, none of them were helpful :D</p>
<p>Thank you !</p>
| 0non-cybersec
| Stackexchange | 262 | 704 |
Uber concealed 2016 hack which leaked 57 million names etc. Uber concealed a hack that affected 57 million customers and drivers, the company has confirmed.
The 2016 breach was hidden by the ride-sharing firm which paid hackers $100,000 (£75,000) to delete the data.
The company's former chief executive Travis Kalanick knew about the breach over a year ago, according to Bloomberg, which first broke the news.
The hackers found 57 million names, email addresses and mobile phone numbers, Uber said.
Within that number, 600,000 drivers had their names and license details exposed.
https://help.uber.com/h/12c1e9d1-4042-4231-a3ec-3605779b8815
source: http://www.bbc.co.uk/news/technology-42075306 | 0non-cybersec
| Reddit | 189 | 709 |
Changing tmux prefix on Mac (Mojave) to C+a captures Cmd+left. <p>I'm relatively new to Mac (coming from Linux) and in my tmux.conf file, I have the following:</p>
<pre><code>unbind C-b
set -g prefix C-a
bind C-a send-prefix
</code></pre>
<p>which works as you would expect with one hick-up. Command+left-arrow, which performs the same function as 'Home' on Windows/Linux, is somehow treated like the tmux prefix.</p>
<p>If I type:</p>
<pre><code>command + left-arrow
command + left-arrow
</code></pre>
<p>Then it works, but just a single press of cmd+left acts as the prefix.</p>
<p>If I remove those lines entirely, cmd+left works fine, so I may just go back to ctrl+b as the prefix (I came from using screen, thus opting for ctrl+a)</p>
<p>Any possible ideas on what might be causing this or is this perhaps just a bug with tmux?</p>
| 0non-cybersec
| Stackexchange | 275 | 845 |
Problem in figure environment in article. <pre><code>\documentclass{article}
\usepackage{graphicx,amsmath,tikz}
\begin{document}
\begin{figure}
\includegraphics{1.2.jpg}
\caption{d}
\end{figure}
\end{document}
</code></pre>
<p>By using the above code I am getting the following error..</p>
<blockquote>
<p>Unknown graphics extension: .2.jpg. \includegraphics{1.2.jpg}</p>
</blockquote>
<p>How to fix that??</p>
| 0non-cybersec
| Stackexchange | 155 | 417 |
What is another way to approach this inequality?. <p>I was given this inequality to solve today and then somebody showed me a very clever and simple way to solve it. They made two assumptions and with both of those assumptions, they deduced the proper interval of the inequality. I tried to replicate their method, but I was not successful. </p>
<p>This is how I solved it, but I would like to see that "assumptions" method again. It seemed more efficient. </p>
<p>Steps I took:</p>
<p>$$\frac { 2x }{ x-3 } <1\\ $$</p>
<p>Finding the critical points: $$\frac { 2x }{ x-3 } =1\\ $$</p>
<p>$$2x=x-3$$</p>
<p>Critical points are: $$x=3\quad or\quad x=-3$$</p>
<p>Testing around the critical points shows that the interval is $(-3,3)$</p>
<p>Can someone show me the "two assumptions" method?</p>
| 0non-cybersec
| Stackexchange | 255 | 804 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
Why is only ) a special character and not } or ]?. <p>I'm reading <a href="https://rads.stackoverflow.com/amzn/click/com/1411677609" rel="nofollow noreferrer" rel="nofollow noreferrer">Jan Goyvaerts' "<em>Regular Expressions: The Complete Tutorial and Reference</em>"</a> to touch up on my Regex.</p>
<p>In the second chapter, Jan has a section on "special characters:"</p>
<blockquote>
<h3>Special Characters</h3>
<p>Because we want to do more than simply search for literal pieces of text, we need to reserve certain characters for special use. In the regex flavors discussed in this tutorial, there are 12 characters with special meanings: the backslash \, the caret ^, the dollar sign $, the period or dot ., the vertical bar or pipe symbol |, the question mark ?, the asterisk or star *, the plus sign +, <strong>the opening parenthesis (, the closing parenthesis ), the opening square bracket [, and the opening curly brace {</strong>, These special characters are often called “metacharacters”. Most of them are errors when used alone.</p>
<p><sup>(emphasis mine)</sup></p>
</blockquote>
<p>I understand that only open square bracket and open curly brace are special since a close brace or bracket is clearly a literal if there's no preceding open. <strong>However, why does Jan specify that close parenthesis <em>is</em> a special character if the other two close's aren't?</strong></p>
| 0non-cybersec
| Stackexchange | 380 | 1,410 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
Is the natural map $\Omega^*(M)\otimes \Omega^*(F) \rightarrow \Omega^*(M\times F)$ injective?. <p>As I self-study Bott and Tu 's Differential Forms in Algebraic Topology, I am stopped by some quite basic questions:</p>
<p>1) Let $M$ and $F$ are real manifolds, and let $\pi : M\times F \rightarrow M$ and $\mu: M\times F \rightarrow F$ to the projection maps. Let $\psi :\Omega^*(M)\otimes \Omega^*(F) \rightarrow \Omega^*(M\times F)$ be the map given by $\omega\otimes\phi \mapsto \pi^*(\omega)\wedge \mu^*(\phi)$. Is the map $\psi$ injective?</p>
<p>2) What exactly is the distinction bewteen $\omega\otimes\phi$ and $\pi^*(\omega)\wedge \mu^*(\phi)$? Before I really start thinking about the first question, I tend to think them as one same thing. Appreciated for any help.</p>
| 0non-cybersec
| Stackexchange | 234 | 784 |
Is ubuntu gamepack worth it? Compared to kubuntu 18.04?. <p>I'm a gamer but on my PC with kubuntu 18.04 lts kernel 5.4 I cant get tethering to work. The libraries and programs I need are said to be on this os. Is it wise to grab this os and use it since my method of downloading is to my phone and then transferring files to PC via mtp?
So many problems with easy tether. </p>
<p>To save forum space would it be wise to install the grub 2 efi bootloader to the iso? It only boots via legacy for me. </p>
<p>My system is the Lenovo thinkcentre m73 10ax. </p>
| 0non-cybersec
| Stackexchange | 165 | 560 |
Power Supply Question.... Hey guys -
I'm curious what you all think about buying a 2018 power supply vs a newer one. Do you think the technology has increased to warrant going for a 2019 or 2020 one vs the one below?
Let me know, thanks!
​
**CORSAIR RMX Series (2018), RM650x, 650 Watt, 80+ Gold Certified, Fully Modular Power Supply**
[https://www.amazon.com/gp/product/B079H6111J/ref=ox\_sc\_act\_title\_1?smid=ATVPDKIKX0DER&psc=1](https://www.amazon.com/gp/product/B079H6111J/ref=ox_sc_act_title_1?smid=ATVPDKIKX0DER&psc=1) | 0non-cybersec
| Reddit | 198 | 543 |
Colorbar from custom colorRampPalette. <p>I have defined a colorRampPalette:</p>
<pre><code>my.colors = colorRampPalette(c("light green", "yellow", "orange", "red"))
</code></pre>
<p>How can I plot a colorbar "legend" item for it, preferably using only the base packages? I am after a rectangle filled with that color gradient.</p>
<p>What I am really after is a way to produce the same type of legend (color bar) that is plotted with a "raster" raster:</p>
<pre><code>require(raster)
plot(raster("myfile.tif"), legend=T)
</code></pre>
<p>I need to be able to place this on top of another plot.</p>
| 0non-cybersec
| Stackexchange | 196 | 604 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
ISCSI and SAN scaling. <p><strong>The Problem:</strong> I have a photography studio, and I ran into a problem when I just ran out of space on a monthly basis. Every month I just purchased additional HDD for a file server. now I have approx 120 TB of data, and 120 TB for backup. I am looking for a solution that scales well since this storage will double almost every week from now on due to adding a 16-bit 8k video to the storage which takes up a lot of space.</p>
<p><strong>My theoretical solution:</strong> I looked at NAS devices and one thing that i don't like is if it fails - the business fails. So then I started researching an alternative and found SAN. which is a bit more complicated and sound like it is a lot pricier then NAS solution. The reason I want to go with SAN is that if one block of the storage fails I have other blocks still available (with mirroring backups).</p>
<p><strong>The Question:</strong> So after reading on how to set up SAN with ISCSI, I got very confused. SAN is a network of storage devices that runs ISCSI software. A target is a storage unit and initiator is a client. Target appears to be mounted like a local hard drive. that is a simple part of it, but What about scaling this whole thing. for example, if I have 5 servers that ran ISCSI target software can I merge them all together to be seen as 1 storage block.</p>
<p>2) Can I partition that storage?</p>
<p>3) if yes, can I manage accpartitions?partitions ?</p>
<p>or I completely didn't get an idea about SAN and ISCSI protocol.</p>
<p>And yes, I don't have money for fibre channel sadly. just yet :) Thanks for your attention</p>
| 0non-cybersec
| Stackexchange | 420 | 1,640 |
Hardening Virtual Machine. <p>I have a CentOS based product I'm looking to distribute it as a virtual machine (VMWare, XEN and KVM) and I have been lately assessing the steps needed to protect the VM.
The VM's data shouldn't be accessible to anyone other than authorized people as it contains sensitive data, by this I mean a root password should always be requested or access denied.</p>
<p>Using XEN it was possible to have access to the machine via the following ways:</p>
<ul>
<li>By editing the bootloader using the Dom0, therefore defeating any bootloader protections: xe-edit-bootloader -u -p 1</li>
<li>By adding init=/bin/sh to the VM startup options</li>
</ul>
<p>Using VMWare you can mount the image on an other system and access the files.</p>
<p>Possibly there are other ways of accessing the machine, my question here is, what are these other ways I should take into consideration and how can I prevent them including the ones I listed above?</p>
| 0non-cybersec
| Stackexchange | 251 | 966 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
how to append string to <a href=" with jQuery or Javascript?. <p>I've the elements as follows,</p>
<pre><code><div id="pager">
<a href="/somepath/1">First</a>
<a href="/somepath/1">Previous</a>
<a class="" href="/somepath/1">1</a>
<a class="Current" href="/somepath/2">2</a>
<a class="" href="/somepath/3">3</a>
<a href="/somepath/3">Next</a>
<a href="/somepath/20">Last</a>
</div>
</code></pre>
<p>and I want it to be changed as follows within browser.</p>
<pre><code><div id="pager">
<a href="/somepath/1?a=text">First</a>
<a href="/somepath/1?a=text">Previous</a>
<a class="" href="/somepath/1?a=text">1</a>
<a class="Current" href="/somepath/2?a=text">2</a>
<a class="" href="/somepath/3?a=text">3</a>
<a href="/somepath/3?a=text">Next</a>
<a href="/somepath/20?a=text">Last</a>
</div>
</code></pre>
<p>So that I can use the "a" data values to next page.
Can any one give me the code, which does the appends inside </p>
<blockquote>
<p><code>div id="pager"</code> -> <code><a></code> -> <code>href="</code></p>
</blockquote>
<p>and i wants to remove the added text with another onChange event.</p>
<p>Thanks in advance</p>
| 0non-cybersec
| Stackexchange | 603 | 1,343 |
jQuery plugin template - best practice, convention, performance and memory impact. <p>I've started to write few jQuery plugins and figured it'd be nice to setup my IDE with a jQuery plugin template. </p>
<p>I have been reading some articles and posts on this site related to plugin convention, design, etc.. and thought I'd try and consolidate all of that.</p>
<p>Below is my template, I am looking to use it frequently so was keen to ensure it generally conforms to jQuery plugin design convention and whether the idea of having multiple internal methods (or even its general design) would impact performance and be prone to memory issues.</p>
<pre><code>(function($)
{
var PLUGIN_NAME = "myPlugin"; // TODO: Plugin name goes here.
var DEFAULT_OPTIONS =
{
// TODO: Default options for plugin.
};
var pluginInstanceIdCount = 0;
var I = function(/*HTMLElement*/ element)
{
return new Internal(element);
};
var Internal = function(/*HTMLElement*/ element)
{
this.$elem = $(element);
this.elem = element;
this.data = this.getData();
// Shorthand accessors to data entries:
this.id = this.data.id;
this.options = this.data.options;
};
/**
* Initialises the plugin.
*/
Internal.prototype.init = function(/*Object*/ customOptions)
{
var data = this.getData();
if (!data.initialised)
{
data.initialised = true;
data.options = $.extend(DEFAULT_OPTIONS, customOptions);
// TODO: Set default data plugin variables.
// TODO: Call custom internal methods to intialise your plugin.
}
};
/**
* Returns the data for relevant for this plugin
* while also setting the ID for this plugin instance
* if this is a new instance.
*/
Internal.prototype.getData = function()
{
if (!this.$elem.data(PLUGIN_NAME))
{
this.$elem.data(PLUGIN_NAME, {
id : pluginInstanceIdCount++,
initialised : false
});
}
return this.$elem.data(PLUGIN_NAME);
};
// TODO: Add additional internal methods here, e.g. Internal.prototype.<myPrivMethod> = function(){...}
/**
* Returns the event namespace for this widget.
* The returned namespace is unique for this widget
* since it could bind listeners to other elements
* on the page or the window.
*/
Internal.prototype.getEventNs = function(/*boolean*/ includeDot)
{
return (includeDot !== false ? "." : "") + PLUGIN_NAME + "_" + this.id;
};
/**
* Removes all event listeners, data and
* HTML elements automatically created.
*/
Internal.prototype.destroy = function()
{
this.$elem.unbind(this.getEventNs());
this.$elem.removeData(PLUGIN_NAME);
// TODO: Unbind listeners attached to other elements of the page and window.
};
var publicMethods =
{
init : function(/*Object*/ customOptions)
{
return this.each(function()
{
I(this).init(customOptions);
});
},
destroy : function()
{
return this.each(function()
{
I(this).destroy();
});
}
// TODO: Add additional public methods here.
};
$.fn[PLUGIN_NAME] = function(/*String|Object*/ methodOrOptions)
{
if (!methodOrOptions || typeof methodOrOptions == "object")
{
return publicMethods.init.call(this, methodOrOptions);
}
else if (publicMethods[methodOrOptions])
{
var args = Array.prototype.slice.call(arguments, 1);
return publicMethods[methodOrOptions].apply(this, args);
}
else
{
$.error("Method '" + methodOrOptions + "' doesn't exist for " + PLUGIN_NAME + " plugin");
}
};
})(jQuery);
</code></pre>
<p>Thanks in advance.</p>
| 0non-cybersec
| Stackexchange | 1,064 | 4,058 |
Latency spikes on wifi - power saving measure?. <p>I'm seeing intermittent latency spikes when on wifi, but only when pinging my MBP from another machine and not when pinging from the MBP to another machine. It seems to be causing stuttering with Steam In-Home Streaming. Any suggestions are greatly appreciated!</p>
<p>I feel strongly that this is the Mac and not the networking hardware. I've seen it on multiple access points across different vendors and channels. 2.4G and 5G are both affected.</p>
<p>With wifi logging enabled, nothing is logged in <code>/var/log/wifi.log</code> during the ping test. Location services are disabled, and I'm not clicking on the wifi icon during the test. I have tried resetting the SMC.</p>
<p><strong>Update</strong>: Shown below is the minimal example. I have run this test many times and for long durations. I have been constantly ingesting ping data into InfluxDB using Telegraf. <a href="https://imgur.com/a/SsQ29UD" rel="nofollow noreferrer">Here</a> is the last 7 days, where the orange is my MacBook. There are a couple other anomalies present, but it's clear the high latency has been occurring for a while.</p>
<p><strong>Update 2</strong>: Wireshark on the MBP shows ICMP "Response Time" as consistently < 0.1ms during the test. I believe it's looking at the time between when it sees the request come in from the reply go out.</p>
<p>Here's the test. <code>192.168.1.242</code> is my MBP. After quitting (nearly) every application:</p>
<pre><code>craig@pluto ~> ping 192.168.1.242 -i 2
...
22 packets transmitted, 22 received, 0% packet loss, time 78ms
rtt min/avg/max/mdev = 1.037/*22.550*/*89.237*/28.546 ms
</code></pre>
<p>But outgoing pings are fine:</p>
<pre><code>craig@Craigs-MBP ~> ping 192.168.1.3 -i 2
...
266 packets transmitted, 266 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.909/1.526/8.716/0.686 ms
</code></pre>
<p>Now here's something curious. If I rapidly send pings out, the inbound variance disappears!</p>
<pre><code>craig@Craigs-MBP ~> ping 192.168.1.3 -i 0.2
...
417 packets transmitted, 417 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.984/1.469/3.799/0.290 ms
</code></pre>
<p>(while the above is running)</p>
<pre><code>craig@pluto ~> ping 192.168.1.242 -i 2
...
38 packets transmitted, 38 received, 0% packet loss, time 147ms
rtt min/avg/max/mdev = 1.001/*1.664*/3.758/0.767 ms
</code></pre>
<p>Given this, my best guess is there is some kind of power saving mechanism turning off the radio.</p>
<pre><code>craig@Craigs-MBP ~> pmset -g
System-wide power settings:
Currently in use:
standbydelaylow 10800
standby 1
womp 0
halfdim 1
hibernatefile /var/vm/sleepimage
powernap 1
gpuswitch 2
networkoversleep 0
disksleep 10
standbydelayhigh 86400
sleep 0
autopoweroffdelay 28800
hibernatemode 3
autopoweroff 1
ttyskeepawake 1
displaysleep 10
highstandbythreshold 50
acwake 0
lidwake 1
</code></pre>
<p><a href="https://i.stack.imgur.com/Ocdh2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ocdh2.png" alt="enter image description here"></a></p>
<p><a href="https://i.stack.imgur.com/ltBIN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ltBIN.png" alt="enter image description here"></a></p>
<p><a href="https://i.stack.imgur.com/GHSXd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GHSXd.png" alt="enter image description here"></a></p>
<p><strong>Update 3</strong>: Here are two simultaneous packet captures with the "same" ICMP packet highlighted. The left was captured using <code>tcpdump</code> on the Ubiquiti UniFi access point that my MBP is connected to, and the right was captured on the MBP. You can see the sequence number is the same. But the calculated response time from the access point's point-of-view is relatively high at 71 ms, while the MBP saw < 1 ms between the request and the response.</p>
<p><a href="https://i.stack.imgur.com/t1dDe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t1dDe.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange | 1,359 | 4,293 |
How to add placeholder text with search icon on jQuery data tables. <p>I'm using jQuery data tables and I want to display "search" text with search icon inside search input box as placeholder. I managed add the text. Please advice me how to add placeholder image</p>
<pre><code>$(document).ready(function() {
$('#example').DataTable({
oLanguage: {
sSearch: ''
},
"aoColumnDefs":[{
'bSortable':false, 'aTargets':[3]
}
]
});
function InitComplete(oSettings) {
$('#example_filter')
.contents()
.filter(function() { return this.nodeType == 3 })
.replaceWith('Refine search: ');
}
$('.dataTables_filter input').attr("placeholder", "Search");
</code></pre>
<p>I need to know, how to add image something like <code>'<i class='icon-search'></i>'</code> </p>
| 0non-cybersec
| Stackexchange | 257 | 971 |
jquery mobile, disable all button when loading overlay is showed. <p>Actually i can call this code</p>
<pre><code>$(":input").attr("disabled",true); //Disable all input fields
</code></pre>
<p>to disable all buttons on my page. But i don't know how good is the performance when i have a lot of button on my page.</p>
<p>I saw a trick that we create a loading indicator overlay, which is above all element on the page => user can not click on the buttons anymore</p>
<p>is there any way to reuse the loading overlay of jquery mobile to archive the above trick? I'm not good at CSS so hopefully someone can help me.</p>
<p>Thanks</p>
<p><strong>Edited:</strong></p>
<p>i ended up with using jquery.blockUI plugin for jQuery and it works as expected.
And i added the default div with css from jquery mobile so that i still have the loading message of jquery mobile and the behaviour that i wanted</p>
<p><a href="http://jsfiddle.net/peacemoon/rRKRr/3/" rel="noreferrer">Working sample here</a></p>
| 0non-cybersec
| Stackexchange | 284 | 1,003 |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange | 349 | 1,234 |
Is there a specification for the "BEGIN RSA PRIVATE KEY" format?. <p>Until now I didn't find a specification (RFC or similar) for the file format that uses the BEGIN RSA PRIVATE KEY prefix and END RSA PRIVATE KEY suffix. Where is it defined? Is there an official name for it? It seems to be at least related to the series of PEM RFCs. </p>
<p>I am looking for reference information about the details of whitespace handling,
base64 details, joining of different keys in one file etc..</p>
<p>This question is NOT about the ASN encoding of the payload.</p>
| 0non-cybersec
| Stackexchange | 150 | 568 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.