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
sqldatacompare | |
/Project:"C:\FolderName\FileName.sdc" | |
/Out:"C:\FolderName\Output.txt" | |
/Export:"C:\FolderName" /force |
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
select * from Source_Table; | |
select * from | |
( select | |
person, | |
country, | |
'country' + cast(rank() | |
over (partition by person order by id) | |
as varchar(10)) | |
as countryrank |
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
select * from | |
( select | |
person, | |
country, | |
'country' + cast(rank() | |
over (partition by person order by id) | |
as varchar(10)) | |
as countryrank | |
from dbo.Source_Table) as rankedSource | |
pivot |
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
//define module | |
var app = angular.module('app', []); | |
//define constant | |
app.constant("mynumberValue", 200); | |
//define value | |
app.value("numberValue", 100); | |
app.value("objectValue", { name: "dotnet-tricks.com", totalUsers: 120000 }); |
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
<!doctype html> | |
<html ng-app="Demo"> | |
<head> | |
<title>Scope $watch() vs. $watchCollection() In AngularJS </title> | |
</head> | |
<style type="text/css"> | |
a[ ng-click ] { | |
cursor: pointer; | |
text-decoration: underline; | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0-rc.1/angular.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> | |
<script> | |
'use strict'; | |
var app = angular.module('app', []); |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0-rc.1/angular.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> | |
<script> | |
'use strict'; | |
var app = angular.module('app', []); |
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
.directive('hyperlink', function(){ | |
return { | |
transclude: true, | |
replace: true, | |
template: '<a ng-transclude></a>', | |
} | |
}) |
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
.directive('hyperlink', function(){ | |
return { | |
restrict: 'E', | |
transclude: true, | |
link: function (scope, element, attrs, ctrl, transclude) { | |
transclude(scope, function (clone) { | |
var anchorTag = angular.element("<a href='" + attrs.ngHref + "'></a>"); | |
anchorTag.append(clone); | |
element.append(anchorTag); | |
}); |
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
// publishing up the scope chain | |
$scope.$emit('eventWithString', 'message'); | |
// publishing down the scope chain | |
$scope.$broadcast('eventWithObject', { | |
text: 'message' | |
}); | |
// event subscription | |
$scope.$on('eventWithObject', function (event, data) { |