Recently in Programming Category

2008 Mar 15

Obviously, its seldom to see people using batch files nowadays. Most people dont even know what it is. On, contrary i still use them on my daily tasks to automate things, its like having Perl on a Linux box. but things are changing now, i guess using batch files isn't the trend anymore these days. The same with Linux OS, Windows also comes in handy with some tools used to automate tasks and using batchfiles is one of them. Since we're using Windows XP now, its also wise to do things in GUI mode in contrary with the old style DOS mode edit.

While downloading some pictures from a camera, I found them hard to manually rename its filename to a more meaningful title and not some random "DSC001323.JPG". After rename 10 or 15 files, i got bored, thinking this would take me forerver to rename them all for they are more than a thousand in total. If you can still recall that neat application called Irfan View, my life would have been alot easier.

Well anyway, lets change things we normally do and instead of using batch files we use vb script. A zipped version of the mass renaming script is also available for download.

''''''''''''''''''''''''''''''''''''''''''
' Mass Rename Script by tildemark
' http://www.tildemark.com
'
'
' Usage:
'   Place this script on a list of files you wish to rename.
'   Run this script by double clicking on the filename.
'
'
' For bugs send it to tildemark@gmail.com
'
''''''''''''''''''''''''''''''''''''''''''

Dim fso, Path, Folder, Counter, Prefix, File, Extension

set fso = CreateObject("Scripting.FileSystemObject")

Path = InputBox("Input the location of the files to be renamed. ('.' means current folder)", "Mass Rename Script", ".")

Prefix = InputBox("Input the filename prefix", "Mass Rename Script")
If Prefix = "\" Then WScript.Quit

Extension = InputBox("Input the file extension to be renamed", "Mass Rename Script")
If Extension = "\" Then WScript.Quit

Counter = InputBox("Input the starting offset", "Mass Rename Script")

Set Folder = fso.GetFolder(Path)

For Each File In folder.Files

  If Not ((File.Attributes And 8) = 8) Then
    If fso.GetExtensionName(File.Path) = Extension Then 
      File.Name = Prefix & CStr(Counter) & "." & Extension
    End If
  End If
  Counter = Counter + 1
Next

MsgBox("Done")

2008 Feb 1

devjavu_banner.png
DevjaVu a neat and simple app for trac and subversion hosting. Great to use when starting out a project or simply by managing an ongoing project. Its issue tracking system makes collaboration a lot easier and more organized. DevjaVu includes some basic project management features like milestones, built in wiki and an administration page used to manage every aspect of the project thru a web interface.


If you are familiar with source forge, you should also try this one out. Its ticket system is beautifully implemented which makes project management even easier. Best of all you can subscribe for free. Just use the invite code johnny5 when creating DevjaVu projects.

2006 Dec 8

Actually, they are better called response codes. Below is a list of the HTML error codes and its short description

Informational
100="Continue"
101="Switching Protocols"

Successful Client Requests
200 OK
201 Created
202 Accepted
203 Non-Authorative Information
204 No Content
205 Reset Content
206 Partial Content

Client Request Redirected
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy

Client Request Errors
400 Bad Request
401 Authorization Required
402 Payment Required (not used yet)
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable (encoding)
407 Proxy Authentication Required
408 Request Timed Out
409 Conflicting Request
410 Gone
411 Content Length Required
412 Precondition Failed
413 Request Entity Too Long
414 Request URI Too Long
415 Unsupported Media Type

Server Errors
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported

About this Archive

This page is a archive of recent entries in the Programming category.

Places is the previous category.

SEO is the next category.

Find recent content on the main index or look in the archives to find all content.