Monday, December 17, 2007

Guide To Maximize Laptop Battery Life

Like all other batteries, your computer's battery will degrade over time. This means that the battery's performance will diminish with time and use. To maximize your battery's life, you are advised to adhere to the recommendations set out below.

Conditioning a new battery pack Before you use a battery pack for the first time, there is a "conditioning" process that you should follow:
1 Insert the new battery without turning the computer on.
2 Connect the AC adapter and fully charge the battery.
3 Disconnect the AC adapter.
4 Turn on the computer and operate using battery power.
5 Fully deplete the battery until the battery-low warning appears.
6 Reconnect the AC adapter and fully charge the battery again.

Follow these steps again until the battery has been charged and discharged three times. Use this conditioning process for all new batteries, or if a battery hasn't been used for a long time. If the computer is to be stored for more
than two weeks, you are advised to remove the battery pack from the unit.

Warning: Do not expose battery packs to temperatures below 0°C
(32°F) or above 45°C (113°F). Extreme temperatures may adversely
affect the battery pack.

By following the battery conditioning process you condition your battery to accept the maximum possible charge. Failure to follow this procedure will prevent you from obtaining the maximum battery charge, and will also shorten the effective lifespan of the battery. In addition, the useful lifespan of the battery is adversely affected by the following usage patterns:
• Using the computer on constant AC power with the battery
inserted. If you want to use constant AC power, you are advised to
remove the battery pack after it is fully charged.

• Not discharging and recharging the battery to its extremes, as
described above.
• Frequent use; the more you use the battery, the faster it will reach
the end of its effective life. A standard computer battery has a life
span of about 300 charges.

Optimising battery life
Optimizing battery life helps you get the most out of battery
operation, prolonging the charge/recharge cycle and improving
recharging efficiency. You are advised to follow the suggestions set
out below:
• Purchase an extra battery pack.
• Use AC power whenever possible, reserving battery for on-the-go
use.
• Eject a PC Card if it is not being used, as it will continue to draw
power (for selected model).
• Store the battery pack in a cool, dry place. The recommended
temperature is 10°C (50°F) to 30°C (86°F). Higher temperatures
cause the battery to self-discharge faster.
• Excessive recharging decreases the battery life.
• Look after your AC adapter and battery.

Thursday, December 13, 2007

Widget Server Spring Framework Integration

As Java lightweight framework, Spring is widely used in Java world. it is because Spring is simple, light, and easy to integrate with other frameworks. Widget Server Framework, as one of Xml Gui Implementation with Java, gives us a great solution, that is when we make an application, we can use it as a standalone, Thin Client ,and web based app without changing the code.

The main idea when we want to integrate this two frameworks (using Widget Server at Presentation Layer and Spring at Bussines Layer) is we have to make Widget Server call Spring Application Context/Bean Factory(i.e file applicationContext.xml) when Widget Server Servlet is initialized by Servlet Container.

First thing we should do is creating Widget Server mandatory directory in spring project directory

for example at Spring "DistroSystem" Project i have war/ and src/ directory

DistroSystem
|—-src
|
|—war–
|
|–WEB-INF
|
|—lib
|
|—classes

Widget Server Mandatory directory is

|
|–*.xml
|—start
| |
| |–src
|
|–WEB-INF
|
|—lib
|
|—classes

Next, move Widget Server's “start” directory to Spring's “war” directory, After that move all file (not directory just file) under to “war” directory. Move all Widget Server library under “lib” to Spring's “lib”. For Widget Server "src" directory, move all its content to spring's “src” directory.

After that directory structure must like this:

DistroSystem
|
|—-src
| |
| |–Wiser Java Source
| |–Old Bussines and/
| or persistence Java source
|—war–
|
|–start
|
|–WEB-INF
|
|—lib
| |–Spring And Wiser library
| dependency
|
|—classes

Step 2 is modifying piccolo.jar, theWiser library dependency. Extract piccolo.jar . Remove all piccolo's xml parsers package(folder javax). and compress piccolo again. So in this new piccolo.jar only exist "com" and "META-INF" folder. After this you can write your web.xml.

Step 3 is developing your presentation layer and Listener code. In order to make Listener code get bean from Spring, We must make parent listener for all listeners which we want it to call Spring bean code. Here is my code
package Listeners;

import de.ug2t.unifiedGui.service.UnBasicServlet;
import de.ug2t.kernel.KeRegisteredObject;
import javax.servlet.*;
import javax.servlet.http.*;

import org.springframework.web.context.*;
import org.springframework.web.context.support.*;

public abstract class BasicListener{
private WebApplicationContext wac ;

public BasicListener()
{
ServletConfig sg=
(ServletConfig)KeRegisteredObject.pcmf_getGlobalObjByName
(UnBasicServlet.SERVLET_CONFIG);
ServletContext sc =sg.getServletContext();
wac = WebApplicationContextUtils.getWebApplicationContext(sc);
}

public WebApplicationContext getWebApplicationContext()
{
return wac;
}
}

This is one of my Widget Server listener code which use Spring's Bean

package Listeners;

import de.ug2t.kernel.*;
import de.ug2t.unifiedGui.*;
import de.ug2t.unifiedGui.interfaces.*;
import de.ug2t.unifiedGui.loader.*;

import java.util.*;
import DistroSystem.Stock.DAO.*;
import DistroSystem.Stock.Logic.*;
import DistroSystem.*;

import org.springframework.web.context.*;

public class BarangGetAll_li extends BasicListener implements IUnGuiEventListener
{

private BukuManager buku_man;

public void pcmf_execListener(UnComponent xParam) throws Exception
{
WebApplicationContext wac = getWebApplicationContext();
buku_man=(BukuManager)wac.getBean("bukuManager");
// get all relevant widgets from the registry
IUnTable l_table = (IUnTable) KeRegisteredObject.pcmf_getObjByName("atable");
UnTableLoader l_load = (UnTableLoader) KeRegisteredObject.pcmf_getObjByName("tableLoader");

List list = buku_man.getAll();

// insert row
((BukuTableModel) l_load.pcmf_getModel()).setBuku(list);
l_table.pcmf_repaint();

return;
}
}

When we want to get beans's Spring we just must extend BasicListener class. To get a bean first call super method getWebApplicationContext(), this method will return "WebApplicationContext" object. With this object you can get all beans from Spring's Application Context

My favourite 3D Games On Linux



America’s Army is a tactical, multiplayer, FPS (first person shooter) owned by the United States Government and released as a global public relations initiative to help with U.S. Army recruitment. The first version, Recon, was released on 4th July 2002. The current version 2.8.2 was released on september 2007.

Edit: Latest Linux available version is 2.5

It’s the first well known computer game used for political aims. The game is used as a playable recruiting tool and critics have charged the game serves as a propaganda device. A counter on the homepage of the PC version shows over eight million registered accounts as of 2007. GameSpy tracked the game usage and reported an average of 4,500 players at any one time between 2002 and 2005.

Download latest linux version on ftp://ftp.free.fr/mirrors/AmericasArmy/Linux_v2.50/armyops250-linux.run

Tremulous

Tremulous is an open source team-based FPS (first person shooter) with a game play that is similar to Gloom (a Quake 2 mod) and Natural Selection (a Half-Life mod). The game features two teams, humans and aliens, each with their own strengths and weaknesses. The game has been downloaded over 200,000 times and was voted “Player’s Choice Standalone Game of the Year” in Mod Database’s “Mod of the Year” 2006 competition.
Nexuiz


Nexuiz is a free, cross platform, FPS (first person shooter) distributed under GNU General Public License by Alientrap Software. It started back in May 31 2005 with version 1.0 using DarkPlaces, a significanlty modified Quake engine. The current version, 2.3, was released on May 31, 2007. Available for Linux, Mac and Windows.

Several notable features of the game include

* ability to multiplay up to 64 players
* ability to generate bots for practice sessions
* dynamic lighting system similar to Doom 3

Alien Arena 2007


Alien Arena is a completely free FPS (first person shooter) started by COR Entertainment in 2004 comprising of a science fiction ambience and a Quake like gameplay. This game is playable in single player mode against bots, but the action and thrill lies at the online multiplayer mode. Features of the Alien Arena 2007 include an internal server browser for finding other people to play online and an external program that acts as an IRC interface. There are 6 game types and 6 game mutators that changes the gameplay. Cattle Prod is a new game type that requires you to herd robotic cattle to earn points. Alien Arena 2007 is playable in Linux, Windows and FreeBSD.

TrueCombat: Elite


TC:Elite happens to be a total-conversion modification of Wolfenstein: Enemy Territory by Team Terminator and Groove Six Studios. The game is free and playable across all platforms. Notable features include iron sights aiming (no crosshair), multi layer object penetration, letterbox / wide screen view modes, lag compensation, client side bullet prediction and support for PunkBuster, the anti cheat software.

The Open Racing Car Simulator


TORCS is an open source 3D racing simulator using OpenGL technologies. It is runnable on all Linux, FreeBSD, MacOSX and Windows platforms. There are 50 different cars, 20 tracks and 50 opponents to race against. The multiplayer mode can accommodate up to 4 human players. Several of the simulation include damaged models, collisions and aerodynamics like ground effects, spoilers, etc. Development is currently being carried out to enable online racing mode.

Frets On Fire


Winner of the Assembly Demo Party 2006, Frets on Fire is a music video game that uses the keyboard to play along with scrolling on-screen musical notes to complete a song. The player has to imagine the keyboard as a guitar and pick it up to play. One hand will be used to press the ‘frets’ (F1 to F5) and another will be used to press the ‘picks’ (Shift or Enter). Colored markers that appears are to be played by pressing ‘frets’ of the correct color and ‘picks’ at the correct moment. There are also song editors and tutorials featured in the game. This game is really addictive.

Scorched 3D


Scorched 3D is a 100% free turn-based artillery game modeled after the classic DOS game Scorched Earth ‘The Mother Of All Games’. Operatable across all operating systems. What started as a 3D landscape generator has now become a cool 3D game that requires skills to master. Players are supposed to take turns homing in to hit the target by adjusting the angle, rotation, power and a weapon of choice every other turn. Hits and kills will generate income for you to buy better weapons and items. Note that items are as important as weapons.

from http://gamesuy.blogspot.com/2007/12/top-10-free-linux-3d-games.html with little modifications