Skip to content

Instantly share code, notes, and snippets.

CGRect returnFrameWithNewSize(CGRect originalRect, CGFloat newSize) { return (CGRect){ .origin = originalRect.origin, .size = { .width = newSize, .height = newSize }}; }
<html>
<head>
<title>Test of border radius</title>
<style>
div.testsoliddiv {
display: table-cell;
vertical-align: middle;
background-color: #EEEEEE;
color: #000000;
border: 5px solid #000000;
<html>
<head>
<title>Test of border radius</title>
<style>
div.testsoliddiv {
display: table-cell;
vertical-align: middle;
background-color: #EEEEEE;
color: #000000;
border: 10px solid #000000;
- (NSString *)description {
[self buildHeap];
CFBinaryHeapRef tempHeap = CFBinaryHeapCreateCopy(NULL, 0, self.objs);
// This is technically not working now, there is a bug in CFBinaryHeap, the description is incorrect
// on Snow Leopard.
// FIXME: rdar://problem/7219189
//return [NSString stringWithFormat:@"JBBPriorityQueue = %@", [NSMakeCollectable(CFCopyDescription(tempHeap)) autorelease]];
Running tests...
Running test_1
this is a test
this is another test
an error occured: Error Domain=NSCocoaErrorDomain Code=260 UserInfo=0x1001032f0 "The file “completely_fake_file.txt” couldn’t be opened because there is no such file." Underlying Error=(Error Domain=NSPOSIXErrorDomain Code=2 "The operation couldn’t be completed. No such file or directory")
Running test_2
<p>Samples of new usage for <a href="http://github.com/jordanbreeding/JBBAdditions">continuations in JBBAdditions</a>.</p>
<p>The relevant source files are:</p>
<ul>
<li><a href="http://github.com/jordanbreeding/JBBAdditions/blob/master/JBBTypes.h">JBBTypes.h</a></li>
<li><a href="http://github.com/jordanbreeding/JBBAdditions/blob/master/JBB_C_Functions.h">JBB_C_Functions.h</a></li>
<li><a href="http://github.com/jordanbreeding/JBBAdditions/blob/master/JBB_C_Functions.h">JBB_C_Functions.m</a></li>
<li><a href="http://github.com/jordanbreeding/JBBAdditions/blob/master/Classes/JBBObjectProxy.h">Classes/JBBObjectProxy.h</a></li>
<li><a href="http://github.com/jordanbreeding/JBBAdditions/blob/master/Classes/JBBObjectProxy.h">Classes/JBBObjectProxy.h</a></li>

Samples of new usage for [continuations in JBBContinuations][].

The relevant source files are:

  • [JBBTypes.h][]
  • [JBB_C_Functions.h][JBB_C_Functions.h]
  • [JBB_C_Functions.m][JBB_C_Functions.m]
  • [Classes/JBBObjectProxy.h][]
  • [Classes/JBBObjectProxy.m][]
  • [Classes/Extensions/NSInvocation+JBBContinuations.h][]
// clang -ggdb -arch x86_64 -Wl,-rpath,/Users/jordan/Build/JBBAdditions/Release -F/Users/jordan/Build/JBBAdditions/Release -o test test.m -framework JBBAdditions -framework Cocoa
// clang -arch i386 -arch x86_64 -Wl,-rpath,/Users/jordan/Build/JBBAdditions/Release -F/Users/jordan/Build/JBBAdditions/Release -o test test.m -framework JBBAdditions -framework Cocoa
#import <stdlib.h>
#import <stdio.h>
#import <Cocoa/Cocoa.h>
#import <JBBAdditions/JBBAdditions.h>
#include <stdlib.h>
#include <stdio.h>
typedef struct {
int structInt;
char *structString;
} myStructType;
void changeStruct(myStructType *aStructPointer) {
myStructType *aNewStructPointer = (myStructType *)malloc(sizeof(myStructType));
// clang -ggdb -arch x86_64 -Wl,-rpath,/Users/jordan/Build/JBBAdditions/Release -F/Users/jordan/Build/JBBAdditions/Release -o test test.m -framework JBBAdditions -framework Cocoa
// clang -arch i386 -arch x86_64 -Wl,-rpath,/Users/jordan/Build/JBBAdditions/Release -F/Users/jordan/Build/JBBAdditions/Release -o test test.m -framework JBBAdditions -framework Cocoa
#import <stdlib.h>
#import <stdio.h>
#import <Cocoa/Cocoa.h>
#import <JBBAdditions/JBBAdditions.h>