Web Development

Posting Code Samples in MT

Just today I found out that I already had a Draft post from last summer about easily posting code-samples in MovableType using Brad Choate’s MTMacro…

Use the following Macro


   <MTMacroContent encode_html="1">
  



then make sure your text-formatting processor is set to “none” for the entry (you need some extra BR’s then) and then just write



your program code
4-indented
fixed space characterset etc…

to paste your code…

Average rating
(0 votes)

Comments

Posting Code Samples in MT

moving files in asp
mvfile Move file mvfile( FileName, Destination )

Public Function mvfile( xVar, yVar )
Set Sys = Server.CreateObject( "Scripting.FileSystemObject" )
If Sys.FileExists( xVar ) Then
Sys.MoveFile xVar, yVar
msg = true
Else
msg = false
End If
Set Sys = Nothing
mvfile = msg
End Function

Similar entries

  • php file locking does not work as documented

  • Oracle 9i 9.2 – linux – documentation about the PL/SQL RAISE_APPLICATION_ERROR: message is a character string up to 2048 bytes long Unfortunately SQLERRM only returns the first 510 characters of it… but we are lucky DBMS_UTILITY.FORMAT_ERROR_STACK at least returns the…

  • Well, I found this one worth a note – for some time users tried to protect their email from spam bot harvesters by using html entities (codes representing the actual character) in their entries… believing that a spam bot cannot…

  • AdSense Real time tracking

  • playing with Brad Choate’s MTMacro… great for creating entry-inline Amazon-links like this book or even this MT and Brad Choat rule!...