Coldfusion: Form entries are incomplete or invalid.

July 16, 2009

Form entries are incomplete or invalid.

  • on
  • on

Go back and correct the problem.

It’s because checkboxes submit value of “on” or “off”, rather than 1 or 0. Handle them.


svn Cannot display: file marked as a binary type.

July 15, 2009

Symptom:

Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

It’s because the wrong mime-type property is set on the file.

Fix:

Using property editor, remove svn:mime-type = application/octet-stream property.


mono on linux

July 6, 2009

You can program in c# on linux. Perhaps some hoops there, but the basic is

install mono-core

and run

mcs hello.cs

then

mono hello.exe

All this in a bash shell.


vim: Backspace key gives ^? in rxvt cygwin

June 13, 2009

In vim, backspace does not delete the previous character, but inserts ^?. To delete a character backwards, I should use Control + h. It was a nuisance but using vim with rxvt on cygwin, I cannot expect many people to have this problem.

simple solution:
Add this line in ~/.profile
stty erase ^?
where you generate the ^? using backspace in vim.


Xpath query

June 3, 2009

Xpath Query:

/root/…/…/substring(TaskProgress,string-length(TaskProgress)-100,string-length(TaskProgress))


A simple jquery update

June 3, 2009
<script language="javascript" type="text/javascript" src="jquery-1.3.2.min.js"></script> 
<script>
$.ajax({
 type: "POST",
 url: "jquery1.cfm",
 data: "name=John&location=Boston",
 success: function(msg){
 $("#mydiv").html(msg);
 }
});
</script>
<div id="mydiv"></div>

Coldfusion: abort in block

June 2, 2009

There’s no equivalent of <cfabort> available inside a <cfscript> block.

Define your own in the component.

<cffunction name=”abort” returntype=”void” output=”false”>
<cfdump var=”#arguments#” />
<cfabort>
</cffunction>

by JohnEric(http://groups.google.com.au/group/macromedia.coldfusion.getting_started/browse_thread/thread/c06e159078261e36/74fbb4839083cd75)


Context validation error for the cffunction tag.

May 27, 2009

Context validation error for the cffunction tag.
The start tag must have a matching end tag. An explicit end tag can be provided by adding </cffunction>. If the body of the tag is empty, you can use the shortcut <cffunction …/>.

This happens when something comes between cffunction tag and cfargument tag.

<cffunction …
<cfset …
<cfargument …

Move cfargument next to cffunction and the problem goes away.

<cffunction …
<cfargument …
<cfset …


[Postgresql] role … cannot be dropped because some objects depend on it

May 26, 2009

Drop user user1;

ERROR:  role … cannot be dropped because some objects depend on it
DETAIL:  access to table1
access to table2


3 objects in database db1
17 objects in database db2

This is because the user has permission on some objects.

\dp user1

(This will give the group membership.)

alter group group1 drop user user1;

revoke all privileges on table1, table2 from user1;

(This may have to be done for each database.)


Vimperator!

May 22, 2009

http://vimperator.org/trac/wiki/Vimperator

Awesome addon for firefox users.

: set go+=mT

m: menu, T: toolbar, B: bookmark toolbar

: o google.com

: t google.com

<C-I> opens input box in gvim.

<c-o> and <c-i> navigates through history.

And, hjkl works!

: open foo will search for “foo” in google,

: open ebay terminator will open ebay and search for terminator.


Follow

Get every new post delivered to your Inbox.