http://en.wikipedia.org/wiki/Jana_Gana_Mana
Monday, December 14, 2009
Sunday, December 13, 2009
Wednesday, December 9, 2009
Ten-Code : Interesting Codes for common phrases in voice communication, particularly by law enforcement and in Citizens' Band (CB) radio transmissions
http://en.wikipedia.org/wiki/Ten-code
10-4 |
|
Saturday, December 5, 2009
Friday, December 4, 2009
Thursday, December 3, 2009
Wednesday, December 2, 2009
Tuesday, December 1, 2009
Monday, November 30, 2009
Sunday, November 29, 2009
Mythology : a new look
Talks Devdutt Pattanaik: East vs. West -- the myths that mystify http://www.ted.com/talks/devdutt_pattanaik.html
Saturday, October 31, 2009
Sunday, October 4, 2009
The basics of Matter and Electricity
- Atom
- Atom is the main building block of matter like solid, liquid and gases
- Molecule
- Group of atoms is called molecules.
- E.g.
- Water has H2O meaning 2 molecules of hydrogen for every atom of Oxygen. If you break the hydrogen molecules, we get 2 atoms of hydrogen.
- Gases like halium are composed of atoms as the structural unit and not molecules.
- Element
- An element is material composed of only one kind of atom.
- Compound
- A compound is material composed of more than one kind of atom.
- E.g.
- Some examples of elements that can be found on the periodic table are hydrogen, helium, oxygen, iron, copper, gold, aluminum, uranium.
- Protons, Neutrons and Electrons
- An atom is the smallest particle of any element that still retains the characteristics of that element. However, atoms consist of even smaller particles. Atoms consist of a central, dense nucleus that is surrounded by one or more lightweight negatively charged particles called electrons. The nucleus is made up of positively charged particles called protons and neutrons which are neutral. An atom is held together by forces of attraction between the electrons and the protons. The neutrons help to hold the protons together. Protons and neutrons are believed to be made up of even smaller particles called quarks.
- Electrons have a negative electrostatic charge and protons have a positive electrostatic charge.
- A good way to remember what charge protons have is to remember both proton and positive charge start with "P."
- Like charges repel, unlike charges attract, just like with magnets.
- Atoms have their electrons arranged in layers called shells.
- In order to maintain electrical balance the number of electrons is equal to the number of protons in most elements.
- Valence Shell, free electrons
- In the copper atom's outside shell has only one electron. This represents that the copper atom has one electron that is near the outer portion of the atom. The outer shell of any atom is called the valence shell. When the valence electron in any atom gains sufficient energy from some outside force, it can break away from the parent atom and become what is called a free electron.
- Electrical Current
- Atoms with few electrons in their valence shell tend to have more free electrons since these valence electrons are more loosely bound to the nucleus. In some materials like copper, the electrons are so loosely held by the atom and so close to the neighboring atoms that it is difficult to determine which electron belongs to which atom. Under these conditions, the valence or free electrons tend to drift randomly from one atom to its neighboring atoms. Under normal conditions the movement of the electrons is truly random, meaning they are moving in all directions by the same amount. However, if some outside force acts upon the material, this flow of electrons can be directed through materials and this flow is called electrical current. Materials that have free electrons and allow electrical current to flow easily are called conductors. Many materials do not have any free electrons. Because of this fact, they do not tend to share their electrons very easily and do not make good conductors of electrical currents. These materials are called insulators.
- Electricity is a word used to describe the directional flow of electrons between atoms.
- The directional movement of electrons between atoms is called electrical current.
- Amps
- It is very important to have a way to measure and quantify the flow of electrical current. When current flow is controlled it can be used to do useful work. Electricity can be very dangerous and it is important to know something about it in order to work with it safely. The flow of electrons is measured in units called amperes. The term amps is often used for short. An amp is the amount of electrical current that exists when a number of electrons, having one coulomb (ku`-lum) of charge, move past a given point in one second. A coulomb is the charge carried by 6.25 x 10^18 electrons. 6.25 x 10^18 is scientific notation for 6,250,000,000,000,000,000. That is a lot of electrons moving past a given point in one second!
- Ohm's Law is used to describe the mathematical relationship between voltage, current, and resistance.
OHM'S LAW
I = V/R,
I = current, V = voltage, and R = resistance
*Depending on what you are trying to solve we can rearrange it two other ways.
V = I x R
R = V/I
*All of these variations of Ohm’s Law are mathematically equal to one another
Saturday, October 3, 2009
Scientific Toys, Resources and Links
You will find lot of articles and books on science
A Million Books for a Billion People
http://www.arvindguptatoys.com/
Thanks to Arvind Gupta for the making this large collection available for public.
A Million Books for a Billion People
http://www.arvindguptatoys.com/
Thanks to Arvind Gupta for the making this large collection available for public.
Sunday, September 27, 2009
LINQ
LINQ is Language Integrated Query. It is pronounced “link” and not ‘lin-queue”. It is a Microsoft .NET 3.5 component that adds native data querying capabilities to .NET languages using a syntax similar to SQL. One can do databases, XML, arrays, etc.
var results = from c in SomeCollection
where c.SomeProperty = conditionvalue
select new (c.SomeProperty, c.SomeOtherProperty);
foreach (var result in results)
XPS
XPS is XML Paper Specification. It is a specification for a page description language and a fixed-document format developed by Microsoft. It is an XAML-based specification, based on a new print path and a color-managed vector-based document format which supports device independence (documents look the same and as they are intended on any device) and resolution independence. It is essentially a competitor to PDF. XPS is a part of WPF which is a part of .NET 3.0.
To save a Word or Office document as XPS do Print to File.
PDF includes dynamic capabilities not supported by the XPS format.
Is it AJAX or Atlas?
Not many know that Microsoft originally invented AJAX. AJAX helps update data on a web page without a complete reload of the page.
ASP.NET AJAX was formerly known as Atlas. It is a set of extensions to ASP.NET developed by Microsoft for implementing Ajax functionality. ASP.NET AJAX was released as a standalone extension to ASP.NET in January 2007. It was subsequently included with .NET 3.5.
The key technology in ASP.NET AJAX is the XMLHttpRequest object, along with Javascript and DHTML.
XAML is EXtensible Application Markup Language (Pronounced as "zammel")
It is a declarative XML-based language that defines objects and their properties in XML. You can create visible UI elements for a Windows Presentation Foundation (WPF) application in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. It is very intuitive for creating interfaces ranging from prototype to production especially in the sense that a web designer's exact layout can be saved in XAML and combined with the application without affecting the development process. XAML files are XML files that generally have the .xaml extension.
XAML syntax describes objects, properties and their relationships to one another. Generic XAML syntax defines the relationship between objects and children. Properties can be set as attributes or by using 'period notation' to specify the object as a property of its parent.
XAML is a part of .NET 3.0 and is used in writing WPF applications.
The Visual Studio 2008 contains "Cider", the Visual Designer for WPF. The designer's split view editor lets you see your XAML and a design view of it simultaneously, so you can see consequences of your XAML edits immediately without having to run your application.
This is a button
Garbage Collection
Garbage collection (GC) is a form of automatic memory management. The garbage collector attempts to reclaim memory used by objects that will never be accessed or mutated again by the application.
Garbage collection essentially is a 2-step process:
- It determines which objects in a program will not be accessed in the future,
- And then reclaims the resources used by these objects.
Automatic memory management can eliminate common problems, such as forgetting to free an object and causing a memory leak, or attempting to access memory for an object that has already been freed. It aids programmers in their efforts to make programs more stable, because it prevents several runtime errors. E.g. it prevents dangling pointer errors, where a reference to a de-allocated object is used.
|
|
Reflection
Reflection is a functional extension to the object-oriented programming paradigm. It includes self-examination, self-modification, and self-replication. It is commonly used by programs which require the ability to examine or modify the runtime behavior of applications. This is typically accomplished by dynamically assigning program code at runtime.
E.g. In C#, here's how you would achieve reflection:
//Without reflection
Foo foo = new Foo();
foo.Hello();
//With reflection
Type t = Assembly.GetCallingAssembly().GetType("FooNamespace.Foo");
t.InvokeMember("Hello", BindingFlags.InvokeMethod, null, Activator.CreateInstance(t), null);
Reflection is powerful, but should not be used indiscriminately. The following concerns should be kept in mind when accessing code via reflection:
- Performance Overhead
Because reflection involves types that are dynamically resolved, certain optimizations cannot be performed. Consequently, reflective operations have slower performance than their non-reflective counterparts, and should be avoided in sections of code which are called frequently in performance-sensitive applications.
- Security Restrictions
Reflection requires a runtime permission which may not be present when running under a security manager. This is in an important consideration for code which has to run in a restricted security context.
- Exposure of Internals
Since reflection allows code to perform operations that would be illegal in non-reflective code, such as accessing private fields and methods; the use of reflection can result in unexpected side-effects. This may render code dysfunctional and may destroy portability. Reflective code breaks abstractions and therefore may change behavior with upgrades of the platform.
P.S. Since this is an advanced feature of .Net framework, if you can use this in your application, you can call yourself an "advanced programmer"! :)
FxCop
FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework CLR) and reports information about the assemblies, such as possible design, localization, performance, and security improvements.
So to say, FxCop essentially analyzes the compiled object code, and not the original source code. It uses MSIL parsing, and callgraph analysis to inspect assemblies for defects in the following areas:
- Correctness
- Library design
- Localization
- Naming conventions
- Performance
- Security
FxCop is intended for class library developers; however, anyone creating applications that should conform to .NET Framework best practices will benefit. FxCop is also useful as an educational tool for those who are new to the .NET Framework or are unfamiliar with the .NET Framework Design Guidelines.
FxCop is designed to be fully integrated into the software development cycle and is distributed as both a fully featured application with a GUI (FxCop.exe) for interactive work, and a command-line tool (FxCopCmd.exe) suitable for use as part of automated build processes or integrated with Microsoft Visual Studio®.NET as an external tool.
Keywords of FxCop:
- Target: FxCop analyzes programming elements in managed assemblies, called targets. It provides an informational report containing messages about the targets, including suggestions on how to improve the source code used to generate them.
- Rule: A rule is managed code that can analyze targets and return a message about its findings. Rule messages identify any relevant programming and design issues and, when possible, supply information on how to fix the target. FxCop represents the checks it performs during an analysis as rules.
FxCop integrates with the Visual Studio IDE to enable developers to analyze the source code at the time of coding and is a freeware downloadable from:
internal - A keyword in C#
“internal” is a new access modifier for types and type members, in addition to the existing private, public and protected. Internal types or members are accessible only within files in the same assembly. When “protected internal” is used, it keeps access limited to the current assembly or types derived from the containing class.
public class BaseClass
{
// Only accessible within the same assembly
internal static int count = 0;
}
A common use of internal access is in component-based development because it enables a group of components to cooperate in a private manner without being exposed to the rest of the application code.
E.g. a framework for building graphical user interfaces could provide Control and Form classes that co-operate using members with internal access. Since these members are internal, they are not exposed to code that is using the framework.
It is an error to reference a member with internal access outside the assembly within which it was defined.
Assembly1.cs
// Compile with: /target:library
internal class BaseClass
{
public static int nCount = 0;
}
// Assembly2.cs
// Compile with: /reference:Assembly1.dll
class TestAccess
{
static void Main()
{
BaseClass myBase = new BaseClass(); // Error: CS0122; 'member' is inaccessible
// due to its protection level
}
}
sealed - A keyword in C#
When applied to a class, the “sealed” modifier prevents other classes from inheriting from this class. Sealed classes are primarily used to prevent derivation. Because they can never be used as a base class, some run-time optimizations can make calling sealed class members slightly faster.
using System;
sealed class MyClass
{
int x;
int y;
}
It is an error to use the abstract modifier with a sealed class, because an abstract class must be inherited by a class that provides an implementation of the abstract methods or properties.
You can also use the “sealed” modifier on a method or property that overrides a virtual method or property in a base class. This enables you to allow classes to derive from your class and prevent them from overriding specific virtual methods or properties. This negates the virtual aspect of the member for any further derived class. This is accomplished by putting the sealed keyword before the override keyword in the class member declaration. When applied to a method or property, the sealed modifier must always be used with override.
public class D : C
{
public sealed override void DoWork() { }
}
Structs are implicitly sealed; therefore, they cannot be inherited.
To determine whether to seal a class, method, or property, you should generally consider the following two points:
- The potential benefits that deriving classes might gain through the ability to customize your class.
- The potential that deriving classes could modify your classes in such a way that they would no longer work correctly or as expected.
Silverlight
Microsoft Silverlight is a cross-browser, cross-platform implementation of the .NET Framework for building and delivering the next generation of media experiences and rich interactive applications (RIA) for the Web. Silverlight unifies the capabilities of the server, the Web, and the desktop, of managed code and dynamic languages, of declarative and traditional programming, and the power of Windows Presentation Foundation(WPF).
Silverlight enables you to create a state-of-the-art application that has the following features:
- It runs in all popular Web browsers, including Microsoft IE, Mozilla Firefox, and Apple Safari, and on Microsoft Windows and Apple Mac OS X.
- It provides a consistent experience no matter where it runs.
- It is supported by a very small download that installs in seconds.
- It streams video and audio. It scales video quality to everything from mobile devices to desktop browsers to 720p HDTV video modes.
- It includes compelling graphics that users can manipulate drag, turn, and zoom, directly in the browser.
- It reads data and updates the display, but it doesn't interrupt the user by refreshing the whole page.
Silverlight offers you the following features:
- WPF and XAML: Silverlight includes Windows Presentation Foundation (WPF) technology, which greatly extends the elements in the browser for creating UI. WPF lets you create immersive graphics, animation, media, and other rich client features, extending browser-based UI beyond what is available with HTML alone. Extensible Application Markup Language (XAML) provides a declarative markup syntax for creating WPF elements. See Creating User Interfaces with Silverlight for more information.
- Extensions to JavaScript: Silverlight provides extensions to the universal browser scripting language that provide powerful control over the browser UI, including the ability to work with WPF elements.
- Cross-browser, cross-platform support: Silverlight runs the same on all popular browsers (on any platform). You can design and develop your application without having to worry about which browser or platform your users have.
- Integration with existing applications: Silverlight integrates seamlessly with your existing JavaScript and ASP.NET AJAX code to complement functionality you have already created.
- Access to the .NET Framework programming model and to associated tools: You can create Silverlight-based applications using dynamic languages such as managed JScript and IronPython as well as languages such as C# and Visual Basic. You can use development tools such as Visual Studio to create Silverlight-based applications.
- LINQ: Silverlight includes language-integrated query (LINQ), which enables you to program data access using intuitive native syntax and strongly typed objects in .NET Framework languages.
If you already use ASP.NET, you can integrate Silverlight with the server and client capabilities of ASP.NET that you are familiar with. You can create server-based resources in ASP.NET and use the AJAX capabilities of ASP.NET to interact with server-based resources without interrupting the user.
params (A keyword in C#)
Arrays are used to pass a variable number of parameters to a member. C# provides the "params" keyword which lets you specify a method parameter that takes an argument where the number of arguments is variable. No additional parameters are permitted after the params keyword in a method declaration, and only one params keyword is permitted in a method declaration.
E.g.
public class MyClass
{
public static void UseVariableParameters(params int[] list)
{
for (int i = 0; i < list.Length; i++)
{
Console.WriteLine("{0}th parameter: {1}", i, list[i]);
}
}
}
public static void DemonstrateVariableParameters()
{
MyClass.UseVariableParameters(1, 2, 3, 4, 5);
}
Passing variable number of parameters to methods should be used judicially. Follow guidelines given below for appropriate use of variable arrays for parameters:
- Use params keyword to array parameters if you expect the end users to pass a small number of elements.
- Do not use params arrays if the caller would almost always already have the input in an array.
- Do not use params arrays if the array is modified by the member taking the params array parameter.
- Do try to order parameters to make it possible to use the params keyword.
- Consider providing special overloads and code paths for calls with a small number of arguments in extremely performance-sensitive APIs.
- By following this guideline, you can avoid creating arrays when a member is called with a small number of arguments. The parameter names should be a singular form of the array parameter followed by a numeric suffix. The following code example shows a member signature that follows this guideline.
public static void WriteLine(string format, object arg0, object arg1, object arg2)
- Be aware that null could be passed as a params array argument.
JSON is JavaScript Object Notation (Pronounced as Jason)
JSON is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects).
The JSON format is specified in RFC 4627 by Douglas Crockford. This format is often used for transmitting structured data over a network connection in a process called serialization. Its main application is in Ajax web application programming, where it serves as an alternative to the use of the XML format.
The following example shows the JSON representation of an object that describes a person. The object has string fields for first name and last name, contains an object representing the person's address, and contains a list of phone numbers (an array):
{
"firstName": "John",
"lastName": "Smith",
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": 10021
},
"phoneNumbers": {
"212 555-1234",
"646 555-4567"
}
}
Although JSON was based on a subset of the JavaScript programming language (specifically, Standard ECMA-262 3rd Edition-December 1999) and is commonly used with that language, it is considered to be a language-independent data format. Code for parsing and generating JSON data is readily available for a large variety of programming languages. The http://json.org website provides a comprehensive listing of existing JSON bindings, organized by language.
Although JSON is intended as a data serialization format, its design as a subset of the JavaScript programming language poses several security concerns. These concerns center on the use of a JavaScript interpreter to dynamically execute JSON text as JavaScript, thus exposing a program to errant or malicious script contained therein - often a chief concern when dealing with data retrieved from the internet.
Fortify SCA
Fortify® Source Code Analysis (SCA) is the most widely used and effective solution to find and fix software vulnerabilities at the root cause early in the development cycle. Its advanced features help developers identify and resolve issues with less effort, while enabling security leads to review and prioritize more code in less time.
It supports a wide variety of languages, frameworks and operating systems and delivers depth and accuracy in its results. It can be tuned to be comprehensive when completeness is needed or extremely targeted for day-to-day use. Fortify SCA makes triage, audits and remediation fast and effective for any organization.
Fortify SCA's comprehensive source code analysis engine detects a wide variety of vulnerabilities using specialized analyzers:
- Data Flow Analyzer tracks tainted input across application architecture tiers and programming language boundaries,
- Semantic Analyzer detects use of vulnerable functions or procedures and understands the context of their use,
- Control Flow Analyzer accurately tracks sequencing of operations to detect improper coding constructs,
- Configuration Analyzer finds vulnerabilities in interactions between configurations, and
- Code Structural Analysis identifies vulnerabilities or problems arising from code structures.
It uses various analysis techniques such as Buffer Overflow Analysis, Deviation Analysis, Infeasible Path Analysis, etc.
Fortify SCA supports a wide variety of development environments, languages, platforms and frameworks to enable security reviews in mixed software development and production environments:
LANGUAGES | ASP.NET, C/C++, C#, COBOL, Classic ASP/VB6, ColdFusion, Java, JavaScript, JSP, .NET, PL/SQL, PHP, T-SQL, XML |
PLATFORMS | Windows, Solaris, Linux, Mac OS X, HP-UX, AIX |
FRAMEWORKS | J2EE/EJB, Struts, Hibernate |
IDEs | Microsoft Visual Studio, Eclipse, WebSphere Application Developer, IBM Rational Application Developer and RSA |
Subscribe to:
Posts (Atom)