Git commands….

1) Clone repository-

git clone “xyz.git”

2) Add files-

git add “filename.ext” OR *.*

3) Commit files-

git commit -m “message”

4) Push to remote repository-

git push origin master

5) Delete files-

git rm “file-1.txt”    [It deletes from both local and repo]

git rm –cached “file-1.txt”  [It removes only form repo]

6) Delete folder-

git rm -rf “folder name”

7) Status-

git status

8) Pull from remote repository-

git pull –all

How to style numbering on list using CSS ?

As we know that it is very easy to display a list with sequence number in HTML using Ordered list i.e

<ol>
	<li>...</li>
<ol>

numberdlist

but it is quite difficult to apply style on these auto generated numbers as per your page style.

If you are also facing this issue then this article can help you. We can easily create the numbered list using :before pseudo element and list-sequence-counter. Below is the very simple sample code to achieve this –

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
<style>
			.counter-list{
				list-style: none;
				counter-reset: list-sequence-counter;
			}

			.counter-list li{
				margin : 5px;
			}

			.counter-list > li:before{
				content: counter( list-sequence-counter);
				counter-increment: list-sequence-counter;
				margin-right: 5px;
				background: green;
				color: white;
				font-weight: bold;
				padding: 0 6px;
				border-radius: 10px;
			}
</style>

	</head>

	<body>
<ul class="counter-list">
	<li>List Item</li>
	<li>List Item</li>
	<li>List Item</li>
	<li>List Item</li>
	<li>List Item</li>
</ul>
</body>
</html>

Reference-

Numbering In Style

Convert Milliseconds to DateTime.

 Console.WriteLine("Current DateTime : " + DateTime.Now);

DateTime baseDate = new DateTime(1970, 1, 1);
TimeSpan diff = DateTime.Now - baseDate;

Console.WriteLine("Current DateTime in MS : " + diff.TotalMilliseconds);

Console.Write("Milliseconds to DateTime :" + (new DateTime(1970, 1, 1)).AddMilliseconds(diff.TotalMilliseconds));

Starting an Angular 2 RC.5 project

Yakov Fain's Blog

This blog is updated on August 9, 2016

The current version of Angular is Release Candidate 5. It has been released an hour ago, and I’ve started learning again. The major breaking change is how the app is loaded. The RC.5 introduced the concept of modules and now the app is not loaded by invoking the bootstrap() method. You have wrap the root component of your app into a module, which is a class decorated with the @NgModule() annotation and declare your component (or several components, services, directives, providers, and pipes) inside this annotation.

If the Angular code is dynamically compiled in the browser (not to be confused with transpiling), this is called just-in-time compilation (JIT). If the code is precompiled, it’s called ahead-of-time (AoT) compilation. In this blog we’ll do the JIT compilation.

To start a new project managed by npm, create a new directory (e.g. angular-seed) and open…

View original post 1,022 more words

ERROR: Cannot determine the location of the VS Common Tools folder. VS ?

If you are getting the error “ERROR: Cannot determine the location of the VS Common Tools folder. VS” then it can be fixed by given below steps-

  1. Go to My Computer -> Right Click->Properties
  2. Advanced system settings
  3. Advanced tab-> Environment Variables
  4. System Variables -> Path-> double click on it
  5. Add “;c:\windows\system32;” this into variable value.
  6. You are done 🙂

 

Programming is Easy…

%d bloggers like this: