Wednesday, October 8, 2014

HTML5: Mark Element














The <mark> element is used to highlight a text by assigning a background-color attribute

Example:


This is an example of the <mark style="background-color:yellow;">mark</mark> element

This is an example of the mark element

HTML5: Mark Element

The <mark> element is used to highlight a text by assigning a background-color attribute

Example:


This is an example of the <mark style="background-color:yellow;">mark</mark> element

This is an example of the mark element

Tuesday, October 7, 2014

HTML5 : Progress Element











<progress> element represents the progress of a task or goals and objectives, there are two ways that you can set this element, they are the following

  • Determinate - know in advance the starting and ending values
  • Indeterminate - end value is unknown in advance (remove value attribute)
Determinate Example:
<p>Our goal is to have 500 runners: </p>
0
<progress value=”250” max=”500”></progress>
500

Our goal is to have 500 runners:

0 500


Indeterminate Example:

<p>Please wait while we download your TPS Report!</p>
<progress></progress>

Please wait while we download your TPS Report!

HTML5 : Progress Element

<progress> element represents the progress of a task or goals and objectives, there are two ways that you can set this element, they are the following

  • Determinate - know in advance the starting and ending values
  • Indeterminate - end value is unknown in advance (remove value attribute)
Determinate Example:
<p>Our goal is to have 500 runners: </p>
0
<progress value=”250” max=”500”></progress>
500

Our goal is to have 500 runners:

0 500


Indeterminate Example:

<p>Please wait while we download your TPS Report!</p>
<progress></progress>

Please wait while we download your TPS Report!

Wednesday, August 13, 2014

Installing AdventureWorks Sample Databases from Microsoft

1. Type in the following URL into your browser's address bar

     http://msftdbprodsamples.codeplex.com/

2.  Click on the "Download" button on page

AdventureWorks download button


3.  Click on the recommended download link

Adventure Works 2014 Sample Databases

4.  Unizp the file you just downloaded

5.  Open the SQL Server Management Studio, then right click on "Databases" and then select "Restore Database"
SQL Server Manager Studio


6.  Select "Device" under "Source"

SQL Server Device

7.  Click on the "..." button, and the "Select" backup devices will appear, select "File" for "Backup media type"

Select backup devices


8.  Click on the "Add" button, and select the "AdventureWorks2014.bak" file, then click "OK"

AdventureWorks2014.bak

8.  Click "OK" on the "Select backup devices" screen

Select backup devices

9.  Click "OK" on "Restore Database" window

Restore database

10.  A message will pop up that says you have successfully restored the AdventureWorks2014 database

Database 'AdventureWorks2014' restored successfully.

11.  The "AdventureWorks2014" database is now added to your SQL Server instance

AdventureWorks2014


Installing AdventureWorks Sample Databases from Microsoft

1. Type in the following URL into your browser's address bar
     http://msftdbprodsamples.codeplex.com/

2.  Click on the "Download" button on page
AdventureWorks download button


3.  Click on the recommended download link

Adventure Works 2014 Sample Databases

4.  Unizp the file you just downloaded

5.  Open the SQL Server Management Studio, then right click on "Databases" and then select "Restore Database"
SQL Server Manager Studio


6.  Select "Device" under "Source"

SQL Server Device

7.  Click on the "..." button, and the "Select" backup devices will appear, select "File" for "Backup media type"

Select backup devices


8.  Click on the "Add" button, and select the "AdventureWorks2014.bak" file, then click "OK"

AdventureWorks2014.bak

8.  Click "OK" on the "Select backup devices" screen

Select backup devices

9.  Click "OK" on "Restore Database" window

Restore database

10.  A message will pop up that says you have successfully restored the AdventureWorks2014 database

Database 'AdventureWorks2014' restored successfully.

11.  The "AdventureWorks2014" database is now added to your SQL Server instance

AdventureWorks2014


Tuesday, August 12, 2014

Entity Framework Part 1: Installing Entity Framework 6.1.1 With NuGet

In this blog I will show how to install Entity Framework 6.1.1 with NuGet in Visual Studio 2013

1.  Create a project call "Northwind"



2.  Right click on the solution that the project resides in, then select "Manage NuGet Packages for Solution...."

3.  The "Manage NuGet Packages" window is displayed


4.  In left hand side select "Online", and then select "nuget.org"


5.  In the "Search Online" textbox type in the word "EntityFramework", this will search for the latest version of EntityFramework available

6.  Click on the "Install" button


7.  Select the project you want install EntityFramework to be installed in, then click on "OK"



8. Click "OK" to accept the terms and conditions


9.  When the Entity Framework is installed you will see a check mark next to package


10.  Now you will see the the project has references to the Entity Framework DLLs




Blogs in the Entity Framework Series:

  1. Installing Entity Framework 6.1.1 With NuGet
  2. Creating Entity Model From an Existing Database Entity Framework 6.1.1
  3. Using the Entity Framework Objects In ASP.NET Project
  4. Entity Framework (Database First) Part 4: Using the LINQ and Projection To SELECT Columns From Entities


Entity Framework Part 1: Installing Entity Framework 6.1.1 With NuGet

In this blog I will show how to install Entity Framework 6.1.1 with NuGet in Visual Studio 2013

1.  Create a project call "Northwind"



2.  Right click on the solution that the project resides in, then select "Manage NuGet Packages for Solution...."

3.  The "Manage NuGet Packages" window is displayed


4.  In left hand side select "Online", and then select "nuget.org"


5.  In the "Search Online" textbox type in the word "EntityFramework", this will search for the latest version of EntityFramework available

6.  Click on the "Install" button


7.  Select the project you want install EntityFramework to be installed in, then click on "OK"



8. Click "OK" to accept the terms and conditions


9.  When the Entity Framework is installed you will see a check mark next to package


10.  Now you will see the the project has references to the Entity Framework DLLs




Blogs in the Entity Framework Series:

  1. Installing Entity Framework 6.1.1 With NuGet
  2. Creating Entity Model From an Existing Database Entity Framework 6.1.1
  3. Using the Entity Framework Objects In ASP.NET Project
  4. Entity Framework (Database First) Part 4: Using the LINQ and Projection To SELECT Columns From Entities


Saturday, August 9, 2014

Real World Example: The Intranet Application

I am starting a new series in this blog that creates a real world example.  Most web application requires the same things over and over again, and in every organization I worked in there is an intranet application either home grown, or some flavor of a COTS product.  So you can't get anymore real world than that.  I will use the rapid development method, so some background information will not be discussed.  Feel free to do research at the concepts that you don't understand.

Tuesday, July 29, 2014

SqlDataSource Control Part 5: Write Custom SELECT Statement To Display Category, And Supplier Name

Instead of select the columns on your GridView using the GridView's "Edit Columns" wizard, you can use a custom SELECT statement that you write to display the appropriate columns.  In this blog we will write our own custom SELECT statement to display the category name, and supplier company on our GridView control.

To specify a custom SELECT statement perform the following steps:

1.  Click on the ">" icon on the SqlDataSource1 control, then click on the "Configure Data Source"
Configure Data Source
2.  Click the "Next" button until you reach the "Configure the Select Statement" screen, select the "Specify a custom SQL statement or stored procedure" radio button.  Then click the "Next" button

Configure the Select Statement

3. On the "Define Custom Statements or Stored Procedures" screen select the "SELECT" tab, and then type in the following SELECT statement to get the CategoryName field in the Categories table, and the CompanyName field in the Suppliers table.  Then click on the "Next" button.
     SELECT ProductName,
Categories.CategoryName AS Category,
Suppliers.CompanyName AS Supplier,
QuantityPerUnit,
UnitPrice,
UnitsInStock,
UnitsOnOrder,
ReorderLevel,
Discontinued
FROM Products,Categories,Suppliers
WHERE Products.CategoryID = Categories.CategoryID
AND Products.SupplierID = Suppliers.SupplierID


Define Custom Statements or Stored Procedures

4.  On the "Test Query" screen click on the "Test Query" button see the results that the query will bring back.  Notice that on columns Category, and Supplier the data from the CategoryName and CompanyName fields are displayed, respectively.  Click "Finish"

Test Query

5.  Now the GridView is populated with the columns specified in the custom SELECT statement

Populated GridView

Monday, July 28, 2014

SQL Server 2014 : Creating a Sysadmin Using a Windows 8.1 Account













The one of thing that Windows 8 forces you to do is to sign in with an e-mail account.  I am not here to debate if it's a good thing or a bad thing.  But I just wanted to say, Microsoft why do you make our lives so complicated.  I just wanted Windows 7 with a touchscreen.  I digress :(   Anyways, if you install SQL Server on Windows 8 there is a little quirk that you have to deal with.  When you search for an account to add to your dba user login, you have to search on the entire username including the stuff after the @ sign.  Once again, I digress :(

Anyways here is how you add a dba to SQL Server 2014 on a Windows 8 machine.

1.  Connect to your instance of SQL Server, then expand the "Logins" node


2. Right click on "Logins" node, and then select "New Login"


3. Click on the "Search" button


4. Type in the account you want to add in the "Enter the object name to select" text box.  That is my e-mail, feel free to e-mail me.  The only gripe I have with this whole process is that, before we were able to do a partial search.  For example I could have just typed in "tech.junkie.jh" and SQL Server would be smart enough to figure out I am close enough.  Now I have to type in the whole account.  It feels like Microsoft is moving backward.  Anyways click on "Check Names"




5.  On the left hand side you will see a navigation panel, that says "Select a page", you want to select "Server Roles".  Check everything, and the kitchen sink.
  

6. Click "OK" then you have yourself another sysadmin, or what we like to call a db god.  DB God:  I shall grant you INSERT if you bring me donuts and coffee in the morning.....evil laugh sold separately


SQL Server 2014 : Creating a Sysadmin Using a Windows 8.1 Account

The one of thing that Windows 8 forces you to do is to sign in with an e-mail account.  I am not here to debate if it's a good thing or a bad thing.  But I just wanted to say, Microsoft why do you make our lives so complicated.  I just wanted Windows 7 with a touchscreen.  I digress :(   Anyways, if you install SQL Server on Windows 8 there is a little quirk that you have to deal with.  When you search for an account to add to your dba user login, you have to search on the entire username including the stuff after the @ sign.  Once again, I digress :(

Anyways here is how you add a dba to SQL Server 2014 on a Windows 8 machine.

1.  Connect to your instance of SQL Server, then expand the "Logins" node


2. Right click on "Logins" node, and then select "New Login"


3. Click on the "Search" button


4. Type in the account you want to add in the "Enter the object name to select" text box.  That is my e-mail, feel free to e-mail me.  The only gripe I have with this whole process is that, before we were able to do a partial search.  For example I could have just typed in "tech.junkie.jh" and SQL Server would be smart enough to figure out I am close enough.  Now I have to type in the whole account.  It feels like Microsoft is moving backward.  Anyways click on "Check Names"




5.  On the left hand side you will see a navigation panel, that says "Select a page", you want to select "Server Roles".  Check everything, and the kitchen sink.
  

6. Click "OK" then you have yourself another sysadmin, or what we like to call a db god.  DB God:  I shall grant you INSERT if you bring me donuts and coffee in the morning.....evil laugh sold separately