If a page doesn’t show correctly on an older browser version. Try disabling various components or web parts in the page to pinpoint where the problem is.
Author: Admin
Understanding and prevent cookie hijacking using HttpOnly flag
How to sort array of numbers in javascript
By default, Javascript sorts an array in a lexicographical way.
To sort numeric array, provide a comparison function. Use the code below:
myArray.sort(function(a,b) { return a – b; } );
Creating a SharePoint Application Page for Anonymous Access
Use Chrome extension “Postman” to debug post data
Backup and restore data from production in sql server
Best is to use Excel as the export, import format.
Sometimes you need to change the design of the table(remove primary key, disable read-only, etc), to make it work.
select db, choose Tasks->export data, choose excel.
to restore, choose Tasks -> import data,
select the file and make sure the mappings are correct.
Use web browsers’ developer tools to enable disabled checkbox to facilitate testing
Unblock ports on Google Chrome
http://douglastarr.com/how-to-allow-unsafe-ports-in-chrome/
chrome.exe –explicitly-allowed-ports=81,84,87
How to use EventLog in ASP.NET
First choose a log source name
Then write a console app that writes an entry using that source name, run the app as an administrator.
After that, you can use EventLog.WriteEntry(SOURCE_NAME, errorMessage,..) to write log messages.
Copy all regex matched items using powershell
$text = cat file.txt
$regex = [regex] ‘your regex’
$match = $regex.Match($text)
$result = “”
while($match.Success)
{
$result = $result + $match.Value + “`r`n”
$match = $match.NextMatch()
}
$result | Out-File result.txt
$regex = [regex] ‘your regex’
$match = $regex.Match($text)
$result = “”
while($match.Success)
{
$result = $result + $match.Value + “`r`n”
$match = $match.NextMatch()
}
$result | Out-File result.txt