Sunday, January 14, 2018

Create an angular application using Visual Studio 2017

It's super easy to create an Angular application with Asp.Net Core 2 and Visual Studio 2017. It's very important to note that we need to have the below prerequisites for the application:

Visual Studio 2017 Update 15.5.2 : For getting the latest version of Visual studio you can visit the following link : https://www.visualstudio.com/vs/whatsnew/

Asp.Net Core 2 Sdk installed: https://www.microsoft.com/net/download/windows

You can use the Angular CLI to run the following command:

cmd > dotnet new angular

Tuesday, October 30, 2012

iPhone 5 Launching in India on 2nd Nov

One of the most awaited iPhone 5 is launching in India on 2nd Nov 2012. It is an excellent filled full of features. The iphone comes in two variants - 16GB and 32 GB. It has got a very good front camera for video calling. It has also got the 8.0 megapixels camera.

Features of iPhone 5 :
  • Network band: 2G (GSM 850, 900, 1800, 1900 MHz), CDMA 850, 1900 MHz (Sprint)
  • 3G( CDMA EVDO rev.A (Sprint)) HSPA/UMTS 850, 900, 1900, 2100 MHz
  • Design Type: Candy bar
  • CPU: Apple A4 1GHz Processor
  • Operating System: Apple iOS 5
  • Display Screen Size: mysterious
  • Input/ User Interface: Retina Display
  • Multi Touch
  • 3-axis Gyroscope
  • Light-Sensor (Ambient)
  • Fingerprint/Scratch-resistant oleophobic surface
  • Accelerometer sensor for UI auto-rotate
  • Internal RAM: 512MB RAM
  • Internal Memory: 16GB / 32GB built-in
  • Browser: HTML, Safari Browser
  • Messaging: MMS, SMS, Push Mail, Email
  • Camera Size: 8.0 Megapixels
  • Camera Resolution: 3264×2448 pixels
  • Digital Zoom, Auto focus
  • Secondary Camera
  • Video Calling
  • LED Flash
  • Geo tagging
  • Video Recording
  • Internet Connectivity: WLAN Wi-Fi 802.11 b/g/n, Wi-Fi 2.4 GHz, 3G
  • Data Transfer Connectivity: Bluetooth v2.1 with EDR Stereo & USB v2.0
  • GPS A-GPS
  • 3.5mm stereo headset jack
  • Tethering
  • No FM Radio
  • Digital Compass
  • Video Editing with iMovie
  • Skype Mobile Video Calling
  • Scratch-resistant glass back panel
  • Additional Microphone for Noise Cancellation
  • Audio Formats Support: MPEG4, Motion JPG, MOV, H.264
  • Video Format Support: MP3, WAV, M4A, AAC, eAAC, Apple Lossless, AIFF, Audible
  • Colors choice: Black & White
  • Battery Model: Li-Ion Standard Battery

Monday, October 29, 2012

Boxing and Unboxing in C#

Boxing is the process of converting value type to the object type or to any interface type implemented by this value type. Whenever there is boxing the values are in the System.Object and the value is stored on the heap.

int i = 123;
object o = i; //boxing
 
Unboxing is the process where the value type is extracted from object.
 
o = 123;
i = (int)o; //unboxing

 
  

Saturday, October 27, 2012

How to provide read only permissions to a user in SQL Server

There are many times when you want to add a user who has only the read only permissions in your SQL server database. Here is a script which you can use to provide the read only permission to a particular user in the SQL Server database.


 
  
 
EXEC sp_addrolemember N'db_datareader', N'userName'
 
db_datareader is the permission which gives only the read only permission
to a particular user
 
username is the name of the user you want to provide the permission. 
 
For Example :
EXEC sp_addrolemember N'db_datareader', N'Prashant'
 
 
For any confusion please comment below.

Thursday, October 25, 2012

Instance and Static Methods

The Static methods are the methods that have no instances. They are faster than the instance methods because they are called with the type name rather than the instance identifier. Static methods can be public or private. They can not use this instance expression.

This is a example to show the use of Static and Instance Methods

using System;
class Program
{
    static void StaticMethodA()
    {
        Console.WriteLine("Static method");
    }
    void InstanceMethodB()
    {
        Console.WriteLine("Instance method");
    }
    static char StaticMethodC()
    {
        Console.WriteLine("Static method");
        return 'C';
    }
    char InstanceMethodD()
    {
        Console.WriteLine("Instance method");
        return 'D';
    }
    static void Main()
    {
        // Call the two static methods on the Program type.
        Program.StaticMethodA();
        Console.WriteLine(Program.StaticMethodC());
        // Create a new Program instance and call the two instance methods.
        Program programInstance = new Program();
        programInstance.InstanceMethodB();
        Console.WriteLine(programInstance.InstanceMethodD());
        Console.ReadLine();
    }
}

Output :

Static method
Static method
C
Instance method
Instance method
D

Wednesday, October 24, 2012

Facebook Like Box for Blogspot Blogger

Facebook is one of the most popular social networking website. You can get visitors to your website from Facebook by letting them to like your page on Facebook.

Here are the steps that you can use to add Facebook Like Box to your blogger blog.

Step 1 : Login to your Blogger blog and go to layout of your blog.

Step 2 : Add a HTML/Javascript Gadget.

Step 3 : Add this code there.

<iframe src="//www.facebook.com/plugins/likebox.php?href=http://www.facebook.com/DevBoxesATechnologyBlog&amp;width=292&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&amp;header=false&amp;" style="border:none; overflow:hidden; width:275px; height:258px;" ></iframe>

Step 4: Replace this Facebook page Url with your page Url

Step 5: Change the Height and Width  to fit your website.

For any queries please comment below.

Creating your first project in Visual Studio 2010

Creating a project in Visual Studio 2010. These are the steps that are required to create a project in Visual Studio 2010.

Step 1: Open the Visual Studio by going to Start > All Programs > Microsoft Visual Studio 2010 > Microsoft Visual Studio 2010.


Step 2 : Go to File > New > Project > Windows Form Application



Note :

Name : It is the name of the project that you want to give to your project.
Location : It is the location on the hard- disk where you are going to save the project
Solution name : It is the name of the project by default. You can change it if you want.

Step 3 : Select Ok to create your new project.


   
Now your project is created and you are ready to start developing your windows form application.

For any queries please comment below.