Find tables without cluster index

SELECT DISTINCT [TABLE] = OBJECT_NAME(OBJECT_ID)
FROM SYS.INDEXES
WHERE INDEX_ID = 0
AND OBJECTPROPERTY(OBJECT_ID,’IsUserTable’) = 1
ORDER BY [TABLE]

Advertisements

Objects in Javascript

Almost “everything” is an object in JavaScript.

Strings, Numbers, true, false, null and undefined all are primitive values in JavaScript. Others are objects.

Dates, Maths, Regular expressions, Arrays, Functions and Objects are objects in JavaScript.

Strings, Numbers and Booleans can be objects.

In JavaScript, Variable can contain single value but Object can contain many values. And Object is also variable.

var Person = “Vikas Jindal”;

var Person = { firstName : “Vikas”, lastName : “Jindal”, Occupation : “Software Developer”, webSite : “www.vikasjindal.com” };

The values are written as name : value pairs in object.

What is named values?

An object is an unordered collection of variables called named values in JavaScript.

In JS’s object, name of values or variables are called properties.

Example of properties: firstName, lastName, Occupation, website.

How to create object in JavaScript?

Object Creation

3 ways to create new objects:

  1. Object Literal – Define and create a single object.
  2. With new keywords – Define and create a single object.
  3. Using an Object constructor.

1) Object Literal – An easiest way to create an object. You define and create an object in one statement.

var Person = { firstName : “Vikas”, lastName : “Jindal”, Occupation : “Software Developer”, webSite : “www.vikasjindal.com” };

2) With new keyword –

var Person = new Object();

Person.firstName = “Vikas”;

Person.lastName = “Jindal”;

Person.Occupation = “Software Developer”;

Person.webSite = “www.vikasjindal.com”;

3) Using an Object constructor – can create many objects.

function Person(fName, lName, occupation, website) {

        this.firstName = fName;

        this.lastName = lName;

        this.Occupation = occupation;

        this.webSite = website;

}

var developer = new Person(“Vikas”, “Jindal”, “Project Leader”, “www.vikasjindal.com”);

var astrologer = new Person(“VJ”, “Baba”, “Astrologer”, “www.theastroganesha.com”);

Vikas Jindal

vikkasjindal@gmil.com

www.vikasjindal.com

Array in .Net (Fx 4.5)

Array resides in mscorlib.dll.

Namespace: System.Array

Array class != (part of)  the System.Collections namespaces

Considered a collection because it is based on the IList interface.

Length of Array = Sum(Elements)

Lower bound of Array = index of first element, Default = 0

Multidimensional Array can have different bounds for each dimension.

Max(dimensions) = 32

Source:http://msdn.microsoft.com/en-us/library/system.array%28v=vs.110%29.aspx

Vikas Jindal

vikkasjindal@gmail.com

Vikas Jindal

Affiliate Marketing

Affiliate marketing is the process of earning a commission by promoting other people’s (or company’s) products.

You find a product you like, promote it to others, and earn a piece of the profit for each sale that you make.

  • You’re happy because you earned a commission…
  • The company is happy because they have a new sale from a customer that they might not have normally been able to reach…
  • And the customer is happy because they learned about a product from you that will hopefully fulfill a need or desire.

The beauty of affiliate marketing is that you don’t have to invest the time and effort to create a product to sell. You can begin selling something as an affiliate as soon as you have a platform to sell it on.

Vikas Jindal

vikkasjindal@gmail.com

Vikas Jindal

What is Affiliate Marketing?

Affiliate marketing is internet advertising that allows any online business to affiliate themselves with web site owners (known as affiliates or publishers) using affiliate programs. Affiliates make money by generating sales, leads and traffic for the Merchants business. Merchants who sell goods and services online or seek other affiliate business activity typically use one of the affiliate program commission payment models below:

Cost Per Sale (CPA)
A visitor referred by the Affiliate purchases goods and services from the Merchant. This payment structure is referred to as – cost per sale or cost per acquisition (CPA).

Cost Per Lead (CPL)
A visitor referred by the Affiliate completes a form on the Merchants web site. This payment structure is referred to as – cost per lead (CPL).

Cost Per Click (CPC)
A visitor to the Affiliates web site clicks on a Merchant’s banner and visits the Merchant’s web site. This payment structure is referred to as – cost per click (CPC).

Source: https://www.clixgalore.co.in/affiliateprogramsintro.aspx

Vikas Jindal

vikkasjindal@gmail.com

Vikas Jindal

Copy File from one folder to another folder in C#

private void CopyFile(string fileName, string sourcePath, string targetPath, bool overwrite)
{

// Use Path class to manipulate file and directory paths.
string sourceFile = System.IO.Path.Combine(sourcePath, fileName);
string destFile = System.IO.Path.Combine(targetPath, fileName);

// Copy a file
System.IO.File.Copy(sourceFile, destFile, overwrite);
}

Vikas Jindal

vikkasjindal@gmail.com

Vikas Jindal