20 September 2012

What is Mobile app?


Mobile app

A mobile application (or mobile app) is a software application designed to run on smartphones, tablet computers and other mobile devices. They are available through application distribution platforms, which are typically operated by the owner of the mobile operating system, such as the Apple App Store, Google Play, Windows Phone Store and BlackBerry App World. Some apps are free, while others have a price. Usually, they are downloaded from the platform to a target device, such as an iPhone, BlackBerry, Android phone or Windows Phone, but sometimes they can be downloaded to less mobile computers, such as laptops or desktops.

Mobile apps were originally offered for general productivity and information retrieval, including email, calendar, contacts, and stock market and weather information. However, public demand and the availability of developer tools drove rapid expansion into other categories, such as mobile games, factory automation, GPS and location-based services, banking, order-tracking, and ticket purchases. The explosion in number and variety of apps made discovery a challenge, which in turn led to the creation of a wide range of review, recommendation, and curation sources, including blogs, magazines, and dedicated online app-discovery services.

Distribution as on 20-09-2012

Google Play
             -  application store for the Google Android operating system.With over 600,000 apps

BlackBerry App World
             -  Apps for the BlackBerry mobile devices . With over 99,500 apps
Nokia Store
             -  An app store for the Nokia phone.  With over 1,20,000 apps

Windows Phone Marketplace
              -  Windows Phone Marketplace is a service by Microsoft for its Windows Phone 7 platform. with over 1,00,000 apps
Apple App Store
                - The Apple App Store is a digital application distribution platform for iOS developed and maintained by Apple Inc. 7,25,700+ apps

14 September 2012

SyncLock and Lock in C#

SyncLock and Lock in C#


The lock (C#) and SyncLock (Visual Basic) statements can be used to ensure that a block of code runs to completion without interruption by other threads. This is accomplished by obtaining a mutual-exclusion lock for a given object for the duration of the code block.

lock or SyncLock statement is given an object as an argument, and is followed by a code block that is to be executed by only one thread at a time. For example:

public class TestThreading
{
    private System.Object lockThis = new System.Object();

    public void Process()
    {

        lock (lockThis)
        {
            // Access thread-sensitive resources.
        }
    }

}





Copy one table name to another table name in Sql Server

Copy one table name to another table name in Sql Server



 INSERT INTO tablename1(column1,
column2
,
column3
)

SELECT  column1,
column2
,column3 from tablename2




Stored procedure that create in last N Days in Sql Server

Stored procedure that create in last N Days in Sql Server



SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 7
----Change 7 to any other day value.



Stored Procedure that change in last N days in Sql Server

Stored Procedure that change in last N days in Sql Server


SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 7
----Change 7 to any other day value



To know the stored procedure created date and modified date in Sql Server

To know the stored procedure created date and modified date in Sql Server


SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'P'
AND name = 'sp_name'  -- stored procedure name



To show the stored procedure permission details in SQL Server



To show  the stored procedure permission details in SQL Server:

select U. name, O. name, permission_name from sys . database_permissions
join sys . sysusers U on grantee_principal_id = uid
join sys . sysobjects O on major_id = id
where O. name like 'sp_name' -- stored procedure name
order by U. name




8 September 2012

Web application vs Webservice vs WCF in asp.net


Web application vs Webservice vs WCF in asp.net

Disadvantage of Web application
-------------------------------
In web application, its not possible to connect different technologies for eg[Java and Dotnet] and not possible to connect the application in two different servers.

Why Webservice?
-------------------
Webservice use SOAP (Simple Object Access protocol) and it is used to connect the web application using different type of technologies, and possible to connect the application that have hosted in different type of servers.

Disadvantage of Webservice
-----------------------------
Webservice use only HTTP Protocol.
It provides only singlex communication, not half duplex and full duplex communication.
They work in an stateless fasion over HTTP and are hosted inside a web server like IIS

Half duplex
-----------
Half-duplex data transmission means that data can be transmitted in both directions on a signal carrier, but not at the same time.
half-duplex transmission implies a bidirectional line (one that can carry data in both directions).

They work in an stateless fashion over HTTP and are hosted inside a web server like IIS

Full duplex
------------
Full-duplex data transmission means that data can be transmitted in both directions on a signal carrier at the same time.
Full-duplex transmission necessarily implies a bidirectional line (one that can move data in both directions).


Advantages of WCF Service
-----------------------------
WCF Service support  HTTP, TCP, IPC, and even Message Queues for communication.
We can consume Web Services using server side scripts (ASP.NET), JavaScript Object Notations (JSON), and even REST (Representational State Transfer).
It can be configured to have singlex, request-response, or even full duplex communication.
These can be hosted in many ways inside IIS, inside a Windows service, or even self hosted.

Difference between Sleep and Hibernate in Laptops?


Difference between Sleep and Hibernate in Laptops?

-Sleep is a power-saving state that allows a computer to quickly resume full-power operation, Sleep puts your work and settings in memory and draws a small amount of power.

-Hibernation is also a power-saving state designed primarily for laptops. It puts your open documents
 and programs on your hard disk and then turn off your computer.

Off all the power-saving states in Windows, hibernate uses the least amount of power.

If you won't use your laptop for an extended period and won't have an opportunity to charge the battery during that time - Hibernate is most efficient one.



Consistency level in Azure cosmos db

 Consistency level in Azure cosmos db Azure Cosmos DB offers five well-defined consistency levels to provide developers with the flexibility...