This file contains hidden or 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
# Calling Convention | |
# ChangeReference.ps1 "log4net , Version=1.2.0.0 ......" "new dll path" , "log4net , <new dll infor>" | |
# Note : This needs script signing before executing. refer http://www.hanselman.com/blog/SigningPowerShellScripts.aspx | |
# OR can set the powershell execution policy to unrestricted (at your own risk ;)) > Set-ExecutionPolicy unrestricted | |
param([String]$ReferenceToRemove , [String]$NewAssemblyPath, [String]$NewAssemblyIncludeInfo) | |
$xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" | |
$projects = ls -r -i *.csproj |
This file contains hidden or 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
# Calling Convention | |
# ChangeReference.ps1 "log4net , Version=1.2.0.0 ......" "new dll path" , "log4net , <new dll infor>" | |
# Note : This needs script signing before executing. refer http://www.hanselman.com/blog/SigningPowerShellScripts.aspx | |
# OR can set the powershell execution policy to unrestricted (at your own risk ;)) > Set-ExecutionPolicy unrestricted | |
param([String]$ReferenceToRemove ) | |
$xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" | |
$projects = ls -r -i *.csproj |
This file contains hidden or 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
# Calling Convention | |
# FindReference.ps1 "log4net" | |
param([String]$ReferenceToFind ) | |
$xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" | |
$projects = ls -r -i *.csproj | |
foreach($projectPath in $projects) | |
{ | |
$proj = [string](Get-Content $projectPath) |
This file contains hidden or 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
Imports System | |
Imports EnvDTE | |
Imports EnvDTE80 | |
Imports EnvDTE90 | |
Imports EnvDTE90a | |
Imports EnvDTE100 | |
Imports System.Diagnostics | |
Public Module Module1 | |
' This subroutine attaches to calc.exe if it is running. |
This file contains hidden or 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
# This script combines all .sql files under a given directory in to a file name matched to | |
# the sub-directory name (Tables.sql for all .sql files under the /Tables directory). | |
# And then create a AllScripts.sql by merging everything together. | |
# This can be executed by setting the "> Set-ExecutionPolicy unrestricted" in the windows powershell | |
Remove-Item *.sql | |
Get-Content Database\*.sql | Add-Content 1_Database.sql | |
Get-Content Tables\*.sql | Add-Content 2_Tables.sql | |
Get-Content StoredProcedures\*.sql | Add-Content 3_StoredProcedures.sql |
This file contains hidden or 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
USE MASTER | |
GO | |
declare @restoreSql nvarchar(500); | |
declare @dbName nvarchar(50); | |
declare @dbBackupFile nvarchar(100); | |
set @dbName = 'test'; | |
set @dbBackupFile = 'test.bak'; |
This file contains hidden or 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
If i do this with code first, | |
var entityA = new EntityA(); | |
entityA.ItemCollection.Add(new Item()); | |
entityA.ItemCollection.Add(new Item()); | |
service.Save(entityA); | |
Everything works fine, until you go and check for the two records that should have been inserted |
This file contains hidden or 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
var data = getData(); | |
var stringBuilder = new StringBuilder(); | |
stringBuilder.AppendLine("Header"); | |
foreach (var item in data) | |
{ | |
stringBuilder.AppendLine(data.Stuff) | |
} | |
var response = new HttpResponseMessage(HttpStatusCode.OK); |
This file contains hidden or 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
Dropbox - 100 GB / 99 / year | |
Google drive 100 GB/ 180/ year | |
Skydrive 100GB/ 50 /year | |
https://skydrive.live.com/options/Upgrade | |
http://www.google.com/intx/en_au/enterprise/apps/business/products.html#product-drive-prices | |
https://www.dropbox.com/business/pricing |
This file contains hidden or 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
Ok, here is our scenario. Create a database on an existing server, and 'sometimes' the applications are not able to access the database using the 'default' credentials assigned to the server. Following script can be used to do that manually. | |
CREATE USER theuser without login with default_schema=[dbo] | |
EXEC sp_addrolemember N'db_owner', N'theuser' |
OlderNewer