This file contains 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
[paneLayer setImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/sample.jpg" | |
size:CGSizeMake(500, 430)]]; |
This file contains 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 <AppKit/CPPanel.j> | |
@import <AppKit/CPView.j> | |
@implementation PhotoPanel : CPPanel | |
{ | |
CPArray images; | |
} | |
- (id)init | |
{ |
This file contains 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
<target name="compile" description="Compile Clojure sources."> | |
<mkdir dir="${classes.dir}" /> | |
<!-- Seek out the namespaces to compile. Note that this will fail if the actual name of a package includes an underscore, as | |
all underscores are converted to dashes. --> | |
<pathconvert pathsep=" " property="compile.namespaces"> | |
<fileset dir="${src.dir}" includes="**/*.clj" /> | |
<chainedmapper> | |
<packagemapper from="${basedir}/${src.dir}/*.clj" to="*" /> | |
<filtermapper> |
This file contains 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
<target name="compile" description="Compile Clojure sources."> | |
<mkdir dir="${classes.dir}" /> | |
<!-- Seek out the namespaces to compile. Note that this will fail if the actual name of a package includes an underscore, as | |
all underscores are converted to dashes. --> | |
<pathconvert pathsep=" " property="compile.namespaces"> | |
<fileset dir="${src.dir}" includes="**/*.clj" /> | |
<chainedmapper> | |
<packagemapper from="${basedir}/${src.dir}/*.clj" to="*" /> | |
<filtermapper> |
This file contains 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
- (id)init | |
{ | |
self = [super init]; | |
_panel = [[CPPanel alloc] initWithContentRect:CGRectMake(20, 30, 245, 184) | |
styleMask:CPHUDBackgroundWindowMask | CPClosableWindowMask | CPResizableWindowMask]; | |
[_panel setTitle:@"Twitter"]; | |
[_panel setMinSize:CGSizeMake(245, 184)]; | |
This file contains 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 <AppKit/CPView.j> | |
@import <AppKit/CPTextField.j> | |
@implementation TwitView : CPView | |
{ | |
CPTextField _label; | |
} | |
- (id)initWithFrame:(CGRect)frame | |
{ |
This file contains 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
- (void)updateTimeline:(CPArray) timeline | |
{ | |
var width = CPRectGetWidth([_timelineView bounds]) - 4; | |
var count = [timeline count]; | |
for (row = 0; row < count; row++) | |
{ | |
var frame = CGRectMake(2, 64 * row + 2, width, 60); | |
var view = [[TwitView alloc] initWithFrame:frame forStatus:[timeline objectAtIndex:row]]; |
This file contains 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 void contributeValueEncoderSource( | |
MappedConfiguration<Class, ValueEncoderFactory> configuration, | |
final Session session) | |
{ | |
ValueEncoder<Posting> postingValueEncoder = new ValueEncoder<Posting>() | |
{ | |
@Override | |
public String toClient(Posting value) |
This file contains 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
// Regardless of the timeZone set on the DateFormat, the value is parsed in | |
// the current default TimeZone. Use the calendar to adjust it out. | |
Date inDefaultTimeZone = format.parse(value); | |
Calendar c = Calendar.getInstance(locale); | |
c.setTime(inDefaultTimeZone); | |
TimeZone clientZone = timeZoneTracker.getClientTimeZone(); | |
TimeZone defaultZone = TimeZone.getDefault(); |
This file contains 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
(defrecord Comment [text] | |
NodeStreaming | |
(stream [node strategy out] | |
(write out "<!--" text "-->"))) |
OlderNewer