Versace Jeans for Men, RM 170

Yeap, no kidding. The title says all: original Versace jeans for men, only at RM 170. A friend of mine offered if to me, says it normally retails at 1k plus. What’s the catch? They’re stolen goods.

Sure enough there’ll be many people who seize the opportunity to buy it. Hell, I’d even consider it if I had RM 170. But let’s think from a brand concious person’s point of view. Anyone who sees me wearing a pair of Versace jeans would surely think it’s a rip-off or something.So why should I buy one?

Secondly, I’d rather add another 40 or 50 and get some original Levis. I don’t know about the Versace, but the RM 80 Padini jeans I have feels comfortable enough (even more if you wash it with some softener). Hence a paif of Levis would be probably make me feel in heaven. Okay, maybe that’s a little too exaggerated, but it’ll still be super comfy right? So why the need for a stolen Versace? It only encourages people to steal more.

However, what if there were stolen computer components such as memory modules and processors? What if I get an offer for 512 MB of DDR-RAM at 80 bucks? That’s half the standard retail price out there. I’d sure be very tempted. What about you? Would you buy stolen merchandise?

I’d have a couple of days to ponder about it. Am leaving to spend the weekend with s00kwei. Hope Transporter 2 is nice.

Tags:

Barbecue cum Steamboat?

The Leadership Training Camp “Friends Gathering” dinner was held at Restoran Talipon (don’t ask me about the name) tonight. It’s like a little “celebration” amongst the organizing committees and participants. So on with the restaurant…

Barbecue cum Steamboat

Located in a relatively remote part of Genting Klang (you’ll never know it’s there if you stay nearby), it’s a all-you-can-eat kinda restaurant, though the atmosphere is more like a coffee shop. I would call it sort of a scaled down, DIY teppanyaki and steamboat, as the picture shows.

At RM 20 per person, it’s not really a bargain either. Unless you can really gobble down tonnes of lamb, prawn and crab. Besides, they only free flow drink is watered-down tea. The worst part was I was already feeling a little not well. But who cares, I paid my money and I’m gonna eat my heart out :p

Setting Element Styles with JavaScript

Since I couldn’t figure out a pure CSS method to perform the rollover effect on the navigation menus, I used JavaScript instead. Besides, it’s much more simple and easier to maintain, rather than a complex mangle of CSS. So to change the curved image from green to pink, I used something like the following to change the CSS background properties:


function naviOver(e) {
	gE('active').style.background = "url(Images/pink.png) top right no-repeat";
}

It worked of course, but I was late to realize that it worked only on the home page, with the rollover images in an Images folder located at /jnls (root folder for my blog). I tried using some alert()s to determine whether the background property was set. The result: it works.

So what could be the darn problem be? Next thing on my mind: the bloody images aren’t loading. After some probing, it turns out then when you set an element’s style with JavaScript, the relative path becomes that of the page. For example, for the page /folder/index.htm, url(Images/pic.png) would refer to /folder/Images/pic.png, and NOT where the original CSS file was located (the wordpress themes folder in my case).

Sigh, so that was what’s wrong. So my solution was to create seperate classes for the normal and hover states for the elements concerned, and use JavaScript to change their classes onmouseover.

gE('active').className = "hover";

That pretty much did the trick. Ease of maintenance ensured at the same time!

Note:

function gE(e) { return document.getElementById(e); }

Tags: , ,

Rounded Corners, an Obsession

Unless you’re using IE, you could see that all corners in my site are - rounded. I just don’t know but it’s sort of an obsession to me. There are beyond doubt dozens of articles at alistapart about rounded corners, as web designers have been fascinated by it for ages. Numerous methods were devised to achieve the effect of rounded corners, even those that require JavaScript.

In a nutshell, there’s no perfect method for it. Using only XHTML and CSS would require a whole lot of nested “containers” to ensure compatibility in IE. A clean XHTML+CSS uses only one container, :before and :after CSS pseudo-elements to round the corners. This, of course, is the desired method, especially if it’s a Firefox fan site. This method is employed extensively at every “corner” in this site. That’s why it looks so “cacat” (Malay term referring to the disabled) in IE.

So while we wait for the next IE version to support :before and :after, some came up with JavaScript to deal with it. A recent one I came across was by Alessandro Fulciniti. It uses JavaScript to add the required number of “containers” to elements that you want to round. One advantage that I can think of is it’s simplicity to the author. This idea can be modified so that the author just needs to specify the image he wants for the top-left corner, for example, and the script goes to work. Or, more technically, the author can specify the exact CSS background values. For example:


addContainer("elementID", "url(Images/top_left.png) top left #CCC no-repeat");
addContainer("elementID", "url(Images/left.png) left #CCC repeat-y");

As you can see, the author has a bird-eyed view of the background images that he’s pilling up underneath the element. I think that it’ll be particularly useful when you have more than just a few rounded corners in your page.

Another cross browser compatible method that I could think of, is to use JavaScript to parse through the CSS, looking for :before and :after pseudo-elements and manually adding them to the page. This method however, is pretty theoretical.

For now, I would say that Alessandro method would be the most desirable as it would allow me to add the left and right shadows to my boxes, hence allowing a fluid layout.

ShortStats

Ever since the very day I started my own site, I’ve always wanted to track my visitors. AwStats doesn’t really work for me as I would need to wait for it to be refreshed by my host, and most importantly, it logs my visits too!!

So I went in search of a PHP-based alternative that would not log my own visits. TraceWatch particualaly impressed me as it was able to track visitors, one by one. And of course, it uses cookies so that I wont be part of “statistics”. But it needs FOUR queries to log each visitor, making it sorta “heavy”.

Then Danny introduced ShortStat to me. A simple Wordpress plugin that logs some simple statistics. However, it also logs my visits. Here’s the best part: I’m on static IP! Unlike Streamyx users who use dynamic IPs, I connect via a network provided at hostel. Thus, I’m assigned a static IP through the NAT protocol on the network (I’m no whiz at network stuff, so excuse the mis-information, if any).

Simply put, I just need to add 2 lines of codes (if you don’t count the curly braces) to stop ShortStat from logging my visits:


if ($ip == "218.208.66.170") {
	return;	// i'm checking my own pages.. don't log me!
}

Ain’t that wonderful?? Hehe… I guess I’ll work on a cookie based mod when I have the time next time. So the next time you visit this page, you’re (meaningful) statistic!

Tags: , ,