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
find dir -exec cat {} \; | wc -l |
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
NSView *animatedView = ...; | |
CALayer *presentationLayer = (CALayer*)animatedView.layer.presentationLayer; | |
CGPoint currentPosition = presentationLayer.position; |
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
Graphics2D graphics2D = (Graphics2D)graphics; | |
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
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
NSView *myView = ...; | |
myView.wantsLayer = YES; // The thing you must not forget. | |
CGPoint newPosition = CGPointMake(100.0, 200.0); | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position"]; | |
animation.fromValue = [NSValue valueWithPoint:myView.frame.origin]; | |
animation.toValue = [NSValue valueWithPoint:newPosition]; | |
animation.duration = 1.0; |
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
<?php | |
use Symfony\Component\ClassLoader\UniversalClassLoader; | |
$loader = new UniversalClassLoader(); | |
$loader->registerNamespaces(array( | |
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'), | |
'Sensio' => __DIR__.'/../vendor/bundles', | |
'JMS' => __DIR__.'/../vendor/bundles', | |
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib', |
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 class MyFirstProgram { | |
public static void main(String args[]) { | |
for(int i = 1; i <= 100; i++) { | |
boolean mod3 = i % 3 == 0; | |
boolean mod5 = i % 5 == 0; | |
boolean lineBreak = (i - 9) % 10 == 0; | |
NewerOlder