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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
from datetime import datetime | |
from datetime import timedelta | |
now = datetime.now() | |
delta_day = timedelta(days = -1) | |
for i in range(21): | |
now += delta_day |
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
#!/bin/sh | |
TARGETFILE=allinone.c | |
if [ -e "$TARGETFILE" ]; then | |
rm -f "$TARGETFILE" | |
fi | |
if [ -n "$1" ]; then | |
printf "$1""\n" >> "$TARGETFILE" |
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 | |
class Json_test extends Controller { | |
public function setter() { | |
$fp = fopen("/tmp/json_test.txt","w"); | |
$content = json_encode($_POST); | |
fwrite($fp, $content, strlen($content)); | |
fclose($fp); | |
echo $content; | |
} |
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> | |
int main (int argc, const char * argv[]) { | |
unsigned int hi; | |
unsigned int lo; | |
long double result; | |
/* Set *hi and *lo to the high and low order bits of the cycle counter. | |
Implementation requires assembly code to use the rdtsc instruction. */ | |
asm("rdtsc; movl %%edx,%0; movl %%eax,%1" /* Read cycle counter */ |
NewerOlder