code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/EnumSerializer.java
Java
asf20
3,525
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/Hessian2Output.java
Java
asf20
35,695
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/Hessian2StreamingInput.java
Java
asf20
4,363
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/LocaleHandle.java
Java
asf20
3,652
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/EnumerationSerializer.java
Java
asf20
3,001
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianFieldException.java
Java
asf20
2,864
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/StringValueDeserializer.java
Java
asf20
3,839
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/Hessian2Input.java
Java
asf20
60,937
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/AbstractMapDeserializer.java
Java
asf20
2,803
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianSerializerInput.java
Java
asf20
5,433
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianInput.java
Java
asf20
32,299
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/BasicSerializer.java
Java
asf20
7,628
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/AbstractHessianOutput.java
Java
asf20
12,655
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianHandle.java
Java
asf20
2,338
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/SqlDateDeserializer.java
Java
asf20
3,932
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/Hessian2StreamingOutput.java
Java
asf20
3,313
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ValueDeserializer.java
Java
asf20
3,146
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ThrowableSerializer.java
Java
asf20
2,666
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/AbstractHessianInput.java
Java
asf20
9,282
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ObjectDeserializer.java
Java
asf20
3,325
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/EnumerationDeserializer.java
Java
asf20
2,926
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianServiceException.java
Java
asf20
2,963
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/RemoteSerializer.java
Java
asf20
2,680
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianProtocolException.java
Java
asf20
3,302
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/MapSerializer.java
Java
asf20
3,474
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/CalendarSerializer.java
Java
asf20
2,858
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/CalendarHandle.java
Java
asf20
3,106
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/Hessian2Constants.java
Java
asf20
3,939
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ClassSerializer.java
Java
asf20
2,974
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/StackTraceElementDeserializer.java
Java
asf20
2,646
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/AbstractSerializerFactory.java
Java
asf20
2,939
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/JavaSerializer.java
Java
asf20
12,047
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianInputFactory.java
Java
asf20
3,301
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianDebugOutputStream.java
Java
asf20
4,256
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/LocaleSerializer.java
Java
asf20
2,817
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ClassDeserializer.java
Java
asf20
4,859
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/BeanSerializerFactory.java
Java
asf20
3,270
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/IteratorSerializer.java
Java
asf20
2,962
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianEnvelope.java
Java
asf20
3,060
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/BeanDeserializer.java
Java
asf20
7,903
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianDebugState.java
Java
asf20
33,354
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/InputStreamSerializer.java
Java
asf20
2,872
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/BasicDeserializer.java
Java
asf20
14,648
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/AbstractSerializer.java
Java
asf20
2,622
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianRemoteObject.java
Java
asf20
2,427
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ExtSerializerFactory.java
Java
asf20
3,671
/* * Copyright (c) 2001-2008 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianOutput.java
Java
asf20
20,116
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/ArraySerializer.java
Java
asf20
3,226
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/MapDeserializer.java
Java
asf20
4,394
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianRemoteResolver.java
Java
asf20
2,539
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/hessian/io/HessianRemote.java
Java
asf20
3,513
/* * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/services/client/ServiceProxyFactory.java
Java
asf20
3,442
/* * Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved. * * The Apache Software License, Version 1.1 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code mu...
zzgfly-hessdroid
src/com/caucho/services/server/AbstractSkeleton.java
Java
asf20
6,562
/* * Copyright (C) 2009 hessdroid@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
zzgfly-hessdroid
src/com/ast/util/CookieParser.java
Java
asf20
3,151
#include <security/pam_appl.h> #include <security/pam_misc.h> #include <security/pam_modules.h> #include <stdio.h> /* 文件pamtest.c 此程序从命令行接收一个用户名作为参数,然后对这个用户名进行auth和account验证. */ // 定义一个pam_conv结构,用于与pam通信 static struct pam_conv conv = { misc_conv, NULL }; // 主函数 int main(int argc, char *argv[]) { pam_handle_t ...
zzy-code-test
linux/pam/pamtest.c
C
gpl2
1,694
all: cc -o pamtest pamtest.c -lpam -lpam_misc -ldl
zzy-code-test
linux/pam/makefile
Makefile
gpl2
53
#!/usr/bin/env python # ant_spider.py # SCREEN_SIZE = (640, 480) NEST_POSITION = (320, 240) ANT_COUNT = 20 NEST_SIZE = 100. import pygame, os, sys from pygame.locals import * from random import randint, choice from gameobjects.vector2 import Vector2 class State(object): def __init__(self, name): self.name = ...
zzy-code-test
python/ant_spider/ant_spider.py
Python
gpl2
8,978
#!/usr/bin/env python import pygame, os#, sys from pygame.locals import * from gameobjects.vector2 import Vector2 from random import randint #, choice SCREEN_SIZE=(800, 600) MAIN_DIR=os.path.split(os.path.abspath(__file__))[0] image_background = "image/back.png" image_sunflower = "image/sunflower.png" image_beansh...
zzy-code-test
python/plantvszombie/plantvszombie.py
Python
gpl2
9,783
""" Simulation of a rotating 3D Cube Developed by Leonel Machava <leonelmachava@gmail.com> http://codeNtronix.com """ import sys, math, pygame from pygame.locals import * from operator import itemgetter COL_RED=(255,0,0) COL_GREEN=(0,255,0) COL_BLUE=(0,0,255) COL_YELLOW=(255,255,0) COL_PINK=(255,0,255) COL_UNKNOW=...
zzy-code-test
python/rotating_cube/rotating_cube.py
Python
gpl2
6,835
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { function lineTo2(ctx, x0, y0, x1, y1, len) { var x2, y2, a, b, p, xt, a2, b2, c2; if (x0 == x1) { x2 = x0; ...
zzy-code-test
html5/tower_defense/js/td-render-buildings.js
JavaScript
gpl2
6,025
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ /** * 本文件定义了建筑的参数、属性 */ // _TD.a.push begin _TD.a.push(function (TD) { /** * 默认的升级规则 * @param old_level {Number} * @param old_value {Number} * @return new_v...
zzy-code-test
html5/tower_defense/js/td-cfg-buildings.js
JavaScript
gpl2
1,892
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { /** * 使用 A* 算法(Dijkstra算法?)寻找从 (x1, y1) 到 (x2, y2) 最短的路线 * */ TD.FindWay = function (w, h, x1, y1, x2, y2, f_pass...
zzy-code-test
html5/tower_defense/js/td-walk.js
JavaScript
gpl2
5,578
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ /** 默认关卡 */ // _TD.a.push begin _TD.a.push(function (TD) { // main stage 初始化方法 var _stage_main_init = function () { var act = new TD.Act(this, "act-1"), scene = n...
zzy-code-test
html5/tower_defense/js/td-data-stage-1.js
JavaScript
gpl2
6,617
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ var _TD = { a: [], init: function (td_board, is_debug) { delete this.init; // 一旦初始化运行,即删除这个入口引用,防止初始化方法被再次调用 var i, TD = { version: "0.1.16", // 版本命名规范参考:http://s...
zzy-code-test
html5/tower_defense/js/td.js
JavaScript
gpl2
6,425
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { var _default_wait_clearInvalidElements = 20; // map 对象的属性、方法。注意属性中不要有数组、对象等 // 引用属性,否则多个实例的相关属性会发生冲突 var map_obj = {...
zzy-code-test
html5/tower_defense/js/td-obj-map.js
JavaScript
gpl2
9,460
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { TD.lang = { /** * document.getElementById 方法的简写 * @param el_id {String} */ $e: function (el_id) { retu...
zzy-code-test
html5/tower_defense/js/td-lang.js
JavaScript
gpl2
5,293
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { // panel 对象的属性、方法。注意属性中不要有数组、对象等 // 引用属性,否则多个实例的相关属性会发生冲突 var panel_obj = { _init: function (cfg) { cfg = cfg || ...
zzy-code-test
html5/tower_defense/js/td-obj-panel.js
JavaScript
gpl2
11,345
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { // grid 对象的属性、方法。注意属性中不要有数组、对象等 // 引用属性,否则多个实例的相关属性会发生冲突 var grid_obj = { _init: function (cfg) { cfg = cfg || {}...
zzy-code-test
html5/tower_defense/js/td-obj-grid.js
JavaScript
gpl2
7,437
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { TD._msg_texts = { "_cant_build": "不能在这儿修建", "_cant_pass": "怪物不能通过这儿", "entrance": "起点", "exit": "终点", "not_en...
zzy-code-test
html5/tower_defense/js/td-msg.js
JavaScript
gpl2
2,611
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { /** * 舞台类 * @param id {String} 舞台ID * @param cfg {Object} 配置 */ TD.Stage = function (id, cfg) { this.id = i...
zzy-code-test
html5/tower_defense/js/td-stage.js
JavaScript
gpl2
8,127
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { // building 对象的属性、方法。注意属性中不要有数组、对象等 // 引用属性,否则多个实例的相关属性会发生冲突 var building_obj = { _init: function (cfg) { this.is...
zzy-code-test
html5/tower_defense/js/td-obj-building.js
JavaScript
gpl2
14,150
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { // monster 对象的属性、方法。注意属性中不要有数组、对象等 // 引用属性,否则多个实例的相关属性会发生冲突 var monster_obj = { _init: function (cfg) { cfg = cfg...
zzy-code-test
html5/tower_defense/js/td-obj-monster.js
JavaScript
gpl2
9,649
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ /** 本文件定义了 Element 类,这个类是游戏中所有元素的基类, * 包括地图、格子、怪物、建筑、子弹、气球提示等都基于这个类 * */ // _TD.a.push begin _TD.a.push(function (TD) { /** * Element 是游戏中所有可控制元素的基类 * @param ...
zzy-code-test
html5/tower_defense/js/td-element.js
JavaScript
gpl2
3,864
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ // _TD.a.push begin _TD.a.push(function (TD) { /** * 事件管理器 */ TD.eventManager = { ex: -1, // 事件坐标 x ey: -1, // 事件坐标 y _registers: {}, // 注册监听事件的元素 //...
zzy-code-test
html5/tower_defense/js/td-event.js
JavaScript
gpl2
4,341
/* * Copyright (c) 2011. * * Author: oldj <oldj.wu@gmail.com> * Blog: http://oldj.net/ * * Last Update: 2011/1/10 5:22:52 */ /** 本文件定义了怪物默认属性及渲染方法 */ // _TD.a.push begin _TD.a.push(function (TD) { /** * 默认的怪物渲染方法 */ function defaultMonsterRender() { if (!this.is_valid || !this.grid...
zzy-code-test
html5/tower_defense/js/td-cfg-monsters.js
JavaScript
gpl2
4,630
/** * c.css * * @save-up: [../js/td.js, ../td.html] * * last update: 2010-11-22 10:50:50 */ html, body { margin: 0; padding: 0; font-size: 12px; line-height: 20px; font-family: Verdana, "Times New Roman", serif; background: #1A74BA; } h1 { padding: 0; margin: 0; line-height: 48px; fon...
zzy-code-test
html5/tower_defense/css/c.css
CSS
gpl2
883
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Pragma" content="no-cache"/> <meta http-equiv="Cache-Control" content="no-cache"/> <meta http-equiv="Expires" content="Thu, 01 Jan 1970 00:00:01 GMT"/> <meta http-equiv="Expires" conte...
zzy-code-test
html5/tower_defense/index.html
HTML
gpl2
2,603
window.onload = function () { C = Math.cos; // cache Math objects S = Math.sin; U = 0; w = window; j = document; d = j.getElementById("c"); c = d.getContext("2d"); W = d.width = w.innerWidth; H = d.height = w.innerHeight; c.fillRect(0, 0, W, H); // resize <canvas> and draw black rect (default) c.globalCompo...
zzy-code-test
html5/star/star.js
JavaScript
gpl2
2,322
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>star</title> <script type="text/javascript" src=star.js> </script> </head> <body style="margin:0px;padding:0px;width:100%;height:100%;overflow:hidden;"> <canvas id="c"></canvas> </body> </html>
zzy-code-test
html5/star/index.html
HTML
gpl2
293
/* * lightgl.js * http://github.com/evanw/lightgl.js/ * * Copyright 2011 Evan Wallace * Released under the MIT license */ (function(){ function u(a){ window.handleError&&window.handleError(a); throw a; }; function x(a){ return new Vector((a&1)*2-1,(a&2)-1,(a&4)/2-1) }; window.onload=function(){ funct...
zzy-code-test
html5/water_cube_demo/lightgl.js
JavaScript
gpl2
23,612
exports.unsetObject = function( object ){ for(var i in object) if(object.hasOwnProperty(i) && typeof object[i] == "function") object[i] = function(){}; }; exports.getAngleByRadian = function( radian ){ return radian * 180 / Math.PI; } exports.pointToRadian = function( origin, point ){ var PI = Math.PI; ...
zzy-code-test
html5/fruitninja/scripts/tools.js
JavaScript
gpl2
750
/** * layer manager */ var Raphael = require( "lib/raphael" ); var Ucren = require( "lib/ucren" ); var layers = {}; var zindexs = { "default": zi(), "light": zi(), "knife": zi(), "fruit": zi(), "juice": zi(), "flash": zi(), "mask": zi() }; exports.createImage = function( layer, src, x, y, w, h ){ layer = t...
zzy-code-test
html5/fruitninja/scripts/layer.js
JavaScript
gpl2
1,121
/** * a simple state manager * @author dron * @date 2012-06-28 */ var Ucren = require( "lib/ucren" ); var timeline = require( "timeline" ); /** * usage: * state( key ).is( value ) -> determine if the value of key is the given value * state( key ).isnot( value ) -> determine if the value of key is not given v...
zzy-code-test
html5/fruitninja/scripts/state.js
JavaScript
gpl2
2,211
var timeline = require( "timeline" ); var tools = require( "tools" ); var sence = require( "sence" ); var Ucren = require( "lib/ucren" ); var buzz = require( "lib/buzz" ); var control = require( "control" ); var csl = require( "object/console" ); var message = require( "message" ); var state = require( "state" ); var ...
zzy-code-test
html5/fruitninja/scripts/main.js
JavaScript
gpl2
2,545
/** * a easy timeline manager * @version 1.0 * @author dron */ var Ucren = require( "lib/ucren" ); var timerCache = {}; var timeline = {}; // var timer = timeline; // <or> // var timer = timeline.use( name ).init( 10 ); // to use a new timeline instance // // var t = timer.createTask(...); // t.stop(); // // ti...
zzy-code-test
html5/fruitninja/scripts/timeline.js
JavaScript
gpl2
5,050
var layer = require( "../layer" ); var timeline = require( "../timeline" ); var tween = require( "../lib/tween" ); /** * 位移类模块模型 */ exports.create = function( imageSrc, width, height, origX, origY, targetX, targetY, animMap, animDur ){ var module = {}; var image; var anim = {}; if( typeof animMap === "functi...
zzy-code-test
html5/fruitninja/scripts/factory/displacement.js
JavaScript
gpl2
1,479
var layer = require( "../layer" ); var Ucren = require( "../lib/ucren" ); var timeline = require( "../timeline" ).use( "fruit" ).init( 1 ); var timeline2 = require( "../timeline" ).use( "fruit-apart" ).init( 1 ); var tween = require( "../lib/tween" ); var message = require( "../message" ); var flame = require( "../obje...
zzy-code-test
html5/fruitninja/scripts/factory/fruit.js
JavaScript
gpl2
10,496
/** * 果汁 */ var Ucren = require( "../lib/ucren" ); var layer = require( "../layer" ).getLayer("juice"); var timeline = require( "../timeline" ).use( "juice" ).init( 10 ); var tween = require( "../lib/tween" ); var tools = require( "../tools" ); var random = Ucren.randomNumber; var dur = 1500; var anim = tween.expone...
zzy-code-test
html5/fruitninja/scripts/factory/juice.js
JavaScript
gpl2
1,828
var layer = require( "../layer" ); var timeline = require( "../timeline" ); var Ucren = require( "../lib/ucren" ); /** * 旋转类模块模型 */ exports.create = function( imageSrc, x, y, w, h, z, anim, animDur ){ var module = {}, image; var rotateDire = [12, -12][Ucren.randomNumber(2)]; var defaultAngle = Ucren.randomNumber...
zzy-code-test
html5/fruitninja/scripts/factory/rotate.js
JavaScript
gpl2
1,575
/** * */ var layer = require( "../layer" ); var timeline = require( "../timeline" ).use( "flash" ).init( 10 ); var tween = require( "../lib/tween" ); var sound = require( "../lib/sound" ); var image, snd, xDiff = 0, yDiff = 0; var anim = tween.quadratic.cio; var anims = []; var dur = 100; exports.set = function()...
zzy-code-test
html5/fruitninja/scripts/object/flash.js
JavaScript
gpl2
1,096
var displacement = require( "../factory/displacement" ); var tween = require( "../lib/tween" ); exports = displacement.create("images/ninja.png", 244, 81, 315, -140, 315, 43, { show: tween.bounce.co, hide: tween.exponential.co }, 1e3);
zzy-code-test
html5/fruitninja/scripts/object/ninja.js
JavaScript
gpl2
238
/** * 炸弹爆炸时的光线 */ var layer = require( "../layer" ); var maskLayer = layer.getLayer( "mask" ); layer = layer.getLayer( "light" ); var Ucren = require( "../lib/ucren" ); var timeline = require( "../timeline" ); var message = require( "../message" ); var random = Ucren.randomNumber; var pi = Math.PI; var sin = Mat...
zzy-code-test
html5/fruitninja/scripts/object/light.js
JavaScript
gpl2
1,994
var layer = require( "../layer" ); var tween = require( "../lib/tween" ); var timeline = require( "../timeline" ); var Ucren = require( "../lib/ucren" ); var setTimeout = timeline.setTimeout.bind( timeline ); var anim = tween.exponential.co; var message = require( "../message" ); /** * 分数模块 */ var image, text1, t...
zzy-code-test
html5/fruitninja/scripts/object/score.js
JavaScript
gpl2
2,198
var Ucren = require( "../lib/ucren" ); var layer = require( "../layer" ); var timeline = require( "../timeline" ); var image, time; var random = Ucren.randomNumber; exports.set = function(){ image = layer.createImage( "default", "images/background.jpg", 0, 0, 640, 480 ); }; exports.wobble = function(){ time = time...
zzy-code-test
html5/fruitninja/scripts/object/background.js
JavaScript
gpl2
555
var timeline = require( "../timeline" ); var layer = require( "../layer" ).getLayer( "knife" ); var Ucren = require( "../lib/ucren" ); /** * 刀光模块 */ var lastX = null, lastY = null; var abs = Math.abs; var life = 200; var stroke = 10; var color = "#cbd3db"; var anims = []; var switchState = true; var knifes = []; ...
zzy-code-test
html5/fruitninja/scripts/object/knife.js
JavaScript
gpl2
2,072
var layer = require( "../layer" ); var tween = require( "../lib/tween" ); var timeline = require( "../timeline" ); var message = require( "../message" ); var exponential = tween.exponential.co; /** * "coming soon" 模块 */ exports.anims = []; exports.set = function(){ this.image = layer.createImage( "default", "ima...
zzy-code-test
html5/fruitninja/scripts/object/developing.js
JavaScript
gpl2
1,228
/** * 火焰模块 * @author zswang, dron */ var layer = require( "../layer" ).getLayer( "fruit" ); var timeline = require( "../timeline" ); var Ucren = require( "../lib/ucren" ); /* raphael.path('M 27,122 Q 9,42 27,21 45,42 27,122') .attr({ stroke: 'none', fill: '180-#D8D380-#EDED7A-#D8D380' }); */ // 缩写 var math...
zzy-code-test
html5/fruitninja/scripts/object/flame.js
JavaScript
gpl2
2,912
var displacement = require( "../factory/displacement" ); var tween = require( "../lib/tween" ); exports = displacement.create("images/home-mask.png", 640, 183, 0, -183, 0, 0, tween.exponential.co, 1e3);
zzy-code-test
html5/fruitninja/scripts/object/home-mask.js
JavaScript
gpl2
203
var displacement = require( "../factory/displacement" ); var tween = require( "../lib/tween" ); exports = displacement.create("images/home-desc.png", 161, 91, -161, 140, 7, 127, tween.exponential.co, 500);
zzy-code-test
html5/fruitninja/scripts/object/home-desc.js
JavaScript
gpl2
206
var rotate = require( "../factory/rotate" ); var tween = require( "../lib/tween" ); exports = rotate.create("images/quit.png", 493, 311, 141, 141, 1e-5, tween.exponential.co, 500);
zzy-code-test
html5/fruitninja/scripts/object/quit.js
JavaScript
gpl2
181