June 27, 2009 - 8:22 PM (GMT)
Category: coldfusion,tech notes
Author: Charles
I am currently redoing the help files for coreforms. I have to totally redo them because I have added a bunch of new features, and I don't think the current version is that useful. You kind of know that your documentation needs changing when the author of whatever you are trying to document has a hard time figuring them out.
So the solution I am working on needs a database so I can organize the documentation better. The problem is that I do not want to require that people who want to view the documentation need to have a database connection and load a bunch of tables onto their server. So I am trying some static ways to create coldfusion datasources.
The first way is to manually build out the query using coldfusion's queryNew, queryAddRow and querySetCell tags.
<cfset get_format = queryNew("name,description,status,attributes")>
<cfset queryAddRow(get_format)>
<cfset querySetCell(get_format,"name","text")>
<cfset querySetCell(get_format,"description","general text field, same features as an html text field")>
<cfset querySetCell(get_format,"status","A")>
<cfset querySetCell(get_format,"attributes","3")>
<cfset queryAddRow(get_format)>
<cfset querySetCell(get_format,"name","textarea")>
<cfset querySetCell(get_format,"description","general textarea field, same features as an html text field")>
<cfset querySetCell(get_format,"status","A")>
<cfset querySetCell(get_format,"attributes","4")>
This is ok for a small amount of rows, but I have another query that will hold all the attributes. For this one I am going to use the basic concepts as the one above but build out a comma delimeted file first then loop through the data to create the query.
<cfsavecontent variable="theData">
1,fieldname,Yes,put the name of the query field,A,A
2,required,No,enter a Y if you need the field filled out,A,A
3,max,No,enter the total number of characters for a text field or a maximum date for a date field,A,S
4,cols,No,enter the number of columns for a textarea field just like the html attribute,A,S
</cfsavecontent>
<cfset theFields = "id,attributename,required,description,status,scope">
<cfset get_attributes = queryNew("#theFields#")>
<cfloop list="#theData#" delimiters="#chr(10)##chr(13)#" index="ii">
<cfset queryAddRow(get_attributes)>
<cfset loopcounter = 1>
<cfloop list="#thefields#" index="jj">
<cfset querySetCell(get_attributes,"#jj#","#listgetat(ii,#loopcounter#)#")>
<cfset loopcounter = loopcounter + 1>
</cfloop>
</cfloop>
Then all I have to do to get the query onto my page is to cfInclude the files that I put the above code on.
May 22, 2009 - 3:10 PM (GMT)
Category: notes,wiki
Author: Charles
I have been using a mediaWiki at work for documenting projects and have come up with some essential commands that I am putting here so I can easily reference them.
Sections
== level 1 ==
=== level 2 ===
==== level 3 ====
Links
[[ name of page| name of link ]]
Bullets
* bullet 1
** sub bullet
# numbered bullet
## sub numbered bullet
Images
[[Image:NameOfFile.gif|thumb|200px|The little caption you want with the image]]
one of the cool things about the wiki is if you specify the image with the thumb attribute, it automatically puts it on the right and makes it clickable.
Misc
bold - '''bold'''
May 13, 2009 - 6:20 PM (GMT)
Category: mac,notes
Author: Charles
For all you out there who are running a Macbook Pro, using a Cisco VPN client and running into "Error 51: Unable to communicate with the VPN subsystem".
Here is what you have to do to fix it. Go to Applications > Utilities then open Terminal. Once you get to the prompt, type in:
sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart
You will be prompted to enter the password for your computer. This procedure will restart the things that need to be restarted. You should then be able to use your VPN client again.
December 22, 2008 - 3:42 AM (GMT)
Category: coldfusion,coreforms
Author: Charles
I just posted an update to coreforms over at riaforge. If you are interested in my forms solution, check it out.
I added a couple of new features. The first is the ability to prepopulate a form that allows for multiple check box selects. The data could be coming from another query of just supply a comma delimeted list of values. So as an example, say you are building a weblog form and you want to pull all the data for the post with query1 and you want to pull in all your post categories with another data. This will allow you to tie the two into the same form so you can update the main post and the categories on the same form.
I also added another customtag called "coredirections". This allows you to add directions to a form at any point in the form if you are having the form build programatically (maketable = 'Y').
Hope you enjoy the changes. If you have any suggestions let me know.