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
// JavaScript Document | |
function Temp() { | |
var test = "testing"; | |
} | |
Temp.prototype.init = function() { | |
test = this.test; | |
$.ajax({ //IE errors here. | |
url: "xd_subnav.xml", | |
dataType: "xml", |
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 secondsFromTime(string){ | |
var split = string.split(":") | |
var seconds = parseInt(split.pop()) | |
if (seconds !== NaN) { | |
var minutes = parseInt(split.pop()) | |
if (minutes !== NaN) { | |
var hours = parseInt(split.pop()) | |
if (hours !== NaN) { | |
return hours * 60 * 60 + minutes * 60 + seconds |
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
response_handler = (response)=> | |
buf = null | |
ptr = 0 | |
response.on "data", (chunk) => | |
if not buf | |
if response.headers['content-length'] | |
buf = new Buffer(parseInt(response.headers['content-length'],10)+2) | |
else | |
buf = '' |
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 lastElement(array) { | |
if (array.length > 0) | |
return array[array.length - 1]; | |
else | |
return null; | |
} | |
show(lastElement([1, 2, null])); |
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
$.ajax({ | |
type: "POST", | |
url: "meta-parse.php", | |
data: $('input.#url').serialize(), | |
success: function(data) { | |
var json = $.parseJSON(data); | |
var images = json.images.split(','); | |
$('#url_preview').html("<div id='message'></div>"); | |
$('#url_preview').toggle(); | |
$('#add_process_board_picker').toggle(); |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
typedef struct | |
{ unsigned long length | |
; char *data | |
; | |
} String; |
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
>>> def generate(startdate, recipients, daycount, message): | |
... last_date = startdate | |
... mail = email.message_from_string(message) | |
... msg_lib = [] | |
... for i in range(0, daycount): | |
... for recep in range(len(recipients)): | |
... mail['date'] = email.utils.formatdate(time.mktime(last_date.utctimetuple())) | |
... msg_lib.append(mail) | |
... last_date = last_date + datetime.timedelta(days=1) | |
... return msg_lib |
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 maildb | |
import email | |
import time | |
import datetime | |
def genarate(STARTDATE, RECIPIENTS, DAYCOUNT, MESSAGE): | |
last_date = STARTDATE | |
mail = email.message_from_string(MESSAGE) | |
msg_lib = [] | |
i = 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
>>>>> def tetra(x, y): | |
c = x ** x | |
print c | |
>>> tetra(3, 3) | |
27 | |
>>> tetra(2, 5) | |
4 | |
>>> tetra(2, 3) | |
4 |
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
data = """ | |
73167176531330624919225119674426574742355349194934 | |
96983520312774506326239578318016984801869478851843 | |
85861560789112949495459501737958331952853208805511 | |
12540698747158523863050715693290963295227443043557 | |
66896648950445244523161731856403098711121722383113 | |
62229893423380308135336276614282806444486645238749 | |
30358907296290491560440772390713810515859307960866 | |
70172427121883998797908792274921901699720888093776 | |
65727333001053367881220235421809751254540594752243 |
OlderNewer