Rip's Domain

Friday! – Inhumanoids complete series: For my brother

Posted in Fridays by rip747 on May 25, 2007

I know that I said that I would be doing something with BASH! today, but remember that Friday posts are for my brother (since he puts up with so much crap at his job). So without further ado, bro this post is for you!

The complete Inhumanoids series:

1 – 5. The Evil That Lies Within










6. Cypheroid


7. The Surma Plan


8. Cult of Darkness


9. Negative Polarity


10. The Evil Eye


11. Primal Passions


12. The Masterson Team


13. Auger… For President?


All before I get emails and comments about the numbering of the episodes, here is a Wikipedia to explain it.

Advertisements

Was FCKEditor suppose to be in CFMX7?

Posted in ColdFusion by rip747 on May 23, 2007

While researching some stuff for ICEGen, I was browsing through the XSL files used by the CFFORM and came across something interesting. Apparently there is a reference to FCKEditor in one of the files. In the file /CFIDE/scripts/xsl/basic.xsl there exists a comment on line 88:

<!–
bsahlas 5/26/05:
commenting out the superfluous include reference to _fcktextarea.xsl for now.
Not sure what *samples/* folder we’re referencing. Since this file cannot be found it’s throughing errors.
–>
<!– <xsl:include href=”samples/_fcktextarea.xsl”/> –>

So apparently there was some sort of development going on to allow a richtext editor within CFMX7 at some point. Don’t know why they decided to pull the plug on it, but it’s fun to speculate. BTW it’s throwing not throughing 😉

ICEGen rewritten for version 20050521b

Posted in ICEGen by rip747 on May 22, 2007

If you downloaded ICEGen yesterday (version 20070521), you probably had a hell of a time getting it to work. I accidently uploaded the wrong version (be kind, it’s my first time doing an open source project of this size).

Anywho. Last night I decided to sit down and rewrite probably about 90% of the Coldfusion code and about 20% of the XSL code. I didn’t like how it was coming out and some of the logic that I was using wasn’t the best. The other thing was that the generated XML code was a complete mess when I viewed it in a text editor, it had a lot of spaces and it made it hard to read.

I’m very happy with this rewrite. Some of the things that changed were:

I’m using the StringBuffer Java library to build the XML. I didn’t really do this for speed as I can’t see a speed increase in the app. I did this because it allowed me to control the spaces that the generated XML outputted, so now it’s very readable and easy on the eyes.

I got rid of the way I was doing getters and setters. Before I used a generic get() and set() method where you would pass the property name and value. So if you wanted to set a property you would use set(property, value) and to get you would use get(property) . While it made the classes smaller, it hindered what you could do in a set method and it made creating decorators a nightmare, so now each property has it’s own get and set method.

There’s now an HTML frontend. It’s very basic, but it does what it needs to do. Here you will enter in the name of the datasource that you want to generate code from; I don’t ask for the username and password for the datasource for security reasons. On that note, make sure that the datasource has the username and password set from within the CF Administrator. There’s a drop down to select the database type although you can only select MSSQL for the moment. Once I support more databases the list will grow. Finally you enter in the releative path from your webroot to the folder you want the generated files and folders stored in; for example let’s say you had a folder called “model” off your webroot. In the input box you would enter in “/model”.

The last thing I didn’t was add the ability for you to inject your custom defaults for columns. The reason behind this was because some defaults are just to hard to translate into CF code. An example would be datepart(year, getdate()) for say a paymentyear column. With the custom default you could translate this default into #datepart(“yyyy”, now())#, the pound signs are important since it will take the actually string you put in and assign that as the default. All this can be accomplished be editting the __Customize__.xml file that is located in the base path you specify.

That’s it for now. I’m begging people to send me some suggestions and comments, so get to it! With that, go and download ICEGen and give it a shot.

ICEGen v20070521 released. 5x faster and supports defaults.

Posted in ColdFusion, ICEGen by rip747 on May 21, 2007

ICEGen has been updated. It now supports handling of defaults for your DAOs (thanks once again to the Reactor Team for that). I also fixed a rather nasty bug as that thing wouldn’t generate anything when I uploaded the changes I made to it Friday night (I was tired as hell and hadn’t slept. I promise I won’t do it again).

Another big change was that I said that hell with objects when abstrating the database information and I put everything into structures. This results on my test database with 43 tables and 500 columns a speed gain of 5 fold. The generator was taking about 34 seconds to generate the template and it now does it in about 6 seconds. Awesome.

ICEGen: DAO and CRUD generator for ColdFusion and MSSQL databases… so far.

Posted in ColdFusion, ICEGen by rip747 on May 18, 2007

UPDATE: You can now download the project from RIAForge.

This is a project that I have been working on the for the past week during my very limited spare time.

Basically ICEGen is a code generator (like we need another) the will currently generate DAO and CRUD methods for MSSQL database. More database and templates will be added very soon.

Running ICEGen is easy since it doesn’t require that it be in the off the webroot. Just unzip and drop it into a director. First open up the index.cfm file and change {dsnname} to your MSSQL DSN that you want to generate code for (I will create an HTML interface for it soon). Then just open the page in a browser and that’s it.

It will store your project under the projects folder in a directory called {DSNNAME}_{DATABASE TYPE}. You will have manually copy the generated directories for now, but I will be added a save to folder feature soon. You do not need to copy the XML files that in the project root since ICEGen only uses them.

If you want to alias a table or column, first run the generator so that it will generate the XML files for your dsn. Then open up the file _Aliases.xml and put the alias you want for a table or column in it’s alias attribute.

This is a very alpha since I want to get feed back from people with not only finding bugs but also with the way I’m doing the code generation and the crud methods. So please be blunt.

I already tried to setup a Google Code page for the project by someone already had ICEGen as a project, so I have to wait for their approval. If that doesn’t happen in the next week, maybe I can host it at RIAForge.

I want to personally thank the Reactor Team since the database abstraction classes really helped me in creating this. Also I want to thank Brian Rinaldi of Remote Synthesis for his Illudium PU-36 Code Generator which also helped me in getting this thing written

Friday Funnies – BASH Friday is back!!!!!!

Posted in BASH!, Jokes by rip747 on May 18, 2007

BASH is back baby!!!!!! All I’m going to say is that if your offended by humor or just an ass, leave my blog now. BASH forever!!!!

http://www.bash.org/?58162
http://www.bash.org/?40779
http://www.bash.org/?92706
http://www.bash.org/?239936
http://www.bash.org/?583627
http://www.bash.org/?707258
http://www.bash.org/?46179
http://www.bash.org/?54470
http://www.bash.org/?85403
http://www.bash.org/?101881
http://www.bash.org/?104383
http://www.bash.org/?433014
http://www.bash.org/?676794

Also, if you want to contribute to BASH Friday!, leave a comment with a link to your favorite BASH.

Using xsl:include with XMLTransform

Posted in ColdFusion by rip747 on May 16, 2007

Download the files by right click here. You will need to rename the jpg file to zip and unzip them. Sorry about this, but WordPress doesn’t allow uploading of zip files and this is the only workaround I know of.

XMLTransform has a big limitation in that you cannot use xsl:include with an xslt template. What this all means is that you can’t break down an xslt template into smaller groups and then include them in a parent template. This is like taking a loooooong ColdFusion template and breaking it up into smaller template by including the smaller templates with cfinclude.

Now I’ve been searching around with Google and have seem some very creative ways of working around this limitation. Some people loop through the directory and then read each template into memory using cffile and some use Java to handle everything.

Well here is my little work around that works great and the best part is IT’S SIMPLE. Before you do anything, download the files so you can follow along and run the example.

We’re going to use 5 files:

index.cfm – our template that call and transform our XML and XSLT
empty.xml – just an empty XML file for testing
master.xsl – this is the master template that will include the 2 child template
child1.xsl – child template to include
child2.xsl – child template to include

OK – So this is how simple this is. The secret is in the master template’s xsl:include tags. If you notice in the tag’s href attributes I’m calling both child templates but preceeding them with $fullpath$. Bascially what this is, is a string that I can look up and replace with CF. The string I’m going to replace it with is the variables.fullpath from the index.cfm

That’s pretty much it, I told you it was simple. And it works beautifully. Now you can pull apart your XSLT files instead of having one big one.

Remember to download the files (link at top of article) so that you can try it out for yourself. Be sure to give each one a look over.

Zombie Last Supper

Posted in Jokes by rip747 on May 15, 2007

Very cool. For those that are into horror movies and the lot.

read more | digg story

BASH Fridays will return!

Posted in BASH!, Rants by rip747 on May 14, 2007

Since my post last Friday, I’ve actually had quite a few people email me personally and tell me that they wanted to be CCed on any BASH emails I would send my brother. I really didn’t want to since most people are offended by my whacked out sense of humor and the humor that is BASH.

People have been quick to point out that this type of humor could hurt me professionally since employers and potential clients regularly visit blogs of people they want to hire to get a personal insight on the person.

I’ve decided after much soul searching that I’m taking the advice of my brother and numerous others that have emailed me: This is my blog, my world, my thoughts and if you don’t like them, then leave. I’m not going to hesitate to post a link or say something because it might offend someone somewhere. Frankly, I shouldn’t care what people think and I’m not going to. If someone doesn’t want to hire me because of a link like this, then the hell with them because frankly I wouldn’t get along with someone like that anyway.

So BASH Fridays are back for good. And to mark this occasion of my testicles dropping, I’ve decided I’m going to stroll through the archives and new posts of BASH and look for the most offensive sickest crap out there (just what my brother loves).

So be forewarned that if you get offended by what people say and / or have no sense of humor, don’t read the BASH posts!

PopUpWindow: v05142007 now available

Posted in PopWindow by rip747 on May 14, 2007

For some reason, people were still having problem with plugin causing a syntax error in IE. It seems that the link was to an old version, so I refixed the problem and uploaded it again. For those having the problem, redownload the plugin and leave any comments if you find anything else.

I can’t believe this little piece of code is this popular. It’s truly amazes me. 🙂

Go download popupwindow