Attacking Other Users

The majority of interesting attacks against web applications involve targeting the server-side application itself. Many of these attacks do of course impinge upon other users — for example, an SQL injection attack that steals other users’ data. But the essential methodology of the attacker is to interact with the server in unexpected ways in order … Read more

A Brief History of UNIX and C

The first UNIX implementation was developed in 1969 (the same year that Linus Torvalds was born) by Ken Thompson at Bell Laboratories, a division of the tele- phone corporation, AT&T. It was written in assembler for a Digital PDP-7 mini- computer. The name UNIX was a pun on MULTICS (Multiplexed Information and Computing Service), the … Read more

What kinds of problems are solved by algorithms?

 The Human Genome Project has made great progress toward the goals of identifying all the 100,000 genes in human DNA, determining the sequences of the 3 billion chemical base pairs that make up human DNA, storing this information in databases, and developing tools for data analysis. Each of these stepsrequires sophisticated algorithms. Although the … Read more

a program to read the data for the customer, calculate the interest and service charge, and print the customer’s name, average balance, interest, and service charge.

//calculate interest and service charge for bank customer #include <stdio.h> int main() { char customer[30], acctNum[30]; double avgBalance, interest, service; int numTrans; printf(“Name? “); gets(customer); printf(“Account number? “); gets(acctNum); printf(“Average balance? “); scanf(“%lf”, &avgBalance); printf(“Number of transactions? “); scanf(“%d”, &numTrans); interest = avgBalance * 0.06; service = numTrans * 0.50; printf(“\nName: %s\n”, customer); printf(“Average balance: … Read more

Escape Sequences

Within the string argument to printf, the backslash (\) signals that a special effect is needed at this point. The character following the backslash specifies what to do. This combination (\ followed by another character) is referred to as an escape sequence. The following are some escape sequences you can use in a string in … Read more

Variable`s in java

Before you use a variable in java, you must declare it, specifying its data type. The int  types is only one kind of simple variable you can use. mentioned here are the various possibilities. Integer – these types are byte, short, int and long, which hold signed, whole-value numbers. Floating-point numbers – these types are … Read more

Java`s Reserved Words

when you are writing java code, you should know that java reserves certain words for itself as part of the java language. There aren`t too many of them, though. Here they are; abstract – It specifies that the class or method will be implemented later, in a subclass. boolean – A data type that can … Read more

Commenting in your java code

Java supports three types of comments, two of which are taken from C++. you can surround a comment of any length with the characters “/*’ and “*/”, like this: /* This application prints out “Linux” */ public class abc { public static void main(string[] args) { system.out.println(“Linux”); } } The java compiler will ignore all … Read more