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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
typedef struct node { | |
struct node *left; | |
struct node *right; | |
int val; | |
} node; |
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
/** | |
* In wp-config.php: define WP_DEBUG and SAVEQUERIES to true | |
* Add this code to the bottom of wp-config.php or functions.php | |
*/ | |
add_action( 'shutdown', function() { | |
if( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { | |
global $wpdb; | |
echo "<pre id='queries'>"; | |
echo json_encode($wpdb->queries); | |
echo "</pre>"; |
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 <Foundation/Foundation.h> | |
@interface NSString (base64encode) | |
- (NSString *)base64encode; | |
@end | |
@interface NSData (base64encode) | |
- (NSString *)base64encode; | |
@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
alias endbg="sed -i '' \"s/define('WP_DEBUG', false);/define('WP_DEBUG', true);/g\" wp-config.php" | |
alias disdbg="sed -i '' \"s/define('WP_DEBUG', true);/define('WP_DEBUG', false);/g\" wp-config.php" |
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
// | |
// ViewController.h | |
// LoginDemo | |
// | |
// Created by John Ciacia on 4/1/12. | |
// Copyright (c) 2012 Compiled Thoughts. 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
<?php | |
/** | |
* Calculate the binary value needed to | |
* display hexidecmal 0-F on a seven-segment | |
* display for an ARM | |
*/ | |
(strpos($argv[1], "a") !== false) ? $a = 1 : $a = 0; | |
(strpos($argv[1], "b") !== false) ? $b = 1 : $b = 0; | |
(strpos($argv[1], "c") !== false) ? $c = 1 : $c = 0; |
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
#include <stdio.h> | |
/** | |
* This code will calculate e | |
* as the sum of the infinite series | |
* 1/1! + 1/2! + 1/3! + ... + 1/n! | |
* g++ e.c | |
* ./a.out | |
*/ | |
int factorial(unsigned int i); |
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
//because I can... | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
int main(int argc, char **argv) { | |
if(argc != 3) |
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 | |
$a = array(3, 2, 1, 5, 9, 0, 7, 4, 6, 8); | |
while(!is_sorted($a)) | |
shuffle($a); | |
print_r($a); | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery Autocomplete Demo</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquer | |
y-ui.min.js" type="text/javascript"></script> | |
</head> |