Blog

Blog Archives - 27 Record(s)

Remove Filter Year: '2005'

How to install the new MySQL JDBC driver on Coldfusion MX7

Posted by Luis Majano
Nov 29, 2005 00:00:00 UTC
I needed to upgrade my coldfusion JDBC drivers for MySQL since I upgraded my release to 5.0 and here is the little how to.

1) Donwload the JDBC drivers from here:

http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.11.zip/from/pick

2) Extract the archive and copy the following file:

mysql-connector-java-3.1.11-bin.jar

to the following destination:

J2EE

{j2ee path}/servers/lib

If you want it available to all servers or just for the Coldfusion app then:

{cfmx instance path}/cfusion-ear/cfusion-war/WEB-INF/lib

Standalone

{cfmx path}/wwwroot/WEB-INF/lib

3) Restart your CFMX instance or server.

4) Go to your Datasources in your coldfusion administrator to register a new datasource:

Name: {Your datasource name}

JDBC URL: jdbc:mysql://{your host}:3306/{your database}

Driver Class: com.mysql.jdbc.Driver

Driver Name: MySQL 5.0

User Name: {Username}

Password: {Your Password}

And that is it.

How to mount a remote ssh filesystem on ubuntu

Posted by Luis Majano
Nov 22, 2005 00:00:00 UTC
I have been fooling around with CFEclipse for a while, and one of the things it still lacks is full FTP support. For some reason my VSFTP at home on my Ubuntu box was throwing a out of index error on Eclipse. So I decided to mount my filesystem via ssh, for more security, on my Ubuntu distro on a laptop.

The following is a guide of how to mount an SSH filesystem using sshfs on Ubuntu (Breezy 5.10).

Please note that SSH is a more secure protocol than ftp or Samba.

The first thing you need to do is install sshfs via the apt-get utility. Below is a description of sshfs:

sshfs is a filesystem client based on the SSH File Transfer Protocol.

Since most SSH servers already support this protocol it is very easy to

set up: i.e. on the server side there?s nothing to do. On the client

side mounting the filesystem is as easy as logging into the server with

ssh.

Install sshfs by doing a:

$sudo apt-get install sshfs

This will install fuse-utils and libfuse2 which are required. After the install is successfull then you will need to change the permissions on the following file in order to run an sshfs command.

$sudo chmod +x /usr/bin/fusermount

This will allow your user to run the fusermount command, which is used by sshfs to mount ssh filesystems.

After this you are ready to use the command. However, you will need to create the mount point of where you want the ssh directory to be mounted. Let's say that you want to connect to the following directory in your server via ssh: "/MyDocuments" and you want to mount this directory in the following local directory: "/home/luis/Mounts/MyDocuments"

If this is the case then I would run the following command to mount the ssh filesystem:

$sshfs [email protected]:/MyDocuments /home/luis/Mounts/MyDocuments/

After you run this command you will be prompted for your account password. Once you successfully enter your password, your filesystem will be mounted.

Please remember that if you want to mount an ssh filesystem, you need to have an active SSH account on the system you are trying to connect to.

Now if you need to unmount the filesystem, then run the following command:

$sudo umount /home/luis/Mounts/MyDocuments/

And you will unmount the ssh filesystem.

You can find much more information about ssh and ubuntu in the following location:

http://fuse.sourceforge.net/sshfs.html

And there you go.

ASP vs CFMX!! CFMX by far beats ASP in functionality

Posted by Luis Majano
Nov 10, 2005 00:00:00 UTC
I have just finished installing a custom DHTML editor for a friend on his ASP website. However, I had to actually make the javascript work with his ASP backend. And phew!!! Let me tell you, WHAT A PAIN ASP IS!!!

I had completely forgotten how incredibly painful ASP is. Coldfusion is by far a more robust and simpler web application framework than ASP.

I practically had to build my own JSStringFormat function, already available in Coldfusion, for ASP. Basically, breaks and carriage returns in ASP were completely throwing Javascript off. So I had to build a small function to string replace these characters into "escaped" Javascript friendly items.

For those ASP users, which I believe are in the dark ages, here is the little snippet.

Private Function Strip(byVal string)

Strip = Trim( Replace( Replace( Replace( string, vbCrLf, "\n" ), chr(10), "\n" ), chr(13), "\n" ) )

End Function

I had to also try to remember how simple recordsets worked in ASP, OHH MY GOD, the dreaded ADODB.recordset.

Anyways, this post is to enlighted the ASP community to please see the light, COLDFUSION!!

My del.icio.us Account

Posted by Luis Majano
Nov 10, 2005 00:00:00 UTC
I just created my del.iciou.us account. You can find it here:

http://del.icio.us/lmajano

Please post any url's you find interesting and enjoy my links. I will start posting and transfering them shortly.

Ray Camden's New Blog CFC 4.0

Posted by Luis Majano
Nov 10, 2005 00:00:00 UTC
Ray Camden has just released his new BlogCFC 4.0. I will be shortly implementing his software and updating my blog.

I truly recommend this blog software. It is incredibly easy to install and customize to your own needs.

Keep up the great work Ray!!

Java's gettickcount(), How to get the current time in milliseconds

Posted by Luis Majano
Nov 07, 2005 00:00:00 UTC
Coldfusion has a great function called "gettickcount()" which basically gives you the current time in milliseconds. This is a great function to time code. Look at the example below:

<cfset stime = getTickCount()>

<!--- All my code to time here --->

<cfloop from="1" to="100" index="i">

<cfoutput>testing #i#</cfoutput>

<!--- Make a call here --->

</cfloop>

<cfset totalTime = getTickCount() - stime>

<cfoutput>The total time of execution for the code was: #totalTime#</cfoutput>

This utility is great. The question is, how do I do this in Java?? Well very simple, we use the System class. The following is a simple snippet of how to time in java.

double stime = System.currentTimeMillis();

//My Code Here


for(int i=0;i< 1000; i++){

System.out.println(i);

}

double TotalTime = System.currentTimeMillis() - stime;

//Display Total Time


System.out.println("Total Time of Execution: " + TotalTime + "ms.");

There you go!! Now you can time your java code.

Upgrade MySQL 5.0.13 to 5.0.15 Guide

Posted by Luis Majano
Nov 07, 2005 00:00:00 UTC
I just finished upgrading my MySQL Release Candidate installation to the Final MySQL 5.0 Release and found and interesting tip. My OS is Ubuntu 5.10 and I had MySql 5.0.13 RC installed. The following is my setup:

MySQL Install Dir:

/opt/mysql-standard-5.0.13

MySQL Link

/usr/local/mysql ==> /opt/mysql-standard-5.0.13

To upgrade to the new release, I downloaded the Linux (x86, glibc-2.3, dynamic, gcc) Standard Binary

I then extracted the archive to the following location:

/opt/mysql-standard-5.0.15

I continued to copy all of my data folder from my previous install to the new install. Now I fired up a terminal to fix the permission, groups and ownerships following the readme. Below is what you need to do:

shell> cd to /usr/local/mysql

shell> chown -R root .

shell> chown -R mysql data

shell> chgrp -R mysql .

The first command changes the owner attribute of the files to the `root' user. The second changes the owner attribute of the data directory to the `mysql' user. The third changes the group attribute to the `mysql' group.

I then proceed to startup my database. I use webmin, if not just type in the following command:

shell> bin/mysqld_safe --user=mysql &

Everything should be working great now. However, my InnoDB structure databases are somehow "FLOPPED." For some reason, which I still have not been able to figure out, the tables are not working. So a simple workaround, is just to do a simple backup of your InnoDB databases using the MySQL Administrator and then importing them back to the new install. This actually is the approach that the MySQL manual advices.

So there it is, simple, yea right!! MySQL Upgrade.

Upgrading Ubuntu 5.04 to 5.10

Posted by Luis Majano
Oct 27, 2005 00:00:00 UTC
I found this great Wiki article on the Ubuntu wiki that I wanted to share to all those folks that need a whitepaper on how to upgrade Ubuntu to the latest release. I have not yet implemented it, but I will surely do and let you know how it goes.

Ubuntu Wiki Upgrade Whitepaper

I have also attached the whitepaper in PDF format for your convenience.

Let me know how your upgrades go?

Ubuntu Breeze Badger 5.10 Released

Posted by Luis Majano
Oct 27, 2005 00:00:00 UTC
I have been out of it for the past days with all these hurricanes, and well Wilma pretty much ravaged south florida.

Anyways, I just found out that Ubuntu has release "Breezy Badger" 5.10. I have been using this distro for a long time now and it is incredible. So this will be an upgrade night.

You can download the new Ubuntu from here:

http://www.ubuntu.com/download/

Below are just some of the new features this incredible Linux Distribution has to offer.

On the Desktop

* GNOME 2.12.1

* OpenOffice.org 2.0 beta 2

* X.org 6.8.2 with wider hardware support

* An enhanced tool for easily installing new applications (see "Add Applications" on the Applications menu)

* A new tool which makes it easy to install support for multiple languages (Language Selector)

* Editable GNOME menus

* Applications are now linked into the Launchpad infrastructure (new entries on the Help menus for translation and support)

* Support for writing audio CDs (Serpentine)

* Graphical startup process with progress bar (USplash)

* New documentation (Ubuntu 5.10 Quick Tour and Ubuntu 5.10 FAQ Guide)

* Language packs with updates from the Rosetta translation platform, part of Launchpad.net, which makes contributing translations easy for everybody in any language.

On the Server

* Kernel support for cluster filesystems (OCFS2 and GFS)

* Plone 2.1 & Zope 2.8.1

* PHP5

* Support for automatic storage allocation into LVM volumes

* Built-in thin client functionality produced in cooperation with the LTSP project

* Simple NFS root setup with automatic hardware detection through initramfs-tools

* Support for up to 4 gigabytes of RAM by default on 32-bit architectures

Hardware Support Improvements

* Linux 2.6.12.6 with many updated drivers from third parties

* Further enhancements to laptop support (hot keys, and working suspend/resume on more models)

* HP all-in-one printer/scanner devices are supported out of the box

* Bluetooth input devices (such as keyboards and mice) are supported out of the box

* Multiple audio devices are handled more gracefully (and one can easily select the default device)

* 64-bit PowerPC kernel available

Installation

* A new OEM mode to simplify the process of preinstalling Ubuntu on computers for resale or redistribution

* Automatically makes existing hard drive partitions available to the desktop

* Simple "dual boot" configuration with automatic resizing of an existing installed OS

* The second stage of the installation now has a progress bar

"Under the hood"

* GCC 4.0.1

* glibc 2.3.5

* New early userspace infrastructure based on initramfs-tools

* More modular X.org packaging

* Python 2.4.2

As always, Ubuntu includes the very best of the 100% free/libre application software world, and each new release incorporates countless new features and bugfixes from the global development community.

Flash Forms Illegal usage of actionscript

Posted by Luis Majano
Oct 18, 2005 00:00:00 UTC
I have been recently using flash forms in several different locations of my new Textus Coldfusion framework which I have been developing for work. I will soon be placing entries about Textus, to give you an insight into this simple but powerful coldfusion framework.

Anyways, I have been implementing a backup system on Textus and decided to use flash forms to populate a cftree with the backups directory contents. Then from here I can open/delete files. What seemed strange was all these errors I kept receiving, that seemed totally out of place, since my code was straightforward. These were the errors:

Illegal usage of actionscript org.apache.oro.text.regex.Perl5Pattern@1e3621b.

The following actionscript commands are not allowed: "import, new, delete, createChild, loadmovie, duplicateMovieClip, AttachMovie, registerclass, createTextField, __proto__, uiobjectdescriptor, createclassobject, createemptyobject, createchildatdepth, createchildren, createclasschildatdepth, createobject, createchild, webservice, httpservice, remoteobject".

Site Updates

Archives

Entries Search