Engineeringserver.com

A community for computer science students & developers about software development, game development, game design, games, anime preview & reviews and more!

Archive for the ‘Languages’


New java challenges!

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
79 views

Think you know more than just the basics of Java? Try solving these challenges here , or read the latest challenge here has been posted by Jurka. Submit your own or comment on others, either way it’s a win win situation to improve your java skills.

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Java games at java4k, maximum fun, minimum size

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
72 views


Yup, thats right. The fellows over at Java4k have java games that are maximum 4kb in size but provide maximum entertainment. I noticed that Left 4k Dead was also listed there that i blogged about a few days ago, was suprised to see that game there but then again its called “left 4k dead”.

Seems like we should make a game also and submit it there don’t u think? Any suggestions?

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Left 4 Dead Java version

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
152 views

Don’t have left 4 dead because your computer can’t handle it? No problem, play the java version below that this guy created. The sourcecode is also up for grabs on their site.

Use WASD to move. Move the mouse to look around. Press the left mouse button to fire. To reload, press R. Yellow powerups restore clips. Red powerups restore health. Beating a level means the game gets harder, but you get more points for each zombie. www.javaforums.net contributed by a member.

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Send and recieve images through network using java #2

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
166 views

This is an updated blogpost about an application i blogged about here.

Below you can see the server user interface that I was coding that you can use to enable/disable the server. The server will keep track of the incoming clients and shows the current operation that the server is performing.

Now that the basic user interface is almost done, i can finally work on additional features such as saving the server messages to a logfile, and let the user add/remove/change the text at the top left corner etc. I’ll also make an image viewer that will show the latest captured image automatically.

(more…)

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Send and recieve images through network using java

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
167 views

For the past few days i’ve been working on a server/client application that sends images to the server from a client computer.

The application looks like this (server and client)


click to enlarge

How does the image look like?
To show you the results i’ve let the server and client run on my own computer, the result is the image above. The actual size however depends on the client desktop resolution, example: if the client desktop resolution is 1280×800 you will recieve the images on the same resolution.

How does it work?
The client tries to connect to the server and when succesful the client will make screenshots from the desktop and sends the data over to the server, the server writes the incoming data to an image file to the c:\demo\ScreenCapture directory. The problem however is that it will result in lots of image files as can be seen below that can take quite a chunk of your diskspace. The solution is to compress the image file(s) or to delete the images files when they are old or when it reaches a set amount. Example: the folder reaches 50 images and is trying to write image number 51, the oldest image file will be deleted etc. The image files are saved as “ScreenCapture 20081219-16 24 26.png” -> (Image name, date and time and png image format)


The current server build also accept multiple simultaneous client connections but places the images in the same map which i might recode and give each client a seperate map to save the images there.
(more…)

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Creating a simple Web Service using Jdeveloper 11g Technology Preview

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
139 views

Tutorial on how to create a simple Java Web Service in Jdeveloper 11g Technology Preview

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Eating monsters problem

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
138 views

So now and then i visit javaranch to read about Java and sometimes I happen to read topic(s) that I would try to code on my own just for the fun of it such as this one started by kris chait

Eating monsters, rules:
- There are 5 monsters, each monster having 5 calories to start with.
- Each monster is served a packet of food per round
- The food packet contains everything from 0 to 2 calories
- Each monster waits some random time before starting to eat their food
- When the food is eaten by a monster, it’s number of calories will
increase with the number of calories contained in the food packet
- A monster will burn one calorie each time it eats
- Statistically, every 5th packet of food is poisoned
- If a monster eats a poisoned packet of food, it will loose that number of calories
- All monsters must finish eating before the next round of servings
- The strongest monsters eats statistically first, the time to wait from they
are served their food is calculated from how many calories they have in them.
- One monster will also steal food from another random monster per round of serving.
It is the first monster waking up that will steal from the others. This is done before
it will eat its own packet of food.
- If either the monsters food or the stolen food, the combimed food packet
will also be poisoned.
- A monster is dead if it no longer has any calories, and it will no
longer be a participant in the food fight

(more…)

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

[Java] Call a method from another class

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
350 views

This example shows you how to call a method from another class.
Class #1

JAVA:
  1. package basic;
  2.  
  3. public class MethodCallingA {
  4.  
  5. public static void main(String[] args){
  6. MethodCallingB MCB = new MethodCallingB();
  7. MCB.methodB();
  8. }
  9.  
  10. }

Class #2

JAVA:
  1. package basic;
  2.  
  3. public class MethodCallingB {
  4.  
  5. public void methodB(){
  6. System.out.println("You called the method: methodB");
  7. }
  8.  
  9. }

After you run class #1 the output will be:
You called the method: methodB

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

[Java] parse a String to an int

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
329 views

An example how to parse a String to an int

JAVA:
  1. package basic;
  2.  
  3. public class StringToInt {
  4. public static void main(String[] args){
  5. String numberStrOne = "135";
  6. String numberStrTwo = "246";
  7. int result = Integer.parseInt(numberStrOne)Integer.parseInt(numberStrTwo);
  8. System.out.println("The result is " + result);
  9. }
  10. }

The output will be:
The result is 381

Bookmark this page: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • De.lirio.us
  • Slashdot
  • StumbleUpon
  • Technorati
  • Reddit
  • Digg

Your Ad Here

Java stars

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
188 views