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
if([myTextBox isEditable]) | |
[myTextBox setStringValue:@"yes"]; | |
else | |
[myTextBox setStringValue:@"no"]; |
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 <Foundation/CPObject.j> | |
@import <AppKit/CPCib.j> | |
@implementation AppController : CPObject | |
{ | |
CPWindow _window; | |
IBOutlet id myTextBox; | |
IBOutlet id myWindow; |
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
var request = [CPURLRequest requestWithURL:"http://brs.allometry.com/users/login"]; | |
var requestJSON = {"Username":"sjabour","Password":"1234567"}; | |
[request setHTTPMethod:@"POST"]; | |
[request setHTTPBody:CPJSObjectCreateJSON(requestJSON)]; | |
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; | |
[request setValue:@"UTF-8" forHTTPHeaderField:@"charset"]; | |
var connection = [CPURLConnection connectionWithRequest:request delegate:self]; |
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
// ========================================================================== | |
// Project: Resumes - mainPage | |
// Copyright: ©2011 My Company, Inc. | |
// ========================================================================== | |
/*globals Resumes */ | |
// This page describes the main user interface for your application. | |
Resumes.mainPage = SC.Page.design({ | |
mainPane: SC.MainPane.design({ | |
childViews: 'splitView'.w(), |
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
<?php | |
/* | |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: | |
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu | |
:: | |
:: This class is a rewritten 'GifMerge.class.php' version. | |
:: | |
:: Modification: | |
:: - Simplified and easy code, |
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
<?php | |
require("gifencoder.class.php"); | |
header("Content-type: image/gif"); | |
$images = (array)null; | |
$frames = (array)null; | |
for($i = 0; $i < 120; $i++) { | |
$image = imagecreatetruecolor(515, 98); | |
ob_start(); |
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
require 'sinatra' | |
require 'mongo_mapper' | |
require 'uri' | |
set :haml, :format => :html5 | |
mongo_uri = URI.parse(ENV['MONGOHQ_URL']) | |
MongoMapper.connection = Mongo::Connection.from_uri(ENV['MONGOHQ_URL']) | |
MongoMapper.database = mongo_uri.path.gsub(/^\//, '') |
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
%table | |
%tbody | |
%tr | |
%td Victim Date | |
%td Victim Name | |
%td Victim IP | |
%td Actions | |
- victims.each do |victim| | |
%tr | |
%td=victim.created |