Wednesday, August 23, 2006

Oracle - Decode

In Oracle/PLSQL, the decode function has the functionality of an IF-THEN-ELSE statement.

The syntax for the decode function is:

decode( expression , search , result [, search , result]... [, default] )

expression is the value to compare.

search is the value that is compared against expression.

result is the value returned, if expression is equal to search.

default is optional. If no matches are found, the decode will return default. If default is omitted, then the decode statement will return null (if no matches are found).

For Example:

You could use the decode function in an SQL statement as follows:

SELECT supplier_name,
decode(supplier_id, 10000, 'IBM',
10001, 'Microsoft',
10002, 'Hewlett Packard',
'Gateway') result
FROM suppliers;


The above decode statement is equivalent to the following IF-THEN-ELSE statement:

IF supplier_id = 10000 THEN
result := 'IBM';

ELSIF supplier_id = 10001 THEN
result := 'Microsoft';

ELSIF supplier_id = 10002 THEN
result := 'Hewlett Packard';

ELSE
result := 'Gateway';

END IF;


The decode function will compare each supplier_id value, one by one.

Monday, March 13, 2006

URL Icon

Method 1 : To be included in every page
LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico"

Method 2:

Rename the icon file *exactly* to: favicon.ico -- all
lowercase. No deviation from this is allowed.

Place the favicon.ico file in the 'root' directory on your
web server (where your main index page is).

Tuesday, February 14, 2006

MySQL Check for the version

MySQL : Check for the version

Command : SELECT VERSION()

Friday, December 16, 2005

The === operator


= = = is an Identical operator

a = = = $b returns TRUE

if $a is equal to $b, and they are of the same type.

Friday, December 02, 2005

mysql_insert_id() && LAST_INSERT_ID()

mysql_insert_id() && LAST_INSERT_ID()

Used when you add a record in to one of the table using PHP, and then you want to use that ‘auto generated record id’ for further modifications to other table.

Used when you insert a record into a table that contains an AUTO_INCREMENT column, you can obtain the value stored into that column by calling the mysql_insert_id() function.

When a new AUTO_INCREMENT value has been generated, you can also obtain it by executing a SELECT LAST_INSERT_ID() statement with mysql_query() and retrieving the value from the result set returned by the statement.
For LAST_INSERT_ID(), the most recently generated ID is maintained in the server on a per-connection basis. It is not changed by another client. It is not even changed if you update another AUTO_INCREMENT column with a non-magic value (that is, a value that is not NULL and not 0).
Note that mysql_insert_id() returns the value stored into an AUTO_INCREMENT column, whether that value is automatically generated by storing NULL or 0 or was specified as an explicit value. LAST_INSERT_ID() returns only automatically generated AUTO_INCREMENT values. If you store an explicit value other than NULL or 0, it does not affect the value returned byLAST_INSERT_ID().
mysql_insert_id
(PHP 3, PHP 4, PHP 5)
mysql_insert_id -- Get the ID generated from the previous INSERT operation
The ID generated for an AUTO_INCREMENT column by the previous INSERT query on success, 0 if the previous query does not generate an AUTO_INCREMENT value, or FALSE if no MySQL connection was established.
Note: Because mysql_insert_id() acts on the last performed query, be sure to call mysql_insert_id() immediately after the query that generates the value.
Note: The value of the MySQL SQL function LAST_INSERT_ID() always contains the most recently generated AUTO_INCREMENT value, and is not reset between queries.

Tuesday, November 22, 2005

Techworld.com - Microsoft offers 'open' Office formats

Microsoft has announced it will offer its Word, Excel and PowerPoint formats as open standards.

The software giant will submit its Office Open XML format to the International Standards Organization (ISO) to be adopted as an international standard in time for the launch of the next version of its Office software suite, it said today.


The decision comes as a group of technology rivals led by IBM and Sun are pushing the OASIS format for office applications called OpenDocument as a global standard format.

It also comes in the wake of a highly publicised decision by the state of Massachusettsto require compliance with OpenDocument for government documents - which effectively forces the phasing out of Microsoft Office and its proprietary format.

Microsoft has been facing increasing pressure from governments and agencies as they have insisted on standards-compliance for their software. Microsoft executives confirmed that the move would help the company win contracts from public authorities that want software based on open standards.

"We have a few barriers [with government contracts]," said Alan Yates, general manager for Microsoft Office. "It will give governments more long-term confidence."

The issue isn't as clear-cut as that however. ISO standards are not the same as open standards. "With an open standard any application can use it," said Louis Suarez-Potts, community manager of OpenOffice.org. "With an ISO standard, it's not quite the same thing. It just means you have a reference for it." If approved, the Office Open XML will see Microsoft grant free licences for its use.

Microsoft has put together a group of companies including Apple, BP, Intel, Toshiba, Barclays Bank, the British Library.and Statoil to make the submission to Geneva-based European Computer Manufacturers Association (ECMA).

The evaluation process is expected to take around a year. Once completed, ECMA will forward a request to the ISO. Microsoft explained that the timing had been chosen to ensure that the XML formats became open standards in time for the launch of Office 12 toward the end of next year.

Server 2003

Gates Outlines Microsoft's High-Performance Computing Plans Nov. 15, 2005

Microsoft's entry into the scientific computing market could yield less expensive, easier-to-use supercomputing systems and pave the way for advances in business computing, chairman Bill Gates said during a keynote speech at a supercomputing conference in Seattle Tuesday.
Microsoft next year plans to release a version of Windows for small supercomputers, and is funding 10 universities in the United States, Europe, and Asia to help develop a set of high-performance computing products that includes operating systems, middleware, and development tools. As computer technology becomes integral to advances in biology, physics, medicine, and earth science, there's demand for simpler tools that can speed up scientists' "time to insight," Gates said during the speech at the SC05 conference.
High-performance computing techniques are also finding their way into industrial applications, including consumer product design and automobile crash testing. Microsoft's upcoming high-performance computing software, its first designed for the market, could help tie together the desktop and powerful clusters of computer servers in new ways, said Gates.
"Computation has become a tool for all the sciences," Gates said. "We need an approach that scales from the smallest supercomputer up to the largest."
Microsoft Tuesday released a second beta version of Windows Compute Cluster Server 2003, a version of its operating system designed to run on clusters of perhaps a few dozen machines. The product is due in the first half of next year, and will compete with the open-source Linux operating system that dominates cluster installations today. Using clustering technology, users can chain together dozens or hundreds of inexpensive PC servers with special cabling to run software that distributes work among the processors. The approach has let universities, supercomputing research centers, and corporate IT departments access supercomputing power at much lower costs than specialized supercomputing architectures have allowed. Microsoft is also designing new capabilities for its graphical development tools that could help scientists program clusters.
As part of its development effort, Microsoft has funded 10 "institutes for high-performance computing," including the universities of Washington, Virginia, Tennessee, Utah, and Cornell University. Professors there will provide Microsoft with product development assistance as part of the new program. One challenge Microsoft and its partners will face is the need to develop new software algorithms that can run more efficiently across multiple processors. As chip designers become unable to significantly raise microprocessors' clock speeds to boost performance, the computer industry is turning to integrating multiple processing cores on a chip and extracting more parallel processing capability from software code to fuel performance gains. That means techniques used in high-performance computing today could in five or 10 years become commonplace on the desktop.
In an interview after his speech, Gates said Microsoft's research and development of high-performance computing technologies could help usher in speech and computer vision as user interfaces for PCs, improve the performance of software that can prioritize information for users, and run security algorithms more robustly. "We’ll be able to use all the extra power," says Gates. "In a certain sense, you could say it's been a Holy Grail of computer science" to distribute code that runs well in one machine across many.
During Gates' speech, Microsoft high-performance computing director Kyril Faenov demonstrated a prototype "personal cluster" of four Windows computers running at 25 billion computations per second, on which departments or workgroups could run preliminary calculations before submitting them to a larger system for more detailed modeling of data. The prototype could be priced at less than $10,000, he said. During the demonstration, Faenov ran a version of The MathWorks' Matlab software on the personal cluster to analyze proteomics data, and then transferred the job to a 64-node cluster run by Intel Corp. at a different location in Washington.
Gates said that as part of its high-performance computing effort, Microsoft researchers are entering into new types of collaborations with scientists and medical researchers.

Wiindows Server 2003

Microsoft: No Delay For Windows Server 2003 R2

Windows Server 2003 R2 did not debut at IT Forum but the upgrade will be released to manufacturing by the end of the year, Microsoft executives said.
At Microsoft's IT Forum in Barcelona, Spain, the software giant announced the planned release of the complementary Virtual Server 2005 R2 to manufacturing in December--and a major price cut--but did not announce the next big milestones for the R2 version of the Windows Server 2003--the release to manufacturing and ship dates.
Microsoft said the debut of Windows Desktop Search for Enterprise Deployment at IT Forum has no bearing on the schedule for Windows Server 2003 R2.
From his office in Redmond, Wash., Windows Server executive Bob Kelly said R2 will not be delayed. He did not say why Microsoft said little about R2's ship date except to say Microsoft discussed core scenarios of R2 at IT Forum as it prepares for going gold in the near future, he said.
"There's no holdup. We're still on target for what we promised," said Kelly. "We will RTM before the end of the calendar year."
Regarding the possibility of a delay into 2006, Kelly said it would not happen. "Not at all," he said. "We we feel very good about where we are."
IT Forum is Microsoft's last major conference of the calendar year. Release Candidate 2 of Windows Server 2003 R2 was made available roughly a month ago.
Sources close to Microsoft said they expect R2 will be released to manufacturing by the end of next month but may not be widely available in the channel until early 2006.
Partners said they are looking forward to R2's new features--including Active Directory Federation Services, better branch office support and vastly enhanced Unix integration features--but they are not too worried about the release of R2.
Microsoft also announced an 80 percent price cut on Virtual Server 2005 R2, which will be priced at $99 for the Standard Edition and $199 for the Enterprise Edition from $499 and $899, respectively, in version 1.0.
One partner said he was told to expect a mid-December release. Another partner said the company will just make the end-of-year promise. "I'm told right at the end of the year, six to seven weeks, " he said.

Keylogger Threats

Keylogger Threats Rise 65%
Secretly installed programs that track keystrokes represent a growing security threat to consumers using PCs.

Threats from keyloggers, the stealthily installed programs that record computer keystrokes to help steal personal information, grew 65 percent this year, a study said Tuesday, marking a growing trend in hackers using malware for financial gain.

About 6,191 keyloggers were recorded this year, up from 3,753 in 2004, said iDefense, a security intelligence provider that is part of VeriSign. iDefense recorded 3,753 keyloggers in 2004, a huge leap over the 300 released in 2000.

“Keylogging is a very effective method for hackers,” said Joe Payne, vice president, VeriSign iDefense Security Intelligence Services. “Fraudsters can launch hundreds of these attacks around the world in seconds, gathering sensitive data to conduct large-scale monetary transfers for their illegal activities.”

Keyloggers are largely distributed by organized cyber theft groups and are typically packaged with phishing emails or spyware, said iDefense.

A keylogger runs in the background, recording all the keystrokes of a user and hides it in the machine to be retrieved later. Once a keylogging program is activated, through a command from the hacker, it provides the hacker with personal data such as addresses, account numbers, or passwords—basically any strings of text a person enters.

“The object of a keylogger is to get the coveted password,” said George Waller, executive vice president of StrikeForce Technologies, a security company specializing in identity assurance products. “Keyloggers can capture keystrokes without you knowing it while advanced programs can even grab cookies and scrape the screen to get personal information.”

Keylogging can be perpetrated through emails known as phishing attacks. In these emails, users are lured into clicking on what seems like a harmless link. Once they do, a program is secretly downloaded into their computers.

The programs can also be spread if they are embedded on iPod files or picture files on major web sites. Hackers use techniques including chat program Internet Relay Chat and programs like trojans that give hackers backdoor access to systems to gather and filter logged keystrokes.

“There are so many victims because so few know the risk or the early warning signs; you simply can’t stop what you can't see,” said iDefense’s Mr. Payne.

Powering Identity Theft
A reason keyloggers are gaining attention among hackers is their potential use in identity theft.

“A sizable amount of these identity theft cases are the result of keyloggers that most people don’t realize they have on their machines,” said Mr. Waller.

The rise in keylogging is part of the trend of creating worms, viruses, and malware for profit. The Zotob worm attack in August was part of this trend, said security experts. Zotob attacked major corporations by exploiting a vulnerability in Microsoft’s Windows operating system and signaled the rise of the “business worm,” or a new type of malicious software that targets enterprises rather than home users (see Zotob Heralds ‘Business Worm’).

“This is part of the process where attacks are moving from notoriety to criminalization,” said Ken Dunham, senior engineer, iDefense. “Hackers want to create malware they can leverage and use for identity theft and which can financially benefit them.”

Keyloggers have, however, flown under the radar as consumers and businesses have had their resources diluted because of the rise in the number of security threats this year (see Security Threats Rise 22%).

“Keyloggers are part of the latest wave of security problems that people don’t even know how to detect,” said Mr. Waller. “There needs to be greater education about the issue and how keyloggers perpetrate.”

Friday, November 04, 2005

Train free Microsoft

Train free @Microsoft
There are two options available to interested IT professionals:
Beginners Training: A half day training that touches upon the fundamentals of each offering will be conducted at regular intervals across seven cities in the country. Interested participants can contact their nearest CPLS (Certified Partners in Learning Solution) training partners or register at www.microsoft.com/india/learning/cplsoffering.aspx
E-learning modules: For those looking for deeper training, Microsoft has introduced nine e-learning courses for SQL 2005 and seven courses for Visual Studio. Interested participants can apply for and undertake these courses for free by registering at www.microsoftelearning.com/visualstudio2005/ and www.microsoft.com/learning/sql