You are viewing the archives for the ‘Programming’ category

Forbidden No More

For the past weeks/days/month I have suffered from “Forbidden” error messages all throughout my domain initially in the subdomains of my hostees and then to various folders. It bothered me a whole lot and it was so frustrating searching for appropriate answers. Even my host couldn’t tell me directly but they did pointed out that it has to do with .htaccess files. Since I did messed with such files before, focusing on it would be the intelligent thing to do. With the old backup I have in my local drive I looked for differences in the said files with those that are currently residing in my (web) folders. It fatefully came to me that I did enabled HotLinking Protection (disabling direct linking, that is, enabling only select websites to access certain files externally) for all files instead of just images. So, basically, what happened was, when any of the sites/folders under my domain is accessed via a different webpage, an error is thrown because HTML and PHP files have been included in the blockage (I suppose), whereas when you input the URL in the address bar and hit enter, the page loads smoothly (though there are cases that a refresh of the page helps). This is another lesson learned and I think I really have to set up a small blog for such issues now. :cool:

To Rashid, Sae, and Shan, my apologies for this very delayed fix. And to all those who thought that the site has already been buried six feet under, well, think again.

Removing iframe Horizontal Scrollbar

Author’s Note (AN): Since I have been getting almost day-to-day hits on this post, I would like to hear from you guys if the simple trick you are about to read works for you. If so, I would highly appreciate it if you leave a comment. Otherwise, you might find the links generated by Google below more helpful than this.

Oh c’mon! A few days ago, I was already about to die trying to remove the freakin’ horizontal scrollbar of the iframe in this fanlisting. The problem is only associated with Internet Explorer. :devil: The last resort I could do was to compare it line after line with another code that does not show the said scrollbar. So how did it turn out? Well, it turns out, in my case, the only thing that was missing was a line before the DTD (document type declaration). I then remembered that the same thing holds true for the scrollbar colors that are not supported in Firefox. I used to do it before. So anyway, for instance, the first line of the code should not be

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

but instead,

<!–remove freakin’ iframe horizontal scrollbar anything goes here (perhaps even a blank line)–>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

Whew, glad I did it. And oh, please bear with the title of this post. :sweat:

Lately…

Arithmetic Parser in C

Today was the deadline of our parser program in CMSC124. I feel terrible. I really tried my best to at least do a few things on my own. In the end, still, I merely copied a classmate’s code. Perhaps C, though actually easier than other programming languages out there, is simply not for me. Hope this code will help other beginners out there.

  parser.c (1.2 KiB, 25 hits)

Feeling Really Haggard

When I came to school at 9 this morning, John Paul and Marc Jones were the only ones around. Subsequently, the rest came one after another. We finalized our answers in Stat105 4th long exam (thanks to John Paul who reviewed my green book - our answer sheet - or I could’ve lost some points!) and then situated at CL1 (Computer Laboratory 1). Academics is killing me softly. Name them: (Monday) CMSC131 and CMSC123 finals, (Tuesday) Stat105, SocSci26, and CMSC140 finals. Two of these are take-homes but it still requires great effort. Sometimes I can’t help but think that perhaps it would’ve been better if we had a ‘real’ exam instead. Plus, Java Calculator Applet and PHP Exercise with MySQL as deliverables for passing CMSC140. A project is also required in Assembly and, luckily, we’ve already presented it to Ma’am today. I’ll show our code below. ^_^

We had a little quality time in the lab this afternoon. I’d say that somehow, and even if it may seem pretty late, our batch has finally become close to one another. Well, should be. No man is an island, and definitely you won’t survive a course being alone. It’s Mary Glo’s birthday today and we asked - no, forced {lol} - her to buy us food. She bought two packs of that sweet buttered, err, toasted bread I usually eat. I was alone when I rode the tricycle going to the dorm. Then I saw my other classmates walking. Tsk, I should’ve left the lab together with them in the first place. Neh. And yeah, Charmie, a sophomore BroadComm student who’s a friend and classmate in Badminton, got her article published in the Philippine Daily Inquirer’s Young Blood today.

Continue reading?

JavaScript: Displaying Date and Time

Our first exercise in CMSC140. I was, by any luck, able to do it without any help from my classmates and as a matter of fact, I even enjoyed doing it! *woot/ink*

(also prints out “Hello World!” n times, where n is the date)

  date_time.html (3.1 KiB, 34 hits)

Page 1 of 212»