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
//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by npactivex.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTRO...
zzbinfo-np-activex
ffactivex/resource.h
C
mpl11
403
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/npactivex.cpp
C++
mpl11
18,468
maxVf = 200 # Generating the header head = """// Copyright qiuc12@gmail.com // This file is generated autmatically by python. DONT MODIFY IT! #pragma once #include <OleAuto.h> class FakeDispatcher; HRESULT DualProcessCommand(int commandId, FakeDispatcher *disp, ...); extern "C" void DualProcessCommandWrap()...
zzbinfo-np-activex
ffactivex/FakeDispatcherBase_gen.py
Python
mpl11
1,484
comment ? /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.moz...
zzbinfo-np-activex
ffactivex/FakeDispatcherWrap.asm
Assembly
mpl11
1,879
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/FakeDispatcher.h
C++
mpl11
6,240
// stdafx.cpp : source file that includes just the standard includes // npactivex.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "npactivex.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
zzbinfo-np-activex
ffactivex/stdafx.cpp
C++
mpl11
299
#pragma once #include <npapi.h> #include <npruntime.h> #include <OleAuto.h> #include "scriptable.h" #include "npactivex.h" #include <map> using std::map; using std::pair; class ScriptFunc : public NPObject { private: static NPClass npClass; Scriptable *script; MEMBERID dispid; void setControl(Scrip...
zzbinfo-np-activex
ffactivex/ScriptFunc.h
C++
mpl11
1,139
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * t...
zzbinfo-np-activex
ffactivex/authorize.cpp
C++
mpl11
10,040
#include "ScriptFunc.h" NPClass ScriptFunc::npClass = { /* version */ NP_CLASS_STRUCT_VERSION, /* allocate */ ScriptFunc::_Allocate, /* deallocate */ ScriptFunc::_Deallocate, /* invalidate */ NULL, /* hasMethod */ NULL, //Scriptable::_HasMethod, /* invoke */ NULL, //Scriptable::_Invoke, /* invokeDe...
zzbinfo-np-activex
ffactivex/ScriptFunc.cpp
C++
mpl11
1,507
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/axhost.cpp
C++
mpl11
15,111
// (c) Code By Extreme // Description:Inline Hook Engine // Last update:2010-6-26 #include <Windows.h> #include <stdio.h> #include "Hook.h" #define JMPSIZE 5 #define NOP 0x90 extern DWORD ade_getlength(LPVOID Start, DWORD WantLength); static VOID BuildJmp(PBYTE Buffer,DWORD JmpFrom, DWORD JmpTo) { DWO...
zzbinfo-np-activex
ffactivex/ApiHook/Hook.cpp
C++
mpl11
3,588
#ifndef _HOOK_H_ #define _HOOK_H_ typedef struct _HOOKINFO_ { PBYTE Stub; DWORD CodeLength; LPVOID FuncAddr; LPVOID FakeAddr; }HOOKINFO, *PHOOKINFO; VOID HEInitHook(PHOOKINFO HookInfo, LPVOID FuncAddr, LPVOID FakeAddr); BOOL HEStartHook(PHOOKINFO HookInfo); BOOL HEStopHook(PHOOKINFO HookInfo); #en...
zzbinfo-np-activex
ffactivex/ApiHook/Hook.h
C
mpl11
323
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/AtlThunk.cpp
C++
mpl11
10,401
; Copyright qiuc12@gmail.com ; This file is generated automatically by python. DON'T MODIFY IT! .386 .model flat _DualProcessCommandWrap proto PUBLIC ?fv0@FakeDispatcherBase@@EAGJXZ PUBLIC ?fv1@FakeDispatcherBase@@EAGJXZ PUBLIC ?fv2@FakeDispatcherBase@@EAGJXZ PUBLIC ?fv3@FakeDispatcherBase@@EAGJXZ PUBLIC ?fv4@...
zzbinfo-np-activex
ffactivex/FakeDispatcherBase.asm
Assembly
mpl11
32,722
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/scriptable.h
C++
mpl11
4,934
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/Host.h
C++
mpl11
2,241
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/scriptable.cpp
C++
mpl11
13,344
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/dllmain.cpp
C++
mpl11
7,308
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/NPSafeArray.cpp
C++
mpl11
8,634
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/variants.cpp
C++
mpl11
11,038
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/npactivex.h
C
mpl11
2,994
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/NPSafeArray.h
C++
mpl11
3,324
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/variants.h
C
mpl11
2,086
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/HTMLDocumentContainer.h
C++
mpl11
17,424
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/GenericNPObject.h
C++
mpl11
5,100
#pragma once // The following macros define the minimum required platform. The minimum required platform // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run // your application. The macros work by enabling all features available on platform versions up to and /...
zzbinfo-np-activex
ffactivex/targetver.h
C
mpl11
1,428
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/FakeDispatcher.cpp
C++
mpl11
14,420
// Copyright qiuc12@gmail.com // This file is generated autmatically by python. DONT MODIFY IT! #pragma once #include <OleAuto.h> class FakeDispatcher; HRESULT DualProcessCommand(int commandId, FakeDispatcher *disp, ...); extern "C" void DualProcessCommandWrap(); class FakeDispatcherBase : public IDispatch { ...
zzbinfo-np-activex
ffactivex/FakeDispatcherBase.h
C++
mpl11
7,671
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/ItemContainer.cpp
C++
mpl11
4,191
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * t...
zzbinfo-np-activex
ffactivex/common/ControlEventSink.h
C++
mpl11
4,288
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/IOleCommandTargetImpl.h
C++
mpl11
10,589
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * t...
zzbinfo-np-activex
ffactivex/common/ControlSite.cpp
C++
mpl11
45,015
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/PropertyList.h
C++
mpl11
5,004
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * t...
zzbinfo-np-activex
ffactivex/common/ControlEventSink.cpp
C++
mpl11
9,226
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/ControlSiteIPFrame.cpp
C++
mpl11
4,135
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/ItemContainer.h
C++
mpl11
3,631
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/ControlSite.h
C++
mpl11
18,194
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/PropertyBag.cpp
C++
mpl11
3,426
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/ControlSiteIPFrame.h
C++
mpl11
3,891
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
zzbinfo-np-activex
ffactivex/common/PropertyBag.h
C++
mpl11
2,769
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * t...
zzbinfo-np-activex
ffactivex/common/StdAfx.h
C++
mpl11
4,966
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/stdafx.h
C
mpl11
2,250
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/ObjectManager.h
C++
mpl11
2,783
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
zzbinfo-np-activex
ffactivex/objectProxy.h
C++
mpl11
2,216
<html> <head> <script> function stringHash(str) { var hash = 0; if (str.length == 0) return hash; for (var i = 0; i < str.length; i++) { ch = str.charCodeAt(i); hash = ((hash << 5) - hash) + ch; hash = hash & hash; // Convert to 32bit integer ...
zzbinfo-np-activex
web/stringhash.html
HTML
mpl11
672
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></meta> <style> .line { clear: both; margin: 4px 0px; } .item { margin: 4px 3px; float: left; } </style> <script> var link = "https://chrome.googl...
zzbinfo-np-activex
web/share.html
HTML
mpl11
3,718
// Copyright (c) 2012 eagleonhill(qiuc12@gmail.com). All rights reserved. // Use of this source code is governed by a Mozilla-1.1 license that can be // found in the LICENSE file. List.types.input = function(p, prop) { p[0].listdata = this; this.p = p; var input = this.input = $('<input></input>').addClas...
zzbinfo-np-activex
web/listtypes.js
JavaScript
mpl11
3,295
.itemline.newline:not(.editing) { display:none; } .list { width: 100%; height: 520px; } div[property=title] { width: 200px } div[property=type] { width: 60px } div[property=value] { width: 240px } div[property=enabled] { width: 60px } div[property=userAgent] { width: 70px } d...
zzbinfo-np-activex
web/editor.css
CSS
mpl11
694
.list { width: 800px; height: 400px; font-family: Arial, sans-serif; overflow-x: hidden; border: 3px solid #0D5995; background-color: #0D5995; padding: 1px; padding-top: 10px; border-top-left-radius: 15px; border-top-right-radius: 15px; border-bottom-left-radius: 4px; border-bottom-r...
zzbinfo-np-activex
web/list.css
CSS
mpl11
1,865
<html> <head> <link rel="stylesheet" type="text/css" href="list.css" /> <link rel="stylesheet" type="text/css" href="editor.css" /> <link type="text/css" href="jquery-ui-1.8.17.custom.css" rel="stylesheet" /> <script src="jquery-1.7.min.js"></script> <script src="jquery-ui-1.8.17.custom.min....
zzbinfo-np-activex
web/editor.html
HTML
mpl11
1,570
// Copyright (c) 2012 eagleonhill(qiuc12@gmail.com). All rights reserved. // Use of this source code is governed by a Mozilla-1.1 license that can be // found in the LICENSE file. var baseDir = '/setting/'; var rules = []; var scripts = []; var issues = []; var dirty = false; function setScriptAutoComplet...
zzbinfo-np-activex
web/editor.js
JavaScript
mpl11
9,473
// Copyright (c) 2012 eagleonhill(qiuc12@gmail.com). All rights reserved. // Use of this source code is governed by a Mozilla-1.1 license that can be // found in the LICENSE file. /* prop = { header, // String property, // String events, // type, // checkbox, select, ...
zzbinfo-np-activex
web/list.js
JavaScript
mpl11
11,700
wget.exe -N http://haoutil.googlecode.com/svn/trunk/player/iqiyi.swf wget.exe -N http://haoutil.googlecode.com/svn/trunk/player/ku6.swf wget.exe -N http://haoutil.googlecode.com/svn/trunk/player/youku.swf wget.exe -N http://haoutil.googlecode.com/svn/trunk/player/iqiyi5.swf
zy-swf-ad
trunk/swfkill/src/swf/手动更新.bat
Batchfile
gpl3
277
<?php // host: $_database['host'] // login: $_database['login'] // password: $_database['password'] // database: $_database['database'] // encoding: $_database['encoding'] if($_isRunning) { class _CDataBase { private $_mysqli; private $_connected; // constructor public function __construct($arr) { $th...
zygi4s-php-cms
trunk/database.php
PHP
oos
1,019
<?php // Application main config file. // After installation set this file to READ-ONLY! // host: $_database['host'] // login: $_database['login'] // password: $_database['password'] // database: $_database['database'] // encoding: $_database['encoding'] if($_isRunning) { $_database = array( 'host' => 'localhost...
zygi4s-php-cms
trunk/config.php
PHP
oos
540
<?php // --- DEFINITION SECTION BEGIN --- // No warnings and error diplayed - debug mode off //error_reporting(E_ERROR); // Verbose mode for errors and warnings - debug mode on error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Application root directory. define('_DIR_ROOT', getcwd()); // is applicat...
zygi4s-php-cms
trunk/index.php
PHP
oos
2,885
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.responsive; import java.io.IOException; /** * * @author yingyzhang */ class UnresponsiveUI { private volatile double d = 1; public UnresponsiveUI() throws IOException { while (d > 0) {...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/responsive/ResponsiveUI.java
Java
asf20
810
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.sleep; import cn.nju.zyy.basic.LiftOff; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; /** * * @author yingyzhang *...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/sleep/SleepingTask.java
Java
asf20
912
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.executor; import cn.nju.zyy.basic.LiftOff; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author yingyzhang */ public class FixedThreadPool { ...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/executor/FixedThreadPool.java
Java
asf20
561
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.executor; import cn.nju.zyy.basic.LiftOff; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author yingyzhang */ public class SingleThreadExecuto...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/executor/SingleThreadExecutor.java
Java
asf20
521
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.executor; import cn.nju.zyy.basic.LiftOff; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author yingyzhang */ public class CachedThreadPool { ...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/executor/CachedThreadPool.java
Java
asf20
555
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.returnresult; import java.util.ArrayList; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.conc...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/returnresult/CallableDemo.java
Java
asf20
1,471
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic; /** * * @author yingyzhang */ public class BasicThreads { public static void main(String[] args) { Thread t = new Thread(new LiftOff()); t.start(); System.ou...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/BasicThreads.java
Java
asf20
362
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic; /** * * @author yingyzhang */ public class MoreBasicThreads { public static void main(String[] args) { for (int i = 0; i < 5; i++) { new Thread(new LiftOff()).start(); } System.o...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/MoreBasicThreads.java
Java
asf20
361
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.variation; import java.util.concurrent.TimeUnit; /** * 浣跨敤鍐呴儴绫诲皢绾跨▼浠g爜闅愯棌鍦ㄧ被涓� * @author yingyzhang */ // Using a named inner class: class InnerThread1 { private int countDown = 5; private...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/variation/ThreadVaiations.java
Java
asf20
3,627
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.variation; /** * * @author yingyzhang */ public class SimpleThread extends Thread { private static int threadCount = 0; private int countDown = 5; public SimpleThread() { // Store th...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/variation/SimpleThread.java
Java
asf20
841
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.variation; /** * * @author yingyzhang */ public class SelfManaged implements Runnable { private int countDown = 5; private Thread t = new Thread(this); public SelfManaged() { t.start(...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/variation/SelfManaged.java
Java
asf20
662
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.exception; import java.lang.Thread.UncaughtExceptionHandler; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; /** ...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/exception/CaptureUncaughtException.java
Java
asf20
1,460
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.exception; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author yingyzhang */ public class ExceptionThread implements Runnable { @Override ...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/exception/ExceptionThread.java
Java
asf20
521
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.exception; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author yingyzhang */ public class NativeExceptionHandling { public static void mai...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/exception/NativeExceptionHandling.java
Java
asf20
589
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.join; /** * * @author yingyzhang */ class Sleeper extends Thread { private int duration; public Sleeper(String name, int sleepTime) { super(name); duration = sleepTime; start(); } ...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/join/Joining.java
Java
asf20
1,195
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic; /** * * @author yingyzhang */ public class LiftOff implements Runnable { private static int taskCount = 0; private final int id = taskCount++; protected int countDown =...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/LiftOff.java
Java
asf20
750
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic; /** * * @author yingyzhang */ public class MainThread { public static void main(String[] args) { LiftOff launch = new LiftOff(); launch.run(); } }
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/MainThread.java
Java
asf20
306
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.daemon; import java.util.concurrent.TimeUnit; /** * * @author yingyzhang */ class ADaemon implements Runnable { @Override public void run() { try { System.out.p...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/daemon/DaemonsDontRunFinally.java
Java
asf20
924
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.daemon; import java.util.concurrent.TimeUnit; /** * * @author yingyzhang */ public class SimpleDaemons implements Runnable { @Override public void run() { try { ...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/daemon/SimpleDaemons.java
Java
asf20
944
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.daemon; import java.util.concurrent.TimeUnit; /** * * @author yingyzhang */ class Daemon implements Runnable { private Thread[] t = new Thread[10]; @Override public void ru...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/daemon/Daemons.java
Java
asf20
1,282
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.daemon; import java.util.concurrent.ThreadFactory; /** * * @author yingyzhang */ public class DaemonThreadFactory implements ThreadFactory { @Override public Thread newThread(Runnab...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/daemon/DaemonThreadFactory.java
Java
asf20
420
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.basic.daemon; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; /** * * @author yingyzhang */ public class DaemonFromFactor...
zyy-design-patterns
trunk/src/cn/nju/zyy/basic/daemon/DaemonFromFactory.java
Java
asf20
914
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.share; /** * * @author yingyzhang */ public class EvenGenerator extends IntGenerator { private int currentEvenValue = 0; // need to be synchronized @Override public int next() { currentEve...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/EvenGenerator.java
Java
asf20
496
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.share; /** * Simplifying mutexes with the synchronized keyword. * * @author yingyzhang */ public class SynchronizedEvenGenerator extends IntGenerator { private int currentEvenValue = 0; @Overr...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/SynchronizedEvenGenerator.java
Java
asf20
575
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.share; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author yingyzhang */ public class EvenChecker implements Runnable { private IntGenerator gener...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/EvenChecker.java
Java
asf20
1,023
package cn.nju.zyy.share.threadlocal; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; class Accessor implements Runnable { private final int id; public Accessor(int id) { this.id = id; } @Overrid...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/threadlocal/ThreadLocalVariableHolder.java
Java
asf20
1,383
package cn.nju.zyy.share.atomic; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicInteger; public class AtomicIntegerTest implements Runnable { private AtomicInteger i = new Atomic...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/atomic/AtomicIntegerTest.java
Java
asf20
1,050
package cn.nju.zyy.share.atomic; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; // Reuses storage so we don't run out of memory class CircularSet { private int[] array; private i...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/atomic/SerialNumberChecker.java
Java
asf20
1,967
package cn.nju.zyy.share.atomic; import java.util.concurrent.atomic.AtomicInteger; import cn.nju.zyy.share.EvenChecker; import cn.nju.zyy.share.IntGenerator; public class AtomicEvenGenerator extends IntGenerator { private AtomicInteger currentEvenValue = new AtomicInteger(0); @Override public int nex...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/atomic/AtomicEvenGenerator.java
Java
asf20
475
package cn.nju.zyy.share.atomic; public class SerialNumberGenerator { private static volatile int serialNumber = 0; // should to be synchronized public static int nextSerialNumber() { return serialNumber++; // Not thread-safe } }
zyy-design-patterns
trunk/src/cn/nju/zyy/share/atomic/SerialNumberGenerator.java
Java
asf20
252
package cn.nju.zyy.share.atomic; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class AtomicityTest implements Runnable { private int i = 0; // should to be synchronized public int getValue() { return i; } private synchronized void evenIncrement() { ...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/atomic/AtomicityTest.java
Java
asf20
780
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.share; /** * * @author yingyzhang */ public abstract class IntGenerator { private volatile boolean canceled = false; public abstract int next(); // Allow this to be canceled: public void can...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/IntGenerator.java
Java
asf20
406
package cn.nju.zyy.share.dual; class DualSynch { private Object syncObject = new Object(); public synchronized void f() { for (int i = 0; i < 5; i++) { System.out.println("f()"); Thread.yield(); } } public void g() { synchronized (syncObject) { for (int i = 0; i < 5; i++) { Syst...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/dual/SyncObject.java
Java
asf20
589
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.share.lock; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; /** * * @author yingyzhang */ public class AttemptLocking { private ReentrantLock lock = new R...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/lock/AttemptLocking.java
Java
asf20
1,439
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package cn.nju.zyy.share.lock; import cn.nju.zyy.share.EvenChecker; import cn.nju.zyy.share.IntGenerator; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * * @author ying...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/lock/MutexEvenGenerator.java
Java
asf20
770
/* * Synchronizing blocks instead of entire methods. * Also demonstrates protection of a non-thread-safe class with a thread-safe one. */ package cn.nju.zyy.share.criticalsection; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; cla...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/criticalsection/CriticalSection.java
Java
asf20
1,804
package cn.nju.zyy.share.criticalsection; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; //Protect a Pair inside a thread-safe class: public abstract class PairManager { AtomicIntege...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/criticalsection/PairManager.java
Java
asf20
1,294
package cn.nju.zyy.share.criticalsection; //Not thread-safe public class Pair { private int x, y; public Pair(int x, int y) { this.x = x; this.y = y; } public Pair() { this(0, 0); } public int getX() { return x; } public int getY() { return y; } public void incremen...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/criticalsection/Pair.java
Java
asf20
845
package cn.nju.zyy.share.criticalsection; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; // Synchronize the entire method: class ExplicitPairManager1 extends PairManager { private Lock lock = new ReentrantLock(); @Override public void increment() { lock.lock...
zyy-design-patterns
trunk/src/cn/nju/zyy/share/criticalsection/ExplicitCriticalSection.java
Java
asf20
1,304
package cn.nju.zyy.cooperation; import java.util.concurrent.TimeUnit; class Car { private boolean waxOn = false; public synchronized void waxed() { waxOn = true; // Ready to buff notifyAll(); } public synchronized void buffed() { waxOn = false; // Ready for another coat of wax notifyAll(...
zyy-design-patterns
trunk/src/cn/nju/zyy/cooperation/WaxOMatic.java
Java
asf20
1,148
/* * Copyright 2010 Google Inc. * * 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 or agreed to i...
zyliu810-gounpk
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListenerCupcake.java
Java
asf20
5,066
/* * Copyright 2010 Google Inc. * * 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 or agreed to i...
zyliu810-gounpk
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListenerFactory.java
Java
asf20
1,650
/* * Copyright 2010 Google Inc. * * 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 or agreed to i...
zyliu810-gounpk
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthService.java
Java
asf20
7,851
/* * Copyright 2010 Google Inc. * * 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 or agreed to i...
zyliu810-gounpk
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListenerEclair.java
Java
asf20
5,217