This file contains hidden or 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 'net/http' | |
require 'uri' | |
require 'cgi' | |
require "mysql" | |
db = Mysql.real_connect("<MYSQL SERVER>", "<MYSQL USER>", "<MYSQL PASSWORD>", "<MYSQL TABLE>") | |
rows = db.query("SELECT * FROM posts") | |
while (row = rows.fetch_row) |
This file contains hidden or 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 'net/http' | |
require 'uri' | |
require 'cgi' | |
require "mysql" | |
db = Mysql.real_connect("<MYSQL SERVER>", "<MYSQL USER>", "<MYSQL PASSWORD>", "<MYSQL TABLE>") | |
rows = db.query("SELECT * FROM posts") | |
while (row = rows.fetch_row) |
This file contains hidden or 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
//////////////////////////// | |
// .h file | |
#import <UIKit/UIKit.h> | |
@interface DemoTableViewCell : UITableViewCell { | |
} | |
@end | |
//////////////////////////// |
This file contains hidden or 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
- (UIImage *)addBorderToImage:(UIImage *)image { | |
CGImageRef bgimage = [image CGImage]; | |
float width = CGImageGetWidth(bgimage); | |
float height = CGImageGetHeight(bgimage); | |
// Create a temporary texture data buffer | |
void *data = malloc(width * height * 4); | |
// Draw image to buffer | |
CGContextRef ctx = CGBitmapContextCreate(data, |
This file contains hidden or 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
// #Lighter r,g,b,a #Darker r,g,b,a | |
#define MAIN_COLOR_COMPONENTS { 0.153, 0.306, 0.553, 1.0, 0.122, 0.247, 0.482, 1.0 } | |
#define LIGHT_COLOR_COMPONENTS { 0.478, 0.573, 0.725, 1.0, 0.216, 0.357, 0.584, 1.0 } | |
@implementation UINavigationBar (UINavigationBarCategory) | |
- (void)drawRect:(CGRect)rect { | |
if (imageReady) { | |
UIImage *img = [UIImage imageNamed: @"navigation_background.png"]; | |
[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; |
This file contains hidden or 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
^\s* (\w+) \s* \- \s* (\w+) \s* (?# the range [1,2]) | |
(\+)? (?# the application may have a + in front of the name [3]) | |
([^\s]+) (?# bundle name [4]) | |
\s* \w+ \s* (?# the versions--generally "??? [???]") | |
\<?([[:xdigit:]]{32})?\>? (?# possible UUID [5]) | |
\s* (\/.*)\s*$ (?# first fwdslash to end we hope is path [6]) |
This file contains hidden or 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
// | |
// UACellBackgroundView.h | |
// Ambiance | |
// | |
// Created by Matt Coneybeare on 1/31/10. | |
// Copyright 2010 Urban Apps LLC. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or 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
// | |
// UACellBackgroundView.m | |
// Ambiance | |
// | |
// Created by Matt Coneybeare on 1/31/10. | |
// Copyright 2010 Urban Apps LLC. All rights reserved. | |
// | |
#define TABLE_CELL_BACKGROUND { 1, 1, 1, 1, 0.866, 0.866, 0.866, 1} // #FFFFFF and #DDDDDD | |
#define kDefaultMargin 10 |
This file contains hidden or 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)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { | |
if (self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier]) { | |
// Background Image | |
self.backgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease]; | |
} | |
return self; | |
} | |
- (void)setPosition:(UACellBackgroundViewPosition)newPosition { |
This file contains hidden or 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
<HTML> | |
<HEAD> | |
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=UTF-8"> | |
<TITLE>iTunes Label Connect</TITLE> | |
<LINK HREF="/WebObjects/piano.woa/Contents/WebServerResources/iTMSApplication.css" TYPE="text/css" REL="STYLESHEET"> | |
<script language="javascript"> | |
//function vndrID() | |
//{ | |
// var vendorID; |
OlderNewer