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 MD5 = function (string) { | |
function RotateLeft(lValue, iShiftBits) { | |
return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits)); | |
} | |
function AddUnsigned(lX,lY) { | |
var lX4,lY4,lX8,lY8,lResult; | |
lX8 = (lX & 0x80000000); | |
lY8 = (lY & 0x80000000); |
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
function growImage() { | |
$('a.idea-link').each(function () { | |
var oheight = $(this).children(0).height(); | |
var owidth = $(this).children(0).width(); | |
var nheight = (oheight + (oheight * 0.25)); | |
var nwidth = (owidth + (owidth * 0.25)); | |
var top = ((oheight - nheight) / 2); | |
var left = ((owidth - nwidth) / 2); | |
$(this).mouseenter(function () { | |
$(this).css('z-index', '2').children(0).css('z-index', '3').stop().animate({ |
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 ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Ajax_uploader extends CI_Controller { | |
// ------------------------------------------------------------------------ | |
/** | |
* Array of allowed file extensions to upload. | |
* | |
* @var array |
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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="email"> | |
<span>Enter your email to sign up</span> | |
<form action="/subscribe.php" id="invite" method="POST"> |
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
Number.prototype.formatMoney = function(places, symbol, thousand, decimal) { | |
places = !isNaN(places = Math.abs(places)) ? places : 2; | |
symbol = symbol !== undefined ? symbol : "$"; | |
thousand = thousand || ","; | |
decimal = decimal || "."; | |
var number = this, | |
negative = number < 0 ? "-" : "", | |
i = parseInt(number = Math.abs(+number || 0).toFixed(places), 10) + "", | |
j = (j = i.length) > 3 ? j % 3 : 0; | |
return symbol + negative + (j ? i.substr(0, j) + thousand : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thousand) + (places ? decimal + Math.abs(number - i).toFixed(places).slice(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 | |
require 'google-api/apiClient.php'; | |
require 'google-api/contrib/apiOauth2Service.php'; | |
require 'google-api/contrib/apiDriveService.php'; | |
$pdfFile = 'test.pdf'; | |
// API Console: https://code.google.com/apis/console/ | |
// Create an API project ("web applications") and put the client id and client secret in config.ini. |
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
function listToMatrix(list, elementsPerSubArray) { | |
var matrix = [], i, k; | |
for (i = 0, k = -1; i < list.length; i++) { | |
if (i % elementsPerSubArray === 0) { | |
k++; | |
matrix[k] = []; | |
} | |
matrix[k].push(list[i]); | |
} | |
return matrix; |
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 extractValues = function(str, pattern, options) { | |
options = options || {}; | |
var delimiters = options.delimiters || ["{", "}"]; | |
var lowercase = options.lowercase; | |
var whitespace = options.whitespace; | |
var special_chars_regex = /[\\\^\$\*\+\.\?\(\)]/g; | |
var token_regex = new RegExp( delimiters[0] + "([^" + delimiters.join("") + "\t\r\n]+)" + delimiters[1], "g"); | |
var tokens = pattern.match(token_regex); | |
var pattern_regex = new RegExp(pattern.replace(special_chars_regex, "\\$&").replace(token_regex, "(\.+)")); |
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 ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
Opions Helper for CodeIgniter | |
Database Table for this Helper: | |
CREATE TABLE IF NOT EXISTS `tbl_option` ( | |
`option_id` bigint(20) NOT NULL AUTO_INCREMENT, |
OlderNewer