Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Shows a list of portfolio enrtries (limited to 5)
*/
$items = get_posts( array_merge( jhp_default_query_vars() ), array( 'showposts' => 5 ) );
?>
@import <Foundation/CPObject.j>
@import <AppKit/CPOutlineView.j>
@import <AppKit/CPWindowController.j>
@import "AppController.j"
@implementation MenuController : CPObject {
CPMutableArray sites;
@outlet CPScrollView scrollView;
}
[self setBackgroundColor:
[CPColor colorWithPatternImage:
[[CPThreePartImage alloc] initWithImageSlices:
[
[[CPImage alloc] initWithContentsOfFile: @"Resources/sitesTableTitleColumnLeft.png"],
[[CPImage alloc] initWithContentsOfFile: @"Resources/sitesTableTitleColumnCenter.png"],
[[CPImage alloc] initWithContentsOfFile: @"Resources/sitesTableTitleColumnCenter.png"]
] isVertical:NO]]];
<?php
require("phpsqlgeocode_dbinfo.php");
define("MAPS_HOST", "maps.google.com");
define("KEY", "ABQIAAAA4GFJklKWWp3vEHU2co8TmxTYJcu___Q0FKqJZcQ5N8JdoNgE4RTRpog9-XCQBJjVXlg_3se_gzofrQ");
// Opens a connection to a MySQL server
$connection = mysql_connect("localhost", $username, $password);
if (!$connection) {
die("Not connected : " . mysql_error());
0.001960648539964403
0.028165940050057823
0.030706835987338955
0.03854017927432447
0.098997757713628
Failed to load resource: the server responded with a status of 404 (Not Found)
0.18616297567146434
0.2524021782210471
Refused to set unsafe header "Content-Length"
/*
* AppController.j
* CollectionDemo
*
* Created by You on September 13, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
joe-hoyles-macbook-pro:Cappuccino Joe$ jake install
(in /Users/Joe/Cappuccino)
(in /Users/Joe/Cappuccino)
(in /Users/Joe/Cappuccino/Objective-J)
Copying... CommonJS/objj-executable
Copying... CommonJS/package.json
Copying... CommonJS/bin/cplutil
Copying... CommonJS/bin/objj
Copying... CommonJS/bin/objjc
Building... /Users/Joe/Cappuccino/Projects/Debug/CommonJS/objective-j/lib/objective-j.js
joe-hoyles-macbook-pro:Cappuccino Joe$ sudo ./bootstrap.sh
================================================================================
Found an existing Narwhal/Cappuccino installation, /usr/local/narwhal. Remove it automatically now?
WARNING: the ENTIRE directory, /usr/local/narwhal, will be removed (i.e. 'rm -rf /usr/local/narwhal').
Be sure this is correct. Custom modifications and installed packages WILL BE DELETED.
Enter "yes" or "no":
yes
================================================================================
Narwhal JavaScript platform is required. Install it automatically now?
Enter "yes" or "no":
traceroute to irclogger.com (67.207.139.129), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 4.289 ms 1.378 ms 1.311 ms
2 lo98.sc-acc-sip-1.as9105.net (212.74.102.14) 42.185 ms 41.714 ms 41.595 ms
3 10.72.4.66 (10.72.4.66) 40.725 ms 42.544 ms 41.043 ms
4 10.72.9.217 (10.72.9.217) 55.974 ms 42.373 ms 41.897 ms
5 xe-9-3-0.bragg001.log.as13285.net (80.40.155.37) 68.609 ms 43.336 ms 43.756 ms
6 xe-7-0-0.scr001.loh.as13285.net (80.40.155.62) 58.398 ms 49.760 ms 49.795 ms
7 xe-4-2-0.lon25.ip4.tinet.net (77.67.64.9) 44.251 ms 44.592 ms 43.849 ms
8 xe-7-1-0.lon11.ip4.tinet.net (89.149.185.70) 51.690 ms
xe-3-3-0.lon11.ip4.tinet.net (89.149.186.114) 50.682 ms
- (void)showActiveView
{
var centerX = [[[CPApp mainWindow] contentView] frame].size.width / 2;
var centerY = [[[CPApp mainWindow] contentView] frame].size.height / 2;
var frameTo = [activeView frame];
frameTo.origin.x = centerX - ( frameTo.size.width / 2 );
frameTo.origin.y = centerY - ( frameTo.size.height / 2 );