Skip to content

Instantly share code, notes, and snippets.

View Nub's full-sized avatar
🕶️

Zach Thayer Nub

🕶️
View GitHub Profile
class TimerCallback
{
public:
virtual ~TimerCallback() {}
virtual void callback() = 0;
};
class Timer
{
private:
- (void)drawRect:(NSRect)dirtyRect
{
NSBezierPath *path = [self _popoverBezierPathWithRect:[self bounds]];
CGContextRef ref = [[NSGraphicsContext currentContext] graphicsPort];
//Fix blurred edges by offsetting by half a pixel
CGContextTranslateCTM(ref, 0.5, 0.5);
[self.color set];
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.25];
[[NSAnimationContext currentContext] setTimingFunction:kCAMediaTimingFunctionEaseOut];
[[[popoverWindow contentView] animator] setAlphaValue:1.0];
[[popoverWindow animator] setAlphaValue:1.0];
[[popoverWindow animator] setFrame:newFrame display:YES];
[NSAnimationContext endGrouping];
2011-09-08 20:46:35.780 NLPopover[18089:707] -[__NSCFConstantString _solveForInput:]: unrecognized selector sent to instance 0x7fff77d06d28
2011-09-08 20:46:35.781 NLPopover[18089:707] -[__NSCFConstantString _solveForInput:]: unrecognized selector sent to instance 0x7fff77d06d28
2011-09-08 20:46:35.783 NLPopover[18089:707] (
0 CoreFoundation 0x00007fff890c8986 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8bd6bd5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff891545ae -[NSObject doesNotRecognizeSelector:] + 190
3 CoreFoundation 0x00007fff890b5803 ___forwarding___ + 371
4 CoreFoundation 0x00007fff890b5618 _CF_forwarding_prep_0 + 232
5 QuartzCore 0x00007fff8c7a62b7 _ZL16mapAnimationTimeP11CAAnimationRdPi + 245
6 QuartzCore 0x00007fff8c7a5dcd -[CABasicAnimation applyForTime:presentationObject:modelObject:] + 110
Suits
(not to be confused with the T.V. show named suits, which just so happens to be pretty rad)
by Zachry Thayer
Over the years, there has been something so revolutionary, so extraordinary, so simple, that has changed lives. It goes unnoticed, but is the center of attention, it has the ability to sway minds, it is a game changer. As stated by the Poet Sandra M. Gilbert
"All night, when you lie naked in your bed, (dreaming of feathers), we bear the imprint of your shape, like the old hammock in your mother's back yard. No matter where you go we wait for you, we wait and wait."
What is this mystery item? Who better to tell us than Barney Stinson, suit enthusiast
“Lesson one: lose the goatee. It doesn't go with your suit. Lesson two: get a suit. Suits are cool”
Suits are an essential piece of todays male, and sometimes female professional attire, however suits were not always around. Nor are they all the same, varying materials and styles demand higher prices. However, the suit has become a pillar of aut
- (void)drawRect:(CGRect)rect
{
UIBezierPath *roundRect = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(10, 10, 100, 100) byRoundingCorners:UIRectCornerAllCorners cornerRadii:CGSizeMake(5, 5)];
[[UIColor blueColor] set];
[roundRect stroke];
[roundRect fill];
}
<?php
/*
myHtml by Zachry Buddy Thayer
Version 2.0
License: CC BY-SA (Crreative Commons Share Alike)
TODO 2.1:
*Parse tags in physical order (compared to in order by category)
*Embedded Loops
<?php
$HTTPbody = @file_get_contents('php://input');
$APIRequestObject = json_decode($HTTPbody);
$APIKey = $APIRequestObject['APIKey'];
?>
<?php
Class yahoo
{
function get_stock_quote($symbol)
{
$url = sprintf("http://finance.yahoo.com/d/quotes.csv?s=%s&f=sl1d1t1c1ohgv" ,$symbol);
$fp = fopen($url, "r");
if(!fp)
{
echo "error : cannot recieve stock quote information";
<?php
/*
ZTAPI by Zachry Buddy Thayer
Version 1.0
License: CC BY-SA (Crreative Commons Share Alike)
*/
class ZTAPI{