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
%% | |
%% передаем в stack ewgi-контекст и список миддлварей таким оразом: | |
%% | |
%% stack(Ctx, [ | |
%% module1, | |
%% module2, | |
%% {module3, [Option1, Option2] | |
%% ]) | |
%% | |
%% миддлварь должна реализовывать run/2 или run/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
-module(beep_web_dispatch). | |
-export([run/2]). | |
-include("rberl.hrl"). | |
run({ewgi_context, Request, _} = Ctx, App) -> | |
PathInfo = string:tokens(ewgi_api:path_info(Ctx), "/"), | |
Path = list_to_binary(PathInfo), |
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
%% @author Bob Ippolito <[email protected]> | |
%% @copyright 2007 Mochi Media, Inc. | |
%% @doc Utilities for parsing multipart/form-data. Shamless rip-off off mochiweb | |
-module(webmachine_multipart2). | |
-author('[email protected]'). | |
-export([parse_form/1, parse_form/2]). | |
-export([parse_multipart_request/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
# -*- coding: utf-8 -*- | |
# -------------------------------------------------------------------- | |
# test stuff | |
from optparse import OptionParser | |
import Image, ImageFont, ImageDraw, sys, codecs | |
if __name__ == "__main__": | |
parser = OptionParser() | |
parser.add_option("-l", "--label") |
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 soId = ''; | |
var soNumber = ''; | |
var toCartForm = new Array(); | |
var rec; | |
var today = new Date(); | |
today = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0); | |
var tommorow = new Date(today.getFullYear(), today.getMonth(), (today.getDate()+1), 0, 0, 0, 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
convert(S) -> | |
convert(S, [], [], []). | |
convert([], Ip, Port, _) -> | |
{Ip, Port}; | |
%% ща будет порт | |
convert([$:|T], Ip, _Port, _Acc) -> | |
convert([], Ip, list_to_integer(T), []); | |
%% ща будет следующая цыфра | |
convert([$.|T], Ip, Port, _Acc) -> |
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
// Type C++ code here, or load an example. | |
#include <iostream> | |
int main(){ | |
std::cout << "aa"; | |
return 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
%% Consider | |
%% mod:func([A],{A,B},list(), any(), some_type({A,list(),B})) -> ok | error. | |
%% | |
%% Start from the beginning. Scan each character | |
%% | |
%% 1. Once we hit ":", we've got our module name, start looking for function | |
%% name. | |
%% 2. Once we hit "(", we've got our method name, start looking for arguments | |
%% 3. Arguments are a bit trickier | |
%% 3.1 If we encounter a "{", "[", "(" we don't care about anything |
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
-module(plt_cache_server). | |
-behaviour(gen_server). | |
%%% | |
%%% Exports | |
%%% | |
%% | |
%% API | |
%% |
OlderNewer