Showing posts with label Technology. Show all posts
Showing posts with label Technology. Show all posts

The MegaPixel (MP) Rating of a Digital Camera

The resolution of a digital camera is perceived to be proportional to its pixel count. A digital image is nothing but a continuous arrangement of pixels or picture elements. Resolution is expressed as the number of horizontal pixels multiplied by the number of vertical pixels (E.g. 1600x1200 => 1.92 MP). Digital cameras record visual image with the help of CCD or CMOS sensors and each pixel of the output image on screen will map to a specific pixel on the image sensor in the digital camera.

Digital Camera Resolution Formula MegapixelDigital Camera CCD CMOS PixelMegapixel Resolution Myth

In order to improve the resolution, one tends to simply increase the pixel count. The more the number of pixels the more details the image will provide and the more it will resemble to the real world image. But for a given image or sensor area, increasing the number of pixels tends to saturate at a certain point and further increase in pixels doesn't mean much to the human eye. A common man will not be able to accurately identify the difference in quality of a usual 10cm x 15cm photograph taken by digital cameras having resolution greater than 5 MP. But higher pixel count will be beneficial only when you are trying to generate a bigger picture from a smaller one or when you are trying to crop a particular portion of the picture and try to enlarge it.

There are some common misinterpretations of resolution which a camera manufacturer might try to exploit. Since resolution is more like a square function (length x height), gain in pixel count will not be directly related to resolution gain. Also some pixels on a digital camera sensor will be used for other compensation mechanisms and not really for capturing the image. Companies may include this overhead in order to bump up the pixel rating. In color displays such as LCD screens, subpixel rendering is used in which a single pixel will be composed of a three sub pixels (R, G & B) and so the pixel count should never be exaggerated. The size of the camera sensor also plays a part in deciding resolution, sharpness and image quality for digital cameras having the same pixel rating apart from other factors like lens quality, sensitivity of the image sensors, optical zoom capability, shutter speed, etc.

Triangulation/Trilateration in GPS

Global Positioning System (GPS) has made a tremendous impact in our life and has become immensely popular in recent times. GPS receivers are omnipresent and the applications of GPS extend beyond technology purposes. At the core of this wonderful technology is a simple mathematical/geometrical concept called trilateration or triangualation. Imagine you are lost one day and you don't even know if you are on the northern or southern hemisphere. All that you have is a GPS device with you to locate yourself.

To start off, you are situated somewhere on the surface of the earth (Now don't tell that the earth is not a perfect sphere). Your GPS device receives position and time (sent) information from GPS satellites and the distance is calculated based on the standard distance-time formula given the fact that radio signals from GPS satellites travel roughly with the speed of light. The key problem here is that you don't know the direction but you only know the distance from a satellite.
-->
-->



Consider the blue sphere as the earth E. We are trying to locate a point P on the surface of the earth.

When your GPS device calculates the distance x from satellite say S1, you know that you might be located anywhere on the surface of a sphere of radius x with S1 as the centre. But you don't know in which precise angle you are located in the 360 degrees. Now when your GPS device gets hold of another satellite S2 and calculates the distance y from it, you can apply the geometric principle that spheres intersect in a perfect circle to narrow down your position to somewhere on the perimeter of a circle. Now, the point at which this circle intersects with the earth should give your location on earth. Now when your GPS device calculates the distance z from a third satellite S3, the sphere of radius z with S3 as centre will intersect the circle of intersection of the other two spheres at two points. Only one of those two intersection points will actually lie on the surface of the earth and the other point will lie in space. The point on the surface of the earth will give your location on earth.

GPS satellites transmit time information derived from high accuracy atomic clocks but the GPS receivers cannot afford such high precision clocks. There are several factors that might introduce errors in GPS like clock inaccuracies, rounding errors, multipath and atmospheric effects, etc. Since the earth is also not a perfect sphere, GPS receivers generally look to four or more satellites to compute the precise location.

AppFabric Caching (aka Velocity Caching) - Microsoft .NET

Caching is an essential component to speed up any web application by minimizing the number of trips to the actual database. AppFabric Caching or Velocity caching is a distributed caching system that leverages the caching infrastructure available across a cluster of cache servers efficiently to enhance application performance as well as scalability. The secret behind the effectiveness of appfabric caching lies in the fact that duplicate data is not cached by the cache cluster because whenever data is requested by any client, it is first looked up in the unified logical cache and if available the data that reaches the client can be from the physical cache memory of any of the servers in the cluster.

Appfabric Velocity Caching Architecture Design Overview Diagram

Velocity caching is implemented in a synchronized tier and the service can be accessed across the network with the cache servers in the cluster running the process (DistributedCache.exe). Even though several cache servers contribute to the shared cache memory, there is a common gateway for data to enter and exit in the form of a centralized and shared cache. The distributed cache is handled in code with the help of simple get and put methods that will retrieve, insert, update or delete data items in the unified logical cache as a whole. The programmer is not worried about the internal implementation or the physical location of cached data in the cluster.

Notable Aspects:
  • Each server in the cluster stores the session object data in its RAM and does not write it to disk for obvious reasons
  • No code change or new code has to be incorporated by the programmer and all that is needed is to change a configuration setting in order to activate velocity caching
  • Distributed caching means multiple web servers can each run an instance of the same application which helps in load balancing
  • Both web server (IIS) and cache server (Appfabric) can be deployed on a single application server running on Windows Server OS
  • Turning on the high-availability feature helps mitigate situations when a server in the cluster goes down by storing a synchronous secondary copy of the data item on a different server
One of the key challenges for the implementation of velocity caching involves managing parallel access to data that changes rapidly and velocity caching offers different concurrency models suitable for the concerned application. Controlling access to sensitive data among the clients is another challenge which is controlled by limiting access to such data with encryption or restricted accounts. Appfabric caching attempts to maximize the benefits from the underlying computer infrastructure with the help of a distributed yet shared architecture to provide value for both application developers and end users. Things can only get better from here.

Lava A9 Mobile Phone - Personal Review

Lava A9 India 3.2MP Camera Review

Lava A9 Dual Sim Phone is a handsome instrument with an assortment of useful features and applications at an affordable price. The phone looks solid with a hard metal body and a smooth keypad which gives an elegant appearance to the phone. Lava A9 comes with a 3.2MP camera that lets you take pictures and shoot videos but the image quality is very poor and doesn't live up to the expectations of a 3.2MP camera. The zooming option is also limited and the camera is a big let down in A9. There is 64MB internal phone memory and the phone will support up to 8GB Micro SD Cards. Listening to music on this phone is not a pleasant experience on the loud speaker but the audio quality is slightly better while hearing it on the ear phone. FM reception is also not satisfactory.

Having said the above glitches in the phone, Lava A9 is otherwise an excellent phone with an impressive profile. The phone comes with both EDGE and GPRS support enabling you to connect with the internet through the pre-installed Opera Mini web browser. Nimbuzz is a refreshingly new application that comes pre-installed with Lava A9 with which you can make calls or chat with your friends over the internet sans the conventional call charges. The phone with a user friendly interface has all the features we expect including bluetooth, java games, Ebook reader, Email support, MP3/MP4 Player, etc. Apart from the usual audio and video recorder the phone also lets you record streaming FM audio in any of the three formats WAV/AWB/AMR. You can also search your contacts with phone number as the search criterion which is handy at some situations. You can also integrate the phone with your PC with the help of Lava A9 PC Suite that can be downloaded from LavaMobiles.com website. Apart from the camera and loud speaker anomalies, LAVA A9 is a good looking phone with powerful features and provides value for money.

Samsung Corby S3653 - Mobile Phone Review

Samsung Corby S3653 Review FeaturesI had a chance to handle this phone after my friend bought it last week. As far as the design is concerned, holding the phone in my palms was a bit awkward considering the width (56.5 mm) of the phone but it is an advantage when it comes to a bigger screen experience. The phone with a plastic body is light weight but still sturdy and looks plain and simple. From the design perspective there is a dedicated keypad lock/unlock button on the right side. Virtual keypad means minimum buttons on the front panel and maximum screen size. The capacitive touchscreen performs well and the interface is intelligently designed for easy navigation of menu items. The menu icons can be docked on the left side for quick access or pulled out from the menu which spans 3 pages that can be easily flicked through. The 2MP camera shoots well in good lighting conditions and the single finger image zoom option is handy while viewing pictures. The phone has a gamut of applications and widgets to integrate with the internet and the social networking world. The sound quality is good and watching videos in a wide screen is comforting as well.

How to transfer data from one table to another table?

In software engineering profession everyday new challenges and problems turn up in the blink of an eye and as engineers we are obliged to resolve them ASAP. One of the biggest challenges in the IT industry today is handling data that is vast and increasing everyday. Data is normally stored in databases in the form of tables and a common situation while handling databases is to transfer data from one table to another.

Case I: If both tables reside in the same database server

Consider the case where you want copy the data from Table_1 under Schema_1 into Table_2 under Schema_2. A simple sql command to do this operation would be

INSERT INTO DB_Name.Schema_2.Table_2
SELECT * FROM DB_Name.Schema_1.Table_1 WHERE [condition]

If you want to insert only certain columns you can slightly tweak the command accordingly

INSERT INTO DB_Name.Schema_2.Table_2(COL1, COL2, ....COLn)
SELECT COL1, COL2, ....COLn FROM DB_Name.Schema_1.Table_1 WHERE [condition]

Case II: Load a table from a file

Consider the situation where you want to load a table from a delimited file. This can be done using the BULK INSERT command in Transact-SQL. In order to perform this operation you need access to the file present in the database server. CSV (Comma-seperated values) is a common format used to store the data from a table or spreadsheet. To load a database table from a .csv file use the following command

BULK INSERT Table_Name
FROM 'C:\Program Files\File.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)

Bulk insert command provides a slew of options to load a table from a simple delimited text file or even from an xml file.

Case III: If both tables reside in different database servers

The bcp Utility is an excellent command line tool to transfer table data between two different database servers swiftly across a network. You can use bcp to extract table data by querying the table and store it in a delimited file. You can then load the other table from this delimited file easily using a simple bcp command. You don't even have to login to the servers to access the files.

bcp DB1.SCHEMA1.TABLE1 out FILEPATH -n -S[server_name\instance_name] -T -e[error_filepath]
bcp DB2.SCHEMA2.TABLE2 in FILEPATH -n -S[server_name\instance_name] -T -e[error_filepath]

-n uses the native (database) data types
-S should be added before server name
-T using a trusted connection
-e should be added before filepath for error file that logs the failed rows

The first command extracts the rows from TABLE1 and stores in the appropriate FILEPATH (eg. C:\Program Files\File.csv) in the database server. The second command loads TABLE2 with the data present in the File.csv. You have to run the first command to create the file first and then run the second command to load the data into the table. Instead of selecting the entire table you can also include your own select query within the bcp command. BCP offers a legion of options to transfer data between tables in different modes and formats.

Alternately you can also make use of Data Transformation Services (DTS)/ SQL Server Integration Services (SSIS) package in order to consolidate data from heterogeneous data sources.

Useful Resources:

bcp Utility - http://msdn.microsoft.com/en-us/library/ms162802.aspx
bulk insert - http://msdn.microsoft.com/en-us/library/ms188365.aspx

The Virtual Memory Concept

Virtual Memory is a cost effective solution to slake the thirst of memory hungry applications for a seamless experience with your operating system. To understand the concept of virtual memory you need a little knowledge about the memory organization and working. There are basically two types of memory you need to know. Random Access Memory (RAM) is faster but costly. Memory like hard disk is slower but relatively cheaper. Virtual memory is a stratagem to utilize the hard drive memory to achieve enhanced performance from the random access memory.

Whenever you run multiple programs/applications in your desktop, you will be working on only a portion of a particular application at an instant. Therefore it is a waste of resource to load the entire memory required for a particular application into the limited size random access main memory. In a virtual memory environment each page of a process is brought to main memory only when it is needed on demand.

Virtual Memory Block Diagram Working

Data is stored in any memory in the form of binary digits. The operating system handles memory management in the form of chunks of memory called pages. A page is nothing but a contiguous block of memory. One process might require multiple pages of memory but only a few pages might be active at a time. Virtual memory uses a technique called demand paging to effectively use the available RAM memory. Every page has an address which may be a virtual or logical address. The main memory is divided into equal size chunks called page frames and each page frame has a unique physical address. So whenever a page needs to be accessed, the operating system has to translate the virtual address into a physical address and this is done by a Memory Management Unit (MMU) with the help of mapping in a page table. The virtual address corresponding to a page is mapped to a physical address corresponding to a page frame in main memory. Whenever a page is not in memory the operating system fetches the page from hard disk in response to a page fault exception. The operating system usually makes a prediction based on past history using intelligent algorithms regarding those pages that are least likely to be needed again and places them in the hard disk.

A-GPS for the Novice

Assisted GPS is an improved version of conventional GPS and it has revolutionized mobile navigation systems across the globe. The A-GPS system relies upon an assistance server to accurately resolve the location of a device. A-GPS system is commonly used in mobile phones to provide real time navigation services. The Global Positioning System works on the principle of trilateration to determine the coordinates of a point on earth. In this principle a satellite is considered to be at the center of a sphere and the mathematical treatment of three such spheres/satellites gives the intersections of the spheres which are used to determine the coordinates. By including one more sphere/satellite in the analysis the point can be located more precisely. The distance between the point on earth and the satellite is computed by transmitting a packet of data tagged with the sent time and by subtracting this from the time the packet was received, we get the time of transit. Assuming the packet traveled at the speed of light, we can estimate the distance of the satellite which serves as the radius of the sphere.
Assisted GPS Working Block Diagram
The standalone GPS system is susceptible to atmospheric conditions and multipath errors which tend to prolong the time to first fix. This is not appropriate for real time navigation and emergency applications. A-GPS offers a solution to this problem with an architecture that makes use of data connectivity to an Assistance server located at a place with strong signal connectivity with the satellites. There are two possibilities here.

  • The assistance server may transmit orbital parameters and atomic time information to the mobile phone via the network. The GPS receiver in the mobile phone correlates this data with the fragmentary data received directly from the satellites thereby increasing its sensitivity and resulting in a quicker time to first fix.
  • The mobile phone with limited processing capabilities can delegate the processing function to the more sophisticated assistance server by sending the weak fragmentary data to the processing server that has good satellite signal and receive the position information from the server through the network.

A-GPS is a feasible option to provide navigational services in an urban environment with tall buildings and high radio interference. On the flipside the service provider will charge the subscriber for network data traffic using GPRS/3G.

Linux Server Time Zone $TZ Problem - Yesterday Date Script

I encountered a peculiar problem in a shell script that was used to find the yesterday's and tomorrow's date using the environmental variable TZ. The script that was previously written to find yesterday's date on a server that was located in EDT time zone was

YesterdayDate=`TZ="EDT+24" date`

But unfortunately the code failed to give the correct date of yesterday and instead it gave today's date. I thought of digging deep into this issue and logged in to a linux server to investigate the matter. After some long manipulations I observed something.

Unix server time zone $TZ

BST is 1 hour ahead of UTC $ YesterdayDate=`TZ="BST+23" date`

The script "EDT+24" gave only GMT/UTC time and inorder to get the correct timezone I needed to add the offset value for the particular time zone. After I made the changes the script seems to be working fine.

EDT is 4 hours behind of UTC $ YesterdayDate=`TZ="EDT+28" date`

CDT is 5 hours behind of UTC $ YesterdayDate=`TZ="CDT+29" date`

MDT is 6 hours behind of UTC $ YesterdayDate=`TZ="MDT+30" date`

PDT is 7 hours behind of UTC $ YesterdayDate=`TZ="PDT+31" date`

I'm still a bit confused as to why the $TZ is behaving so unexpectedly.

Note: I'm just a novice and not an expert in Unix or Shell Scripting. I just wanted to share my experience with timezones on linux servers.

Nokia 5130 Express Music - Mobile Review

Nokia 5130 Xpress Music Colors


Last week I wanted to buy a mobile phone for my father and I was hunting for an economical music phone with camera and GPRS. Since I was buying it for my dad, I preferred Nokia because of the user friendly interface their phones have. When I inquired my friends, almost everyone suggested the Nokia 5130 Xpress music phone. I was convinced with the looks of the phone and bought it.

Pros

The Price of the phone is the crowd puller. With a 2.0 Megapixel Camera, 1GB microSD card storage, Bluetooth, GPRS and a sleek design, Nokia 5130 is a smart buy option.

I would give 9 out of 10 for the design and form factor. Everything is neatly packed, smoothly finished and custom fabricated with the buttons ideally located for a perfect music phone. The backlighting effect is appreciated.

I'm a person who prefers phones with a bigger display. Nokia 5130 display area is not the largest ever but definitely satisfying for a budget phone with compact design.

The music quality and stereo effects are good to hear in the headphone. The keypad is robust and comfortable to type.

Initially when the phone was introduced people complained about hanging problems and phone getting automatically restarted issues. Its been a week since I bought the phone and there are no issues till now.

Cons

The battery was a bit of a let down by Nokia. When I opened the back panel and found that the battery is the same old BL-5C that created a hullabaloo not long ago was psychologically disappointing.

The microUSB data cable that came along with the phone was incredibly short and there is absolutely no way I can place my phone on the table once I plugged it in the PC's USB slot.

Bluetooth is the only plausible data transfer option. The microUSB cable is short and there is no software CD in the package.

Inability to connect to Wi-Fi networks, lack of office tools, cheesy loud speakers at high volume, etc are desirable features missing on the phone.

What is a VPN?

Virtual private network is a cost effective solution for companies to extend network connectivity to its employees in every corner of the globe. Consider a company sends an employee to another country that is far away from the company headquarters on a secret mission. There must be some way for the employee to retort to the company and access the private network of the company in a secure way. The company cannot install a private network across countries because it would be expensive. Therefore they must find a way to communicate with the employee in a secure manner using the internet. This is were a virtual private network comes in to the picture. A VPN is a private network connection that is virtual in the sense that there is no dedicated private physical network connecting the entities. But the traffic is sent via the public internet that is vulnerable to attack in a secure manner. Private traffic is carried on the public network in a safe manner using several technologies like encryption, firewalls, authentication, IPsec, etc. VPN gives an organization the freedom to clandestinely communicate with its outbound employees in an economical fashion.

Bling Bling Techellery

Everyone loves to wear jewellery to augment their beauty and portray their fashion statement. Golden jewellery is the most common and affordable to the middle class. The rich might opt for diamonds, platinum, pearls... etc apart from gold. But the price of gold has increased enormously making it difficult for the middle class to buy. I guess it will be a good idea to wear techellery. Techellery is the fusion of technology and jewellery. It is the new fashion trend gaining popularity. If you wish to propose to a girl how about the idea of presenting her a USB heart pendant. Philips and Swarovski have come up with a plethora of wacky tech accesories for youngsters. Head phones are not only meant for hearing audio but they will also serve as colorful hair bands with studs for a glittering scalp. The most famous of them is the digital pendant which is available in the key chain and chain form. Jewellery will no longer be only a passive aesthetic structure but also serve multiple purposes in the form of techellery. Now it is time for you to grab your own piece of ornamental gizmo and make a style statement with these ubiquitous gadgets.

Nanotechnology

All those engineers who thought chemistry is a school boy thing think again, Nanotechnology could well be the next big thing. Modern day gadgets like iPods to even nano cars are the early outcomes of nanotechnology. But the field promises more and has applications in medicine, security, environment and many more domains.

Nanotechnology aims at miniaturization and involves redesign and manipulation of atoms which are the basic building blocks of all matter. It is a well known fact that diamond and graphite are allotropes of carbon and rearranging the atomic structure of one of them can result in the other one. Therefore by rearranging the atoms of a bulk material we can develop a nano material. Nanotechnology helps in developing tiny robots called nanobots which help in perfoming surgeries for replacing worn out tissues. Nano-coatings are known to be transparent, scratch proof and dirt repellant. Even Cancer tissues can be pictured by imaging in oncology using nanoparticles. In a few years time nanotechnology will have its roots spread in all industries.

In India the field is just sixteen years old and a few universities are offering the course in post graduate. Several companies are planning investments in this area considering future developments. I think its time to gear up for the nano revolution and good to learn about it.