Scare away spammers?
Spam Research Tool -- SpamVampire
December 30, 2004
December 29, 2004
Want a free gmail account?
I thought about doing something like this but looks like this guy cornered the market.
isnoop.net gmail invite spooler
isnoop.net gmail invite spooler
December 22, 2004
December 16, 2004
December 6, 2004
Using ColdFusion to work with SQL binary data
<CFSET FileName = "HotDogVendor.jpg">
<CFFILE ACTION="readbinary" FILE="D:\WebFiles\MyWebsite\Images\Postcards\#FileName#" VARIABLE="NEWDATA">
<cfset NewObject = toBinary(NEWDATA)>
<cfquery name="insertImage" datasource="MyDatasource" username="myusername" password="mypassword">
update images
set content = <CFQUERYPARAM VALUE="#NewObject#" CFSQLType="CF_SQL_BLOB">
where NAME = '#FileName#'
</cfquery>
...And now, how to output an image, which is stored in a SQL Server table as an image data type? Here is code which I found on another forum that appears to work (but still not the perfect solution):
<cfquery name="GetImage" datasource="MyDatasource" username="myusername" password="mypassword">
select content
from Images
where NAME = '#FileName#'
</cfquery>
<cfcontent type="image/gif; charset=8859_1">
<CFSCRIPT>
writeOutput(toString(GetImage.Content));
</cfscript>
<CFFILE ACTION="readbinary" FILE="D:\WebFiles\MyWebsite\Images\Postcards\#FileName#" VARIABLE="NEWDATA">
<cfset NewObject = toBinary(NEWDATA)>
<cfquery name="insertImage" datasource="MyDatasource" username="myusername" password="mypassword">
update images
set content = <CFQUERYPARAM VALUE="#NewObject#" CFSQLType="CF_SQL_BLOB">
where NAME = '#FileName#'
</cfquery>
...And now, how to output an image, which is stored in a SQL Server table as an image data type? Here is code which I found on another forum that appears to work (but still not the perfect solution):
<cfquery name="GetImage" datasource="MyDatasource" username="myusername" password="mypassword">
select content
from Images
where NAME = '#FileName#'
</cfquery>
<cfcontent type="image/gif; charset=8859_1">
<CFSCRIPT>
writeOutput(toString(GetImage.Content));
</cfscript>
November 24, 2004
Creating XP icons that work with VB
Things you will need:
Its pretty simple once you've done it once.
- Illustrator or Freehand
- Photoshop
- Gamani GIF Movie Gear
- MSDN cheat sheet
Things you hopefully won't need:
Providing a proper VB Application Icon, Including Large Icons and 32-Bit Alpha Images
Its pretty simple once you've done it once.
- Build your icons for 48px, 32px and 16px.
- Take them into photoshop if they are not there already.
- Create a layered file with the three sizes in 32-bit color
- Save each size as a new file and covert it to index (256) color. This makes the 8-bit versions.
- Save each size as a new file with index (16) colors. This makes the 4-bit versions.
- Import the layered psd file plus the 6 other files into GIF Movie Gear.
- Crop the frames of the imported layered file to the correct size.
- Save as an icon.
In order to use the icon file in VB it must have an 8-bit version.
November 17, 2004
November 8, 2004
October 30, 2004
AcuteFinder 1.1 Free Download - Softpedia
AcuteFinder 1.1 Free Download - Softpedia
Will find duplicate files with different names. Great for making room on hard drives.
Will find duplicate files with different names. Great for making room on hard drives.
October 28, 2004
October 27, 2004
Fancy checkbox validation javascript
<!-- javascript function
function chx(myForm)
{
var sendit = false;
for (var i=0;i < myForm.length;i++) {
fldObj = myForm.elements[i];
if (fldObj.type == 'checkbox') {
if (fldObj.checked == true) {
sendit = true;
}
}
}
if (sendit == true) {
return true;
} else {
alert('Error Msg.');
return false;
}
}
--->
<!-- code for form -->
<form onSubmit="return chx(this);">
October 26, 2004
October 14, 2004
October 12, 2004
October 8, 2004
October 6, 2004
September 10, 2004
September 9, 2004
September 6, 2004
September 1, 2004
August 31, 2004
Linksys Blue Box Router HOWTO
Linksys Blue Box Router HOWTO: "There are three ways you can upgrade your Linksys firmware."
The third way is to use tftp. This is how I did it. There is a tftp client included with Red Hat Linux. To upgrade your firmware this way, do the following steps:
Capture a copy of your settings. The firmware upgrade may wipe some of them. Older versions nuked everything back to factory defaults; newer versions preserve your basic settings but clear some advanced ones.
Download a copy of the new firmware. You should find it at Firmware Upgrades for your Linksys Products on the Linksys site. Note that what you get may well be marked "For Windows Users" and be a zip archive. Open it in a scratch directory, because it will rudely create several Windows files wherever you unpack it. The file you need will be called CODE.BIN.
Disable the router password Note that every attempt I made to do this with Mozilla failed (both under 1.38 and 1.44). Konqueror worked fine. Go to the Password tab, backspace over both sets of asterisks until both the Password and Confirm fields are blank, and click Apply.
Cross your fingers and load the firmware The command session you want will to see will look something like this, with your router's IP address substituted for 192.168.1.1:
tftp 192.168.1.1
tftp> binary
tftp> put code.bin
Sent 386048 bytes in 10.3 seconds
tftp>
Don't panic if the client hangs for a bit before returning and do not abort the transfer. The command is writing to firmware, and the Linksys hasn't got much of a brain. Wait for it to finish.
Re-enable your router password and other settings. You'll be able to tell the upgrade worked because the firmware version number has changed.
You're done.
The third way is to use tftp. This is how I did it. There is a tftp client included with Red Hat Linux. To upgrade your firmware this way, do the following steps:
Capture a copy of your settings. The firmware upgrade may wipe some of them. Older versions nuked everything back to factory defaults; newer versions preserve your basic settings but clear some advanced ones.
Download a copy of the new firmware. You should find it at Firmware Upgrades for your Linksys Products on the Linksys site. Note that what you get may well be marked "For Windows Users" and be a zip archive. Open it in a scratch directory, because it will rudely create several Windows files wherever you unpack it. The file you need will be called CODE.BIN.
Disable the router password Note that every attempt I made to do this with Mozilla failed (both under 1.38 and 1.44). Konqueror worked fine. Go to the Password tab, backspace over both sets of asterisks until both the Password and Confirm fields are blank, and click Apply.
Cross your fingers and load the firmware The command session you want will to see will look something like this, with your router's IP address substituted for 192.168.1.1:
tftp 192.168.1.1
tftp> binary
tftp> put code.bin
Sent 386048 bytes in 10.3 seconds
tftp>
Don't panic if the client hangs for a bit before returning and do not abort the transfer. The command is writing to firmware, and the Linksys hasn't got much of a brain. Wait for it to finish.
Re-enable your router password and other settings. You'll be able to tell the upgrade worked because the firmware version number has changed.
You're done.
August 26, 2004
August 17, 2004
ADSI COM code for CFMX
<cfscript>
ADSys = createObject("COM", "ADSystemInfo");
UserName = ADSys.UserName;
</cfscript>
<cfdump var="#UserName#">
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/iadsadsysteminfo.asp
ADSys = createObject("COM", "ADSystemInfo");
UserName = ADSys.UserName;
</cfscript>
<cfdump var="#UserName#">
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/iadsadsysteminfo.asp
CFMX QuotedValueList
I found out today that if you are going to use #quotedvaluelist()# in a query that you have to use it in the query and not set it as a variable before hand.
Good:
SELECT *
FROM table
WHERE something NOT IN (#quotedvaluelist(query.column)#)
Bad:
SELECT *
FROM table
WHERE something NOT IN (#varname#)
The bad example escapes the single quotes once it is used in the query. Not fun.
Good:
SELECT *
FROM table
WHERE something NOT IN (#quotedvaluelist(query.column)#)
Bad:
SELECT *
FROM table
WHERE something NOT IN (#varname#)
The bad example escapes the single quotes once it is used in the query. Not fun.
August 11, 2004
August 10, 2004
August 6, 2004
Using cfscript to create a java object to read active directory groups.
<cfscript>
o_NTAuth = createObject("java", "jrun.security.NTAuth");
o_NTAuth.init("Name_of_Domain");
groups = o_NTAuth.getUserGroups("#listlast(cgi.AUTH_USER,"\")#");
</cfscript>
<cfdump var="#groups#"/>
o_NTAuth = createObject("java", "jrun.security.NTAuth");
o_NTAuth.init("Name_of_Domain");
groups = o_NTAuth.getUserGroups("#listlast(cgi.AUTH_USER,"\")#");
</cfscript>
<cfdump var="#groups#"/>
August 5, 2004
Macromedia - ColdFusion - Regular expression syntax
I'm tired of searching for this link...
Macromedia - ColdFusion LiveDocs : Regular expression syntax
Macromedia - ColdFusion LiveDocs : Regular expression syntax
August 4, 2004
Adding additional file types to verity on CFMX 6.1
Verity content-type handling is done with the style.uni file. Each collection has its own style.uni file for both file and custom collection types.
The style.uni file can be found in:
C:\FusionMX\verity\collections\collection_name\custom\style\style.uni
C:\FusionMX\verity\collections\collection_name\file\style\style.uni
You can modify the default style.uni files so that any new collections will have the new settings.
These default files are found under:
C:\FusionMX\lib\common\style\style.uni
C:\FusionMX\lib\common\style\file\style.uni
C:\FusionMX\lib\common\style\custom\style.uni
The easiest way to add new file types is to change the default setting at the bottom of the page.
The style.uni file can be found in:
C:\FusionMX\verity\collections\collection_name\custom\style\style.uni
C:\FusionMX\verity\collections\collection_name\file\style\style.uni
You can modify the default style.uni files so that any new collections will have the new settings.
These default files are found under:
C:\FusionMX\lib\common\style\style.uni
C:\FusionMX\lib\common\style\file\style.uni
C:\FusionMX\lib\common\style\custom\style.uni
The easiest way to add new file types is to change the default setting at the bottom of the page.
default:
# /action = skip
/charset = guess
July 30, 2004
Welcome
This is where we post pieces of various knowledge that we had to learn for one reason or another.
Subscribe to:
Posts (Atom)