Posts

Showing posts from 2016
Image
Creating a custom user login form with .NET C# MVC 4 Razor Introduction  Majority of web projects needs handling users and therefore user login section.  In this article I'm writing about how quickly create user login, logout functionality and display that status. This article is not related to any specific database so you can use whatever you need, e.g. MSSQL, PostgreSQL, MySQL etc... In this case I'm showing example with MSSQL.  Steps to reach the goal  Step 1. Creating a project.  In those screenshots I'm creating MVC4 project, but this tutorial should work on MVC3 too. Then select that you are using Razor engine. Check create Tests if you are planning to use it later in your project. If not - leave it unchecked. Step 2. Creating a database Right click on App_Data -> Add -> New item... ->Data -> SQL Server Database -> OK. Now we need a users table. Right click on Tables and open New Query window. Now paste co...
Puzzle Game in c# Description This is a simple game written in C# in which user presses Up, Down, Left, Right arrow keys to play this game. The objective of this game is to arrange 1 to 15 numbers in ascending order where the numbers in grid are in random. User will have 10 minutes of time to complete this game. If user wins the game he gets displayed in how many moves he completed the game   Step By Step Step 1:  Generating random values & Creating Labels on the form.   public void createlabels()  { int i = 0; int val;   for (int j = 0; j < ROW_COUNT; j++)   for (int k = 0; k < COLUMN_COUNT; k++)   { val = gridVal[j, k]; label[i] = new Label();  label[i].Font = new Font("Microsoft Sans Serif", 15F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));   label[i].Width = 60; label[i].Height = 60; label[i].Left = k ...

Cappilary

The rise or fall Of a liquid in a capillary tube is related to the surface tension of a liquid whether a liquid rise in a capillary like water or depressed like mercury. It depends on the relative magnitude of cohesive and adhesive forces.These forces determine the contact angle which the liquid make with the walls Of the tube. If the contact angle is less than 90° it is said to wet surface and concave miniscus is Formed. If contact angle is Greater than 90° the liquid doesn't wet the surface and convex miniscus is formed. The formation of concave miniscus by a liquid that wet the glass leads to the capillary rise whereas the formation of convex miniscus leads to the depression in the liquid and shows Capillary Fall.