my subscriptions
POPULAR-ALL-RANDOM | LOADING...MORE »
Felix_Dragonhammer commented on a post in r/AskReddit
rainbowspranks 4,596 points

When after 2 days she tells you she loves you... And also proceeds to mention that she loves your green eyes so much that if we ever broken up she would steal them while you sleep and keep them in a jar in her room...

Felix_Dragonhammer 24 points

ಠ_ಠ

serentilla 2 points

Can you provide a small complete program that replicates the problem?

I created a form and dropped a checkbox, radiobutton, textbox and listbox on it. Then added event handlers to the form and one to listbox.

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
    Console.WriteLine("KeyDown");
}

private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
    Console.WriteLine("KeyPress");
}

private void Form1_KeyUp(object sender, KeyEventArgs e)
{
    Console.WriteLine("KeyUp");
}

private void Form1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
    Console.WriteLine("PreviewKeyDown");
}

private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
    Console.WriteLine("KeyDown LB");
}

PreviewKeyDown on the form doesn't fire if a control has focus, but the others do. The ListBox has its own KeyDown and that fires as well as the form one when it has focus.

So more info might help.

Felix_Dragonhammer 2 points

God, I'm an idiot. Didn't think that form controls key events would interfere with the form key events if I didn't define them. Fixed it by having the control key event point to the form key event.

Thank you!

Felix_Dragonhammer commented on a post in r/Jokes
Old_Deadhead 2 points

Oops, mother, not grandmother. I'm not sure the other is biologically possible.

Felix_Dragonhammer 2 points

Youngest recorded human mother was 5 years old, I believe.

Felix_Dragonhammer commented on a post in r/gifs
Jade-Rex 109 points

I love those at haunted houses! The first time I experienced it I thought it was actually rotating and I remember thinking, how was this in their budget? and then if I go upside down, I'm suing.

My friend had to drag me out.

Felix_Dragonhammer 0 points

Found the american :P

insertAlias 2 points

Also wanted to mention: this code is really weird:

while (dr.Read())
{ 
    results = (from IDataRecord r in dr select (string)r["word"]).ToList();
} 

You should either use the while loop and iteratively add results to a list, or use the LINQ expression, but not both.

Basically, the LINQ is casting the SqlDataReader to an IEnumerable<IDataRecord> and getting all its records at once. But SqlDataReader.Read() reads a row at a time. So what you're actually doing is for every row, you convert the entire dataset into a collection, then overwrite for the next row, then the next, until there are none left, turning the entire thing into an O( n2 ) operation.

If you're going to use ADO.NET, I'd avoid the LINQ expression, as its confusing, difficult to debug, and completely unnecessary; you could re-write that part like this:

while(dr.Read())
{
    results.Add((string)dr["word"]);
}

Which is very much more readable.

Felix_Dragonhammer 1 point

I've made your suggested changes, and I've done some experimentation.

As stated before, when I use 'cat%' as static value in the stored procedure, I get the desired outcome.

When I use @word + '%', it has absolutely no effect on the outcome as far as I can tell, regardless of what value I assign @word on the c# side, even if I use a % symbol in the string argument.

Playing with the string argument I pass in the AddWithValue statement has led to some interesting results. Basically my conclusion is that the query will then treat it like a single character wildcard. For example "c%%" returns a list of three letter words that start with "c". "c%%e" returns a list of 4 letter words that starts with "c" and ends with "e".

I tried replacing % symbols with _ symbols just for a lark and got the same results. However, using @word + '_' returns no results, which is odd because @word + '%' had no discernible effect on the results.

Felix_Dragonhammer 1 point

Also interesting to note that while "%cat%" returned, among other words, "DUCAT", "%cat" only returned "SCAT" and "CAT".

Load more comments
Felix_Dragonhammer commented on a post in r/todayilearned
wes9523 43 points

It's unsolvable right now because we don't know the angle at which the catapult launches them, unless it can be assumed that all catapults launch at 45 degrees or some shit.

Felix_Dragonhammer 1 point

Furthermore, are the monkeys being launched passively or are they jumping off at the end?

Felix_Dragonhammer commented on a post in r/Showerthoughts
ABCs_inminorkey 265 points

Ancestors have needs

Google knows all your secrets

Refrigerator.

Felix_Dragonhammer 76 points

What happened to the haiku bot?!?

QwertymanJim 39 points

It was crap

Felix_Dragonhammer 2 points

I liked it because it was interesting how often a comment was unintentionally a haiku.

Felix_Dragonhammer commented on a post in r/AskReddit
TJeffersonsBlackKid 794 points

What the hell Bible are you reading?

Felix_Dragonhammer 2 points

Another interpretation is ass = donkey. I still don’t understand the reference, though.

JohnnyValet 8 points

Do not regret growing older. It is a privilege denied to many.

Felix_Dragonhammer 5 points

Oh, I agree. It’s so annoying when people who bemoan growing old will turn around and lament the loss of someone who “was only” their same age or thereabouts.

ToddWagonwheel 20 points

So that's why all my birthday cards always say "Most improved."

Felix_Dragonhammer 9 points

Lucky you. Mine always say “Best Attitude”

Felix_Dragonhammer commented on a post in r/AskReddit
h3tty 112 points

I was kind of a "nice guy" in high school and even early college. I never really pursued anyone but i definitely thought I was the nice one and girls never seemed to like me, and the rest of the guys they liked were pieces of shit. I thought being nice meant not asking for sex and being there for girls and helping them. And then being resentful when they wouldnt want me. Fortunately I grew out of it and realized I was just another asshole who was lying to themselves and probably making women uncomfortable. Sex/dating isnt something you get in return, and trying to be "nice" to earn it just makes you the creep who clearly has ulterior motives and lacks the confidence to be upfront.

Felix_Dragonhammer 1 point

This is me now. I think. Is the key part not being resentful? I try to be nice, and respectful when people show their disinterest. I would be lying if I said it didn’t upset me, though I try to make sure those feelings are suppressed.

I just feel so lonely, though.

view more:
next ›
2,451 Karma
275 Post Karma
2,176 Comment Karma

Following this user will show all the posts they make to their profile on your front page.

About felix_dragonhammer

  • Reddit Birthday

    September 10, 2016

Other Interesting Profiles

    Want to make posts on your
    own profile?

    Sign up to test the Reddit post to profile beta.

    Sign up