Rip's Domain

BASH IS BACK!!!!! IT’S BASH FRIDAY BITCHES!!!!!!!

Posted in BASH!, Fridays, Jquery by rip747 on February 29, 2008

BASH was really slow there for awhile so I had to let it catch up. Stupid me, it kinda overlapped me so this week is a HUGE BASH posting. Also There is a little something at the end of the list (don’t peek).

Generous Plug: My brother started a blog called My Junk Mail. Basically it’s a collection of all the jokes and funny shit he gets sent to him on a daily basis. Trust me on this, he gets some good stuff. You would never think that people in the mortgage industry on that fucked up…. and to think these pricks are the ones that get us money O_o

http://www.bash.org/?830741
http://www.bash.org/?830747
http://www.bash.org/?830989
http://www.bash.org/?831195
http://www.bash.org/?831285
http://www.bash.org/?831311
http://www.bash.org/?831674
http://www.bash.org/?832266
http://www.bash.org/?832291
http://www.bash.org/?832919
http://www.bash.org/?832984
http://www.bash.org/?833499
http://www.bash.org/?834654
http://www.bash.org/?835030
http://www.bash.org/?835536
http://www.bash.org/?835939
http://www.bash.org/?837574
http://www.bash.org/?839482
http://www.bash.org/?839563
http://www.bash.org/?839694
http://www.bash.org/?839727
http://www.bash.org/?841280
http://www.bash.org/?842161

(your peeking… aren’t you, you fuck!)

I’m starting something new. Every week (hopefully) I’ll be picking out the top two bashes for the week and posting them at the end of the list. These are the ones I think are the best, and on that note, I want people to start leaving comments telling me what their favorite for the week is. During the slow times on bash.org, I can look back and pick out some good ones for my Classic BASH posts.

Don’t let another Friday go by without BASH!!!!!

http://www.bash.org/?833485
http://www.bash.org/?835023

And now for something new:

ICEGen 2.0 preview now available

Posted in ICEGen by rip747 on February 24, 2008

ICEGen v 2.0 preview is now available for download. Below are the changes that have been made, please read them before installing. Report any bugs here. I would like to get a final version out by April 1.

DO NOT use this in production!

Remember that this is a preview, things will and could be added or removed before the final release, only use this for testing. I’m the only one who’s dieting on dog food right now.

SPEED!!!!!!!!!!!!!!!!!!

I never really liked the XSLT way of generating code. A while back (way before I even wrote ICEGen) I downloaded ARF from Joe Rinehart and I loved the way he did the code generation. I used that method when writing this version. Because of the new way ICEGen does the code generation (thanks Joe), the speed increase has been incredible. The speed is now almost 15 fold what the last version was! To give you an idea. My database has 52 tables and it use to take around 70 seconds for it generate the files, now it takes less then 5 seconds!

ICEGen now loads from the Application.cfc

Many people didn’t like the fact that you had to run ICEGen from a browser. I did some reworking and now all you have to do is add one line to your application.cfc in the OnApplicationStart method to get ICEGen up and running. Here is the line I use

<cfset CreateObject(“component”, “icegen.icefactory”).init(“mydsn”, “mssql”, “_model”)>

Basically all you’re doing is calling the icefactory class with the following parameters:

mydsn: The name of a dsn you want ICEGen to generate classes for. You cannot pass a username and password, so you must have those settings configured within your CF Administrator.

mssql: The database type for the dsn. Right now ICEGen only supports MSSQL.

_model: This is the library path you want ICEGen to put the generated files in relative to your webroot. You MUST use dot notation for the path. ie: com.example.model

Removal of __ICEGEN__ folder and XML files

ICEGen no longer creates the __ICEGEN__ folder since it doesn’t need to create XML files any more.

Removal of __Customize__.xml file

Along with the __ICEGEN__ folder removal, the __Customize__.xml has been removed also. If you want to assign defaults to variables, you can do that from within the generated cfcs. Also a note that since this file is removed, you can’t set aliases right now. Once I figure out a good way to do this, I’ll add it back. I don’t use aliases so it doesn’t bother me, but I know some do.

Along with aliases, you will also have to call the _validateunique method yourself in your validate method to validate a unqiue value in a column. Good thing is that now you don’t have to pass the keys, so, for example, if you wanted to validate that usernames entered were unique, you would just write inside the validate method:

<cfset _validateunique(“username”, local.errors, “username_error”, “User Names must be unique”)>

username: the name of the column on the table to check for uniqueness

local.errors: this is the error collection that must be passed in

username_error: an id to add to the collection if an error is found

User Names must be unique: a message stating what the error is. Can be blank.

AWESOME FEATURE: Association of VIEWS with BASE TABLE

Here’s the problem I ran into that spawned this feature. In my test database I have a table called EventBoothNumbers that holds the booths for an event. Now these booths can have a status of either being sold, pending or reserved depending on if someone buys them, puts then into their shopping cart or if they are assigned to sponsorship package.

In order to check the status of the booth from a pure CFC way, I created a method called getstatus on the EventBoothNumbers component. Next I checked the database and depending on which table contained the boothid, I did some logic and got the status. Point being that hitting the database and performing these actions, every time I called the getstatus method was a pain in the ass and SLOW. Plus the fact that if I needed to use this logic within a query for some reason, I would have to create a view and then write another method that would just use the view instead of the base table and return the results.

First off having logic in two places is bound to cause problems at some point and needless to say it isn’t very DRY. Second off using queries defeats that point of using components. What’s the solution? Combing the view along with the base table.

When you create a view that follows the format of __{TABLE NAME}__ within your database, ICEGen will pick this up and merge any fields from that into the generated classes.

So for example. Let’s say you have a Users table with the column firstname, lastname. ICEGen would obviously create a cfc called Users with a getfirstname and getlastname method. Now if you wanted a getfullname method to combine the firstname and lastname, you would have to create that yourself.

With ICEGen all you would have to do is create a view within the database called __Users__ and in the view return the keys that match the underline table (so if the underline table has an PK called userid, the view will have to return that), plus a field called fullname that combine the firstname and lastname. ICEGen would then create the fullname method for you when the Users cfc is created.

Try it out. I know the example above is hard to follow, but trust me, you will flip when you use this feature, since it can really speed your application and development time.

Installation

All you have to do is download the icegen_v2.zip file from the box.net widget and unzip it into your webroot. Add the line to your OnApplicationStart method and you’re ready to go.

Check back here for updates.

BTW

Yes you can and always have been able to use ICEGen with multiple databases. To do this now, just add a second ICEGen load line into your OnApplicationStart method like so:

<cfset CreateObject(“component”, “icegen.icefactory”).init(“mydsn1”, “mssql”, “_model1”)>
<cfset CreateObject(“component”, “icegen.icefactory”).init(“mydsn2”, “mssql”, “_model2”)>

UPDATE:

Here is a video showing the new feature (merging views and base tables) in ICEGen. Please be kind as this is my first screen cast.

Droooooooooooooooooooooooooooooooooool!!!!!

Posted in Games by rip747 on February 22, 2008

Fuck Guitar Hero

Tagged with:

Cool Blog…

Posted in Jokes by rip747 on February 21, 2008

My brother starting a blog the other day which I thought was a great idea. Basically, all the jokes and stuff he gets emailed he is posting. Check it out for a laugh and spread the word! Oh, and send him some junk email too so he can post it. 🙂

http://myjunkmail.blogspot.com

Tagged with: ,

PopupWindow v2.0.1.1 and version name changes

Posted in Jquery, PopWindow by rip747 on February 20, 2008

This project has now been moved to Github.

CF8 Syntax Dictionary for CFEclipse

Posted in CFEclipse, ColdFusion by rip747 on February 16, 2008

I’ve been wanting to install this for awhile since I’m doing all my development now in CF8 and want to take advantage of the new syntax.

There are two versions I found on the net: one from Mark Drew and one from Adobe. Neither of them had the cfloop array parameter. Someone was kind enough to post how to add it to the dictionary and I did just that. Since it looks like no one wants to update it, I’m volunteering.

You can download the dictionary file by clicking here or from the box.net widget.

To install, simple copy the file to the following directory and restart eclipse with the -clean option:

<eclipse install folder>plugins\org.cfeclipse.cfml_<version number>\dictionary

Any additions and / or corrections are welcomed. Just leave them in the comments below and I will add them with 48 hours.

Updates:

02/16/2008 : added cfdbinfo tag

Tagged with:

PopupWindow v2.0.1 now available

Posted in Jquery, PopWindow by rip747 on February 13, 2008

Quick little thing. I’ve updated PopupWindow to now support the location and menubar attribute as suggested by Matthew. You can download the latest from the box.net sidebar.

Remember to comment here with your suggestions. Thanks

Important Safety Update

Posted in Fridays by rip747 on February 12, 2008

important safety update

Ending the VMWare lag

Posted in TechSupport, VMWare by rip747 on February 8, 2008

When using VMWare you may notice a lag when scrolls windows and when opening and closing windows. If this occurs, there are two things to do that will solve the issue.

1) Make sure that you have VMWare tools installed. Most likely you do otherwise you will only be able to display 640 x 480.

2) Make sure that your display settings colors are set to 16 bit instead of 32 bit. Believe me when I tell you that you don’t need 32 bit color for a virtual environment.

Tagged with:

A Short Course On Brain Surgery

Posted in 2008 Elections, Americans are sheep, Ron Paul by rip747 on February 8, 2008

This is for all you morons that keep bitching and moaning that the US needs universal health care and also for anyone stupid (Democrats) enough to vote for Hilary.

Stuart Browning highlights the plight of an Ontario man with a cancerous brain tumor who crossed the border to the U.S. to get the medical care that is rationed in his home country (Canada).

How does universal health care look now? Anyone who thinks that this doesn’t happen everyday is an idiot. Universal health care is great is you have a cut or broken bone; things that aren’t considered “major medical”. But as you see here, and also anyone in Canada will tell you, that if you have a major medical condition you pretty much screwed. What… think this is all bullshit? Why don’t you do some research and call a bunch of Canadians that actually here life threatening conditions and see how they’re being treated.

Let this burn into your brain as you go vote in the polls. Wake the fuck up America!