http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/77cb4318-75f8-4310-a05f-3605b5768007.mspx?mfr=true
Tuesday, 30 June 2015
How to use SQL-SERVER profiler for database tuning
http://netwovenblogs.com/2014/04/15/how-to-use-sql-server-profiler-for-database-tuning/
in order to run trace against sql server you must be a member of sysadmin
Solution:
Provide ALTER TRACE permission for the particular user
USE master
GO
GRANT ALTER TRACE TO user1
GO
After your work you can REVOKE the access
USE master
GO
REVOKE ALTER TRACE FROM user1
GO
Another way to grant rights, login with sysadmin login then open SSMS
~~ Open Security then Logins
~~ Right click on the login name and click Properties
~~ Securables tab
~~ Click Search to Select the instance that required permissions
~~ Under Explicit tab
~~ Select the check box ALTER trace permission and Click OK.
Monday, 29 June 2015
Aras Innovator how to check attribute
Open Aras Web UI
Go to Administration--> System Events -->ItemTypes
Search for type of item: Ex: *part* or *doc* or *change*
You will get search result
Now double click it.
You will new window--> Under Properties
You can find all attributes, with name and data type and data source
Or you can go to DB, and check for below query..
select * from innovator.PART
It should give all Properties names....
Go to Administration--> System Events -->ItemTypes
Search for type of item: Ex: *part* or *doc* or *change*
You will get search result
Now double click it.
You will new window--> Under Properties
You can find all attributes, with name and data type and data source
Or you can go to DB, and check for below query..
select * from innovator.PART
It should give all Properties names....
Sunday, 28 June 2015
sharepoint remove site content from left navigation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Site settings->Tree view --> Uncheck Enable tree view | |
and add below code in Html and upload to Sharepoint. | |
<style> | |
.ms-core-navigation { DISPLAY: none } | |
#contentBox { margin-left: 0px } | |
</style> | |
Now go to page where you want to hide quick launch bar. | |
Add content editor webpart | |
provide uploaded .html path. | |
save. | |
Friday, 26 June 2015
C# Task Parallel Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class WebForm1 : System.Web.UI.Page | |
{ | |
static string strOut = ""; | |
static string strOut1 = ""; | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
Response.Write("Start with Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime StartTPL = System.DateTime.Now; | |
Parallel.For(0, 100000, x => PrintAllTPL()); | |
Response.Write("End with Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime EndTPL = System.DateTime.Now; | |
Response.Write("Start with out Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime StartNoTPL = System.DateTime.Now; | |
PrintAll(); | |
Response.Write("End with out Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime EndNoTPL = System.DateTime.Now; | |
Response.Write("Time with Task Parallel Library: " + EndTPL.Subtract(StartTPL) + "<br />"); | |
Response.Write("Time without Task Parallel Library: " + EndNoTPL.Subtract(StartNoTPL) + "<br />"); | |
} | |
private static void PrintAll() | |
{ | |
for (int i = 0; i < 100000; i++) | |
{ | |
strOut = strOut + "a" + "\n"; | |
} | |
} | |
private static void PrintAllTPL() | |
{ | |
strOut1 = strOut1 + "a" + "\n"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class XMLread : System.Web.UI.Page | |
{ | |
public static string[] stringList = { "dog", "cat", "bird" }; | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
Response.Write("Start with Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime StartTPL = System.DateTime.Now; | |
Parallel.For(0, 100000, x => PrintAllTPL()); | |
Response.Write("End with Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime EndTPL = System.DateTime.Now; | |
Response.Write("Start with out Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime StartNoTPL = System.DateTime.Now; | |
PrintAll(); | |
Response.Write("End with out Task Parallel Library" + System.DateTime.Now.ToString() + "<br />"); | |
DateTime EndNoTPL = System.DateTime.Now; | |
Response.Write("Task Parallel Library: " + EndTPL.Subtract(StartTPL) + "<br />"); | |
Response.Write("No Task Parallel Library: " + EndNoTPL.Subtract(StartNoTPL) + "<br />"); | |
} | |
private static void PrintAll() | |
{ | |
foreach (string s in stringList) | |
{ | |
var result = s; | |
Console.WriteLine("Initial string: {0}, Result : {1} ", s, result); | |
} | |
} | |
private static void PrintAllTPL() | |
{ | |
Parallel.ForEach(stringList, s => | |
{ | |
var result = s; | |
Console.WriteLine("Initial string {0}, Result : {1} ", s, result); | |
}); | |
} | |
} |
How to change the branch in git
Open Visual Studio
Connect to team projects
Provide TFS Details and connect.
Under "Connect to team projects" you will see Local Git Repositories
You will see "Clone"
Click Clone
Now enter TFS Code path and local path to get the files from TFS
Click Clone
Now you will get all files to local
Now Under "Connect to team projects" you will see Local Git Repositories
You will see some name with tree structure icon.
Double click that, it will give all solutions under TFS.
Now click on Home icon
Click on Branches
You will see Actions
Expand Actions -->Click on Open Command Prompt
You will see one command prompt
Type below command to set one existing branch
git checkout MyBranch
Now click on Home icon
Click on "Unsynced Commits"
Click Sync
You will get all files from "MyBranch"
Thursday, 25 June 2015
How do I rename a task in Task Scheduled on Windows Server 2008 R2
Ans: Don't worry you can rename it...
First you can check your tasks under this path
\%SystemRoot%\Tasks
Ex: C:\Windows\System32\Tasks
Or
Open Task Scheduler from control panel
Expand Task Scheduler
Click on Task Scheduler Library
You will see your task
If you want to rename the Task Name, you can't do for existing, you need to import existing task, while importing it will ask name, at that time you can change the name.
Go to this path:C:\Windows\System32\Tasks
You will find your task.
Now go to Task Scheduler Library
In the main canvas, (Middle pane) you will see your old task..
Now in the same canvas right click
Select "Import task.."
Browse this path: C:\Windows\System32\Tasks (Change to All files (*.*))
Now select your old task.
Ok
You will Create Task Window, with Name as old name, now change the name.
Ok
Now you will see same task with different name.
Go to this path:C:\Windows\System32\Tasks delete old task.
If you want to change any other properties...
Select yor task , in the right side you can see Properties (Or Right click the task-->Properties)
Click on Properties
You will get new window
If you want to change the user account, click on "Change User or Group..."
Now you can enter new user account.
If you want to change the exe path.
Clcik on Actions in the same window (Which opened when you click on Properties)
Select Action
Click Edit
Now you can change the exe path
First you can check your tasks under this path
\%SystemRoot%\Tasks
Ex: C:\Windows\System32\Tasks
Or
Open Task Scheduler from control panel
Expand Task Scheduler
Click on Task Scheduler Library
You will see your task
If you want to rename the Task Name, you can't do for existing, you need to import existing task, while importing it will ask name, at that time you can change the name.
Go to this path:C:\Windows\System32\Tasks
You will find your task.
Now go to Task Scheduler Library
In the main canvas, (Middle pane) you will see your old task..
Now in the same canvas right click
Select "Import task.."
Browse this path: C:\Windows\System32\Tasks (Change to All files (*.*))
Now select your old task.
Ok
You will Create Task Window, with Name as old name, now change the name.
Ok
Now you will see same task with different name.
Go to this path:C:\Windows\System32\Tasks delete old task.
If you want to change any other properties...
Select yor task , in the right side you can see Properties (Or Right click the task-->Properties)
Click on Properties
You will get new window
If you want to change the user account, click on "Change User or Group..."
Now you can enter new user account.
If you want to change the exe path.
Clcik on Actions in the same window (Which opened when you click on Properties)
Select Action
Click Edit
Now you can change the exe path
Monday, 22 June 2015
XmlDocument vs XElement Performance
http://blogs.msdn.com/b/codejunkie/archive/2013/12/09/8992094.aspx
Subscribe to:
Posts (Atom)