Tips Tricks Tutorials

Know about Nanotechnology – Customization of molecules and atoms

Everything is made up of molecules which in turn are made up of atoms, now customization at these levels to get a useful product is what nanotechnology is helping us achieve

Imagine a technique that can work on subjects that are a thousand times smaller than the diameter of hair! To build something productive out of these tiny subjects is difficult, but this is what nanotechnology is all about. By changing molecular structure of the material one can change its electrical, chemical, and mechanical behavior. Now this is the basic principle behind developing customized materials using nano techniques that behave in a desirable way. The first introduction to this concept was as early as 1959, with the actual term being used in 1974. Since then a lot has been done in this field, but still there is tremendous scope for this technology in future. Here we would try to define what has already been done in this field and what to expect in future.

Passive nanostructures
These first generation nanostructures are relatively simple and passive in behavior. Primary products are components such as nanotubes, wires etc and with enhanced functions and properties because of their nanostructure. Passive nanostructures can further be categorized under two sub categories, first being dispersed and contact surface nanostructures like nanoscale colloids, aerosols and powders. The second category include products incorporating nanostructures like nanoscale layers in transistors.

Here is a hypothetical nanorobot that swims through blood vessels, this device finds its way using camera mounted in front and contains a payload for the affected area.

Active nanostructures
These nanostructures are, as the name suggests, active in nature, ie. they change their state according to conditions. As an example of an active nanostructure, consider the drug delivery particles. These particles change their morphological and chemical composition. These changes lead to a change in the property (mechanical, electronic etc) of the nanostructure for desired results. This category of nanostructures can be subcategorized in two categories, bioactive nanostructures and physico-chemical active nanostructures.

Integrated nanosystems
These systems would be the future of nanotechnology. They would include assembling techniques like bio-assembling, networking at the nanoscale, modular nanosystems, etc. The example of these systems would include development of a system for medical purposes that could be able to build organs from nanoscale. In electronics one could see new devices based on states other than electric charge.

Atomic force microscope image of carbon nanotubes. Apart from their favorable mechanical and electrical properties these nanotubes also have disadvantageous characteristics.

Heterogenous molecular nanosystems
These systems would consist of molecules, with each one having a different purpose. This would give the nanosystem to ability to work in a similar manner as our biological system works but these man made systems would be more energy efficient, and quick in action. These nanosystems would have the ability to self assemble at different levels giving them the ability to self heal. Nanorobots would also have to be built to carry out actions at nano scale.

Nanodevice applications
In nanoelectronics one can expect creation of self-assembly structures allowing the scaling down of complementary metal-oxide semiconductors (CMOS) to their ultimate limits (5-10 nm) and the possible post-CMOS (but still electron charge-based) integrating nanocomponents and nanodevices such as carbon-nanotube and single-electron transistors. Nanotechnology can further be of great help in cutting down costs of sending spacecraft in outer space. This can be achieved by building a structurally altered material that is lighter than traditional material used, but at the same time is very strong to withstand a high pressure environment.

Future of Nanotechnology in health care
Bioavailability of the drug is defined as presence of drug molecules in the affected area inside the body when these molecules can provide maximum help. A 100% bioavailability of medicine can be achieved using nanorobots. These hypothetical machines would be 0.5-3 micrometer in size so that they can easily move around inside capillaries. The material used to build these nanorobots would be carbon due to its strength and favorable characteristics. The usage of special isotopes of carbon would further help in tracking these robots using MRI scan. These devices would be injected inside patient’s body and then tracked for progress of work. Other infesting tasks that can be done using nanotechnology is cell repair using molecular devices. It is proved that molecules have ability to recognize, repair and destroy other molecules. It is also possible to insert molecules inside cell using needles without damaging them. Now if molecular machines are built and injected in cells they would be able to effectively repair cells even those that are dead. After repairing all cells in tissue one can repair a complete tissue. Further, molecular machines can be made intelligent i.e. instead of doing a specialized work these devices can have artificial intelligence for doing tasks.

Risks involved
Altering material structure could result in negative effects on environment and potential health hazards. Therefore it is advisable to follow a defined framework in developing these materials. Due to the high surface-area-to-volume ratio and higher reactivity of nanostructures, large doses can cause cells and organs to demonstrate a toxic response even when the material itself is non-toxic.

Nano materials could combine with other materials and this cocktail could be toxic in nature. Further due to higher surface reactivity of nanopowders there is increased risk of explosion or ignition. One more negative effect could be accumulation of nonmaterials in environment or human organs with potential negative effects.

Source: PCQUEST

Technology That Would Impact Your Life in 2010

We look at the future of eight key technology areas and predict what you can expect in 2010

The slowdown is over. The bad times made us rethink a lot. As a result we’re seeing lots of innovations throughout. We expect this cycle of innovations will continue for at least one more year and we will see some pathbreaking products and technologies in near future.

Interface, for instance, this year has witnessed lots of happenings. The first OS with multi-touch has publicly released making it a mainstream technology. Gesture based interfaces and controller based gaming is something which we are expecting to become mainstream by next year.

Likewise video/imaging and printing is also seeing a lot of innovations. The natural 3D viewing with the need of any additional device is something which might just change the way we look at displays and printouts. Just imagine how powerful an ad campaign could be if it is broadcast on television which is in full 3D. Everyone can watch it naturally with a 3D spectacles, etc.

In the pages to follow, we have taken eight such hot areas of IT. We have talked about the latest in the respective domains including how they are going to change in coming years.

Apart from that, you will also find what top five research labs in India are up to and what they think are going to change the world in the near future.

Source: PCQuest

Alternating table row colors in php

Most of the websites use this alternating color to tables which will make the user readability of table content. We can use any of the colors you want.

I am writing php code which will print the data present in the mysql table in a alternating color format.

<?php

//Database Connection inputs

$host=”localhost”; // Host name
$username=”"; // Mysql username
$password=”"; // Mysql password
$database=”mydb”; // Database name
$table=”mytable”; // Table name

// Connect to server and select databse

mysql_connect(“$host”, “$username”, “$password”)or die(“cannot connect”);
mysql_select_db(“$mydb”)or die(“cannot select DB”);
$sql=”SELECT * FROM $mytable”;
$result=mysql_query($sql);

// Define $color=1, this is a temporary variable to define color.

$color=”1″;

echo ‘<table width=”200″ border=”1″ cellpadding=”2″ cellspacing=”0″>’;
while($rows=mysql_fetch_array($result))

{

// If $color==1 table row color = #FFC600
if($color==1)

{
echo “<tr bgcolor=’#FFC400′>
<td>”.$rows['firstname'].”</td><td>”.$rows['lastname'].”</td><td>”.$rows['age'].”</td>
</tr>”;
// Set $color==2, for changing the color
$color=”2″;
}

// When $color not equal 1, use this table row color
else

{
echo “<tr bgcolor=’#C3FF00′>

<td>”.$rows['id'].”</td><td>”.$rows['name'].”</td><td>”.$rows['email'].”</td>
</tr>”;
// Set $color back to 1
$color=”1″;
}
}
echo ‘</table>’;

?>

Alternate colors for table rows

Alternate Color Table Format

You can also use CSS files instead of specifying the color.

td .d0

{

background-color: #FFC600;

}

td .d1

{

background-color:#fff

}

How to make reverse sort in perl array

I am working on some perl project. I have come across a situation where I need to sort the values in arrays in reverse order. I have done it very simply. I have an array of array: @array=qw(canada mexico usa);

Now I can use te sort() command to sort the above values in the array by giving the command: @sortthis=sort(@array); That uses alphabetical order for sorting by default. The sorting criteria is not given, but you can get same results by giving a longer version of the sort function call, like so: @sortthis=sort {$a cmp $b} @array;

Here, $a and $b are special variables which are used to compare two of the values in @array to see which should come first in the sort order. The cmp is a comparison operator returns a positive value if $a > $b, a negative value if $a < $b, or zero if they are equal. By changing the formula that follows the sort keyword you can change the order of the sort function.

If you wanted to sort in reverse order, you could just use Perl’s reverse() function: @reversesort=reverse(@sortthis); or in one statement, @reversesort=reverse sort @array;. This is inefficient however as it must make a temporary copy of the list of names, which could get expensive if the array is large. A more efficient way is to just change the sort criteria to produce the reverse result. @reversesort=sort { $b cmp $a } @array;. Now, the values returned by cmp are the opposite of what they were above, and so the sort order is the opposite.

Source

Join the forum discussion on this post - (1) Posts

Track website visitors using PHP

We have so many tools available to track the blogs or wesites. Although there are some free ones, most of them come with a price tag. Why not do it yourself? With PHP, you can easily create a log file within minutes. This article shows you the complete tutorial on how to make the tracker

Getting the information
The most important part is getting the information from your visitor. Thankfully, this is extremely easy to do in PHP (or any other scripting language for that matter). PHP has a special global variable called $_SERVER which contains several environment variables, including information about your visitor. To get all the information you want, simply use the following code:

// Getting the information
$ipaddress = $_SERVER['REMOTE_ADDR'];
$page = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}";
$page .= iif(!empty($_SERVER['QUERY_STRING']), "?{$_SERVER['QUERY_STRING']}", "");
$referrer = $_SERVER['HTTP_REFERER'];
$datetime = mktime();
$useragent = $_SERVER['HTTP_USER_AGENT'];
$remotehost = @getHostByAddr($ipaddress);

As you can see the majority of information comes from the $_SERVER variable. The mktime() (http://nl2.php.net/mktime) and getHostByAddr() (http://nl2.php.net/manual/en/function.gethostbyaddr.php) functions are used to get additional information about the visitor.

Note: I used a function in the above example called iif(). You can get this function at http://www.phpit.net/code/iif-function.

Logging the information
Now that you have all the information you need, it must be written to a log file so you can later look at it, and create useful graphs and charts. To do this you need a few simple PHP function, like fopen (http://www.php.net/fopen) and fwrite (http://www.php.net/fwrite).

The below code will first create a complete line out of all the information. Then it will open the log file in “Append” mode, and if it doesn’t exist yet, create it.

If no errors have occurred, it will write the new logline to the log file, at the bottom, and finally close the log file again.


// Create log line
$logline = $ipaddress . '|' . $referrer . '|' . $datetime . '|' . $useragent . '|' . $remotehost . '|' . $page . "
";

// Write to log file:
$logfile = '/some/path/to/your/logfile.txt';

// Open the log file in "Append" mode
if (!$handle = fopen($logfile, 'a+')) {
die("Failed to open log file");
}

// Write $logline to our logfile.
if (fwrite($handle, $logline) === FALSE) {
die("Failed to write to log file");
}

fclose($handle);

Now you’ve got a fully function logging module. To start tracking visitors on your website simply include the logging module into your pages with the include() function (http://www.php.net/include):

include ('log.php');

Okay, now I want to view my log file
After a while you’ll probably want to view your log file. You can easily do so by simply using a standard text editor (like Notepad on Windows) to open the log file, but this is far from desired, because it’s in a hard-to-read format.

Let’s use PHP to generate useful overviews for is. The first thing that needs to be done is get the contents from the log file in a variable, like so:


// Open log file
$logfile = "G:projectsphpitcontentrack your visitors using phplog.txt";

if (file_exists($logfile)) {

$handle = fopen($logfile, "r");
$log = fread($handle, filesize($logfile));
fclose($handle);
} else {
die ("The log file doesn't exist!");
}

Now that the log file is in a variable, it’s best if each logline is in a separate variable. We can do this using the explode() function (http://www.php.net/explode), like so:


// Seperate each logline
$log = explode("
", trim($log));

After that it may be useful to get each part of each logline in a separate variable. This can be done by looping through each logline, and using explode again:


// Seperate each part in each logline
for ($i = 0; $i < count($log); $i++) {
$log[$i] = trim($log[$i]);
$log[$i] = explode('|', $log[$i]);
}

Now the complete log file has been parsed, and we’re ready to start generating some interesting stuff. The first thing that is very easy to do is getting the number of pageviews. Simply use count() (http://www.phpit.net/count) on the $log array, and there you have it;

echo count($log) . " people have visited this website.";

You can also generate a complete overview of your log file, using a simple foreach loop and tables. For example:

// Show a table of the logfile
echo '<table>';
echo '<th>IP Address</th>';
echo '<th>Referrer</th>';
echo '<th>Date</th>';
echo '<th>Useragent</th>';
echo '<th>Remote Host</th>';

foreach ($log as $logline) {
echo '<tr>';

echo '<td>' . $logline['0'] . '</td>';
echo '<td>' . urldecode($logline['1']) . '</td>';
echo '<td>' . date('d/m/Y', $logline['2']) . '</td>';
echo '<td>' . $logline['3'] . '</td>';
echo '<td>' . $logline['4'] . '</td>';

echo '</tr>';

}

echo '</table>';

You can also use custom functions to filter out search engines and crawlers. Or create graphs using PHP/SWF Charts (http://www.maani.us/charts/index.php). The possibilities are endless, and you can do all kinds of things!

In Conclusion…
In this article I have shown you have to create a logging module for your own PHP website, using nothing more than PHP and its built-in functions. To view the log file you need to parse it using PHP, and then display it in whatever way you like. It is up to you to create a kick-ass traffic analyzer.

If you still prefer to use a pre-built traffic analyzerArticle Search, have a look at http://www.hotscripts.com.

Article Tags: Visitors Using, Logging Module, Each Logline, Lt;/td>’;echo Lt;td>

Source: Free Articles from ArticlesFactory.com

New Free AT&T Cell Phones for Sale | Thanks to Credit Card Offers, Bank Reviews & Ratings and Cheap Loan