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
@Override | |
public View getView(int position, View convertView, ViewGroup paramViewGroup) { | |
Object current_event = mObjects.get(position); | |
ViewHolder holder = null; | |
if (convertView == null) { | |
holder = new ViewHolder(); | |
convertView = inflater.inflate(R.layout.row_event, null); | |
holder.ThreeDimension = (ImageView) convertView.findViewById(R.id.ThreeDim); | |
holder.EventPoster = (ImageView) convertView.findViewById(R.id.EventPoster); | |
convertView.setTag(holder); |
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 | |
// This is how mixed up the tables get in even the simpler projects | |
// If you change the structure of the database, life sudden | |
$query .= ' | |
SELECT | |
summary.recordlabel AS recordid, | |
summary.artist AS artistid, | |
summary.album AS albumid, |
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
private function createManifest( $ipa_url, $bundle_id, $bundle_version, $title ) { | |
$xml = '<?xml version="1.0" encoding="UTF-8"' . urldecode( urlencode('?') . urlencode('>') ) . ' | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>items</key> | |
<array> | |
<dict> | |
<key>assets</key> |
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
private function processFile() { | |
// The final response to send back to the browser | |
$response = array(); | |
// Get the post value for file (we're passing the name of the file here) | |
// And make sure you check your routines for checking if this is valid etc | |
$file = $_POST['file'] | |
// DISK_ROOT is defined in the project | |
$base_path = DISK_ROOT . '/app/cache/uploads/'; |
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 | |
function getRepoName($repo) { | |
return strtoupper(str_replace('/', '', str_replace('/svn/svn.localhost/', '', $repo))); | |
} | |
require_once('phpmail/class.phpmailer.php'); | |
$repository = isset($argv[1]) ? $argv[1] : ''; | |
$revision = isset($argv[2]) ? $argv[2] : ''; |
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 | |
$hooks_dir = '/svn/hooks/'; | |
$repos_dir = '/svn/svn.localhost/'; | |
$repo_hook_dir = $repos_dir . '__REPO__/hooks/'; | |
if($hooks = opendir($hooks_dir)) { | |
while(($hook = readdir($hooks)) !== false) { | |
$unwanted = array('.', '..'); | |
if(!in_array($hook, $unwanted)) { |
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 | |
$streamContext = stream_context_create(); | |
stream_context_set_option($streamContext, 'ssl', 'local_cert', 'apns-dev.pem'); | |
$apns = stream_socket_client( | |
'ssl://feedback.sandbox.push.apple.com:2196', | |
$error, | |
$errorString, | |
60, |
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 | |
// Create a stream to the server | |
$streamContext = stream_context_create(); | |
stream_context_set_option($streamContext, 'ssl', 'local_cert', 'apns-dev.pem'); | |
$apns = stream_socket_client( | |
'ssl://gateway.sandbox.push.apple.com:2195, | |
$error, | |
$errorString, |
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
// Delegation methods | |
- (void)application:(UIApplication *)application | |
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken | |
{ | |
//RegisteringforRemoteNotifications | |
NSLog(@"%@ \n %@", | |
deviceToken, | |
[[NSString alloc] initWithData:deviceToken encoding:NSUTF8StringEncoding] | |
); | |
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 if ( !(current_user_can('level_0')) ) { ?> | |
<h2>Login</h2> | |
<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post"> | |
<input | |
type="text" | |
name="log" | |
id="log" | |
value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" | |
size="20" /> | |
<input type="password" name="pwd" id="pwd" size="20" /> |