Learning Curve…

1. Vertical Scoll position at the bottom of screen

<script type=”text/javascript”>

    function init() {

      var scnWid, scnHei;

      scnWid = document.body.clientWidth;

      scnHei = document.body.clientHeight;

      self.scrollTo(scnWid, scnHei);


    window.onload = init;


2. Vertical Scroll position based on a control in the screen

    Below example set scroll position at the start of grid’s header

<script type=”text/javascript”>

    function init() {

      var scnWid, scnHei;

      scnWid = getElementPosition(‘gridName’).left;

      scnHei = getElementPosition(‘gridName’).top;

     self.scrollTo(scnWid, scnHei);


    function getElementPosition(elemID) {

      var offsetTrail = document.getElementById(elemID);

      var offsetLeft = 0;

      var offsetTop = 0;

      while (offsetTrail) {

        offsetLeft += offsetTrail.offsetLeft;

        offsetTop += offsetTrail.offsetTop;

        offsetTrail = offsetTrail.offsetParent;


      return { left: offsetLeft, top: offsetTop };


    window.onload = init;



ASP.NET 4.0 supports built in support for URL Routing. This can make site more user friendly and site content more discoverable by search engines. It is also easy to remember and while bookmarking.

Following example shows URL without using Routing mechanism of ASP.NET 4.0.


After using Routing mechanism of ASP.NET 4.0, above URL becomes as follow.


For mapping above URL to the list of products based on category, we need to map our route using new method MapPageRoute of class Route as shown in following examples.
Application_Start(object sender, EventArgs e)   {
         “product/{prodId}”, “~/products.aspx”);


  1. Range variable: – A variable defined in your LINQ query that is subsequently used in the select and where parts.
  2. Strong typing: – A programming concept where the type of a variable is explicitly defined when the variable is declared.
  3. Type inference: – A technique where the compiler determines the type of a variable based on the data it gets assigned. This enables you to create strongly typed variables without explicitly defining the variable’s type first
  4. Lazy loading: – A technique where data is not loaded from the database until it is accessed at runtime.
  5. Anonymous types:-Types that are created on-the-fly without defining them explicitly.

The script to check if column exists and then renaming the column:-

IF EXISTS (SELECT * FROM sys.columns WHERE Name = N’OldColumnName’ AND Object_ID = Object_ID(N’TableName’))
   EXEC sp_RENAME ‘TableName.OldColumnName’ , ‘NewColumnName’, ‘COLUMN’

Style Code




0 or 100 Default. Equivalent to not specifying a style code. mon dd yyyy hh:mmAM Sep 8 2007 9:00PM
1 USA date. mm/dd/yy 09-08-2007
2 ANSI date. yy.mm.dd 07-09-2008
3 UK / French date. dd/mm/yy 08-09-2007
4 German date. dd.mm.yy 08.09.07
5 Italian date. dd-mm-yy 08-09-2007
6 Abbreviated month. dd mmm yy 08-Sep-07
7 Abbreviated month. mmm dd, yy Sep 08, 07
8 or 108 24 hour time. HH:mm:ss 21:00:00
9 or 109 Default formatting with seconds and milliseconds appended. mon dd yyyy hh:mm:ss:fffAM Sep 8 2007 9:00:00:000PM
10 USA date with hyphen separators. mm-dd-yy 09-08-2007
11 Japanese date. yy/mm/dd 07-09-2008
12 ISO date. yymmdd 70908
13 or 113 European default with seconds and milliseconds. dd mon yyyy HH:mm:ss:fff 08 Sep 2007 21:00:00:000
14 or 114 24 hour time with milliseconds. HH:mm:ss:fff 21:00:00:000
20 or 120 ODBC canonical date and time. yyyy-mm-dd HH:mm:ss 08-09-2007 21:00
21 or 121 ODBC canonical date and time with milliseconds. yyyy-mm-dd HH:mm:ss.fff 00:00.0
101 USA date with century. mm/dd/yyyy 09-08-2007
102 ANSI date with century. yyyy.mm.dd 08-09-2007
103 UK / French date with century. dd/mm/yyyy 08-09-2007
104 German date with century. dd.mm.yyyy 08.09.2007
105 Italian date with century. dd-mm-yyyy 08-09-2007
106 Abbreviated month with century. dd mmm yyyy 08-Sep-07
107 Abbreviated month with century. mmm dd, yyyy Sep 08, 2007
110 USA date with hyphen separators and century. mm-dd-yyyy 09-08-2007
111 Japanese date with century. yyyy/mm/dd 08-09-2007
112 ISO date with century. yymmdd 20070908
126 ISO8601, for use in XML. yyy-mm-ddThh:mm:ss 2007-09-08T21:00:00


MBA – PM0051 :  What is the definition of cyber crime.

Answer – Cybercrime is a term for any illegal activity that uses a computer as its primary means of commission. The U.S. Department of Justice expands the definition of cybercrime to include any illegal activity that uses a computer for the storage of evidence.

The growing list of cybercrimes includes crimes that have been made possible by computers, such as network intrusions and the dissemination of computer viruses, as well as computer-based variations of existing crimes, such as identity theft, stalking, bullying and terrorism.

There are a number of controversial issues surrounding cybercrime. Opinions differ, for example, as to whether some widespread activities (suchas file sharing) should be classified as criminal acts. The U.S. Digital Media Copyright Act (DMCA) of 1998 stipulates that exchanging files of copyrighted material, such as music or videos, is illegal and punishable by law. In August, 2002, the U.S. Department of Justice announced that they would begin to prosecute cases of peer-to-peer piracy. Since that time, there have been sporadic suits brought against individuals. Such prosecutions please many in the entertainment industries but are less popular with the general public. Gary Shapiro, president of the Consumer Electronics Association, has remarked that “If we have 70 million people in the United States who are breaking the law, we have a big issue.”

Another controversy related to cybercrime is the issue of digital surveillance and its impact on civil liberties. Since the terrorist attacks on the World Trade Center in September 2001, many have deemed it necessary to curtail some individual rights to privacy of information in exchange for greater security. According to the American Civil Liberties Union (ACLU), government surveillance networks monitor enormous volumes of private communications and apply artificial intelligence (AI) applications to filter out relevant data. Although such extensive surveillance might significantly decrease the possibility of cybercrime, it is nearly impossible to do so without infringing upon individual privacy. Furthermore, because surveillance organizations operate in secret, they are not open to scrutiny. The ACLU suggests that while surveillance can be effectively used to curtail cybercrime, it must be properly overseen to ensure that it is not at the cost of individual rights.


MBA – PM0051 : Distinguish between companies limited by shares and companies limited by guarantee.

Answer: – When you want to start a business, there are several ways to structure a company. The different formations refer to different tax and profit sharing methods. Two of these formations that are more popular in Britain and Ireland are Companies Limited by Shares and Companies Limited by Guarantee.  Potential business owners often find them confusing and do not know which one they should use. There are similarities and differences between the two.

Company Limited by Guarantee

A company limited by guarantee is not as common as a company limited by share, but it is the more popular of the two. It is mainly used when setting up a non-profit business. Instead of having shareholders, this company has members. The company is formed for the sole purpose of providing a service to the public.

There are specific clauses associated with the organization that determine the manner and the areas in which they can operate. For example, businesses that exist for the purpose of charity have specific restrictions about the donations they receive so that donors know exactly how the money is being spent. Because of this companies limited by guarantee find it easier to raise money because they can show the donors how they plan to use the money.

These companies do not have any share capital. The members pledge to donate a set amount of money at the start of the organization or per year. This is the case with such companies limited by guarantee as schools, churches, clubs, etc., when the initial money is needed to purchase property and erect a building.

Company Limited by Shares

A company limited by shares is an ordinary business in which the owners want to make a profit. Therefore there are shareholders and the clauses in their guiding statements that give them the liberty to engage in all kinds of activities that let them make a profit provided that these activities are legal.


Both companies limited by shares and companies limited by guarantee have a similar structure. Each one has a director, a secretary and a declarant at the time of the business startup.


Companies limited by shares are the most popular form of business.

Companies limited by guarantee are non-profit organizations, but companies limited by shares are those designed to make a profit.

Companies limited by guarantee have members and companies limited by shares have shareholders.

Companies limited by guarantee so not have share capital and have regulations that require them to show donors how they plan to use the money that they raise.

Learning days (Calendar)

December 2019
« Jun    

Knowledge Bank (Archives)

I am on Twitter

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Blog Stats

  • 595,816 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: