Posts

Showing posts from July, 2013

Logan

Image
It's been a long time since I wrote a personal entry in my blog. But I guess, having no girlfriend is way too long if you compare the two. It's not that I'm bitter with my past relationship but I've been happy without having it. I don't know maybe I'm just too busy with my studies, or maybe not. One thing that I've learned about my past relationship is, if you love someone, show it properly. Do not attempt to hurt her for an experiment. Love can't be measure with how many love letters you've sent, and mostly it can't be measure in years. I believe that love is immeasurable, it is PERSONAL and mostly comes and goes in many forms. It's like, you're late in your exam but you saw an old woman crossing on the street and you decided to help her. It could be love, it is love for me. For others, it is a duty of a moral person. But for some, maybe just an ordinary help. Anyway, let's go back with happiness. I'm happy, period. But, isn...

Change Background Depends on the Time of the Day

The body background changes at  12:01 am-6:00am (sunrise.jpg) , 6:01am to 12:00nn (day.jpg), 12:01pm - 6:00pm (sunset.jpg)  and 6:01pm to 12:00mn (night.jpg). Here's the code:

JQuery: Finding Object in the Room

This is a simple application of "addClass", "removeClass", "show" and "hide" in JQuery. Here's the demo showing it: DEMO The trick is position the arrow on the object as shown in the demo then on click, display it.  Here's the code below:

Make Some Parts of the Image Clickable

Here's the demo showing it: Click Me The trick is create a separate image  for hover effect (in this case, glow). The hard part is getting the position right. We used, absolute positioning and here's the code below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Clickable Parts of Image</title> <style type="text/css"> .bg { position: relative; margin: 20px 0 20px 40px; padding: 5px 0; height: 766px; width: 900px; background-image: url(kon.png); background-repeat: no-repeat; } #box-link1 { position: absolute; top: 0px; left: 0px; width: 384px; height: 575px; background-image: transparent; } #box-link1:hover{ background-ima...

Assembly Language: Determine if Digit or Not

Image
This will determine if the user's input is a digit or not and quits if "q" is pressed. Anyway, here's the code below: .model small org 100h .data msg1 db 13,10,13,10, "Press Key : $" msgEr db 13,10,13,10,"Is not a digit! $" msgSuc db 13,10,13,10,"Is a digit! $" .code start: mov ax, @data mov ds, ax mov dx, offset msg1 mov ah, 09h int 21h mov ah, 01h int 21h cmp al,'q' je exit cmp al, 30h ;0 (ASCII 48) jl error cmp al, 39h ;9 (ASCII 57) jg error cmp al, 30h ;0 (ASCII 48) jg suc cmp al, 39h ;9 (ASCII 57) jl suc exit: mov ah, 4ch int 21h error: lea dx,msgEr mov ah,09h int 21h jmp start suc: lea dx,msgSuc mov ah,09h int 21h jmp start end start

PHP: Displaying Paragraphs from MySQL Database

Image
Let the image explain: Without this function, the browser won't read the paragraph properly from MySQL Database. The new line will be ignored as shown in the image above (blue border).