joeydaly.com #code #afl #tennis

28Mar/100

Templates for Netbeans

Posted by Joey

To change templates in netbeans simply click on Tools > Templates. Then click on Java from the left hand side to expand more items. Click on Java class and hit ‘open in editor’ button to edit the template… Continue reading

Tagged as: , No Comments
24Mar/100

Granting execute permissions to all stored procedures in a database for MSSQL

Posted by Joey

I had this problem today when coding up an application that uses stored procedures to operate tasks. Most database admins like keeping their security locked down. So here’s a way to allow execute stored procedure commands while keeping basic reader/writer permissions.

SQL2005

/* CREATE A NEW ROLE */
CREATE ROLE db_executor

/* GRANT EXECUTE TO THE ROLE */
GRANT EXECUTE TO db_executor… Continue reading

24Mar/100

How to set CLASSPATH in Linux

Posted by Joey

Below are two types of commands to set CLASSPATH in linux. There’s a few different types of shells to execute this command below explains how to work out the difference.
The syntax for setting your classpath is slightly dependent on which shell you are using. The default shell for RedHat 5.x and 6.x is the bash shell. Two other popular shells are tcsh and and csh called “t shell” and… Continue reading

23Mar/101

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

Posted by Joey

Had this error come up while building a java app. Common problem when trying to connect to mssql database.

Install the Microsoft SQL Server JDBC Driver and extract it to somewhere useful like C:\Program Files\…

Add the following path to the System variables in your Environment Variables for Windows (My Computer > Properties)
C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.2\enu\sqljdbc.jar

This should work…

If you’re using an IDE… Continue reading

Tagged as: , , , 1 Comment
2Mar/100

How does tracking in email work?

Posted by Joey

Had a great question from a customer this morning, about how tracking in emails work. I did some digging around and found some pretty interesting stuff that even I didn’t know about.

In emails an invisible graphic is included at the bottom of HTML emails which are known as web beacons. Each time someone opens the unique graphic it returns the information back to the server monitoring your email… Continue reading

1Mar/100

Adding a watermark to original images on the fly

Posted by Joey

Found this great piece of code that will allow you to prevent users or atleast stop them a little… from downloading your images. Using the cfimage tag!

Simply use cfimage to call you’re first two images, then using ImagePaste() to mash them together, and write to the browser calling ‘#image#’.

See how you go.

<cfimage… Continue reading