Skip to content

Instantly share code, notes, and snippets.

View hammerdr's full-sized avatar

Derek Hammer hammerdr

View GitHub Profile
private int deleteInternal(Uri url, String userWhere, String[] whereArgs) {
String tableToChange;
// In some cases a given url requires that we delete rows from more than one
// table. The motivating example is deleting messages from both the on disk
// and in memory messages tables.
String tableToChange2 = null;
String idColumnName = null;
String changedItemId = null;
String provider = null;
An error occured while building:
Syntax error in UITestScriptParser.j on preprocessed line number 15
for(var i = 0; i < objj_msgSend(data, "count"); i++)
{
if(objj_msgSend(data, "objectAtIndex:", i).match("^#") || objj_msgSend(data, "objectAtIndex:", i).match(/^\
|| objj_msgSend(data, "objectAtIndex:", i).match(/^Comment/) || objj_msgSend(data, "objectAtIndex:", i).match(/^\s*$/))
{
- (void)assert:(id)target registered:(CPString)aNotification
{
var names = [[CPNotificationCenter defaultCenter]._namedRegistries keyEnumerator];
while (name = [names nextObject])
{
if([name isEqualToString:aNotification])
{
var registry = [[CPNotificationCenter defaultCenter]._namedRegistries objectForKey:name];
var objects = [registry._objectObservers keyEnumerator];
@implementation TestClass : CPObject
{
CPNotificationCenter notification @accessors;
}
- (void)init
{
var test = function() { return "Bob"; };
return [super init];
}
#!/usr/bin/env objj
print(window.location);
if (system.engine === "rhino")
{
exports.window = window = require("browser/window");
window.__parent__ = null;
window.__proto__ = global;
}
else
{
window.setTimeout = require("browser/timeout").setTimeout;
window.setInterval = require("browser/timeout").setInterval;
/*
* AppController.j
* ScrollViewBug
*
* Created by You on February 8, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
git clone git://github.com/280north/OJTest.git
sudo rm -r /usr/local/narwhal/packages/ojunit
sudo unlink /usr/local/narwhal/bin/ojtest
sudo cp -r OJTest /usr/local/narwhal/packages
sudo mv /usr/local/narwhal/packages/OJTest /usr/local/narwhal/packages/ojtest
cd /usr/local/narwhal/bin
sudo ln -s /usr/local/narwhal/packages/ojtest/bin/ojtest ojtest
/*
* AppController.j
* test
*
* Created by You on February 25, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
var oldGraphicsContext = CPGraphicsContext;
try {
CPGraphicsContext = moq();
[CPGraphicsContext selector:@selector(currentContext) returns:moq()];
// your test here
} finally {
CPGraphicsContext = oldGraphicsContext;