Create SQL database using Azure


In this article we will learn to create SQL database using Azure.

Prerequisite: for this, should have Microsoft Azure account. In case don’t have then go to Microsoft site for practice purpose they have given sandbox which can be utilized to create one.

  • Add resource and search SQL ->Click on Azure SQL -> click on Create.
  • Click on Create
  • Select SQL Database -> Click on Create
  • Select Create a resource > Databases > SQL database. Fill in the following information present in below screen shot. As I am creating database in microsoft sandbox so adding below details on it, which is mention by Microsoft. In case your creating your own database then make sure add unique name in server name and server admin login should be unique and remeber password.

Server name: sqlservernnnn (must be unique, replace nnnn with custom value)
Server admin login: sqluser
Password: Pa$$w0rd1234
Location: (US) East US

  • Click on OK button, which will create database
  • Click on configure database. As per your need select different packages then click on Apply button. As using Microsoft sandbox so leave this as default.
  • Click on Next button, select Public endpoint, in case you want to access this database via Azure service then click on Yes to Allow Azure service and resource to access this server. If you want to give access to particular Client IP then click on Yes and add client IP for this. this settings can be done afterwards via setup firewall.
  • Click on next button and go to security tab, select Not now,
  • Click on additional settings and update below setting add as sample
  • Click on review + create, after review you plan click on Create, in case changes in plan please make it.
  • It will kick start for create database, it will take approx. 5-10 min to create sample database and deploy it
  • Once database created you can go to resource and check it.
  • In case not able to access database then click on resource and go to setting then go to set server firewall and add you client IP to access database from your machine or you can use Azure AD for login into database.
  • In case you want run some queries on Azure SQL on cloud then you can follow below steps

Type and run query which you want to run to check database running or not.

I have taken refernce from Microsoft learning portal in case more details please check this link. https://docs.microsoft.com/en-us/learn/modules/azure-database-fundamentals/exercise-create-sql-database

Oracle SQL Developer Quick Guide – For Beginners


In this article I will show you how to getting start with SQL Developer, basic setup and some of its features.

Before we can start we need to understand some fact about SQL Developer:

  1. It is a free, integrated development environment that simplifies the development and management of Oracle Database in both traditional and Cloud environment.
  2. It offer complete end to end development of PL/SQL application.
  3. You can run script & queries, create reports, data modeling solution, manage database via console.
  4. After installation, open SQL developer on you machine.
  5. You can run query by pressing CRLT + Enter. Also check Oracle database structure.

You can download SQL Developer from below link

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

2014 in review


The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 20,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.

Click here to see the complete report.

D3 Data-Driven Documents


D3 is data driven documents which help you to bring data to life using HTML, SVG and CSS. for using d3 we need to download d3.js which is a JavaScript library for manipulating documents based on data. This Javascript library uses digital data to drive the creation and control of dynamic and interactive graphical forms which run in web browsers.

D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. It is a tool for data visualization in W3C-compliant computing, making use of the widely implemented Scalable Vector Graphics (SVG), JavaScript, HTML5, and Cascading Style Sheets (CSS3) standards. D3 is extremely fast, supporting large datasets and dynamic behaviors for interaction and animation.  The JavaScript D3.js library uses pre-built JavaScript functions to select elements, create SVG objects, style them, or add transitions, dynamic effects or tooltips to them. Large dataset can be bound to SVG using D3 functions to generate rich charts and diagram. In these data can be in various format i.e JSON, CSV or geoJSON and we can also use Javascript function.

D3.js API contains several hundred functions, and they can be grouped into following logical units:

  • Selections
  • Transitions
  • Arrays
  • Math
  • Color
  • Scales
  • SVG
  • Time
  • Layouts
  • Geography
  • Geometry
  • Behaviors

D3 employs a declarative approach, operating on arbitrary sets of nodes called selections. For example, you can rewrite the above loop as:


d3.selectAll("p").style("color", "white");

Want to learn more? click here.

 

Review : Visual Studio 2013 Cookbook


This article contain review of Visual Studio 2013 Cookbook which is written by Jeff Martin and Richard Banks. Jeff Martin is a long-time technology enthusiast and has been a contributing writer for InfoQ (www.infoq.com) for over two years, focusing on .NET and Microsoft-based platforms and Richard Banks has developed software for the last 20 years for a wide range of industries and development platforms. Over the years he has played many roles including that of a developer, team lead, project manager, and CIO/CTO. . You can check this book here.

This book is for a developer who excited about new features introduce in visual studio 2013, this book provides practical examples to help you use visual studio 2013 more effectively. In this book there are several topic which I think a developer must know about visual studio 2013. As a web developer specially I like some chapter -3 (Web Development – ASP.NET, HTML5, CSS, and JavaScript), chapter -4 (.NET Framework 4.5.1 Development) and chapter-5 (Debugging Your .NET Application). Book contain 9 chapter which describe VS 2013 in detail and you can able to create apps for window 8.1 . To know more about table contain you can visit here.

Here is a list of the positive things, I found about the book:

– Customize the editor’s new abilities to fit your development style
– Create apps for Windows 8.1
– Use Visual Studio to debug parallel and concurrent programs
– Integrate .NET Framework 4.5.1 effectively
– Learn about both the Express and premium editions of Visual Studio
– Maximize Visual Studio’s C++ tools to make development easier
– Put TypeScript to work in your web applications
– Protect and manage your source code with Team Foundation Server
– Learn about Visual Studio Online

In all I can say that there is something new for each developer and very easy to understandable language with detail exposure of VS 2013.

Pragmatic IT ebooks, Packt Publishing are celebrating their 2000th book


Packt Publishing celebrates their 2000th title with an exclusive offer – We’ve got IT covered!

Known for their extensive range of pragmatic IT ebooks, Packt Publishing are celebrating their 2000th book

title `Learning Dart’– they want their customers to celebrate too.

To mark this milestone Packt Publishing will launch a ‘Buy One Get One Free’ offer across all eBooks on March

18th – for a limited period only.

`Learning Dart’ was selected as a title and published by Packt earlier this year. As a project that aims to

revolutionise a language as crucial as JavaScript, Dart is a great example of an emerging technology which aims

to support the community and their requirement for constant improvement. The content itself explains how to

develop apps using Dart and HTML5 in a model-driven and fast-paced approach, enabling developers to build

more complex and high-performing web apps.

David Maclean, Managing Director explains `It’s not by chance that this book is our 2000th title. Our customers

and community drive demand and it is our job to ensure that whatever they’re working on, Packt provides

practical help and support.

At Packt we understand that sometimes our customers want to learn a new programming language pretty

much from scratch, with little knowledge of similar language concepts. Other times our customers know

a related language fairly well and therefore want a fast-paced primer that brings them up to a competent

professional level quickly.

That’s what makes Packt different: all our books are specifically commissioned by category experts, based on

intensive research of the technology and the key tasks.’

Since 2004, Packt Publishing has been providing practical IT-related information that enables everyone to learn

and develop their IT knowledge, from novice to expert.

Packt is one of the most prolific and fast-growing tech book publishers in the world. Originally focused on

open source software, Packt contributes back into the community paying a royalty on relevant books directly

to open source projects. These projects have received over $400,000 as part of Packt’s Open Source Royalty

Scheme to date.

Their books focus on practicality, recognising that readers are ultimately concerned with getting the job done.

Packt’s digitally-focused business model allows them to quickly publish up-to-date books in very specific areas

across a range of key categories – web development, game development, big data, application development,

and more. Their commitment to providing a comprehensive range of titles has seen Packt publish 1054% more

titles in 2013 than in 2006.

Erol Staveley, Publisher, says `Recent research shows that 88% of our customers are very satisfied with the

service knowing that we offer a wide breadth of titles in a timely manner, and owing to the quality of service

that they receive 94% of customers are willing to recommend Packt to friends and family. It’s great that we’ve

hit such a significant milestone, and we want to continue delivering this fantastic content to our customers.’

Here are some of the best titles across Packt’s main categories – but Buy One, Get One Free will apply across all

2000 titles:

• Web Development

• Big Data & Cloud

• Game Development

• App Development

HTML5 Introduction and implementation


In this article I will discuss about HTML5, HTML5 is latest standard for HTML. It was specially designed to deliver rich content without the need for additional plugins. The current version delivers everything from animation to graphics, music to movies, and can also be used to build complicated web applications. All major browsers (Chrome, Firefox, Internet Explorer, Safari, Opera) support the new HTML5 elements and APIs

there are Some rules for HTML5 were established:
– New features should be based on HTML, CSS, DOM, and JavaScript
– The need for external plugins (like Flash) should be reduced
– Error handling should be easier than in previous versions
– Scripting has to be replaced by more markup
– HTML5 should be device-independent
– The development process should be visible to the public

There are some new feature in HTML5 that are as follows:

– The <canvas> element for 2D drawing
– The <video> and <audio> elements for media playback
– Support for local storage
– New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
– New form controls, like calendar, date, time, email, url, search

Let see some of these feature in detail:

<canvas>: Defines graphic drawing using JavaScript. The <canvas> tag is only a container for graphics, you must use a script to actually draw the graphics.

<canvas id="myCanvas"></canvas>
<script>
var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);
</script>

<datalist>: One of new element in HTML5 is datalist .we can assign values in datalist and then can bind that datalist to a particular textbox for the autocomplete options . below is the example :-

<datalist id="ddlCities">
<option value="Ghaziabad"/>
<option value="Delhi"/>
<option value="Lucknow"/>
<option value="Kanpur"/>
</datalist>
<input type="text" id="textbox" list="ddlCities"/> or
<asp:TextBox ID="txt" runat="server" list="ddlCities"></asp:TextBox>

and result will be the –

List

<output> : Output element is needed when you need calculation from two inputs to be summarized in to a label. For instance you have two textboxes( see the below figure) and you want to add numbers from these textboxes and send them to a label.

Below goes the code of how to use output element with HTML 5.

<pre id="pre14" lang="html">
<form onsubmit="return false"  öninput="o.value = parseInt(a.value) + parseInt(b.value)">
<input name="a" type="number">+
<input name="b" type="number"> =
<output name="o" />
</form>
</pre>

New Media Elements:

Tag Description
<audio> Defines sound or music content
<video> Defines video or movie content
<source> Defines sources for <video> and <audio>
<track> Defines tracks for <video> and <audio>
Defines containers for external applications (like plug-ins)

New Form Elements:

Tag Description
<datalist> Defines pre-defined options for input controls
<keygen> Defines a key-pair generator field (for forms)
<output> Defines the result of a calculation

Now there are some interesting things in HTML5 which an asp.net and c# developer should know and how to use those thing in real time development. There are new input types in HTML5 which are as follow:

  • color : The color type is used for input fields that should contain a color. its support by some browser.
Select your favorite color: <input type="color" name="favcolor" />

color

  • date : The date type allows the user to select a date, its support by some browser.
Select your Birth date: <input type="date" name="bday"/>

date

  • datetime : The datetime type allows the user to select a date and time (with time zone).
  • datetime-local : The datetime-local type allows the user to select a date and time (no time zone).
<input type="datetime-local" name="bdaytime"/>

datetime

  • email : The email type is used for input fields that should contain an e-mail address.
<input type="email" name="email"/>

email

  • month : The month type allows the user to select a month and year.
  • number : The number type is used for input fields that should contain a numeric value.You can also set restrictions on what numbers are accepted:

Quantity (between 1 and 5): <input type="number" name="quantity" min="1" max="5" />

Number

  • range : Instead of using textbox and range validator for numeric range , we can use HTML5 input of type number with min and max attribute .
<input max="5" min="1" name="quantity" type="number" />

range

  • search : Want to make text box as search engine box.
<input type="search" name="googleengine"/>
  • tel : If you want to make text box to accept telephone numbers.
<input type="tel" name="mytel"/>
  • time : What to only take time input. The time type allows the user to select a time.
<input type="time" name="usr_time" />
  • url : The url type is used for input fields that should contain a URL address.The value of the url field is automatically validated when the form is submitted.
Add your homepage: <input type="url" name="homepage"/>
  • week : The week type allows the user to select a week and year.
<input type="week" name="week_year"/>

This commonly used HTML5 implementation, I have taken this content from some website, you can check them in reference:
http://www.w3schools.com/html/html5_intro.asp
http://www.codeproject.com/Tips/543391/HTML5-for-Asp-net-Csharp-Developer

NTILE in SQL


NTILE() is SQL function which is used for distributes the result set into specified number of ordered partitions. This is very useful while distributing the result set into multiple groups in case you need to distribute the results into multiple tables.

NTILE() is basically used for arranging the data in descending/Ascending order of any columns and then split it into number of groups. If the data cannot be split into equal groups, then the first few groups will have more rows than the latter groups. For each row in result set NTILE() will returns a group number to which the row is associated.


create table  #temp( StudentID char(2),  Marks  int)
insert #temp  values('S1',75 )
insert #temp  values('S2',83)
insert #temp  values('S3',91)
insert #temp  values('S4',83)
insert #temp  values('S5',93 )
select NTILE(2) over(order by Marks),*
from #temp
order by Marks

result will be:


1   S1  75
1   S2  83
1   S4  83
2   S3  91
2   S5  93

Here is the output, since you have an uneven number of rows, bucket 1 will have 1 row more. If you add one more row

insert #temp  values('S6',92 )

Now both buckets have 3 rows


1   S1  75
1   S2  83
1   S4  83
2   S3  91
2   S6  92
2   S5  93

If the number of rows in a partition is not divisible by integer_expression, this will cause groups of two sizes that differ by one member. Larger groups come before smaller groups in the order specified by the OVER clause. For example if the total number of rows is 53 and the number of groups is five, the first three groups will have 11 rows and the two remaining groups will have 10 rows each. If on the other hand the total number of rows is divisible by the number of groups, the rows will be evenly distributed among the groups. For example, if the total number of rows is 50, and there are five groups, each bucket will contain 10 rows.

For reference click here. In case of any queries let me know.

How to generate Tumblr API.


In this post I will tell you how to create Tumblr API key.  For that please follow these steps:-

1. Go to http://www.tumblr.com/docs/en/api/v2

2. Go to What You Need Section and click on “register an application” which will ask for your tumblr account detail.

3. Or you can directly open this  http://www.tumblr.com/oauth/apps then click on register application button.

Register

4. Fill form i.e. Application name, application website etc which you want to use then click on register button.

Form Fill

5. Now you are OAuth consumer Key generated.

6. If you want to see how you can use this API key in your application then click on “Explore API “. This will send you to console of API where you can see keys via click on show keys button.

Any question regarding above post please let me know, I will try to give you solution for that. Later I will tell you how to integrate this which you application.