- my webspace

- my webspace

Latest Comment

Why I must believe in GOD
Testing time is almost passed..there are many colours in lif...
27/06/12 01:43 More...
By Tarun Shekhawat

Allama Iqbal - Selective verse...
Yahoouj
Really good work about this website was done. Keep trying mo...
07/03/10 15:04 More...
By Roderick

Allama Iqbal - Selective verse...
Great Job
You have dont a great job of collecting these... Even I had ...
25/08/09 01:01 More...
By Sikandar

O ye who don't believe !
It's like Lehman Brothers :grin
11/10/08 10:31 More...
By anurag Chaturvedi

I Protest
@Sikku
Thanks Sikku for the feedback. I never intend to blame, a...
29/07/08 11:06 More...
By Aminur Rashid

Login






Lost Password?
Home arrow Java
Labeled code block in Java PDF Print E-mail
User Rating: / 0
Written by Aminur Rashid   
Friday, 13 June 2014

In case you have forgot, about labeled statements in Java, here is the code reminder, try to figure it out about how the code compiles with url in code:
public class LabeledStatementExample{
    public static void main(String[] args) {
            System.out.println("Hello World!");
            http://aminurrashid.com/en/java/java/labelled-code-block-in-java.html
            System.out.println("Hello");
    }
}

Be first to comment this article
StumbleUponDigg This!Bookmark on Delicious

Add as favourites (353) | Quote this article on your site | Views: 2162 | E-mail

Last Updated ( Friday, 13 June 2014 )
 
Provide auto input for batch file PDF Print E-mail
User Rating: / 0
Written by Aminur Rashid   
Sunday, 11 May 2014

One of my known, still in college asked this question on how to run a program that takes dynamic user input for program (typical, "Enter your name" type of commands) multiple times using a batch file, without any real user providing the input. i.e He wanted to run the program x amount of times, and wanted to mimic that a certain user is "typing" those values...

Be first to comment this article
StumbleUponDigg This!Bookmark on Delicious

Add as favourites (332) | Quote this article on your site | Views: 2015 | E-mail

Last Updated ( Sunday, 11 May 2014 )
Read more...
 
Convert Stream or File to String in Java PDF Print E-mail
User Rating: / 0
Written by Aminur Rashid   
Friday, 26 April 2013


Probably converting a stream or file to String is one of the most common question asked when one starts using Java. Out of different solutions, the common one is to use BufferedReader . Recently I stumbled upon a java weblog, which suggested following one liner cool trick :


// e.g String fileString = new Scanner(this.getClass().
                 //getResourceAsStream(fileName)).useDelimiter("\\A").next();
String text = new Scanner( source ).useDelimiter("\\A").next();





Be first to comment this article
StumbleUponDigg This!Bookmark on Delicious

Add as favourites (424) | Quote this article on your site | Views: 1676 | E-mail

Last Updated ( Friday, 26 April 2013 )
 
Script to setup keystore for OWSM PDF Print E-mail
User Rating: / 0
Written by Aminur Rashid   
Tuesday, 23 October 2012


In Fusion Middleware 11g/12c, user can very easily protect their services using OWSM policies. A number of these policies are message protection policies, And to invoke these services, client need to set up OPSS keystore service properly to be picked by owsm. Following is an attempt to automate the steps using DemoCA cert available with WLS installation.

Be first to comment this article
StumbleUponDigg This!Bookmark on Delicious

Add as favourites (506) | Quote this article on your site | Views: 3498 | E-mail

Last Updated ( Tuesday, 04 June 2013 )
Read more...
 
Accessing Twitter Resources Using OAUTH PDF Print E-mail
User Rating: / 1
Written by Aminur Rashid   
Thursday, 03 May 2012

OAuth is an Authorization scheme to protect resources. It is widely used to share private resources (e.g. photos, videos, contact lists) stored on one site with another site without having to hand out their credentials. Twitter is one of such website, that exposes its resources as Rest Web services. These resources are protected resources and can be accessed against proper Authorization.

User will need the access if he is building a twitter Application. Following steps explains the simplest use case to access friend's or one's own timeline.

1).Register an application with twitter.

Go to twitter's development resource and register your Application. [URL : https://dev.twitter.com/apps/new]

Once the application is registered, note down the Consumer key and Consumer Secret for your application. For the Demo, I am using dummyConsumerKey/Secret which should be replaced with your working Consumer key and Consumer Secret

Be first to comment this article
StumbleUponDigg This!Bookmark on Delicious

Add as favourites (502) | Quote this article on your site | Views: 2416 | E-mail

Last Updated ( Thursday, 03 May 2012 )
Read more...
 
<< Start < Prev 1 2 3 Next > End >>

Results 1 - 9 of 20
Aminur Rashid