02.27.08

Reading registry values on local/remote machines in Java

Posted in Technical at 6:46 pm by Ravi

Using JRegistryKey developed by BEQ Inc registry reading in Java becomes lot more easier. We need to have jRegistryKey.dll and JRegistryKey.jar in proper locations (e.g. bin, lib folders in App Servers or in CLASSPATH) and using the following sample of class, we can read the registry keys/values of remote machines(given proper privilege to read the registry).

import ca.beq.util.win32.registry.*;
import java.util.Iterator;
import com.xyz.common.logging.Logger;

public class ReadRegistry {
static Logger logger = Logger.getLogger(ReadRegistry.class.getName());

private String remoteMachine = null;
private RegistryKey regkey = null;
private final String PATH = "SOFTWARE\\XYZ"; //give appropriate path here

/**
* Creates a new instance of ReadRegistry
*/
public ReadRegistry(String machine) {
this.remoteMachine = machine;
this.regkey = new RegistryKey(machine, RootKey.HKEY_LOCAL_MACHINE, PATH);
}

//search for value
public String searchValue(String searchString){
String ret = null;

logger.info("Searching for " + searchString + "..... under " + regkey.getPath() + " which exists:" + Boolean.toString(regkey.exists()));

if(regkey.hasValues()) {
Iterator i = regkey.values();
while(i.hasNext()) {
RegistryValue x = (RegistryValue)i.next();
System.out.println("Sub values: " + x.getName());
if(x.getName().indexOf(searchString) > -1){

logger.info("Found match " + x.getName() + " for " + searchString );

ret = (String)x.getData();
}
}
}

return ret;
}

public String getRegistryVal(String keyVal){
String ret = null;
logger.info("REMOTEMACHINE: " + remoteMachine + " PATH: " + PATH + " KEYVAL: " + keyVal);
if(regkey.hasValue(keyVal)) {
RegistryValue regVal = regkey.getValue(keyVal);
ret = (String)regVal.getData();
}
return ret;

}

}

Technorati Tags: ,

01.05.08

How Starbucks saved my life - Michael Gill

Posted in I'm reading.. at 2:20 pm by Ravi

This book by Michael Gill describes how he found new ways to live life after joining Starbucks outlet in NYC. With top class education from a premier institute and significant work experience as a creative director in an advertising firm for decades, Gill was fired by one of his colleagues. Amidst financial and social insecurities, he manages to get a job as a barista in the Starbucks where Gill learns some of the greatest human qualities and skills that resurrects his faith in life.

Technorati Tags:

01.11.07

“The Greatness Guide” by Mr Robin Sharma is really gr8

Posted in I'm reading.. at 9:57 am by Ravi

For past few days, I have been perusing ‘[tag]The Greatness Guide{/tag]’
by Robin Sharma. The snappy and pragmatic content of the book
is what I have been searching for a while. They condense the
words of wisdom of the some of the great people from all spheres
of life. The stories that Mr Sharma tells us can have tremendous
impact in improving our professional and personal life.
I checked out the authors website as well and
found lots of useful stuffs like podcasts, blogs etc
out there.(This is in sharp contrast to the site of Mr
Chetan Bhagat(author of ‘Five POint Someone’ and
‘One night @ call center’))
Now I am looking forward to devouring “[tag]The monk
who sold his Ferrari[/tag]”.

Technorati Tags: , , ,

01.08.07

Innovation and Apple

Posted in Technical at 9:28 am by Ravi

Recently I had a chance to experiment 2 gig 2nd generation
iPod nano. I was attracted by its simple, sleek
design and of course the quality of the product.
I could have easily settled for so many cheaper
varieties of media players available in the
market but thought there is difference between
‘riding a toyota corolla vs Benz’.
It’s really amazing how engineers at Apple
managed to squeeze flash memory, a processor(or better
SOC) and Lithium ion battery in that slim case.
More importantly, Apple provides a host of
services to its customer: extended product/battery protection plan,
number of accessories for the product, songs
(in protected AAC(Advanced Audio Coding) format)
for 99 c per song from its iTunes store.
Every product of Apple has its own
distinctive features that regalises it.May it be
iMacs, iPods or softwares developed by the computer.

Technorati Tags: , , , ,

12.11.06

Nepal Telecom plans to drastically reduce Internet tariff in Nepal.

Posted in Technical at 10:27 am by Ravi

Happy days are ahead for the Internet enthusiasts
of Nepal.. The telecom giant of the nation- Nepal Telecom
intends to cut-off Internet rates by about two-thirds
of the current ones[as reported by the Kantipur Daily].
This comes as an after-effect of laying the fibre-optic
backbone along the east-west(Mahendra) Highway and connecting
it to the network of BSNL through points at Birgunj and Biratnagar.

Though the subscribers of the leased(dedicated) lines and ISDNs
will be reaping the economic benefits, it’s not known to what extend
the dial-up internet users(that still constitutes the largest user base)
will be affected.

We, techies of Nepal, are looking forward to the implementation of
similar optical backbone along the Araniko Highway, thus connecting
to the telecom networks of China.

Such interconnections make it possible to access the worldwide
network through undersea cables passing via Chennai and Mumbai(1st case, interconnection to
networks of India) and HongKong(2nd case).

Technorati Tags: , , ,

07.01.06

Golmud -Lhasa Railway: an engineering feat

Posted in Technical at 9:37 am by Ravi

Finally a first passenger train rolled off
from Beijing to Lhasa last Saturday. This
marked the completion of the railway line from
Golmud, a town in central China to Lhasa, the biggest
town of Tibet. The journey(Beijing-Lhasa) is of about
48 hours duration and costs approximately $50.
The construction of the line is considered
an engineering marvel because it passes through high
altitude passes and permafrost region. The instability
of land in the permafrost areas, thinning of air etc
posed technical challenges to the team of engineers and
it took about 30 years of research to overcome them.
To compensate for the large variation in temperature changes
they have deployed “thermosiphons ” which are special type
of pipes erected alongside the railway tracks and contains
liquid ammonia at the bottom that is inside the ground. Its
sole objective is to minimise the increase in temperature
during summer so that permafrost can be maintained throughout
the year and hence, the land will remain stabilised. Whenever
the temperature of the land increases, the liquid ammonia(
that is at the bottom of the pipe inside the ground) evaporates, moves up the siphon, exchanges the heat to the surrounding
air via circular heat sinks, then condenses to its origination.
Throughout most of the permafrost area, the line
is constructed on the concrete bridges.
As at high isolated mountain passes, passengers may suffer
from lack of oxygen, the coaches of the train are equipped with
oxygen supplies.
This railway is expected to connect the segregated
and sparsely populated Tibet to the rest of China and foster
its development.

Technorati Tags: , ,

06.27.06

Ogg Vorbis is pleasant to ears..

Posted in Technical, Open-source at 4:51 am by Ravi

It all started with Fraunhofer Society’s decision to charge
licensing fees for using MP3..Christopher Montgomery &
associates worked on open format for encoding/compressing audio
and hence came Ogg Vorbis .
I stumbled upon it while exploring free goodies that
were available in the Red Hat distro of Linux. Expecting XMMS
player to faithfully play MP3 files, I loaded some of them but
to no use..Naturally I was wondering what this particular player
was useful for..After playing around for a while I dug out
a CD ripper called “grip” and associated with it an ogg encoder.
After listening to some music in ogg , I became its ardent fan .
The sound is crystal clear and the files were comparatively
of small sizes.
Ogg uses variable bit rate encoding: it uses low bit rate
for that portion of sound where silence or its equivalents prevails
and vice versa.

Technorati Tags: , , , , , ,

06.25.06

SkypeOut free for senior Skype Users!!

Posted in Technical at 10:59 am by Ravi

Skype that has been providing free, quality PC2PC VoIP services to
all the users around the world(also paid services known as SkypeOut
to call landlines/mobiles) and whose motto is “the whole world can talk for free”,
provides € 1.00 worth of call credit to senior Skype users. It must be a
goodwill gesture and perhaps, a campaign to increase its user base. When
there is much talk about Skype integrating Paypal to its services, this
activity will be helpful to spread good words about Skype.
The voice quality is superb even when using Dial-Up Internet
connection. As soon as I was informed of this offer, I called up
few of friends around the world and surprised them all. For countries
like US, Canada, UK, Chile, China, Australia etc the charges as
nominal.
It would be great if Skype comes up with such surprise gifts
time and again.

Technorati Tags: , , , , ,

06.24.06

Offshoring and facts associated with it

Posted in Technical, Open-source at 4:39 am by Ravi

We are aware of the hot and happening phenomenon
across the globe : offshoring(or outsourcing). It has been
quite a while that a range of works starting from back-office
processing to high-level research and development are sent
to Asian countries like China, India and eastern European
cities such as Prague, Moscow, St Petersburg etc. primarily
from the US and the western European countries.
The prime factors that influence this phenomenon are
cost, availability of the talent in certain locality, market groups,
infrastructure, strategic aims, connectivity and the [tag]business
environment[/tag] prevailing in the area. Next important issue is
time extension i.e. offshoring leads to the continuum of the
work. For example, a software development team in the US
completes a phase of the work in certain duration of time and
then hands over the task to the Quality Assurance team in India
or China for testing and due to time zone differences, the work
progresses endlessly.
However, the process is not so spontaneous as it may seem
because of the inherent risks involved. Red-tapism, infrastructural
backwardness, labour laws, cultural/climatic differences etc all have to be
considered. So most of the companies first remain in the “wait n observe”
condition closely monitoring the situation of the first few companies
who have moved to a particular location and after being assured
that they will be able to benefit themselves, they gradually pour
in to that location. Lets take the case of South-Indian cities. It was
in 1985 that Texas Instruments became a first western hi-tech
company to move to Bangalore. At that time, it used bullock
carts for transportation and used somewhat derelict building
for housing its equipments. That must have been a testing time
for both the company(to adapt to the environment) and
the local government(for incubating the first foreign company)
Now most of the IT, Biotechnology, Business houses throughout the world
have their presence in at least one of the south-Indian cities if not in Bangalore.
Though the expansion of the city seems to be overwhelming, the infrastructure
growth is observed to be dismal. Narrow old congested streets,
single international airport(next one in pipeline), sagging telecommunication
networks and diminishing talent pool have forced industry heavyweights to
seek for alternatives somewhere else.
The increasing wages, high attrition rates of the employees and the
fact that only a fraction of about 400,000 tech graduates in India have
right skills matching the demand in the industry have led to shortage
of skilled workers in so-called tier-1 Indian cities. As a result, companies are
looking at tier-2 cities in India and to cities in countries such as China and eastern
Europe.

Technorati Tags: , , , , , , , , , ,

06.22.06

Next blast by Google!!

Posted in Technical at 4:41 am by Ravi

Google Inc is undergoing expansion with a new
campus at the Dalles, Oregon. It is speculated
that they are setting up a global computing and [tag]data
center[/tag] with tens of thousands of processors and disks.
Some interesting points to note are- they are deploying
most of the components using Velcro so that they are
hot swappable. To counter tremendous heat generated
by the processing units, cooling plants have been developed.
This reminds us of the good-old days in the mid-twentieth
century when early computing pioneers had monstrous machines
housed in buildings churning out heat, noise and what not..
Among new products and services being rolled out, its
search services(where a delay of a millisecond may make a user
unhappy) primarily require enormous computing resources whereas
its mail service need maximum storage space.

Technorati Tags: , , ,

« Previous entries ·