Please click Recipes
Appcmd https binding
Set https Binding through appcmd
Alter Database users
Set Database to single/multiple user
ALTER DATABASE Test
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE Test
MODIFY NAME = TestDemo
GO
ALTER DATABASE TestDemo
SET MULTI_USER
GO
Redirect multiple urls in javascript
Redirect multiple urls automatically.
Save the below code in the .html file and run it on the browser. The website will be refreshed automatically
<!DOCTYPE html>
<html>
<body>
<script>
//set the urls
var allURL = ["www.google.com","www.yahoo.com"];
var runtime=5,runtimeindex=0;
function showUrl(index) {
index = index || 0;
// are there any urls to show?
// is the given index valid?
if (index >= allURL.length) {
index = 0;
runtimeindex = runtimeindex + 1;
if (runtimeindex >= runtime)
return;
}
// open the url
var popup = window.open(allURL[index]);
// set a timer which closes the popup after 10 seconds and opens the next url by calling 'showUrl' with the next index
setTimeout(function() {
popup.close();
showUrl(index + 1);
}, 1000*60*1);
}
showUrl();
</script>
</body>
</html>
Merge multiple excel/csv files into single file using powershell
Combine multiple excel/csv files into single file
1. Put all your files under the folder c:\test\csvfiles
2. open the notepad and copy the below code and paste it , and name the file as mergefile.ps1 and store it on the c:\test drive
get-childItem "C:\test\csvfiles\*.csv" | foreach {
$filePath = $_
$lines = Get-Content $filePath
Add-Content ".\merged_report.csv" $lines
Add-Content ".\merged_report.csv" "`n"
}
3.Open the powershell and run the ps1 file.
4.the merged/single file output will be stored on the c:\test
Debug .NET application
Every beginner will be facing the issue for debugging the .net application to find the problem or issue on the website.
Steps are in below.
1. Browse the website
2. Open the code from visual studio and put the break point where you want to debug.
3.Click "debug" from the visual studio and attach to worker process
4. Tick the checkbox "Show Processes from from all users"
5. Select the processes and click Attach.
Subscribe to:
Posts (Atom)