Archive for June, 2009

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)