....Creating Chaos Since 1981!
-
Classless Object Oriented JavaScript Programming (Lesson 1)
\n I’ve been exploring Object Oriented Programming with JavaScript. It’s been an interesting experience because JavaScript is not really a traditional Object Oriented Language but rather a prototype language. Prototype is a type of object oriented language that is classless. In a prototype language, inheritance is achieved by reusing prototypes of objects. It is a fascinating model. So let’s get started on our exploration of class-less object oriented programming The first thing of note is that we are not actually creating a class (note:Classless Object Oriented JavaScript) Essentially, all we are going to do is create the equivilent of a constructor. Our constructor will have an alert box that fires whenever we create a new object, as well as some basic properties of our car. …
-
Syncing with Google Calendar (all of them)
\n I have been using Google “products” for years now. When every something new comes out, I just have to give it a try. I love Google Notebook, but it seems that not enough people shared my love. Of course Gmail can be called life changing. Another great product that has gotten me through a lot is Calendar. Being able to sync work and classes and family events in a place that is accessible anywhere is a very cool thing indeed. I also have to say that I love my Mac and my iPhone. Syncing the three is fairly easy. You subscribe to your calendars in iCal, and sync iCal with the iPhone. The only thing is, my iPhone is always with me, the Mac and iCal not always. So it became necessary to find a way to create a two way sync between Google Calendar and my iPhone. Oh yeah, and I have more than one calendar and I want them all to sync. Using the Exchange server on the iPhone to connect was easy, but I didn’t like have the mail was handled. IMAP works just fine thank you very much. Also, it only syncs your primary calendar. If I created other calendars, or subscribe to others, they don’t even show up. I found some articles on how to sync using CalDav and it seemed to be just right for my needs. To sync your primary calendar, add a new CalDav to the iPHone and enter this in as your url: https://www.google.com/calendar/dav/you@gmail.com/user/ Add your google username and password and you should be good to go. Now, for the other calendars, you need to goto your calendars in google and take a look at the ical link. In the string, you should see a gianormous string @group.calendar.google.com. Write that down. Then, add another caldav calendar and in the url enter this: [https://www.google.com/calendar/dav/string of numbers and letters]@group.calendar.google.com/user/ Fill in the username and password same as above. And there you go! A few things to note: …
-
Object Oriented PHP Lesson 3 Coding a mailer Class
\n Today we are going to create a mailer class that will assist us in emailing site visitors. Lets start out buy creating the class and the variables we will need. …
-
Object Oriented PHP Lesson 2
\n Yesterday we talked about some basics in oo php programming. To day I am going to show you how to extend a class and also how to be utillity methods (functions) in your class. …
-
A lesson in Object Oriented PHP
\n I’ve casually referenced oo php recently. So here I am going to give a more formal tutorial on object oriented php for anyone out there who is unaware of OO programming in general. If you are familiar with OO programming, you will understand everything immediately. …
-
Why do you think it's called Computer Science?
\n Editing this post a little bit due to feed back from my friends. I really didn’t make my self clear originally. …
-
Writing an Array to CSV in PHP
\n The CSV format is a very handy format mucking around in data. In case you have to write some data into a CSV file, here’s some code for your parsing needs. Quite a few classes exist to both read and write CSV files. I have a class that I use to read csv into a database and another to create a csv file from a database…Both are killer classes that have great uses (and believe me I have used them) but sometimes you want a little bit of a simpler solution. Just because php can be an OO language doesn’t mean that you have to do everything in php the OO way. The two main functions that we use for csv files are fopen and fputcsv. If you have never used file handling in php before, do some reading up on the functions first. …
-
Yesh!! I was doing alright with the SEO thing and didn't even know it!!
\n I’ve doing some looking into my seo’ness the past couple of days. I looked at the Top Search Queries and found out that the phrase “mac ide” returned my site in the top 12. I gave it a try, and just look at the results!! …
-
a bit of perl - Parsing a CSV file in perl
\n I’ve been working on a solution that takes uploaded CSV files and parses them to process the data (in my case ultimately it will live in a database) Here is some sample code that I put together in my sand-box that takes care of parsing the data in to an array. DISCLAIMER This is not a newbie tutorial. If you don’t already understand perl and oo programming, you might be a little bit lost. This solution requires the Text::CSV module from CPAN (Right here) …
-
Some Ruby on Rails Goodness
\n Well, it finally here! I live in a house that has connections to the internet! So lack of knowledge and resources can not stop me in mastering Ruby on Rails. Every project that I ever started, I would hit this wall. A wall were I would go “Damnit! I could do this in php in about half the time!” It was mainly just a lack of internet and the wonderful resources that it provides. So now, the lack is gone and I can go boldly forward!! …