JavaScript prototype object not working 3

Posted by Lloyd on May 15, 2010 at 2:46 pm

If you happen to be working on a custom object and using the prototype property of JavaScript to add custom methods but it doesn’t seem to work, the solution is simple, you just need to instantiate your custom object by using the new keyword so all the custom methods through the prototype object are added.

// Sample custom object
var CustomObject = function() {
	this.props = {
			property: 'value'
		}
}
 
CustomObject.prototype = {
	CustomMethod: function() {
		alert(this.props.property);
	}
}
// Instantiate the custom object
var foo = new CustomObject;
// Doing that enables you to do this
foo.CustomMethod(); // alerts 'value'
 
// will not work because the object is not created as a new instance
// prototype methods not yet added to CustomObject
CustomObject.CustomMethod();

HTH :)

Dress for the job you want

Posted by Lloyd on April 25, 2010 at 11:00 am


Credits to Shoebox Blog.

Man in red 6

Posted by Lloyd on April 11, 2010 at 7:29 pm

Hopping along was the man in red,
collecting coins and shrooms.
Stomping enemies right on the head,
from morning to dusk til noon.
Still hopping along, the man in red,
busting up blocks and turtles.
Holding down B, he dashed and he sped,
through all the pits and hurdles.
Reaching the fortress, the man in red,
caught sight of the Princess and Bowser,
Eating a shroom, they went head-to-head,
in a valiant effort to save her.
Saving the Princess and with Bowser dead,
victoriously stood the proud man in red.

~The (B) button

03.20.2010

Posted by Lloyd on March 20, 2010 at 11:51 pm

Hey blog, sorry I’ve been busy lately and haven’t posted in a while I hope you understand. Are we cool? Alright, cool~

Flashback: old home pages

Posted by Lloyd on February 27, 2010 at 4:30 pm

I was checking my files on the server and I saw my old home pages that I’ve created before and thought I have deleted them already. Here they are: (click on the image to see the actual page)

Booo! Nothing here!
Home page when I have completely nothing setup yet.

Open 24/7. Free Admission. No Hidden Charges.
Blog splash screen when I first used Japanese characters as main elements for design. Page will redirect to the blog after 15 seconds.

Agyuku.net
Home page when I decided to close my blog for a while because I got super lazy to update.

Hello! Welcome~
Changed the home page again, I decided to make it blue this time with my in-game character in GoonZu (MMORPG) named agyuku (with his pink pet bunny). This is more like an under construction page because I planned something for my home page and make the blog just a part of it but it didn’t work out. Blog is back up when I used this one.

Lost keys

Posted by Lloyd on February 26, 2010 at 1:46 am

It’s almost 2AM and I’m stuck outside our room at the condo because I lost my keys. Not so sure if I really lost it or I just misplaced it. All I can remember is I still have it before heading home from work. We played PS3 in our lobby for a bit probably I dropped it on the couch or I put it somewhere. This totally sucks. I even called my office mates if they have it but no luck. When I got in our unit good thing when I knocked someone is still awake in the living room. Now just to get inside our room is my problem. I hope someone I texted that collects our bills can bring extra keys.

Update: Nvm I got in already xD

Quick Post 1

Posted by Lloyd on February 25, 2010 at 1:06 am

So quick that I have to hurry typing because I’m running out of load..kthanxbye xD

Update 02.20.2010 4

Posted by Lloyd on February 20, 2010 at 9:34 pm

Ahhh, today I’m not lazy busy so I kinda spent a little time on my blog. Few noticeable changes particularly with header texts, box border / background, and page links while keeping simplicity. I don’t want to completely change everything but adding some colors should give this place some life ^_^

And oh, I’ve added the real me on my sidebar so that guy is me and the japanese characters on the left is my name – lloyd irvin ^_~

Windows 7 know how 4

Posted by Lloyd on February 20, 2010 at 4:20 pm

TIP: If you forgot the password or don’t know the default Administrator account password in Windows 7 Ultimate, use an account with an administrator priviledges and then go to user Accounts > Manage another account and choose Administrator – you must enable it first for it to appear – Run > Type cmd > type in net user administrator /active:yes and should enable the default Administrator account. So, assuming that Administrator account is already enabled and you forgot the password or have really no idea what it is, just select it in User Accounts and click on Change password. Type in the new password and confirm. Log off your current user and log in to the Administrator account using the password you set.

Just found out today (not sure if this is really a solution or I’m just a dumbass) because I didn’t know the password of the default admin and to my surprise you can actually change the password of the default admin using another admin account – which I thought that it shouldn’t be able to since default admin is the Admin of all admins in windows. But thankfully I was able to change it or else I would’ve re-installed again if I wasn’t able to access the default admin account. Sick.

Weekends

Posted by Lloyd on February 20, 2010 at 10:45 am

Right, I love weekends because I can rest and not think too much but I just can’t stay away from the computer. Early in the morning before anything else first thing to do is check Facebook, my email, log in to YM and talk to some friends. Sigh. Still tiring xD

Today I have to get rid of comment and trackback spams and improve search engine optimization (SEO) of this blog. Will do some work now!

3:03am

Posted by Lloyd on February 18, 2010 at 3:03 am

What’s more stressful than being stressed? Going home late like this is like..stressful.

Update (06-26-2010): Fuck it, stress is nothing but a mere thought. I realized during my working hours that me and my teammate at work is actually putting stress to be stressed, muhaha, we can’t be beaten. >:)

Update 02.17.2010 1

Posted by Lloyd on February 17, 2010 at 1:18 am

Another small update. I’ve re-added my blog roll so I can start linking sites again. Now I believe that there are actually real people visiting, lmao. Anyways, if you want to be linked just tell me. Exchange links is now officially re-opened! ^_^

@che, jernilie, ianne: thanks for linking back ^_^
(ililibre ko kayo sa mcdo sige xD)

Hmm..next update, I’ll think about adding a shoutbox. I hope I don’t get lazy.

Avatar 4

Posted by Lloyd on January 24, 2010 at 10:48 pm

Finally, I was able to catch the movie in 3D! Was a great a experience, even not in IMAX, it was still great. Definitely worth watching.

Update 01.23.2010

Posted by Lloyd on January 23, 2010 at 10:57 am

After a long hiatus from this site I finally got me a new update, change the site logo, lmao. Good start I guess. Still seeking for a new blog art and idea so I can revamp the whole thing (theme concept) and get a new feel. Must think about it. Until then, see ya. (Though I’m assuming there’s only about 2-3 people reading this, thanks though).

01.01.2010 1

Posted by Lloyd on January 01, 2010 at 1:00 am

Welcome 2010, the year of the tiger (yea, chinese stuff)! I hope this year will be great for all of us. Have a blast everyone! (I know only and mostly bots/spiders and only few real people are visiting this site, you know who you are).


^ Back to Top