How to deploy WAR/JAR File in JBOSS

Step to deploy WAR/JAR File in JBOSS

  • Paste your WAR/JAR File into jboss\server\default\deploy Folder
  • Go to jboss\bin and run the file run.bat.
  • After successful run.go to jboss\server\default folder and see three new folder log,tmp,work.
  • log – Log File is created here
  • tmp – All the Deployed WAR and JAR File extacted here.
  • work – all the code in a servlet form maintain here.

Popularity: 3% [?]

Difference between String and String Buffer

String
=====
String are immutable object.Its value cannot be changed(constant).String object are readonly.If you create one instance of string and change the value of string then it create new instance.

String Buffer
=========
String Buffer is mutable.Its Value can be Changed.If you create one instance and append the text without creating a new instance

Example:
======
String
=====
String str=”welcome”;
str + = “to fordevs”;

String Buffer
=========
StringBuffer strbuff=new StringBuffer(“welcome”);
strbuff.append(“to fordevs”);

Both code give same output but Second approach much faster than first one.

Popularity: 6% [?]

How to save photos from friends album in Orkut – Firefox,Chorme,IE?

In Orkut we could not save the photos by just right clicking them.But there are easy ways to save the photos.One of the easiest hack trick is to drag and drop the image to a new tab or a new window of the browser and then save them to the system.

That’s it…

Popularity: 1% [?]

How to restart print spooler if stopped in XP?

When i tried to install a PDF printer in my xp machine,i was not able to complete the installation.FewPDF printer installation got aborted and some throw a error message “print spooler stopped restart it”.Then i checked and found the print spooler service was in disabled state.I enabled and started the service now every thing worked fine.

Here are the steps to turn on the Print Spooler in Windows XP:

Step 1.Click Start Menu -> Run
Step 2.Type services.msc and click OK
Step 3.Locate Print Spooler in the list of services
Step 4.Right Click -> Properties change the Startup Type to Automatic.

print spooler disabled
If it is running and still you get the error stop the service and restart it.

Popularity: 2% [?]

Animation in Photoshop

Here we can see how to create an animated GIF file, using Photoshop CS4.

1. Create a new Photoshop document.

2. Create a new Layers using the shortcut key Shift+Ctrl+N Or using the menu as shown below.

3. Use the text tool write “ForDevs” text on stage. Just like below or draw a symbol as per custom requirement.

4. Similarly write some other text. Now the Layer Panel contains two text layer and one background layer.

5. Change the Photoshop Workspace Mode From “ESSENTIALS” to “VIDEO”.

6. Animation Panel has been shown at the bottom.
Time Line Animation

Frame Animation

7. Based on Time Line Animation, by changing the Green Bar size we set the visible state of the layers at specific time line.

8. Based on Frame Animation, Set the Frame Seconds use the popup menu on each frame. For example set the Time as 0.17 sec.

9. Create a two new duplicate frame for each layer and set the time as 0.1 sec. In Animation Panel use the Top Right corner icon, select the “Tween…”

10. For second and fourth frame we set the Tween with “Next Frame” and “First Frame” respectively. Set the “Frame to Add” as 5. Now Click Ok button. Now the Tween Frames are created.

11. Now Change the “Once” option to “Forever” option for continues playing.

12. From File Menu, select the “Save for Web & Device…”

13. Change the GIF format and Save it.

14. The Final Output has shown like below.

Popularity: 2% [?]

How to bring the cursor to the end of text in the textbox control – WPF C#

Normally if we focus a textbox control the cursor would be in the start of the textbox.But when there is text already in the textbox it would be annoying if the cursor is in start.It would be better if the cursor is at the end of content in texbox.

Thus to position the cursor at the end of the text content of a textBox control,we have to call the select method and specify the selection start position to the length of the text and a selection length to 0.

txtExample.focus();
txtExample.Select(txtExample.Text.Length, 0);

Ref : msdn

Popularity: 7% [?]

How to override the DNS locally ?

Problem:

I was wondering how to override the DNS locally. There is a server in my network having static IP and has a registered Domain name. My local network doesn’t allow me to connect to internet and the server is part of my network, so how do I connect to this server using the same domain name instead of LAN IP or system name.

Solution:

  1. Goto ‘Drivers’ folder inside the system32 folder. “C:\WINDOWS\system32\drivers
  2. Open ‘etc’ folder “C:\WINDOWS\system32\drivers\etc
  3. Open the ‘hosts’ file in wordpad
  4. At the end of this file you will find this  “127.0.0.1       localhost
  5. Now enter the LAN IP of the server and the domain name of the server separated by ‘TAB’ eg., 10.35.68.8          www.yourserver.com
  6. Now you can ping and test the connectivity.

When you do this you are just bypassing the DNS.

Popularity: 8% [?]

How to find 2nd highest value in a table ?

To Find the 2nd Maximum Of Mark in a Data Set

SELECT * FROM Student a WHERE 2=(SELECT COUNT(DISTINCT Mark)
FROM Student b WHERE a.Mark<=b.Mark)

To Find the 2nd Minimum Of Mark in a Data Set

SELECT * FROM Student a WHERE 2=(SELECT COUNT(DISTINCT Mark)
FROM Student b WHERE a.Mark>=b.Mark)

To Find nth Maximum and Minimum

SELECT * FROM Student a WHERE n=(SELECT COUNT(DISTINCT Mark)
FROM Student b WHERE a.Mark<=b.Mark)
SELECT * FROM Student a WHERE n=(SELECT COUNT(DISTINCT Mark)
FROM Student b WHERE a.Mark>=b.Mark)

replace n with the corresponding number

Popularity: 2% [?]

How to Text Wrap a Label in WPF?

WPF does not allow text wrapping for label control.Thus to wrap a label with a fixed width,we have to place the TextBlock control inside the label control and set its TextWrapping property to “Wrap”.

<Label Width=”50″>
<TextBlock TextWrapping=”Wrap”> I am label with width 50</TextBlock>
</Label>

Popularity: 9% [?]

How to create an OpenID and use it ?

openid-logo

OpenID

Fed up with creating new accounts for multiple websites, here comes OpenID for the rescue. It allows you to use an existing account to sign in to multiple websites without ‘sign up’. OpenID replaces the common login process that uses a login name and password for every website.

An OpenID is in the form of a unique URL (e.g., http:\\me.yahoo.com\testid), which is authenticated by the user’s OpenID provider. Some of the websites who supports, allows and provides OpenID are Yahoo, Google, ZOHO, Microsoft, AOL, PayPal, Verisign. The OpenID doesn’t rely on a central authority to authenticate the user. The OpenID protocol leaves the type of authentication to the provider, the authentication forms may include passwords and biometrics.

Let us create a OpenID with Yahoo!

  1. Go to Yahoo OpenID website Yahoo! OpenID
  2. Get Started, login with your Yahoo ID

    Yahoo! OpenID

    Yahoo! OpenID

  3. Now Yahoo will display the OpenID URL (identifier) generated for you

    OpenID generated

    OpenID generated

  4. To create custom identifier click on ‘Show customization Options‘. Check for available identifiers, Yahoo recomends not to use mail id as part of the openID as it may expose our mail id. click on ‘Save My Customization‘.

    Custom OpenID

    Custom OpenID

Let us check how to use the OpenID.

  1. Go to Live Journal, click on ‘Login with OpenID‘ in the login page to open the OpenID login page.livejournal-openid-login
  2. Enter your OpenID and click Login (I don’t have account in Live Journal)
  3. This will forward it to Yahoo, where you need to login with Yahoo ID
  4. Now you have logged into Live Journal using OpenID.

The major advantage of an OpenID is you need not create a new account for every website you visit, instead create an OpenID and use the same account to log into all websites you visit.

Popularity: 21% [?]

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars