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
package me.madeye; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import org.apache.http.HttpHost; | |
import android.content.Context; |
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 ffi = require('ffi'), | |
ref = require('ref'), | |
Struct = require('ref-struct'), | |
Library = require('./Library'), | |
Type = ref.Type, | |
NULL = ref.NULL, | |
isNull = ref.isNull; | |
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums']; |
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 application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
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) viewDidLoad { | |
//... | |
comments.text = @"Comments"; | |
comments.textColor = [UIColor lightGrayColor]; | |
isEmpty = YES; | |
//... | |
} | |
- (BOOL)textViewShouldBeginEditing:(UITextView*)textView { | |
if (isEmpty) { |
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
/*global $*/ | |
(function () { | |
'use strict'; | |
var $html = $('#html'), | |
$convert = $('#convert'), | |
$jade = $('#jade'); | |
function normalizeLineBreaks(str) { | |
return str.replace(/(\r\n|\n|\r)/gm, '\n'); |
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 <UIKit/UIKit.h> | |
@interface UITextField (HideKeyBoard) | |
-(void)hideKeyBoard:(UIView *)view; | |
@end |
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
// | |
// UIColor+Hex.h | |
// | |
// | |
// Created by Shen Chao on 11-12-31. | |
// Copyright (c) 2011年 Test. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// | |
// UIImage+Network.h | |
// Fireside | |
// | |
// Created by Soroush Khanlou on 8/25/12. | |
// | |
// | |
#import <UIKit/UIKit.h> |
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
class Backend(object): | |
def __init__(self): | |
engine = create_engine("mysql://{0}:{1}@{2}/{3}".format(options.mysql_user, options.mysql_pass, options.mysql_host, options.mysql_db) | |
, pool_size = options.mysql_poolsize | |
, pool_recycle = 3600 | |
, echo=options.debug | |
, echo_pool=options.debug) | |
self._session = sessionmaker(bind=engine) | |
@classmethod |
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
#!upstart | |
description "Sitename-state" | |
author "Ben Gourley" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn # restart when job dies | |
respawn limit 5 60 # give up restart after 5 respawns in 60 seconds |
OlderNewer