Posts Tagged ‘make’

Fantastic JavaScript 3D Libraries


Ever imagined if the tiny JavaScript code could render amazing out of the box 3D? Then be ready to enjoy wonderful 3D effects in simple JavaScript code. These JavaScript 3D Libraries let you render smooth yet attractive 3D effects with great ease.

JS3D – The 3d Javascript Graphics Layer

JS3D is a library which allows you to have interactive 3d objects on your website, such as the spinning cube at the top of the page. The 3d effect is created using actual text, try selecting the text on the cube.

JavaScript Raytracer

The JavaScript Raytracer is a 3D rendering engine written entirely in JavaScript. It implements the raytracing algorithm to create images of mathematically defined shapes such as spheres.

3d graphics in JavaScript

Just because I do not do enough silly things with JavaScript already and a raytracer, here are some 3d graphics done with just JavaScript. You should see a TIE fighter rotating, and moving left and right.

Realtime 3D Triangles in Javascript

A wonderful real time 3d triangle generated using javascript.

Javascript Wolfenstein 3D

This a Javascript implementation of id Software 1992 game, Wolfenstein 3D. Should work in all canvas-enabled browsers, that is it means no Internet Explorer.

JavaScript-Powered Web 3D

JavaScript is the standard scripting language of Web development, and a far larger number of people know JavaScript than Java. JavaScript is easy to learn and fun to experiment with. No compiler or development environment is required. So lets learn how to create awesome 3D in JacaScript.

Incredible JavaScript and Canvas 3D demos from Japan

Mr. Satoshi Ueyama hacked out the new era of JavaScript 3D tech by unveiling the real of Google Chrome s power. Satoshi is one of the great JavaScript hackers in Japan. He has introduced the brand new JavaScript technique using Canvas for 3D on his post.

C3DL – Canvas 3D JavaScript Library

The Canvas 3D JS Libary (C3DL) is a javascript library that will make it easier to write 3D applications using canvas 3d. It will provide a set of math, scene, and 3d object classes to make the canvas more accessible for developers that want to develop 3D content in browser but do not want to have to deal in depth with the 3D math needed to make it work.

3D Javascript Chess

This is a work-in-progress 3D Javascript chess game, rendered using the canvas element and this Javascript 3D renderer. Special chess moves are not implemented yet and the interface needs a bit of work.

SVG-VML-3D Javscript Libraries

SVG-VML-3D is a free JavaScript library which can be used to draw and manipulate 3D objects in html pages by using SVG or VML. The JavaScript code which has to be typed into the html page to define the Scene (3D Objects, Viewer Position, Light.) is the same for SVG and VML.

Share and Enjoy:

  • MisterWong
  • Y!GG
  • Webnews
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit

5 Examples of when to use silence ?

Posted: January 27, 2012 in Random Posts
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

1. During arguments. One of the best times to use the power of silence is during  an argument is to stay silent. The ego will be trying to force its way out of you and finish the argument but you are the controller, not the ego. When someone is shouting at you, looking for an argument or just picking on you can literally take all the power away from them and keep all your energy by simply looking at them and saying absolutely nothing. This is extremely difficult to do but very powerful.

2. Gossiping. When there is a crowd of people in the workplace there are gossipers who speak about other people. The thing with gossiping is that it is contagious. When we don’t like someone and someone else starts speaking about them we naturally tend to voice our opinion, I’ve done it lots of times and have to stop myself.

Try and stop yourself from catching the virus of gossiping and use the power of silent whenever it occurs. If you are a gossiper yourself and people around start to notice that you are ‘not your usual self’, don’t give an explanation just leave saying you’ve got work to do or whatever, pretty soon you’ll be out of the gossiping loop.

3. When someone is talking. Silence is a great tool for counselors if used in the right way. It’s also great when listening to friends and family.

Just let people talk and listen to them and use your facial expressions and movements to acknowledge that you are listening. This can be a tough thing to do but extremely powerful for both you, as the listener, and the talker.

You will find that as you practice this, more people come to talk to you as you will be known as a listener. Obviously there are times to speak during the conversation, however when you do, make sure it is to paraphrase what the talker is saying or asking questions to get more information, don’t make it about yourself.

When people want to know more about you they will ask you questions, this is the time to talk about yourself but always have the listener be part of the conversation.

4. When the house is empty. The silence of the home can be quite disturbing to some people as there is a natural need to fill the void of silence. We turn on the radio, play some music, call friends or family, or turn on the TV to fill this void. Having a completely silent home when you are alone does not mean you are alone it simply means you are recharging your mind and giving it some downtime.

Silence helps us to work through, in our minds, the events of the day or project what we want to happen during the day ahead. I am a night owl and also a morning lark. I love the silence when I know everyone is safe and tucked up in bed and I can write or work on the computer. At the weekends I go to bed with my wife to talk about days events or our plans and just have a laugh or whatever. My wife, who loves her sleep, has gone to sleep I kiss her goodnight and get up for a few hours to write as this is the time I am most inspired. I am also the first person up in the morning which means I have another 2 hours to write or work on my online projects.

I know it’s harder when you are alone, however silent time can be used to think about the life you want and work out ways to get it.

5. Quiet reflection. This is a fantastic way to connect with world in a way that is not possible when you are surrounded by hubbub noise. 15 minutes in the morning, 15 minutes in the evening simply focusing on your breath can do wonders for both mind and body. I truly believe that with practice quiet reflection can help us reach a level of deep inner calm.

The state of silence is a way of reaching another part of your mind not possible when going about your daily routine. This other part of your mind is connected in every way to the world around you and with practice you can tap into this knowledge.

Conversion PDF to Byte and Vice verse

Posted: January 13, 2012 in Random Posts
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Simple conversion easily enjoy the word of JAVA……………….

public static byte[] convertPDFToByteArray(String sourcePath) {
byte[] bytes=null;
InputStream inputStream;

File file = new File(sourcePath);

try {
inputStream = new FileInputStream(file);
bytes = new byte[(int)file.length()];
int read = inputStream.read(bytes);
} catch (IOException ex) {
Logger.getLogger(

DesktopApplication3View.class.getName()).log(Level.SEVERE, null, ex);
}return bytes;

}

public void convertByteArrayToPDF(String sourcePath,byte[] bytes) {
OutputStream out;
try {
out = new FileOutputStream(sourcePath);
try {
out.write(bytes);
out.close();
} catch (IOException ex) {
Logger.getLogger(DesktopApplication3View.class.getName()).log(Level.SEVERE, null, ex);
}
} catch (FileNotFoundException ex) {
Logger.getLogger(DesktopApplication3View.class.getName()).log(Level.SEVERE, null, ex);
}

}

Creating webservices in NetBeans.

In this example program I will show you how you can make webservices in the Netbeans IDE. NetBeans IDE provides necessary GUI Tool to help the developers to quickly develop and deploy web services.

In this example we will

a) Develop webservices

b) Test the webservice

c) Develop client and call the webservice there

d) Finally deploy and test the application

Web Service can be added in a Web project or in Ejb project. Netbeans IDE helps the developers to easily develop and test the webservices.
It’s easy to make the Web Service program in Netbeans, which has Glassfish server by default.

Web Service program in Web Project

In Netbeans take new web project in figure 1

Web Services Example

Figure 1

Give project name webservice1 as shown in figure 2

Web Services Example

Figure 2

Select the server name in figure 3

Web Services Example

Figure 3

Now Rt Click on the Web Service project in figure 4

Select New->WebService

Web Services Example

Figure 4

Now give the name of the Web Service and package name figure 5

Web Services Example

Figure 5

Now In design view of Web Service click on Add Operation in figure 6

Web Services Example

Figure 6

Here give the operation name and parameter name and type as shown in figure 7

Web Services Example

Figure 7

Now in source view change the return null to return “hello ”+name as in figure 8

Web Services Example

Figure 8

Now Rt Click on the project and deploy it on the server as in figure 9

Web Services Example

Figure 9

It will deploy the war file on to the server

Now test the web service program

Rt click on the MyWebService in web services folder and select Test Web Operation as in figure 10

Web Services Example

Figure 10

It will open the Web Service program in browser as in figure 11

Web Services Example

Figure 11

Click on WSDL File in blue color .It will open the WSDL file in the browser as in figure 12

Web Services Example

Figure 12

Now as in fig type the roseindia in the text field and click on show button as in figure 13

Web Services Example

Figure 13

It will return hello roseindia

It also give the SOAP request and SOAP response pf the Web Service as in figure 14

Web Services Example

Figure 14

Now make the client file.Client file can be java servlet , jsp and standalone java file

Start a new web project as in figure 15.

Give project name as Webservice1-client

Web Services Example

Now Rt. Click on the project select NewàWeb Service client

Here now select the WSDL file of the Web Service as in figure 15

Click on the Browse.

Web Services Example

Now select the webservice1àMyWebService

Web Services Example

Figure 15

It creates the Client environments for the Web Service in the given project

Now make a Client file by just taking a new Jsp file as in figure 16

Web Services Example

Figure 16

Give the file name as client.jsp

Rt click in client.jsp file code and select Web Service Client resources –>Call Web Service Operation in figure 17

Web Services Example

Figure 17

Select the web service project ->web service file->web service port->operation name as in figure 18

Web Services Example

Figure 18

Change the name =”null” to name=”roseindia” as in figure 19

Web Services Example

Figure 19

Rt click in client.jsp and select run client.jsp

Web Services Example

Download Code