Monday, August 17, 2009
Thursday, August 13, 2009
Web Parts Layout in .NET 3.5
.NET 3.5 - MVC Architecture
Tuesday, August 11, 2009
Trivandrum Swine Flu Contact (Influenza H1N1) - CONTROL ROOM
Office of Near Govt. | 0471 2466 828 |
Dr. Amar | 0 94474 51846 |
Dr. K. K | 0 94473 27569 |
Dr. Shaukat | 0 94477 02444 |
AUTHORIZED HOSPITALS FOR TREATMENT OF H1N1
in TRIVANDRUM
Medical | 0471 2444 270 |
General | 0471 2443 870 |
Other Help lines
Integrated | 1800 11 4377 |
Outbreak | 011 2392 1401 |
Swine Flu:Facts to Know & Guidelines
The mutated human influenza virus emerged in April in Mexico and has spread to 168 countries. Though the virus has been sequenced fully enabling the manufacture of a vaccine, the data is still not comprehensive. Swine influenza, or ‘swine flu’, is a highly contagious acute respiratory disease of pigs, caused by one of several swine influenza A viruses that cause regular outbreaks in pigs. Morbidity tends to be high and mortality low (1-4%). The virus is spread among pigs by aerosols, direct and indirect contact, and asymptomatic carrier pigs. Outbreaks in pigs occur year round, with an increased incidence in autumn and winter in temperate zones. Many countries routinely vaccinate swine populations against swine influenza. Swine influenza viruses are most commonly of the H1N1 subtype, but other subtypes are also circulating in pigs (e.g., H1N2, H3N1, H3N2). Pigs can also be infected with avian influenza viruses and human seasonal influenza viruses as well as swine influenza viruses.
The H3N2 swine virus was thought to have been originally introduced into pigs by humans. Sometimes pigs can be infected with more than one type of virus at a time, which can allow the genes from these viruses to mix. Pigs are therefore also called as “mixing vessels”, resulting in an influenza virus containing genes from a number of sources, called a ‘reassortant’ virus. Although swine influenza viruses are normally species specific and only infect pigs, they do sometimes cross the species barrier to cause disease in humans.
So far, the recent outbreak due to the new strain of influenza virus A (H1N1) has had cases reported from North America, Mexico, Spain and UK. Suspect cases have been reported from New Zealand and France and these are being investigated.
How does it spread?
It spreads in the same way as seasonal influenza – through direct contact (being within one metre of an infected person) or indirect contact (touching a contaminated surface). People usually get swine influenza from infected pigs, however, some human cases lack contact history with pigs or environments where pigs have been located. Human-to-human transmission has occurred in some instances but was limited to close contacts and closed groups of people.
What are the clinical symptoms?
Generally clinical symptoms are similar to seasonal influenza but reported clinical presentation ranges broadly from asymptomatic infection to severe pneumonia resulting in death. Patients experience high fever, cough, and sore throat, symptoms similar to typical influenza, with some patients experiencing diarrhoea and vomiting. The cases can rapidly progress to severe and unusual pneumonia.
What are the implications for human health?
People do not normally get swine flu, but outbreaks and sporadic human infections have been reported. Swine flu viruses have been reported to spread from person-to-person, but in the past, this transmission was limited and not sustained beyond three people.
Since typical clinical presentation of swine influenza infection in humans resembles seasonal influenza and other acute upper respiratory tract infections, most of the cases have been detected by chance through seasonal influenza surveillance. Mild or asymptomatic cases may have escaped from recognition; therefore the true extent of this disease among humans is unknown.
Is it safe to eat pork meat and pork products?
Yes. Swine influenza has not been shown to be transmitted to people through eating properly handled and prepared pork (pig meat) or other products derived from pigs. The swine influenza virus is killed by cooking at 160°F/70°C, corresponding to the general guidance for the preparation of pork and other meat.
What is the prevention and treatment?
There are antiviral medicines one can take to prevent or treat swine flu. There is no vaccine available right now to protect against swine flu. The spread of the viruses that cause respiratory illnesses like influenza can be prevented by:
• Covering your nose and mouth with a tissue when you cough or sneeze. Throw the tissue in the trash after you use it.
• Washing your hands often with soap and water, especially after you cough or sneeze. You can also use alcohol-based hand cleaners.
• Avoiding touching your eyes, nose or mouth. Germs spread this way.
• Trying to avoid close contact with sick people.
• Staying home from work or school if you are sick.
Antiviral drugs for seasonal influenza are available in some countries and effectively prevent and treat the illness. Most of the previously reported swine influenza cases recovered fully from the disease without requiring medical attention and without antiviral medicines. Some influenza viruses develop resistance to the antiviral medicines, limiting the effectiveness of chemoprophylaxis and treatment. The viruses obtained from the recent human cases with swine influenza in the United States were sensitive to oselatmivir and zanamivir but resistant to amantadine and remantadine.
What is the risk of pandemic risk?
It is likely that most of the people, especially those who do not have regular contact with pigs, do not have immunity to swine influenza viruses that can prevent the virus infection. If a swine virus establishes efficient human-to human transmission, it can cause an influenza pandemic. The impact of a pandemic caused by such a virus is difficult to predict: it depends on virulence of the virus, existing immunity among people, cross protection by antibodies acquired from seasonal influenza infection and host factors.
Is there a vaccine for protecting humans?
There are no vaccines that contain the current swine influenza virus causing illness in humans. It is not known whether current human seasonal influenza vaccines can provide any protection. Influenza viruses change very quickly. It is important to develop a vaccine against the currently circulating virus strain for it to provide maximum protection to the vaccinated people.
Doctors now say, the best way to prevent deaths is to watch out for the nine key swine flu symptoms and give tamiflu at the earliest.
They are:
• Fever, which is usually high, but unlike seasonal flu, is sometimes absent
• Cough
• Runny nose or stuffy nose
• Sore throat
• Body aches
• Headache
• Chills
• Fatigue or tiredness, which can be extreme
• Diarrhea and vomiting, sometimes, but more commonly seen than with seasonal flu
What parents need to know?
• If your child has fever, throat infection, body ache, consult doctor.
• Must go to a doctor at any government facility meant for swine flu.
• Swine flu testing is done only at government hospitals.
• Nose and throat swabs will be taken and tested.
• Child will not be quarantined if there are no symptoms.
• If clinical symptoms exist, child will be hospitalised, and tamiflu will be given only if the tests are positive.
• Act early to ensure quick recovery.
• Rapid screening advised by private hospitals not legal.
• Do not go for rapid screening as it's not 100 per cent accurate.
In times of crisis the worst thing is to panic so if you or your family member is having flu-like symptoms without wasting time go to the nearest designated hospital or doctor and get tested if he advises.
If you have any queries don't listen to rumours and panic, call toll free helplines: 1075 or 1800-11-4377.
Swine flu is certainly curable with timely intervention, correct diagnosis and a five-day medication.
Some specific precautions to be taken against H1N1:
• A mask to cover your nose and mouth is a must. These are not just regular masks but a special one called N-95 which filter microbes in the air that you inhale and exhale.
• A mask is a must when you are in a high-risk situation particularly when you have to go to a hospital to get tested and you have to be in the waiting room. Also keep the mask on when you are in a crowded place.
• Cover your mouth surely while coughing and sneezing turn your head and cough into your shoulder.
• Wash your hands in case there is body contact with someone who's got cold and cough.
Following are guidelines about swine flu from the Ram Manohar Lohia Hospital in Delhi...
SWINE FLU SYMPTOMS: WARNING SIGNS IN CHILDREN
• Fast breathing or troubled breathing
• Bluish skin colour
• Not taking enough food or fluid
• Becoming irritable
• Difficulty in waking up
• Flu-like symptoms recur
• Fever with rashes
WARNING SIGNS IN ADULTS
• Difficulty in breathing
• Pain or pressure in chest, abdomen
• Dizziness
• Severe or persistent vomiting
• Not taking enough food or fluid
• Flu-like symptoms recur
TACKLING SWINE FLU: THE HOME GUIDE
• Isolate affected people, minimise contact for 7-10 days
• Stay at home, away from work, school and public places
• Frequently wash hands with soap
• Use wet cloth for cleaning, dusting
• Use disinfectants for cleaning
• Get plenty of sleep, be physically active
• Drink plenty of fluid, eat nutritious food
• Use face mask or handkerchief while coughing, sneezing
Thursday, August 06, 2009
Configuring HTC for Airtel GPRS
After googling and fighting with Airtel, I managed to get the correct settings and I am able to run Airtel Live as well access most of the websites on standard HTTP protocol (SSL is not supported). Google Maps also works for me.
On Windows Mobile 6.x, the steps to configure are as follows:
1. Activate Airtel Live by sending the following SMS to 121: MASALA ACTIVE.
2. The service takes atleast 3-4 hours to get active. Restart the phone and resume configuring.
3. Tap Start -> Settings.
4. Select Connections Tab and tap Connections.
5. Select Advanced Tab, tap Select Networks button to bring up Network Management.
6. Under "Programs that automatically connect to the Internet should connect using:" drop down, tap the New button.
7. In the General Tab, type the name of the settings as Airtel Live
8. Select Modem tab, tap New...
9. Type the name of connection as Airtel Live, select the modem as Cellular Line (GPRS) and tap Next.
10. Type Access Point Name as airtelfun.com and tap next.
11. Leave username, password and domain blank and tap finish.
12. Select Proxy Settings tab. Tap "This network connects to the Internet". This should enable the next check box option.
13. Tap "This network uses a proxy server to connect to the Internet".
14. Type the proxy server as: 100.1.200.99 and then tap Advanced...
15. Tap HTTP, leave the server as 100.1.200.99 and change the port to 8080
16. Similarly tap WAP, Secure WAP and Socks, type the server as 100.1.200.99 but leave the port to defaults. These are optional settings.
17. Tap OK to close the Advanced proxy setup screen.
18. Tap OK to close the New connection screen.
19. The network management screen should now list the new connection you have created in the drop-down. Tap OK to close this screen
20. Tap OK to close the connection screen.
Now you are ready to fire your favourite browser. I have tested this on PIE it works for me.
Wednesday, August 05, 2009
Upload a file to SharePoint - ASP.NET
If you all have wished you can upload a file to SharePoint programatically using ASP.NET / C#, then this is the place you need to look into. The code for doing the same is as follows,
public static bool UploadFileToDocumentLibrary(string sourceFilePath, string targetDocumentLibraryPath,
string userName, string password, string domainName)
{
//Flag to indicate whether file was uploaded successfuly or not
bool isUploaded = true;
try
{
// Create a PUT Web request to upload the file.
WebRequest request = WebRequest.Create(targetDocumentLibraryPath);
// Set credential details as entered by the user
//**********************************************
CredentialCache myCredentialCache = new CredentialCache();
// Dummy names used as credentials.
myCredentialCache.Add(new Uri(targetDocumentLibraryPath), "Basic", new NetworkCredential(userName, password, domainName));
// Call 'GetCredential' to obtain the credentials specific to our Uri.
NetworkCredential myCredential = myCredentialCache.GetCredential(new Uri(targetDocumentLibraryPath), "Basic");
// Associating only our credentials.
request.Credentials = myCredential;
//**********************************************
//Set credentials of the current security context
//request.Credentials = CredentialCache.DefaultCredentials;
request.Method = "PUT";
// Create buffer to transfer file
byte[] fileBuffer = new byte[1024];
// Write the contents of the local file to the request stream.
using (Stream stream = request.GetRequestStream())
{
//Load the content from local file to stream
using (FileStream fsWorkbook = File.Open(sourceFilePath, FileMode.Open, FileAccess.Read))
{
//Get the start point
int startBuffer = fsWorkbook.Read(fileBuffer, 0, fileBuffer.Length);
for (int i = startBuffer; i > 0; i = fsWorkbook.Read(fileBuffer, 0, fileBuffer.Length))
{
stream.Write(fileBuffer, 0, i);
}
}
stream.Close();
}
// Perform the PUT request
WebResponse response = request.GetResponse();
//Close response
response.Close();
}
catch (Exception ex)
{
//Set the flag to indiacte failure in uploading
isUploaded = false;
throw new Exception(ex.Message);
}
//Return the final upload status
return isUploaded;
}
Wednesday, July 29, 2009
Daily Expense Tracker
The main attraction of this tracker is a graph which will plot your daily expenses along with average daily expense for the month.
Hope this will be help full to at least a bunch of people who care about keeping rack of their day to day expenses.
As blogger site wont allow us to upload any files otherthan images or video i have uploaded the same in MegaFileUpload site.
Daily Expenses.xls
Friday, July 17, 2009
Round a Large Decimal Number in Javascript
There might be a situation where you need to round a very large decimal number in JavaScript. But using the built-in JavaScript methods you wont be able to get it done with the precision you want to get. So here i am trying to give you a method to round any digits of decimal number with the precision you want to get.
/**
* Method to round decimal numbers
* number - The number that must be rounded
* decimals - The number of decimal points that should appear in the result
*/
function roundNumber(number, decimals)
{
//return roundNumber(number,decimals);
var newString;// The new rounded number
decimals = Number(decimals);
if (decimals < 1) {
newString = (Math.round(number)).toString();
} else {
var numString = number.toString();
if(numString.trim().length == 0) {
numString = "0.00";
}
if(numString.indexOf(".") == 0) {
numString = "0" + numString;
}
if(parseFloat(numString) == 0) {
numString = "0.00";
}
if (numString.lastIndexOf(".") == -1) {// If there is no decimal point
numString += ".";// give it one at the end
}
var cutoff = numString.lastIndexOf(".") + decimals;// The point at which to truncate the number
var d1 = Number(numString.substring(cutoff,cutoff+1));// The value of the last decimal place that we'll end up with
var d2 = Number(numString.substring(cutoff+1,cutoff+2));// The next decimal, after the last one we want
if (d2 >= 5) {// Do we need to round up at all? If not, the string will just be truncated
if (d1 == 9 && cutoff > 0) {// If the last digit is 9, find a new cutoff point
while (cutoff > 0 && (d1 == 9 || isNaN(d1))) {
if (d1 != ".") {
cutoff -= 1;
d1 = Number(numString.substring(cutoff,cutoff+1));
} else {
cutoff -= 1;
}
}
}
d1 += 1;
}
newString = numString.substring(0,cutoff) + d1.toString();
}
if (newString.lastIndexOf(".") == -1) {// Do this again, to the new string
newString += ".";
}
var decs = (newString.substring(newString.lastIndexOf(".")+1)).length;
for(var i=0;i<decimals-decs;i++) newString += "0";
return newString;
}
Wednesday, July 08, 2009
Maintain scroll position for Listbox ASP.NET
So I tried o Google the problem and found no convincing answers.
Finally I got it working by a small JavaScript method that was called at end request handler for any AJAX calls for the page.
The JavaScript is as follows:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
// reseting the all selected indices again for multi selection or single selection in the reverse order
// inorder to get the scroll postion at the top of first selection
var lstBoxLen = document.getElementById(lstEmployees).length;
for (var i = lstBoxLen - 1; i >= 0; i--) {
if (document.getElementById(lstEmployees).options[i].selected) {
document.getElementById(lstEmployees).options[i].selected = true;
}
}
}
This solution is now working for both single selection and multi selection based list box.
I would appreciate any other better way of doing this.
May be this will be helpful to some one who is finding it difficult to restore scroll position of list box after auto post back.
Tuesday, April 21, 2009
Future of JAVA
Sun's dictatorial control over the evolution of JAVA has been widely criticized by other stakeholders and is generally viewed as detrimental to the language's growth and adoption potential. The Java Community Process (JCP) has been a particularly thorny source of controversy and friction.
Oracle could finally democratize the JCP by making it more transparent and inclusive. Sun's overt hostility towards the Apache Software Foundation's Harmony project, which seeks to build an Apache-licensed Java SE implementation, could also finally be brought to an end.
Sun has generally exhibited a degree of paranoia about the prospect of empowering IBM and other competitors by validating a permissively licensed third-party Java implementation. Oracle is in a different position and probably recognizes that boosting collaboration around Java will boost the relevance and desirability of its own Java-based products. As such, Oracle will probably view the Harmony project as an opportunity rather than a risk.
One area of the Java ecosystem where Oracle's acquisition of Sun will create some uncertainty is in the client application space. The value of Java to Oracle is almost entirely confined to the server market, so it seems extremely unlikely that Oracle will want to follow through with Sun's efforts to restore Java's relevance in the browser with projects like JavaFX which is aimed squarely at competing with Adobe's deeply entrenched Flash framework.
Similarly, Sun's renewed push for Java on mobile devices could also potentially be viewed by Oracle as superfluous. The trend towards native toolkits and frameworks in the mobile space is making Java ME an anachronism. Java ME is really not competitive with the iPhone experience, which is what all of the mobile platform vendors are trying to imitate right now. Java's only advantage in the mobile environment is consistency between devices, which is really not so good in practice. Web widgets are probably going to displace Java ME for lightweight, cross-platform mobile applications. Ironically, the most sustainable stronghold of Java on handhelds in the long term will probably be Google's Android platform, which uses its own custom virtual machine and Harmony's class libraries.
Future of MySQL
The acquisition of Sun by Oracle serious questions about the future of MySQL, a popular open source database system that Sun acquired last year. It's not clear if Oracle will see any incentive to continuing development of an open source alternative to its core database offerings. There are several factors, however, that would make it difficult for Oracle to kill off MySQL—and it could be profitable to continue investing in the system's advancement.
MySQL is already somewhat fragmented and there are several branches and forks that deliver enough unique value to be profitable independently. This makes it seem unlikely that any one player will be able to retain centralized control of the software or unilaterally terminate its forward progress.
Another factor is the efficacy of certain alternatives—such as PostgreSQL—which existing MySQL users could choose to adopt if MySQL ever seriously stumbled. It's clear that there is a signficant market for open source database software, and it's a niche that someone will inevitably find a way to fill. This means that Oracle would gain little from killing off MySQL.
A point that a lot of commentators seem to be overlooking is Oracle's 2005 acquisition of Innobase, a company that developed a popular ACID-compliant storage engine for MySQL. Oracle sells Innobase's InnoDB product, which is dual-licensed and available under the GPL or commercial terms. Now that Oracle has MySQL, the company can offer commercial licenses for both the database and the InnoDB storage engine together.
Oracle has no means of stopping open source software from cannibalizing its proprietary database market, so the company has likely decided that it might as well profit from the trend. Oracle could also potentially view this as an opportunity to upsell some existing MySQL customers and transition them over to its proprietary products. Oracle will likely build software to facilitate a clean glide path for customers who wish to pursue such a migration.
Monday, April 06, 2009
Current IT Trendzz March 2009
Industry News
Google in late stage talks to acquire Twitter
Didn't they already buy (and kill) a Twitter clone?
Source: Techcrunch
Linux Foundation says it's time to ditch Microsoft's FAT
Lose the fat, keep the flavour
Source: Ars Technica
Not counting Angelina
Source: News.com
Angry Luddites attack Google Street View car
"The peasants are revolting"
Source: Tech Radar
Surfing at work makes employees more productive
There you go: surf until the next study comes out saying it's bad
Source: Web Pro News
Developer News
Ten ways to make your boss love you - and save your job
That don't involve anything you'll regret (much)
Source: ZDNet
"So start the show and this time feel the flow and get it right"
Source: Infoworld
Google advises flushing your website
A flush might not beat a full house, but it beats a full browser
Source: The Register
Developers stunted by fragmented mobile market
It's easy: just develop for iWindowsPreAndroid
Source: Infoworld
Most undergraduates 'show fear when asked to do maths'
60% of them don't understand why that's a problem
Source: The Register
Still a chance to win that trip to JavaOne
Source: The Code Project
Are you a slave to technology?
"It really makes me ... sick"
Source: The Code Project
Thursday, February 05, 2009
Interesting Links as on 05 February 2009
XP TO WINDOWS 7 'UPGRADE' SCHEME ANNOUNCED
ASUS INTRODUCES EEE PC WITH 9.5-HOUR BATTERY LIFE
MICROSOFT AD GADGET TO LAUNCH IN APRIL
MICROSOFT: ALL WINDOWS 7 EDITIONS TO RUN ON NETBOOKS
NEW FIREFOX RELEASE FIXES CRITICAL SECURITY BUGS
Microsoft changes Windows 7 UAC after new exploit code surfaces
Yahoo tests Search Pad to ease online research
Google Latitude: Share your location with friends
Ballmer: Enterprise XP holdouts will get hell from consumers
One Death Star for $15 Septillion? What a deal!
Mobile tech 2010: Five trends that will change our lives
The power of persuasion in a job search
Clear and effective communication in Web design
Wednesday, February 04, 2009
Interesting Links as on 04 February 2009
Removing admin rights stymies 92% of Microsoft's bugs
India lowers the bar with a $US10 laptop
Microsoft offers new time-sensitive support service
Microsoft revs up 'Fix it' support tool
Microsoft Semblio promises easy content creation for educators
Python: Arbitrarily interesting
Does the space shuttle's computer really run on just one megabyte of RAM?
The interview question you must be ready for
Understanding your enterprise architect: A guide for managers
Tuesday, February 03, 2009
Interesting Links as on 03 February 2009
Microsoft denies Windows 7 security feature contains bug
Dive into the new Google Earth
Forward slash led to massive Google glitch
Study: Certain IT skills in demand despite economy
Is open source becoming like Microsoft?
Six ways to save your IT project from the scrap heap
Microsoft delivers tool updates for Oslo, Live Framework
Remaking Microsoft: Break up the company
Microsoft charges ex-employee with spying
Microsoft confirms no more betas for Windows 7
Human error caused Google search bug
The six biggest mysteries of our solar system
Project management for networking geeks
You decide
Friday, January 30, 2009
Interesting Links as on 30 Jan 2009
Gartner reveals the eight hottest mobile techs to watch
Study: IT pay up in three areas, down elsewhere
Fan starts campaign for Windows 7's immediate release
Who owns the code? Beware copyright pitfalls
The case against Web apps
Pipl.com: People search engine so good, it will scare your pants off
From 32-Bit to 64-Bit: Why software development is lagging hardware improvements
Thursday, January 29, 2009
Interesting Links as on 29 Jan 2009
- How many flavors will Windows 7 come in?
- Silverlight adoption hampered by economic crisis
- Web Sandbox source now available under Apache License 2.0
- Introducing Measurement Lab
- Convert your old PC to network attached storage with FreeNas
- OpenGSE Released
- Napping: the expert's guide
- The need for a standard cloud taxonomy
- Transcend introduces 1.8" Portable SSD in India
- Microsoft Adds Clickjacking Protection to IE8 RC1
- Internet Users Now Number 1 Billion