build 1.6.0_24-b07 Oracle Binary Code License Agreement http://www.oracle.com/technetwork/java/javase/terms/license/index.html
v2.7.3
dojo.connect(dojo.byId("id_form"), "onsubmit", function(event) { | |
dojo.query(event.target, ":active").forEach(function(node, idx, arr) { | |
if (node.id == "id_button1") { | |
dojo.stopEvent(event); | |
// do something special of button1 is clicked | |
} | |
}); | |
}); |
build 1.6.0_24-b07 Oracle Binary Code License Agreement http://www.oracle.com/technetwork/java/javase/terms/license/index.html
v2.7.3
import cPickle as pickle | |
class Pager(object): | |
def __init__(self, sequence, start_index=0): | |
self.sequence = sequence | |
self.start_index = start_index | |
def __iter__(self): |
/* | |
* Abbreviated version of the yacc grammar used by at(1). | |
*/ | |
%token <charval> DOTTEDDATE | |
%token <charval> HYPHENDATE | |
%token <charval> HOURMIN | |
%token <charval> INT1DIGIT | |
%token <charval> INT2DIGIT | |
%token <charval> INT4DIGIT |
import os | |
import struct | |
from io import BytesIO | |
from pycoin.block import Block | |
def read_uint32(fd): | |
return struct.unpack(b'<I', fd.read(4))[0] | |
def parse_file(block_file): |
import av | |
from av import AV | |
video_codec_opts = {"moov": "start"} # put the moov header at the front of the file | |
audio_codec_opts = {'codec': 'libfdk_aac'} # default libfaac | |
with open("source.mov") as fd: | |
vid = AV(fd) | |
vid.resize(720, 480) | |
vid.transcode_video(av.H264, **video_codec_opts) |
/* | |
* Abbreviated version of the yacc grammar used by at(1). | |
*/ | |
%token <charval> DOTTEDDATE | |
%token <charval> HYPHENDATE | |
%token <charval> HOURMIN | |
%token <charval> INT1DIGIT | |
%token <charval> INT2DIGIT | |
%token <charval> INT4DIGIT |
from itertools import groupby | |
from operator import attrgetter | |
from django.db import models | |
class Item(models.Model): | |
name = models.CharField(max_length=255) | |
class ItemCountAggregate(models.Model): | |
item = models.ForeignKey(Item, related_name="count_aggregates") |
$ mkdir helloworld | |
$ cd helloworld | |
$ git init . | |
$ virtualenv .venv | |
$ .venv/bin/pip install Flask | |
$ echo "*.pyc" > .gitignore | |
$ cat <<EOF > app.py | |
from os import getenv | |
from flask import Flask |
#!/bin/bash | |
trim() { | |
local var="$*" | |
var="${var#"${var%%[![:space:]]*}"}" | |
echo -n "${var%"${var##*[![:space:]]}"}" | |
} | |
parseprocfile() { | |
local IFS=":" |