Insuevi

- friends
2,046 link karma
2,780 comment karma
send messageredditor for
what's this?

TROPHY CASE

Said goodbye to my companion of 11 years today. We had a good run, but i needed to upgrade. You did good, buddy. by jonthedoorsin battlestations

[–]Insuevi 0 points1 point ago

I had an eMachines like this, but I didn't like it because the fans were louder than a monster truck show.

Redundancy at its finest. by excelciorin fffffffuuuuuuuuuuuu

[–]Insuevi 0 points1 point ago

You too?

I laughed quite a bit to myself whilst drawing this... by tudormorrisin funny

[–]Insuevi 2 points3 points ago

I'm the same, but my hearing aids are a bit older. I actually looked into bluetooth hearing aids a few months ago. They have quite the price tag on them...

Question, is it one or both ears that have bluetooth hearing aids? It seems like if it were both, there'd be a minuscule but noticeable latency between them that would drive someone nuts.

Keep going or cut losses? by Rich6031-5in gamedev

[–]Insuevi 1 point2 points ago

So... Q*Bert?

Today I witnessed a young man get rejected by his parents in public for being gay. What's the saddest thing you've witnessed happen to someone else in public? by Pixshelin AskReddit

[–]Insuevi 4 points5 points ago

Oh. Well, I figured I'd throw that possibility out there because it sounded a lot like what happened to me.

Today I witnessed a young man get rejected by his parents in public for being gay. What's the saddest thing you've witnessed happen to someone else in public? by Pixshelin AskReddit

[–]Insuevi 277 points278 points ago

They might be in a long-distance relationship.

This exact scenario happened to me - I had visited my girlfriend for about 4 days for the first time, but I had to go back home. That last day, we hadn't slept and I had to get on the bus in the morning. It had me in tears, and my girlfriend full-on bawling her eyes out as the bus drove away.

We're living together now, so no worries.

is maple story outdated? by lalalamoo1in Maplestory

[–]Insuevi 0 points1 point ago

I didn't really like Wonderking.

Haven't played in 3 years; interested in coming back, but I'm totally lost. by Insueviin Mabinogi

[–]Insuevi 0 points1 point ago

I'll look through the wiki and do some of the quests. I quit sometime after G3 came out, I think. What are we on now? Are the main storyline quests free or do I need to subscribe to the Nao service to participate?

Haven't played in 3 years; interested in coming back, but I'm totally lost. by Insueviin Mabinogi

[–]Insuevi 0 points1 point ago

About the races/classes, I see something on the home page about Merchants. I dunno what that is.

Is Commerce done through NPCs buying stuff or people? How is it different than regular shops?

I was never concerned about equips before except for my bow, so I guess that hasn't changed much.

Racist Jokes by Xevausin Jokes

[–]Insuevi 8 points9 points ago

And the bulb for being broke.

What's the most secure & efficient way to let users upload images using PHP? by DavidTheExpertin learnprogramming

[–]Insuevi 1 point2 points ago*

There's a function called getimagesize that returns more than just the image size. It returns the width & height in pixels, the image type, a string containing HTML size attributes and the mime type. This function also works with external URLs from the web.

$photo = $_FILES['photo'];
if ($photo != null && $photo["size"] > 0) {
    if ($photo["size"] >= 512000) die("Image size is >500kb."); 
        // size in bytes you want to limit, in this line it is 500kb

    $imageData = getimagesize($photo["tmp_name"]);
    if ($imageData === FALSE || 
        !($imageData[2] == IMAGETYPE_GIF || 
          $imageData[2] == IMAGETYPE_JPEG || 
          $imageData[2] == IMAGETYPE_PNG)) die(); // unsupported file type

    $width = $imageData[0];
    $height = $imageData[1];
    if ($width > 100 || $height > 100) die("Image dimensions are too large."); 

    $ext = ".png";
    $filename = $_SESSION['user']['username'] . $ext;
    $path = '../images/users/' . $filename;

    if (!move_uploaded_file($photo["tmp_name"], $path)) die("Unable to save the image.");

    // now you have a file successfully uploaded at $path
}

Note that this is just basic sample code. You may want to refine it further for your uses.

So long as you verify that the file is, in fact, an image (by checking the IMAGETYPE/mime type), you should be alright.

Why do you guys care so much about hitting level 100, or 120, or whatever? by requiemswordin Maplestory

[–]Insuevi 0 points1 point ago

MS has gotten exactly two experience curve changes, the first being in August 2009. You can check out some statistics in this archived thread.

The second was Big Bang, as seen here. Statistics can be seen here.

What's funny is that in 2009, they had the exact same complaints that we have now. Look through that GameFAQs thread I have linked above. People are saying that Nexon made the game too easy and that leveling isn't as special as it used to be.

This whole "too easy" argument is nothing new. People complained when 2x cards were first released, saying it undermined the "challenge" of leveling. Hell, there were people that actively boycotted 2x cards and had their Sleepywood.net signature list "Legit" (i.e., that they didn't level using the cards).

Do you know how asinine that sounds?

It's a video game - it shouldn't take 2 years to get to a point where you can fight bosses reasonably well.

The guy in the porno keeps talking. by gourmetburgerin firstworldproblems

[–]Insuevi 17 points18 points ago

Good Girl Gina.

Google never ceases to amaze me by xi_mezmerize_ixin technology

[–]Insuevi 0 points1 point ago

Put backticks (`) in front of and at the end of your equation.

How do you use your curly brackets? by Kalsifurin learnprogramming

[–]Insuevi 0 points1 point ago

It's not hard to change the settings in VS to K&R style. I have to do it with each new install of it because I don't like the default Allman style it comes with. I learned on Java, so that's probably why.

Tools > Options > Text Editor > C# > Formatting

Starting C#. Trouble with "This". by InCraZPenin learnprogramming

[–]Insuevi 3 points4 points ago

The this keyword is relatively language-agnostic, as many other OOP languages use it (Java and C++, for example).

Anyway, this basically refers to the object's instance of itself. It can be useful in 3 different ways. Let's define a basic program:

namespace Example 
{
    class Program 
    {
        static void Main(string[] args) 
        {
            Dog d = new Dog("Fido");
            d.PerformAction();

            Console.ReadKey();
        }
    }

    public class Animal 
    {
        string Name { get; set; }
        public Animal(string name) 
        {
            this.Name = name;
        }

        public virtual void Speak() 
        {
            Console.WriteLine("grr");
        }

        public static void PrintName(Animal animal) 
        {
            Console.WriteLine(animal.Name);
        }
    }

    class Dog : Animal 
    {
        public Dog(string name) : base(name) { }

        public override void Speak() 
        {
            Console.WriteLine("woof");
        }

        public void PerformAction() 
        {
            Speak();
            this.Speak();
            base.Speak();

            Animal.PrintName(this);
        }
    }
}

This program gives us the following output:

woof
woof
grr
Fido

Why? It requires a basic understanding of the keywords this and base. To understand base, you need to know what derived classes are and when to use them. Basically, the derived class in this case represents an "is-a" relationship between the two; that is to say, a Dog "is a" Animal, which it is.

This means that Dog will take on the methods of the parent class (in this case, Animal) as well as explicitly calling methods from its parent class even though the subclass may have overridden it.

The use of derivative classes is a bit of a long subject, and I don't know how much you've read into it in your book, but it's important stuff to know.

Anyway, let's look at the program flow. In our Main method, we are instantiating a Dog object, and passing it a string parameter of "Fido". This creates a new Dog object.

The Dog constructor has a suffix of base(name). This means that the constructor for Animal will be used and provided with that parameter. In the Animal class, this sets the Name property to "Fido". Since the Dog "is a" Animal, the Dog class possesses its own property called Name which is now set to "Fido".

Note the use of the keyword this in the constructor for Animal. In this case, this is simply a reference to the current object, which is actually of type Dog. You could actually omit the this and simply put Name = name; for that line. When you are only referencing properties or variables, this is simply syntactic sugar; that is, it doesn't actually do anything, but makes the code a little cleaner and its intentions more obvious.

So now we have a Dog object set up. The next line in the Main method is d.PerformAction();.

The PerformAction() method here is unique to the Dog class. An Animal cannot call it, but a Dog can.

Try to follow along with the flow of the code here.

The first line in the method is Speak();. This prints "woof". Why? Because it is calling the Dog's overridden method, overriding makes the method unique to the Dog class, so it speaks.

The second line in the method is this.Speak();. This also prints "woof." Why? Because it's exactly the same as calling the method by itself. Much like properties and variables, calling this.Method() is the same as calling simply Method() in an object. This has its advantages though; and is preferred if you are doing any type of class derivation, because it makes it more explicit whether or not you mean to call the overridden method or the parent class method.

The third line is base.Speak();. This prints "grr". Why? Because it is calling the base class method, i.e, the Animal class's Speak() method. You explicitly told the class to not call the overriden method.

The last line is Animal.PrintName(this); This prints "Fido". Why? Well, one thing to note is that this is a static method, and as such, it cannot be called from an object reference, and must be called from the class itself. It takes in a parameter of type Animal, and a Dog is of type Animal. If you remember back to the constructor, the Dog has its own Name property which was set to "Fido". The PrintName() method prints the object's Name property. So it prints "Fido". You can use this to pass to an external method a reference to your object so that it can do something with it.

One caveat: this cannot be used inside of any static classes or methods, because this is an internal object reference, and static classes/methods, by definition, are decoupled from any particular object.

I don't know how well I've explained this. It's one of those things where you have to use it a bit to really get a feel for when and where it would be useful, and why. Once you program for a bit, go through some books and/or tutorials, its purpose will become obvious.

Hope that helps.

Microsoft Censors Pirate Bay Links in Windows Live Messenger - Apparently, the company is actively monitoring people’s communications to prevent them from linking to sites they deem to be a threat. by DrJulianBashirin technology

[–]Insuevi 1 point2 points ago

They also blocked any links that contained the text "download.php/.html" within it.

It's just an anti-spam measure as a ton of people get their accounts hacked and the IM service used to spam malicious links.

Importing source files into Eclipse by Insueviin learnprogramming

[–]Insuevi[S] 0 points1 point ago

I was able to install Subclipse. It was frustrating as hell because it gave me a bunch of cryptic error messages ("no main method found" when I clearly had Main.java → main(string[] args) defined), but it works beautifully now.

I'll try anything once!! Reddit, what is something that you tried once that you will never, ever try again? by The_Distractedin AskReddit

[–]Insuevi 0 points1 point ago

When I tried salvia, everything lost its depth and solidity. For example, the closet door looked like wavy (like a curtain), and the inside of the closet looked like a bottomless pit that went on forever.

Everything was also hilarious and I couldn't stop laughing, although my friend was being a dick about it ("there's no way you're tripping, you're just faking it").

This only lasted like 5 minutes. Would totally do it again.

What is a gay man's favorite DOS command? by squidsandwichin Jokes

[–]Insuevi 1 point2 points ago

man finger

view more: next