Tuesday, June 10, 2008

Java 2 Micro Edition - Profiles

A Profile primarily defines the type of device supported. Profiles are built on top of configurations, since they are specific to the memory available. They add an additional layer on the top of the configuration layer providing APIs for a specific class of devices.

Profiles are specific to the configurations selected. For different configurations, different profiles are available.

CDC Configuration

For CDC configuration, a foundation profile is available, which is primarily a skeleton profile over which we can create our own profile.

CLDC Configuration - MIDP, KJava And Doja

For the CLDC configuration, predefined profiles such as MIDP, KJava and Doja are available. The KJava profile is one of the popular profiles for the Palm OS. It consists of Sun specific APIs. Further it's not a standard J2ME profile.

The Doja profile is another popular profile, though not widely used in our mobiles; it is a rapidly growing profile, because of its simple user interface and as it easy to understand. This profile is popularly used in Japan for their local cellular phone companies. However its influence on the entire mobile network is still a long way ahead.

The most popular profile used these days in the Mobile Information Device Profile (MIDP). It is mainly based on the CLDC configuration and is widely used in cellular phones and pagers. Currently there are two versions of MIDP that are available for programming - MIDP 1.0 and MIDP 2.0. Mainly the differences between these two profiles are the fact that the MIDP 2.0 has extended features when compared to MIDP 1.0 such as audio and 2D gaming. On the other hand MIDP 1.0 has greater portability when compared to MIDP 2.0. Many of the cellular phone brands such as Nokia, LG, Samsung, and Motorola use these profiles.

Java 2 Micro Edition - Configurations

Configurations define the basic run-time environment as a set of core classes. They add the classes required for the program to be compatible with the virtual machine.

J2ME has two main configurations – Connected Limited Device Configuration (CLDC) and Connected Device Configuration (CDC). These configurations actually specify the main type of the device, which defines how much memory is available for the operations to be performed.

CLDC requires less memory whereas CDC requires at least 2MB of memory to perform its computations. The CLDC configuration consists of classes and a set of libraries more specific to the mobile devices. The CDC configuration is basically a stripped down version of J2SE with the CLDC classes added to this.

The CLDC configuration is supported by KVM and the CDC configuration is supported by CVM. Configurations decide whether optional features such as multi dimensional arrays, threads, JNI and others have to be included or not.

CLDC configuration is used when the memory available is low, such as the case of PDAs and cell phones. CDC configuration is used when the memory available is more than 2MB but less than that available on our computers, such as the case of set-top boxes.

Java 2 Micro Edition - Virtual Machines

A virtual machine is the immediate layer overlying the operating system and is mainly responsible for running any program written in Java. This is the main reason that codes written in Java are highly portable. The virtual machine interprets the Java byte-code and converts into native system calls. Further as every program runs in the confinement of the virtual machine, no penetration is possible into the operation system, reducing the risk of viruses.

J2ME offers two different virtual machines, namely CVM (for higher end mobile devices) and KVM (for lower end mobile devices). CVM is used for devices which have higher memory capabilities and which are closer to computers whereas KVM is used for devices which have lower memory capabilities, such as mobile phones. KVM and CVM are primarily nothing but the subset of JVM. They can be thought as just shrunken versions of the JVM and are more specific to J2ME.

Java 2 Micro Edition - An Overview

Mobile devices have become a part and parcel of almost everybody’s life. By mobile devices, we don’t mean just our cell phones, but also devices such as pagers, personal digital assistants (PDA’s) and small retail terminals (devices such as set-top boxes).

To use these devices more effectively and more efficiently, programming was introduced into these devices. Every mobile device has a basic operating system which co-ordinates the various tasks to be performed by the device itself. Examples of these operating systems are the Symbian operating system, Windows operating system, Linux operating systems and many others. Many of the primitive models had a PROM built in them, instead of an operating system, so as to start the mobile device without any hassles.

Different file formats have been developed for these mobile devices. Many of these are basic extensions of a high level language so as to perform properly even at the availability of less memory. Examples of this are the *.sis and *.sisx file formats which are basic extensions of C, *.jar and *.jad which are basic extensions of the Java 2 Standard Edition.

Bringing J2ME Into The Picture

One of the popular languages used in the development of these mobile programs is Java, more specifically the Micro Edition of Java called J2ME. As known, Java is divided into three segments J2SE, J2EE and J2ME, while the former two are used for servers and higher end computers, J2ME is used for mobile devices.

At first J2ME was intended as a platform for game development, but now-a-days J2ME is used for developing almost every kind of application. Following the fundamental principle of Java, J2ME also follows the principle of "Write Once Run Anywhere (WORA)" to a large extent. Also the security of these programs is high as it runs in the confinement of the virtual machine itself. Further the possible users of this technology are estimated to be very high, making it popular as a whole.

J2ME Architecture

J2ME runs mainly on virtual machines, which actually runs the Java byte code on the device. Before the implementation of any byte code, every program written in J2ME should specify its configuration and its profile. They are layers immediately above the virtual machine layer, as shown in the figure. These layers form the very bone structure of the J2ME program and selecting these layers properly in the key of writing a suitable program for a particular device. The first and foremost layer is the Operating System layer which co-ordinates the tasks of the entire device itself.

Wednesday, October 03, 2007

Hidden Files Not Shown

This is another problem associated with the w32.USBWorm seen in the previous post. Sometimes this problem occurs even independently, without any association to the mentioned virus. This is basically due to a wrong registry key value.

The following steps have to be taken so as to restore hidden files and folders.

  1. Go to Start > Run, then type Regedit
  2. Navigate to the registry folder HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL
  3. Find a key called ChekedValue
  4. Double click CheckedValue key and modify it to 1. This is to show all the hidden files

Now you should be able to view all the hidden files, and also to alter its status from folder options.

Removing Orkut Hater - w32.USBWorm

I don't hate Mozilla but use IE or else
Use Internet Explorer U Dope
Orkut is banned you fool, The administrators didn't write this program guess who did?? MUHAHAHA!!

These are not any statements to encourage the use of IE or defame Orkut, but the indications of a virus infected machine, yes Virus. This virus is basically a malware named as w32.USBWorm and spreads primarily through pen drives. Well on the brighter side, this virus is a decent one and does not affect any of your files or damage your system.

Now coming to its removal, unfortunately many of the anti-virus software today are not in a position to detect this virus. So it has to be removed manually, the following steps have to be followed for its removal,

  1. Press CTRL+ALT+DEL and go to processes tab
  2. Look for svchost.exe under the image name. There will be many but look for the ones which have your username under the username
  3. Press DEL to kill these files. It will give you a warning, Press yes
  4. Repeat for more svchost.exe files with your username and repeat. Do not kill svchost.exe with system, local service or network service!
  5. Now open My Computer
  6. In the address bar, type C:\heap41a and press enter. It is a hidden folder, and is not visible by default
  7. Delete all files here
  8. Now go to Start --> Run and type Regedit
  9. Go to the menu Edit --> Find
  10. Type "heap41a" here and press enter. You will get something like this "[winlogon] C:\heap41a\svchost.exe C:\heap(some number)\std.txt"
  11. Select that and Press DEL. It will ask "Are you sure you want to delete this value", click Yes
  12. Now close the registry editor

Now the virus is gone. But be sure to delete the autorun.inf file and any folder whose name ends with .exe in the pen drive.

Thursday, July 05, 2007

Download Your Favorite Videos

Every day, we see thousands of videos being uploaded in many of the video hosting sites like Dailymotion, Youtube, Veoh. These sites are very interesting as there is something in every genre - Science and Technology, Gaming, Music.

In fact any video can be found with a proper search. However a small problem exists with these videos, they can be seen but cannot be downloaded straight from the website as there is no download facility in most of these sites. So the storage of our favorite videos is not possible. But as usual, there is always a solution to a problem.

Let me explain this with an example. Consider this video, It is from Dailymotion from the games genre. It is the preview of the latest Need For Speed game - The Prostreet (I know I can embed the video here, but I want you to go to the original site).

Now, you can see the video being buffered so that it can be viewed; scroll down a bit in the page. Here two important links will be given. One is the permanent link and the other is the embeddable player. The embeddable player code can be copied into an html page for the video to be embedded onto the webpage. However we are aiming to save it on our system. This is now possible with a few websites that help us to download video content. A few of them are KeepVid, ClipNabber.

Consider I am downloading from ClipNabber. I paste the permanent link in the space given there, which is right below the logo and click the download button. Now scroll on the same page a bit, and just after the logo you will find a "download link" button. Click on that and select save, select the folder where it is required and the job is done. The video will be stored in the computer. Whatever maybe the format of the downloaded video, change the extension of the file to .flv. You will need Flash Player to play files with this format.

Better players can be found with a little bit effort. The beauty of the flv format is its small size, that is in this example 45 seconds of video was only of about 1.5 MB, which is very less when compared to other formats. This video can be converted into other formats with the help of video converters also if required.

This solves a large part of our initial problem, but not the entire problem. That is because this works with videos that are available directly without any registration. Now what if a registration is required, we cannot use any of these sites for download. Generally registration is required for some websites and a few videos of the above-mentioned sites. However this problem was solved by the latest version of Real Player that was released. This player can download video that can be watched by us. For example, if there was a video which can viewed only after registering, all we have to do is register and go to the video, immediately a small pop up will appear above the video saying "Download this video using Real Player". Click on this and the video will be downloaded on to the system. However Real Player 11 is still a beta version and its limitations cannot be told yet.

Before I conclude this article, I would like people to know that this article is not for supporting piracy, but only for videos which have proper rights. After all an original will always be an original.

Have fun!

Saturday, May 12, 2007

Thermoelectric Power

The Seebeck Effect is the conversion of temperature differences directly into electricity. In other words, it is the generation of electricity in a circuit containing two different metals, or semiconductors, by keeping the junctions between them at different temperatures. This effect is due to two effects - Charge Carrier Diffusion and Phonon Drag. This principle is used in thermal diodes and thermoelectric generators.

The Seebeck Voltage is the voltage produced between the two junctions of a ferrite material, when they are maintained at two different temperatures. This voltage is produced due to the fact that when two junctions are two different temperatures, the majority charge carriers (holes/electrons) are diffused from the surface having high temperature to a surface having relatively low temperature.

This voltage can be mathematically expressed as V = (integral)(T1 to T2) [SB(T) - SA(T)]dT where SA and SB are Seebeck coefficients of two different metals A and B, T1 and T2 are temperatures of hot and cold junctions. Generally, V = (SB - SA)(T2 - T1).

The term Thermoelectric Power is a misnomer since it measures the voltage in response to temperature rather than power. It is also known as Seebeck coefficient. It is defined as the open circuit voltage produced between two points on a conductor, where a uniform temperature difference of 1K exists between those points. It is a measure of the magnitude of an induced thermoelectric voltage in response to a temperature difference across that material. It has units of V/K. It is also a measure of entropy per charge carrier in the material.

Mathematically it is represented as S = Thermoelectric Voltage / Temperature Difference. In terms of electric field, it is written as S = E / Temperature Gradient. If m is the Thompson coefficient of an material, then S = (integral) [m / T]dT.

Thermoelectric power determines the efficiency of a thermoelectric material. More the Seebeck coefficient better is the efficiency. Materials with high Seebeck coefficient are Bismuth Telluride and Uranium Dioxide.

One of the important applications of Seebeck coefficient is the determination of Fermi Energy Gap. For a n-type semiconductor, QT = Eg - Ef + 2KT and for a p-type semiconductor, QT = Ef - 2KT where,
Q - Seebeck coefficient
Eg - Energy gap of the ferrite semiconductor
Ef - Height of fermi energy level from the top of the filled valency band
2KT - the term, which accounts for the transfer of KE of the ferrite to a cold one

For certain materials, the conduction takes place in exceedingly narrow bands or in localized levels, so the KE term can be neglected, so for a n-type semiconductor, Ef = Eg - QT and for a p-type semiconductor, Ef = QT.

Another important application of the Seeback coefficient is the determination of Carrier Concentration. In the case of low mobility semiconductors such as ferrites, the activation energy is often associated with the mobility of charge carriers. They are considered as localized at the ions or vacant sites and the conduction occurs via a hopping type process, which implies a thermally activated electronic mobility. In such cases, it is appropriate to consider small polarons as charge carriers rather than electrons or holes. Further, it is known that the concentration (n) is given by Q = - (K/e) [ lnb(N-n)/n + St/K ] where,
St - Entropy transport term, which is negligible for ferrite materials
N - density of states or number of available sites
K - Boltzmann constant
e - electronic charge
b - degeneracy factor which includes both spin and orbital degeneracy and its value is taken as 1

Considering n << N, we can reduce the above formula to n = N exp (Q e/K). If V is the volume of the sample and the value of K/e is found to be 86.4, so we get n = N/V exp (Q / 86.4). In the case of ferrites having exceedingly narrow bands or localized levels, the value of N, the density of states can be taken as 10^(22) cm^(-3).

In the case of n-type semiconductor material, the hot junction becomes positively charged, as it loses some of its electrons. The cold surface of the semi conductor becomes negatively charged due to the diffusion of free electrons from the hot portion. Conversely in a p-type semiconductor, the hot surface becomes negative, and the cold one positive. Thus the type of conduction in a given semi conducting material can be determined from the sign of the thermo emf.

Sunday, April 22, 2007

Solar Cells

A solar cell or photovoltaic cell is a device that converts light energy into electrical energy. Sometimes the term solar cell is reserved for devices intended specifically to capture energy from sunlight, while the term photovoltaic cell is used when the light source is unspecified.

Fundamentally, the device needs to fulfill only two functions - Photogeneration of Charge Carriers (electrons and holes) in a light-absorbing material, and Separation of the Charge Carriers to a conductive contact that will transmit the electricity. This conversion is called the photovoltaic effect, and the field of research related to solar cells is known as photovoltaics.

Solar cells have many applications. They have long been used in situations where electrical power from the grid is unavailable, such as in remote area power systems, Earth-orbiting satellites and space probes, consumer systems, e.g. handheld calculators or wrist watches, remote radiotelephones and water pumping applications. More recently, they are starting to be used in assemblies of solar modules (photovoltaic arrays) connected to the electricity grid through an inverter, often in combination with a net metering arrangement. Solar cells are regarded as one of the key technologies towards a sustainable energy supply.

Thin-film solar cells use less than 1% of the raw material (silicon or other light absorbers) compared to wafer based solar cells, leading to a significant price drop per kWh. There are many research groups around the world actively researching different thin-film approaches and/or materials, however it remains to be seen if these solutions can generate the same space-efficiency as traditional silicon processing.

One particularly promising technology is crystalline silicon thin films on glass substrates. This technology makes use of the advantages of crystalline silicon as a solar cell material, with the cost savings of using a thin-film approach. Another interesting aspect of thin-film solar cells is the possibility to deposit the cells on all kind of materials, including flexible substrates (PET, for example), which opens a new dimension for new applications.

Gas Sensors

Gas sensors interact with a gas to initiate the measurement of its concentration. The gas sensor then provides output to a gas instrument to display the measurements. Common gases measured by gas sensors include Ammonia, Aerosols, Arsine, Bromine, Carbon Dioxide, Carbon Monoxide, Chlorine, Chlorine Dioxide, Diborane, Dust, Fluorine, Germane, Halocarbons or Refrigerants, Hydrocarbons, Hydrogen, Hydrogen Chloride, Hydrogen Cyanide, Hydrogen Fluoride, Hydrogen Selenide, Hydrogen Sulfide, Mercury Vapor, Nitrogen Dioxide, Nitrogen Oxides, Nitric Oxide, Organic Solvents, Oxygen, Ozone, Phosphine, Silane, Sulfur Dioxide, and Water Vapour.

Important measurement specifications to consider when looking for gas sensors include the response time, the distance, and the flow rate. The response time is the amount of time required from the initial contact with the gas to the sensors processing of the signal. Distance is the maximum distance from the leak or gas source that the sensor can detect gases. The flow rate is the necessary flow rate of air or gas across the gas sensor to produce a signal.

Gas sensors can output a measurement of the gases detected in a number of ways. These include percent LEL, percent volume, trace, leakage, consumption, density, and signature or spectra. The lower explosive limit (LEL) or lower flammable limit (LFL) of a combustible gas is defined as the smallest amount of the gas that will support a self-propagating flame when mixed with air (or oxygen) and ignited. In gas-detection systems, the amount of gas present is specified in terms of % LEL: 0% LEL being a combustible gas-free atmosphere and 100% LEL being an atmosphere in which the gas is at its lower flammable limit. The relationship between % LEL and % by volume differs from gas to gas. Also called volume percent or percent by volume, percent volume is typically only used for mixtures of liquids. Percent by volume is simply the volume of the solute divided by the sum of the volumes of the other components multiplied by 100%. Trace gas sensors given in units of concentration: ppm. Leakage is given as a flow rate like ml/min. Consumption may also be called respiration. Given in units of ml/L/hr. Density measurements are given in units of density: mg/m^3. A signature or spectra measurement is a spectral signature of the gases present; the output is often a chromatogram.

Common outputs from gas sensors include analog voltage, pulse signals, analog currents and switch or relays. Operating parameters to consider for gas sensors include operating temperature and operating humidity.

Copper Oxide (CuO) thin films were deposited using a reactive DC sputtering method for gas sensor applications. The structure of the films determined by means of an X-Ray diffraction method indicates that the phase of Copper Oxide can be synthesized in the total pressure and temperature ranges of 6-8.5 mbar and 151-192 °C, respectively. The resistivity of the film synthesized at a substrate temperature of 192 °C increases from 0.104 to 0.51 Ohm-m after absorbing Carbon Dioxide gas at 135 °C. The gas sensitivity of the film synthesized at the substrate temperature of 192 °C increases up to 5.1 in the presence of Carbon Dioxide gas at 160 °C. The gas sensitivity in the presence of Nitrogen gas reaches only 1.43 even at 200 °C.