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
import { | |
AfterViewInit, Component, ElementRef, OnDestroy, ViewChild | |
} from '@angular/core'; | |
@Component({ | |
selector: 'cool-gl', | |
template: ` | |
<canvas #lookupTag></canvas>` | |
}) | |
export class CoolGLComponent implements AfterViewInit, OnDestroy { |
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
@Component({ | |
moduleId: module.id, | |
selector: 'lol-card', | |
template: ` | |
<GridLayout [@container]="state$ | async" (tap)="toggle()"> | |
<AbsoluteLayout> | |
<Image [@image]="state$ | async"></Image> | |
<Gradient [@gradient]="state$ | async"></Gradient> | |
</AbsoluteLayout> | |
</GridLayout> |
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://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Using Typescript Classes with Angular Directives</title> | |
</head> | |
<body ng-app="yourApp"> | |
<custom-directive ng-click="ctrl.clear()">{{text}}</custom-directive> | |
</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
var app = angular.module('yourApp'); | |
app.directive("parentDirective", function(){ | |
return { | |
restrict: "A", | |
controller:function(){ | |
this.test = function(){ | |
console.log("parentController - okay"); | |
} | |
} | |
}; |
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
/* | |
border-serrated - a zig zag triangle border with linear gradient | |
original SASS version: https://gist.github.com/justinmc/9837998 | |
*/ | |
.border-top-serrated(@size, @colorOuter) { | |
& { | |
position: relative; | |
padding-top: @size; | |
} | |
&:before { |
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
/* | |
A simple socket.io client that will run server side and connect to the above server | |
repeatedly, for as long as you leave it running. | |
When the server runs with a low-latency Redis database, you will see nothing but | |
repeated "Connected" messages in the console. When the server connects to a Redis | |
data store that has even a modest amount of latency more than the client, you will | |
see some connections established properly, and others fail with the error: | |
ERROR: "client not handshaken" |
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
docco -t private_filter.jst private_filter.coffee |
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
public static function hslColorBlendMaterial(target:BitmapData,colorMask:BitmapData,color:uint,darkLuminance:Number=0.0):void | |
{ | |
Profiler.enter("BitmapFeatureRenderer.colorBlendMaterial"); | |
var hslColorMask:HSL = new HSL(); | |
var hslTarget:HSL = new HSL(); | |
if(colorMask != null && !colorMask.rect.equals(target.rect)) | |
throw new Error("only supports color blending same size textures"); | |
// Calculate a single HSL color for the mask. | |
HSL.convertRGBToHSL(color,hslColorMask); |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<VSProjectDescription Name="CSharp" TypeGuid="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" | |
xmlns="http://schemas.dujardinconsulting.com/bsls/2010/VSProjectDescriptionSchema.xsd"> | |
<ConditionlessProperties> | |
<ProductVersion>8.0.30703</ProductVersion> | |
<FileAlignment>512</FileAlignment> | |
</ConditionlessProperties> | |
<RootElements> |
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 SilverShorts | |
{ | |
/// <summary> | |
/// Implement a Microsoft Bing IImageQuery provider | |
/// </summary> | |
public class BingImageQuery : IImageQuery | |
{ | |
/// <summary> | |
/// Bing Image Query requires a valid ApiKey | |
/// See: http://www.bing.com/developer/ |