text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Linking Two database to execute join query. <p>I have a remote odbc connexion and an MySQL database in my localhost i ask if there is a way to execute a join query ( linking the two database ) ? </p> <p>thanks.</p>
0non-cybersec
Stackexchange
I'm agog.
0non-cybersec
Reddit
World Wide Wrestling 2nd Edition!.
0non-cybersec
Reddit
Keep it up!.
0non-cybersec
Reddit
How can I share the XBMC video library in two OSes, in the same computer?. <p>I dual boot, and that would be very nice.</p> <p>I use Windows 7 and Crunchbang Linux by the way.</p> <p>I googled this question and all I got was how to sync the library between two devices - and that's not what I want to do.</p>
0non-cybersec
Stackexchange
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
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
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
The Anti-Trump Campaign Starts to Get Real.
0non-cybersec
Reddit
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> &lt;?php class Namespace_Module_Block_Datefield extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { // ----&gt; Am I wrong in calling ..._Abstract? Should I call Varien_Data_Form_Element_Date? I've tried but no success either... $this-&gt;setElement($element); $html = // ------------------&gt; what to put here? Call a block or some other method? -&gt;setFormat('d-m-Y') -&gt;setLabel($this-&gt;__('Choose date')) -&gt;toHtml(); return $html; } } ?&gt; </code></pre> <p>Do you have a trick on how to do that ?</p> <p>Thanks a lot. Hervé</p>
0non-cybersec
Stackexchange
Scumbag Loading Bar.
0non-cybersec
Reddit
Garage overhead storage lofts. Complete build album!.
0non-cybersec
Reddit
Get Parent directory of a specific path in batch script. <p>Hi I have full file path in a variable of batch file. How to get its first and second level parent directory path?</p> <pre><code>set path=C:\SecondParent\FirstParent\testfile.ini </code></pre>
0non-cybersec
Stackexchange
skroweriF.
0non-cybersec
Reddit
Trump Will Choose Romney Secretary of State.
0non-cybersec
Reddit
Buying a Canon 5D, anything specific to look out for?. Similarly to another post about upgrading to a D90, I am looking to buy a Canon 5D and have found a few potential sellers on CL. I was just wondering if there is anything specific to look out for in terms of damage on this camera? I will be bringing a laptop to check shutter actuations and I will run the camera through its paces to make sure everything works. I'm just wondering if anyone has anything they think I might miss? Thanks!!
0non-cybersec
Reddit
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
Meta-meta-meta-meta-meta-meta-meta-criticism [bestof].
0non-cybersec
Reddit
Is anybody worried about the online population of multiplayer games?. For the first couple months at least. I plan to play Ghosts and B4 and I think the population will be scarce. Does anybody know if ps3 and ps4 players will be able to play with each other?
0non-cybersec
Reddit
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
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
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>... &lt;body&gt; &lt;hello-world&gt;Loading...&lt;/hello-world&gt; &lt;hello-world&gt;Loading...&lt;/hello-world&gt; &lt;/body&gt; ... </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: '&lt;h1&gt;Hello {{ item }}&lt;/h1&gt;' }) export class AppComponent { items: Array&lt;number&gt;; 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&lt;number&gt;; 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: '&lt;h1&gt;Bye World&lt;/h1&gt;' }) export class ByeWorld { constructor() { } } </code></pre>
0non-cybersec
Stackexchange
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
Everything you wanted to know about orgasms and semen. Thanks, TED..
0non-cybersec
Reddit
Adding a username alias using the command line. <p>How do I add a username alias using the command line?</p> <p>I can do it fine using the preferences dialog through the "Advanced Options", but I need to do it during an installation script. </p> <p>Can someone point me the right way?</p>
0non-cybersec
Stackexchange
What do young single mothers expect?.
0non-cybersec
Reddit
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
Started a writing prompt blog to practice. ficprint.tumblr.com
0non-cybersec
Reddit
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
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
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
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
Pentagon receives orders to plan military parade for Veterans Day.
0non-cybersec
Reddit
Tor upgrades to make anonymous publishing safer.
1cybersec
Reddit
A friend of mine who suffers from long term memory loss went to an employment agency to find what work he's suited for.. Today he became chief moderator for r/jokes.
0non-cybersec
Reddit
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
How to keep your car out of the mechanic's garage.
0non-cybersec
Reddit
Dez Bryant buys everyone in line at Walmart a PS4.
0non-cybersec
Reddit
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
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 &gt;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
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
Your mental illness doesn’t excuse your behavior! You hate people ? Don’t work customer service .. Quit ruining everyone’s lunch break! We’re not out to make your life difficult , we just want to eat! You get paid pretty well to stand around being a jerk and making strangers feel uncomfortable . If you lack social skills stop working customer service ! But I guess ultimately it’s your manager’s fault ... ugh
0non-cybersec
Reddit
Extending an embedding from a compact submanifold. <p>Suppose $X, Y$ are smooth manifolds, $Z \subset X$ a compact submanifold and $f: X \rightarrow Y$ a smooth map such that the restriction of $f$ to $Z$ is an injective smooth immersion. As $Z$ is compact, the restriction is actually a smooth embedding.</p> <p>Is it true that $f$ is a smooth embedding in some open neighbourhood of $Z$, and if so, how can this be seen?</p>
0non-cybersec
Stackexchange
SECCON Quals 2015 CTF Writeups.
1cybersec
Reddit
ITAP of a doorway inside Hassan II Mosque (Morocco) .
0non-cybersec
Reddit
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-&gt;Posts-&gt;find()-&gt;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-&gt;Posts-&gt;find-&gt;contain([ 'Stars' =&gt; function($q) { return $q-&gt;select(['total' =&gt; $q-&gt;func()-&gt;count('Stars.post_id')]); } ]); //I've also tried this ... ...$q-&gt;select(['total' =&gt; "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
Republicans Say The Size Of Your Tax Refund Doesn’t Matter.
0non-cybersec
Reddit
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
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
[SPOILERS] "The Lone Wolf" - Arya fanart by me.
0non-cybersec
Reddit
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
Girl kills lion... feeds the poor.. wait WHAT?.
0non-cybersec
Reddit
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&gt;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
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 =&gt; 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 =&gt; !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
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&lt;IHttpActionResult&gt; 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
It never took off .....
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
Outlook - Out Of Office can&#39;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
Small metal thing with a sprung pin inside the screw thread.
0non-cybersec
Reddit
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
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
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
The most brilliant & powerful AIDS Awareness video ever filmed: Sidaction | The Human Hourglass. [NSFW warning due to nudity].
0non-cybersec
Reddit
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
Sorry for the headache bug what do you think can you rate this 1 at 10.
0non-cybersec
Reddit
Jaden Smith "Icon" Official Lyrics & Meaning | Verified.
0non-cybersec
Reddit
It was funny because I read this in his original voice still.
0non-cybersec
Reddit
When I listen to examples of early modern English or even original pronunciation Shakespeare it sounds more like back woods Appalachian (American) than modern British to me... is there any truth to this?.
0non-cybersec
Reddit
Prevent organization&#39;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
Was looking for a decent cubone for my US run, when this appeared.... Been running around in this spot for a while now looking for a decently natured cubone and hadn't seen a single Kangashan in that time. The first one that pops up just so happens to be a shiny! Turns out they only have a 1% encounter rate in this area. Pretty lucky! https://imgur.com/gallery/PpFtx
0non-cybersec
Reddit
Synchronized Ski Jump.
0non-cybersec
Reddit
(OC) Height comparisons bother me more than they should.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
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
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>&lt;?php $usercontent = $_GET['usercontent']; mail("[email protected]", "My Subject", "My body with $usercontent included"); ?&gt; </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
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
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
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
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
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
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
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
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
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>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;blink point&lt;/title&gt; &lt;script src="js/raphael.js"&gt;&lt;/script&gt; &lt;!--&lt;script src="https://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js"&gt;&lt;/script&gt;--&gt; &lt;script type="text/javascript"&gt; 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&lt;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&lt;20; i++){ //Try fading them out //pointList[i].animate({opacity: 0}, 1000 ); } }; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="holder"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </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
Club Penguin Final Moments.
0non-cybersec
Reddit
Someone please write the screenplay of this man's story!.
0non-cybersec
Reddit
Predatory caterpillar.
0non-cybersec
Reddit
Help with WPA2 wifi password hack using a MacBook Pro?. Any help or tutorial links would be extremely helpful! Thanks in advance!
1cybersec
Reddit
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) -%} &lt;p&gt;{% trans %}termsAndConditions.paragraph. {{ i }}{% endtrans %}&lt;/p&gt; {%- endfor %} </code></pre> <p>// and tried...</p> <pre><code>{% for i in range(1,termsAndConditions.paragraph|length) -%} &lt;p&gt;{{ 'termsAndConditions.paragraph.' ~ i ~ |trans }}&lt;/p&gt; {%- endfor %} </code></pre>
0non-cybersec
Stackexchange
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>&lt;GroupBox Header="Phase Management"&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;ColumnDefinition Width="5"/&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="70*"/&gt; &lt;RowDefinition Height="30*"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Button&gt;Test column 0&lt;/Button&gt; &lt;GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="#FFFFFF" ResizeBehavior="PreviousAndNext"/&gt; &lt;Button Grid.Column="2"&gt;Test column 2&lt;/Button&gt; &lt;/Grid&gt; &lt;/GroupBox&gt; </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
Within Temptation - Angels [Symphonic Metal].
0non-cybersec
Reddit
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
Brigitte Super Jump Trick - How To Video.
0non-cybersec
Reddit
.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 &amp;= 0xffff; return (data &gt;&gt; bits | data &lt;&lt; (16 - bits)) &amp; 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 &lt;&lt; 16); } </code></pre> <p>ExchangeLongBits</p> <pre><code> private static uint ExchangeLongBits(uint data, int bits) { return data &gt;&gt; bits | data &lt;&lt; (32 - bits); } </code></pre>
0non-cybersec
Stackexchange
After over 2 years of work, we're finally releasing our first game, Fictorum, tomorrow..
0non-cybersec
Reddit
Would hate to be that cat.
0non-cybersec
Reddit
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application. I need to scale my app adding some spot instances that EB do not support.</p> <p>So I create a second autoscaling from a launch configuration with spot instances. The autoscaling use the same load balancer created by beanstalk.</p> <p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p> <p>This work fine, but:</p> <ol> <li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p> </li> <li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p> </li> </ol> <p><strong>UPDATE</strong></p> <p>Elastic Beanstalk add support to spot instance since 2019... see: <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
0non-cybersec
Stackexchange
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&amp;rs=en-US&amp;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
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
Fffffffffuuuuuuuu......!.
0non-cybersec
Reddit