March 2011 archive

PNG transparency problem in Internet Explorer 5.5 & 6

hi friends This plugin will fix the missing PNG-Transparency in Microsoft Internet Explorer 5.5 & 6. 1. download 2. Add jQuery and pngFix to the HEAD-Section of your HTML … <head>  …  <script type=”text/javascript” src=”jquery-latest.pack.js”></script>  <script type=”text/javascript” src=”jquery.pngFix.js”></script>  …  </head> 3. Activate pngFix on document.ready <head>  …  <script type=”text/javascript”>      $(document).ready(function(){          $(document).pngFix();      });  </script>  …  </head>

Permanent link to this article: https://blog.openshell.in/2011/03/pngfix-internet-explorer-5-5-6/

List Changer

This is a very simple background changer. It just takes the selected value from the list and makes that the background color. Insert the following code inside the <body> tag: <FORM><SELECT Size=5 name=clr onChange=”document.bgColor=this.options[this.selectedIndex].value”><OPTION VALUE=”blue”>blue<OPTION VALUE=”aquamarine”>aquamarine<OPTION VALUE=”chocolate”>chocolate<OPTION VALUE=”darkred”>dark red<OPTION VALUE=”gold”>gold<OPTION VALUE=”red”>red<OPTION VALUE=”yellow”>yellow<OPTION VALUE=”hotpink”>hotpink<OPTION VALUE=”lime”>lime<OPTION VALUE=”darkkhaki”>dark khaki<OPTION VALUE=”cadetblue “>cadet blue<OPTION VALUE=”darkgoldenrod”>dark goldenrod<OPTION VALUE=”darkslateblue”>dark slate<OPTION VALUE=”blue”>blue<OPTION VALUE=”deeppink”>deep …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/03/list-changer/

Net::HTTP Raw Post Ruby Code

Net::HTTP is still a popular option though it doesn’t have the easiest API to remember. In order to Post & Access posted request object from the ruby script example is shown below: require “cgi” require “uri” require “net/http” #To Post data without form using RESTful Method url = URI.parse(“http://api.domain.com”) begin requestXml = “Johnjohn1234” http = …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/03/nethttp-raw-post-ruby-code/

Comment multiple lines in ruby

A multi-line comment begins with the =begin token and ends with the =end token. These tokens should start at the beginning of the line and be the only thing on the line. Anything between these two tokens is ignored by the Ruby interpreter. =begin Between =begin and =end, any number of lines may be written. …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/03/comment-multiple-lines-in-ruby/

Try Catch Finally block in Ruby

This the ruby code which is equivalent of a try/catch/finally block in other languages. #Try catch block Syntax begin somecode() rescue puts “Error #{$!}” ensure this_code_will_execute_always() end # Sample Code f = File.open(“testfile.txt”) begin # .. process rescue # .. handle error else puts “– no errors!” ensure f.close unless f.nil? end

Permanent link to this article: https://blog.openshell.in/2011/03/try-catch-finally-block-in-ruby/

REST methods form request in Ruby On Rails Client

In order to access RESTful web services from Ruby Client script using form request. The method net/http tries to connect over HTTP even of the uri is HTTPS. For HTTPS, You need to explicitly tell net/http that a secure connection should be used. REST client code as shown below: # Basic REST. # Most REST …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/03/rest-methods-form-request-in-ruby-on-rails-client/

SAP Query

SAP Query is SAP’s tool to define and execute reports without ABAP knowledge. SAP Queries are quick reports which can be used for validation of data after Data Loading. SAP Queries can also be used to get some test data for our program. Transaction : SQ01 – Query;  SQ02 – Infoset; SQ03 – User group.

Permanent link to this article: https://blog.openshell.in/2011/03/sap-query/

LSMW recording vs BDC recording

LSMW RECORDING The LSMW recorder is much simplified when compared to the SHDB recorder: It always start with default options (update mode A, no default size, use BDC mode (SY-BINPT is ‘X’), do not simulate background mode (SY-BATCH is space), and SY-CALLD is set to ‘X’). In LSMW recording, BDC_OKCODE and BDC_CURSOR fields cannot be …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/03/lsmw-recording-vs-bdc-recording/

Replace Special Characters Using Java

Using Java, have you ever been tried to replace all special characters in a String? Here is the fine example of replacing all special characters in a String using replaceAll() method. It also discusses about the difference between replace and replaceAll methods of java.lang.String class.

Permanent link to this article: https://blog.openshell.in/2011/03/replacing-special-characters-using-java/