Recent Posts

Thursday, January 21, 2010

Remove unprintable or invisible characters from string in VB.net

This function will help to remove all invisible characters in vb.net string

Public Function Remove(ByVal str As String) As String
        Remove = str
        Dim x As Long
        ' remove all non-printable characters
        While InStr(Remove, vbCrLf) > 0
            Remove = Replace(Remove, vbCrLf, String.Empty)
        End While

        While InStr(Remove, vbTab) > 0
            Remove = Replace(Remove, vbTab, String.Empty)
        End While

        For x = 0 To 31
            While InStr(Remove, Chr(x)) > 0
                Remove = Replace(Remove, Chr(x), String.Empty)
            End While
        Next x

        For x = 127 To 255
            While InStr(Remove, Chr(x)) > 0
                Remove = Replace(Remove, Chr(x), String.Empty)
            End While
        Next x

        'Dim s = New String(" ", 2)
        'While InStr(Remove, s) > 0
        '    Remove = Replace(Remove, s, " ")
        'End While
    End Function


Read more!

Wednesday, January 13, 2010

Some useful links for Ruby on Rails development

How to deploy your ruby on rails application on web server?

http://www.vaporbase.com/postings/Deploying_my_first_rails_site

To use flash object in your rails application

http://www.railslodge.com/plugins/283-flash-object


Read more!

Monday, January 11, 2010

How to install rails plugin behind the proxy

I was facing problem installing my rails plugins behind windows proxy

It was giving me plugin not found error all the time i tried to install a new plugin

after research setting http_proxy in command prompt as belows solved my problem

set http_proxy=http://username:password@proxy:8080


Read more!