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 brolly = new Image(); | |
brolly.src = "brolly.gif"; | |
canvas_context.shadowColor = "rgba( 0, 0, 0, 0.3 )"; | |
canvas_context.shadowOffsetX = 6; | |
canvas_context.shadowOffsetY = 6; | |
canvas_context.shadowBlur = 3; | |
canvas_context.drawImage( brolly, 25, 250 ); |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>title</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<!-- page content --> |
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
ng-class="{true:'selected', false:''}[$index==selectedIndex]" | |
ng-class="{selected: $index==selectedIndex}" | |
ng-class="{admin:'enabled', moderator:'disabled', '':'hidden'}[user.role]" |
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
@font-face { | |
font-family: 'EntypoRegular'; | |
src: url('font/entypo.eot'); | |
src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
url('font/entypo.woff') format('woff'), | |
url('font/entypo.ttf') format('truetype'), | |
url('font/entypo.svg#EntypoRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
package sandbox; | |
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE; | |
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE; | |
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY; | |
import java.io.IOException; | |
import java.nio.file.ClosedWatchServiceException; | |
import java.nio.file.FileSystem; |
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
package dynamic.proxy; | |
public class BirdFeather implements Feather { | |
@Override | |
public void color(String s) { | |
System.out.println("The color of the feather is : " + s); | |
} | |
} |
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
DetachedCriteria ownerCriteria = DetachedCriteria.forClass(Owner.class); | |
ownerCriteria.setProjection(Property.forName("id")); | |
ownerCriteria.add(Restrictions.eq("ownername", "bob")); | |
Criteria criteria = getSession().createCriteria(Pet.class); | |
criteria.add(Property.forName("ownerId").in(ownerCriteria)); |
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 strict'; | |
/* Directives */ | |
angular.module('myApp.directives', []). | |
directive('file', function(){ | |
return { | |
scope: { | |
file: '=data' | |
}, |
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 java.util.ArrayList; | |
import java.util.List; | |
public class MyTree<T> { | |
public class Node<T> { | |
private T data; | |
private Node<T> parent; | |
private List<Node<T>> children; |
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 java.util.Iterator; | |
import java.util.NoSuchElementException; | |
import java.lang.reflect.Array; | |
public class Permute implements Iterator { | |
private final int size; | |
private final Object [] elements; // copy of original 0 .. size-1 | |
private final Object ar; // array for output, 0 .. size-1 | |
private final int [] permutation; // perm of nums 1..size, perm[0]=0 |