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 activenotes = nil!128; //make Array of 128 slots, initially with nil objects in to represent nothing | |
var releasefunction = {|index| | |
//release existing note if present already | |
if(activenotes[index].notNil) { | |
activenotes[index].release; //will send gate=0 | |
activenotes[index] = nil; //make sure now empty slot ready | |
} | |
}; |
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
<body ng-controller="myCtl"> | |
<input type="button" ng-click="showConfirm()" value="Show" /> | |
<div my-confirm visible="confirmVisible" confirm-content="{{confirmMessage}}" confirm-title="Confirm Dialog Demo" confirm-positive="doThing()"></div> | |
</body> |
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
.controller('myCtl', function ($scope) { | |
$scope.showConfirm = function() { | |
$scope.confirmMessage = 'Are you sure you want to?'; | |
$scope.confirmVisible = true; | |
}; | |
$scope.doThing = function() { | |
console.log('do something that requires confirmation'); | |
}; | |
}) |
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('myConfirm', function () { | |
function link($scope) { | |
$scope.visible = false; | |
$scope.posClick = function() { | |
$scope.visible = false; | |
$scope.confirmPositive(); | |
}; | |
} | |
return { | |
template: '<div class="mydialog-bg" ng-show="visible"><div class="mydialog-pop"><div class="mydialog-title">{{confirmTitle}}</div><div>{{confirmContent}}</div><input type="button" ng-click="posClick()" value="OK" /><input type="button" ng-click="visible=false" value="Cancel" /></div></div>', |
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="myApp"> | |
<head> | |
<style> | |
body { | |
font-family: arial; | |
} | |
.mydialog-bg { | |
background-color: rgba(100, 100, 100, 0.8); | |
width: 100%; |
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
.controller('myCtl', function ($scope) { | |
$scope.showAlert = function() { | |
$scope.alertMessage = 'This is my alert message!'; | |
$scope.alertVisible = true; | |
} | |
}) |
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
<body ng-controller="myCtl"> | |
<input type="button" ng-click="showAlert()" value="Show" /> | |
<div my-alert visible="alertVisible" alert-content="{{alertMessage}}" alert-title="Alert Dialog Demo"></div> | |
</body> |
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('myAlert', function () { | |
return { | |
template: '<div class="mydialog-bg" ng-show="visible"><div class="mydialog-pop"><div class="mydialog-title">{{alertTitle}}</div><div>{{alertContent}}</div><input type="button" ng-click="visible=false" value="OK" /></div></div>', | |
link: function(scope) { scope.visible = false;}, | |
scope: { | |
alertTitle: '@', | |
alertContent: '@', | |
visible: '=' | |
} | |
}; |
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
namespace MyNameSpace | |
{ | |
public class MyServices : WebService, IMyContract | |
{ | |
public void UpdateItem(BaseRequest req, string itemID) | |
{ | |
if (req is DerivedClass) | |
{ | |
// do something with derrived class | |
} |
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
namespace MyNameSpace | |
{ | |
[DataContract] | |
[KnownType(typeof(DerivedClass))] | |
public class BaseRequest | |
{ | |
[DataMember] | |
public int ID; | |
} |
NewerOlder