Skip to content

Instantly share code, notes, and snippets.

View stevenh77's full-sized avatar

Steven Hollidge stevenh77

View GitHub Profile
sqldatacompare
/Project:"C:\FolderName\FileName.sdc"
/Out:"C:\FolderName\Output.txt"
/Export:"C:\FolderName" /force
select * from Source_Table;
select * from
( select
person,
country,
'country' + cast(rank()
over (partition by person order by id)
as varchar(10))
as countryrank
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
//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 });
<!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;
}
<!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', []);
<!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', []);
// 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) {