code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
#!/usr/bin/env python # coding=utf-8 """ The full documentation is at https://python_hangman.readthedocs.org. """ try: from setuptools import setup except ImportError: from distutils.core import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest import sys errno = pytest.main(self.test_args) sys.exit(errno) with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['click', 'future'] test_requirements = ['pytest', 'mock'] setup( # :off name='python_hangman', version='2.2.2', description='Python Hangman TDD/MVC demonstration.', long_description='\n\n'.join([readme, history]), author='Manu Phatak', author_email='bionikspoon@gmail.com', url='https://github.com/bionikspoon/python_hangman', packages=['hangman',], package_dir={'hangman':'hangman'}, include_package_data=True, install_requires=requirements, license='MIT', zip_safe=False, use_2to3=True, cmdclass={'test': PyTest}, keywords='python_hangman Manu Phatak', entry_points={'console_scripts': ['hangman = hangman.__main__:cli']}, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Games/Entertainment :: Puzzle Games', 'Topic :: Terminals', ], test_suite='tests', tests_require=test_requirements ) # :on
bionikspoon/python_hangman
setup.py
Python
mit
2,404
require 'rack/streaming_proxy' Theoj::Application.configure do # Will be inserted at the end of the middleware stack by default. config.middleware.use Rack::StreamingProxy::Proxy do |request| # Inside the request block, return the full URI to redirect the request to, # or nil/false if the request should continue on down the middleware stack. if request.path.start_with?('/proxy') request.params["url"] end end end
erferf/DD
config/initializers/streaming_proxy.rb
Ruby
mit
446
<?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * This file is part of the PWAK (PHP Web Application Kit) framework. * * PWAK is a php framework initially developed for the * {@link http://onlogistics.googlecode.com Onlogistics} ERP/Supply Chain * management web application. * It provides components and tools for developers to build complex web * applications faster and in a more reliable way. * * PHP version 5.1.0+ * * LICENSE: This source file is subject to the MIT license that is available * through the world-wide-web at the following URI: * http://opensource.org/licenses/mit-license.php * * @package PWAK * @author ATEOR dev team <dev@ateor.com> * @copyright 2003-2008 ATEOR <contact@ateor.com> * @license http://opensource.org/licenses/mit-license.php MIT License * @version SVN: $Id$ * @link http://pwak.googlecode.com * @since File available since release 0.1.0 * @filesource */ class GridColumnCallBack extends AbstractGridColumn { /** * GridColumnCallBack::__construct() * * @param string $title * @param array $params * @return void */ function __construct($title = '', $params = array()) { parent::__construct($title, $params); if (isset($params['Func'])) { $this->_func = $params['Func']; } if (isset($params['Args'])) { $this->_args = $params['Args']; } if (isset($params['Macro'])) { $this->_macro = $params['Macro']; } } /** * * @access private */ private $_func = false; private $_args = array(); private $_macro = ''; /** * GridColumnCallBack::render() * * @param $object * @return string */ public function render($object) { if ($this->_macro != '') { $macroParts = explode('.', $this->_macro); eval('$o = $object->get' . implode('()->get', $macroParts) . '();'); } else { $o = $object; } if (is_object($o) && is_callable(array($o, $this->_func))) { return call_user_func_array( array($o, $this->_func), $this->_args ); } return $object->toString(); } } ?>
danilo-cesar/pwak
lib/Grid/Columns/GridColumnCallBack.php
PHP
mit
2,315
# NOTE: run bin/format-filters after changing this file opal_unsupported_filter "Struct" do fails "Struct#initialize is private" fails "Struct.new does not create a constant with symbol as first argument" fails "Struct.new fails with invalid constant name as first argument" # this invalid name gets interpreted as a struct member fails "Struct.new raises a TypeError if object is not a Symbol" end
opal/opal
spec/filters/unsupported/struct.rb
Ruby
mit
407
/// /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// /// Auto-generated by Stone, do not modify. /// #import <Foundation/Foundation.h> #import "DBSerializableProtocol.h" @class DBSHARINGAudienceExceptionContentInfo; @class DBSHARINGAudienceExceptions; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `AudienceExceptions` struct. /// /// The total count and truncated list of information of content inside this /// folder that has a different audience than the link on this folder. This is /// only returned for folders. /// /// This class implements the `DBSerializable` protocol (serialize and /// deserialize instance methods), which is required for all Obj-C SDK API route /// objects. /// @interface DBSHARINGAudienceExceptions : NSObject <DBSerializable, NSCopying> #pragma mark - Instance fields /// (no description). @property (nonatomic, readonly) NSNumber *count; /// A truncated list of some of the content that is an exception. The length of /// this list could be smaller than the count since it is only a sample but will /// not be empty as long as count is not 0. @property (nonatomic, readonly) NSArray<DBSHARINGAudienceExceptionContentInfo *> *exceptions; #pragma mark - Constructors /// /// Full constructor for the struct (exposes all instance variables). /// /// @param count (no description). /// @param exceptions A truncated list of some of the content that is an /// exception. The length of this list could be smaller than the count since it /// is only a sample but will not be empty as long as count is not 0. /// /// @return An initialized instance. /// - (instancetype)initWithCount:(NSNumber *)count exceptions:(NSArray<DBSHARINGAudienceExceptionContentInfo *> *)exceptions; - (instancetype)init NS_UNAVAILABLE; @end #pragma mark - Serializer Object /// /// The serialization class for the `AudienceExceptions` struct. /// @interface DBSHARINGAudienceExceptionsSerializer : NSObject /// /// Serializes `DBSHARINGAudienceExceptions` instances. /// /// @param instance An instance of the `DBSHARINGAudienceExceptions` API object. /// /// @return A json-compatible dictionary representation of the /// `DBSHARINGAudienceExceptions` API object. /// + (nullable NSDictionary *)serialize:(DBSHARINGAudienceExceptions *)instance; /// /// Deserializes `DBSHARINGAudienceExceptions` instances. /// /// @param dict A json-compatible dictionary representation of the /// `DBSHARINGAudienceExceptions` API object. /// /// @return An instantiation of the `DBSHARINGAudienceExceptions` object. /// + (DBSHARINGAudienceExceptions *)deserialize:(NSDictionary *)dict; @end NS_ASSUME_NONNULL_END
wtanuw/WTLibrary-iOS
Example/Pods/ObjectiveDropboxOfficial/Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Sharing/Headers/DBSHARINGAudienceExceptions.h
C
mit
2,672
# encoding: utf-8 from mongoengine.fields import BaseField from marrow.package.canonical import name from marrow.package.loader import load class PythonReferenceField(BaseField): """A field that transforms a callable into a string reference using marrow.package on assignment, then back to the callable when accessing.""" def to_python(self, value): if callable(value): return value return load(value) def to_mongo(self, value): return name(value) def validate(self, value, clean=True): if not callable(value): self.error('Only callables may be used in a %s' % self.__class__.__name__) def prepare_query_value(self, op, value): if not callable(value): return value return name(value)
deKross/task
marrow/task/field.py
Python
mit
717
import { moduleFor, test } from 'ember-qunit'; moduleFor('controller:articles/index', { // Specify the other units that are required for this test. // needs: ['controller:foo'] }); // Replace this with your real tests. test('it exists', function(assert) { var controller = this.subject(); assert.ok(controller); });
BigGillyStyle/borrowers
tests/unit/controllers/articles/index-test.js
JavaScript
mit
330
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Overview: module code &mdash; petl v0.3 documentation</title> <link rel="stylesheet" href="../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '0.3', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="top" title="petl v0.3 documentation" href="../index.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li><a href="../index.html">petl v0.3 documentation</a> &raquo;</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <h1>All modules for which code is available</h1> <ul><li><a href="petl.html">petl</a></li> </ul> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" size="18" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li><a href="../index.html">petl v0.3 documentation</a> &raquo;</li> </ul> </div> <div class="footer"> &copy; Copyright 2011, Alistair Miles. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> </html>
obsoleter/petl
docstage/0.3/_modules/index.html
HTML
mit
3,076
// // Author: // Jb Evain (jbevain@gmail.com) // // Copyright (c) 2008 - 2015 Jb Evain // Copyright (c) 2008 - 2011 Novell, Inc. // // Licensed under the MIT/X11 license. // using System; using System.Collections.Generic; using System.IO; using Mono.Cecil.Cil; using Mono.Collections.Generic; using Mono.CompilerServices.SymbolWriter; namespace Mono.Cecil.Mdb { public sealed class MdbWriterProvider : ISymbolWriterProvider { public ISymbolWriter GetSymbolWriter (ModuleDefinition module, string fileName) { Mixin.CheckModule (module); Mixin.CheckFileName (fileName); return new MdbWriter (module, fileName); } public ISymbolWriter GetSymbolWriter (ModuleDefinition module, Stream symbolStream) { throw new NotImplementedException (); } } public sealed class MdbWriter : ISymbolWriter { readonly ModuleDefinition module; readonly MonoSymbolWriter writer; readonly Dictionary<string, SourceFile> source_files; public MdbWriter (ModuleDefinition module, string assembly) { this.module = module; this.writer = new MonoSymbolWriter (assembly); this.source_files = new Dictionary<string, SourceFile> (); } public ISymbolReaderProvider GetReaderProvider () { return new MdbReaderProvider (); } SourceFile GetSourceFile (Document document) { var url = document.Url; SourceFile source_file; if (source_files.TryGetValue (url, out source_file)) return source_file; var entry = writer.DefineDocument (url, null, document.Hash != null && document.Hash.Length == 16 ? document.Hash : null); var compile_unit = writer.DefineCompilationUnit (entry); source_file = new SourceFile (compile_unit, entry); source_files.Add (url, source_file); return source_file; } void Populate (Collection<SequencePoint> sequencePoints, int [] offsets, int [] startRows, int [] endRows, int [] startCols, int [] endCols, out SourceFile file) { SourceFile source_file = null; for (int i = 0; i < sequencePoints.Count; i++) { var sequence_point = sequencePoints [i]; offsets [i] = sequence_point.Offset; if (source_file == null) source_file = GetSourceFile (sequence_point.Document); startRows [i] = sequence_point.StartLine; endRows [i] = sequence_point.EndLine; startCols [i] = sequence_point.StartColumn; endCols [i] = sequence_point.EndColumn; } file = source_file; } public void Write (MethodDebugInformation info) { var method = new SourceMethod (info.method); var sequence_points = info.SequencePoints; int count = sequence_points.Count; if (count == 0) return; var offsets = new int [count]; var start_rows = new int [count]; var end_rows = new int [count]; var start_cols = new int [count]; var end_cols = new int [count]; SourceFile file; Populate (sequence_points, offsets, start_rows, end_rows, start_cols, end_cols, out file); var builder = writer.OpenMethod (file.CompilationUnit, 0, method); for (int i = 0; i < count; i++) { builder.MarkSequencePoint ( offsets [i], file.CompilationUnit.SourceFile, start_rows [i], start_cols [i], end_rows [i], end_cols [i], false); } if (info.scope != null) WriteRootScope (info.scope, info); writer.CloseMethod (); } void WriteRootScope (ScopeDebugInformation scope, MethodDebugInformation info) { WriteScopeVariables (scope); if (scope.HasScopes) WriteScopes (scope.Scopes, info); } void WriteScope (ScopeDebugInformation scope, MethodDebugInformation info) { writer.OpenScope (scope.Start.Offset); WriteScopeVariables (scope); if (scope.HasScopes) WriteScopes (scope.Scopes, info); writer.CloseScope (scope.End.IsEndOfMethod ? info.code_size : scope.End.Offset); } void WriteScopes (Collection<ScopeDebugInformation> scopes, MethodDebugInformation info) { for (int i = 0; i < scopes.Count; i++) WriteScope (scopes [i], info); } void WriteScopeVariables (ScopeDebugInformation scope) { if (!scope.HasVariables) return; foreach (var variable in scope.variables) if (!string.IsNullOrEmpty (variable.Name)) writer.DefineLocalVariable (variable.Index, variable.Name); } public ImageDebugHeader GetDebugHeader () { return new ImageDebugHeader (); } public void Write () { // Can't write it here since we need the final module MVID - which is only computed // after the entire image of the assembly is written (since it's computed from the hash of that) } public void Dispose () { writer.WriteSymbolFile (module.Mvid); } class SourceFile : ISourceFile { readonly CompileUnitEntry compilation_unit; readonly SourceFileEntry entry; public SourceFileEntry Entry { get { return entry; } } public CompileUnitEntry CompilationUnit { get { return compilation_unit; } } public SourceFile (CompileUnitEntry comp_unit, SourceFileEntry entry) { this.compilation_unit = comp_unit; this.entry = entry; } } class SourceMethod : IMethodDef { readonly MethodDefinition method; public string Name { get { return method.Name; } } public int Token { get { return method.MetadataToken.ToInt32 (); } } public SourceMethod (MethodDefinition method) { this.method = method; } } } }
mono/cecil
symbols/mdb/Mono.Cecil.Mdb/MdbWriter.cs
C#
mit
5,363
<?php namespace Gites\GitesBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class SlidesControllerTest extends WebTestCase { /* public function testCompleteScenario() { // Create a new client to browse the application $client = static::createClient(); // Create a new entry in the database $crawler = $client->request('GET', '/admin/slides/'); $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /admin/slides/"); $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); // Fill in the form and submit it $form = $crawler->selectButton('Create')->form(array( 'gites_gitesbundle_slides[field_name]' => 'Test', // ... other fields to fill )); $client->submit($form); $crawler = $client->followRedirect(); // Check data in the show view $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); // Edit the entity $crawler = $client->click($crawler->selectLink('Edit')->link()); $form = $crawler->selectButton('Update')->form(array( 'gites_gitesbundle_slides[field_name]' => 'Foo', // ... other fields to fill )); $client->submit($form); $crawler = $client->followRedirect(); // Check the element contains an attribute with value equals "Foo" $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); // Delete the entity $client->submit($crawler->selectButton('Delete')->form()); $crawler = $client->followRedirect(); // Check the entity has been delete on the list $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); } */ }
davidgerard66/galte
src/Gites/GitesBundle/Tests/Controller/SlidesControllerTest.php
PHP
mit
1,944
<h3>Off Canvas</h3> <nav class="offCanvas" id="offCanvas"> <ul> <li><a href="#">Item 1</a></li> <li><a href="#">Item 2</a></li> <li><a href="#">Item 3</a></li> <li><a href="#">Item 4</a></li> <li><a href="#">Item 5</a></li> </ul> </nav> <div class="offCanvas-bar"> <a id="hamburger-icon" href="#" title="Menu"> <span class="line line-1"></span> <span class="line line-2"></span> <span class="line line-3"></span> <span>menu</span> </a> </div>
WhatsNewSaes/Sherpa
_input/includes/navigation/offCanvas.html
HTML
mit
531
// // STDemoRootViewControllerEnum.h // CJStandardProjectDemo // // Created by 李超前 on 10/29/18. // Copyright © 2018 devlproad. All rights reserved. // #ifndef STDemoRootViewControllerEnum_h #define STDemoRootViewControllerEnum_h /** * 启动页类型 */ typedef NS_ENUM(NSUInteger, STDemoRootViewControllerType) { STDemoRootViewControllerTypeNone, STDemoRootViewControllerTypeGuide = 1, /**< 引导页 */ STDemoRootViewControllerTypeLogin, /**< 登录页 */ STDemoRootViewControllerTypeMain, /**< 主页 */ }; #endif /* STDemoRootViewControllerEnum_h */
dvlproad/CJFoundation
CJStandardProjectDemo/CJStandardProjectDemo/AppDelegate/LogicControl(将AppDelegate的所有Logic放在一起)/STDemoRootViewControllerEnum.h
C
mit
599
/* Copyright (C) 1996-1997 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // sv_main.c -- server main program #include "bspfile.h" #include "cmd.h" #include "console.h" #include "cvar.h" #include "host.h" #include "model.h" #include "net.h" #include "protocol.h" #include "quakedef.h" #include "screen.h" #include "server.h" #include "sound.h" #include "sys.h" #include "world.h" server_t sv; server_static_t svs; /* inline model names for precache */ #define MODSTRLEN (sizeof("*" stringify(MAX_MODELS)) / sizeof(char)) static char localmodels[MAX_MODELS][MODSTRLEN]; //============================================================================ typedef struct { int version; const char *name; const char *description; } sv_protocol_t; #define PROT(v, n, d) { .version = v, .name = n, .description = d } static sv_protocol_t sv_protocols[] = { PROT(PROTOCOL_VERSION_NQ, "nq", "Standard NetQuake protocol"), PROT(PROTOCOL_VERSION_FITZ, "fitz", "FitzQuake protocol"), PROT(PROTOCOL_VERSION_BJP, "bjp", "BJP protocol (v1)"), PROT(PROTOCOL_VERSION_BJP2, "bjp2", "BJP protocol (v2)"), PROT(PROTOCOL_VERSION_BJP3, "bjp3", "BJP protocol (v3)"), }; static int sv_protocol = PROTOCOL_VERSION_NQ; static void SV_Protocol_f(void) { const char *name = "unknown"; int i; if (Cmd_Argc() == 1) { for (i = 0; i < ARRAY_SIZE(sv_protocols); i++) { if (sv_protocols[i].version == sv_protocol) { name = sv_protocols[i].name; break; } } Con_Printf("sv_protocol is %d (%s)\n" " use 'sv_protocol list' to list available protocols\n", sv_protocol, name); } else if (Cmd_Argc() == 2) { if (!strcasecmp(Cmd_Argv(1), "list")) { Con_Printf("Version Name Description\n" "------- ---- -----------\n"); for (i = 0; i < ARRAY_SIZE(sv_protocols); i++) { Con_Printf("%7d %-4s %s\n", sv_protocols[i].version, sv_protocols[i].name, sv_protocols[i].description); } } else { int v = Q_atoi(Cmd_Argv(1)); for (i = 0; i < ARRAY_SIZE(sv_protocols); i++) { if (sv_protocols[i].version == v) break; if (!strcasecmp(sv_protocols[i].name, Cmd_Argv(1))) break; } if (i == ARRAY_SIZE(sv_protocols)) { Con_Printf("sv_protocol: unknown protocol version\n"); return; } if (sv_protocol != sv_protocols[i].version) { sv_protocol = sv_protocols[i].version; if (sv.active) Con_Printf("change will not take effect until the next " "level load.\n"); } } } else { Con_Printf("Usage: sv_protocol [<version> | <name> | 'list']\n"); } } static struct stree_root * SV_Protocol_Arg_f(const char *arg) { int i, arg_len; char digits[10]; struct stree_root *root; root = Z_Malloc(sizeof(struct stree_root)); if (root) { *root = STREE_ROOT; STree_AllocInit(); arg_len = arg ? strlen(arg) : 0; for (i = 0; i < ARRAY_SIZE(sv_protocols); i++) { if (!arg || !strncasecmp(sv_protocols[i].name, arg, arg_len)) STree_InsertAlloc(root, sv_protocols[i].name, false); snprintf(digits, sizeof(digits), "%d", sv_protocols[i].version); if (arg_len && !strncmp(digits, arg, arg_len)) STree_InsertAlloc(root, digits, true); } } return root; } /* =============== SV_Init =============== */ void SV_Init(void) { int i; Cvar_RegisterVariable(&sv_maxvelocity); Cvar_RegisterVariable(&sv_gravity); Cvar_RegisterVariable(&sv_friction); Cvar_RegisterVariable(&sv_edgefriction); Cvar_RegisterVariable(&sv_stopspeed); Cvar_RegisterVariable(&sv_maxspeed); Cvar_RegisterVariable(&sv_accelerate); Cvar_RegisterVariable(&sv_idealpitchscale); Cvar_RegisterVariable(&sv_aim); Cvar_RegisterVariable(&sv_nostep); Cmd_AddCommand("sv_protocol", SV_Protocol_f); Cmd_SetCompletion("sv_protocol", SV_Protocol_Arg_f); for (i = 0; i < MAX_MODELS; i++) sprintf(localmodels[i], "*%i", i); } /* ============================================================================= EVENT MESSAGES ============================================================================= */ /* ================== SV_StartParticle Make sure the event gets sent to all clients ================== */ void SV_StartParticle(vec3_t org, vec3_t dir, int color, int count) { int i, v; /* * Drop silently if there is no room * FIXME - does not take into account MTU... */ if (sv.datagram.cursize > MAX_DATAGRAM - 12) return; MSG_WriteByte(&sv.datagram, svc_particle); MSG_WriteCoord(&sv.datagram, org[0]); MSG_WriteCoord(&sv.datagram, org[1]); MSG_WriteCoord(&sv.datagram, org[2]); for (i = 0; i < 3; i++) { v = dir[i] * 16; if (v > 127) v = 127; else if (v < -128) v = -128; MSG_WriteChar(&sv.datagram, v); } MSG_WriteByte(&sv.datagram, count); MSG_WriteByte(&sv.datagram, color); } static void SV_WriteSoundNum(sizebuf_t *sb, int c, unsigned int bits) { switch (sv.protocol) { case PROTOCOL_VERSION_NQ: case PROTOCOL_VERSION_BJP: MSG_WriteByte(sb, c); break; case PROTOCOL_VERSION_BJP2: case PROTOCOL_VERSION_BJP3: MSG_WriteShort(sb, c); break; case PROTOCOL_VERSION_FITZ: if (bits & SND_FITZ_LARGESOUND) MSG_WriteShort(sb, c); else MSG_WriteByte(sb, c); break; default: Host_Error("%s: Unknown protocol version (%d)\n", __func__, sv.protocol); } } /* ================== SV_StartSound Each entity can have eight independant sound sources, like voice, weapon, feet, etc. Channel 0 is an auto-allocate channel, the others override anything already running on that entity/channel pair. An attenuation of 0 will play full volume everywhere in the level. Larger attenuations will drop off. (max 4 attenuation) ================== */ void SV_StartSound(edict_t *entity, int channel, const char *sample, int volume, float attenuation) { int sound_num; int field_mask; int i; int ent; float coord; if (volume < 0 || volume > 255) Sys_Error("%s: volume = %i", __func__, volume); if (attenuation < 0 || attenuation > 4) Sys_Error("%s: attenuation = %f", __func__, attenuation); if (channel < 0 || channel > 7) Sys_Error("%s: channel = %i", __func__, channel); /* * Drop silently if there is no room * FIXME - does not take into account MTU... */ if (sv.datagram.cursize > MAX_DATAGRAM - 14) return; // find precache number for sound for (sound_num = 1; sound_num < MAX_SOUNDS && sv.sound_precache[sound_num]; sound_num++) if (!strcmp(sample, sv.sound_precache[sound_num])) break; if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) { Con_Printf("%s: %s not precacheed\n", __func__, sample); return; } ent = NUM_FOR_EDICT(entity); field_mask = 0; if (volume != DEFAULT_SOUND_PACKET_VOLUME) field_mask |= SND_VOLUME; if (attenuation != DEFAULT_SOUND_PACKET_ATTENUATION) field_mask |= SND_ATTENUATION; if (ent >= 8192) { if (sv.protocol != PROTOCOL_VERSION_FITZ) return; /* currently no other protocols can encode these */ field_mask |= SND_FITZ_LARGEENTITY; } if (sound_num >= 256 || channel >= 8) { if (sv.protocol != PROTOCOL_VERSION_FITZ) return; /* currently no other protocols can encode these */ field_mask |= SND_FITZ_LARGESOUND; } // directed messages go only to the entity the are targeted on MSG_WriteByte(&sv.datagram, svc_sound); MSG_WriteByte(&sv.datagram, field_mask); if (field_mask & SND_VOLUME) MSG_WriteByte(&sv.datagram, volume); if (field_mask & SND_ATTENUATION) MSG_WriteByte(&sv.datagram, attenuation * 64); if (field_mask & SND_FITZ_LARGEENTITY) { MSG_WriteShort(&sv.datagram, ent); MSG_WriteByte(&sv.datagram, channel); } else { MSG_WriteShort(&sv.datagram, (ent << 3) | channel); } SV_WriteSoundNum(&sv.datagram, sound_num, field_mask); for (i = 0; i < 3; i++) { coord = entity->v.origin[i]; coord += 0.5 * (entity->v.mins[i] + entity->v.maxs[i]); MSG_WriteCoord(&sv.datagram, coord); } } /* ============================================================================== CLIENT SPAWNING ============================================================================== */ /* ================ SV_SendServerinfo Sends the first message from the server to a connected client. This will be sent on the initial connection and upon each server load. ================ */ void SV_SendServerinfo(client_t *client) { const char **s; MSG_WriteByte(&client->message, svc_print); MSG_WriteStringf(&client->message, "%c\nVERSION TyrQuake-%s SERVER (%i CRC)", 2, stringify(TYR_VERSION), pr_crc); MSG_WriteByte(&client->message, svc_serverinfo); MSG_WriteLong(&client->message, sv.protocol); MSG_WriteByte(&client->message, svs.maxclients); if (!coop.value && deathmatch.value) MSG_WriteByte(&client->message, GAME_DEATHMATCH); else MSG_WriteByte(&client->message, GAME_COOP); MSG_WriteString(&client->message, PR_GetString(sv.edicts->v.message)); for (s = sv.model_precache + 1; *s; s++) MSG_WriteString(&client->message, *s); MSG_WriteByte(&client->message, 0); for (s = sv.sound_precache + 1; *s; s++) MSG_WriteString(&client->message, *s); MSG_WriteByte(&client->message, 0); // send music MSG_WriteByte(&client->message, svc_cdtrack); MSG_WriteByte(&client->message, sv.edicts->v.sounds); MSG_WriteByte(&client->message, sv.edicts->v.sounds); // set view MSG_WriteByte(&client->message, svc_setview); MSG_WriteShort(&client->message, NUM_FOR_EDICT(client->edict)); MSG_WriteByte(&client->message, svc_signonnum); MSG_WriteByte(&client->message, 1); client->sendsignon = true; client->spawned = false; // need prespawn, spawn, etc } /* ================ SV_ConnectClient Initializes a client_t for a new net connection. This will only be called once for a player each game, not once for each level change. ================ */ void SV_ConnectClient(int clientnum) { edict_t *ent; client_t *client; int edictnum; struct qsocket_s *netconnection; int i; float spawn_parms[NUM_SPAWN_PARMS]; client = svs.clients + clientnum; Con_DPrintf("Client %s connected\n", client->netconnection->address); edictnum = clientnum + 1; ent = EDICT_NUM(edictnum); // set up the client_t netconnection = client->netconnection; if (sv.loadgame) memcpy(spawn_parms, client->spawn_parms, sizeof(spawn_parms)); memset(client, 0, sizeof(*client)); client->netconnection = netconnection; strcpy(client->name, "unconnected"); client->active = true; client->spawned = false; client->edict = ent; client->message.data = client->msgbuf; client->message.maxsize = sizeof(client->msgbuf); client->message.allowoverflow = true; // we can catch it if (sv.loadgame) { memcpy(client->spawn_parms, spawn_parms, sizeof(spawn_parms)); } else { // call the progs to get default spawn parms for the new client PR_ExecuteProgram(pr_global_struct->SetNewParms); for (i = 0; i < NUM_SPAWN_PARMS; i++) client->spawn_parms[i] = (&pr_global_struct->parm1)[i]; } SV_SendServerinfo(client); } /* =================== SV_CheckForNewClients =================== */ void SV_CheckForNewClients(void) { struct qsocket_s *sock; int i; // // check for new connections // while (1) { sock = NET_CheckNewConnections(); if (!sock) break; // // init a new client structure // for (i = 0; i < svs.maxclients; i++) if (!svs.clients[i].active) break; if (i == svs.maxclients) Sys_Error("%s: no free clients", __func__); svs.clients[i].netconnection = sock; SV_ConnectClient(i); net_activeconnections++; } } /* =============================================================================== FRAME UPDATES =============================================================================== */ /* ================== SV_ClearDatagram ================== */ void SV_ClearDatagram(void) { SZ_Clear(&sv.datagram); } //============================================================================= void SV_WriteModelIndex(sizebuf_t *sb, int c, unsigned int bits) { switch (sv.protocol) { case PROTOCOL_VERSION_NQ: MSG_WriteByte(sb, c); break; case PROTOCOL_VERSION_BJP: case PROTOCOL_VERSION_BJP2: case PROTOCOL_VERSION_BJP3: MSG_WriteShort(sb, c); break; case PROTOCOL_VERSION_FITZ: if (bits & B_FITZ_LARGEMODEL) MSG_WriteShort(sb, c); else MSG_WriteByte(sb, c); break; default: Host_Error("%s: Unknown protocol version (%d)\n", __func__, sv.protocol); } } /* ============= SV_WriteEntitiesToClient ============= */ void SV_WriteEntitiesToClient(edict_t *clent, sizebuf_t *msg) { int e, i; int bits; const leafbits_t *pvs; vec3_t org; float miss; edict_t *ent; // find the client's PVS VectorAdd(clent->v.origin, clent->v.view_ofs, org); pvs = Mod_FatPVS(sv.worldmodel, org); // send over all entities (excpet the client) that touch the pvs ent = NEXT_EDICT(sv.edicts); for (e = 1; e < sv.num_edicts; e++, ent = NEXT_EDICT(ent)) { // clent is ALWAYS sent if (ent != clent) { // ignore ents without visible models if (!ent->v.modelindex || !*PR_GetString(ent->v.model)) continue; // ignore if not touching a PV leaf for (i = 0; i < ent->num_leafs; i++) if (Mod_TestLeafBit(pvs, ent->leafnums[i])) break; if (i == ent->num_leafs) continue; // not visible } if (msg->maxsize - msg->cursize < 16) { Con_Printf("packet overflow\n"); return; } // send an update bits = 0; for (i = 0; i < 3; i++) { miss = ent->v.origin[i] - ent->baseline.origin[i]; if (miss < -0.1 || miss > 0.1) bits |= U_ORIGIN1 << i; } if (ent->v.angles[0] != ent->baseline.angles[0]) bits |= U_ANGLE1; if (ent->v.angles[1] != ent->baseline.angles[1]) bits |= U_ANGLE2; if (ent->v.angles[2] != ent->baseline.angles[2]) bits |= U_ANGLE3; if (ent->v.movetype == MOVETYPE_STEP) bits |= U_NOLERP; // don't mess up the step animation if (ent->baseline.colormap != ent->v.colormap) bits |= U_COLORMAP; if (ent->baseline.skinnum != ent->v.skin) bits |= U_SKIN; if (ent->baseline.frame != ent->v.frame) bits |= U_FRAME; if (ent->baseline.effects != ent->v.effects) bits |= U_EFFECTS; if (ent->baseline.modelindex != ent->v.modelindex) bits |= U_MODEL; /* FIXME - TODO: add alpha stuff here */ if (sv.protocol == PROTOCOL_VERSION_FITZ) { if ((bits & U_FRAME) && ((int)ent->v.frame & 0xff00)) bits |= U_FITZ_FRAME2; if ((bits & U_MODEL) && ((int)ent->v.modelindex & 0xff00)) bits |= U_FITZ_MODEL2; /* FIXME - Add the U_LERPFINISH bit */ if (bits & 0x00ff0000) bits |= U_FITZ_EXTEND1; if (bits & 0xff000000) bits |= U_FITZ_EXTEND2; } if (e >= 256) bits |= U_LONGENTITY; if (bits >= 256) bits |= U_MOREBITS; // // write the message // MSG_WriteByte(msg, bits | U_SIGNAL); if (bits & U_MOREBITS) MSG_WriteByte(msg, bits >> 8); if (bits & U_FITZ_EXTEND1) MSG_WriteByte(msg, bits >> 16); if (bits & U_FITZ_EXTEND2) MSG_WriteByte(msg, bits >> 24); if (bits & U_LONGENTITY) MSG_WriteShort(msg, e); else MSG_WriteByte(msg, e); if (bits & U_MODEL) SV_WriteModelIndex(msg, ent->v.modelindex, 0); if (bits & U_FRAME) MSG_WriteByte(msg, ent->v.frame); if (bits & U_COLORMAP) MSG_WriteByte(msg, ent->v.colormap); if (bits & U_SKIN) MSG_WriteByte(msg, ent->v.skin); if (bits & U_EFFECTS) MSG_WriteByte(msg, ent->v.effects); if (bits & U_ORIGIN1) MSG_WriteCoord(msg, ent->v.origin[0]); if (bits & U_ANGLE1) MSG_WriteAngle(msg, ent->v.angles[0]); if (bits & U_ORIGIN2) MSG_WriteCoord(msg, ent->v.origin[1]); if (bits & U_ANGLE2) MSG_WriteAngle(msg, ent->v.angles[1]); if (bits & U_ORIGIN3) MSG_WriteCoord(msg, ent->v.origin[2]); if (bits & U_ANGLE3) MSG_WriteAngle(msg, ent->v.angles[2]); #if 0 /* FIXME */ if (bits & U_FITZ_ALPHA) MSG_WriteByte(msg, ent->alpha); #endif if (bits & U_FITZ_FRAME2) MSG_WriteByte(msg, (int)ent->v.frame >> 8); if (bits & U_FITZ_MODEL2) MSG_WriteByte(msg, (int)ent->v.modelindex >> 8); #if 0 /* FIXME */ if (bits & U_FITZ_LERPFINISH) MSG_WriteByte(msg, (byte)floorf(((ent->v.nextthink - sv.time) * 255.0f) + 0.5f)); #endif } } /* ============= SV_CleanupEnts ============= */ void SV_CleanupEnts(void) { int e; edict_t *ent; ent = NEXT_EDICT(sv.edicts); for (e = 1; e < sv.num_edicts; e++, ent = NEXT_EDICT(ent)) { ent->v.effects = (int)ent->v.effects & ~EF_MUZZLEFLASH; } } /* ================== SV_WriteClientdataToMessage ================== */ void SV_WriteClientdataToMessage(edict_t *player, sizebuf_t *msg) { int bits; int i; edict_t *other; int items; eval_t *items2; float coord; // // send a damage message // if (player->v.dmg_take || player->v.dmg_save) { other = PROG_TO_EDICT(player->v.dmg_inflictor); MSG_WriteByte(msg, svc_damage); MSG_WriteByte(msg, player->v.dmg_save); MSG_WriteByte(msg, player->v.dmg_take); for (i = 0; i < 3; i++) { coord = other->v.origin[i]; coord += 0.5 * (other->v.mins[i] + other->v.maxs[i]); MSG_WriteCoord(msg, coord); } player->v.dmg_take = 0; player->v.dmg_save = 0; } // // send the current viewpos offset from the view entity // /* how much to look up / down ideally */ SV_SetIdealPitch(player); // a fixangle might get lost in a dropped packet. Oh well. if (player->v.fixangle) { MSG_WriteByte(msg, svc_setangle); for (i = 0; i < 3; i++) MSG_WriteAngle(msg, player->v.angles[i]); player->v.fixangle = 0; } bits = 0; if (player->v.view_ofs[2] != DEFAULT_VIEWHEIGHT) bits |= SU_VIEWHEIGHT; if (player->v.idealpitch) bits |= SU_IDEALPITCH; // stuff the sigil bits into the high bits of items for sbar, or else // mix in items2 items = player->v.items; items2 = GetEdictFieldValue(player, "items2"); if (items2) items |= (int)items2->_float << 23; else items |= (int)pr_global_struct->serverflags << 28; bits |= SU_ITEMS; if ((int)player->v.flags & FL_ONGROUND) bits |= SU_ONGROUND; if (player->v.waterlevel >= 2) bits |= SU_INWATER; for (i = 0; i < 3; i++) { if (player->v.punchangle[i]) bits |= (SU_PUNCH1 << i); if (player->v.velocity[i]) bits |= (SU_VELOCITY1 << i); } if (player->v.weaponframe) bits |= SU_WEAPONFRAME; if (player->v.armorvalue) bits |= SU_ARMOR; //if (player->v.weapon) bits |= SU_WEAPON; if (sv.protocol == PROTOCOL_VERSION_FITZ) { if ((bits & SU_WEAPON) && (SV_ModelIndex(PR_GetString(player->v.weaponmodel)) & 0xff00)) bits |= SU_FITZ_WEAPON2; if ((int)player->v.armorvalue & 0xff00) bits |= SU_FITZ_ARMOR2; if ((int)player->v.currentammo & 0xff00) bits |= SU_FITZ_AMMO2; if ((int)player->v.ammo_shells & 0xff00) bits |= SU_FITZ_SHELLS2; if ((int)player->v.ammo_nails & 0xff00) bits |= SU_FITZ_NAILS2; if ((int)player->v.ammo_rockets & 0xff00) bits |= SU_FITZ_ROCKETS2; if ((int)player->v.ammo_cells & 0xff00) bits |= SU_FITZ_CELLS2; if ((bits & SU_WEAPONFRAME) && ((int)player->v.weaponframe & 0xff00)) bits |= SU_FITZ_WEAPONFRAME2; #if 0 /* FIXME - TODO */ if ((bits & SU_WEAPON) && player->alpha != ENTALPHA_DEFAULT) // for now, weaponalpha = client entity alpha bits |= SU_FITZ_WEAPONALPHA; #endif if (bits & 0x00ff0000) bits |= SU_FITZ_EXTEND1; if (bits & 0xff000000) bits |= SU_FITZ_EXTEND2; } // send the data MSG_WriteByte(msg, svc_clientdata); MSG_WriteShort(msg, bits); if (bits & SU_FITZ_EXTEND1) MSG_WriteByte(msg, bits >> 16); if (bits & SU_FITZ_EXTEND2) MSG_WriteByte(msg, bits >> 24); if (bits & SU_VIEWHEIGHT) MSG_WriteChar(msg, player->v.view_ofs[2]); if (bits & SU_IDEALPITCH) MSG_WriteChar(msg, player->v.idealpitch); for (i = 0; i < 3; i++) { if (bits & (SU_PUNCH1 << i)) MSG_WriteChar(msg, player->v.punchangle[i]); if (bits & (SU_VELOCITY1 << i)) MSG_WriteChar(msg, player->v.velocity[i] / 16); } // [always sent] if (bits & SU_ITEMS) MSG_WriteLong(msg, items); if (bits & SU_WEAPONFRAME) MSG_WriteByte(msg, player->v.weaponframe); if (bits & SU_ARMOR) MSG_WriteByte(msg, player->v.armorvalue); if (bits & SU_WEAPON) SV_WriteModelIndex(msg, SV_ModelIndex(PR_GetString(player->v.weaponmodel)), 0); MSG_WriteShort(msg, player->v.health); MSG_WriteByte(msg, player->v.currentammo); MSG_WriteByte(msg, player->v.ammo_shells); MSG_WriteByte(msg, player->v.ammo_nails); MSG_WriteByte(msg, player->v.ammo_rockets); MSG_WriteByte(msg, player->v.ammo_cells); if (standard_quake) { MSG_WriteByte(msg, player->v.weapon); } else { for (i = 0; i < 32; i++) { if (((int)player->v.weapon) & (1 << i)) { MSG_WriteByte(msg, i); break; } } } /* FITZ protocol stuff */ if (bits & SU_FITZ_WEAPON2) MSG_WriteByte(msg, SV_ModelIndex(PR_GetString(player->v.weaponmodel)) >> 8); if (bits & SU_FITZ_ARMOR2) MSG_WriteByte(msg, (int)player->v.armorvalue >> 8); if (bits & SU_FITZ_AMMO2) MSG_WriteByte(msg, (int)player->v.currentammo >> 8); if (bits & SU_FITZ_SHELLS2) MSG_WriteByte(msg, (int)player->v.ammo_shells >> 8); if (bits & SU_FITZ_NAILS2) MSG_WriteByte(msg, (int)player->v.ammo_nails >> 8); if (bits & SU_FITZ_ROCKETS2) MSG_WriteByte(msg, (int)player->v.ammo_rockets >> 8); if (bits & SU_FITZ_CELLS2) MSG_WriteByte(msg, (int)player->v.ammo_cells >> 8); if (bits & SU_FITZ_WEAPONFRAME2) MSG_WriteByte(msg, (int)player->v.weaponframe >> 8); #if 0 /* FIXME - TODO */ if (bits & SU_FITZ_WEAPONALPHA) // for now, weaponalpha = client entity alpha MSG_WriteByte(msg, player->alpha); #endif } /* ======================= SV_SendClientDatagram ======================= */ qboolean SV_SendClientDatagram(client_t *client) { byte buf[MAX_DATAGRAM]; sizebuf_t msg; int err; msg.data = buf; msg.maxsize = qmin(MAX_DATAGRAM, client->netconnection->mtu); msg.cursize = 0; MSG_WriteByte(&msg, svc_time); MSG_WriteFloat(&msg, sv.time); // add the client specific data to the datagram SV_WriteClientdataToMessage(client->edict, &msg); SV_WriteEntitiesToClient(client->edict, &msg); // copy the server datagram if there is space if (msg.cursize + sv.datagram.cursize < msg.maxsize) SZ_Write(&msg, sv.datagram.data, sv.datagram.cursize); // send the datagram err = NET_SendUnreliableMessage(client->netconnection, &msg); /* if the message couldn't send, kick the client off */ if (err == -1) { SV_DropClient(client, true); return false; } return true; } /* ======================= SV_UpdateToReliableMessages ======================= */ void SV_UpdateToReliableMessages(void) { int i, j; client_t *client, *recipient; /* check for changes to be sent over the reliable streams */ client = svs.clients; for (i = 0; i < svs.maxclients; i++, client++) { if (client->old_frags != client->edict->v.frags) { recipient = svs.clients; for (j = 0; j < svs.maxclients; j++, recipient++) { if (!recipient->active) continue; MSG_WriteByte(&recipient->message, svc_updatefrags); MSG_WriteByte(&recipient->message, i); MSG_WriteShort(&recipient->message, client->edict->v.frags); } client->old_frags = client->edict->v.frags; } } recipient = svs.clients; for (i = 0; i < svs.maxclients; i++, recipient++) { if (!recipient->active) continue; SZ_Write(&recipient->message, sv.reliable_datagram.data, sv.reliable_datagram.cursize); } SZ_Clear(&sv.reliable_datagram); } /* ======================= SV_SendNop Send a nop message without trashing or sending the accumulated client message buffer ======================= */ void SV_SendNop(client_t *client) { sizebuf_t msg; byte buf[4]; int err; msg.data = buf; msg.maxsize = sizeof(buf); msg.cursize = 0; MSG_WriteChar(&msg, svc_nop); err = NET_SendUnreliableMessage(client->netconnection, &msg); /* if the message couldn't send, kick the client off */ if (err == -1) SV_DropClient(client, true); client->last_message = realtime; } /* ======================= SV_SendClientMessages ======================= */ void SV_SendClientMessages(void) { int i, err; client_t *client; /* update frags, names, etc */ SV_UpdateToReliableMessages(); /* build individual updates */ client = svs.clients; for (i = 0; i < svs.maxclients; i++, client++) { if (!client->active) continue; if (client->spawned) { if (!SV_SendClientDatagram(client)) continue; } else { /* * The player isn't totally in the game yet. Send small keepalive * messages if too much time has passed. Send a full message when * the next signon stage has been requested. Some other message * data (name changes, etc) may accumulate between signon stages. */ if (!client->sendsignon) { if (realtime - client->last_message > 5) SV_SendNop(client); /* don't send out non-signon messages */ continue; } } /* * Check for an overflowed message. Should only happen on a very * fucked up connection that backs up a lot, then changes level. */ if (client->message.overflowed) { SV_DropClient(client, true); client->message.overflowed = false; continue; } if (!client->message.cursize && !client->dropasap) continue; if (!NET_CanSendMessage(client->netconnection)) continue; if (client->dropasap) { /* went to another level */ SV_DropClient(client, false); continue; } err = NET_SendMessage(client->netconnection, &client->message); if (err == -1) SV_DropClient(client, true); SZ_Clear(&client->message); client->last_message = realtime; client->sendsignon = false; } /* clear muzzle flashes */ SV_CleanupEnts(); } /* ============================================================================== SERVER SPAWNING ============================================================================== */ /* ================ SV_ModelIndex ================ */ int SV_ModelIndex(const char *name) { int i; if (!name || !name[0]) return 0; for (i = 0; i < MAX_MODELS && sv.model_precache[i]; i++) if (!strcmp(sv.model_precache[i], name)) return i; if (i == MAX_MODELS || !sv.model_precache[i]) Sys_Error("%s: model %s not precached", __func__, name); return i; } /* ================ SV_CreateBaseline ================ */ void SV_CreateBaseline(void) { int i; edict_t *svent; int entnum; unsigned int bits; for (entnum = 0; entnum < sv.num_edicts; entnum++) { // get the current server version svent = EDICT_NUM(entnum); if (svent->free) continue; if (entnum > svs.maxclients && !svent->v.modelindex) continue; // // create entity baseline // VectorCopy(svent->v.origin, svent->baseline.origin); VectorCopy(svent->v.angles, svent->baseline.angles); svent->baseline.frame = svent->v.frame; svent->baseline.skinnum = svent->v.skin; if (entnum > 0 && entnum <= svs.maxclients) { svent->baseline.colormap = entnum; svent->baseline.modelindex = SV_ModelIndex("progs/player.mdl"); } else { svent->baseline.colormap = 0; svent->baseline.modelindex = SV_ModelIndex(PR_GetString(svent->v.model)); } bits = 0; if (sv.protocol == PROTOCOL_VERSION_FITZ) { if (svent->baseline.modelindex & 0xff00) bits |= B_FITZ_LARGEMODEL; if (svent->baseline.frame & 0xff00) bits |= B_FITZ_LARGEFRAME; #if 0 /* FIXME - TODO */ if (svent->baseline.alpha != ENTALPHA_DEFAULT) bits |= B_FITZ_ALPHA #endif } // // add to the message // if (bits) { MSG_WriteByte(&sv.signon, svc_fitz_spawnbaseline2); MSG_WriteShort(&sv.signon, entnum); MSG_WriteByte(&sv.signon, bits); } else { MSG_WriteByte(&sv.signon, svc_spawnbaseline); MSG_WriteShort(&sv.signon, entnum); } SV_WriteModelIndex(&sv.signon, svent->baseline.modelindex, bits); if (bits & B_FITZ_LARGEFRAME) MSG_WriteShort(&sv.signon, svent->baseline.frame); else MSG_WriteByte(&sv.signon, svent->baseline.frame); MSG_WriteByte(&sv.signon, svent->baseline.colormap); MSG_WriteByte(&sv.signon, svent->baseline.skinnum); for (i = 0; i < 3; i++) { MSG_WriteCoord(&sv.signon, svent->baseline.origin[i]); MSG_WriteAngle(&sv.signon, svent->baseline.angles[i]); } #if 0 /* FIXME - TODO */ if (bits & B_FITZ_ALPHA) MSG_WriteByte(&sv.signon, svent->baseline.alpha); #endif } } /* ================ SV_SendReconnect Tell all the clients that the server is changing levels ================ */ void SV_SendReconnect(void) { byte data[128]; sizebuf_t msg; msg.data = data; msg.cursize = 0; msg.maxsize = sizeof(data); MSG_WriteChar(&msg, svc_stufftext); MSG_WriteString(&msg, "reconnect\n"); NET_SendToAll(&msg, 5); if (cls.state != ca_dedicated) Cmd_ExecuteString("reconnect\n", src_command); } /* ================ SV_SaveSpawnparms Grabs the current state of each client for saving across the transition to another level ================ */ void SV_SaveSpawnparms(void) { int i, j; client_t *client; svs.serverflags = pr_global_struct->serverflags; client = svs.clients; for (i = 0; i < svs.maxclients; i++, client++) { if (!client->active) continue; /* call the progs to get default spawn parms for the new client */ pr_global_struct->self = EDICT_TO_PROG(client->edict); PR_ExecuteProgram(pr_global_struct->SetChangeParms); for (j = 0; j < NUM_SPAWN_PARMS; j++) client->spawn_parms[j] = (&pr_global_struct->parm1)[j]; } } /* ================ SV_SpawnServer This is called at the start of each level ================ */ void SV_SpawnServer(char *server) { model_t *model; client_t *client; edict_t *ent; int i; // let's not have any servers with no name if (hostname.string[0] == 0) Cvar_Set("hostname", "UNNAMED"); scr_centertime_off = 0; Con_DPrintf("SpawnServer: %s\n", server); svs.changelevel_issued = false; // now safe to issue another // // tell all connected clients that we are going to a new level // if (sv.active) { SV_SendReconnect(); } // // make cvars consistant // if (coop.value) Cvar_SetValue("deathmatch", 0); current_skill = (int)(skill.value + 0.5); if (current_skill < 0) current_skill = 0; if (current_skill > 3) current_skill = 3; Cvar_SetValue("skill", (float)current_skill); // // set up the new server // Host_ClearMemory(); memset(&sv, 0, sizeof(sv)); strcpy(sv.name, server); sv.protocol = sv_protocol; // load progs to get entity field count PR_LoadProgs(); // allocate server memory sv.max_edicts = MAX_EDICTS; sv.edicts = Hunk_AllocName(sv.max_edicts * pr_edict_size, "edicts"); sv.datagram.maxsize = sizeof(sv.datagram_buf); sv.datagram.cursize = 0; sv.datagram.data = sv.datagram_buf; sv.reliable_datagram.maxsize = sizeof(sv.reliable_datagram_buf); sv.reliable_datagram.cursize = 0; sv.reliable_datagram.data = sv.reliable_datagram_buf; sv.signon.maxsize = sizeof(sv.signon_buf); sv.signon.cursize = 0; sv.signon.data = sv.signon_buf; // leave slots at start for clients only sv.num_edicts = svs.maxclients + 1; for (i = 0; i < svs.maxclients; i++) { ent = EDICT_NUM(i + 1); svs.clients[i].edict = ent; } sv.state = ss_loading; sv.paused = false; sv.time = 1.0; strcpy(sv.name, server); sprintf(sv.modelname, "maps/%s.bsp", server); model = Mod_ForName(sv.modelname, false); if (!model) { Con_Printf("Couldn't spawn server %s\n", sv.modelname); sv.worldmodel = NULL; sv.active = false; return; } sv.worldmodel = BrushModel(model); sv.models[1] = model; if (sv.worldmodel->numsubmodels >= MAX_MODELS) Host_Error("Total models (%d) exceeds MAX_MODELS (%d)\n", sv.worldmodel->numsubmodels, MAX_MODELS - 1); // // clear world interaction links // SV_ClearWorld(); sv.sound_precache[0] = pr_strings; sv.model_precache[0] = pr_strings; sv.model_precache[1] = sv.modelname; for (i = 1; i < sv.worldmodel->numsubmodels; i++) { sv.model_precache[1 + i] = localmodels[i]; sv.models[i + 1] = Mod_ForName(localmodels[i], false); } // // load the rest of the entities // ent = EDICT_NUM(0); memset(&ent->v, 0, progs->entityfields * 4); ent->free = false; ent->v.model = PR_SetString(sv.worldmodel->model.name); ent->v.modelindex = 1; // world model ent->v.solid = SOLID_BSP; ent->v.movetype = MOVETYPE_PUSH; if (coop.value) pr_global_struct->coop = coop.value; else pr_global_struct->deathmatch = deathmatch.value; pr_global_struct->mapname = PR_SetString(sv.name); // serverflags are for cross level information (sigils) pr_global_struct->serverflags = svs.serverflags; ED_LoadFromFile(sv.worldmodel->entities); sv.active = true; // all setup is completed, any further precache statements are errors sv.state = ss_active; // run two frames to allow everything to settle /* FIXME - don't do this when loading a saved game */ host_frametime = 0.1; SV_Physics(); SV_Physics(); // create a baseline for more efficient communications SV_CreateBaseline(); // send serverinfo to all connected clients client = svs.clients; for (i = 0; i < svs.maxclients; i++, client++) if (client->active) SV_SendServerinfo(client); Con_DPrintf("Server spawned.\n"); }
khonkhortisan/blinky
engine/NQ/sv_main.c
C
mit
34,514
import {CardClass, CardSet, CardType, MultiClassGroup, Race, Rarity} from "./Enums"; import {cleanEnum} from "./helpers"; export default class CardDef { public attack: number; public armor: number; public cardClass: CardClass; public cardSet: CardSet; public collectionText: string; public cost: number; public costsHealth: boolean; public elite: boolean; public health: number; public hideStats: boolean; public id: string; public name: string; public multiClassGroup: MultiClassGroup; public rarity: Rarity; public race: Race; public silenced: boolean; public text: string; public type: CardType; constructor(props: any) { this.attack = props.attack || 0; this.armor = props.armor || 0; this.cardClass = cleanEnum(props.cardClass, CardClass) as CardClass; this.cardSet = cleanEnum(props.set, CardSet) as CardSet; this.cost = props.cost || 0; this.costsHealth = props.costsHealth || false; this.elite = props.elite || false; this.health = props.health || 0; this.hideStats = props.hideStats || false; this.multiClassGroup = cleanEnum(props.multiClassGroup, MultiClassGroup) as MultiClassGroup; this.name = props.name || ""; this.race = cleanEnum(props.race, Race) as Race; this.rarity = cleanEnum(props.rarity, Rarity) as Rarity; this.silenced = props.silenced || false; this.type = cleanEnum(props.type, CardType) as CardType; if (this.type === CardType.WEAPON && props.durability) { // Weapons alias health to durability this.health = props.durability; } else if (this.type === CardType.HERO && props.armor) { // Hero health gem is Armor this.health = props.armor; } this.collectionText = props.collectionText || ""; this.text = props.text || ""; } }
Paratron/sunwell
src/CardDef.ts
TypeScript
mit
1,730
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/player/shared_player_city_bank_corellia_style_01.iff" result.attribute_template_id = -1 result.stfName("","") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
anhstudios/swganh
data/scripts/templates/object/building/player/shared_player_city_bank_corellia_style_01.py
Python
mit
446
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.storage.file.share.implementation.models; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; /** * Contains all response data for the setAccessPolicy operation. */ public final class SharesSetAccessPolicyResponse extends ResponseBase<ShareSetAccessPolicyHeaders, Void> { /** * Creates an instance of SharesSetAccessPolicyResponse. * * @param request the request which resulted in this SharesSetAccessPolicyResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ public SharesSetAccessPolicyResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, ShareSetAccessPolicyHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } }
selvasingh/azure-sdk-for-java
sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesSetAccessPolicyResponse.java
Java
mit
1,182
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.netapp.v2017_08_15; import com.fasterxml.jackson.annotation.JsonProperty; /** * Active Directory. */ public class ActiveDirectory { /** * Id of the Active Directory. */ @JsonProperty(value = "activeDirectoryId") private String activeDirectoryId; /** * Username of Active Directory domain administrator. */ @JsonProperty(value = "username") private String username; /** * Plain text password of Active Directory domain administrator. */ @JsonProperty(value = "password") private String password; /** * Name of the Active Directory domain. */ @JsonProperty(value = "domain") private String domain; /** * Comma separated list of DNS server IP addresses for the Active Directory * domain. */ @JsonProperty(value = "dNS") private String dNS; /** * Status of the Active Directory. */ @JsonProperty(value = "status") private String status; /** * NetBIOS name of the SMB server. This name will be registered as a * computer account in the AD and used to mount volumes. */ @JsonProperty(value = "sMBServerName") private String sMBServerName; /** * The Organizational Unit (OU) within the Windows Active Directory. */ @JsonProperty(value = "organizationalUnit") private String organizationalUnit; /** * Get id of the Active Directory. * * @return the activeDirectoryId value */ public String activeDirectoryId() { return this.activeDirectoryId; } /** * Set id of the Active Directory. * * @param activeDirectoryId the activeDirectoryId value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withActiveDirectoryId(String activeDirectoryId) { this.activeDirectoryId = activeDirectoryId; return this; } /** * Get username of Active Directory domain administrator. * * @return the username value */ public String username() { return this.username; } /** * Set username of Active Directory domain administrator. * * @param username the username value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withUsername(String username) { this.username = username; return this; } /** * Get plain text password of Active Directory domain administrator. * * @return the password value */ public String password() { return this.password; } /** * Set plain text password of Active Directory domain administrator. * * @param password the password value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withPassword(String password) { this.password = password; return this; } /** * Get name of the Active Directory domain. * * @return the domain value */ public String domain() { return this.domain; } /** * Set name of the Active Directory domain. * * @param domain the domain value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withDomain(String domain) { this.domain = domain; return this; } /** * Get comma separated list of DNS server IP addresses for the Active Directory domain. * * @return the dNS value */ public String dNS() { return this.dNS; } /** * Set comma separated list of DNS server IP addresses for the Active Directory domain. * * @param dNS the dNS value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withDNS(String dNS) { this.dNS = dNS; return this; } /** * Get status of the Active Directory. * * @return the status value */ public String status() { return this.status; } /** * Set status of the Active Directory. * * @param status the status value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withStatus(String status) { this.status = status; return this; } /** * Get netBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. * * @return the sMBServerName value */ public String sMBServerName() { return this.sMBServerName; } /** * Set netBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. * * @param sMBServerName the sMBServerName value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withSMBServerName(String sMBServerName) { this.sMBServerName = sMBServerName; return this; } /** * Get the Organizational Unit (OU) within the Windows Active Directory. * * @return the organizationalUnit value */ public String organizationalUnit() { return this.organizationalUnit; } /** * Set the Organizational Unit (OU) within the Windows Active Directory. * * @param organizationalUnit the organizationalUnit value to set * @return the ActiveDirectory object itself. */ public ActiveDirectory withOrganizationalUnit(String organizationalUnit) { this.organizationalUnit = organizationalUnit; return this; } }
selvasingh/azure-sdk-for-java
sdk/netapp/mgmt-v2017_08_15/src/main/java/com/microsoft/azure/management/netapp/v2017_08_15/ActiveDirectory.java
Java
mit
5,867
@extends('include.head') @section('content') <div id="content"> <section class="job padding-top-15 padding-bottom-70"> <div class="container"> <div class="coupen"> <p class="h3 text-bold"><span>{{ $project[0]->title }}</span> 캠페인의 지원자 목록</p> <p class="padding-top-10">마음에 드는 지원자를 선정 후 미팅 요청을 하세요.</p> </div> <div class="row padding-top-15"> <div class="col-md-12"> <div id="accordion"> <div class="job-content job-post-page"> <div class="panel-body"> <div class="form-group"> <div class="port_guide img_f"> <img src="/images/i_icon.png" style="margin-top:10px;"> <div class="p_add_span padding-top-0 padding-left-60"> <div class="content">1. 지원자들의 회사소개서, 상품소개서, 맞춤제안서, 지원내용을 꼼꼼히 살펴보세요.</div> <div class="content">2. 미팅은 최대2명까지 신청 가능합니다. 취소는 불가하니 신중히 선택해 주세요.</div> <div class="content">3. 계약을 원하는 업체를 선정하면 계약부터 대금보관, 대금지급까지 대행해 드립니다.</div> </div> </div> </div> <div class="panel padding-top-20"> <div class="tabbable"> <ul id="myTab1" class="nav nav-tabs"> <li class="active"> <a href="#myTab1_example1" data-toggle="tab" aria-expanded="true"> 전체 지원자 <span class="badge">{{ $count['app_count'] }}</span></a> </li> <li class=""> <a href="#myTab1_example2" data-toggle="tab" aria-expanded="false"> 미팅요청 지원자 <span class="badge">{{ $count['app_meeting_count'] }}</span></a> </li> <li class=""> <a href="#myTab1_example3" data-toggle="tab" aria-expanded="false"> 관심 지원자 <span class="badge">{{ $count['app_interest_count'] }}</span> </a> </li> <li class=""> <a href="#myTab1_example4" data-toggle="tab" aria-expanded="false"> 탈락 지원자 <span class="badge">{{ $count['app_out_count'] }}</span></a> </li> </ul> <div class="tab-content padding-top-20"> <div class="tab-pane fade active in" id="myTab1_example1"> @if($count['app_count'] == 0) <div class="col-md-12 padding-0">지원자가 없습니다</div> @else @foreach($applist as $app_list) @if($app_list->choice == '광고주 검수중' || $app_list->choice == '미팅' || $app_list->choice == '관심') @include('include.applicant_list') @endif @endforeach @endif </div> <div class="tab-pane fade" id="myTab1_example2"> @if($count['app_meeting_count'] == 0) <tr> <td colspan="5">미팅신청자가 없습니다</td> </tr> @else @foreach($applist as $app_list) @if($app_list->choice == '미팅' ) @include('include.applicant_list') @endif @endforeach @endif </div> <div class="tab-pane fade" id="myTab1_example3"> @if($count['app_interest_count'] == 0) <tr> <td colspan="5">관심 지원자가 없습니다</td> </tr> @else @foreach($applist as $app_list) @if($app_list->choice == '관심' ) @include('include.applicant_list') @endif @endforeach @endif </div> <div class="tab-pane fade" id="myTab1_example4"> @if($count['app_out_count'] == 0) <tr> <td colspan="5">탈락 지원자가 없습니다</td> </tr> @else @foreach($applist as $app_list) @if($app_list->choice == '숨김' ) @include('include.applicant_list') @endif @endforeach @endif </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> </div> </div> @include('include.footer') @endsection
ost500/cloudM
resources/views/mypage/applicant.blade.php
PHP
mit
7,818
/*----------------------------------------------------------------------------- * File: sr_router.h * Date: ? * Authors: Guido Apenzeller, Martin Casado, Virkam V. * Contact: casado@stanford.edu * *---------------------------------------------------------------------------*/ #ifndef SR_ROUTER_H #define SR_ROUTER_H #include <netinet/in.h> #include <sys/time.h> #include <stdio.h> #include "sr_protocol.h" #include "sr_arpcache.h" /* we dont like this debug , but what to do for varargs ? */ #ifdef _DEBUG_ #define Debug(x, args...) printf(x, ## args) #define DebugMAC(x) \ do { int ivyl; for(ivyl=0; ivyl<5; ivyl++) printf("%02x:", \ (unsigned char)(x[ivyl])); printf("%02x",(unsigned char)(x[5])); } while (0) #else #define Debug(x, args...) do{}while(0) #define DebugMAC(x) do{}while(0) #endif #define INIT_TTL 255 #define PACKET_DUMP_SIZE 1024 /* forward declare */ struct sr_if; struct sr_rt; /* ---------------------------------------------------------------------------- * struct sr_instance * * Encapsulation of the state for a single virtual router. * * -------------------------------------------------------------------------- */ struct sr_instance { int sockfd; /* socket to server */ char user[32]; /* user name */ char host[32]; /* host name */ char template[30]; /* template name if any */ unsigned short topo_id; struct sockaddr_in sr_addr; /* address to server */ struct sr_if* if_list; /* list of interfaces */ struct sr_rt* routing_table; /* routing table */ struct sr_arpcache cache; /* ARP cache */ pthread_attr_t attr; FILE* logfile; }; /* -- sr_main.c -- */ int sr_verify_routing_table(struct sr_instance* sr); /* -- sr_vns_comm.c -- */ int sr_send_packet(struct sr_instance* , uint8_t* , unsigned int , const char*); int sr_connect_to_server(struct sr_instance* ,unsigned short , char* ); int sr_read_from_server(struct sr_instance* ); /* -- sr_router.c -- */ void sr_init(struct sr_instance* ); void sr_handlepacket(struct sr_instance* , uint8_t * , unsigned int , char* ); /* -- sr_if.c -- */ void sr_add_interface(struct sr_instance* , const char* ); void sr_set_ether_ip(struct sr_instance* , uint32_t ); void sr_set_ether_addr(struct sr_instance* , const unsigned char* ); void sr_print_if_list(struct sr_instance* ); #endif /* SR_ROUTER_H */
somethingnew2-0/CS640-PA3
router/sr_router.h
C
mit
2,350
/* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2015 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ // Include ev++.h early to avoid macro clash on EV_ERROR. #include <ev++.h> #include <oxt/system_calls.hpp> #include <oxt/backtrace.hpp> #include <oxt/thread.hpp> #include <sys/types.h> #include <unistd.h> #include <pwd.h> #include <grp.h> #include <cstdio> #include <cstdlib> #include <cstring> #include <cerrno> #include <algorithm> #include <stdexcept> #include <stdlib.h> #include <signal.h> #include <agent/Base.h> #include <agent/ApiServerUtils.h> #include <agent/UstRouter/OptionParser.h> #include <agent/UstRouter/LoggingServer.h> #include <agent/UstRouter/ApiServer.h> #include <AccountsDatabase.h> #include <Account.h> #include <Exceptions.h> #include <FileDescriptor.h> #include <BackgroundEventLoop.h> #include <ResourceLocator.h> #include <MessageServer.h> #include <Constants.h> #include <Utils.h> #include <Utils/IOUtils.h> #include <Utils/StrIntUtils.h> #include <Utils/MessageIO.h> #include <Utils/VariantMap.h> using namespace oxt; using namespace Passenger; /***** Constants and working objects *****/ namespace Passenger { namespace UstRouter { struct WorkingObjects { string password; FileDescriptor serverSocketFd; vector<int> apiSockets; ApiAccountDatabase apiAccountDatabase; ResourceLocator *resourceLocator; BackgroundEventLoop *bgloop; ServerKit::Context *serverKitContext; AccountsDatabasePtr accountsDatabase; LoggingServer *loggingServer; UstRouter::ApiServer *apiServer; EventFd exitEvent; EventFd allClientsDisconnectedEvent; struct ev_signal sigintWatcher; struct ev_signal sigtermWatcher; struct ev_signal sigquitWatcher; unsigned int terminationCount; WorkingObjects() : resourceLocator(NULL), bgloop(NULL), serverKitContext(NULL), loggingServer(NULL), exitEvent(__FILE__, __LINE__, "WorkingObjects: exitEvent"), allClientsDisconnectedEvent(__FILE__, __LINE__, "WorkingObjects: allClientsDisconnectedEvent"), terminationCount(0) { } }; } // namespace UstRouter } // namespace Passenger using namespace Passenger::UstRouter; static VariantMap *agentsOptions; static WorkingObjects *workingObjects; /***** Functions *****/ static void printInfo(EV_P_ struct ev_signal *watcher, int revents); static void onTerminationSignal(EV_P_ struct ev_signal *watcher, int revents); static void apiServerShutdownFinished(UstRouter::ApiServer *server); static void waitForExitEvent(); void ustRouterFeedbackFdBecameReadable(ev::io &watcher, int revents) { /* This event indicates that the watchdog has been killed. * In this case we'll kill all descendant * processes and exit. There's no point in keeping this agent * running because we can't detect when the web server exits, * and because this agent doesn't own the server instance * directory. As soon as passenger-status is run, the server * instance directory will be cleaned up, making this agent's * services inaccessible. */ syscalls::killpg(getpgrp(), SIGKILL); _exit(2); // In case killpg() fails. } static string findUnionStationGatewayCert(const ResourceLocator &locator, const string &cert) { if (cert.empty()) { return locator.getResourcesDir() + "/union_station_gateway.crt"; } else if (cert != "-") { return cert; } else { return ""; } } static void makeFileWorldReadableAndWritable(const string &path) { int ret; do { ret = chmod(path.c_str(), parseModeString("u=rw,g=rw,o=rw")); } while (ret == -1 && errno == EINTR); } static void initializePrivilegedWorkingObjects() { TRACE_POINT(); const VariantMap &options = *agentsOptions; WorkingObjects *wo = workingObjects = new WorkingObjects(); wo->password = options.get("ust_router_password", false); if (wo->password.empty()) { wo->password = strip(readAll(options.get("ust_router_password_file"))); } vector<string> authorizations = options.getStrSet("ust_router_authorizations", false); string description; UPDATE_TRACE_POINT(); foreach (description, authorizations) { try { wo->apiAccountDatabase.add(description); } catch (const ArgumentException &e) { throw std::runtime_error(e.what()); } } // Initialize ResourceLocator here in case passenger_root's parent // directory is not executable by the unprivileged user. wo->resourceLocator = new ResourceLocator(options.get("passenger_root")); } static void startListening() { TRACE_POINT(); const VariantMap &options = *agentsOptions; WorkingObjects *wo = workingObjects; string address; vector<string> apiAddresses; address = options.get("ust_router_address"); wo->serverSocketFd.assign(createServer(address, 0, true, __FILE__, __LINE__), NULL, 0); P_LOG_FILE_DESCRIPTOR_PURPOSE(wo->serverSocketFd, "Server address: " << wo->serverSocketFd); if (getSocketAddressType(address) == SAT_UNIX) { makeFileWorldReadableAndWritable(parseUnixSocketAddress(address)); } UPDATE_TRACE_POINT(); apiAddresses = options.getStrSet("ust_router_api_addresses", false); foreach (address, apiAddresses) { wo->apiSockets.push_back(createServer(address, 0, true, __FILE__, __LINE__)); P_LOG_FILE_DESCRIPTOR_PURPOSE(wo->apiSockets.back(), "Server address: " << wo->apiSockets.back()); if (getSocketAddressType(address) == SAT_UNIX) { makeFileWorldReadableAndWritable(parseUnixSocketAddress(address)); } } } static void lowerPrivilege() { TRACE_POINT(); const VariantMap &options = *agentsOptions; string userName = options.get("analytics_log_user", false); if (geteuid() == 0 && !userName.empty()) { string groupName = options.get("analytics_log_group", false); struct passwd *pwUser = getpwnam(userName.c_str()); gid_t gid; if (pwUser == NULL) { throw RuntimeException("Cannot lookup user information for user " + userName); } if (groupName.empty()) { gid = pwUser->pw_gid; groupName = getGroupName(pwUser->pw_gid); } else { gid = lookupGid(groupName); } if (initgroups(userName.c_str(), gid) != 0) { int e = errno; throw SystemException("Unable to lower " SHORT_PROGRAM_NAME " UstRouter's privilege " "to that of user '" + userName + "' and group '" + groupName + "': cannot set supplementary groups", e); } if (setgid(gid) != 0) { int e = errno; throw SystemException("Unable to lower " SHORT_PROGRAM_NAME " UstRouter's privilege " "to that of user '" + userName + "' and group '" + groupName + "': cannot set group ID to " + toString(gid), e); } if (setuid(pwUser->pw_uid) != 0) { int e = errno; throw SystemException("Unable to lower " SHORT_PROGRAM_NAME " UstRouter's privilege " "to that of user '" + userName + "' and group '" + groupName + "': cannot set user ID to " + toString(pwUser->pw_uid), e); } setenv("USER", pwUser->pw_name, 1); setenv("HOME", pwUser->pw_dir, 1); setenv("UID", toString(gid).c_str(), 1); } } static void initializeUnprivilegedWorkingObjects() { TRACE_POINT(); VariantMap &options = *agentsOptions; WorkingObjects *wo = workingObjects; int fd; options.set("union_station_gateway_cert", findUnionStationGatewayCert( *wo->resourceLocator, options.get("union_station_gateway_cert", false))); UPDATE_TRACE_POINT(); wo->bgloop = new BackgroundEventLoop(true, true); wo->serverKitContext = new ServerKit::Context(wo->bgloop->safe, wo->bgloop->libuv_loop); UPDATE_TRACE_POINT(); wo->accountsDatabase = boost::make_shared<AccountsDatabase>(); wo->accountsDatabase->add("logging", wo->password, false); wo->loggingServer = new LoggingServer(wo->bgloop->libev_loop, wo->serverSocketFd, wo->accountsDatabase, options); UPDATE_TRACE_POINT(); wo->apiServer = new UstRouter::ApiServer(wo->serverKitContext); wo->apiServer->loggingServer = wo->loggingServer; wo->apiServer->apiAccountDatabase = &wo->apiAccountDatabase; wo->apiServer->instanceDir = options.get("instance_dir", false); wo->apiServer->fdPassingPassword = options.get("watchdog_fd_passing_password", false); wo->apiServer->exitEvent = &wo->exitEvent; wo->apiServer->shutdownFinishCallback = apiServerShutdownFinished; foreach (fd, wo->apiSockets) { wo->apiServer->listen(fd); } UPDATE_TRACE_POINT(); ev_signal_init(&wo->sigquitWatcher, printInfo, SIGQUIT); ev_signal_start(wo->bgloop->libev_loop, &wo->sigquitWatcher); ev_signal_init(&wo->sigintWatcher, onTerminationSignal, SIGINT); ev_signal_start(wo->bgloop->libev_loop, &wo->sigintWatcher); ev_signal_init(&wo->sigtermWatcher, onTerminationSignal, SIGTERM); ev_signal_start(wo->bgloop->libev_loop, &wo->sigtermWatcher); } static void reportInitializationInfo() { TRACE_POINT(); P_NOTICE(SHORT_PROGRAM_NAME " UstRouter online, PID " << getpid()); if (feedbackFdAvailable()) { writeArrayMessage(FEEDBACK_FD, "initialized", NULL); } } static void printInfo(EV_P_ struct ev_signal *watcher, int revents) { cerr << "---------- Begin UstRouter status ----------\n"; workingObjects->loggingServer->dump(cerr); cerr.flush(); cerr << "---------- End UstRouter status ----------\n"; } static void onTerminationSignal(EV_P_ struct ev_signal *watcher, int revents) { WorkingObjects *wo = workingObjects; // Start output after '^C' printf("\n"); wo->terminationCount++; if (wo->terminationCount < 3) { P_NOTICE("Signal received. Gracefully shutting down... (send signal " << (3 - wo->terminationCount) << " more time(s) to force shutdown)"); workingObjects->exitEvent.notify(); } else { P_NOTICE("Signal received. Forcing shutdown."); _exit(2); } } static void mainLoop() { workingObjects->bgloop->start("Main event loop", 0); waitForExitEvent(); } static void shutdownApiServer() { workingObjects->apiServer->shutdown(); } static void apiServerShutdownFinished(UstRouter::ApiServer *server) { workingObjects->allClientsDisconnectedEvent.notify(); } /* Wait until the watchdog closes the feedback fd (meaning it * was killed) or until we receive an exit message. */ static void waitForExitEvent() { this_thread::disable_syscall_interruption dsi; WorkingObjects *wo = workingObjects; fd_set fds; int largestFd = -1; FD_ZERO(&fds); if (feedbackFdAvailable()) { FD_SET(FEEDBACK_FD, &fds); largestFd = std::max(largestFd, FEEDBACK_FD); } FD_SET(wo->exitEvent.fd(), &fds); largestFd = std::max(largestFd, wo->exitEvent.fd()); TRACE_POINT(); if (syscalls::select(largestFd + 1, &fds, NULL, NULL, NULL) == -1) { int e = errno; throw SystemException("select() failed", e); } if (FD_ISSET(FEEDBACK_FD, &fds)) { UPDATE_TRACE_POINT(); /* If the watchdog has been killed then we'll exit. There's no * point in keeping the UstRouter running because we can't * detect when the web server exits, and because this logging * agent doesn't own the instance directory. As soon as * passenger-status is run, the instance directory will be * cleaned up, making the server inaccessible. */ _exit(2); } else { UPDATE_TRACE_POINT(); /* We received an exit command. */ P_NOTICE("Received command to shutdown gracefully. " "Waiting until all clients have disconnected..."); wo->bgloop->safe->runLater(shutdownApiServer); UPDATE_TRACE_POINT(); FD_ZERO(&fds); FD_SET(wo->allClientsDisconnectedEvent.fd(), &fds); if (syscalls::select(wo->allClientsDisconnectedEvent.fd() + 1, &fds, NULL, NULL, NULL) == -1) { int e = errno; throw SystemException("select() failed", e); } P_INFO("All clients have now disconnected. Proceeding with graceful shutdown"); } } static void cleanup() { TRACE_POINT(); WorkingObjects *wo = workingObjects; P_DEBUG("Shutting down " SHORT_PROGRAM_NAME " UstRouter..."); wo->bgloop->stop(); delete wo->apiServer; P_NOTICE(SHORT_PROGRAM_NAME " UstRouter shutdown finished"); } static int runUstRouter() { TRACE_POINT(); P_NOTICE("Starting " SHORT_PROGRAM_NAME " UstRouter..."); try { UPDATE_TRACE_POINT(); initializePrivilegedWorkingObjects(); startListening(); lowerPrivilege(); initializeUnprivilegedWorkingObjects(); UPDATE_TRACE_POINT(); reportInitializationInfo(); mainLoop(); UPDATE_TRACE_POINT(); cleanup(); } catch (const tracable_exception &e) { P_ERROR("ERROR: " << e.what() << "\n" << e.backtrace()); return 1; } catch (const std::runtime_error &e) { P_CRITICAL("ERROR: " << e.what()); return 1; } return 0; } /***** Entry point and command line argument parsing *****/ static void parseOptions(int argc, const char *argv[], VariantMap &options) { OptionParser p(ustRouterUsage); int i = 2; while (i < argc) { if (parseUstRouterOption(argc, argv, i, options)) { continue; } else if (p.isFlag(argv[i], 'h', "--help")) { ustRouterUsage(); exit(0); } else { fprintf(stderr, "ERROR: unrecognized argument %s. Please type " "'%s ust-router --help' for usage.\n", argv[i], argv[0]); exit(1); } } } static void preinitialize(VariantMap &options) { // Set log_level here so that initializeAgent() calls setLogLevel() // and setLogFile() with the right value. if (options.has("ust_router_log_level")) { options.setInt("log_level", options.getInt("ust_router_log_level")); } if (options.has("ust_router_log_file")) { options.setInt("debug_log_file", options.getInt("ust_router_log_file")); } } static void setAgentsOptionsDefaults() { VariantMap &options = *agentsOptions; set<string> defaultApiListenAddress; defaultApiListenAddress.insert(DEFAULT_UST_ROUTER_API_LISTEN_ADDRESS); options.setDefault("ust_router_address", DEFAULT_UST_ROUTER_LISTEN_ADDRESS); options.setDefaultStrSet("ust_router_api_addresses", defaultApiListenAddress); } static void sanityCheckOptions() { VariantMap &options = *agentsOptions; bool ok = true; if (!options.has("passenger_root")) { fprintf(stderr, "ERROR: please set the --passenger-root argument.\n"); ok = false; } if (!options.has("ust_router_password") && !options.has("ust_router_password_file")) { fprintf(stderr, "ERROR: please set the --password-file argument.\n"); ok = false; } // Sanity check user accounts string user = options.get("analytics_log_user", false); if (!user.empty()) { struct passwd *pwUser = getpwnam(user.c_str()); if (pwUser == NULL) { fprintf(stderr, "ERROR: the username specified by --user, '%s', does not exist.\n", user.c_str()); ok = false; } string group = options.get("analytics_log_group", false); if (!group.empty() && lookupGid(group) == (gid_t) -1) { fprintf(stderr, "ERROR: the group name specified by --group, '%s', does not exist.\n", group.c_str()); ok = false; } } else if (options.has("analytics_log_group")) { fprintf(stderr, "ERROR: setting --group also requires you to set --user.\n"); ok = false; } if (!ok) { exit(1); } } int ustRouterMain(int argc, char *argv[]) { agentsOptions = new VariantMap(); *agentsOptions = initializeAgent(argc, &argv, SHORT_PROGRAM_NAME " ust-router", parseOptions, preinitialize, 2); CURLcode code = curl_global_init(CURL_GLOBAL_ALL); if (code != CURLE_OK) { P_CRITICAL("ERROR: Could not initialize libcurl: " << curl_easy_strerror(code)); exit(1); } setAgentsOptionsDefaults(); sanityCheckOptions(); return runUstRouter(); }
antek-drzewiecki/passenger
ext/common/agent/UstRouter/UstRouterMain.cpp
C++
mit
16,359
// CookieManager.cs namespace Twin.Tools { using System; using System.IO; using System.Text; using System.Net; using System.Runtime.Serialization.Formatters.Binary; using Twin.Util; using CSharpSamples; /// <summary> /// Œfަ”‚ɏ‘‚«ž‚ލۂɕK—v‚ȃNƒbƒL[‚ðŠÇ— /// </summary> public class CookieManager { private const string CookieFile = "cookie.bin2"; private Cache cache; /// <summary> /// CookieManagerƒNƒ‰ƒX‚̃Cƒ“ƒXƒ^ƒ“ƒX‚ð‰Šú‰» /// </summary> /// <param name="cache"></param> public CookieManager(Cache cache) { if (cache == null) throw new ArgumentNullException("cache"); // // TODO: ƒRƒ“ƒXƒgƒ‰ƒNƒ^ ƒƒWƒbƒN‚ð‚±‚±‚ɒljÁ‚µ‚Ä‚­‚¾‚³‚¢B // this.cache = cache; } /* private string InternalGetCookieFilePath(BoardInfo bi) { return Path.Combine(cache.GetBbsRootDirectory(bi), CookieFile); //return Path.Combine(cache.GetFolderPath(bi), CookieFile); }*/ /// <summary> /// Žw’肵‚½”‚̃NƒbƒL[î•ñ‚ðŽæ“¾ /// </summary> /// <param name="board">ƒNƒbƒL[Žæ“¾‘Ώۂ̔Â</param> /// <returns>ƒNƒbƒL[‚ª‘¶Ý‚µŽæ“¾‚Å‚«‚ê‚ÎtrueA‚»‚¤‚łȂ¯‚ê‚Îfalse</returns> public bool GetCookie(BoardInfo board) { if (board == null) throw new ArgumentNullException("board"); /*NTwin 2011/05/31 string filePath = InternalGetCookieFilePath(board); if (!File.Exists(filePath)) return false; BinaryFormatter formatter = new BinaryFormatter(); Stream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read); try { CookieCollection coll = formatter.Deserialize(stream) as CookieCollection; board.CookieContainer.Add(coll); } finally { stream.Close(); }*/ // NTwin 2011/05/31 board.CookieContainer = gCookies; return true; } /// <summary> /// Žw’肵‚½”‚̃NƒbƒL[‚ð•Û‘¶ /// </summary> /// <param name="board">ƒNƒbƒL[•Û‘¶‘Ώۂ̔Â</param> public void SetCookie(BoardInfo board) {/* if (board == null) throw new ArgumentNullException("board"); if (board.CookieContainer == null) return; string filePath = InternalGetCookieFilePath(board); CookieCollection coll = board.CookieContainer.GetCookies(new Uri(board.Url)); BinaryFormatter formatter = new BinaryFormatter(); Stream stream = new FileStream(filePath, FileMode.Create, FileAccess.Write); try { formatter.Serialize(stream, coll); } finally { stream.Close(); }*/ } // NTwin 2011/05/31 public static CookieContainer gCookies = new CookieContainer(); static CookieManager() { } public static void LoadCookie() { string path = System.IO.Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "cookie.bin"); if (System.IO.File.Exists(path)) { System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); using (System.IO.FileStream stream = new System.IO.FileStream(path, System.IO.FileMode.Open)) { gCookies = formatter.Deserialize(stream) as System.Net.CookieContainer; } } } public static void SaveCookie() { if (gCookies != null) { string path = System.IO.Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "cookie.bin"); System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); using (System.IO.Stream stream = new System.IO.FileStream(path, System.IO.FileMode.Create, System.IO.FileAccess.Write)) { formatter.Serialize(stream, gCookies); } } } } }
hirotakagi/Ponytail
Twintail Project/ch2Solution/twin/Tools/CookieManager.cs
C#
mit
3,621
package com.github.onsdigital.api; import com.github.davidcarboni.restolino.framework.Api; import com.github.davidcarboni.restolino.helpers.Path; import com.github.onsdigital.data.TimeSeriesObject; import com.github.onsdigital.generators.Sample; import com.github.onsdigital.writers.DataSetWriterJSON; import com.github.onsdigital.writers.SeriesWriterJSON; import org.apache.commons.lang3.StringUtils; import org.eclipse.jetty.http.HttpStatus; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.GET; import java.io.IOException; @Api public class Data { /** * API Access to the site * * * @param request * List of data series required. Filter options * * @param response * Initially will return json only * * @throws java.io.IOException * */ @GET public Object get(HttpServletRequest request, HttpServletResponse response) throws IOException { Path requestPath = Path.newInstance(request); System.out.println(requestPath); if(requestPath.segments().size() == 1) { // RETURN ALL DATA response.setCharacterEncoding("UTF8"); response.setContentType("application/json"); response.getWriter().println(DataSetWriterJSON.dataSetAsJSON(Root.master, true)); response.setStatus(HttpStatus.OK_200); } else if (returnSeries(requestPath, response)) { response.setStatus(HttpStatus.OK_200); return null; } else if (returnRandom(requestPath, response)) { response.setStatus(HttpStatus.OK_200); return null; } response.setStatus(HttpStatus.NOT_FOUND_404); return null; } private boolean returnSeries(Path requestPath, HttpServletResponse response) { TimeSeriesObject series = Root.getTimeSeries(requestPath.segments().get(1)); if (series == null) { return false; } response.setCharacterEncoding("UTF8"); response.setContentType("application/json"); try { response.getWriter().println(SeriesWriterJSON.seriesAsSortedJSON(series, true)); return true; } catch (IOException e) { e.printStackTrace(); return false; } } private boolean returnRandom(Path requestPath, HttpServletResponse response) { String isRand = requestPath.segments().get(1).toUpperCase(); if(StringUtils.startsWith(isRand,"RAND")) { long seed = Long.parseLong(StringUtils.substring(isRand, 4)); TimeSeriesObject series = Sample.randomWalk(seed, 100, 1, 1997, 2014, true, true, true); response.setCharacterEncoding("UTF8"); response.setContentType("application/json"); try { response.getWriter().println(SeriesWriterJSON.seriesAsSortedJSON(series, true)); return true; } catch (IOException e) { e.printStackTrace(); return false; } } return false; } private Object getSeriesList() { return null; } private Object getSeries() { return null; } }
Carboni/project-brian
src/main/java/com/github/onsdigital/api/Data.java
Java
mit
3,257
(function() { var checkVersion = Dagaz.Model.checkVersion; Dagaz.Model.checkVersion = function(design, name, value) { if (name != "pilare-restrictions") { checkVersion(design, name, value); } } var CheckInvariants = Dagaz.Model.CheckInvariants; Dagaz.Model.CheckInvariants = function(board) { var design = Dagaz.Model.design; var pos = null; _.each(design.allPositions(), function(p) { var piece = board.getPiece(p); if (piece === null) return; var v = piece.getValue(1); if (v === null) return; pos = p; }); if (pos !== null) { Dagaz.View.getView().current = [pos]; _.each(board.moves, function(m) { if (m.actions.length > 0) { if (m.actions[0][0][0] != pos) { m.failed = true; return; } if (m.actions[0][1][0] == board.lastf) { m.failed = true; return; } } }); } CheckInvariants(board); } })();
GlukKazan/GlukKazan.github.io
stalemate/scripts/pilare-restrictions.js
JavaScript
mit
1,070
package com.raizlabs.android.dbflow.runtime; import com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction; import java.util.UUID; /** * Created by andrewgrosner * Date: 2/2/14 * Contributors: * Description: Holds information related to a {@link com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction} */ public class DBTransactionInfo { private String name; private int priority; private DBTransactionInfo() { } /** * Creates with a name and default {@link com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction#PRIORITY_NORMAL} * * @param name * @return */ public static DBTransactionInfo create(String name) { return create(name, BaseTransaction.PRIORITY_NORMAL); } /** * Creates the Request Information for when running a {@link com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction} * * @param name Name of the request (for debugging) * @param priority The priority it should be run on from {@link com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction} * @return */ public static DBTransactionInfo create(String name, int priority) { DBTransactionInfo requestInfo = new DBTransactionInfo(); requestInfo.name = name; requestInfo.priority = priority; return requestInfo; } /** * Creates with a priority and name generated from {@link java.util.UUID#randomUUID()} * * @param priority * @return */ public static DBTransactionInfo create(int priority) { DBTransactionInfo requestInfo = new DBTransactionInfo(); requestInfo.name = UUID.randomUUID().toString(); requestInfo.priority = priority; return requestInfo; } /** * Creates with a priority and name generated from {@link java.util.UUID#randomUUID()} * and {@link com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction#PRIORITY_LOW} * * @param priority * @return */ public static DBTransactionInfo create() { DBTransactionInfo requestInfo = new DBTransactionInfo(); requestInfo.name = UUID.randomUUID().toString(); requestInfo.priority = BaseTransaction.PRIORITY_LOW; return requestInfo; } /** * Returns a prefilled, fetch request * * @return */ public static DBTransactionInfo createFetch() { DBTransactionInfo requestInfo = new DBTransactionInfo(); requestInfo.priority = BaseTransaction.PRIORITY_UI; requestInfo.name = "fetch " + UUID.randomUUID().toString(); return requestInfo; } /** * Returns a prefilled, save request. Default is {@link com.raizlabs.android.dbflow.runtime.transaction.BaseTransaction#PRIORITY_NORMAL} * since we generally don't need to know right away that it has been saved. * * @return */ public static DBTransactionInfo createSave() { DBTransactionInfo requestInfo = new DBTransactionInfo(); requestInfo.priority = BaseTransaction.PRIORITY_NORMAL; requestInfo.name = "save " + UUID.randomUUID().toString(); return requestInfo; } public String getName() { return name; } public int getPriority() { return priority; } }
omegasoft7/DBFlow
library/src/main/java/com/raizlabs/android/dbflow/runtime/DBTransactionInfo.java
Java
mit
3,321
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * State * * @ORM\Table(name="state") * @ORM\Entity */ class State { /** * @var integer * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=45, nullable=false) */ private $name; /** * @var string * * @ORM\Column(name="uf", type="string", length=45, nullable=false) */ private $uf; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set name * * @param string $name * * @return State */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set uf * * @param string $uf * * @return State */ public function setUf($uf) { $this->uf = $uf; return $this; } /** * Get uf * * @return string */ public function getUf() { return $this->uf; } }
WeDevBrasil/guia-comercial
src/AppBundle/Entity/State.php
PHP
mit
1,369
{% load typogrify_tags %} <h1>{{ video.title }}</h1> {% if video.embed_src %} {{ video.embed_src|safe }} {{ video.summary_formatted|typogrify }} {% else %} <h2>This video can not be shown here.</h2> <h3>It can be <a href="{{ video.url }}">seen at {{ video.source|capfirst }}</a></h3> {% endif %}
tBaxter/Tango
video/templates/video/includes/show_video.html
HTML
mit
306
using BEPUphysics.Constraints.TwoEntity; using BEPUphysics.Constraints.TwoEntity.JointLimits; using BEPUphysics.Constraints.TwoEntity.Joints; using BEPUphysics.Constraints.TwoEntity.Motors; using BEPUphysics.Entities; using BEPUutilities; namespace BEPUphysics.Constraints.SolverGroups { /// <summary> /// Restricts two degrees of linear motion while allowing one degree of angular freedom. /// </summary> public class LineSliderJoint : SolverGroup { /// <summary> /// Constructs a new constraint which restricts two degrees of linear freedom and two degrees of angular freedom between two entities. /// This constructs the internal constraints, but does not configure them. Before using a constraint constructed in this manner, /// ensure that its active constituent constraints are properly configured. The entire group as well as all internal constraints are initially inactive (IsActive = false). /// </summary> public LineSliderJoint() { IsActive = false; PointOnLineJoint = new PointOnLineJoint(); AngularJoint = new RevoluteAngularJoint(); Limit = new LinearAxisLimit(); Motor = new LinearAxisMotor(); Add(PointOnLineJoint); Add(AngularJoint); Add(Limit); Add(Motor); } /// <summary> /// Constructs a new constraint which restricts two degrees of linear freedom and two degrees of angular freedom between two entities. /// </summary> /// <param name="connectionA">First entity of the constraint pair.</param> /// <param name="connectionB">Second entity of the constraint pair.</param> /// <param name="lineAnchor">Location of the anchor for the line to be attached to connectionA in world space.</param> /// <param name="lineDirection">Axis in world space to be attached to connectionA along which connectionB can move and rotate.</param> /// <param name="pointAnchor">Location of the anchor for the point to be attached to connectionB in world space.</param> public LineSliderJoint(Entity connectionA, Entity connectionB, Vector3 lineAnchor, Vector3 lineDirection, Vector3 pointAnchor) { if (connectionA == null) connectionA = TwoEntityConstraint.WorldEntity; if (connectionB == null) connectionB = TwoEntityConstraint.WorldEntity; PointOnLineJoint = new PointOnLineJoint(connectionA, connectionB, lineAnchor, lineDirection, pointAnchor); AngularJoint = new RevoluteAngularJoint(connectionA, connectionB, lineDirection); Limit = new LinearAxisLimit(connectionA, connectionB, lineAnchor, pointAnchor, lineDirection, 0, 0); Motor = new LinearAxisMotor(connectionA, connectionB, lineAnchor, pointAnchor, lineDirection); Limit.IsActive = false; Motor.IsActive = false; Add(PointOnLineJoint); Add(AngularJoint); Add(Limit); Add(Motor); } /// <summary> /// Gets the angular joint which removes two degrees of freedom. /// </summary> public RevoluteAngularJoint AngularJoint { get; private set; } /// <summary> /// Gets the distance limits for the slider. /// </summary> public LinearAxisLimit Limit { get; private set; } /// <summary> /// Gets the slider motor. /// </summary> public LinearAxisMotor Motor { get; private set; } /// <summary> /// Gets the line joint that restricts two linear degrees of freedom. /// </summary> public PointOnLineJoint PointOnLineJoint { get; private set; } } }
mayermatt/coms-437-trashdroids
Trashdroids/BEPUphysics/Constraints/SolverGroups/LineSliderJoint.cs
C#
mit
3,797
__author__ = 'leif' from django.contrib import admin from models import * admin.site.register(GameExperiment) admin.site.register(UserProfile) admin.site.register(MaxHighScore)
leifos/boxes
treasure-houses/asg/admin.py
Python
mit
178
class Mailbot < ActionMailer::Base def registration_mail(conference, user) mail(to: user.email, from: conference.contact.email, subject: conference.email_settings.registration_subject, body: conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.registration_body)) end def ticket_confirmation_mail(ticket_purchase) @ticket_purchase = ticket_purchase @conference = ticket_purchase.conference @user = ticket_purchase.user PhysicalTicket.last(ticket_purchase.quantity).each do |physical_ticket| pdf = TicketPdf.new(@conference, @user, physical_ticket, @conference.ticket_layout.to_sym, "ticket_for_#{@conference.short_title}_#{physical_ticket.id}") attachments["ticket_for_#{@conference.short_title}_#{physical_ticket.id}.pdf"] = pdf.render end mail(to: @user.email, from: @conference.contact.email, template_name: 'ticket_confirmation_template', subject: "#{@conference.title} | Ticket Confirmation and PDF!") end def acceptance_mail(event) conference = event.program.conference mail(to: event.submitter.email, from: conference.contact.email, subject: conference.email_settings.accepted_subject, body: conference.email_settings.generate_event_mail(event, conference.email_settings.accepted_body)) end def rejection_mail(event) conference = event.program.conference mail(to: event.submitter.email, from: conference.contact.email, subject: conference.email_settings.rejected_subject, body: conference.email_settings.generate_event_mail(event, conference.email_settings.rejected_body)) end def confirm_reminder_mail(event) conference = event.program.conference mail(to: event.submitter.email, from: conference.contact.email, subject: conference.email_settings.confirmed_without_registration_subject, body: conference.email_settings.generate_event_mail(event, conference.email_settings.confirmed_without_registration_body)) end def conference_date_update_mail(conference, user) mail(to: user.email, from: conference.contact.email, subject: conference.email_settings.conference_dates_updated_subject, body: conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.conference_dates_updated_body)) end def conference_registration_date_update_mail(conference, user) mail(to: user.email, from: conference.contact.email, subject: conference.email_settings.conference_registration_dates_updated_subject, body: conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.conference_registration_dates_updated_body)) end def conference_venue_update_mail(conference, user) mail(to: user.email, from: conference.contact.email, subject: conference.email_settings.venue_updated_subject, body: conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.venue_updated_body)) end def conference_schedule_update_mail(conference, user) mail(to: user.email, from: conference.contact.email, subject: conference.email_settings.program_schedule_public_subject, body: conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.program_schedule_public_body)) end def conference_cfp_update_mail(conference, user) mail(to: user.email, from: conference.contact.email, subject: conference.email_settings.cfp_dates_updated_subject, body: conference.email_settings.generate_email_on_conf_updates(conference, user, conference.email_settings.cfp_dates_updated_body)) end def conference_booths_acceptance_mail(booth) conference = booth.conference mail(to: booth.submitter.email, from: conference.contact.email, subject: conference.email_settings.booths_acceptance_subject, body: conference.email_settings.generate_booth_mail(booth, conference.email_settings.booths_acceptance_body)) end def conference_booths_rejection_mail(booth) conference = booth.conference mail(to: booth.submitter.email, from: conference.contact.email, subject: conference.email_settings.booths_rejection_subject, body: conference.email_settings.generate_booth_mail(booth, conference.email_settings.booths_rejection_body)) end def event_comment_mail(comment, user) @comment = comment @event = @comment.commentable @conference = @event.program.conference @user = user mail(to: @user.email, from: @conference.contact.email, template_name: 'comment_template', subject: "New comment has been posted for #{@event.title}") end end
namangupta01/osem
app/mailers/mailbot.rb
Ruby
mit
5,842
// Package misc defines miscellaneous useful functions package misc import ( "reflect" "strconv" "strings" "time" ) // NVL is null value logic func NVL(str string, def string) string { if len(str) == 0 { return def } return str } // ZeroOrNil checks if the argument is zero or null func ZeroOrNil(obj interface{}) bool { value := reflect.ValueOf(obj) if !value.IsValid() { return true } if obj == nil { return true } if value.Kind() == reflect.Slice || value.Kind() == reflect.Array { return value.Len() == 0 } zero := reflect.Zero(reflect.TypeOf(obj)) if obj == zero.Interface() { return true } return false } // Atoi returns casted int func Atoi(candidate string) int { result := 0 if candidate != "" { if i, err := strconv.Atoi(candidate); err == nil { result = i } } return result } // ParseUint16 returns casted uint16 func ParseUint16(candidate string) uint16 { var result uint16 if candidate != "" { if u, err := strconv.ParseUint(candidate, 10, 16); err == nil { result = uint16(u) } } return result } // ParseDuration returns casted time.Duration func ParseDuration(candidate string) time.Duration { var result time.Duration if candidate != "" { if d, err := time.ParseDuration(candidate); err == nil { result = d } } return result } // ParseBool returns casted bool func ParseBool(candidate string) bool { result := false if candidate != "" { if b, err := strconv.ParseBool(candidate); err == nil { result = b } } return result } // ParseCsvLine returns comma splitted strings func ParseCsvLine(data string) []string { splitted := strings.SplitN(data, ",", -1) parsed := make([]string, len(splitted)) for i, val := range splitted { parsed[i] = strings.TrimSpace(val) } return parsed } // TimeToJST changes time.Time to Tokyo time zone func TimeToJST(t time.Time) time.Time { jst, err := time.LoadLocation("Asia/Tokyo") if err != nil { return t } return t.In(jst) } // TimeToString changes time.Time to string func TimeToString(t time.Time) string { timeformat := "2006-01-02T15:04:05Z0700" return t.Format(timeformat) } // StringToTime changes string to time.Time func StringToTime(t string) time.Time { timeformat := "2006-01-02T15:04:05Z0700" candidate, _ := time.Parse(timeformat, t) return candidate }
supinf/reinvent-sessions-api
app/misc/functions.go
GO
mit
2,318
#region Copyright // // DotNetNuke® - http://www.dotnetnuke.com // Copyright (c) 2002-2016 // by DotNetNuke Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and // to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions // of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #endregion using DotNetNuke.Services.Localization; namespace DotNetNuke.Entities.Content.Workflow.Exceptions { public class WorkflowStateNameAlreadyExistsException : WorkflowException { public WorkflowStateNameAlreadyExistsException() : base(Localization.GetString("WorkflowStateNameAlreadyExistsException", Localization.ExceptionsResourceFile)) { } } }
yiji/Dnn.Platform
DNN Platform/Library/Entities/Content/Workflow/Exceptions/WorkflowStateNameAlreadyExistsException.cs
C#
mit
1,616
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; namespace Microsoft.Diagnostics.Runtime.Interop { [StructLayout(LayoutKind.Explicit)] public readonly struct IMAGE_COR20_HEADER_ENTRYPOINT { [FieldOffset(0)] public readonly uint Token; [FieldOffset(0)] public readonly uint RVA; } }
cshung/clrmd
src/Microsoft.Diagnostics.Runtime.Utilities/Debugger/Structs/ImageCor20HeaderEntryPoint.cs
C#
mit
526
package com.udacity.gamedev.gigagal; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.utils.Array; import com.udacity.gamedev.gigagal.entities.GigaGal; import com.udacity.gamedev.gigagal.entities.Platform; public class Level { GigaGal gigaGal; Array<Platform> platforms; public Level() { platforms = new Array<Platform>(); initDebugLevel(); } public void update(float delta) { gigaGal.update(delta, platforms); } public void render(SpriteBatch batch) { batch.begin(); for (Platform platform : platforms) { platform.render(batch); } gigaGal.render(batch); batch.end(); } private void initDebugLevel() { platforms.add(new Platform(15, 100, 30, 20)); platforms.add(new Platform(75, 90, 100, 65)); platforms.add(new Platform(35, 55, 50, 20)); platforms.add(new Platform(10, 20, 20, 9)); platforms.add(new Platform(100, 110, 30, 9)); platforms.add(new Platform(200, 130, 30, 40)); platforms.add(new Platform(150, 150, 30, 9)); platforms.add(new Platform(150, 180, 30, 9)); platforms.add(new Platform(200, 200, 9, 9)); platforms.add(new Platform(280, 100, 30, 9)); gigaGal = new GigaGal(new Vector2(15, 40)); } }
udacity/ud406
2.4.05-Solution-DebugCameraControls/core/src/com/udacity/gamedev/gigagal/Level.java
Java
mit
1,383
namespace EntityFrameworkPerformanceTests.CodeFirst { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.Spatial; [Table("Production.ProductModelProductDescriptionCulture")] public partial class ProductModelProductDescriptionCulture { [Key] [Column(Order = 0)] [DatabaseGenerated(DatabaseGeneratedOption.None)] public int ProductModelID { get; set; } [Key] [Column(Order = 1)] [DatabaseGenerated(DatabaseGeneratedOption.None)] public int ProductDescriptionID { get; set; } [Key] [Column(Order = 2)] [StringLength(6)] public string CultureID { get; set; } public DateTime ModifiedDate { get; set; } public virtual Culture Culture { get; set; } public virtual ProductDescription ProductDescription { get; set; } public virtual ProductModel ProductModel { get; set; } } }
hanssens/bucket
experiments/EntityFramework Performance/EntityFrameworkPerformanceTests/CodeFirst/ProductModelProductDescriptionCulture.cs
C#
mit
1,059
/** * Controller for single index detail */ import _ from 'lodash'; import uiRoutes from 'ui/routes'; import uiModules from 'ui/modules'; import routeInitProvider from 'plugins/monitoring/lib/route_init'; import ajaxErrorHandlersProvider from 'plugins/monitoring/lib/ajax_error_handler'; import template from 'plugins/monitoring/views/elasticsearch/index/index_template.html'; uiRoutes.when('/elasticsearch/indices/:index', { template, resolve: { clusters: function (Private) { const routeInit = Private(routeInitProvider); return routeInit(); }, pageData: getPageData } }); function getPageData(timefilter, globalState, $route, $http, Private) { const timeBounds = timefilter.getBounds(); const url = `../api/monitoring/v1/clusters/${globalState.cluster_uuid}/elasticsearch/indices/${$route.current.params.index}`; return $http.post(url, { timeRange: { min: timeBounds.min.toISOString(), max: timeBounds.max.toISOString() }, metrics: [ 'index_search_request_rate', { name: 'index_request_rate', keys: [ 'index_request_rate_total', 'index_request_rate_primary' ] }, 'index_size', { name: 'index_mem', keys: [ 'index_mem_overall' ], config: 'xpack.monitoring.chart.elasticsearch.index.index_memory' }, 'index_document_count', 'index_segment_count' ] }) .then(response => response.data) .catch((err) => { const ajaxErrorHandlers = Private(ajaxErrorHandlersProvider); return ajaxErrorHandlers(err); }); } const uiModule = uiModules.get('monitoring', []); uiModule.controller('indexView', (timefilter, $route, title, Private, globalState, $executor, $http, monitoringClusters, $scope) => { timefilter.enabled = true; function setClusters(clusters) { $scope.clusters = clusters; $scope.cluster = _.find($scope.clusters, { cluster_uuid: globalState.cluster_uuid }); } setClusters($route.current.locals.clusters); $scope.pageData = $route.current.locals.pageData; $scope.indexName = $route.current.params.index; title($scope.cluster, `Elasticsearch - Indices - ${$scope.indexName}`); $executor.register({ execute: () => getPageData(timefilter, globalState, $route, $http, Private), handleResponse: (response) => $scope.pageData = response }); $executor.register({ execute: () => monitoringClusters(), handleResponse: setClusters }); // Start the executor $executor.start(); // Destory the executor $scope.$on('$destroy', $executor.destroy); });
ashnewport/elasticsearch
kibana-5.0.2-linux-x86_64/plugins/x-pack/plugins/monitoring/public/views/elasticsearch/index/index_controller.js
JavaScript
mit
2,600
<!DOCTYPE html> <html dir="ltr" lang="en-US"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="author" content="SemiColonWeb" /> <!-- Stylesheets ============================================= --> <link href="http://fonts.googleapis.com/css?family=Lato:300,400,400italic,600,700|Raleway:300,400,500,600,700|Crete+Round:400italic" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="css/bootstrap.css" type="text/css" /> <link rel="stylesheet" href="style.css" type="text/css" /> <link rel="stylesheet" href="css/dark.css" type="text/css" /> <link rel="stylesheet" href="css/font-icons.css" type="text/css" /> <link rel="stylesheet" href="css/animate.css" type="text/css" /> <link rel="stylesheet" href="css/magnific-popup.css" type="text/css" /> <link rel="stylesheet" href="css/responsive.css" type="text/css" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <!-- Document Title ============================================= --> <title>2 Right Sidebars | Canvas</title> </head> <body class="stretched"> <!-- Document Wrapper ============================================= --> <div id="wrapper" class="clearfix"> <!-- Header ============================================= --> <header id="header" class="full-header"> <div id="header-wrap"> <div class="container clearfix"> <div id="primary-menu-trigger"><i class="icon-reorder"></i></div> <!-- Logo ============================================= --> <div id="logo"> <a href="index.html" class="standard-logo" data-dark-logo="images/logo-dark.png"><img src="images/logo.png" alt="Canvas Logo"></a> <a href="index.html" class="retina-logo" data-dark-logo="images/logo-dark@2x.png"><img src="images/logo@2x.png" alt="Canvas Logo"></a> </div><!-- #logo end --> <!-- Primary Navigation ============================================= --> <nav id="primary-menu"> <ul> <li><a href="index.html"><div>Home</div></a> <ul> <li><a href="index-corporate.html"><div>Home - Corporate</div></a> <ul> <li><a href="index-corporate.html"><div>Corporate - Layout 1</div></a></li> <li><a href="index-corporate-2.html"><div>Corporate - Layout 2</div></a></li> <li><a href="index-corporate-3.html"><div>Corporate - Layout 3</div></a></li> <li><a href="index-corporate-4.html"><div>Corporate - Layout 4</div></a></li> </ul> </li> <li><a href="index-portfolio.html"><div>Home - Portfolio</div></a> <ul> <li><a href="index-portfolio.html"><div>Portfolio - Layout 1</div></a></li> <li><a href="index-portfolio-2.html"><div>Portfolio - Layout 2</div></a></li> <li><a href="index-portfolio-3.html"><div>Portfolio - Masonry</div></a></li> <li><a href="index-portfolio-4.html"><div>Portfolio - AJAX</div></a></li> </ul> </li> <li><a href="index-blog.html"><div>Home - Blog</div></a> <ul> <li><a href="index-blog.html"><div>Blog - Layout 1</div></a></li> <li><a href="index-blog-2.html"><div>Blog - Layout 2</div></a></li> <li><a href="index-blog-3.html"><div>Blog - Layout 3</div></a></li> </ul> </li> <li><a href="index-shop.html"><div>Home - Shop</div></a> <ul> <li><a href="index-shop.html"><div>Shop - Layout 1</div></a></li> <li><a href="index-shop-2.html"><div>Shop - Layout 2</div></a></li> </ul> </li> <li><a href="index-magazine.html"><div>Home - Magazine</div></a> <ul> <li><a href="index-magazine.html"><div>Magazine - Layout 1</div></a></li> <li><a href="index-magazine-2.html"><div>Magazine - Layout 2</div></a></li> <li><a href="index-magazine-3.html"><div>Magazine - Layout 3</div></a></li> </ul> </li> <li><a href="landing.html"><div>Home - Landing Page</div></a> <ul> <li><a href="landing.html"><div>Landing Page - Layout 1</div></a></li> <li><a href="landing-2.html"><div>Landing Page - Layout 2</div></a></li> <li><a href="landing-3.html"><div>Landing Page - Layout 3</div></a></li> <li><a href="landing-4.html"><div>Landing Page - Layout 4</div></a></li> <li><a href="landing-5.html"><div>Landing Page - Layout 5</div></a></li> </ul> </li> <li><a href="index-fullscreen-image.html"><div>Home - Full Screen</div></a> <ul> <li><a href="index-fullscreen-image.html"><div>Full Screen - Image</div></a></li> <li><a href="index-fullscreen-slider.html"><div>Full Screen - Slider</div></a></li> <li><a href="index-fullscreen-video.html"><div>Full Screen - Video</div></a></li> </ul> </li> <li><a href="index-onepage.html"><div>Home - One Page</div></a> <ul> <li><a href="index-onepage.html"><div>One Page - Default</div></a></li> <li><a href="index-onepage-2.html"><div>One Page - Submenu</div></a></li> <li><a href="index-onepage-3.html"><div>One Page - Dots Style</div></a></li> </ul> </li> <li><a href="index-wedding.html"><div>Home - Wedding</div></a></li> <li><a href="index-restaurant.html"><div>Home - Restaurant</div></a></li> <li><a href="index-events.html"><div>Home - Events</div></a></li> <li><a href="index-parallax.html"><div>Home - Parallax</div></a></li> <li><a href="index-app-showcase.html"><div>Home - App Showcase</div></a></li> <li><a href="index-boxed.html"><div>Home - Boxed Layout</div></a></li> </ul> </li> <li><a href="#"><div>Features</div></a> <ul> <li><a href="#"><div><i class="icon-stack"></i>Sliders</div></a> <ul> <li><a href="slider-revolution.html"><div>Revolution Slider</div></a> <ul> <li><a href="rs-demo-premium-concept.html"><div>Premium Templates</div></a></li> <li><a href="slider-revolution.html"><div>Full Screen</div></a></li> <li><a href="slider-revolution-fullwidth.html"><div>Full Width</div></a></li> <li><a href="slider-revolution-kenburns.html"><div>Kenburns Effect</div></a></li> <li><a href="slider-revolution-html5-videos.html"><div>HTML5 Video</div></a></li> </ul> </li> <li><a href="slider-canvas.html"><div>Canvas Slider</div></a> <ul> <li><a href="slider-canvas.html"><div>Full Width</div></a></li> <li><a href="slider-canvas-fade.html"><div>Fade Transition</div></a></li> <li><a href="slider-canvas-autoplay.html"><div>Autoplay Feature</div></a></li> <li><a href="slider-canvas-video-event.html"><div>Custom Video Event</div></a></li> <li><a href="slider-canvas-pagination.html"><div>Pagination Navigation</div></a></li> <li><a href="slider-canvas-3.html"><div>3 Columns</div></a></li> <li><a href="slider-canvas-4.html"><div>4 Columns</div></a></li> <li><a href="slider-canvas-5.html"><div>5 Columns</div></a></li> </ul> </li> <li><a href="slider-flex.html"><div>Flex Slider</div></a> <ul> <li><a href="slider-flex.html"><div>Default Layout</div></a></li> <li><a href="slider-flex-thumbs.html"><div>with Thumbs</div></a></li> </ul> </li> <li><a href="slider-owl.html"><div>Owl Slider</div></a> <ul> <li><a href="slider-owl-full.html"><div>Full Width</div></a></li> <li><a href="slider-owl.html"><div>Boxed Width</div></a></li> <li><a href="slider-owl-videos.html"><div>Video Slider</div></a></li> </ul> </li> <li><a href="static-parallax.html"><div>Static Media</div></a> <ul> <li><a href="static-parallax.html"><div>Static - Parallax</div></a></li> <li><a href="static-image.html"><div>Static - Image</div></a></li> <li><a href="static-thumbs-grid.html"><div>Static - Thumb Gallery</div></a></li> <li><a href="static-html5-video.html"><div>Static - HTML5 Video</div></a></li> <li><a href="static-embed-video.html"><div>Static - Embedded Video</div></a></li> </ul> </li> <li><a href="slider-camera.html"><div>Camera Slider</div></a></li> <li><a href="slider-elastic.html"><div>Elastic Slider</div></a></li> <li><a href="slider-nivo.html"><div>Nivo Slider</div></a></li> </ul> </li> <li><a href="widgets.html"><div><i class="icon-gift"></i>Widgets</div></a> <ul> <li><a href="widgets.html"><div>Links</div></a></li> <li><a href="widgets.html"><div>Flickr Photostream</div></a></li> <li><a href="widgets.html"><div>Dribbble Shots</div></a></li> <li><a href="widgets.html"><div>Instagram Feed</div></a></li> <li><a href="widgets.html"><div>Posts List</div></a></li> <li><a href="widgets.html"><div>Twitter Feed</div></a></li> <li><a href="widgets.html"><div>Tabbed Widgets</div></a></li> <li><a href="widgets.html"><div>Carousel</div></a></li> <li><a href="widgets.html"><div>Subscribers</div></a></li> <li><a href="widgets.html"><div>Social Icons</div></a></li> <li><a href="widgets.html"><div>Testimonials</div></a></li> <li><a href="widgets.html"><div>Quick Contact</div></a></li> <li><a href="widgets.html"><div>Tags Cloud</div></a></li> <li><a href="widgets.html"><div>Video Embeds</div></a></li> <li><a href="widgets.html"><div>Raw Text/HTML</div></a></li> </ul> </li> <li><a href="#"><div><i class="icon-umbrella"></i>Headers</div></a> <ul> <li><a href="header-light.html"><div>Light Version</div></a></li> <li><a href="header-dark.html"><div>Dark Version</div></a></li> <li><a href="header-transparent.html"><div>Transparent</div></a></li> <li><a href="header-semi-transparent.html"><div>Semi Transparent</div></a> <ul> <li><a href="header-semi-transparent.html"><div>Light Version</div></a></li> <li><a href="header-semi-transparent-dark.html"><div>Dark Version</div></a></li> </ul> </li> <li><a href="header-side-left.html"><div>Left Side Header</div></a> <ul> <li><a href="header-side-left.html"><div>Fixed Position</div></a></li> <li><a href="header-side-left-open.html"><div>OnClick Open</div></a></li> <li><a href="header-side-left-open-push.html"><div>Push Content</div></a></li> </ul> </li> <li><a href="header-side-right.html"><div>Right Side Header</div></a> <ul> <li><a href="header-side-right.html"><div>Fixed Position</div></a></li> <li><a href="header-side-right-open.html"><div>OnClick Open</div></a></li> <li><a href="header-side-right-open-push.html"><div>Push Content</div></a></li> </ul> </li> <li><a href="header-floating.html"><div>Floating Version</div></a></li> <li><a href="static-sticky.html"><div>Static Sticky</div></a></li> <li><a href="responsive-sticky.html"><div>Responsive Sticky</div></a></li> <li><a href="logo-changer.html"><div>Alternate Logos</div></a></li> <li><a href="alternate-mobile-menu.html"><div>Alternate Mobile Menu</div></a></li> </ul> </li> <li><a href="side-panel.html"><div><i class="icon-line-layout"></i>Side Panel</div></a> <ul> <li><a href="side-panel-left-overlay.html"><div>Left Overlay</div></a></li> <li><a href="side-panel-left-push.html"><div>Left Push</div></a></li> <li><a href="side-panel-right-overlay.html"><div>Right Overlay</div></a></li> <li><a href="side-panel.html"><div>Right Push</div></a></li> <li><a href="side-panel-light.html"><div>Light Background</div></a></li> </ul> </li> <li><a href="mega-menu.html"><div><i class="icon-line-columns"></i>Mega Menu</div></a></li> <li><a href="#"><div><i class="icon-align-justify2"></i>Menu Styles</div></a> <ul> <li><a href="header-light.html"><div>Menu - Style 1</div></a></li> <li><a href="menu-2.html"><div>Menu - Style 2</div></a></li> <li><a href="menu-3.html"><div>Menu - Style 3</div></a></li> <li><a href="menu-4.html"><div>Menu - Style 4</div></a></li> <li><a href="menu-5.html"><div>Menu - Style 5</div></a></li> <li><a href="menu-6.html"><div>Menu - Style 6</div></a></li> <li><a href="menu-7.html"><div>Menu - Style 7</div></a></li> <li><a href="menu-8.html"><div>Menu - Style 8</div></a></li> <li><a href="menu-9.html"><div>Menu - Style 9</div></a></li> <li><a href="menu-10.html"><div>Menu - Overlay</div></a></li> <li><a href="split-menu.html"><div>Menu - Split Layout</div></a></li> </ul> </li> <li><a href="#"><div><i class="icon-ok-sign"></i>Page Titles</div></a> <ul> <li><a href="page.html"><div>Left Align</div></a></li> <li><a href="page-title-right.html"><div>Right Align</div></a></li> <li><a href="page-title-center.html"><div>Center Align</div></a></li> <li><a href="page-titledark.html"><div>Dark Style</div></a></li> <li><a href="page-title-pattern.html"><div>Pattern Background</div></a></li> <li><a href="page-title-parallax.html"><div>Parallax Background</div></a> <ul> <li><a href="page-title-parallax.html"><div>Default Header</div></a></li> <li><a href="page-title-parallax-header.html"><div>Transparent Header</div></a></li> </ul> </li> <li><a href="page-title-video.html"><div>HTML5 Video</div></a></li> <li><a href="page-title-nobg.html"><div>No Background</div></a></li> <li><a href="page-title-mini.html"><div>Mini Version</div></a></li> </ul> </li> <li><a href="contact.html"><div><i class="icon-envelope-alt"></i>Contact Pages</div></a> <ul> <li><a href="contact.html">Contact 1</a></li> <li><a href="contact-2.html">Contact 2</a></li> <li><a href="contact-3.html">Contact 3</a></li> <li><a href="contact-4.html">Contact 4</a></li> <li><a href="contact-5.html">Contact 5</a></li> <li><a href="contact-6.html">Contact 6</a></li> <li><a href="contact-7.html">Contact 7</a></li> </ul> </li> <li><a href="#footer" data-scrollto="#footer"><div><i class="icon-th"></i>Footers</div></a> <ul> <li><a href="sticky-footer.html"><div>Sticky Footer</div></a></li> <li><a href="#footer" data-scrollto="#footer"><div>Footer - Layout 1</div></a></li> <li><a href="footer-2.html#footer"><div>Footer - Layout 2</div></a></li> <li><a href="footer-3.html#footer"><div>Footer - Layout 3</div></a></li> <li><a href="footer-4.html#footer"><div>Footer - Layout 4</div></a></li> <li><a href="footer-5.html#footer"><div>Footer - Layout 5</div></a></li> <li><a href="footer-6.html#footer"><div>Footer - Layout 6</div></a></li> <li><a href="footer-7.html#footer"><div>Footer - Layout 7</div></a></li> </ul> </li> <li><a href="#"><div><i class="icon-calendar3"></i>Events</div></a> <ul> <li><a href="events-calendar.html"><div>Full Width Calendar</div></a></li> <li><a href="events-list.html"><div>Events List</div></a> <ul> <li><a href="events-list.html"><div>Right Sidebar</div></a></li> <li><a href="events-list-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="events-list-both-sidebar.html"><div>Both Sidebar</div></a></li> <li><a href="events-list-fullwidth.html"><div>Full Width</div></a></li> <li><a href="events-list-parallax.html"><div>Parallax List</div></a></li> </ul> </li> <li><a href="event-single.html"><div>Single Event</div></a> <ul> <li><a href="event-single-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="event-single-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="event-single-both-sidebar.html"><div>Both Sidebar</div></a></li> <li><a href="event-single.html"><div>Full Width</div></a></li> </ul> </li> <li><a href="event-single-full-width-image.html"><div>Single Event - Full</div></a> <ul> <li><a href="event-single-full-width-image.html"><div>Parallax Image</div></a></li> <li><a href="event-single-full-width-map.html"><div>Google Map</div></a></li> <li><a href="event-single-full-width-slider.html"><div>Slider Gallery</div></a></li> <li><a href="event-single-full-width-video.html"><div>HTML5 Video</div></a></li> </ul> </li> </ul> </li> <li><a href="modal-onload.html"><div><i class="icon-line-expand"></i>Modal OnLoad</div></a> <ul> <li><a href="modal-onload.html"><div>Simple Layout</div></a></li> <li><a href="modal-onload-iframe.html"><div>Video iFrame</div></a></li> <li><a href="modal-onload-subscribe.html"><div>Subscription Form</div></a></li> <li><a href="modal-onload-common-height.html"><div>Common Height</div></a></li> <li><a href="modal-onload-cookie.html"><div>Cookies Enabled</div></a></li> </ul> </li> <li><a href="coming-soon.html"><div><i class="icon-time"></i>Coming Soon</div></a> <ul> <li><a href="coming-soon.html"><div>Simple Layout</div></a></li> <li><a href="coming-soon-2.html"><div>Parallax Image</div></a></li> <li><a href="coming-soon-3.html"><div>HTML5 Video</div></a></li> </ul> </li> <li><a href="profile.html"><div><i class="icon-user"></i>User Profile</div></a></li> </ul> </li> <li class="current mega-menu"><a href="#"><div>Pages</div></a> <div class="mega-menu-content style-2 clearfix"> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Introduction</div></a> <ul> <li><a href="about.html"><div>About Us</div></a></li> <li><a href="about-2.html"><div>About Us - Layout 2</div></a></li> <li><a href="about-me.html"><div>About Me</div></a></li> <li><a href="team.html"><div>Team Members</div></a></li> <li><a href="jobs.html"><div>Careers</div></a></li> <li><a href="side-navigation.html"><div>Side Navigation</div></a></li> <li><a href="page-submenu.html"><div>Page Submenu</div></a></li> <li><a href="sitemap.html"><div>Sitemap</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Utility</div></a> <ul> <li><a href="services.html"><div>Services - Layout 1</div></a></li> <li><a href="services-2.html"><div>Services - Layout 2</div></a></li> <li><a href="services-3.html"><div>Services - Layout 3</div></a></li> <li><a href="faqs.html"><div>FAQs - Layout 1</div></a></li> <li><a href="faqs-2.html"><div>FAQs - Layout 2</div></a></li> <li><a href="faqs-3.html"><div>FAQs - Layout 3</div></a></li> <li><a href="faqs-4.html"><div>FAQs - Layout 4</div></a></li> <li><a href="maintenance.html"><div>Maintenance Page</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Layout Grids</div></a> <ul> <li><a href="full-width.html"><div>Full Width</div></a></li> <li><a href="full-width-wide.html"><div>Full Width - Wide</div></a></li> <li><a href="right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="both-sidebar.html"><div>Both Sidebar</div></a></li> <li><a href="both-right-sidebar.html"><div>Both Right Sidebar</div></a></li> <li><a href="both-left-sidebar.html"><div>Both Left Sidebar</div></a></li> <li><a href="blank-page.html"><div>Blank Page</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Miscellaneous</div></a> <ul> <li><a href="login-register.html"><div>Login/Register</div></a></li> <li><a href="login-register-2.html"><div>Login/Register - Style 2</div></a></li> <li><a href="login-register-3.html"><div>Login/Register - Style 3</div></a></li> <li><a href="login-1.html"><div>Login - Style 1</div></a></li> <li><a href="login-2.html"><div>Login - Style 2</div></a></li> <li><a href="404.html"><div>404 - Simple Layout</div></a></li> <li><a href="404-2.html"><div>404 - Parallax Image</div></a></li> <li><a href="404-3.html"><div>404 - HTML5 Video</div></a></li> </ul> </li> </ul> </div> </li> <li class="mega-menu"><a href="#"><div>Portfolio</div></a> <div class="mega-menu-content style-2 clearfix"> <ul class="mega-menu-column col-5"> <li class="mega-menu-title"><a href="#"><div>Grids</div></a> <ul> <li><a href="portfolio-1.html"><div>1 Column</div></a></li> <li><a href="portfolio-2.html"><div>2 Columns</div></a></li> <li><a href="portfolio-3.html"><div>3 Columns</div></a></li> <li><a href="portfolio.html"><div>4 Columns</div></a></li> <li><a href="portfolio-5.html"><div>5 Columns</div></a></li> <li><a href="portfolio-6.html"><div>6 Columns</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-5"> <li class="mega-menu-title"><a href="#"><div>Masonry</div></a> <ul> <li><a href="portfolio-mixed-masonry.html"><div>Mixed Columns</div></a></li> <li><a href="portfolio-2-masonry.html"><div>2 Columns</div></a></li> <li><a href="portfolio-3-masonry.html"><div>3 Columns</div></a></li> <li><a href="portfolio-masonry.html"><div>4 Columns</div></a></li> <li><a href="portfolio-5-masonry.html"><div>5 Columns</div></a></li> <li><a href="portfolio-6-masonry.html"><div>6 Columns</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-5"> <li class="mega-menu-title"><a href="#"><div>Loading Styles</div></a> <ul> <li><a href="portfolio.html"><div>jQuery Filter</div></a></li> <li><a href="portfolio-jpagination.html"><div>jQuery Pagination</div></a></li> <li><a href="portfolio-infinity-scroll.html"><div>Infinity Scroll</div></a></li> <li><a href="portfolio-ajax.html"><div>AJAX In Page</div></a></li> <li><a href="portfolio-ajax-in-modal.html"><div>AJAX In Modal</div></a></li> <li><a href="portfolio-filter-styles.html"><div>Filter Styles</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-5"> <li class="mega-menu-title"><a href="#"><div>Single Project</div></a> <ul> <li><a href="portfolio-single-extended.html"><div>Extended Item</div></a></li> <li><a href="portfolio-single-fullwidth.html"><div>Parallax Image</div></a></li> <li><a href="portfolio-single-gallery-full.html"><div>Slider Gallery</div></a></li> <li><a href="portfolio-single-video-fullwidth-left-sidebar.html"><div>HTML5 Video</div></a></li> <li><a href="portfolio-single-thumbs-right-sidebar.html"><div>Masonry Thumbs</div></a></li> <li><a href="portfolio-single-video-both-sidebar.html"><div>Embed Video</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-5"> <li class="mega-menu-title"><a href="#"><div>Layouts</div></a> <ul> <li><a href="portfolio-nomargin.html"><div>Default</div></a></li> <li><a href="portfolio-1-alt-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="portfolio-3-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="portfolio-2-both-sidebar.html"><div>Both Sidebar</div></a></li> <li><a href="portfolio-fullwidth-notitle.html"><div>100% Width</div></a></li> <li><a href="portfolio-parallax.html"><div>Parallax</div></a></li> </ul> </li> </ul> </div> </li> <li class="mega-menu"><a href="#"><div>Blog</div></a> <div class="mega-menu-content style-2 clearfix"> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Default</div></a> <ul> <li><a href="blog.html"><div>Right Sidebar</div></a></li> <li><a href="blog-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="blog-both-sidebar.html"><div>Both Sidebar</div></a></li> <li><a href="blog-full-width.html"><div>Full Width</div></a></li> </ul> </li> <li class="mega-menu-title"><a href="#"><div>Timeline</div></a> <ul> <li><a href="blog-timeline-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="blog-timeline-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="blog-timeline.html"><div>Full Width</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Masonry</div></a> <ul> <li><a href="blog-masonry.html"><div>4 Columns</div></a></li> <li><a href="blog-masonry-3.html"><div>3 Columns</div></a></li> <li><a href="blog-masonry-2.html"><div>2 Columns</div></a></li> <li><a href="blog-masonry-full.html"><div>100% Width</div></a></li> </ul> </li> <li class="mega-menu-title"><a href="#"><div>Grid</div></a> <ul> <li><a href="blog-grid.html"><div>4 Columns</div></a></li> <li><a href="blog-grid-3.html"><div>3 Columns</div></a></li> <li><a href="blog-grid-2.html"><div>2 Columns</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Small Thumbs</div></a> <ul> <li><a href="blog-small-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="blog-small.html"><div>Right Sidebar</div></a></li> <li><a href="blog-small-both-sidebar.html"><div>Both Sidebar</div></a></li> <li><a href="blog-small-full-width.html"><div>Full Width</div></a></li> <li><a href="blog-small-alt.html"><div>Alternate Layout</div></a></li> </ul> </li> <li class="mega-menu-title"><a href="#"><div>Item Splitting</div></a> <ul> <li><a href="blog-grid.html"><div>Pagination</div></a></li> <li><a href="blog-masonry.html"><div>Infinite Scroll</div></a></li> </ul> </li> </ul> <ul class="mega-menu-column col-md-3"> <li class="mega-menu-title"><a href="#"><div>Single</div></a> <ul> <li><a href="blog-single.html"><div>Default Layout</div></a></li> <li><a href="blog-single-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="blog-single-full.html"><div>Full Width</div></a></li> <li><a href="blog-single-small.html"><div>Small Image</div></a></li> <li><a href="blog-single-split-right-sidebar.html"><div>Split Layout</div></a></li> </ul> </li> <li class="mega-menu-title"><a href="#"><div>Comments Module</div></a> <ul> <li><a href="blog-single-left-sidebar.html#comments"><div>Facebook Comments</div></a></li> <li><a href="blog-single-small.html#comments"><div>Disqus Comments</div></a></li> </ul> </li> </ul> </div> </li> <li><a href="shop.html"><div>Shop</div></a> <ul> <li><a href="shop.html"><div>4 Columns</div></a></li> <li><a href="shop-3.html"><div>3 Columns</div></a> <ul> <li><a href="shop-3.html"><div>Full Width</div></a></li> <li><a href="shop-3-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="shop-3-left-sidebar.html"><div>Left Sidebar</div></a></li> </ul> </li> <li><a href="shop-2.html"><div>2 Columns</div></a> <ul> <li><a href="shop-2-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="shop-2-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="shop-2-both-sidebar.html"><div>Both Sidebar</div></a></li> </ul> </li> <li><a href="shop-1.html"><div>1 Columns</div></a> <ul> <li><a href="shop-1.html"><div>Full Width</div></a></li> <li><a href="shop-1-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="shop-1-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="shop-1-both-sidebar.html"><div>Both Sidebar</div></a></li> </ul> </li> <li><a href="shop-category-parallax.html"><div>Categories - Parallax</div></a></li> <li><a href="shop-combination-filter.html"><div>Combination Filter</div></a></li> <li><a href="shop-single.html"><div>Single Product</div></a> <ul> <li><a href="shop-single.html"><div>Full Width</div></a></li> <li><a href="shop-single-right-sidebar.html"><div>Right Sidebar</div></a></li> <li><a href="shop-single-left-sidebar.html"><div>Left Sidebar</div></a></li> <li><a href="shop-single-both-sidebar.html"><div>Both Sidebar</div></a></li> </ul> </li> <li><a href="cart.html"><div>Cart</div></a></li> <li><a href="checkout.html"><div>Checkout</div></a></li> </ul> </li> <li class="mega-menu"><a href="#"><div>Shortcodes</div></a> <div class="mega-menu-content clearfix"> <ul class="mega-menu-column col-5"> <li><a href="animations.html"><div><i class="icon-magic"></i>Animations</div></a></li> <li><a href="buttons.html"><div><i class="icon-link"></i>Buttons</div></a></li> <li><a href="carousel.html"><div><i class="icon-heart3"></i>Carousel</div></a></li> <li><a href="charts.html"><div><i class="icon-bar-chart"></i>Charts</div></a></li> <li><a href="clients.html"><div><i class="icon-apple"></i>Clients</div></a></li> <li><a href="columns-grids.html"><div><i class="icon-th-large"></i>Columns</div></a></li> <li><a href="counters.html"><div><i class="icon-time"></i>Counters</div></a></li> <li><a href="component-datatable.html"><div><i class="icon-table"></i>Data Tables</div></a></li> <li><a href="component-datepicker.html"><div><i class="icon-calendar3"></i>Date &amp; Time Pickers</div></a></li> </ul> <ul class="mega-menu-column col-5"> <li><a href="dividers.html"><div><i class="icon-indent-right"></i>Dividers</div></a></li> <li><a href="featured-boxes.html"><div><i class="icon-lightbulb"></i>Icon Boxes</div></a></li> <li><a href="gallery.html"><div><i class="icon-picture"></i>Galleries</div></a></li> <li><a href="headings-dropcaps.html"><div><i class="icon-pencil2"></i>Heading Styles</div></a></li> <li><a href="icon-lists.html"><div><i class="icon-list-alt"></i>Icon Lists</div></a></li> <li><a href="labels-badges.html"><div><i class="icon-plus-sign"></i>Labels</div></a></li> <li><a href="lightbox.html"><div><i class="icon-resize-full"></i>Lightbox</div></a></li> <li><a href="component-editable.html"><div><i class="icon-edit"></i>Editable Fields</div></a></li> <li><a href="component-uploads.html"><div><i class="icon-line-upload"></i>File Uploads</div></a></li> </ul> <ul class="mega-menu-column col-5"> <li><a href="lists-panels.html"><div><i class="icon-th-list"></i>Lists &amp; Panels</div></a></li> <li><a href="maps.html"><div><i class="icon-map-marker2"></i>Maps</div></a></li> <li><a href="media-embeds.html"><div><i class="icon-play"></i>Media Embeds</div></a></li> <li><a href="modal-popovers.html"><div><i class="icon-move"></i>Modal Boxes</div></a></li> <li><a href="navigation.html"><div><i class="icon-align-justify2"></i>Navigations</div></a></li> <li><a href="pagination-progress.html"><div><i class="icon-cogs"></i>Pagination</div></a></li> <li><a href="pie-skills.html"><div><i class="icon-tasks"></i>Pies &amp; Skills</div></a></li> <li><a href="component-range-slider.html"><div><i class="icon-line-move"></i>Range Slider</div></a></li> <li><a href="component-ratings.html"><div><i class="icon-star3"></i>Star Ratings</div></a></li> </ul> <ul class="mega-menu-column col-5"> <li><a href="pricing.html"><div><i class="icon-dollar"></i>Pricing Boxes</div></a></li> <li><a href="process-steps.html"><div><i class="icon-thumbs-up"></i>Process Steps</div></a></li> <li><a href="promo-boxes.html"><div><i class="icon-rocket"></i>Promo Boxes</div></a></li> <li><a href="quotes-blockquotes.html"><div><i class="icon-quote-left"></i>Blockquotes</div></a></li> <li><a href="responsive.html"><div><i class="icon-laptop2"></i>Responsive</div></a></li> <li><a href="sections.html"><div><i class="icon-folder-open"></i>Sections</div></a></li> <li><a href="social-icons.html"><div><i class="icon-facebook2"></i>Social Icons</div></a></li> <li><a href="component-select-picker.html"><div><i class="icon-select"></i>Select Picker</div></a></li> <li><a href="component-select-box.html"><div><i class="icon-line-columns"></i>Select Boxes</div></a></li> </ul> <ul class="mega-menu-column col-5"> <li><a href="style-boxes.html"><div><i class="icon-exclamation-sign"></i>Alert Boxes</div></a></li> <li><a href="styled-icons.html"><div><i class="icon-flag2"></i>Styled Icons</div></a></li> <li><a href="tables.html"><div><i class="icon-table"></i>Tables</div></a></li> <li><a href="tabs.html"><div><i class="icon-star3"></i>Tabs</div></a></li> <li><a href="testimonials-twitter.html"><div><i class="icon-user4"></i>Testimonials</div></a></li> <li><a href="thumbnails-slider.html"><div><i class="icon-camera3"></i>Thumbnails</div></a></li> <li><a href="toggles-accordions.html"><div><i class="icon-ok-circle"></i>Toggles</div></a></li> <li><a href="component-radios-switches.html"><div><i class="icon-line-square-check"></i>Radios &amp; Switches</div></a></li> <li><a href="component-typeahead.html"><div><i class="icon-type"></i>Input Typeahead</div></a></li> </ul> </div> </li> </ul> <!-- Top Cart ============================================= --> <div id="top-cart"> <a href="#" id="top-cart-trigger"><i class="icon-shopping-cart"></i><span>5</span></a> <div class="top-cart-content"> <div class="top-cart-title"> <h4>Shopping Cart</h4> </div> <div class="top-cart-items"> <div class="top-cart-item clearfix"> <div class="top-cart-item-image"> <a href="#"><img src="images/shop/small/1.jpg" alt="Blue Round-Neck Tshirt" /></a> </div> <div class="top-cart-item-desc"> <a href="#">Blue Round-Neck Tshirt</a> <span class="top-cart-item-price">$19.99</span> <span class="top-cart-item-quantity">x 2</span> </div> </div> <div class="top-cart-item clearfix"> <div class="top-cart-item-image"> <a href="#"><img src="images/shop/small/6.jpg" alt="Light Blue Denim Dress" /></a> </div> <div class="top-cart-item-desc"> <a href="#">Light Blue Denim Dress</a> <span class="top-cart-item-price">$24.99</span> <span class="top-cart-item-quantity">x 3</span> </div> </div> </div> <div class="top-cart-action clearfix"> <span class="fleft top-checkout-price">$114.95</span> <button class="button button-3d button-small nomargin fright">View Cart</button> </div> </div> </div><!-- #top-cart end --> <!-- Top Search ============================================= --> <div id="top-search"> <a href="#" id="top-search-trigger"><i class="icon-search3"></i><i class="icon-line-cross"></i></a> <form action="search.html" method="get"> <input type="text" name="q" class="form-control" value="" placeholder="Type &amp; Hit Enter.."> </form> </div><!-- #top-search end --> </nav><!-- #primary-menu end --> </div> </div> </header><!-- #header end --> <!-- Page Title ============================================= --> <section id="page-title"> <div class="container clearfix"> <h1>2 Right Sidebars</h1> <span>Page Content on the Right &amp; 2 Sidebars on Right Side</span> <ol class="breadcrumb"> <li><a href="#">Home</a></li> <li><a href="#">Pages</a></li> <li class="active">2 Right Sidebars</li> </ol> </div> </section><!-- #page-title end --> <!-- Content ============================================= --> <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <!-- Post Content ============================================= --> <div class="postcontent bothsidebar nobottommargin clearfix"> <p><span class="dropcap">F</span>oster best practices effectiveness inspire breakthroughs solve immunize turmoil. Policy dialogue peaceful The Elders rural global support. Process inclusive innovate readiness, public sector complexity. Lifting people up cornerstone partner, technology working families civic engagement activist recognize potential global network. Countries tackling solution respond change-makers tackle. Assistance, giving; fight against malnutrition experience in the field lasting change scalable. Empowerment long-term, fairness policy community progress social responsibility; Cesar Chavez recognition. Expanding community ownership visionary indicator pursue these aspirations accessibility. Achieve; worldwide, life-saving initiative facilitate. New approaches, John Lennon humanitarian relief fundraise vaccine Jane Jacobs community health workers Oxfam. Our ambitions informal economies.</p> <blockquote class="topmargin bottommargin"> <p>Human rights healthcare immunize; advancement grantees. Medical supplies; meaningful, truth technology catalytic effect. Promising development capacity building international enable poverty.</p> </blockquote> <div class="col_half nobottommargin"> <p>Provide, Aga Khan, interconnectivity governance fairness replicable, new approaches visionary implementation. End hunger evolution, future promising development youth. Public sector, small-scale farmers; harness facilitate gender. Contribution dedicated global change movements, prosperity accelerate progress citizens of change. Elevate; accelerate reduce child mortality; billionaire philanthropy fluctuation, plumpy'nut care opportunity catalyze. Partner deep.</p> </div> <div class="col_half nobottommargin col_last"> <p>Frontline harness criteria governance freedom contribution. Campaign Angelina Jolie natural resources, Rockefeller peaceful philanthropy human potential. Justice; outcomes reduce carbon emissions nonviolent resistance human being. Solve innovate aid communities; benefit truth rural development UNICEF meaningful work. Generosity Action Against Hunger relief; many voices impact crisis situation poverty pride. Vaccine carbon.</p> </div> </div><!-- .postcontent end --> <!-- Sidebar ============================================= --> <div class="sidebar nobottommargin clearfix"> <div class="sidebar-widgets-wrap"> <div class="widget clearfix"> <h4>Recent Posts</h4> <div id="post-list-footer"> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img src="images/magazine/small/1.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Lorem ipsum dolor sit amet, consectetur</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img src="images/magazine/small/2.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Elit Assumenda vel amet dolorum quasi</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img src="images/magazine/small/3.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Debitis nihil placeat, illum est nisi</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> </div> </div> <div class="widget clearfix"> <h4>Testimonials</h4> <div class="fslider testimonial noborder nopadding noshadow" data-animation="slide" data-arrows="false"> <div class="flexslider"> <div class="slider-wrap"> <div class="slide"> <div class="testi-image"> <a href="#"><img src="images/testimonials/3.jpg" alt="Customer Testimonails"></a> </div> <div class="testi-content"> <p>Similique fugit repellendus expedita excepturi iure perferendis provident quia eaque. Repellendus, vero numquam?</p> <div class="testi-meta"> Steve Jobs <span>Apple Inc.</span> </div> </div> </div> <div class="slide"> <div class="testi-image"> <a href="#"><img src="images/testimonials/2.jpg" alt="Customer Testimonails"></a> </div> <div class="testi-content"> <p>Natus voluptatum enim quod necessitatibus quis expedita harum provident eos obcaecati id culpa corporis molestias.</p> <div class="testi-meta"> Collis Ta'eed <span>Envato Inc.</span> </div> </div> </div> <div class="slide"> <div class="testi-image"> <a href="#"><img src="images/testimonials/1.jpg" alt="Customer Testimonails"></a> </div> <div class="testi-content"> <p>Incidunt deleniti blanditiis quas aperiam recusandae consequatur ullam quibusdam cum libero illo rerum!</p> <div class="testi-meta"> John Doe <span>XYZ Inc.</span> </div> </div> </div> </div> </div> </div> </div> <div class="widget clearfix"> <h4>Instagram Photos</h4> <div id="instagram-photos" class="instagram-photos masonry-thumbs" data-user="269801886" data-count="16" data-type="user"></div> </div> <div class="widget quick-contact-widget clearfix"> <h4>Quick Contact</h4> <div class="quick-contact-form-result"></div> <form id="quick-contact-form" name="quick-contact-form" action="include/quickcontact.php" method="post" class="quick-contact-form nobottommargin"> <div class="form-process"></div> <input type="text" class="required sm-form-control input-block-level" id="quick-contact-form-name" name="quick-contact-form-name" value="" placeholder="Full Name" /> <input type="text" class="required sm-form-control email input-block-level" id="quick-contact-form-email" name="quick-contact-form-email" value="" placeholder="Email Address" /> <textarea class="required sm-form-control input-block-level short-textarea" id="quick-contact-form-message" name="quick-contact-form-message" rows="4" cols="30" placeholder="Message"></textarea> <input type="text" class="hidden" id="quick-contact-form-botcheck" name="quick-contact-form-botcheck" value="" /> <button type="submit" id="quick-contact-form-submit" name="quick-contact-form-submit" class="button button-small button-3d nomargin" value="submit">Send Email</button> </form> </div> </div> </div><!-- .sidebar end --> <!-- Sidebar ============================================= --> <div class="sidebar nobottommargin col_last clearfix"> <div class="sidebar-widgets-wrap"> <div class="widget widget-twitter-feed clearfix"> <h4>Twitter Feed</h4> <ul class="iconlist twitter-feed" data-username="envato" data-count="2"> <li></li> </ul> <a href="#" class="btn btn-default btn-sm fright">Follow Us on Twitter</a> </div> <div class="widget clearfix"> <h4>Flickr Photostream</h4> <div id="flickr-widget" class="flickr-feed masonry-thumbs" data-id="613394@N22" data-count="16" data-type="group" data-lightbox="gallery"></div> </div> <div class="widget clearfix"> <div class="tabs nobottommargin clearfix" id="sidebar-tabs"> <ul class="tab-nav clearfix"> <li><a href="#tabs-1">Popular</a></li> <li><a href="#tabs-2">Recent</a></li> <li><a href="#tabs-3"><i class="icon-comments-alt norightmargin"></i></a></li> </ul> <div class="tab-container"> <div class="tab-content clearfix" id="tabs-1"> <div id="popular-post-list-sidebar"> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/magazine/small/3.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Debitis nihil placeat, illum est nisi</a></h4> </div> <ul class="entry-meta"> <li><i class="icon-comments-alt"></i> 35 Comments</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/magazine/small/2.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Elit Assumenda vel amet dolorum quasi</a></h4> </div> <ul class="entry-meta"> <li><i class="icon-comments-alt"></i> 24 Comments</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/magazine/small/1.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Lorem ipsum dolor sit amet, consectetur</a></h4> </div> <ul class="entry-meta"> <li><i class="icon-comments-alt"></i> 19 Comments</li> </ul> </div> </div> </div> </div> <div class="tab-content clearfix" id="tabs-2"> <div id="recent-post-list-sidebar"> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/magazine/small/1.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Lorem ipsum dolor sit amet, consectetur</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/magazine/small/2.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Elit Assumenda vel amet dolorum quasi</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/magazine/small/3.jpg" alt=""></a> </div> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Debitis nihil placeat, illum est nisi</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> </div> </div> <div class="tab-content clearfix" id="tabs-3"> <div id="recent-post-list-sidebar"> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/icons/avatar.jpg" alt=""></a> </div> <div class="entry-c"> <strong>John Doe:</strong> Veritatis recusandae sunt repellat distinctio... </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/icons/avatar.jpg" alt=""></a> </div> <div class="entry-c"> <strong>Mary Jane:</strong> Possimus libero, earum officia architecto maiores.... </div> </div> <div class="spost clearfix"> <div class="entry-image"> <a href="#" class="nobg"><img class="img-circle" src="images/icons/avatar.jpg" alt=""></a> </div> <div class="entry-c"> <strong>Site Admin:</strong> Deleniti magni labore laboriosam odio... </div> </div> </div> </div> </div> </div> </div> <div class="widget clearfix"> <h4>Portfolio Carousel</h4> <div id="oc-portfolio-sidebar" class="owl-carousel carousel-widget" data-items="1" data-margin="10" data-loop="true" data-nav="false" data-autoplay="5000"> <div class="oc-item"> <div class="iportfolio"> <div class="portfolio-image"> <a href="#"> <img src="images/portfolio/4/3.jpg" alt="Mac Sunglasses"> </a> <div class="portfolio-overlay"> <a href="http://vimeo.com/89396394" class="center-icon" data-lightbox="iframe"><i class="icon-line-play"></i></a> </div> </div> <div class="portfolio-desc center nobottompadding"> <h3><a href="portfolio-single-video.html">Mac Sunglasses</a></h3> <span><a href="#">Graphics</a>, <a href="#">UI Elements</a></span> </div> </div> </div> <div class="oc-item"> <div class="iportfolio"> <div class="portfolio-image"> <a href="portfolio-single.html"> <img src="images/portfolio/4/1.jpg" alt="Open Imagination"> </a> <div class="portfolio-overlay"> <a href="images/blog/full/1.jpg" class="center-icon" data-lightbox="image"><i class="icon-line-plus"></i></a> </div> </div> <div class="portfolio-desc center nobottompadding"> <h3><a href="portfolio-single.html">Open Imagination</a></h3> <span><a href="#">Media</a>, <a href="#">Icons</a></span> </div> </div> </div> </div> </div> <div class="widget clearfix"> <h4>Tag Cloud</h4> <div class="tagcloud"> <a href="#">general</a> <a href="#">videos</a> <a href="#">music</a> <a href="#">media</a> <a href="#">photography</a> <a href="#">parallax</a> <a href="#">ecommerce</a> <a href="#">terms</a> <a href="#">coupons</a> <a href="#">modern</a> </div> </div> </div> </div><!-- .sidebar end --> </div> </div> </section><!-- #content end --> <!-- Footer ============================================= --> <footer id="footer" class="dark"> <div class="container"> <!-- Footer Widgets ============================================= --> <div class="footer-widgets-wrap clearfix"> <div class="col_two_third"> <div class="col_one_third"> <div class="widget clearfix"> <img src="images/footer-widget-logo.png" alt="" class="footer-logo"> <p>We believe in <strong>Simple</strong>, <strong>Creative</strong> &amp; <strong>Flexible</strong> Design Standards.</p> <div style="background: url('images/world-map.png') no-repeat center center; background-size: 100%;"> <address> <strong>Headquarters:</strong><br> 795 Folsom Ave, Suite 600<br> San Francisco, CA 94107<br> </address> <abbr title="Phone Number"><strong>Phone:</strong></abbr> (91) 8547 632521<br> <abbr title="Fax"><strong>Fax:</strong></abbr> (91) 11 4752 1433<br> <abbr title="Email Address"><strong>Email:</strong></abbr> info@canvas.com </div> </div> </div> <div class="col_one_third"> <div class="widget widget_links clearfix"> <h4>Blogroll</h4> <ul> <li><a href="http://codex.wordpress.org/">Documentation</a></li> <li><a href="http://wordpress.org/support/forum/requests-and-feedback">Feedback</a></li> <li><a href="http://wordpress.org/extend/plugins/">Plugins</a></li> <li><a href="http://wordpress.org/support/">Support Forums</a></li> <li><a href="http://wordpress.org/extend/themes/">Themes</a></li> <li><a href="http://wordpress.org/news/">WordPress Blog</a></li> <li><a href="http://planet.wordpress.org/">WordPress Planet</a></li> </ul> </div> </div> <div class="col_one_third col_last"> <div class="widget clearfix"> <h4>Recent Posts</h4> <div id="post-list-footer"> <div class="spost clearfix"> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Lorem ipsum dolor sit amet, consectetur</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Elit Assumenda vel amet dolorum quasi</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> <div class="spost clearfix"> <div class="entry-c"> <div class="entry-title"> <h4><a href="#">Debitis nihil placeat, illum est nisi</a></h4> </div> <ul class="entry-meta"> <li>10th July 2014</li> </ul> </div> </div> </div> </div> </div> </div> <div class="col_one_third col_last"> <div class="widget clearfix" style="margin-bottom: -20px;"> <div class="row"> <div class="col-md-6 bottommargin-sm"> <div class="counter counter-small"><span data-from="50" data-to="15065421" data-refresh-interval="80" data-speed="3000" data-comma="true"></span></div> <h5 class="nobottommargin">Total Downloads</h5> </div> <div class="col-md-6 bottommargin-sm"> <div class="counter counter-small"><span data-from="100" data-to="18465" data-refresh-interval="50" data-speed="2000" data-comma="true"></span></div> <h5 class="nobottommargin">Clients</h5> </div> </div> </div> <div class="widget subscribe-widget clearfix"> <h5><strong>Subscribe</strong> to Our Newsletter to get Important News, Amazing Offers &amp; Inside Scoops:</h5> <div class="widget-subscribe-form-result"></div> <form id="widget-subscribe-form" action="include/subscribe.php" role="form" method="post" class="nobottommargin"> <div class="input-group divcenter"> <span class="input-group-addon"><i class="icon-email2"></i></span> <input type="email" id="widget-subscribe-form-email" name="widget-subscribe-form-email" class="form-control required email" placeholder="Enter your Email"> <span class="input-group-btn"> <button class="btn btn-success" type="submit">Subscribe</button> </span> </div> </form> </div> <div class="widget clearfix" style="margin-bottom: -20px;"> <div class="row"> <div class="col-md-6 clearfix bottommargin-sm"> <a href="#" class="social-icon si-dark si-colored si-facebook nobottommargin" style="margin-right: 10px;"> <i class="icon-facebook"></i> <i class="icon-facebook"></i> </a> <a href="#"><small style="display: block; margin-top: 3px;"><strong>Like us</strong><br>on Facebook</small></a> </div> <div class="col-md-6 clearfix"> <a href="#" class="social-icon si-dark si-colored si-rss nobottommargin" style="margin-right: 10px;"> <i class="icon-rss"></i> <i class="icon-rss"></i> </a> <a href="#"><small style="display: block; margin-top: 3px;"><strong>Subscribe</strong><br>to RSS Feeds</small></a> </div> </div> </div> </div> </div><!-- .footer-widgets-wrap end --> </div> <!-- Copyrights ============================================= --> <div id="copyrights"> <div class="container clearfix"> <div class="col_half"> Copyrights &copy; 2014 All Rights Reserved by Canvas Inc.<br> <div class="copyright-links"><a href="#">Terms of Use</a> / <a href="#">Privacy Policy</a></div> </div> <div class="col_half col_last tright"> <div class="fright clearfix"> <a href="#" class="social-icon si-small si-borderless si-facebook"> <i class="icon-facebook"></i> <i class="icon-facebook"></i> </a> <a href="#" class="social-icon si-small si-borderless si-twitter"> <i class="icon-twitter"></i> <i class="icon-twitter"></i> </a> <a href="#" class="social-icon si-small si-borderless si-gplus"> <i class="icon-gplus"></i> <i class="icon-gplus"></i> </a> <a href="#" class="social-icon si-small si-borderless si-pinterest"> <i class="icon-pinterest"></i> <i class="icon-pinterest"></i> </a> <a href="#" class="social-icon si-small si-borderless si-vimeo"> <i class="icon-vimeo"></i> <i class="icon-vimeo"></i> </a> <a href="#" class="social-icon si-small si-borderless si-github"> <i class="icon-github"></i> <i class="icon-github"></i> </a> <a href="#" class="social-icon si-small si-borderless si-yahoo"> <i class="icon-yahoo"></i> <i class="icon-yahoo"></i> </a> <a href="#" class="social-icon si-small si-borderless si-linkedin"> <i class="icon-linkedin"></i> <i class="icon-linkedin"></i> </a> </div> <div class="clear"></div> <i class="icon-envelope2"></i> info@canvas.com <span class="middot">&middot;</span> <i class="icon-headphones"></i> +91-11-6541-6369 <span class="middot">&middot;</span> <i class="icon-skype2"></i> CanvasOnSkype </div> </div> </div><!-- #copyrights end --> </footer><!-- #footer end --> </div><!-- #wrapper end --> <!-- Go To Top ============================================= --> <div id="gotoTop" class="icon-angle-up"></div> <!-- External JavaScripts ============================================= --> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/plugins.js"></script> <!-- Footer Scripts ============================================= --> <script type="text/javascript" src="js/functions.js"></script> </body> </html>
darrylivan/marcojscalise.com
reference/HTML/both-right-sidebar.html
HTML
mit
64,395
#include <stdbool.h> #include "malloc.h" #include "lists.h" #include "stringBuffers.h" #include "sockets.h" //#include "threading.h" int main() //@ : main //@ requires true; //@ ensures true; { struct socket *s = create_client_socket(12345); struct reader *r = socket_get_reader(s); struct writer *w = socket_get_writer(s); bool stop = false; struct string_buffer *line = create_string_buffer(); struct string_buffer *nick = create_string_buffer(); struct string_buffer *text = create_string_buffer(); reader_read_line(r, line); reader_read_line(r, line); writer_write_string(w, "BoT\r\n"); while (!stop) //@ invariant reader(r) &*& writer(w) &*& stop ? emp : string_buffer(line, _) &*& string_buffer(nick, _) &*& string_buffer(text, _); { bool test = true; bool result = false; reader_read_line(r, line); result = string_buffer_split(line, " says: ", nick, text); test = string_buffer_equals_string(nick, "BoT"); if (result && !test) { test = string_buffer_equals_string(text, "!hello"); if (test) { writer_write_string(w, "Hello "); writer_write_string_buffer(w, nick); writer_write_string(w, "!\r\n"); } else { test = string_buffer_equals_string(text, "!quit"); if (test) { writer_write_string(w, "Byebye!\r\n"); stop = true; string_buffer_dispose(line); string_buffer_dispose(nick); string_buffer_dispose(text); } } } } socket_close(s); return 0; }
willempx/verifast
examples/bot.c
C
mit
1,806
%w(xfonts-base xfonts-75dpi xfonts-100dpi xfonts-scalable xfonts-cyrillic).each do |font| package font do action :install end end
pivotal/lobot
chef/cookbooks/pivotal_ci/recipes/fonts.rb
Ruby
mit
138
<?php namespace RMA; use RMA\Interfaces\FormElementInterface; class Input implements FormElementInterface { private $validTypes = array("text","email","number"); private $type; private $id; private $name; private $class; private $value; private $placeholder; private $required = false; public function __construct($type = "text", array $options = array()) { if (!in_array($type, $this->validTypes)) { $type = "text"; } $this->type = $type; foreach ($options as $attribute => $value) { $method = "set" . ucfirst($attribute); if (method_exists($this, $method)) { $this->$method($value); } } } public function getId() { return $this->id; } public function getElement() { $el = "<input type=\"{$this->type}\" "; $el .= "id=\"{$this->id}\" "; $el .= "name=\"{$this->name}\" "; $el .= "class=\"{$this->class}\" "; $el .= "value=\"{$this->value}\" "; $el .= "placeholder=\"{$this->placeholder}\" "; $el .= "required=\"{$this->required}\" "; $el .= " />"; return $el; } public function getType() { return $this->type; } public function getName() { return $this->name; } public function getClass() { return $this->class; } public function getValue() { return $this->value; } public function getPlaceholder() { return $this->placeholder; } public function getRequired() { return $this->required; } public function setType($type) { $this->type = $type; return $this; } public function setName($name) { $this->name = $name; return $this; } public function setClass($class) { $this->class = $class; return $this; } public function setValue($value) { $this->value = $value; return $this; } public function setPlaceholder($placeholder) { $this->placeholder = $placeholder; return $this; } public function setRequired($required) { $this->required = $required; return $this; } }
ronaldomarinsa/patterns2
src/RMA/Input.php
PHP
mit
2,359
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.apimanagement.v2018_06_01_preview.implementation; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.ProxyResource; /** * Sign-In settings for the Developer Portal. */ @JsonFlatten public class PortalSigninSettingsInner extends ProxyResource { /** * Redirect Anonymous users to the Sign-In page. */ @JsonProperty(value = "properties.enabled") private Boolean enabled; /** * Get redirect Anonymous users to the Sign-In page. * * @return the enabled value */ public Boolean enabled() { return this.enabled; } /** * Set redirect Anonymous users to the Sign-In page. * * @param enabled the enabled value to set * @return the PortalSigninSettingsInner object itself. */ public PortalSigninSettingsInner withEnabled(Boolean enabled) { this.enabled = enabled; return this; } }
navalev/azure-sdk-for-java
sdk/apimanagement/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/apimanagement/v2018_06_01_preview/implementation/PortalSigninSettingsInner.java
Java
mit
1,243
// *********************************************************************** // Copyright (c) 2015 Charlie Poole, Rob Prouse // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // *********************************************************************** using System; using NUnit.Framework; using NUnit.Framework.Internal; namespace NUnit.TestData.RepeatingTests { public class RetrySucceedsOnFirstTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void SucceedsEveryTime() { Count++; Assert.IsTrue(true); } } public class RetryFailsEveryTimeFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void FailsEveryTime() { Count++; Assert.IsFalse(true); } } public class RetrySucceedsOnSecondTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void SucceedsOnSecondTry() { Count++; if (Count < 2) Assert.IsTrue(false); } } public class RetrySucceedsOnThirdTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void SucceedsOnThirdTry() { Count++; if (Count < 3) Assert.IsTrue(false); } } public class RetryWithIgnoreAttributeFixture : RepeatingTestsFixtureBase { [Test, Retry(3), Ignore("Ignore this test")] public void RepeatShouldIgnore() { Assert.Fail("Ignored test executed"); } } public class RetryIgnoredOnFirstTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void Test() { Count++; Assert.Ignore("Ignoring"); } } public class RetryIgnoredOnSecondTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void Test() { Count++; if (Count < 2) Assert.Fail("Failed"); Assert.Ignore("Ignoring"); } } public class RetryIgnoredOnThirdTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void Test() { Count++; if (Count < 3) Assert.Fail("Failed"); Assert.Ignore("Ignoring"); } } public class RetryErrorOnFirstTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void Test() { Count++; throw new Exception("Deliberate Exception"); } } public class RetryErrorOnSecondTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void Test() { Count++; if (Count < 2) Assert.Fail("Failed"); throw new Exception("Deliberate Exception"); } } public class RetryErrorOnThirdTryFixture : RepeatingTestsFixtureBase { [Test, Retry(3)] public void Test() { Count++; if (Count < 3) Assert.Fail("Failed"); throw new Exception("Deliberate Exception"); } } public class RetryTestWithCategoryFixture : RepeatingTestsFixtureBase { [Test, Retry(3), Category("SAMPLE")] public void TestWithCategory() { Count++; Assert.IsTrue(true); } } public class RetryTestCaseFixture : RepeatingTestsFixtureBase { [Retry(3)] [TestCase(0)] public void FailsEveryTime(int unused) { Count++; Assert.IsTrue(false); } } public sealed class RetryWithoutSetUpOrTearDownFixture { public int Count { get; private set; } [Test, Retry(3)] public void SucceedsOnThirdTry() { Count++; if (Count < 3) Assert.Fail(); } [Test, Retry(3)] public void FailsEveryTime() { Count++; Assert.Fail(); } [Test, Retry(3)] public void ErrorsOnFirstTry() { Count++; throw new Exception("Deliberate exception"); } } public class RetryTestVerifyAttempt : RepeatingTestsFixtureBase { [Test, Retry(3)] public void NeverPasses() { Count = TestContext.CurrentContext.CurrentRepeatCount; Assert.Fail("forcing a failure so we retry maximum times"); } [Test, Retry(3)] public void PassesOnLastRetry() { Assert.That(Count, Is.EqualTo(TestContext.CurrentContext.CurrentRepeatCount), "expected CurrentRepeatCount to be incremented only after first attempt"); if (Count < 2) // second Repeat is 3rd Retry (i.e. end of attempts) { Count++; Assert.Fail("forced failure so we will use maximum number of Retries for PassesOnLastRetry"); } } } }
JustinRChou/nunit
src/NUnitFramework/testdata/RetryFixture.cs
C#
mit
6,124
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="en"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Talant</source> <translation>About Talant</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Talant&lt;/b&gt; version</source> <translation>&lt;b&gt;Talant&lt;/b&gt; version</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation>Copyright</translation> </message> <message> <location line="+0"/> <source>The Talant developers</source> <translation>The Talant developers</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Address Book</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Double-click to edit address or label</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Create a new address</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copy the currently selected address to the system clipboard</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;New Address</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Talant addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>These are your Talant addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>&amp;Copy Address</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Show &amp;QR Code</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Talant address</source> <translation>Sign a message to prove you own a Talant address</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Sign &amp;Message</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Delete the currently selected address from the list</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>Export the data in the current tab to a file</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation>&amp;Export</translation> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Talant address</source> <translation>Verify a message to ensure it was signed with a specified Talant address</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>&amp;Verify Message</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Delete</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Talant addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation>These are your Talant addresses for sending payments. Always check the amount and the receiving address before sending coins.</translation> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>Copy &amp;Label</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Edit</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation>Send &amp;Coins</translation> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>Export Address Book Data</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma separated file (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Error exporting</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Could not write to file %1.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Label</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Address</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(no label)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Passphrase Dialog</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Enter passphrase</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>New passphrase</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Repeat new passphrase</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Encrypt wallet</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>This operation needs your wallet passphrase to unlock the wallet.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Unlock wallet</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>This operation needs your wallet passphrase to decrypt the wallet.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Decrypt wallet</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Change passphrase</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Enter the old and new passphrase to the wallet.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Confirm wallet encryption</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR TALANTS&lt;/b&gt;!</source> <translation>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR TALANTS&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Are you sure you wish to encrypt your wallet?</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</translation> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Warning: The Caps Lock key is on!</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Wallet encrypted</translation> </message> <message> <location line="-56"/> <source>Talant will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your talants from being stolen by malware infecting your computer.</source> <translation>Talant will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your talants from being stolen by malware infecting your computer.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Wallet encryption failed</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>The supplied passphrases do not match.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Wallet unlock failed</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>The passphrase entered for the wallet decryption was incorrect.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Wallet decryption failed</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Wallet passphrase was successfully changed.</translation> </message> </context> <context> <name>TalantGUI</name> <message> <location filename="../talantgui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Sign &amp;message...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Synchronizing with network...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Overview</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Show general overview of wallet</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Transactions</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Browse transaction history</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>Edit the list of stored addresses and labels</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Show the list of addresses for receiving payments</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>E&amp;xit</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Quit application</translation> </message> <message> <location line="+4"/> <source>Show information about Talant</source> <translation>Show information about Talant</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>About &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Show information about Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Options...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>&amp;Encrypt Wallet...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Backup Wallet...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Change Passphrase...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>Importing blocks from disk...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation>Reindexing blocks on disk...</translation> </message> <message> <location line="-347"/> <source>Send coins to a Talant address</source> <translation>Send coins to a Talant address</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Talant</source> <translation>Modify configuration options for Talant</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Backup wallet to another location</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Change the passphrase used for wallet encryption</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp;Debug window</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Open debugging and diagnostic console</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>&amp;Verify message...</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>Talant</source> <translation>Talant</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Wallet</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation>&amp;Send</translation> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation>&amp;Receive</translation> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation>&amp;Addresses</translation> </message> <message> <location line="+22"/> <source>&amp;About Talant</source> <translation>&amp;About Talant</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Show / Hide</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation>Show or hide the main Window</translation> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation>Encrypt the private keys that belong to your wallet</translation> </message> <message> <location line="+7"/> <source>Sign messages with your Talant addresses to prove you own them</source> <translation>Sign messages with your Talant addresses to prove you own them</translation> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Talant addresses</source> <translation>Verify messages to ensure they were signed with specified Talant addresses</translation> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;File</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Settings</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>&amp;Help</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Tabs toolbar</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+47"/> <source>Talant client</source> <translation>Talant client</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Talant network</source> <translation> <numerusform>%n active connection to Talant network</numerusform> <numerusform>%n active connections to Talant network</numerusform> </translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation>No block source available...</translation> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation>Processed %1 of %2 (estimated) blocks of transaction history.</translation> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation>Processed %1 blocks of transaction history.</translation> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation> <numerusform>%n hour</numerusform> <numerusform>%n hours</numerusform> </translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation> <numerusform>%n day</numerusform> <numerusform>%n days</numerusform> </translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation> <numerusform>%n week</numerusform> <numerusform>%n weeks</numerusform> </translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation>%1 behind</translation> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation>Last received block was generated %1 ago.</translation> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation>Transactions after this will not yet be visible.</translation> </message> <message> <location line="+22"/> <source>Error</source> <translation>Error</translation> </message> <message> <location line="+3"/> <source>Warning</source> <translation>Warning</translation> </message> <message> <location line="+3"/> <source>Information</source> <translation>Information</translation> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</translation> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Up to date</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Catching up...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Confirm transaction fee</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Sent transaction</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Incoming transaction</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Date: %1 Amount: %2 Type: %3 Address: %4 </translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>URI handling</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Talant address or malformed URI parameters.</source> <translation>URI can not be parsed! This can be caused by an invalid Talant address or malformed URI parameters.</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation> </message> <message> <location filename="../talant.cpp" line="+111"/> <source>A fatal error occurred. Talant can no longer continue safely and will quit.</source> <translation>A fatal error occurred. Talant can no longer continue safely and will quit.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Network Alert</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Edit Address</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Label</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>The label associated with this address book entry</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Address</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>The address associated with this address book entry. This can only be modified for sending addresses.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>New receiving address</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>New sending address</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Edit receiving address</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Edit sending address</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>The entered address &quot;%1&quot; is already in the address book.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Talant address.</source> <translation>The entered address &quot;%1&quot; is not a valid Talant address.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Could not unlock wallet.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>New key generation failed.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Talant-Qt</source> <translation>Talant-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>version</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Usage:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>command-line options</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI options</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Set language, for example &quot;de_DE&quot; (default: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Start minimized</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Show splash screen on startup (default: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Options</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Main</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</translation> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Pay transaction &amp;fee</translation> </message> <message> <location line="+31"/> <source>Automatically start Talant after logging in to the system.</source> <translation>Automatically start Talant after logging in to the system.</translation> </message> <message> <location line="+3"/> <source>&amp;Start Talant on system login</source> <translation>&amp;Start Talant on system login</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation>Reset all client options to default.</translation> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation>&amp;Reset Options</translation> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>&amp;Network</translation> </message> <message> <location line="+6"/> <source>Automatically open the Talant client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Automatically open the Talant client port on the router. This only works when your router supports UPnP and it is enabled.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Map port using &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the Talant network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Connect to the Talant network through a SOCKS proxy (e.g. when connecting through Tor).</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>&amp;Connect through SOCKS proxy:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy &amp;IP:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>IP address of the proxy (e.g. 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Port of the proxy (e.g. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;Version:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS version of the proxy (e.g. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Window</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Show only a tray icon after minimizing the window.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;Minimize to the tray instead of the taskbar</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>M&amp;inimize on close</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Display</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>User Interface &amp;language:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Talant.</source> <translation>The user interface language can be set here. This setting will take effect after restarting Talant.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Unit to show amounts in:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Choose the default subdivision unit to show in the interface and when sending coins.</translation> </message> <message> <location line="+9"/> <source>Whether to show Talant addresses in the transaction list or not.</source> <translation>Whether to show Talant addresses in the transaction list or not.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Display addresses in transaction list</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Cancel</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>&amp;Apply</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>default</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation>Confirm options reset</translation> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation>Some settings may require a client restart to take effect.</translation> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation>Do you want to proceed?</translation> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>Warning</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Talant.</source> <translation>This setting will take effect after restarting Talant.</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>The supplied proxy address is invalid.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Talant network after a connection is established, but this process has not completed yet.</source> <translation>The displayed information may be out of date. Your wallet automatically synchronizes with the Talant network after a connection is established, but this process has not completed yet.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Balance:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Unconfirmed:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Wallet</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>Immature:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Mined balance that has not yet matured</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Recent transactions&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Your current balance</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>out of sync</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start talant: click-to-pay handler</source> <translation>Cannot start talant: click-to-pay handler</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>QR Code Dialog</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Request Payment</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Amount:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Label:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Message:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;Save As...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Error encoding URI into QR Code.</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>The entered amount is invalid, please check.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>Resulting URI too long, try to reduce the text for label / message.</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>Save QR Code</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>PNG Images (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Client name</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>N/A</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Client version</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Information</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Using OpenSSL version</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Startup time</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Network</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Number of connections</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>On testnet</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Block chain</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Current number of blocks</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Estimated total blocks</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Last block time</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Open</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Command-line options</translation> </message> <message> <location line="+7"/> <source>Show the Talant-Qt help message to get a list with possible Talant command-line options.</source> <translation>Show the Talant-Qt help message to get a list with possible Talant command-line options.</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp;Show</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Console</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Build date</translation> </message> <message> <location line="-104"/> <source>Talant - Debug window</source> <translation>Talant - Debug window</translation> </message> <message> <location line="+25"/> <source>Talant Core</source> <translation>Talant Core</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Debug log file</translation> </message> <message> <location line="+7"/> <source>Open the Talant debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Open the Talant debug log file from the current data directory. This can take a few seconds for large log files.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Clear console</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Talant RPC console.</source> <translation>Welcome to the Talant RPC console.</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Send Coins</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>Send to multiple recipients at once</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Add &amp;Recipient</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Remove all transaction fields</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Clear &amp;All</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Balance:</translation> </message> <message> <location line="+10"/> <source>123.456 TLT</source> <translation>123.456 TLT</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Confirm the send action</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>S&amp;end</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Confirm send coins</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Are you sure you want to send %1?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation> and </translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>The recipient address is not valid, please recheck.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>The amount to pay must be larger than 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>The amount exceeds your balance.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>The total exceeds your balance when the %1 transaction fee is included.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Duplicate address found, can only send to each address once per send operation.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation>Error: Transaction creation failed!</translation> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>A&amp;mount:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Pay &amp;To:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</source> <translation>The address to send the payment to (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</translation> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>Enter a label for this address to add it to your address book</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;Label:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Choose address from address book</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Paste address from clipboard</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>Remove this recipient</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Talant address (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</source> <translation>Enter a Talant address (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Signatures - Sign / Verify a Message</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;Sign Message</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</source> <translation>The address to sign the message with (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Choose an address from the address book</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>Paste address from clipboard</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>Enter the message you want to sign here</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation>Signature</translation> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>Copy the current signature to the system clipboard</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Talant address</source> <translation>Sign the message to prove you own this Talant address</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Sign &amp;Message</translation> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>Reset all sign message fields</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Clear &amp;All</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>&amp;Verify Message</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</source> <translation>The address the message was signed with (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Talant address</source> <translation>Verify the message to ensure it was signed with the specified Talant address</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation>Verify &amp;Message</translation> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>Reset all verify message fields</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Talant address (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</source> <translation>Enter a Talant address (e.g. TynXU71Tij9JDEJrYNgevDXeS1j9EogQ31)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Click &quot;Sign Message&quot; to generate signature</translation> </message> <message> <location line="+3"/> <source>Enter Talant signature</source> <translation>Enter Talant signature</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>The entered address is invalid.</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>Please check the address and try again.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>The entered address does not refer to a key.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Wallet unlock was cancelled.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Private key for the entered address is not available.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Message signing failed.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Message signed.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>The signature could not be decoded.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Please check the signature and try again.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>The signature did not match the message digest.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Message verification failed.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Message verified.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Talant developers</source> <translation>The Talant developers</translation> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Open until %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/offline</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/unconfirmed</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 confirmations</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Status</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation> <numerusform>, broadcast through %n node</numerusform> <numerusform>, broadcast through %n nodes</numerusform> </translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Date</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Source</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generated</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>From</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>To</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>own address</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>label</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Credit</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation> <numerusform>matures in %n more block</numerusform> <numerusform>matures in %n more blocks</numerusform> </translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>not accepted</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Debit</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Transaction fee</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Net amount</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Message</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Comment</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Transaction ID</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Debug information</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transaction</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>Inputs</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Amount</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>true</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>false</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, has not been successfully broadcast yet</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation> <numerusform>Open for %n more block</numerusform> <numerusform>Open for %n more blocks</numerusform> </translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>unknown</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Transaction details</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>This pane shows a detailed description of the transaction</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Date</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Type</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Address</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Amount</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation> <numerusform>Open for %n more block</numerusform> <numerusform>Open for %n more blocks</numerusform> </translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Open until %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Offline (%1 confirmations)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>Unconfirmed (%1 of %2 confirmations)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Confirmed (%1 confirmations)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation> <numerusform>Mined balance will be available when it matures in %n more block</numerusform> <numerusform>Mined balance will be available when it matures in %n more blocks</numerusform> </translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>This block was not received by any other nodes and will probably not be accepted!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generated but not accepted</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Received with</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Received from</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Sent to</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Payment to yourself</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Mined</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(n/a)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Transaction status. Hover over this field to show number of confirmations.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Date and time that the transaction was received.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Type of transaction.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Destination address of transaction.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Amount removed from or added to balance.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>All</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Today</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>This week</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>This month</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Last month</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>This year</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Range...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Received with</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Sent to</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>To yourself</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Mined</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Other</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Enter address or label to search</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Min amount</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Copy address</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copy label</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copy amount</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Copy transaction ID</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Edit label</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Show transaction details</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Export Transaction Data</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma separated file (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Confirmed</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Date</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Type</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Label</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Address</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Amount</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Error exporting</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Could not write to file %1.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Range:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>to</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>Send Coins</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation>&amp;Export</translation> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>Export the data in the current tab to a file</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation>Backup Wallet</translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Wallet Data (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Backup Failed</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>There was an error trying to save the wallet data to the new location.</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation>Backup Successful</translation> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation>The wallet data was successfully saved to the new location.</translation> </message> </context> <context> <name>talant-core</name> <message> <location filename="../talantstrings.cpp" line="+94"/> <source>Talant version</source> <translation>Talant version</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Usage:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or talantd</source> <translation>Send command to -server or talantd</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>List commands</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Get help for a command</translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Options:</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: talant.conf)</source> <translation>Specify configuration file (default: talant.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: talantd.pid)</source> <translation>Specify pid file (default: talantd.pid)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Specify data directory</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Set database cache size in megabytes (default: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 7449 or testnet: 17449)</source> <translation>Listen for connections on &lt;port&gt; (default: 7449 or testnet: 17449)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Maintain at most &lt;n&gt; connections to peers (default: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Connect to a node to retrieve peer addresses, and disconnect</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>Specify your own public address</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>An error occurred while setting up the RPC port %u for listening on IPv4: %s</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 7442 or testnet: 17442)</source> <translation>Listen for JSON-RPC connections on &lt;port&gt; (default: 7442 or testnet: 17442)</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Accept command line and JSON-RPC commands</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Run in the background as a daemon and accept commands</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Use the test network</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=talantrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Talant Alert&quot; admin@foo.com </source> <translation>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=talantrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Talant Alert&quot; admin@foo.com </translation> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</translation> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation>Bind to given address and always listen on it. Use [host]:port notation for IPv6</translation> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Talant is probably already running.</source> <translation>Cannot obtain a lock on data directory %s. Talant is probably already running.</translation> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</translation> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</translation> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>Execute command when a relevant alert is received (%s in cmd is replaced by message)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Talant will not work properly.</source> <translation>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Talant will not work properly.</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</translation> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</translation> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Attempt to recover private keys from a corrupt wallet.dat</translation> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>Block creation options:</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Connect only to the specified node(s)</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation>Corrupted block database detected</translation> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Discover own IP address (default: 1 when listening and no -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation>Do you want to rebuild the block database now?</translation> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation>Error initializing block database</translation> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation>Error initializing wallet database environment %s!</translation> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation>Error loading block database</translation> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation>Error opening block database</translation> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation>Error: Disk space is low!</translation> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation>Error: Wallet locked, unable to create transaction!</translation> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation>Error: system error: </translation> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Failed to listen on any port. Use -listen=0 if you want this.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation>Failed to read block info</translation> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation>Failed to read block</translation> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation>Failed to sync block index</translation> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation>Failed to write block index</translation> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation>Failed to write block info</translation> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation>Failed to write block</translation> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation>Failed to write file info</translation> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation>Failed to write to coin database</translation> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation>Failed to write transaction index</translation> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation>Failed to write undo data</translation> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>Find peers using DNS lookup (default: 1 unless -connect)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation>Generate coins (default: 0)</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation>How many blocks to check at startup (default: 288, 0 = all)</translation> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation>How thorough the block verification is (0-4, default: 3)</translation> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation>Not enough file descriptors available.</translation> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation>Rebuild block chain index from current blk000??.dat files</translation> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation>Set the number of threads to service RPC calls (default: 4)</translation> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation>Verifying blocks...</translation> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation>Verifying wallet...</translation> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation>Imports blocks from external blk000??.dat file</translation> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</translation> </message> <message> <location line="+77"/> <source>Information</source> <translation>Information</translation> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Invalid -tor address: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation>Maintain a full transaction index (default: 0)</translation> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation>Only accept block chain matching built-in checkpoints (default: 1)</translation> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Output extra debugging information. Implies all other -debug* options</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Output extra network debugging information</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>Prepend debug output with timestamp</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the Talant Wiki for SSL setup instructions)</source> <translation>SSL options: (see the Talant Wiki for SSL setup instructions)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>Select the version of socks proxy to use (4-5, default: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Send trace/debug info to console instead of debug.log file</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Send trace/debug info to debugger</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>Set maximum block size in bytes (default: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Set minimum block size in bytes (default: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Shrink debug.log file on client startup (default: 1 when no -debug)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation>Signing transaction failed</translation> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Specify connection timeout in milliseconds (default: 5000)</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation>System error: </translation> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation>Transaction amount too small</translation> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation>Transaction amounts must be positive</translation> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation>Transaction too large</translation> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Use UPnP to map the listening port (default: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Use UPnP to map the listening port (default: 1 when listening)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>Use proxy to reach tor hidden services (default: same as -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Username for JSON-RPC connections</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation>Warning</translation> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Warning: This version is obsolete, upgrade required!</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation>You need to rebuild the databases using -reindex to change -txindex</translation> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat corrupt, salvage failed</translation> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Password for JSON-RPC connections</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Allow JSON-RPC connections from specified IP address</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Upgrade wallet to latest format</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Set key pool size to &lt;n&gt; (default: 100)</translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Rescan the block chain for missing wallet transactions</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Use OpenSSL (https) for JSON-RPC connections</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Server certificate file (default: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Server private key (default: server.pem)</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>This help message</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Unable to bind to %s on this computer (bind returned error %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Connect through socks proxy</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Loading addresses...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Error loading wallet.dat: Wallet corrupted</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Talant</source> <translation>Error loading wallet.dat: Wallet requires newer version of Talant</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Talant to complete</source> <translation>Wallet needed to be rewritten: restart Talant to complete</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>Error loading wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Invalid -proxy address: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Unknown -socks proxy version requested: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Cannot resolve -bind address: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Cannot resolve -externalip address: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Invalid amount</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Insufficient funds</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Loading block index...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Add a node to connect to and attempt to keep the connection open</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Talant is probably already running.</source> <translation>Unable to bind to %s on this computer. Talant is probably already running.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Fee per KB to add to transactions you send</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Loading wallet...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>Cannot downgrade wallet</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>Cannot write default address</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Rescanning...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Done loading</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>To use the %s option</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>Error</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</translation> </message> </context> </TS>
talantdev/talant-wallet
src/qt/locale/talant_en.ts
TypeScript
mit
115,073
<?php /* * This file is part of the PHPExifTool package. * * (c) Alchemy <support@alchemy.fr> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Tag\MIECamera; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class ColorBalance extends AbstractTag { protected $Id = 'ColorBalance'; protected $Name = 'ColorBalance'; protected $FullName = 'MIE::Camera'; protected $GroupName = 'MIE-Camera'; protected $g0 = 'MIE'; protected $g1 = 'MIE-Camera'; protected $g2 = 'Camera'; protected $Type = 'rational64u'; protected $Writable = true; protected $Description = 'Color Balance'; protected $MaxLength = 3; }
bburnichon/PHPExiftool
lib/PHPExiftool/Driver/Tag/MIECamera/ColorBalance.php
PHP
mit
844
import { BaseComponent, setRef } from './vdom-util' import { ComponentChildren, Ref, createElement } from './vdom' import { CssDimValue } from './scrollgrid/util' export interface ViewContainerProps { labeledById: string liquid?: boolean height?: CssDimValue aspectRatio?: number elRef?: Ref<HTMLDivElement> children?: ComponentChildren } interface ViewContainerState { availableWidth: number | null } // TODO: do function component? export class ViewContainer extends BaseComponent<ViewContainerProps, ViewContainerState> { el: HTMLElement state: ViewContainerState = { availableWidth: null, } render() { let { props, state } = this let { aspectRatio } = props let classNames = [ 'fc-view-harness', (aspectRatio || props.liquid || props.height) ? 'fc-view-harness-active' // harness controls the height : 'fc-view-harness-passive', // let the view do the height ] let height: CssDimValue = '' let paddingBottom: CssDimValue = '' if (aspectRatio) { if (state.availableWidth !== null) { height = state.availableWidth / aspectRatio } else { // while waiting to know availableWidth, we can't set height to *zero* // because will cause lots of unnecessary scrollbars within scrollgrid. // BETTER: don't start rendering ANYTHING yet until we know container width // NOTE: why not always use paddingBottom? Causes height oscillation (issue 5606) paddingBottom = `${(1 / aspectRatio) * 100}%` } } else { height = props.height || '' } return ( <div aria-labelledby={props.labeledById} ref={this.handleEl} className={classNames.join(' ')} style={{ height, paddingBottom }} > {props.children} </div> ) } componentDidMount() { this.context.addResizeHandler(this.handleResize) } componentWillUnmount() { this.context.removeResizeHandler(this.handleResize) } handleEl = (el: HTMLElement | null) => { this.el = el setRef(this.props.elRef, el) this.updateAvailableWidth() } handleResize = () => { this.updateAvailableWidth() } updateAvailableWidth() { if ( this.el && // needed. but why? this.props.aspectRatio // aspectRatio is the only height setting that needs availableWidth ) { this.setState({ availableWidth: this.el.offsetWidth }) } } }
fullcalendar/fullcalendar
packages/common/src/ViewContainer.tsx
TypeScript
mit
2,446
/** * http://gruntjs.com/configuring-tasks */ module.exports = function (grunt) { var path = require('path'); var DIST_PATH = 'demo/dist'; var SRC_PATH = 'demo/sample'; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), connect: { options: { hostname: '*' }, demo: { options: { port: 8000, base: DIST_PATH, middleware: function (connect, options) { return [ require('connect-livereload')(), connect.static(path.resolve(options.base)) ]; } } } }, watch: { options: { livereload: true }, less: { files: ['less/**/*.less'], tasks: ['less'] }, lesscopy: { files: ['static/styles/jaguar.css'], tasks: ['copy:css'] }, jscopy: { files: ['static/scripts/main.js'], tasks: ['copy:js'] }, jsdoc: { files: ['**/*.tmpl', '*.js'], tasks: ['jsdoc'] }, doc: { files: ['demo/sample/**/*.js'], tasks: ['demo'] } }, clean: { doc: { src: DIST_PATH } }, jsdoc: { doc: { src: [ SRC_PATH + '/**/*.js', // You can add README.md file for index page at documentations. 'README.md' ], options: { verbose: true, destination: DIST_PATH, configure: 'conf.json', template: './', 'private': false } }, /** * egjs 빌드시 사용하는 옵션 */ egjs: { src: ['../egjs/src/**/*.js', 'README.md'], options: { verbose: true, destination: DIST_PATH, configure: 'conf.json', template: './', 'private': false } } }, less: { dist: { src: 'less/**/jaguar.less', dest: 'static/styles/jaguar.css' } }, copy: { css: { src: 'static/styles/jaguar.css', dest: DIST_PATH + '/styles/jaguar.css' }, js: { src: 'static/scripts/main.js', dest: DIST_PATH + '/scripts/main.js' }, plugin: { files: [{ src: 'jsdoc-plugin/*.js', dest: 'node_modules/grunt-jsdoc/node_modules/jsdoc/plugins/', flatten : true, expand : true }] }, /* * Alternative task to apply on changed module dir in NPM3 */ pluginForNewNPM: { files: [{ src: 'jsdoc-plugin/*.js', dest: 'node_modules/jsdoc/plugins/', flatten : true, expand : true }] } } }); // Load task libraries [ 'grunt-contrib-connect', 'grunt-contrib-watch', 'grunt-contrib-copy', 'grunt-contrib-clean', 'grunt-contrib-less', 'grunt-jsdoc', ].forEach(function (taskName) { grunt.loadNpmTasks(taskName); }); // Definitions of tasks // grunt.registerTask('default', 'Watch project files', [ // 'demo', // 'connect:demo', // 'watch' // ]); grunt.registerTask('default', 'Create documentations for yours', [ /*'less',*/ 'clean:doc', 'copy:plugin', 'copy:pluginForNewNPM', 'jsdoc:doc' ]); grunt.registerTask('egjs', 'Create documentations for egjs', [ /*'less',*/ 'clean:doc', 'copy:plugin', 'copy:pluginForNewNPM', 'jsdoc:egjs' ]); };
egjs/egjs-jsdoc-template
Gruntfile.js
JavaScript
mit
4,415
# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_rails-saml_session'
yardstick/ruby-saml-example
config/initializers/session_store.rb
Ruby
mit
142
//////////////////////////////////////////////////////////////////////////// // // Copyright 2015 Realm 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 in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////// #include "query_builder.hpp" #include "parser.hpp" #include "object_store.hpp" #include "schema.hpp" #include "util/compiler.hpp" #include "util/format.hpp" #include <realm.hpp> #include <assert.h> #include <sstream> using namespace realm; using namespace parser; using namespace query_builder; namespace { template<typename T> T stot(std::string const& s) { std::istringstream iss(s); T value; iss >> value; if (iss.fail()) { throw std::invalid_argument(util::format("Cannot convert string '%1'", s)); } return value; } // check a precondition and throw an exception if it is not met // this should be used iff the condition being false indicates a bug in the caller // of the function checking its preconditions #define precondition(condition, message) if (!__builtin_expect(condition, 1)) { throw std::logic_error(message); } // FIXME: TrueExpression and FalseExpression should be supported by core in some way struct TrueExpression : realm::Expression { size_t find_first(size_t start, size_t end) const override { if (start != end) return start; return realm::not_found; } void set_base_table(const Table*) override {} const Table* get_base_table() const override { return nullptr; } std::unique_ptr<Expression> clone(QueryNodeHandoverPatches*) const override { return std::unique_ptr<Expression>(new TrueExpression(*this)); } }; struct FalseExpression : realm::Expression { size_t find_first(size_t, size_t) const override { return realm::not_found; } void set_base_table(const Table*) override {} const Table* get_base_table() const override { return nullptr; } std::unique_ptr<Expression> clone(QueryNodeHandoverPatches*) const override { return std::unique_ptr<Expression>(new FalseExpression(*this)); } }; using KeyPath = std::vector<std::string>; KeyPath key_path_from_string(const std::string &s) { std::stringstream ss(s); std::string item; KeyPath key_path; while (std::getline(ss, item, '.')) { key_path.push_back(item); } return key_path; } struct PropertyExpression { const Property *prop = nullptr; std::vector<size_t> indexes; std::function<Table *()> table_getter; PropertyExpression(Query &query, const Schema &schema, Schema::const_iterator desc, const std::string &key_path_string) { KeyPath key_path = key_path_from_string(key_path_string); for (size_t index = 0; index < key_path.size(); index++) { if (prop) { precondition(prop->type == PropertyType::Object || prop->type == PropertyType::Array, util::format("Property '%1' is not a link in object of type '%2'", key_path[index], desc->name)); indexes.push_back(prop->table_column); } prop = desc->property_for_name(key_path[index]); precondition(prop != nullptr, util::format("No property '%1' on object of type '%2'", key_path[index], desc->name)); if (prop->object_type.size()) { desc = schema.find(prop->object_type); } } table_getter = [&] { auto& tbl = query.get_table(); for (size_t col : indexes) { tbl->link(col); // mutates m_link_chain on table } return tbl.get(); }; } }; // add a clause for numeric constraints based on operator type template <typename A, typename B> void add_numeric_constraint_to_query(Query& query, Predicate::Operator operatorType, A lhs, B rhs) { switch (operatorType) { case Predicate::Operator::LessThan: query.and_query(lhs < rhs); break; case Predicate::Operator::LessThanOrEqual: query.and_query(lhs <= rhs); break; case Predicate::Operator::GreaterThan: query.and_query(lhs > rhs); break; case Predicate::Operator::GreaterThanOrEqual: query.and_query(lhs >= rhs); break; case Predicate::Operator::Equal: query.and_query(lhs == rhs); break; case Predicate::Operator::NotEqual: query.and_query(lhs != rhs); break; default: throw std::logic_error("Unsupported operator for numeric queries."); } } template <typename A, typename B> void add_bool_constraint_to_query(Query &query, Predicate::Operator operatorType, A lhs, B rhs) { switch (operatorType) { case Predicate::Operator::Equal: query.and_query(lhs == rhs); break; case Predicate::Operator::NotEqual: query.and_query(lhs != rhs); break; default: throw std::logic_error("Unsupported operator for numeric queries."); } } void add_string_constraint_to_query(Query &query, Predicate::Comparison cmp, Columns<String> &&column, std::string &&value) { bool case_sensitive = (cmp.option != Predicate::OperatorOption::CaseInsensitive); switch (cmp.op) { case Predicate::Operator::BeginsWith: query.and_query(column.begins_with(value, case_sensitive)); break; case Predicate::Operator::EndsWith: query.and_query(column.ends_with(value, case_sensitive)); break; case Predicate::Operator::Contains: query.and_query(column.contains(value, case_sensitive)); break; case Predicate::Operator::Equal: query.and_query(column.equal(value, case_sensitive)); break; case Predicate::Operator::NotEqual: query.and_query(column.not_equal(value, case_sensitive)); break; default: throw std::logic_error("Unsupported operator for string queries."); } } void add_string_constraint_to_query(realm::Query &query, Predicate::Comparison cmp, std::string &&value, Columns<String> &&column) { bool case_sensitive = (cmp.option != Predicate::OperatorOption::CaseInsensitive); switch (cmp.op) { case Predicate::Operator::Equal: query.and_query(column.equal(value, case_sensitive)); break; case Predicate::Operator::NotEqual: query.and_query(column.not_equal(value, case_sensitive)); break; default: throw std::logic_error("Substring comparison not supported for keypath substrings."); } } void add_binary_constraint_to_query(Query &query, Predicate::Operator op, Columns<Binary> &&column, std::string &&value) { switch (op) { case Predicate::Operator::BeginsWith: query.begins_with(column.column_ndx(), BinaryData(value)); break; case Predicate::Operator::EndsWith: query.ends_with(column.column_ndx(), BinaryData(value)); break; case Predicate::Operator::Contains: query.contains(column.column_ndx(), BinaryData(value)); break; case Predicate::Operator::Equal: query.equal(column.column_ndx(), BinaryData(value)); break; case Predicate::Operator::NotEqual: query.not_equal(column.column_ndx(), BinaryData(value)); break; default: throw std::logic_error("Unsupported operator for binary queries."); } } void add_binary_constraint_to_query(realm::Query &query, Predicate::Operator op, std::string value, Columns<Binary> &&column) { switch (op) { case Predicate::Operator::Equal: query.equal(column.column_ndx(), BinaryData(value)); break; case Predicate::Operator::NotEqual: query.not_equal(column.column_ndx(), BinaryData(value)); break; default: throw std::logic_error("Substring comparison not supported for keypath substrings."); } } void add_link_constraint_to_query(realm::Query &query, Predicate::Operator op, const PropertyExpression &prop_expr, size_t row_index) { precondition(prop_expr.indexes.empty(), "KeyPath queries not supported for object comparisons."); switch (op) { case Predicate::Operator::NotEqual: query.Not(); REALM_FALLTHROUGH; case Predicate::Operator::Equal: { size_t col = prop_expr.prop->table_column; query.links_to(col, query.get_table()->get_link_target(col)->get(row_index)); break; } default: throw std::logic_error("Only 'equal' and 'not equal' operators supported for object comparison."); } } auto link_argument(const PropertyExpression&, const parser::Expression &argExpr, Arguments &args) { return args.object_index_for_argument(stot<int>(argExpr.s)); } auto link_argument(const parser::Expression &argExpr, const PropertyExpression&, Arguments &args) { return args.object_index_for_argument(stot<int>(argExpr.s)); } template <typename RetType, typename TableGetter> struct ColumnGetter { static Columns<RetType> convert(TableGetter&& table, const PropertyExpression& expr, Arguments&) { return table()->template column<RetType>(expr.prop->table_column); } }; template <typename RequestedType, typename TableGetter> struct ValueGetter; template <typename TableGetter> struct ValueGetter<Timestamp, TableGetter> { static Timestamp convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type != parser::Expression::Type::Argument) { throw std::logic_error("You must pass in a date argument to compare"); } return args.timestamp_for_argument(stot<int>(value.s)); } }; template <typename TableGetter> struct ValueGetter<bool, TableGetter> { static bool convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type == parser::Expression::Type::Argument) { return args.bool_for_argument(stot<int>(value.s)); } if (value.type != parser::Expression::Type::True && value.type != parser::Expression::Type::False) { throw std::logic_error("Attempting to compare bool property to a non-bool value"); } return value.type == parser::Expression::Type::True; } }; template <typename TableGetter> struct ValueGetter<Double, TableGetter> { static Double convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type == parser::Expression::Type::Argument) { return args.double_for_argument(stot<int>(value.s)); } return stot<double>(value.s); } }; template <typename TableGetter> struct ValueGetter<Float, TableGetter> { static Float convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type == parser::Expression::Type::Argument) { return args.float_for_argument(stot<int>(value.s)); } return stot<float>(value.s); } }; template <typename TableGetter> struct ValueGetter<Int, TableGetter> { static Int convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type == parser::Expression::Type::Argument) { return args.long_for_argument(stot<int>(value.s)); } return stot<long long>(value.s); } }; template <typename TableGetter> struct ValueGetter<String, TableGetter> { static std::string convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type == parser::Expression::Type::Argument) { return args.string_for_argument(stot<int>(value.s)); } if (value.type != parser::Expression::Type::String) { throw std::logic_error("Attempting to compare String property to a non-String value"); } return value.s; } }; template <typename TableGetter> struct ValueGetter<Binary, TableGetter> { static std::string convert(TableGetter&&, const parser::Expression & value, Arguments &args) { if (value.type == parser::Expression::Type::Argument) { return args.binary_for_argument(stot<int>(value.s)); } throw std::logic_error("Binary properties must be compared against a binary argument."); } }; template <typename RetType, typename Value, typename TableGetter> auto value_of_type_for_query(TableGetter&& tables, Value&& value, Arguments &args) { const bool isColumn = std::is_same<PropertyExpression, typename std::remove_reference<Value>::type>::value; using helper = std::conditional_t<isColumn, ColumnGetter<RetType, TableGetter>, ValueGetter<RetType, TableGetter>>; return helper::convert(tables, value, args); } template <typename A, typename B> void do_add_comparison_to_query(Query &query, Predicate::Comparison cmp, const PropertyExpression &expr, A &lhs, B &rhs, Arguments &args) { auto type = expr.prop->type; switch (type) { case PropertyType::Bool: add_bool_constraint_to_query(query, cmp.op, value_of_type_for_query<bool>(expr.table_getter, lhs, args), value_of_type_for_query<bool>(expr.table_getter, rhs, args)); break; case PropertyType::Date: add_numeric_constraint_to_query(query, cmp.op, value_of_type_for_query<Timestamp>(expr.table_getter, lhs, args), value_of_type_for_query<Timestamp>(expr.table_getter, rhs, args)); break; case PropertyType::Double: add_numeric_constraint_to_query(query, cmp.op, value_of_type_for_query<Double>(expr.table_getter, lhs, args), value_of_type_for_query<Double>(expr.table_getter, rhs, args)); break; case PropertyType::Float: add_numeric_constraint_to_query(query, cmp.op, value_of_type_for_query<Float>(expr.table_getter, lhs, args), value_of_type_for_query<Float>(expr.table_getter, rhs, args)); break; case PropertyType::Int: add_numeric_constraint_to_query(query, cmp.op, value_of_type_for_query<Int>(expr.table_getter, lhs, args), value_of_type_for_query<Int>(expr.table_getter, rhs, args)); break; case PropertyType::String: add_string_constraint_to_query(query, cmp, value_of_type_for_query<String>(expr.table_getter, lhs, args), value_of_type_for_query<String>(expr.table_getter, rhs, args)); break; case PropertyType::Data: add_binary_constraint_to_query(query, cmp.op, value_of_type_for_query<Binary>(expr.table_getter, lhs, args), value_of_type_for_query<Binary>(expr.table_getter, rhs, args)); break; case PropertyType::Object: case PropertyType::Array: add_link_constraint_to_query(query, cmp.op, expr, link_argument(lhs, rhs, args)); break; default: throw std::logic_error(util::format("Object type '%1' not supported", string_for_property_type(type))); } } template<typename T> void do_add_null_comparison_to_query(Query &query, Predicate::Operator op, const PropertyExpression &expr) { Columns<T> column = expr.table_getter()->template column<T>(expr.prop->table_column); switch (op) { case Predicate::Operator::NotEqual: query.and_query(column != realm::null()); break; case Predicate::Operator::Equal: query.and_query(column == realm::null()); break; default: throw std::logic_error("Only 'equal' and 'not equal' operators supported when comparing against 'null'."); } } template<> void do_add_null_comparison_to_query<Binary>(Query &query, Predicate::Operator op, const PropertyExpression &expr) { precondition(expr.indexes.empty(), "KeyPath queries not supported for data comparisons."); Columns<Binary> column = expr.table_getter()->template column<Binary>(expr.prop->table_column); switch (op) { case Predicate::Operator::NotEqual: query.not_equal(expr.prop->table_column, realm::null()); break; case Predicate::Operator::Equal: query.equal(expr.prop->table_column, realm::null()); break; default: throw std::logic_error("Only 'equal' and 'not equal' operators supported when comparing against 'null'."); } } template<> void do_add_null_comparison_to_query<Link>(Query &query, Predicate::Operator op, const PropertyExpression &expr) { precondition(expr.indexes.empty(), "KeyPath queries not supported for object comparisons."); switch (op) { case Predicate::Operator::NotEqual: query.Not(); REALM_FALLTHROUGH; case Predicate::Operator::Equal: query.and_query(query.get_table()->column<Link>(expr.prop->table_column).is_null()); break; default: throw std::logic_error("Only 'equal' and 'not equal' operators supported for object comparison."); } } void do_add_null_comparison_to_query(Query &query, Predicate::Comparison cmp, const PropertyExpression &expr) { auto type = expr.prop->type; switch (type) { case realm::PropertyType::Bool: do_add_null_comparison_to_query<bool>(query, cmp.op, expr); break; case realm::PropertyType::Date: do_add_null_comparison_to_query<Timestamp>(query, cmp.op, expr); break; case realm::PropertyType::Double: do_add_null_comparison_to_query<Double>(query, cmp.op, expr); break; case realm::PropertyType::Float: do_add_null_comparison_to_query<Float>(query, cmp.op, expr); break; case realm::PropertyType::Int: do_add_null_comparison_to_query<Int>(query, cmp.op, expr); break; case realm::PropertyType::String: do_add_null_comparison_to_query<String>(query, cmp.op, expr); break; case realm::PropertyType::Data: do_add_null_comparison_to_query<Binary>(query, cmp.op, expr); break; case realm::PropertyType::Object: do_add_null_comparison_to_query<Link>(query, cmp.op, expr); break; case realm::PropertyType::Array: throw std::logic_error("Comparing Lists to 'null' is not supported"); default: throw std::logic_error(util::format("Object type '%1' not supported", string_for_property_type(type))); } } bool expression_is_null(const parser::Expression &expr, Arguments &args) { if (expr.type == parser::Expression::Type::Null) { return true; } else if (expr.type == parser::Expression::Type::Argument) { return args.is_argument_null(stot<int>(expr.s)); } return false; } void add_comparison_to_query(Query &query, const Predicate &pred, Arguments &args, const Schema &schema, const std::string &type) { const Predicate::Comparison &cmpr = pred.cmpr; auto t0 = cmpr.expr[0].type, t1 = cmpr.expr[1].type; auto object_schema = schema.find(type); if (t0 == parser::Expression::Type::KeyPath && t1 != parser::Expression::Type::KeyPath) { PropertyExpression expr(query, schema, object_schema, cmpr.expr[0].s); if (expression_is_null(cmpr.expr[1], args)) { do_add_null_comparison_to_query(query, cmpr, expr); } else { do_add_comparison_to_query(query, cmpr, expr, expr, cmpr.expr[1], args); } } else if (t0 != parser::Expression::Type::KeyPath && t1 == parser::Expression::Type::KeyPath) { PropertyExpression expr(query, schema, object_schema, cmpr.expr[1].s); if (expression_is_null(cmpr.expr[0], args)) { do_add_null_comparison_to_query(query, cmpr, expr); } else { do_add_comparison_to_query(query, cmpr, expr, cmpr.expr[0], expr, args); } } else { throw std::logic_error("Predicate expressions must compare a keypath and another keypath or a constant value"); } } void update_query_with_predicate(Query &query, const Predicate &pred, Arguments &arguments, const Schema &schema, const std::string &type) { if (pred.negate) { query.Not(); } switch (pred.type) { case Predicate::Type::And: query.group(); for (auto &sub : pred.cpnd.sub_predicates) { update_query_with_predicate(query, sub, arguments, schema, type); } if (!pred.cpnd.sub_predicates.size()) { query.and_query(std::unique_ptr<realm::Expression>(new TrueExpression)); } query.end_group(); break; case Predicate::Type::Or: query.group(); for (auto &sub : pred.cpnd.sub_predicates) { query.Or(); update_query_with_predicate(query, sub, arguments, schema, type); } if (!pred.cpnd.sub_predicates.size()) { query.and_query(std::unique_ptr<realm::Expression>(new FalseExpression)); } query.end_group(); break; case Predicate::Type::Comparison: { add_comparison_to_query(query, pred, arguments, schema, type); break; } case Predicate::Type::True: query.and_query(std::unique_ptr<realm::Expression>(new TrueExpression)); break; case Predicate::Type::False: query.and_query(std::unique_ptr<realm::Expression>(new FalseExpression)); break; default: throw std::logic_error("Invalid predicate type"); } } } // anonymous namespace namespace realm { namespace query_builder { void apply_predicate(Query &query, const Predicate &predicate, Arguments &arguments, const Schema &schema, const std::string &objectType) { update_query_with_predicate(query, predicate, arguments, schema, objectType); // Test the constructed query in core std::string validateMessage = query.validate(); precondition(validateMessage.empty(), validateMessage.c_str()); } } }
weatherfordmat/YorViewReactNative
node_modules/realm/src/object-store/src/parser/query_builder.cpp
C++
mit
23,947
<?php /* * This file is part of the Slack API library. * * (c) Cas Leentfaar <info@casleentfaar.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace CL\Slack\Payload; /** * @author Cas Leentfaar <info@casleentfaar.com> * * @link Official documentation at https://api.slack.com/methods/channels.list */ class EmojiListPayload extends AbstractPayload { /** * @inheritdoc */ public function getMethod() { return 'emoji.list'; } }
piotrpasich/slack
src/CL/Slack/Payload/EmojiListPayload.php
PHP
mit
567
export * from "./logic" export * from "./strategies" export * from "./defaults" export * from "./dragndrop"
elbywan/bosket
src/core/index.d.ts
TypeScript
mit
107
// // NSWorkspaceHelper.h // Enormego Helpers // // Created by Shaun Harrison on 11/18/09. // Copyright (c) 2009 enormego // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #import <Foundation/Foundation.h> @interface NSWorkspace (Helper) - (void)registerLoginLaunchBundle:(NSBundle*)bundle; - (void)unregisterLoginLaunchBundle:(NSBundle*)bundle; - (void)unregisterLoginLaunchApplication:(NSString*)appName; @end
chamerling/RatatamApp
RatatamApp/NSWorkspaceHelper.h
C
mit
1,464
#region Copyright // // DotNetNuke® - https://www.dnnsoftware.com // Copyright (c) 2002-2018 // by DotNetNuke Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and // to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions // of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #endregion #region Usings using System.Collections.Generic; #endregion namespace Dnn.PersonaBar.Extensions.Components.Dto { public class AvailablePackagesDto { public string PackageType { get; set; } public List<PackageInfoSlimDto> ValidPackages { get; set; } public List<string> InvalidPackages { get; set; } } }
RichardHowells/Dnn.Platform
Dnn.AdminExperience/Extensions/Content/Dnn.PersonaBar.Extensions/Components/Extensions/Dto/AvailablePackagesDto.cs
C#
mit
1,552
var searchData= [ ['friendstatuschangeevent',['FriendStatusChangeEvent',['../class_cotc_sdk_1_1_friend_status_change_event.html',1,'CotcSdk']]] ];
xtralifecloud/unity-sdk
Docs/DoxygenGenerated/html/search/classes_5.js
JavaScript
mit
149
package user import ( "errors" "github.com/ungerik/go-start/view" ) // The confirmation code will be passed in the GET parameter "code" func EmailConfirmationView(profileURL view.URL) view.View { return view.DynamicView( func(ctx *view.Context) (view.View, error) { confirmationCode, ok := ctx.Request.Params["code"] if !ok { return view.DIV("error", view.HTML("Invalid email confirmation code!")), nil } userID, email, confirmed, err := ConfirmEmail(confirmationCode) if !confirmed { return view.DIV("error", view.HTML("Invalid email confirmation code!")), err } LoginID(ctx.Session, userID) return view.Views{ view.DIV("success", view.Printf("Email address %s confirmed!", email)), &view.If{ Condition: profileURL != nil, Content: view.P( view.HTML("Continue to your "), view.A(profileURL, "profile..."), ), }, }, nil }, ) } func NewLoginForm(buttonText, class, errorMessageClass, successMessageClass string, redirectURL view.URL) view.View { return view.DynamicView( func(ctx *view.Context) (v view.View, err error) { if from, ok := ctx.Request.Params["from"]; ok { redirectURL = view.StringURL(from) } model := &LoginFormModel{} if email, ok := ctx.Request.Params["email"]; ok { model.Email.Set(email) } form := &view.Form{ Class: class, ErrorMessageClass: errorMessageClass, SuccessMessageClass: successMessageClass, SuccessMessage: "Login successful", SubmitButtonText: buttonText, FormID: "gostart_user_login", GetModel: view.FormModel(model), OnSubmit: func(form *view.Form, formModel interface{}, ctx *view.Context) (string, view.URL, error) { m := formModel.(*LoginFormModel) ok, err := LoginEmailPassword(ctx.Session, m.Email.Get(), m.Password.Get()) if err != nil { if view.Config.Debug.Mode { return "", nil, err } else { return "", nil, errors.New("An internal error ocoured") } } if !ok { return "", nil, errors.New("Wrong email and password combination") } return "", redirectURL, nil }, } return form, nil }, ) } // If redirect is nil, the redirect will go to "/" func LogoutView(redirect view.URL) view.View { return view.RenderView( func(ctx *view.Context) (err error) { Logout(ctx.Session) if redirect != nil { return view.Redirect(redirect.URL(ctx)) } return view.Redirect("/") }, ) } // confirmationPage must have the confirmation code as first URL parameter func NewSignupForm(buttonText, class, errorMessageClass, successMessageClass string, confirmationURL, redirectURL view.URL) *view.Form { return &view.Form{ Class: class, ErrorMessageClass: errorMessageClass, SuccessMessageClass: successMessageClass, SuccessMessage: Config.ConfirmationMessage.Sent, SubmitButtonText: buttonText, FormID: "gostart_user_signup", GetModel: func(form *view.Form, ctx *view.Context) (interface{}, error) { return &EmailPasswordFormModel{}, nil }, OnSubmit: func(form *view.Form, formModel interface{}, ctx *view.Context) (string, view.URL, error) { m := formModel.(*EmailPasswordFormModel) email := m.Email.Get() password := m.Password1.Get() var user User found, err := WithEmail(email, &user) if err != nil { return "", nil, err } if found { if user.EmailPasswordConfirmed() { return "", nil, errors.New("A user with that email and a password already exists") } user.Password.SetHashed(password) } else { // Config.Collection.InitDocument(&user) err = user.SetEmailPassword(email, password) if err != nil { return "", nil, err } } err = <-user.Email[0].SendConfirmationEmail(ctx, confirmationURL) if err != nil { return "", nil, err } if found { err = Config.Collection.UpdateSubDocumentWithID(user.ID, "", &user) } else { err = Config.Collection.InitAndSaveDocument(&user) } return "", redirectURL, err }, } }
prinsmike/go-start
user/views.go
GO
mit
4,099
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using UsageSampleMvc.AspNetCore.Models; namespace UsageSampleMvc.AspNetCore.Controllers { public class HomeController : Controller { public IActionResult Index() { return View(); } public IActionResult About() { ViewData["Message"] = "Your application description page."; return View(); } public IActionResult Contact() { ViewData["Message"] = "Your contact page."; return View(); } public IActionResult Error() { return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } }
billbogaiv/stuntman
samples/UsageSampleMvc.AspNetCore/Controllers/HomeController.cs
C#
mit
865
/* * Copyright (C) 2008 Apple 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 must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include "platform/Theme.h" namespace WebCore { LengthBox Theme::controlBorder(ControlPart part, const FontDescription&, const LengthBox& zoomedBox, float) const { switch (part) { case PushButtonPart: case MenulistPart: case SearchFieldPart: case CheckboxPart: case RadioPart: return LengthBox(0); default: return zoomedBox; } } LengthBox Theme::controlPadding(ControlPart part, const FontDescription&, const LengthBox& zoomedBox, float) const { switch (part) { case MenulistPart: case MenulistButtonPart: case CheckboxPart: case RadioPart: return LengthBox(0); default: return zoomedBox; } } }
lordmos/blink
Source/platform/Theme.cpp
C++
mit
2,103
<?php session_start(session_id()); if ($_SESSION["user"]) { //get the pet name from ajax if (isset($_GET['petname'])) { $petname = htmlentities($_GET['petname']); } //include libraries require_once('../bin/lib/security.php'); include "../bin/lib/validation-functions.php"; include "../bin/lib/mail-message.php"; require_once('../bin/myDatabase.php'); //intialize the databse $dbUserName = 'smcolbur' . '_reader'; $whichPass = "r"; //flag for which one to use. $dbName = strtoupper('smcolbur') . '_Product'; $thisDatabase = new myDatabase($dbUserName, $whichPass, $dbName); //get username $user = htmlentities($_SESSION["user"], ENT_QUOTES, "UTF-8"); //create data $data = array($user); //run query to database for user information $query = "SELECT `pmkUserId`, `fldEmail`, `fldUsername` FROM `tblUsers` WHERE fldUsername = ?"; //store those results $user_results = $thisDatabase->select($query, $data); //store them in variables $user_username = $user_results[0]['fldUsername']; $user_email = $user_results[0]['fldEmail']; //get contact information for shelter $Contactquery = "SELECT `fldPhoneNumber` , `fldShelterName`, `fldStreetAdress`, `fldCity`, `fldState`, `fldZipCode` FROM `tblShelterInfo` WHERE 1"; $Contactresults = $thisDatabase->select($Contactquery); //generate message for visitor $messageA = '<h2>Thank you for your Interest in ' . $petname . '!</h2>'; $messageB = "<p>Dear " . $user_username . ",</p>" . "<p>All of our animals would love a forever home, I hope you're the lucky one to have a best friend for life!</p>" . "<p>We well try our best to get back to you shortly on your interest in " . $petname . "." . " If you have any further questions or would like to know more feel free to contact us any time or stop by the shelter and see these" . "beautiful animals in person! They always love a visit. </p>"; $messageC = "<h3>Contact Infomation:</h3>"; foreach ($Contactresults as $ContactInfo) { $ContactKeys = array_keys($ContactInfo); $key = array(); foreach ($ContactInfo as $index => $value) { if (!is_int($index)) { if ($index == "fldPhoneNumber") { $messageC.= "<p class = " . substr($index, 3) . ">Phone Number:" . $value . "</p>"; } elseif ($index == "fldCity") { $messageC.= "<span class = " . substr($index, 3) . ">" . $value . "</span>"; } elseif ($index == "fldState") { $messageC.= "<span class = " . substr($index, 3) . ">, " . $value . "</span>"; } else { $messageC.= "<p class = " . substr($index, 3) . ">" . $value . "</p>"; } } } } //############################################################## // // email the notification to the user // $to = $user_email; $cc = "samuel.colburn@uvm.edu"; $bcc = ""; $from = "Burlington Animals <samuel.colburn@uvm.edu>"; $subject = "Thank you for your Interest in " . $petname . "!"; $mailed = sendMail($to, $cc, $bcc, $from, $subject, $messageA . $messageB . $messageC); if ($mailed) { $arr = array( 'email' => $user_email, ); echo json_encode($arr); exit(); } } ?>
samuelcolburn/cs142
assignment7/mailadoptmessage.php
PHP
mit
3,457
<?php return unserialize('a:3:{i:0;O:27:"Doctrine\\ORM\\Mapping\\Entity":2:{s:15:"repositoryClass";s:53:"Prueba\\InicialBundle\\Entity\\Repository\\BlogRepository";s:8:"readOnly";b:0;}i:1;O:26:"Doctrine\\ORM\\Mapping\\Table":5:{s:4:"name";s:4:"blog";s:6:"schema";N;s:7:"indexes";N;s:17:"uniqueConstraints";N;s:7:"options";a:0:{}}i:2;O:42:"Doctrine\\ORM\\Mapping\\HasLifecycleCallbacks":0:{}}');
Derasten/symfony2
app/cache/prod/annotations/fa7e82ce172c56a61d73ea930fe8865e0f0986b7.cache.php
PHP
mit
394
module DataFilesHelper end
vekelly09/metaboflo
app/helpers/data_files_helper.rb
Ruby
mit
27
#!/bin/bash cd /root wget http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.12/src/hdf5-1.8.12.tar.gz tar xvfz ./hdf5-1.8.12.tar.gz; cd hdf5-1.8.12/ ./configure --prefix=/usr/local make; make install rm -r -f /root/hdf5*
leoncamel/docker-brew-datacanvas-base
sci-python/3.3/scripts/hdf5_install.sh
Shell
mit
222
<?php /** * PHP VIN Utility Library * * LICENSE * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @package libphp-vin * @subpackage Vin * @copyright Copyright (c) 2010 Chris Smith (http://www.cs278.org/) * @license http://www.opensource.org/licenses/mit-license.php MIT License * @version */ namespace libphpvin\Vin; /** * Check digit calculator interface * * @package libphp-vin * @subpackage Vin * @copyright Copyright (c) 2010 Chris Smith (http://www.cs278.org/) * @license http://www.opensource.org/licenses/mit-license.php MIT License */ interface CheckDigitCalculator extends \libphpvin\Validatable { public function __construct($vin); public function getVin(); public function setVin($vin); public function getCheckDigit(); }
cs278/libphp-vin
src/libphpvin/Vin/CheckDigitCalculator.php
PHP
mit
1,795
#! coding:utf-8 """ compiler tests. These tests are among the very first that were written when SQLAlchemy began in 2005. As a result the testing style here is very dense; it's an ongoing job to break these into much smaller tests with correct pep8 styling and coherent test organization. """ from sqlalchemy.testing import eq_, is_, assert_raises, \ assert_raises_message, eq_ignore_whitespace from sqlalchemy import testing from sqlalchemy.testing import fixtures, AssertsCompiledSQL from sqlalchemy import Integer, String, MetaData, Table, Column, select, \ func, not_, cast, text, tuple_, exists, update, bindparam,\ literal, and_, null, type_coerce, alias, or_, literal_column,\ Float, TIMESTAMP, Numeric, Date, Text, union, except_,\ intersect, union_all, Boolean, distinct, join, outerjoin, asc, desc,\ over, subquery, case, true, CheckConstraint import decimal from sqlalchemy.util import u from sqlalchemy import exc, sql, util, types, schema from sqlalchemy.sql import table, column, label from sqlalchemy.sql.expression import ClauseList, _literal_as_text, HasPrefixes from sqlalchemy.engine import default from sqlalchemy.dialects import mysql, mssql, postgresql, oracle, \ sqlite, sybase from sqlalchemy.ext.compiler import compiles from sqlalchemy.sql import compiler table1 = table('mytable', column('myid', Integer), column('name', String), column('description', String), ) table2 = table( 'myothertable', column('otherid', Integer), column('othername', String), ) table3 = table( 'thirdtable', column('userid', Integer), column('otherstuff', String), ) metadata = MetaData() # table with a schema table4 = Table( 'remotetable', metadata, Column('rem_id', Integer, primary_key=True), Column('datatype_id', Integer), Column('value', String(20)), schema='remote_owner' ) # table with a 'multipart' schema table5 = Table( 'remotetable', metadata, Column('rem_id', Integer, primary_key=True), Column('datatype_id', Integer), Column('value', String(20)), schema='dbo.remote_owner' ) users = table('users', column('user_id'), column('user_name'), column('password'), ) addresses = table('addresses', column('address_id'), column('user_id'), column('street'), column('city'), column('state'), column('zip') ) keyed = Table('keyed', metadata, Column('x', Integer, key='colx'), Column('y', Integer, key='coly'), Column('z', Integer), ) class SelectTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def test_attribute_sanity(self): assert hasattr(table1, 'c') assert hasattr(table1.select(), 'c') assert not hasattr(table1.c.myid.self_group(), 'columns') assert hasattr(table1.select().self_group(), 'columns') assert not hasattr(table1.c.myid, 'columns') assert not hasattr(table1.c.myid, 'c') assert not hasattr(table1.select().c.myid, 'c') assert not hasattr(table1.select().c.myid, 'columns') assert not hasattr(table1.alias().c.myid, 'columns') assert not hasattr(table1.alias().c.myid, 'c') if util.compat.py32: assert_raises_message( exc.InvalidRequestError, 'Scalar Select expression has no ' 'columns; use this object directly within a ' 'column-level expression.', lambda: hasattr( select([table1.c.myid]).as_scalar().self_group(), 'columns')) assert_raises_message( exc.InvalidRequestError, 'Scalar Select expression has no ' 'columns; use this object directly within a ' 'column-level expression.', lambda: hasattr(select([table1.c.myid]).as_scalar(), 'columns')) else: assert not hasattr( select([table1.c.myid]).as_scalar().self_group(), 'columns') assert not hasattr(select([table1.c.myid]).as_scalar(), 'columns') def test_prefix_constructor(self): class Pref(HasPrefixes): def _generate(self): return self assert_raises(exc.ArgumentError, Pref().prefix_with, "some prefix", not_a_dialect=True ) def test_table_select(self): self.assert_compile(table1.select(), "SELECT mytable.myid, mytable.name, " "mytable.description FROM mytable") self.assert_compile( select( [ table1, table2]), "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername FROM mytable, " "myothertable") def test_invalid_col_argument(self): assert_raises(exc.ArgumentError, select, table1) assert_raises(exc.ArgumentError, select, table1.c.myid) def test_int_limit_offset_coercion(self): for given, exp in [ ("5", 5), (5, 5), (5.2, 5), (decimal.Decimal("5"), 5), (None, None), ]: eq_(select().limit(given)._limit, exp) eq_(select().offset(given)._offset, exp) eq_(select(limit=given)._limit, exp) eq_(select(offset=given)._offset, exp) assert_raises(ValueError, select().limit, "foo") assert_raises(ValueError, select().offset, "foo") assert_raises(ValueError, select, offset="foo") assert_raises(ValueError, select, limit="foo") def test_limit_offset_no_int_coercion_one(self): exp1 = literal_column("Q") exp2 = literal_column("Y") self.assert_compile( select([1]).limit(exp1).offset(exp2), "SELECT 1 LIMIT Q OFFSET Y" ) self.assert_compile( select([1]).limit(bindparam('x')).offset(bindparam('y')), "SELECT 1 LIMIT :x OFFSET :y" ) def test_limit_offset_no_int_coercion_two(self): exp1 = literal_column("Q") exp2 = literal_column("Y") sel = select([1]).limit(exp1).offset(exp2) assert_raises_message( exc.CompileError, "This SELECT structure does not use a simple integer " "value for limit", getattr, sel, "_limit" ) assert_raises_message( exc.CompileError, "This SELECT structure does not use a simple integer " "value for offset", getattr, sel, "_offset" ) def test_limit_offset_no_int_coercion_three(self): exp1 = bindparam("Q") exp2 = bindparam("Y") sel = select([1]).limit(exp1).offset(exp2) assert_raises_message( exc.CompileError, "This SELECT structure does not use a simple integer " "value for limit", getattr, sel, "_limit" ) assert_raises_message( exc.CompileError, "This SELECT structure does not use a simple integer " "value for offset", getattr, sel, "_offset" ) def test_limit_offset(self): for lim, offset, exp, params in [ (5, 10, "LIMIT :param_1 OFFSET :param_2", {'param_1': 5, 'param_2': 10}), (None, 10, "LIMIT -1 OFFSET :param_1", {'param_1': 10}), (5, None, "LIMIT :param_1", {'param_1': 5}), (0, 0, "LIMIT :param_1 OFFSET :param_2", {'param_1': 0, 'param_2': 0}), ]: self.assert_compile( select([1]).limit(lim).offset(offset), "SELECT 1 " + exp, checkparams=params ) def test_limit_offset_select_literal_binds(self): stmt = select([1]).limit(5).offset(6) self.assert_compile( stmt, "SELECT 1 LIMIT 5 OFFSET 6", literal_binds=True ) def test_limit_offset_compound_select_literal_binds(self): stmt = select([1]).union(select([2])).limit(5).offset(6) self.assert_compile( stmt, "SELECT 1 UNION SELECT 2 LIMIT 5 OFFSET 6", literal_binds=True ) def test_select_precol_compile_ordering(self): s1 = select([column('x')]).select_from(text('a')).limit(5).as_scalar() s2 = select([s1]).limit(10) class MyCompiler(compiler.SQLCompiler): def get_select_precolumns(self, select, **kw): result = "" if select._limit: result += "FIRST %s " % self.process( literal( select._limit), **kw) if select._offset: result += "SKIP %s " % self.process( literal( select._offset), **kw) return result def limit_clause(self, select, **kw): return "" dialect = default.DefaultDialect() dialect.statement_compiler = MyCompiler dialect.paramstyle = 'qmark' dialect.positional = True self.assert_compile( s2, "SELECT FIRST ? (SELECT FIRST ? x FROM a) AS anon_1", checkpositional=(10, 5), dialect=dialect ) def test_from_subquery(self): """tests placing select statements in the column clause of another select, for the purposes of selecting from the exported columns of that select.""" s = select([table1], table1.c.name == 'jack') self.assert_compile( select( [s], s.c.myid == 7), "SELECT myid, name, description FROM " "(SELECT mytable.myid AS myid, " "mytable.name AS name, mytable.description AS description " "FROM mytable " "WHERE mytable.name = :name_1) WHERE myid = :myid_1") sq = select([table1]) self.assert_compile( sq.select(), "SELECT myid, name, description FROM " "(SELECT mytable.myid AS myid, " "mytable.name AS name, mytable.description " "AS description FROM mytable)" ) sq = select( [table1], ).alias('sq') self.assert_compile( sq.select(sq.c.myid == 7), "SELECT sq.myid, sq.name, sq.description FROM " "(SELECT mytable.myid AS myid, mytable.name AS name, " "mytable.description AS description FROM mytable) AS sq " "WHERE sq.myid = :myid_1" ) sq = select( [table1, table2], and_(table1.c.myid == 7, table2.c.otherid == table1.c.myid), use_labels=True ).alias('sq') sqstring = "SELECT mytable.myid AS mytable_myid, mytable.name AS "\ "mytable_name, mytable.description AS mytable_description, "\ "myothertable.otherid AS myothertable_otherid, "\ "myothertable.othername AS myothertable_othername FROM "\ "mytable, myothertable WHERE mytable.myid = :myid_1 AND "\ "myothertable.otherid = mytable.myid" self.assert_compile( sq.select(), "SELECT sq.mytable_myid, sq.mytable_name, " "sq.mytable_description, sq.myothertable_otherid, " "sq.myothertable_othername FROM (%s) AS sq" % sqstring) sq2 = select( [sq], use_labels=True ).alias('sq2') self.assert_compile( sq2.select(), "SELECT sq2.sq_mytable_myid, sq2.sq_mytable_name, " "sq2.sq_mytable_description, sq2.sq_myothertable_otherid, " "sq2.sq_myothertable_othername FROM " "(SELECT sq.mytable_myid AS " "sq_mytable_myid, sq.mytable_name AS sq_mytable_name, " "sq.mytable_description AS sq_mytable_description, " "sq.myothertable_otherid AS sq_myothertable_otherid, " "sq.myothertable_othername AS sq_myothertable_othername " "FROM (%s) AS sq) AS sq2" % sqstring) def test_select_from_clauselist(self): self.assert_compile( select([ClauseList(column('a'), column('b'))] ).select_from(text('sometable')), 'SELECT a, b FROM sometable' ) def test_use_labels(self): self.assert_compile( select([table1.c.myid == 5], use_labels=True), "SELECT mytable.myid = :myid_1 AS anon_1 FROM mytable" ) self.assert_compile( select([func.foo()], use_labels=True), "SELECT foo() AS foo_1" ) # this is native_boolean=False for default dialect self.assert_compile( select([not_(True)], use_labels=True), "SELECT :param_1 = 0 AS anon_1" ) self.assert_compile( select([cast("data", Integer)], use_labels=True), "SELECT CAST(:param_1 AS INTEGER) AS anon_1" ) self.assert_compile( select([func.sum( func.lala(table1.c.myid).label('foo')).label('bar')]), "SELECT sum(lala(mytable.myid)) AS bar FROM mytable" ) self.assert_compile( select([keyed]), "SELECT keyed.x, keyed.y" ", keyed.z FROM keyed" ) self.assert_compile( select([keyed]).apply_labels(), "SELECT keyed.x AS keyed_x, keyed.y AS " "keyed_y, keyed.z AS keyed_z FROM keyed" ) def test_paramstyles(self): stmt = text("select :foo, :bar, :bat from sometable") self.assert_compile( stmt, "select ?, ?, ? from sometable", dialect=default.DefaultDialect(paramstyle='qmark') ) self.assert_compile( stmt, "select :foo, :bar, :bat from sometable", dialect=default.DefaultDialect(paramstyle='named') ) self.assert_compile( stmt, "select %s, %s, %s from sometable", dialect=default.DefaultDialect(paramstyle='format') ) self.assert_compile( stmt, "select :1, :2, :3 from sometable", dialect=default.DefaultDialect(paramstyle='numeric') ) self.assert_compile( stmt, "select %(foo)s, %(bar)s, %(bat)s from sometable", dialect=default.DefaultDialect(paramstyle='pyformat') ) def test_anon_param_name_on_keys(self): self.assert_compile( keyed.insert(), "INSERT INTO keyed (x, y, z) VALUES (%(colx)s, %(coly)s, %(z)s)", dialect=default.DefaultDialect(paramstyle='pyformat') ) self.assert_compile( keyed.c.coly == 5, "keyed.y = %(coly_1)s", checkparams={'coly_1': 5}, dialect=default.DefaultDialect(paramstyle='pyformat') ) def test_dupe_columns(self): """test that deduping is performed against clause element identity, not rendered result.""" self.assert_compile( select([column('a'), column('a'), column('a')]), "SELECT a, a, a", dialect=default.DefaultDialect() ) c = column('a') self.assert_compile( select([c, c, c]), "SELECT a", dialect=default.DefaultDialect() ) a, b = column('a'), column('b') self.assert_compile( select([a, b, b, b, a, a]), "SELECT a, b", dialect=default.DefaultDialect() ) # using alternate keys. a, b, c = Column('a', Integer, key='b'), \ Column('b', Integer), \ Column('c', Integer, key='a') self.assert_compile( select([a, b, c, a, b, c]), "SELECT a, b, c", dialect=default.DefaultDialect() ) self.assert_compile( select([bindparam('a'), bindparam('b'), bindparam('c')]), "SELECT :a AS anon_1, :b AS anon_2, :c AS anon_3", dialect=default.DefaultDialect(paramstyle='named') ) self.assert_compile( select([bindparam('a'), bindparam('b'), bindparam('c')]), "SELECT ? AS anon_1, ? AS anon_2, ? AS anon_3", dialect=default.DefaultDialect(paramstyle='qmark'), ) self.assert_compile( select([column("a"), column("a"), column("a")]), "SELECT a, a, a" ) s = select([bindparam('a'), bindparam('b'), bindparam('c')]) s = s.compile(dialect=default.DefaultDialect(paramstyle='qmark')) eq_(s.positiontup, ['a', 'b', 'c']) def test_nested_label_targeting(self): """test nested anonymous label generation. """ s1 = table1.select() s2 = s1.alias() s3 = select([s2], use_labels=True) s4 = s3.alias() s5 = select([s4], use_labels=True) self.assert_compile(s5, 'SELECT anon_1.anon_2_myid AS ' 'anon_1_anon_2_myid, anon_1.anon_2_name AS ' 'anon_1_anon_2_name, anon_1.anon_2_descript' 'ion AS anon_1_anon_2_description FROM ' '(SELECT anon_2.myid AS anon_2_myid, ' 'anon_2.name AS anon_2_name, ' 'anon_2.description AS anon_2_description ' 'FROM (SELECT mytable.myid AS myid, ' 'mytable.name AS name, mytable.description ' 'AS description FROM mytable) AS anon_2) ' 'AS anon_1') def test_nested_label_targeting_keyed(self): s1 = keyed.select() s2 = s1.alias() s3 = select([s2], use_labels=True) self.assert_compile(s3, "SELECT anon_1.x AS anon_1_x, " "anon_1.y AS anon_1_y, " "anon_1.z AS anon_1_z FROM " "(SELECT keyed.x AS x, keyed.y " "AS y, keyed.z AS z FROM keyed) AS anon_1") s4 = s3.alias() s5 = select([s4], use_labels=True) self.assert_compile(s5, "SELECT anon_1.anon_2_x AS anon_1_anon_2_x, " "anon_1.anon_2_y AS anon_1_anon_2_y, " "anon_1.anon_2_z AS anon_1_anon_2_z " "FROM (SELECT anon_2.x AS anon_2_x, " "anon_2.y AS anon_2_y, " "anon_2.z AS anon_2_z FROM " "(SELECT keyed.x AS x, keyed.y AS y, keyed.z " "AS z FROM keyed) AS anon_2) AS anon_1" ) def test_exists(self): s = select([table1.c.myid]).where(table1.c.myid == 5) self.assert_compile(exists(s), "EXISTS (SELECT mytable.myid FROM mytable " "WHERE mytable.myid = :myid_1)" ) self.assert_compile(exists(s.as_scalar()), "EXISTS (SELECT mytable.myid FROM mytable " "WHERE mytable.myid = :myid_1)" ) self.assert_compile(exists([table1.c.myid], table1.c.myid == 5).select(), 'SELECT EXISTS (SELECT mytable.myid FROM ' 'mytable WHERE mytable.myid = :myid_1) AS anon_1', params={'mytable_myid': 5}) self.assert_compile(select([table1, exists([1], from_obj=table2)]), 'SELECT mytable.myid, mytable.name, ' 'mytable.description, EXISTS (SELECT 1 ' 'FROM myothertable) AS anon_1 FROM mytable', params={}) self.assert_compile(select([table1, exists([1], from_obj=table2).label('foo')]), 'SELECT mytable.myid, mytable.name, ' 'mytable.description, EXISTS (SELECT 1 ' 'FROM myothertable) AS foo FROM mytable', params={}) self.assert_compile( table1.select( exists().where( table2.c.otherid == table1.c.myid).correlate(table1)), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'EXISTS (SELECT * FROM myothertable WHERE ' 'myothertable.otherid = mytable.myid)') self.assert_compile( table1.select( exists().where( table2.c.otherid == table1.c.myid).correlate(table1)), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'EXISTS (SELECT * FROM myothertable WHERE ' 'myothertable.otherid = mytable.myid)') self.assert_compile( table1.select( exists().where( table2.c.otherid == table1.c.myid).correlate(table1) ).replace_selectable( table2, table2.alias()), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'EXISTS (SELECT * FROM myothertable AS ' 'myothertable_1 WHERE myothertable_1.otheri' 'd = mytable.myid)') self.assert_compile( table1.select( exists().where( table2.c.otherid == table1.c.myid).correlate(table1)). select_from( table1.join( table2, table1.c.myid == table2.c.otherid)). replace_selectable( table2, table2.alias()), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable JOIN ' 'myothertable AS myothertable_1 ON ' 'mytable.myid = myothertable_1.otherid ' 'WHERE EXISTS (SELECT * FROM myothertable ' 'AS myothertable_1 WHERE ' 'myothertable_1.otherid = mytable.myid)') self.assert_compile( select([ or_( exists().where(table2.c.otherid == 'foo'), exists().where(table2.c.otherid == 'bar') ) ]), "SELECT (EXISTS (SELECT * FROM myothertable " "WHERE myothertable.otherid = :otherid_1)) " "OR (EXISTS (SELECT * FROM myothertable WHERE " "myothertable.otherid = :otherid_2)) AS anon_1" ) self.assert_compile( select([exists([1])]), "SELECT EXISTS (SELECT 1) AS anon_1" ) self.assert_compile( select([~exists([1])]), "SELECT NOT (EXISTS (SELECT 1)) AS anon_1" ) self.assert_compile( select([~(~exists([1]))]), "SELECT NOT (NOT (EXISTS (SELECT 1))) AS anon_1" ) def test_where_subquery(self): s = select([addresses.c.street], addresses.c.user_id == users.c.user_id, correlate=True).alias('s') # don't correlate in a FROM list self.assert_compile(select([users, s.c.street], from_obj=s), "SELECT users.user_id, users.user_name, " "users.password, s.street FROM users, " "(SELECT addresses.street AS street FROM " "addresses, users WHERE addresses.user_id = " "users.user_id) AS s") self.assert_compile(table1.select( table1.c.myid == select( [table1.c.myid], table1.c.name == 'jack')), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'mytable.myid = (SELECT mytable.myid FROM ' 'mytable WHERE mytable.name = :name_1)') self.assert_compile( table1.select( table1.c.myid == select( [table2.c.otherid], table1.c.name == table2.c.othername ) ), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'mytable.myid = (SELECT ' 'myothertable.otherid FROM myothertable ' 'WHERE mytable.name = myothertable.othernam' 'e)') self.assert_compile(table1.select(exists([1], table2.c.otherid == table1.c.myid)), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'EXISTS (SELECT 1 FROM myothertable WHERE ' 'myothertable.otherid = mytable.myid)') talias = table1.alias('ta') s = subquery('sq2', [talias], exists([1], table2.c.otherid == talias.c.myid)) self.assert_compile(select([s, table1]), 'SELECT sq2.myid, sq2.name, ' 'sq2.description, mytable.myid, ' 'mytable.name, mytable.description FROM ' '(SELECT ta.myid AS myid, ta.name AS name, ' 'ta.description AS description FROM ' 'mytable AS ta WHERE EXISTS (SELECT 1 FROM ' 'myothertable WHERE myothertable.otherid = ' 'ta.myid)) AS sq2, mytable') # test constructing the outer query via append_column(), which # occurs in the ORM's Query object s = select([], exists([1], table2.c.otherid == table1.c.myid), from_obj=table1) s.append_column(table1) self.assert_compile(s, 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable WHERE ' 'EXISTS (SELECT 1 FROM myothertable WHERE ' 'myothertable.otherid = mytable.myid)') def test_orderby_subquery(self): self.assert_compile( table1.select( order_by=[ select( [ table2.c.otherid], table1.c.myid == table2.c.otherid)]), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable ORDER BY ' '(SELECT myothertable.otherid FROM ' 'myothertable WHERE mytable.myid = ' 'myothertable.otherid)') self.assert_compile(table1.select(order_by=[ desc(select([table2.c.otherid], table1.c.myid == table2.c.otherid))]), 'SELECT mytable.myid, mytable.name, ' 'mytable.description FROM mytable ORDER BY ' '(SELECT myothertable.otherid FROM ' 'myothertable WHERE mytable.myid = ' 'myothertable.otherid) DESC') def test_scalar_select(self): assert_raises_message( exc.InvalidRequestError, r"Select objects don't have a type\. Call as_scalar\(\) " "on this Select object to return a 'scalar' " "version of this Select\.", func.coalesce, select([table1.c.myid]) ) s = select([table1.c.myid], correlate=False).as_scalar() self.assert_compile(select([table1, s]), 'SELECT mytable.myid, mytable.name, ' 'mytable.description, (SELECT mytable.myid ' 'FROM mytable) AS anon_1 FROM mytable') s = select([table1.c.myid]).as_scalar() self.assert_compile(select([table2, s]), 'SELECT myothertable.otherid, ' 'myothertable.othername, (SELECT ' 'mytable.myid FROM mytable) AS anon_1 FROM ' 'myothertable') s = select([table1.c.myid]).correlate(None).as_scalar() self.assert_compile(select([table1, s]), 'SELECT mytable.myid, mytable.name, ' 'mytable.description, (SELECT mytable.myid ' 'FROM mytable) AS anon_1 FROM mytable') s = select([table1.c.myid]).as_scalar() s2 = s.where(table1.c.myid == 5) self.assert_compile( s2, "(SELECT mytable.myid FROM mytable WHERE mytable.myid = :myid_1)" ) self.assert_compile( s, "(SELECT mytable.myid FROM mytable)" ) # test that aliases use as_scalar() when used in an explicitly # scalar context s = select([table1.c.myid]).alias() self.assert_compile(select([table1.c.myid]).where(table1.c.myid == s), 'SELECT mytable.myid FROM mytable WHERE ' 'mytable.myid = (SELECT mytable.myid FROM ' 'mytable)') self.assert_compile(select([table1.c.myid]).where(s > table1.c.myid), 'SELECT mytable.myid FROM mytable WHERE ' 'mytable.myid < (SELECT mytable.myid FROM ' 'mytable)') s = select([table1.c.myid]).as_scalar() self.assert_compile(select([table2, s]), 'SELECT myothertable.otherid, ' 'myothertable.othername, (SELECT ' 'mytable.myid FROM mytable) AS anon_1 FROM ' 'myothertable') # test expressions against scalar selects self.assert_compile(select([s - literal(8)]), 'SELECT (SELECT mytable.myid FROM mytable) ' '- :param_1 AS anon_1') self.assert_compile(select([select([table1.c.name]).as_scalar() + literal('x')]), 'SELECT (SELECT mytable.name FROM mytable) ' '|| :param_1 AS anon_1') self.assert_compile(select([s > literal(8)]), 'SELECT (SELECT mytable.myid FROM mytable) ' '> :param_1 AS anon_1') self.assert_compile(select([select([table1.c.name]).label('foo' )]), 'SELECT (SELECT mytable.name FROM mytable) ' 'AS foo') # scalar selects should not have any attributes on their 'c' or # 'columns' attribute s = select([table1.c.myid]).as_scalar() try: s.c.foo except exc.InvalidRequestError as err: assert str(err) \ == 'Scalar Select expression has no columns; use this '\ 'object directly within a column-level expression.' try: s.columns.foo except exc.InvalidRequestError as err: assert str(err) \ == 'Scalar Select expression has no columns; use this '\ 'object directly within a column-level expression.' zips = table('zips', column('zipcode'), column('latitude'), column('longitude'), ) places = table('places', column('id'), column('nm') ) zip = '12345' qlat = select([zips.c.latitude], zips.c.zipcode == zip).\ correlate(None).as_scalar() qlng = select([zips.c.longitude], zips.c.zipcode == zip).\ correlate(None).as_scalar() q = select([places.c.id, places.c.nm, zips.c.zipcode, func.latlondist(qlat, qlng).label('dist')], zips.c.zipcode == zip, order_by=['dist', places.c.nm] ) self.assert_compile(q, 'SELECT places.id, places.nm, ' 'zips.zipcode, latlondist((SELECT ' 'zips.latitude FROM zips WHERE ' 'zips.zipcode = :zipcode_1), (SELECT ' 'zips.longitude FROM zips WHERE ' 'zips.zipcode = :zipcode_2)) AS dist FROM ' 'places, zips WHERE zips.zipcode = ' ':zipcode_3 ORDER BY dist, places.nm') zalias = zips.alias('main_zip') qlat = select([zips.c.latitude], zips.c.zipcode == zalias.c.zipcode).\ as_scalar() qlng = select([zips.c.longitude], zips.c.zipcode == zalias.c.zipcode).\ as_scalar() q = select([places.c.id, places.c.nm, zalias.c.zipcode, func.latlondist(qlat, qlng).label('dist')], order_by=['dist', places.c.nm]) self.assert_compile(q, 'SELECT places.id, places.nm, ' 'main_zip.zipcode, latlondist((SELECT ' 'zips.latitude FROM zips WHERE ' 'zips.zipcode = main_zip.zipcode), (SELECT ' 'zips.longitude FROM zips WHERE ' 'zips.zipcode = main_zip.zipcode)) AS dist ' 'FROM places, zips AS main_zip ORDER BY ' 'dist, places.nm') a1 = table2.alias('t2alias') s1 = select([a1.c.otherid], table1.c.myid == a1.c.otherid).as_scalar() j1 = table1.join(table2, table1.c.myid == table2.c.otherid) s2 = select([table1, s1], from_obj=j1) self.assert_compile(s2, 'SELECT mytable.myid, mytable.name, ' 'mytable.description, (SELECT ' 't2alias.otherid FROM myothertable AS ' 't2alias WHERE mytable.myid = ' 't2alias.otherid) AS anon_1 FROM mytable ' 'JOIN myothertable ON mytable.myid = ' 'myothertable.otherid') def test_label_comparison_one(self): x = func.lala(table1.c.myid).label('foo') self.assert_compile(select([x], x == 5), 'SELECT lala(mytable.myid) AS foo FROM ' 'mytable WHERE lala(mytable.myid) = ' ':param_1') def test_label_comparison_two(self): self.assert_compile( label('bar', column('foo', type_=String)) + 'foo', 'foo || :param_1') def test_order_by_labels_enabled(self): lab1 = (table1.c.myid + 12).label('foo') lab2 = func.somefunc(table1.c.name).label('bar') dialect = default.DefaultDialect() self.assert_compile(select([lab1, lab2]).order_by(lab1, desc(lab2)), "SELECT mytable.myid + :myid_1 AS foo, " "somefunc(mytable.name) AS bar FROM mytable " "ORDER BY foo, bar DESC", dialect=dialect ) # the function embedded label renders as the function self.assert_compile( select([lab1, lab2]).order_by(func.hoho(lab1), desc(lab2)), "SELECT mytable.myid + :myid_1 AS foo, " "somefunc(mytable.name) AS bar FROM mytable " "ORDER BY hoho(mytable.myid + :myid_1), bar DESC", dialect=dialect ) # binary expressions render as the expression without labels self.assert_compile(select([lab1, lab2]).order_by(lab1 + "test"), "SELECT mytable.myid + :myid_1 AS foo, " "somefunc(mytable.name) AS bar FROM mytable " "ORDER BY mytable.myid + :myid_1 + :param_1", dialect=dialect ) # labels within functions in the columns clause render # with the expression self.assert_compile( select([lab1, func.foo(lab1)]).order_by(lab1, func.foo(lab1)), "SELECT mytable.myid + :myid_1 AS foo, " "foo(mytable.myid + :myid_1) AS foo_1 FROM mytable " "ORDER BY foo, foo(mytable.myid + :myid_1)", dialect=dialect ) lx = (table1.c.myid + table1.c.myid).label('lx') ly = (func.lower(table1.c.name) + table1.c.description).label('ly') self.assert_compile( select([lx, ly]).order_by(lx, ly.desc()), "SELECT mytable.myid + mytable.myid AS lx, " "lower(mytable.name) || mytable.description AS ly " "FROM mytable ORDER BY lx, ly DESC", dialect=dialect ) def test_order_by_labels_disabled(self): lab1 = (table1.c.myid + 12).label('foo') lab2 = func.somefunc(table1.c.name).label('bar') dialect = default.DefaultDialect() dialect.supports_simple_order_by_label = False self.assert_compile( select( [ lab1, lab2]).order_by( lab1, desc(lab2)), "SELECT mytable.myid + :myid_1 AS foo, " "somefunc(mytable.name) AS bar FROM mytable " "ORDER BY mytable.myid + :myid_1, somefunc(mytable.name) DESC", dialect=dialect) self.assert_compile( select([lab1, lab2]).order_by(func.hoho(lab1), desc(lab2)), "SELECT mytable.myid + :myid_1 AS foo, " "somefunc(mytable.name) AS bar FROM mytable " "ORDER BY hoho(mytable.myid + :myid_1), " "somefunc(mytable.name) DESC", dialect=dialect ) def test_no_group_by_labels(self): lab1 = (table1.c.myid + 12).label('foo') lab2 = func.somefunc(table1.c.name).label('bar') dialect = default.DefaultDialect() self.assert_compile( select([lab1, lab2]).group_by(lab1, lab2), "SELECT mytable.myid + :myid_1 AS foo, somefunc(mytable.name) " "AS bar FROM mytable GROUP BY mytable.myid + :myid_1, " "somefunc(mytable.name)", dialect=dialect ) def test_conjunctions(self): a, b, c = text('a'), text('b'), text('c') x = and_(a, b, c) assert isinstance(x.type, Boolean) assert str(x) == 'a AND b AND c' self.assert_compile( select([x.label('foo')]), 'SELECT a AND b AND c AS foo' ) self.assert_compile( and_(table1.c.myid == 12, table1.c.name == 'asdf', table2.c.othername == 'foo', text("sysdate() = today()")), "mytable.myid = :myid_1 AND mytable.name = :name_1 " "AND myothertable.othername = " ":othername_1 AND sysdate() = today()" ) self.assert_compile( and_( table1.c.myid == 12, or_(table2.c.othername == 'asdf', table2.c.othername == 'foo', table2.c.otherid == 9), text("sysdate() = today()"), ), 'mytable.myid = :myid_1 AND (myothertable.othername = ' ':othername_1 OR myothertable.othername = :othername_2 OR ' 'myothertable.otherid = :otherid_1) AND sysdate() = ' 'today()', checkparams={'othername_1': 'asdf', 'othername_2': 'foo', 'otherid_1': 9, 'myid_1': 12} ) # test a generator self.assert_compile( and_( conj for conj in [ table1.c.myid == 12, table1.c.name == 'asdf' ] ), "mytable.myid = :myid_1 AND mytable.name = :name_1" ) def test_nested_conjunctions_short_circuit(self): """test that empty or_(), and_() conjunctions are collapsed by an enclosing conjunction.""" t = table('t', column('x')) self.assert_compile( select([t]).where(and_(t.c.x == 5, or_(and_(or_(t.c.x == 7))))), "SELECT t.x FROM t WHERE t.x = :x_1 AND t.x = :x_2" ) self.assert_compile( select([t]).where(and_(or_(t.c.x == 12, and_(or_(t.c.x == 8))))), "SELECT t.x FROM t WHERE t.x = :x_1 OR t.x = :x_2" ) self.assert_compile( select([t]). where( and_( or_( or_(t.c.x == 12), and_( or_(), or_(and_(t.c.x == 8)), and_() ) ) ) ), "SELECT t.x FROM t WHERE t.x = :x_1 OR t.x = :x_2" ) def test_true_short_circuit(self): t = table('t', column('x')) self.assert_compile( select([t]).where(true()), "SELECT t.x FROM t WHERE 1 = 1", dialect=default.DefaultDialect(supports_native_boolean=False) ) self.assert_compile( select([t]).where(true()), "SELECT t.x FROM t WHERE true", dialect=default.DefaultDialect(supports_native_boolean=True) ) self.assert_compile( select([t]), "SELECT t.x FROM t", dialect=default.DefaultDialect(supports_native_boolean=True) ) def test_distinct(self): self.assert_compile( select([table1.c.myid.distinct()]), "SELECT DISTINCT mytable.myid FROM mytable" ) self.assert_compile( select([distinct(table1.c.myid)]), "SELECT DISTINCT mytable.myid FROM mytable" ) self.assert_compile( select([table1.c.myid]).distinct(), "SELECT DISTINCT mytable.myid FROM mytable" ) self.assert_compile( select([func.count(table1.c.myid.distinct())]), "SELECT count(DISTINCT mytable.myid) AS count_1 FROM mytable" ) self.assert_compile( select([func.count(distinct(table1.c.myid))]), "SELECT count(DISTINCT mytable.myid) AS count_1 FROM mytable" ) def test_where_empty(self): self.assert_compile( select([table1.c.myid]).where(and_()), "SELECT mytable.myid FROM mytable" ) self.assert_compile( select([table1.c.myid]).where(or_()), "SELECT mytable.myid FROM mytable" ) def test_multiple_col_binds(self): self.assert_compile( select( [literal_column("*")], or_( table1.c.myid == 12, table1.c.myid == 'asdf', table1.c.myid == 'foo') ), "SELECT * FROM mytable WHERE mytable.myid = :myid_1 " "OR mytable.myid = :myid_2 OR mytable.myid = :myid_3" ) def test_order_by_nulls(self): self.assert_compile( table2.select(order_by=[table2.c.otherid, table2.c.othername.desc().nullsfirst()]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid, " "myothertable.othername DESC NULLS FIRST" ) self.assert_compile( table2.select(order_by=[ table2.c.otherid, table2.c.othername.desc().nullslast()]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid, " "myothertable.othername DESC NULLS LAST" ) self.assert_compile( table2.select(order_by=[ table2.c.otherid.nullslast(), table2.c.othername.desc().nullsfirst()]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid NULLS LAST, " "myothertable.othername DESC NULLS FIRST" ) self.assert_compile( table2.select(order_by=[table2.c.otherid.nullsfirst(), table2.c.othername.desc()]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid NULLS FIRST, " "myothertable.othername DESC" ) self.assert_compile( table2.select(order_by=[table2.c.otherid.nullsfirst(), table2.c.othername.desc().nullslast()]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid NULLS FIRST, " "myothertable.othername DESC NULLS LAST" ) def test_orderby_groupby(self): self.assert_compile( table2.select(order_by=[table2.c.otherid, asc(table2.c.othername)]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid, " "myothertable.othername ASC" ) self.assert_compile( table2.select(order_by=[table2.c.otherid, table2.c.othername.desc()]), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid, " "myothertable.othername DESC" ) # generative order_by self.assert_compile( table2.select().order_by(table2.c.otherid). order_by(table2.c.othername.desc()), "SELECT myothertable.otherid, myothertable.othername FROM " "myothertable ORDER BY myothertable.otherid, " "myothertable.othername DESC" ) self.assert_compile( table2.select().order_by(table2.c.otherid). order_by(table2.c.othername.desc() ).order_by(None), "SELECT myothertable.otherid, myothertable.othername " "FROM myothertable" ) self.assert_compile( select( [table2.c.othername, func.count(table2.c.otherid)], group_by=[table2.c.othername]), "SELECT myothertable.othername, " "count(myothertable.otherid) AS count_1 " "FROM myothertable GROUP BY myothertable.othername" ) # generative group by self.assert_compile( select([table2.c.othername, func.count(table2.c.otherid)]). group_by(table2.c.othername), "SELECT myothertable.othername, " "count(myothertable.otherid) AS count_1 " "FROM myothertable GROUP BY myothertable.othername" ) self.assert_compile( select([table2.c.othername, func.count(table2.c.otherid)]). group_by(table2.c.othername).group_by(None), "SELECT myothertable.othername, " "count(myothertable.otherid) AS count_1 " "FROM myothertable" ) self.assert_compile( select([table2.c.othername, func.count(table2.c.otherid)], group_by=[table2.c.othername], order_by=[table2.c.othername]), "SELECT myothertable.othername, " "count(myothertable.otherid) AS count_1 " "FROM myothertable " "GROUP BY myothertable.othername ORDER BY myothertable.othername" ) def test_for_update(self): self.assert_compile( table1.select(table1.c.myid == 7).with_for_update(), "SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable WHERE mytable.myid = :myid_1 FOR UPDATE") # not supported by dialect, should just use update self.assert_compile( table1.select(table1.c.myid == 7).with_for_update(nowait=True), "SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable WHERE mytable.myid = :myid_1 FOR UPDATE") assert_raises_message( exc.ArgumentError, "Unknown for_update argument: 'unknown_mode'", table1.select, table1.c.myid == 7, for_update='unknown_mode' ) def test_alias(self): # test the alias for a table1. column names stay the same, # table name "changes" to "foo". self.assert_compile( select([table1.alias('foo')]), "SELECT foo.myid, foo.name, foo.description FROM mytable AS foo") for dialect in (oracle.dialect(),): self.assert_compile( select([table1.alias('foo')]), "SELECT foo.myid, foo.name, foo.description FROM mytable foo", dialect=dialect) self.assert_compile( select([table1.alias()]), "SELECT mytable_1.myid, mytable_1.name, mytable_1.description " "FROM mytable AS mytable_1") # create a select for a join of two tables. use_labels # means the column names will have labels tablename_columnname, # which become the column keys accessible off the Selectable object. # also, only use one column from the second table and all columns # from the first table1. q = select( [table1, table2.c.otherid], table1.c.myid == table2.c.otherid, use_labels=True ) # make an alias of the "selectable". column names # stay the same (i.e. the labels), table name "changes" to "t2view". a = alias(q, 't2view') # select from that alias, also using labels. two levels of labels # should produce two underscores. # also, reference the column "mytable_myid" off of the t2view alias. self.assert_compile( a.select(a.c.mytable_myid == 9, use_labels=True), "SELECT t2view.mytable_myid AS t2view_mytable_myid, " "t2view.mytable_name " "AS t2view_mytable_name, " "t2view.mytable_description AS t2view_mytable_description, " "t2view.myothertable_otherid AS t2view_myothertable_otherid FROM " "(SELECT mytable.myid AS mytable_myid, " "mytable.name AS mytable_name, " "mytable.description AS mytable_description, " "myothertable.otherid AS " "myothertable_otherid FROM mytable, myothertable " "WHERE mytable.myid = " "myothertable.otherid) AS t2view " "WHERE t2view.mytable_myid = :mytable_myid_1" ) def test_prefix(self): self.assert_compile( table1.select().prefix_with("SQL_CALC_FOUND_ROWS"). prefix_with("SQL_SOME_WEIRD_MYSQL_THING"), "SELECT SQL_CALC_FOUND_ROWS SQL_SOME_WEIRD_MYSQL_THING " "mytable.myid, mytable.name, mytable.description FROM mytable" ) def test_prefix_dialect_specific(self): self.assert_compile( table1.select().prefix_with("SQL_CALC_FOUND_ROWS", dialect='sqlite'). prefix_with("SQL_SOME_WEIRD_MYSQL_THING", dialect='mysql'), "SELECT SQL_SOME_WEIRD_MYSQL_THING " "mytable.myid, mytable.name, mytable.description FROM mytable", dialect=mysql.dialect() ) @testing.emits_warning('.*empty sequence.*') def test_render_binds_as_literal(self): """test a compiler that renders binds inline into SQL in the columns clause.""" dialect = default.DefaultDialect() class Compiler(dialect.statement_compiler): ansi_bind_rules = True dialect.statement_compiler = Compiler self.assert_compile( select([literal("someliteral")]), "SELECT 'someliteral' AS anon_1", dialect=dialect ) self.assert_compile( select([table1.c.myid + 3]), "SELECT mytable.myid + 3 AS anon_1 FROM mytable", dialect=dialect ) self.assert_compile( select([table1.c.myid.in_([4, 5, 6])]), "SELECT mytable.myid IN (4, 5, 6) AS anon_1 FROM mytable", dialect=dialect ) self.assert_compile( select([func.mod(table1.c.myid, 5)]), "SELECT mod(mytable.myid, 5) AS mod_1 FROM mytable", dialect=dialect ) self.assert_compile( select([literal("foo").in_([])]), "SELECT 'foo' != 'foo' AS anon_1", dialect=dialect ) self.assert_compile( select([literal(util.b("foo"))]), "SELECT 'foo' AS anon_1", dialect=dialect ) # test callable self.assert_compile( select([table1.c.myid == bindparam("foo", callable_=lambda: 5)]), "SELECT mytable.myid = 5 AS anon_1 FROM mytable", dialect=dialect ) assert_raises_message( exc.CompileError, "Bind parameter 'foo' without a " "renderable value not allowed here.", bindparam("foo").in_( []).compile, dialect=dialect) def test_literal(self): self.assert_compile(select([literal('foo')]), "SELECT :param_1 AS anon_1") self.assert_compile( select( [ literal("foo") + literal("bar")], from_obj=[table1]), "SELECT :param_1 || :param_2 AS anon_1 FROM mytable") def test_calculated_columns(self): value_tbl = table('values', column('id', Integer), column('val1', Float), column('val2', Float), ) self.assert_compile( select([value_tbl.c.id, (value_tbl.c.val2 - value_tbl.c.val1) / value_tbl.c.val1]), "SELECT values.id, (values.val2 - values.val1) " "/ values.val1 AS anon_1 FROM values" ) self.assert_compile( select([ value_tbl.c.id], (value_tbl.c.val2 - value_tbl.c.val1) / value_tbl.c.val1 > 2.0), "SELECT values.id FROM values WHERE " "(values.val2 - values.val1) / values.val1 > :param_1" ) self.assert_compile( select([value_tbl.c.id], value_tbl.c.val1 / (value_tbl.c.val2 - value_tbl.c.val1) / value_tbl.c.val1 > 2.0), "SELECT values.id FROM values WHERE " "(values.val1 / (values.val2 - values.val1)) " "/ values.val1 > :param_1" ) def test_percent_chars(self): t = table("table%name", column("percent%"), column("%(oneofthese)s"), column("spaces % more spaces"), ) self.assert_compile( t.select(use_labels=True), '''SELECT "table%name"."percent%" AS "table%name_percent%", ''' '''"table%name"."%(oneofthese)s" AS ''' '''"table%name_%(oneofthese)s", ''' '''"table%name"."spaces % more spaces" AS ''' '''"table%name_spaces % ''' '''more spaces" FROM "table%name"''' ) def test_joins(self): self.assert_compile( join(table2, table1, table1.c.myid == table2.c.otherid).select(), "SELECT myothertable.otherid, myothertable.othername, " "mytable.myid, mytable.name, mytable.description FROM " "myothertable JOIN mytable ON mytable.myid = myothertable.otherid" ) self.assert_compile( select( [table1], from_obj=[join(table1, table2, table1.c.myid == table2.c.otherid)] ), "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable JOIN myothertable ON mytable.myid = myothertable.otherid") self.assert_compile( select( [join(join(table1, table2, table1.c.myid == table2.c.otherid), table3, table1.c.myid == table3.c.userid)] ), "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername, " "thirdtable.userid, " "thirdtable.otherstuff FROM mytable JOIN myothertable " "ON mytable.myid =" " myothertable.otherid JOIN thirdtable ON " "mytable.myid = thirdtable.userid" ) self.assert_compile( join(users, addresses, users.c.user_id == addresses.c.user_id).select(), "SELECT users.user_id, users.user_name, users.password, " "addresses.address_id, addresses.user_id, addresses.street, " "addresses.city, addresses.state, addresses.zip " "FROM users JOIN addresses " "ON users.user_id = addresses.user_id" ) self.assert_compile( select([table1, table2, table3], from_obj=[join(table1, table2, table1.c.myid == table2.c.otherid). outerjoin(table3, table1.c.myid == table3.c.userid)] ), "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername, " "thirdtable.userid," " thirdtable.otherstuff FROM mytable " "JOIN myothertable ON mytable.myid " "= myothertable.otherid LEFT OUTER JOIN thirdtable " "ON mytable.myid =" " thirdtable.userid" ) self.assert_compile( select([table1, table2, table3], from_obj=[outerjoin(table1, join(table2, table3, table2.c.otherid == table3.c.userid), table1.c.myid == table2.c.otherid)] ), "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername, " "thirdtable.userid," " thirdtable.otherstuff FROM mytable LEFT OUTER JOIN " "(myothertable " "JOIN thirdtable ON myothertable.otherid = " "thirdtable.userid) ON " "mytable.myid = myothertable.otherid" ) query = select( [table1, table2], or_( table1.c.name == 'fred', table1.c.myid == 10, table2.c.othername != 'jack', text("EXISTS (select yay from foo where boo = lar)") ), from_obj=[outerjoin(table1, table2, table1.c.myid == table2.c.otherid)] ) self.assert_compile( query, "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername " "FROM mytable LEFT OUTER JOIN myothertable ON mytable.myid = " "myothertable.otherid WHERE mytable.name = :name_1 OR " "mytable.myid = :myid_1 OR myothertable.othername != :othername_1 " "OR EXISTS (select yay from foo where boo = lar)", ) def test_full_outer_join(self): for spec in [ join(table1, table2, table1.c.myid == table2.c.otherid, full=True), outerjoin( table1, table2, table1.c.myid == table2.c.otherid, full=True), table1.join( table2, table1.c.myid == table2.c.otherid, full=True), table1.outerjoin( table2, table1.c.myid == table2.c.otherid, full=True), ]: stmt = select([table1]).select_from(spec) self.assert_compile( stmt, "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable FULL OUTER JOIN myothertable " "ON mytable.myid = myothertable.otherid") def test_compound_selects(self): assert_raises_message( exc.ArgumentError, "All selectables passed to CompoundSelect " "must have identical numbers of columns; " "select #1 has 2 columns, select #2 has 3", union, table3.select(), table1.select() ) x = union( select([table1], table1.c.myid == 5), select([table1], table1.c.myid == 12), order_by=[table1.c.myid], ) self.assert_compile( x, "SELECT mytable.myid, mytable.name, " "mytable.description " "FROM mytable WHERE " "mytable.myid = :myid_1 UNION " "SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable WHERE mytable.myid = :myid_2 " "ORDER BY mytable.myid") x = union( select([table1]), select([table1]) ) x = union(x, select([table1])) self.assert_compile( x, "(SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable UNION SELECT mytable.myid, mytable.name, " "mytable.description FROM mytable) UNION SELECT mytable.myid," " mytable.name, mytable.description FROM mytable") u1 = union( select([table1.c.myid, table1.c.name]), select([table2]), select([table3]) ) self.assert_compile( u1, "SELECT mytable.myid, mytable.name " "FROM mytable UNION SELECT myothertable.otherid, " "myothertable.othername FROM myothertable " "UNION SELECT thirdtable.userid, thirdtable.otherstuff " "FROM thirdtable") assert u1.corresponding_column(table2.c.otherid) is u1.c.myid self.assert_compile( union( select([table1.c.myid, table1.c.name]), select([table2]), order_by=['myid'], offset=10, limit=5 ), "SELECT mytable.myid, mytable.name " "FROM mytable UNION SELECT myothertable.otherid, " "myothertable.othername " "FROM myothertable ORDER BY myid " # note table name is omitted "LIMIT :param_1 OFFSET :param_2", {'param_1': 5, 'param_2': 10} ) self.assert_compile( union( select([table1.c.myid, table1.c.name, func.max(table1.c.description)], table1.c.name == 'name2', group_by=[table1.c.myid, table1.c.name]), table1.select(table1.c.name == 'name1') ), "SELECT mytable.myid, mytable.name, " "max(mytable.description) AS max_1 " "FROM mytable WHERE mytable.name = :name_1 " "GROUP BY mytable.myid, " "mytable.name UNION SELECT mytable.myid, mytable.name, " "mytable.description " "FROM mytable WHERE mytable.name = :name_2" ) self.assert_compile( union( select([literal(100).label('value')]), select([literal(200).label('value')]) ), "SELECT :param_1 AS value UNION SELECT :param_2 AS value" ) self.assert_compile( union_all( select([table1.c.myid]), union( select([table2.c.otherid]), select([table3.c.userid]), ) ), "SELECT mytable.myid FROM mytable UNION ALL " "(SELECT myothertable.otherid FROM myothertable UNION " "SELECT thirdtable.userid FROM thirdtable)" ) s = select([column('foo'), column('bar')]) self.assert_compile( union( s.order_by("foo"), s.order_by("bar")), "(SELECT foo, bar ORDER BY foo) UNION " "(SELECT foo, bar ORDER BY bar)") self.assert_compile( union(s.order_by("foo").self_group(), s.order_by("bar").limit(10).self_group()), "(SELECT foo, bar ORDER BY foo) UNION (SELECT foo, " "bar ORDER BY bar LIMIT :param_1)", {'param_1': 10} ) def test_compound_grouping(self): s = select([column('foo'), column('bar')]).select_from(text('bat')) self.assert_compile( union(union(union(s, s), s), s), "((SELECT foo, bar FROM bat UNION SELECT foo, bar FROM bat) " "UNION SELECT foo, bar FROM bat) UNION SELECT foo, bar FROM bat" ) self.assert_compile( union(s, s, s, s), "SELECT foo, bar FROM bat UNION SELECT foo, bar " "FROM bat UNION SELECT foo, bar FROM bat " "UNION SELECT foo, bar FROM bat" ) self.assert_compile( union(s, union(s, union(s, s))), "SELECT foo, bar FROM bat UNION (SELECT foo, bar FROM bat " "UNION (SELECT foo, bar FROM bat " "UNION SELECT foo, bar FROM bat))" ) self.assert_compile( select([s.alias()]), 'SELECT anon_1.foo, anon_1.bar FROM ' '(SELECT foo, bar FROM bat) AS anon_1' ) self.assert_compile( select([union(s, s).alias()]), 'SELECT anon_1.foo, anon_1.bar FROM ' '(SELECT foo, bar FROM bat UNION ' 'SELECT foo, bar FROM bat) AS anon_1' ) self.assert_compile( select([except_(s, s).alias()]), 'SELECT anon_1.foo, anon_1.bar FROM ' '(SELECT foo, bar FROM bat EXCEPT ' 'SELECT foo, bar FROM bat) AS anon_1' ) # this query sqlite specifically chokes on self.assert_compile( union( except_(s, s), s ), "(SELECT foo, bar FROM bat EXCEPT SELECT foo, bar FROM bat) " "UNION SELECT foo, bar FROM bat" ) self.assert_compile( union( s, except_(s, s), ), "SELECT foo, bar FROM bat " "UNION (SELECT foo, bar FROM bat EXCEPT SELECT foo, bar FROM bat)" ) # this solves it self.assert_compile( union( except_(s, s).alias().select(), s ), "SELECT anon_1.foo, anon_1.bar FROM " "(SELECT foo, bar FROM bat EXCEPT " "SELECT foo, bar FROM bat) AS anon_1 " "UNION SELECT foo, bar FROM bat" ) self.assert_compile( except_( union(s, s), union(s, s) ), "(SELECT foo, bar FROM bat UNION SELECT foo, bar FROM bat) " "EXCEPT (SELECT foo, bar FROM bat UNION SELECT foo, bar FROM bat)" ) s2 = union(s, s) s3 = union(s2, s2) self.assert_compile(s3, "(SELECT foo, bar FROM bat " "UNION SELECT foo, bar FROM bat) " "UNION (SELECT foo, bar FROM bat " "UNION SELECT foo, bar FROM bat)") self.assert_compile( union( intersect(s, s), intersect(s, s) ), "(SELECT foo, bar FROM bat INTERSECT SELECT foo, bar FROM bat) " "UNION (SELECT foo, bar FROM bat INTERSECT " "SELECT foo, bar FROM bat)" ) # tests for [ticket:2528] # sqlite hates all of these. self.assert_compile( union( s.limit(1), s.offset(2) ), "(SELECT foo, bar FROM bat LIMIT :param_1) " "UNION (SELECT foo, bar FROM bat LIMIT -1 OFFSET :param_2)" ) self.assert_compile( union( s.order_by(column('bar')), s.offset(2) ), "(SELECT foo, bar FROM bat ORDER BY bar) " "UNION (SELECT foo, bar FROM bat LIMIT -1 OFFSET :param_1)" ) self.assert_compile( union( s.limit(1).alias('a'), s.limit(2).alias('b') ), "(SELECT foo, bar FROM bat LIMIT :param_1) " "UNION (SELECT foo, bar FROM bat LIMIT :param_2)" ) self.assert_compile( union( s.limit(1).self_group(), s.limit(2).self_group() ), "(SELECT foo, bar FROM bat LIMIT :param_1) " "UNION (SELECT foo, bar FROM bat LIMIT :param_2)" ) self.assert_compile( union(s.limit(1), s.limit(2).offset(3)).alias().select(), "SELECT anon_1.foo, anon_1.bar FROM " "((SELECT foo, bar FROM bat LIMIT :param_1) " "UNION (SELECT foo, bar FROM bat LIMIT :param_2 OFFSET :param_3)) " "AS anon_1" ) # this version works for SQLite self.assert_compile( union( s.limit(1).alias().select(), s.offset(2).alias().select(), ), "SELECT anon_1.foo, anon_1.bar " "FROM (SELECT foo, bar FROM bat" " LIMIT :param_1) AS anon_1 " "UNION SELECT anon_2.foo, anon_2.bar " "FROM (SELECT foo, bar " "FROM bat" " LIMIT -1 OFFSET :param_2) AS anon_2" ) def test_binds(self): for ( stmt, expected_named_stmt, expected_positional_stmt, expected_default_params_dict, expected_default_params_list, test_param_dict, expected_test_params_dict, expected_test_params_list ) in [ ( select( [table1, table2], and_( table1.c.myid == table2.c.otherid, table1.c.name == bindparam('mytablename') )), "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername FROM mytable, " "myothertable WHERE mytable.myid = myothertable.otherid " "AND mytable.name = :mytablename", "SELECT mytable.myid, mytable.name, mytable.description, " "myothertable.otherid, myothertable.othername FROM mytable, " "myothertable WHERE mytable.myid = myothertable.otherid AND " "mytable.name = ?", {'mytablename': None}, [None], {'mytablename': 5}, {'mytablename': 5}, [5] ), ( select([table1], or_(table1.c.myid == bindparam('myid'), table2.c.otherid == bindparam('myid'))), "SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable, myothertable WHERE mytable.myid = :myid " "OR myothertable.otherid = :myid", "SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable, myothertable WHERE mytable.myid = ? " "OR myothertable.otherid = ?", {'myid': None}, [None, None], {'myid': 5}, {'myid': 5}, [5, 5] ), ( text("SELECT mytable.myid, mytable.name, " "mytable.description FROM " "mytable, myothertable WHERE mytable.myid = :myid OR " "myothertable.otherid = :myid"), "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = :myid OR " "myothertable.otherid = :myid", "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = ? OR " "myothertable.otherid = ?", {'myid': None}, [None, None], {'myid': 5}, {'myid': 5}, [5, 5] ), ( select([table1], or_(table1.c.myid == bindparam('myid', unique=True), table2.c.otherid == bindparam('myid', unique=True))), "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = " ":myid_1 OR myothertable.otherid = :myid_2", "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = ? " "OR myothertable.otherid = ?", {'myid_1': None, 'myid_2': None}, [None, None], {'myid_1': 5, 'myid_2': 6}, {'myid_1': 5, 'myid_2': 6}, [5, 6] ), ( bindparam('test', type_=String, required=False) + text("'hi'"), ":test || 'hi'", "? || 'hi'", {'test': None}, [None], {}, {'test': None}, [None] ), ( # testing select.params() here - bindparam() objects # must get required flag set to False select( [table1], or_( table1.c.myid == bindparam('myid'), table2.c.otherid == bindparam('myotherid') )).params({'myid': 8, 'myotherid': 7}), "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = " ":myid OR myothertable.otherid = :myotherid", "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = " "? OR myothertable.otherid = ?", {'myid': 8, 'myotherid': 7}, [8, 7], {'myid': 5}, {'myid': 5, 'myotherid': 7}, [5, 7] ), ( select([table1], or_(table1.c.myid == bindparam('myid', value=7, unique=True), table2.c.otherid == bindparam('myid', value=8, unique=True))), "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = " ":myid_1 OR myothertable.otherid = :myid_2", "SELECT mytable.myid, mytable.name, mytable.description FROM " "mytable, myothertable WHERE mytable.myid = " "? OR myothertable.otherid = ?", {'myid_1': 7, 'myid_2': 8}, [7, 8], {'myid_1': 5, 'myid_2': 6}, {'myid_1': 5, 'myid_2': 6}, [5, 6] ), ]: self.assert_compile(stmt, expected_named_stmt, params=expected_default_params_dict) self.assert_compile(stmt, expected_positional_stmt, dialect=sqlite.dialect()) nonpositional = stmt.compile() positional = stmt.compile(dialect=sqlite.dialect()) pp = positional.params eq_([pp[k] for k in positional.positiontup], expected_default_params_list) eq_(nonpositional.construct_params(test_param_dict), expected_test_params_dict) pp = positional.construct_params(test_param_dict) eq_( [pp[k] for k in positional.positiontup], expected_test_params_list ) # check that params() doesn't modify original statement s = select([table1], or_(table1.c.myid == bindparam('myid'), table2.c.otherid == bindparam('myotherid'))) s2 = s.params({'myid': 8, 'myotherid': 7}) s3 = s2.params({'myid': 9}) assert s.compile().params == {'myid': None, 'myotherid': None} assert s2.compile().params == {'myid': 8, 'myotherid': 7} assert s3.compile().params == {'myid': 9, 'myotherid': 7} # test using same 'unique' param object twice in one compile s = select([table1.c.myid]).where(table1.c.myid == 12).as_scalar() s2 = select([table1, s], table1.c.myid == s) self.assert_compile( s2, "SELECT mytable.myid, mytable.name, mytable.description, " "(SELECT mytable.myid FROM mytable WHERE mytable.myid = " ":myid_1) AS anon_1 FROM mytable WHERE mytable.myid = " "(SELECT mytable.myid FROM mytable WHERE mytable.myid = :myid_1)") positional = s2.compile(dialect=sqlite.dialect()) pp = positional.params assert [pp[k] for k in positional.positiontup] == [12, 12] # check that conflicts with "unique" params are caught s = select([table1], or_(table1.c.myid == 7, table1.c.myid == bindparam('myid_1'))) assert_raises_message(exc.CompileError, "conflicts with unique bind parameter " "of the same name", str, s) s = select([table1], or_(table1.c.myid == 7, table1.c.myid == 8, table1.c.myid == bindparam('myid_1'))) assert_raises_message(exc.CompileError, "conflicts with unique bind parameter " "of the same name", str, s) def _test_binds_no_hash_collision(self): """test that construct_params doesn't corrupt dict due to hash collisions""" total_params = 100000 in_clause = [':in%d' % i for i in range(total_params)] params = dict(('in%d' % i, i) for i in range(total_params)) t = text('text clause %s' % ', '.join(in_clause)) eq_(len(t.bindparams), total_params) c = t.compile() pp = c.construct_params(params) eq_(len(set(pp)), total_params, '%s %s' % (len(set(pp)), len(pp))) eq_(len(set(pp.values())), total_params) def test_bind_as_col(self): t = table('foo', column('id')) s = select([t, literal('lala').label('hoho')]) self.assert_compile(s, "SELECT foo.id, :param_1 AS hoho FROM foo") assert [str(c) for c in s.c] == ["id", "hoho"] def test_bind_callable(self): expr = column('x') == bindparam("key", callable_=lambda: 12) self.assert_compile( expr, "x = :key", {'x': 12} ) def test_bind_params_missing(self): assert_raises_message( exc.InvalidRequestError, r"A value is required for bind parameter 'x'", select( [table1]).where( and_( table1.c.myid == bindparam("x", required=True), table1.c.name == bindparam("y", required=True) ) ).compile().construct_params, params=dict(y=5) ) assert_raises_message( exc.InvalidRequestError, r"A value is required for bind parameter 'x'", select( [table1]).where( table1.c.myid == bindparam( "x", required=True)).compile().construct_params) assert_raises_message( exc.InvalidRequestError, r"A value is required for bind parameter 'x', " "in parameter group 2", select( [table1]).where( and_( table1.c.myid == bindparam("x", required=True), table1.c.name == bindparam("y", required=True) ) ).compile().construct_params, params=dict(y=5), _group_number=2) assert_raises_message( exc.InvalidRequestError, r"A value is required for bind parameter 'x', " "in parameter group 2", select( [table1]).where( table1.c.myid == bindparam( "x", required=True)).compile().construct_params, _group_number=2) def test_tuple(self): self.assert_compile( tuple_(table1.c.myid, table1.c.name).in_( [(1, 'foo'), (5, 'bar')]), "(mytable.myid, mytable.name) IN " "((:param_1, :param_2), (:param_3, :param_4))" ) self.assert_compile( tuple_(table1.c.myid, table1.c.name).in_( [tuple_(table2.c.otherid, table2.c.othername)] ), "(mytable.myid, mytable.name) IN " "((myothertable.otherid, myothertable.othername))" ) self.assert_compile( tuple_(table1.c.myid, table1.c.name).in_( select([table2.c.otherid, table2.c.othername]) ), "(mytable.myid, mytable.name) IN (SELECT " "myothertable.otherid, myothertable.othername FROM myothertable)" ) def test_cast(self): tbl = table('casttest', column('id', Integer), column('v1', Float), column('v2', Float), column('ts', TIMESTAMP), ) def check_results(dialect, expected_results, literal): eq_(len(expected_results), 5, 'Incorrect number of expected results') eq_(str(cast(tbl.c.v1, Numeric).compile(dialect=dialect)), 'CAST(casttest.v1 AS %s)' % expected_results[0]) eq_(str(tbl.c.v1.cast(Numeric).compile(dialect=dialect)), 'CAST(casttest.v1 AS %s)' % expected_results[0]) eq_(str(cast(tbl.c.v1, Numeric(12, 9)).compile(dialect=dialect)), 'CAST(casttest.v1 AS %s)' % expected_results[1]) eq_(str(cast(tbl.c.ts, Date).compile(dialect=dialect)), 'CAST(casttest.ts AS %s)' % expected_results[2]) eq_(str(cast(1234, Text).compile(dialect=dialect)), 'CAST(%s AS %s)' % (literal, expected_results[3])) eq_(str(cast('test', String(20)).compile(dialect=dialect)), 'CAST(%s AS %s)' % (literal, expected_results[4])) # fixme: shoving all of this dialect-specific stuff in one test # is now officialy completely ridiculous AND non-obviously omits # coverage on other dialects. sel = select([tbl, cast(tbl.c.v1, Numeric)]).compile( dialect=dialect) if isinstance(dialect, type(mysql.dialect())): eq_(str(sel), "SELECT casttest.id, casttest.v1, casttest.v2, " "casttest.ts, " "CAST(casttest.v1 AS DECIMAL) AS anon_1 \nFROM casttest") else: eq_(str(sel), "SELECT casttest.id, casttest.v1, casttest.v2, " "casttest.ts, CAST(casttest.v1 AS NUMERIC) AS " "anon_1 \nFROM casttest") # first test with PostgreSQL engine check_results( postgresql.dialect(), [ 'NUMERIC', 'NUMERIC(12, 9)', 'DATE', 'TEXT', 'VARCHAR(20)'], '%(param_1)s') # then the Oracle engine check_results( oracle.dialect(), [ 'NUMERIC', 'NUMERIC(12, 9)', 'DATE', 'CLOB', 'VARCHAR2(20 CHAR)'], ':param_1') # then the sqlite engine check_results(sqlite.dialect(), ['NUMERIC', 'NUMERIC(12, 9)', 'DATE', 'TEXT', 'VARCHAR(20)'], '?') # then the MySQL engine check_results(mysql.dialect(), ['DECIMAL', 'DECIMAL(12, 9)', 'DATE', 'CHAR', 'CHAR(20)'], '%s') self.assert_compile(cast(text('NULL'), Integer), 'CAST(NULL AS INTEGER)', dialect=sqlite.dialect()) self.assert_compile(cast(null(), Integer), 'CAST(NULL AS INTEGER)', dialect=sqlite.dialect()) self.assert_compile(cast(literal_column('NULL'), Integer), 'CAST(NULL AS INTEGER)', dialect=sqlite.dialect()) def test_over(self): self.assert_compile( func.row_number().over(), "row_number() OVER ()" ) self.assert_compile( func.row_number().over( order_by=[table1.c.name, table1.c.description] ), "row_number() OVER (ORDER BY mytable.name, mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=[table1.c.name, table1.c.description] ), "row_number() OVER (PARTITION BY mytable.name, " "mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=[table1.c.name], order_by=[table1.c.description] ), "row_number() OVER (PARTITION BY mytable.name " "ORDER BY mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=table1.c.name, order_by=table1.c.description ), "row_number() OVER (PARTITION BY mytable.name " "ORDER BY mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=table1.c.name, order_by=[table1.c.name, table1.c.description] ), "row_number() OVER (PARTITION BY mytable.name " "ORDER BY mytable.name, mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=[], order_by=[table1.c.name, table1.c.description] ), "row_number() OVER (ORDER BY mytable.name, mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=[table1.c.name, table1.c.description], order_by=[] ), "row_number() OVER (PARTITION BY mytable.name, " "mytable.description)" ) self.assert_compile( func.row_number().over( partition_by=[], order_by=[] ), "row_number() OVER ()" ) self.assert_compile( select([func.row_number().over( order_by=table1.c.description ).label('foo')]), "SELECT row_number() OVER (ORDER BY mytable.description) " "AS foo FROM mytable" ) # test from_obj generation. # from func: self.assert_compile( select([ func.max(table1.c.name).over( partition_by=['description'] ) ]), "SELECT max(mytable.name) OVER (PARTITION BY mytable.description) " "AS anon_1 FROM mytable" ) # from partition_by self.assert_compile( select([ func.row_number().over( partition_by=[table1.c.name] ) ]), "SELECT row_number() OVER (PARTITION BY mytable.name) " "AS anon_1 FROM mytable" ) # from order_by self.assert_compile( select([ func.row_number().over( order_by=table1.c.name ) ]), "SELECT row_number() OVER (ORDER BY mytable.name) " "AS anon_1 FROM mytable" ) # this tests that _from_objects # concantenates OK self.assert_compile( select([column("x") + over(func.foo())]), "SELECT x + foo() OVER () AS anon_1" ) # test a reference to a label that in the referecned selectable; # this resolves expr = (table1.c.myid + 5).label('sum') stmt = select([expr]).alias() self.assert_compile( select([stmt.c.sum, func.row_number().over(order_by=stmt.c.sum)]), "SELECT anon_1.sum, row_number() OVER (ORDER BY anon_1.sum) " "AS anon_2 FROM (SELECT mytable.myid + :myid_1 AS sum " "FROM mytable) AS anon_1" ) # test a reference to a label that's at the same level as the OVER # in the columns clause; doesn't resolve expr = (table1.c.myid + 5).label('sum') self.assert_compile( select([expr, func.row_number().over(order_by=expr)]), "SELECT mytable.myid + :myid_1 AS sum, " "row_number() OVER " "(ORDER BY mytable.myid + :myid_1) AS anon_1 FROM mytable" ) def test_date_between(self): import datetime table = Table('dt', metadata, Column('date', Date)) self.assert_compile( table.select(table.c.date.between(datetime.date(2006, 6, 1), datetime.date(2006, 6, 5))), "SELECT dt.date FROM dt WHERE dt.date BETWEEN :date_1 AND :date_2", checkparams={'date_1': datetime.date(2006, 6, 1), 'date_2': datetime.date(2006, 6, 5)}) self.assert_compile( table.select(sql.between(table.c.date, datetime.date(2006, 6, 1), datetime.date(2006, 6, 5))), "SELECT dt.date FROM dt WHERE dt.date BETWEEN :date_1 AND :date_2", checkparams={'date_1': datetime.date(2006, 6, 1), 'date_2': datetime.date(2006, 6, 5)}) def test_delayed_col_naming(self): my_str = Column(String) sel1 = select([my_str]) assert_raises_message( exc.InvalidRequestError, "Cannot initialize a sub-selectable with this Column", lambda: sel1.c ) # calling label or as_scalar doesn't compile # anything. sel2 = select([func.substr(my_str, 2, 3)]).label('my_substr') assert_raises_message( exc.CompileError, "Cannot compile Column object until its 'name' is assigned.", str, sel2 ) sel3 = select([my_str]).as_scalar() assert_raises_message( exc.CompileError, "Cannot compile Column object until its 'name' is assigned.", str, sel3 ) my_str.name = 'foo' self.assert_compile( sel1, "SELECT foo", ) self.assert_compile( sel2, '(SELECT substr(foo, :substr_2, :substr_3) AS substr_1)', ) self.assert_compile( sel3, "(SELECT foo)" ) def test_naming(self): # TODO: the part where we check c.keys() are not "compile" tests, they # belong probably in test_selectable, or some broken up # version of that suite f1 = func.hoho(table1.c.name) s1 = select([table1.c.myid, table1.c.myid.label('foobar'), f1, func.lala(table1.c.name).label('gg')]) eq_( list(s1.c.keys()), ['myid', 'foobar', str(f1), 'gg'] ) meta = MetaData() t1 = Table('mytable', meta, Column('col1', Integer)) exprs = ( table1.c.myid == 12, func.hoho(table1.c.myid), cast(table1.c.name, Numeric), literal('x'), ) for col, key, expr, lbl in ( (table1.c.name, 'name', 'mytable.name', None), (exprs[0], str(exprs[0]), 'mytable.myid = :myid_1', 'anon_1'), (exprs[1], str(exprs[1]), 'hoho(mytable.myid)', 'hoho_1'), (exprs[2], str(exprs[2]), 'CAST(mytable.name AS NUMERIC)', 'anon_1'), (t1.c.col1, 'col1', 'mytable.col1', None), (column('some wacky thing'), 'some wacky thing', '"some wacky thing"', ''), (exprs[3], exprs[3].key, ":param_1", "anon_1") ): if getattr(col, 'table', None) is not None: t = col.table else: t = table1 s1 = select([col], from_obj=t) assert list(s1.c.keys()) == [key], list(s1.c.keys()) if lbl: self.assert_compile( s1, "SELECT %s AS %s FROM mytable" % (expr, lbl)) else: self.assert_compile(s1, "SELECT %s FROM mytable" % (expr,)) s1 = select([s1]) if lbl: self.assert_compile( s1, "SELECT %s FROM (SELECT %s AS %s FROM mytable)" % (lbl, expr, lbl)) elif col.table is not None: # sqlite rule labels subquery columns self.assert_compile( s1, "SELECT %s FROM (SELECT %s AS %s FROM mytable)" % (key, expr, key)) else: self.assert_compile(s1, "SELECT %s FROM (SELECT %s FROM mytable)" % (expr, expr)) def test_hints(self): s = select([table1.c.myid]).with_hint(table1, "test hint %(name)s") s2 = select([table1.c.myid]).\ with_hint(table1, "index(%(name)s idx)", 'oracle').\ with_hint(table1, "WITH HINT INDEX idx", 'sybase') a1 = table1.alias() s3 = select([a1.c.myid]).with_hint(a1, "index(%(name)s hint)") subs4 = select([ table1, table2 ]).select_from( table1.join(table2, table1.c.myid == table2.c.otherid)).\ with_hint(table1, 'hint1') s4 = select([table3]).select_from( table3.join( subs4, subs4.c.othername == table3.c.otherstuff ) ).\ with_hint(table3, 'hint3') t1 = table('QuotedName', column('col1')) s6 = select([t1.c.col1]).where(t1.c.col1 > 10).\ with_hint(t1, '%(name)s idx1') a2 = t1.alias('SomeName') s7 = select([a2.c.col1]).where(a2.c.col1 > 10).\ with_hint(a2, '%(name)s idx1') mysql_d, oracle_d, sybase_d = \ mysql.dialect(), \ oracle.dialect(), \ sybase.dialect() for stmt, dialect, expected in [ (s, mysql_d, "SELECT mytable.myid FROM mytable test hint mytable"), (s, oracle_d, "SELECT /*+ test hint mytable */ mytable.myid FROM mytable"), (s, sybase_d, "SELECT mytable.myid FROM mytable test hint mytable"), (s2, mysql_d, "SELECT mytable.myid FROM mytable"), (s2, oracle_d, "SELECT /*+ index(mytable idx) */ mytable.myid FROM mytable"), (s2, sybase_d, "SELECT mytable.myid FROM mytable WITH HINT INDEX idx"), (s3, mysql_d, "SELECT mytable_1.myid FROM mytable AS mytable_1 " "index(mytable_1 hint)"), (s3, oracle_d, "SELECT /*+ index(mytable_1 hint) */ mytable_1.myid FROM " "mytable mytable_1"), (s3, sybase_d, "SELECT mytable_1.myid FROM mytable AS mytable_1 " "index(mytable_1 hint)"), (s4, mysql_d, "SELECT thirdtable.userid, thirdtable.otherstuff " "FROM thirdtable " "hint3 INNER JOIN (SELECT mytable.myid, mytable.name, " "mytable.description, myothertable.otherid, " "myothertable.othername FROM mytable hint1 INNER " "JOIN myothertable ON mytable.myid = myothertable.otherid) " "ON othername = thirdtable.otherstuff"), (s4, sybase_d, "SELECT thirdtable.userid, thirdtable.otherstuff " "FROM thirdtable " "hint3 JOIN (SELECT mytable.myid, mytable.name, " "mytable.description, myothertable.otherid, " "myothertable.othername FROM mytable hint1 " "JOIN myothertable ON mytable.myid = myothertable.otherid) " "ON othername = thirdtable.otherstuff"), (s4, oracle_d, "SELECT /*+ hint3 */ thirdtable.userid, thirdtable.otherstuff " "FROM thirdtable JOIN (SELECT /*+ hint1 */ mytable.myid," " mytable.name, mytable.description, myothertable.otherid," " myothertable.othername FROM mytable JOIN myothertable ON" " mytable.myid = myothertable.otherid) ON othername =" " thirdtable.otherstuff"), # TODO: figure out dictionary ordering solution here # (s5, oracle_d, # "SELECT /*+ hint3 */ /*+ hint1 */ thirdtable.userid, " # "thirdtable.otherstuff " # "FROM thirdtable JOIN (SELECT mytable.myid," # " mytable.name, mytable.description, myothertable.otherid," # " myothertable.othername FROM mytable JOIN myothertable ON" # " mytable.myid = myothertable.otherid) ON othername =" # " thirdtable.otherstuff"), (s6, oracle_d, """SELECT /*+ "QuotedName" idx1 */ "QuotedName".col1 """ """FROM "QuotedName" WHERE "QuotedName".col1 > :col1_1"""), (s7, oracle_d, """SELECT /*+ "SomeName" idx1 */ "SomeName".col1 FROM """ """"QuotedName" "SomeName" WHERE "SomeName".col1 > :col1_1"""), ]: self.assert_compile( stmt, expected, dialect=dialect ) def test_statement_hints(self): stmt = select([table1.c.myid]).\ with_statement_hint("test hint one").\ with_statement_hint("test hint two", 'mysql') self.assert_compile( stmt, "SELECT mytable.myid FROM mytable test hint one", ) self.assert_compile( stmt, "SELECT mytable.myid FROM mytable test hint one test hint two", dialect='mysql' ) def test_literal_as_text_fromstring(self): self.assert_compile( and_(text("a"), text("b")), "a AND b" ) def test_literal_as_text_nonstring_raise(self): assert_raises(exc.ArgumentError, and_, ("a",), ("b",) ) class UnsupportedTest(fixtures.TestBase): def test_unsupported_element_str_visit_name(self): from sqlalchemy.sql.expression import ClauseElement class SomeElement(ClauseElement): __visit_name__ = 'some_element' assert_raises_message( exc.UnsupportedCompilationError, r"Compiler <sqlalchemy.sql.compiler.StrSQLCompiler .*" r"can't render element of type <class '.*SomeElement'>", SomeElement().compile ) def test_unsupported_element_meth_visit_name(self): from sqlalchemy.sql.expression import ClauseElement class SomeElement(ClauseElement): @classmethod def __visit_name__(cls): return "some_element" assert_raises_message( exc.UnsupportedCompilationError, r"Compiler <sqlalchemy.sql.compiler.StrSQLCompiler .*" r"can't render element of type <class '.*SomeElement'>", SomeElement().compile ) def test_unsupported_operator(self): from sqlalchemy.sql.expression import BinaryExpression def myop(x, y): pass binary = BinaryExpression(column("foo"), column("bar"), myop) assert_raises_message( exc.UnsupportedCompilationError, r"Compiler <sqlalchemy.sql.compiler.StrSQLCompiler .*" r"can't render element of type <function.*", binary.compile ) class StringifySpecialTest(fixtures.TestBase): def test_basic(self): stmt = select([table1]).where(table1.c.myid == 10) eq_ignore_whitespace( str(stmt), "SELECT mytable.myid, mytable.name, mytable.description " "FROM mytable WHERE mytable.myid = :myid_1" ) def test_cte(self): # stringify of these was supported anyway by defaultdialect. stmt = select([table1.c.myid]).cte() stmt = select([stmt]) eq_ignore_whitespace( str(stmt), "WITH anon_1 AS (SELECT mytable.myid AS myid FROM mytable) " "SELECT anon_1.myid FROM anon_1" ) def test_returning(self): stmt = table1.insert().returning(table1.c.myid) eq_ignore_whitespace( str(stmt), "INSERT INTO mytable (myid, name, description) " "VALUES (:myid, :name, :description) RETURNING mytable.myid" ) def test_array_index(self): stmt = select([column('foo', types.ARRAY(Integer))[5]]) eq_ignore_whitespace( str(stmt), "SELECT foo[:foo_1] AS anon_1" ) def test_unknown_type(self): class MyType(types.TypeEngine): __visit_name__ = 'mytype' stmt = select([cast(table1.c.myid, MyType)]) eq_ignore_whitespace( str(stmt), "SELECT CAST(mytable.myid AS MyType) AS anon_1 FROM mytable" ) def test_within_group(self): # stringify of these was supported anyway by defaultdialect. from sqlalchemy import within_group stmt = select([ table1.c.myid, within_group( func.percentile_cont(0.5), table1.c.name.desc() ) ]) eq_ignore_whitespace( str(stmt), "SELECT mytable.myid, percentile_cont(:percentile_cont_1) " "WITHIN GROUP (ORDER BY mytable.name DESC) AS anon_1 FROM mytable" ) class KwargPropagationTest(fixtures.TestBase): @classmethod def setup_class(cls): from sqlalchemy.sql.expression import ColumnClause, TableClause class CatchCol(ColumnClause): pass class CatchTable(TableClause): pass cls.column = CatchCol("x") cls.table = CatchTable("y") cls.criterion = cls.column == CatchCol('y') @compiles(CatchCol) def compile_col(element, compiler, **kw): assert "canary" in kw return compiler.visit_column(element) @compiles(CatchTable) def compile_table(element, compiler, **kw): assert "canary" in kw return compiler.visit_table(element) def _do_test(self, element): d = default.DefaultDialect() d.statement_compiler(d, element, compile_kwargs={"canary": True}) def test_binary(self): self._do_test(self.column == 5) def test_select(self): s = select([self.column]).select_from(self.table).\ where(self.column == self.criterion).\ order_by(self.column) self._do_test(s) def test_case(self): c = case([(self.criterion, self.column)], else_=self.column) self._do_test(c) def test_cast(self): c = cast(self.column, Integer) self._do_test(c) class CRUDTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def test_insert_literal_binds(self): stmt = table1.insert().values(myid=3, name='jack') self.assert_compile( stmt, "INSERT INTO mytable (myid, name) VALUES (3, 'jack')", literal_binds=True) def test_update_literal_binds(self): stmt = table1.update().values(name='jack').\ where(table1.c.name == 'jill') self.assert_compile( stmt, "UPDATE mytable SET name='jack' WHERE mytable.name = 'jill'", literal_binds=True) def test_delete_literal_binds(self): stmt = table1.delete().where(table1.c.name == 'jill') self.assert_compile( stmt, "DELETE FROM mytable WHERE mytable.name = 'jill'", literal_binds=True) def test_correlated_update(self): # test against a straight text subquery u = update( table1, values={ table1.c.name: text("(select name from mytable where id=mytable.id)") } ) self.assert_compile( u, "UPDATE mytable SET name=(select name from mytable " "where id=mytable.id)") mt = table1.alias() u = update(table1, values={ table1.c.name: select([mt.c.name], mt.c.myid == table1.c.myid) }) self.assert_compile( u, "UPDATE mytable SET name=(SELECT mytable_1.name FROM " "mytable AS mytable_1 WHERE " "mytable_1.myid = mytable.myid)") # test against a regular constructed subquery s = select([table2], table2.c.otherid == table1.c.myid) u = update(table1, table1.c.name == 'jack', values={table1.c.name: s}) self.assert_compile( u, "UPDATE mytable SET name=(SELECT myothertable.otherid, " "myothertable.othername FROM myothertable WHERE " "myothertable.otherid = mytable.myid) " "WHERE mytable.name = :name_1") # test a non-correlated WHERE clause s = select([table2.c.othername], table2.c.otherid == 7) u = update(table1, table1.c.name == s) self.assert_compile(u, "UPDATE mytable SET myid=:myid, name=:name, " "description=:description WHERE mytable.name = " "(SELECT myothertable.othername FROM myothertable " "WHERE myothertable.otherid = :otherid_1)") # test one that is actually correlated... s = select([table2.c.othername], table2.c.otherid == table1.c.myid) u = table1.update(table1.c.name == s) self.assert_compile(u, "UPDATE mytable SET myid=:myid, name=:name, " "description=:description WHERE mytable.name = " "(SELECT myothertable.othername FROM myothertable " "WHERE myothertable.otherid = mytable.myid)") # test correlated FROM implicit in WHERE and SET clauses u = table1.update().values(name=table2.c.othername)\ .where(table2.c.otherid == table1.c.myid) self.assert_compile( u, "UPDATE mytable SET name=myothertable.othername " "FROM myothertable WHERE myothertable.otherid = mytable.myid") u = table1.update().values(name='foo')\ .where(table2.c.otherid == table1.c.myid) self.assert_compile( u, "UPDATE mytable SET name=:name " "FROM myothertable WHERE myothertable.otherid = mytable.myid") self.assert_compile(u, "UPDATE mytable SET name=:name " "FROM mytable, myothertable WHERE " "myothertable.otherid = mytable.myid", dialect=mssql.dialect()) self.assert_compile(u.where(table2.c.othername == mt.c.name), "UPDATE mytable SET name=:name " "FROM mytable, myothertable, mytable AS mytable_1 " "WHERE myothertable.otherid = mytable.myid " "AND myothertable.othername = mytable_1.name", dialect=mssql.dialect()) def test_binds_that_match_columns(self): """test bind params named after column names replace the normal SET/VALUES generation.""" t = table('foo', column('x'), column('y')) u = t.update().where(t.c.x == bindparam('x')) assert_raises(exc.CompileError, u.compile) self.assert_compile(u, "UPDATE foo SET WHERE foo.x = :x", params={}) assert_raises(exc.CompileError, u.values(x=7).compile) self.assert_compile(u.values(y=7), "UPDATE foo SET y=:y WHERE foo.x = :x") assert_raises(exc.CompileError, u.values(x=7).compile, column_keys=['x', 'y']) assert_raises(exc.CompileError, u.compile, column_keys=['x', 'y']) self.assert_compile( u.values( x=3 + bindparam('x')), "UPDATE foo SET x=(:param_1 + :x) WHERE foo.x = :x") self.assert_compile( u.values( x=3 + bindparam('x')), "UPDATE foo SET x=(:param_1 + :x) WHERE foo.x = :x", params={ 'x': 1}) self.assert_compile( u.values( x=3 + bindparam('x')), "UPDATE foo SET x=(:param_1 + :x), y=:y WHERE foo.x = :x", params={ 'x': 1, 'y': 2}) i = t.insert().values(x=3 + bindparam('x')) self.assert_compile(i, "INSERT INTO foo (x) VALUES ((:param_1 + :x))") self.assert_compile( i, "INSERT INTO foo (x, y) VALUES ((:param_1 + :x), :y)", params={ 'x': 1, 'y': 2}) i = t.insert().values(x=bindparam('y')) self.assert_compile(i, "INSERT INTO foo (x) VALUES (:y)") i = t.insert().values(x=bindparam('y'), y=5) assert_raises(exc.CompileError, i.compile) i = t.insert().values(x=3 + bindparam('y'), y=5) assert_raises(exc.CompileError, i.compile) i = t.insert().values(x=3 + bindparam('x2')) self.assert_compile(i, "INSERT INTO foo (x) VALUES ((:param_1 + :x2))") self.assert_compile( i, "INSERT INTO foo (x) VALUES ((:param_1 + :x2))", params={}) self.assert_compile( i, "INSERT INTO foo (x, y) VALUES ((:param_1 + :x2), :y)", params={ 'x': 1, 'y': 2}) self.assert_compile( i, "INSERT INTO foo (x, y) VALUES ((:param_1 + :x2), :y)", params={ 'x2': 1, 'y': 2}) def test_labels_no_collision(self): t = table('foo', column('id'), column('foo_id')) self.assert_compile( t.update().where(t.c.id == 5), "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :id_1" ) self.assert_compile( t.update().where(t.c.id == bindparam(key=t.c.id._label)), "UPDATE foo SET id=:id, foo_id=:foo_id WHERE foo.id = :foo_id_1" ) class DDLTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def _illegal_type_fixture(self): class MyType(types.TypeEngine): pass @compiles(MyType) def compile(element, compiler, **kw): raise exc.CompileError("Couldn't compile type") return MyType def test_reraise_of_column_spec_issue(self): MyType = self._illegal_type_fixture() t1 = Table('t', MetaData(), Column('x', MyType()) ) assert_raises_message( exc.CompileError, r"\(in table 't', column 'x'\): Couldn't compile type", schema.CreateTable(t1).compile ) def test_reraise_of_column_spec_issue_unicode(self): MyType = self._illegal_type_fixture() t1 = Table('t', MetaData(), Column(u('méil'), MyType()) ) assert_raises_message( exc.CompileError, u(r"\(in table 't', column 'méil'\): Couldn't compile type"), schema.CreateTable(t1).compile ) def test_system_flag(self): m = MetaData() t = Table('t', m, Column('x', Integer), Column('y', Integer, system=True), Column('z', Integer)) self.assert_compile( schema.CreateTable(t), "CREATE TABLE t (x INTEGER, z INTEGER)" ) m2 = MetaData() t2 = t.tometadata(m2) self.assert_compile( schema.CreateTable(t2), "CREATE TABLE t (x INTEGER, z INTEGER)" ) def test_composite_pk_constraint_autoinc_first(self): m = MetaData() t = Table( 't', m, Column('a', Integer, primary_key=True), Column('b', Integer, primary_key=True, autoincrement=True) ) self.assert_compile( schema.CreateTable(t), "CREATE TABLE t (" "a INTEGER NOT NULL, " "b INTEGER NOT NULL, " "PRIMARY KEY (b, a))" ) def test_table_no_cols(self): m = MetaData() t1 = Table('t1', m) self.assert_compile( schema.CreateTable(t1), "CREATE TABLE t1 ()" ) def test_table_no_cols_w_constraint(self): m = MetaData() t1 = Table('t1', m, CheckConstraint('a = 1')) self.assert_compile( schema.CreateTable(t1), "CREATE TABLE t1 (CHECK (a = 1))" ) def test_table_one_col_w_constraint(self): m = MetaData() t1 = Table('t1', m, Column('q', Integer), CheckConstraint('a = 1')) self.assert_compile( schema.CreateTable(t1), "CREATE TABLE t1 (q INTEGER, CHECK (a = 1))" ) def test_schema_translate_map_table(self): m = MetaData() t1 = Table('t1', m, Column('q', Integer)) t2 = Table('t2', m, Column('q', Integer), schema='foo') t3 = Table('t3', m, Column('q', Integer), schema='bar') schema_translate_map = {None: "z", "bar": None, "foo": "bat"} self.assert_compile( schema.CreateTable(t1), "CREATE TABLE z.t1 (q INTEGER)", schema_translate_map=schema_translate_map ) self.assert_compile( schema.CreateTable(t2), "CREATE TABLE bat.t2 (q INTEGER)", schema_translate_map=schema_translate_map ) self.assert_compile( schema.CreateTable(t3), "CREATE TABLE t3 (q INTEGER)", schema_translate_map=schema_translate_map ) def test_schema_translate_map_sequence(self): s1 = schema.Sequence('s1') s2 = schema.Sequence('s2', schema='foo') s3 = schema.Sequence('s3', schema='bar') schema_translate_map = {None: "z", "bar": None, "foo": "bat"} self.assert_compile( schema.CreateSequence(s1), "CREATE SEQUENCE z.s1", schema_translate_map=schema_translate_map ) self.assert_compile( schema.CreateSequence(s2), "CREATE SEQUENCE bat.s2", schema_translate_map=schema_translate_map ) self.assert_compile( schema.CreateSequence(s3), "CREATE SEQUENCE s3", schema_translate_map=schema_translate_map ) class InlineDefaultTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def test_insert(self): m = MetaData() foo = Table('foo', m, Column('id', Integer)) t = Table('test', m, Column('col1', Integer, default=func.foo(1)), Column('col2', Integer, default=select( [func.coalesce(func.max(foo.c.id))])), ) self.assert_compile( t.insert( inline=True, values={}), "INSERT INTO test (col1, col2) VALUES (foo(:foo_1), " "(SELECT coalesce(max(foo.id)) AS coalesce_1 FROM " "foo))") def test_update(self): m = MetaData() foo = Table('foo', m, Column('id', Integer)) t = Table('test', m, Column('col1', Integer, onupdate=func.foo(1)), Column('col2', Integer, onupdate=select( [func.coalesce(func.max(foo.c.id))])), Column('col3', String(30)) ) self.assert_compile(t.update(inline=True, values={'col3': 'foo'}), "UPDATE test SET col1=foo(:foo_1), col2=(SELECT " "coalesce(max(foo.id)) AS coalesce_1 FROM foo), " "col3=:col3") class SchemaTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def test_select(self): self.assert_compile(table4.select(), "SELECT remote_owner.remotetable.rem_id, " "remote_owner.remotetable.datatype_id," " remote_owner.remotetable.value " "FROM remote_owner.remotetable") self.assert_compile( table4.select( and_( table4.c.datatype_id == 7, table4.c.value == 'hi')), "SELECT remote_owner.remotetable.rem_id, " "remote_owner.remotetable.datatype_id," " remote_owner.remotetable.value " "FROM remote_owner.remotetable WHERE " "remote_owner.remotetable.datatype_id = :datatype_id_1 AND" " remote_owner.remotetable.value = :value_1") s = table4.select(and_(table4.c.datatype_id == 7, table4.c.value == 'hi'), use_labels=True) self.assert_compile( s, "SELECT remote_owner.remotetable.rem_id AS" " remote_owner_remotetable_rem_id, " "remote_owner.remotetable.datatype_id AS" " remote_owner_remotetable_datatype_id, " "remote_owner.remotetable.value " "AS remote_owner_remotetable_value FROM " "remote_owner.remotetable WHERE " "remote_owner.remotetable.datatype_id = :datatype_id_1 AND " "remote_owner.remotetable.value = :value_1") # multi-part schema name self.assert_compile(table5.select(), 'SELECT "dbo.remote_owner".remotetable.rem_id, ' '"dbo.remote_owner".remotetable.datatype_id, ' '"dbo.remote_owner".remotetable.value ' 'FROM "dbo.remote_owner".remotetable' ) # multi-part schema name labels - convert '.' to '_' self.assert_compile(table5.select(use_labels=True), 'SELECT "dbo.remote_owner".remotetable.rem_id AS' ' dbo_remote_owner_remotetable_rem_id, ' '"dbo.remote_owner".remotetable.datatype_id' ' AS dbo_remote_owner_remotetable_datatype_id,' ' "dbo.remote_owner".remotetable.value AS ' 'dbo_remote_owner_remotetable_value FROM' ' "dbo.remote_owner".remotetable' ) def test_schema_translate_select(self): schema_translate_map = {"remote_owner": "foob", None: 'bar'} self.assert_compile( table1.select().where(table1.c.name == 'hi'), "SELECT bar.mytable.myid, bar.mytable.name, " "bar.mytable.description FROM bar.mytable " "WHERE bar.mytable.name = :name_1", schema_translate_map=schema_translate_map ) self.assert_compile( table4.select().where(table4.c.value == 'hi'), "SELECT foob.remotetable.rem_id, foob.remotetable.datatype_id, " "foob.remotetable.value FROM foob.remotetable " "WHERE foob.remotetable.value = :value_1", schema_translate_map=schema_translate_map ) schema_translate_map = {"remote_owner": "foob"} self.assert_compile( select([ table1, table4 ]).select_from( join(table1, table4, table1.c.myid == table4.c.rem_id) ), "SELECT mytable.myid, mytable.name, mytable.description, " "foob.remotetable.rem_id, foob.remotetable.datatype_id, " "foob.remotetable.value FROM mytable JOIN foob.remotetable " "ON foob.remotetable.rem_id = mytable.myid", schema_translate_map=schema_translate_map ) def test_schema_translate_crud(self): schema_translate_map = {"remote_owner": "foob", None: 'bar'} self.assert_compile( table1.insert().values(description='foo'), "INSERT INTO bar.mytable (description) VALUES (:description)", schema_translate_map=schema_translate_map ) self.assert_compile( table1.update().where(table1.c.name == 'hi'). values(description='foo'), "UPDATE bar.mytable SET description=:description " "WHERE bar.mytable.name = :name_1", schema_translate_map=schema_translate_map ) self.assert_compile( table1.delete().where(table1.c.name == 'hi'), "DELETE FROM bar.mytable WHERE bar.mytable.name = :name_1", schema_translate_map=schema_translate_map ) self.assert_compile( table4.insert().values(value='there'), "INSERT INTO foob.remotetable (value) VALUES (:value)", schema_translate_map=schema_translate_map ) self.assert_compile( table4.update().where(table4.c.value == 'hi'). values(value='there'), "UPDATE foob.remotetable SET value=:value " "WHERE foob.remotetable.value = :value_1", schema_translate_map=schema_translate_map ) self.assert_compile( table4.delete().where(table4.c.value == 'hi'), "DELETE FROM foob.remotetable WHERE " "foob.remotetable.value = :value_1", schema_translate_map=schema_translate_map ) def test_alias(self): a = alias(table4, 'remtable') self.assert_compile(a.select(a.c.datatype_id == 7), "SELECT remtable.rem_id, remtable.datatype_id, " "remtable.value FROM" " remote_owner.remotetable AS remtable " "WHERE remtable.datatype_id = :datatype_id_1") def test_update(self): self.assert_compile( table4.update(table4.c.value == 'test', values={table4.c.datatype_id: 12}), "UPDATE remote_owner.remotetable SET datatype_id=:datatype_id " "WHERE remote_owner.remotetable.value = :value_1") def test_insert(self): self.assert_compile(table4.insert(values=(2, 5, 'test')), "INSERT INTO remote_owner.remotetable " "(rem_id, datatype_id, value) VALUES " "(:rem_id, :datatype_id, :value)") class CorrelateTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def test_dont_overcorrelate(self): self.assert_compile(select([table1], from_obj=[table1, table1.select()]), "SELECT mytable.myid, mytable.name, " "mytable.description FROM mytable, (SELECT " "mytable.myid AS myid, mytable.name AS " "name, mytable.description AS description " "FROM mytable)") def _fixture(self): t1 = table('t1', column('a')) t2 = table('t2', column('a')) return t1, t2, select([t1]).where(t1.c.a == t2.c.a) def _assert_where_correlated(self, stmt): self.assert_compile( stmt, "SELECT t2.a FROM t2 WHERE t2.a = " "(SELECT t1.a FROM t1 WHERE t1.a = t2.a)") def _assert_where_all_correlated(self, stmt): self.assert_compile( stmt, "SELECT t1.a, t2.a FROM t1, t2 WHERE t2.a = " "(SELECT t1.a WHERE t1.a = t2.a)") # note there's no more "backwards" correlation after # we've done #2746 # def _assert_where_backwards_correlated(self, stmt): # self.assert_compile( # stmt, # "SELECT t2.a FROM t2 WHERE t2.a = " # "(SELECT t1.a FROM t2 WHERE t1.a = t2.a)") # def _assert_column_backwards_correlated(self, stmt): # self.assert_compile(stmt, # "SELECT t2.a, (SELECT t1.a FROM t2 WHERE t1.a = t2.a) " # "AS anon_1 FROM t2") def _assert_column_correlated(self, stmt): self.assert_compile( stmt, "SELECT t2.a, (SELECT t1.a FROM t1 WHERE t1.a = t2.a) " "AS anon_1 FROM t2") def _assert_column_all_correlated(self, stmt): self.assert_compile( stmt, "SELECT t1.a, t2.a, " "(SELECT t1.a WHERE t1.a = t2.a) AS anon_1 FROM t1, t2") def _assert_having_correlated(self, stmt): self.assert_compile(stmt, "SELECT t2.a FROM t2 HAVING t2.a = " "(SELECT t1.a FROM t1 WHERE t1.a = t2.a)") def _assert_from_uncorrelated(self, stmt): self.assert_compile( stmt, "SELECT t2.a, anon_1.a FROM t2, " "(SELECT t1.a AS a FROM t1, t2 WHERE t1.a = t2.a) AS anon_1") def _assert_from_all_uncorrelated(self, stmt): self.assert_compile( stmt, "SELECT t1.a, t2.a, anon_1.a FROM t1, t2, " "(SELECT t1.a AS a FROM t1, t2 WHERE t1.a = t2.a) AS anon_1") def _assert_where_uncorrelated(self, stmt): self.assert_compile(stmt, "SELECT t2.a FROM t2 WHERE t2.a = " "(SELECT t1.a FROM t1, t2 WHERE t1.a = t2.a)") def _assert_column_uncorrelated(self, stmt): self.assert_compile(stmt, "SELECT t2.a, (SELECT t1.a FROM t1, t2 " "WHERE t1.a = t2.a) AS anon_1 FROM t2") def _assert_having_uncorrelated(self, stmt): self.assert_compile(stmt, "SELECT t2.a FROM t2 HAVING t2.a = " "(SELECT t1.a FROM t1, t2 WHERE t1.a = t2.a)") def _assert_where_single_full_correlated(self, stmt): self.assert_compile(stmt, "SELECT t1.a FROM t1 WHERE t1.a = (SELECT t1.a)") def test_correlate_semiauto_where(self): t1, t2, s1 = self._fixture() self._assert_where_correlated( select([t2]).where(t2.c.a == s1.correlate(t2))) def test_correlate_semiauto_column(self): t1, t2, s1 = self._fixture() self._assert_column_correlated( select([t2, s1.correlate(t2).as_scalar()])) def test_correlate_semiauto_from(self): t1, t2, s1 = self._fixture() self._assert_from_uncorrelated( select([t2, s1.correlate(t2).alias()])) def test_correlate_semiauto_having(self): t1, t2, s1 = self._fixture() self._assert_having_correlated( select([t2]).having(t2.c.a == s1.correlate(t2))) def test_correlate_except_inclusion_where(self): t1, t2, s1 = self._fixture() self._assert_where_correlated( select([t2]).where(t2.c.a == s1.correlate_except(t1))) def test_correlate_except_exclusion_where(self): t1, t2, s1 = self._fixture() self._assert_where_uncorrelated( select([t2]).where(t2.c.a == s1.correlate_except(t2))) def test_correlate_except_inclusion_column(self): t1, t2, s1 = self._fixture() self._assert_column_correlated( select([t2, s1.correlate_except(t1).as_scalar()])) def test_correlate_except_exclusion_column(self): t1, t2, s1 = self._fixture() self._assert_column_uncorrelated( select([t2, s1.correlate_except(t2).as_scalar()])) def test_correlate_except_inclusion_from(self): t1, t2, s1 = self._fixture() self._assert_from_uncorrelated( select([t2, s1.correlate_except(t1).alias()])) def test_correlate_except_exclusion_from(self): t1, t2, s1 = self._fixture() self._assert_from_uncorrelated( select([t2, s1.correlate_except(t2).alias()])) def test_correlate_except_none(self): t1, t2, s1 = self._fixture() self._assert_where_all_correlated( select([t1, t2]).where(t2.c.a == s1.correlate_except(None))) def test_correlate_except_having(self): t1, t2, s1 = self._fixture() self._assert_having_correlated( select([t2]).having(t2.c.a == s1.correlate_except(t1))) def test_correlate_auto_where(self): t1, t2, s1 = self._fixture() self._assert_where_correlated( select([t2]).where(t2.c.a == s1)) def test_correlate_auto_column(self): t1, t2, s1 = self._fixture() self._assert_column_correlated( select([t2, s1.as_scalar()])) def test_correlate_auto_from(self): t1, t2, s1 = self._fixture() self._assert_from_uncorrelated( select([t2, s1.alias()])) def test_correlate_auto_having(self): t1, t2, s1 = self._fixture() self._assert_having_correlated( select([t2]).having(t2.c.a == s1)) def test_correlate_disabled_where(self): t1, t2, s1 = self._fixture() self._assert_where_uncorrelated( select([t2]).where(t2.c.a == s1.correlate(None))) def test_correlate_disabled_column(self): t1, t2, s1 = self._fixture() self._assert_column_uncorrelated( select([t2, s1.correlate(None).as_scalar()])) def test_correlate_disabled_from(self): t1, t2, s1 = self._fixture() self._assert_from_uncorrelated( select([t2, s1.correlate(None).alias()])) def test_correlate_disabled_having(self): t1, t2, s1 = self._fixture() self._assert_having_uncorrelated( select([t2]).having(t2.c.a == s1.correlate(None))) def test_correlate_all_where(self): t1, t2, s1 = self._fixture() self._assert_where_all_correlated( select([t1, t2]).where(t2.c.a == s1.correlate(t1, t2))) def test_correlate_all_column(self): t1, t2, s1 = self._fixture() self._assert_column_all_correlated( select([t1, t2, s1.correlate(t1, t2).as_scalar()])) def test_correlate_all_from(self): t1, t2, s1 = self._fixture() self._assert_from_all_uncorrelated( select([t1, t2, s1.correlate(t1, t2).alias()])) def test_correlate_where_all_unintentional(self): t1, t2, s1 = self._fixture() assert_raises_message( exc.InvalidRequestError, "returned no FROM clauses due to auto-correlation", select([t1, t2]).where(t2.c.a == s1).compile ) def test_correlate_from_all_ok(self): t1, t2, s1 = self._fixture() self.assert_compile( select([t1, t2, s1]), "SELECT t1.a, t2.a, a FROM t1, t2, " "(SELECT t1.a AS a FROM t1, t2 WHERE t1.a = t2.a)" ) def test_correlate_auto_where_singlefrom(self): t1, t2, s1 = self._fixture() s = select([t1.c.a]) s2 = select([t1]).where(t1.c.a == s) self.assert_compile(s2, "SELECT t1.a FROM t1 WHERE t1.a = " "(SELECT t1.a FROM t1)") def test_correlate_semiauto_where_singlefrom(self): t1, t2, s1 = self._fixture() s = select([t1.c.a]) s2 = select([t1]).where(t1.c.a == s.correlate(t1)) self._assert_where_single_full_correlated(s2) def test_correlate_except_semiauto_where_singlefrom(self): t1, t2, s1 = self._fixture() s = select([t1.c.a]) s2 = select([t1]).where(t1.c.a == s.correlate_except(t2)) self._assert_where_single_full_correlated(s2) def test_correlate_alone_noeffect(self): # new as of #2668 t1, t2, s1 = self._fixture() self.assert_compile(s1.correlate(t1, t2), "SELECT t1.a FROM t1, t2 WHERE t1.a = t2.a") def test_correlate_except_froms(self): # new as of #2748 t1 = table('t1', column('a')) t2 = table('t2', column('a'), column('b')) s = select([t2.c.b]).where(t1.c.a == t2.c.a) s = s.correlate_except(t2).alias('s') s2 = select([func.foo(s.c.b)]).as_scalar() s3 = select([t1], order_by=s2) self.assert_compile( s3, "SELECT t1.a FROM t1 ORDER BY " "(SELECT foo(s.b) AS foo_1 FROM " "(SELECT t2.b AS b FROM t2 WHERE t1.a = t2.a) AS s)") def test_multilevel_froms_correlation(self): # new as of #2748 p = table('parent', column('id')) c = table('child', column('id'), column('parent_id'), column('pos')) s = c.select().where( c.c.parent_id == p.c.id).order_by( c.c.pos).limit(1) s = s.correlate(p) s = exists().select_from(s).where(s.c.id == 1) s = select([p]).where(s) self.assert_compile( s, "SELECT parent.id FROM parent WHERE EXISTS (SELECT * " "FROM (SELECT child.id AS id, child.parent_id AS parent_id, " "child.pos AS pos FROM child WHERE child.parent_id = parent.id " "ORDER BY child.pos LIMIT :param_1) WHERE id = :id_1)") def test_no_contextless_correlate_except(self): # new as of #2748 t1 = table('t1', column('x')) t2 = table('t2', column('y')) t3 = table('t3', column('z')) s = select([t1]).where(t1.c.x == t2.c.y).\ where(t2.c.y == t3.c.z).correlate_except(t1) self.assert_compile( s, "SELECT t1.x FROM t1, t2, t3 WHERE t1.x = t2.y AND t2.y = t3.z") def test_multilevel_implicit_correlation_disabled(self): # test that implicit correlation with multilevel WHERE correlation # behaves like 0.8.1, 0.7 (i.e. doesn't happen) t1 = table('t1', column('x')) t2 = table('t2', column('y')) t3 = table('t3', column('z')) s = select([t1.c.x]).where(t1.c.x == t2.c.y) s2 = select([t3.c.z]).where(t3.c.z == s.as_scalar()) s3 = select([t1]).where(t1.c.x == s2.as_scalar()) self.assert_compile(s3, "SELECT t1.x FROM t1 " "WHERE t1.x = (SELECT t3.z " "FROM t3 " "WHERE t3.z = (SELECT t1.x " "FROM t1, t2 " "WHERE t1.x = t2.y))" ) def test_from_implicit_correlation_disabled(self): # test that implicit correlation with immediate and # multilevel FROM clauses behaves like 0.8.1 (i.e. doesn't happen) t1 = table('t1', column('x')) t2 = table('t2', column('y')) t3 = table('t3', column('z')) s = select([t1.c.x]).where(t1.c.x == t2.c.y) s2 = select([t2, s]) s3 = select([t1, s2]) self.assert_compile(s3, "SELECT t1.x, y, x FROM t1, " "(SELECT t2.y AS y, x FROM t2, " "(SELECT t1.x AS x FROM t1, t2 WHERE t1.x = t2.y))" ) class CoercionTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = default.DefaultDialect(supports_native_boolean=True) def _fixture(self): m = MetaData() return Table('foo', m, Column('id', Integer)) bool_table = table('t', column('x', Boolean)) def test_coerce_bool_where(self): self.assert_compile( select([self.bool_table]).where(self.bool_table.c.x), "SELECT t.x FROM t WHERE t.x" ) def test_coerce_bool_where_non_native(self): self.assert_compile( select([self.bool_table]).where(self.bool_table.c.x), "SELECT t.x FROM t WHERE t.x = 1", dialect=default.DefaultDialect(supports_native_boolean=False) ) self.assert_compile( select([self.bool_table]).where(~self.bool_table.c.x), "SELECT t.x FROM t WHERE t.x = 0", dialect=default.DefaultDialect(supports_native_boolean=False) ) def test_null_constant(self): self.assert_compile(_literal_as_text(None), "NULL") def test_false_constant(self): self.assert_compile(_literal_as_text(False), "false") def test_true_constant(self): self.assert_compile(_literal_as_text(True), "true") def test_val_and_false(self): t = self._fixture() self.assert_compile(and_(t.c.id == 1, False), "false") def test_val_and_true_coerced(self): t = self._fixture() self.assert_compile(and_(t.c.id == 1, True), "foo.id = :id_1") def test_val_is_null_coerced(self): t = self._fixture() self.assert_compile(and_(t.c.id == None), "foo.id IS NULL") def test_val_and_None(self): t = self._fixture() self.assert_compile(and_(t.c.id == 1, None), "foo.id = :id_1 AND NULL") def test_None_and_val(self): t = self._fixture() self.assert_compile(and_(None, t.c.id == 1), "NULL AND foo.id = :id_1") def test_None_and_nothing(self): # current convention is None in and_() # returns None May want # to revise this at some point. self.assert_compile( and_(None), "NULL") def test_val_and_null(self): t = self._fixture() self.assert_compile(and_(t.c.id == 1, null()), "foo.id = :id_1 AND NULL") class ResultMapTest(fixtures.TestBase): """test the behavior of the 'entry stack' and the determination when the result_map needs to be populated. """ def test_compound_populates(self): t = Table('t', MetaData(), Column('a', Integer), Column('b', Integer)) stmt = select([t]).union(select([t])) comp = stmt.compile() eq_( comp._create_result_map(), {'a': ('a', (t.c.a, 'a', 'a'), t.c.a.type), 'b': ('b', (t.c.b, 'b', 'b'), t.c.b.type)} ) def test_compound_not_toplevel_doesnt_populate(self): t = Table('t', MetaData(), Column('a', Integer), Column('b', Integer)) subq = select([t]).union(select([t])) stmt = select([t.c.a]).select_from(t.join(subq, t.c.a == subq.c.a)) comp = stmt.compile() eq_( comp._create_result_map(), {'a': ('a', (t.c.a, 'a', 'a'), t.c.a.type)} ) def test_compound_only_top_populates(self): t = Table('t', MetaData(), Column('a', Integer), Column('b', Integer)) stmt = select([t.c.a]).union(select([t.c.b])) comp = stmt.compile() eq_( comp._create_result_map(), {'a': ('a', (t.c.a, 'a', 'a'), t.c.a.type)}, ) def test_label_plus_element(self): t = Table('t', MetaData(), Column('a', Integer)) l1 = t.c.a.label('bar') tc = type_coerce(t.c.a, String) stmt = select([t.c.a, l1, tc]) comp = stmt.compile() tc_anon_label = comp._create_result_map()['anon_1'][1][0] eq_( comp._create_result_map(), { 'a': ('a', (t.c.a, 'a', 'a'), t.c.a.type), 'bar': ('bar', (l1, 'bar'), l1.type), 'anon_1': ( '%%(%d anon)s' % id(tc), (tc_anon_label, 'anon_1', tc), tc.type), }, ) def test_label_conflict_union(self): t1 = Table('t1', MetaData(), Column('a', Integer), Column('b', Integer)) t2 = Table('t2', MetaData(), Column('t1_a', Integer)) union = select([t2]).union(select([t2])).alias() t1_alias = t1.alias() stmt = select([t1, t1_alias]).select_from( t1.join(union, t1.c.a == union.c.t1_a)).apply_labels() comp = stmt.compile() eq_( set(comp._create_result_map()), set(['t1_1_b', 't1_1_a', 't1_a', 't1_b']) ) is_( comp._create_result_map()['t1_a'][1][2], t1.c.a ) def test_insert_with_select_values(self): astring = Column('a', String) aint = Column('a', Integer) m = MetaData() Table('t1', m, astring) t2 = Table('t2', m, aint) stmt = t2.insert().values(a=select([astring])).returning(aint) comp = stmt.compile(dialect=postgresql.dialect()) eq_( comp._create_result_map(), {'a': ('a', (aint, 'a', 'a'), aint.type)} ) def test_insert_from_select(self): astring = Column('a', String) aint = Column('a', Integer) m = MetaData() Table('t1', m, astring) t2 = Table('t2', m, aint) stmt = t2.insert().from_select(['a'], select([astring])).\ returning(aint) comp = stmt.compile(dialect=postgresql.dialect()) eq_( comp._create_result_map(), {'a': ('a', (aint, 'a', 'a'), aint.type)} ) def test_nested_api(self): from sqlalchemy.engine.result import ResultMetaData stmt2 = select([table2]) stmt1 = select([table1]).select_from(stmt2) contexts = {} int_ = Integer() class MyCompiler(compiler.SQLCompiler): def visit_select(self, stmt, *arg, **kw): if stmt is stmt2: with self._nested_result() as nested: contexts[stmt2] = nested text = super(MyCompiler, self).visit_select(stmt2) self._add_to_result_map("k1", "k1", (1, 2, 3), int_) else: text = super(MyCompiler, self).visit_select( stmt, *arg, **kw) self._add_to_result_map("k2", "k2", (3, 4, 5), int_) return text comp = MyCompiler(default.DefaultDialect(), stmt1) eq_( ResultMetaData._create_result_map(contexts[stmt2][0]), { 'otherid': ( 'otherid', (table2.c.otherid, 'otherid', 'otherid'), table2.c.otherid.type), 'othername': ( 'othername', (table2.c.othername, 'othername', 'othername'), table2.c.othername.type), 'k1': ('k1', (1, 2, 3), int_) } ) eq_( comp._create_result_map(), { 'myid': ( 'myid', (table1.c.myid, 'myid', 'myid'), table1.c.myid.type ), 'k2': ('k2', (3, 4, 5), int_), 'name': ( 'name', (table1.c.name, 'name', 'name'), table1.c.name.type), 'description': ( 'description', (table1.c.description, 'description', 'description'), table1.c.description.type)} ) def test_select_wraps_for_translate_ambiguity(self): # test for issue #3657 t = table('a', column('x'), column('y'), column('z')) l1, l2, l3 = t.c.z.label('a'), t.c.x.label('b'), t.c.x.label('c') orig = [t.c.x, t.c.y, l1, l2, l3] stmt = select(orig) wrapped = stmt._generate() wrapped = wrapped.column( func.ROW_NUMBER().over(order_by=t.c.z)).alias() wrapped_again = select([c for c in wrapped.c]) compiled = wrapped_again.compile( compile_kwargs={'select_wraps_for': stmt}) proxied = [obj[0] for (k, n, obj, type_) in compiled._result_columns] for orig_obj, proxied_obj in zip( orig, proxied ): is_(orig_obj, proxied_obj) def test_select_wraps_for_translate_ambiguity_dupe_cols(self): # test for issue #3657 t = table('a', column('x'), column('y'), column('z')) l1, l2, l3 = t.c.z.label('a'), t.c.x.label('b'), t.c.x.label('c') orig = [t.c.x, t.c.y, l1, l2, l3] # create the statement with some duplicate columns. right now # the behavior is that these redundant columns are deduped. stmt = select([t.c.x, t.c.y, l1, t.c.y, l2, t.c.x, l3]) # so the statement has 7 inner columns... eq_(len(list(stmt.inner_columns)), 7) # but only exposes 5 of them, the other two are dupes of x and y eq_(len(stmt.c), 5) # and when it generates a SELECT it will also render only 5 eq_(len(stmt._columns_plus_names), 5) wrapped = stmt._generate() wrapped = wrapped.column( func.ROW_NUMBER().over(order_by=t.c.z)).alias() # so when we wrap here we're going to have only 5 columns wrapped_again = select([c for c in wrapped.c]) # so the compiler logic that matches up the "wrapper" to the # "select_wraps_for" can't use inner_columns to match because # these collections are not the same compiled = wrapped_again.compile( compile_kwargs={'select_wraps_for': stmt}) proxied = [obj[0] for (k, n, obj, type_) in compiled._result_columns] for orig_obj, proxied_obj in zip( orig, proxied ): is_(orig_obj, proxied_obj)
sandan/sqlalchemy
test/sql/test_compiler.py
Python
mit
148,745
<?php /** * Webiny Framework (http://www.webiny.com/framework) * * @copyright Copyright Webiny LTD */ namespace Webiny\Component\Router\Route; use Webiny\Component\StdLib\StdLibTrait; /** * Route is an object that defines a route and its options. * * @package Webiny\Component\Router\Route */ class Route { use StdLibTrait; /** * @var string */ private $path = '/'; /** * @var string The raw path defined in config */ private $realPath = ''; /** * @var string */ private $callback; /** * @var array */ private $options = []; /** * @var string */ private $host = ''; /** * @var array */ private $schemes = []; /** * @var array */ private $methods = []; /** * @var array */ private $tags = []; /** * @var null|CompiledRoute */ private $compiledRoute = null; /** * Base constructor. * * @param string $path Path with parameter names that identifies the route. * @param string|array $callback Attached callback for this route. * @param array $options List of options, mostly for parameters. Common option keys are 'pattern' and 'default'. * Pattern defines the regular expression for the defined parameter. Default sets the default value for the parameter * if it's not matched withing the route. * @param string $host Fully qualified host name that will be added as a filer for matching the url. * @param array $schemes An array of supported schemas that the url must match. * @param array $methods An array of supported methods that the url must match. */ public function __construct($path, $callback, $options = [], $host = '', $schemes = [], $methods = []) { $this->setPath($path); $this->setCallback($callback); $this->setOptions($options); $this->setHost($host); $this->setSchemes($schemes); $this->setMethods($methods); } /** * Sets the route path. * * @param string $path Route path. * * @return $this */ public function setPath($path) { $this->path = ''; $this->realPath = $path; if(!empty($path)) { $this->path .= $this->str($path)->trim()->trimLeft('/')->trimRight('/')->val(); } return $this; } /** * Get the route path. * * @return string */ public function getPath() { return $this->path; } /** * Get the real path. * * @return string */ public function getRealPath() { return $this->realPath; } /** * Set the route callback. * * @param string|array $callback Callback that will be attached to this route. * Note that this callback can be overwritten during the routing process. * * @return $this */ public function setCallback($callback) { $this->callback = $callback; return $this; } /** * Get the attached callback name. * * @return string|array */ public function getCallback() { return $this->callback; } /** * Set route options. * * @param array $options An array of options. Each option must have a name and a list of attributes and their values. * Common attributes are 'prefix' and 'default'. * * @return $this */ public function setOptions(array $options) { $this->options = []; foreach ($options as $k => $v) { $this->addOption($k, (array)$v); } return $this; } /** * Adds a single route option. * * @param string $name Name of the parameter to which the option should be attached. * @param array $attributes An array of options. * * @return $this */ public function addOption($name, array $attributes) { $this->options[$name] = new RouteOption($name, $attributes); return $this; } /** * Checks if route has options attached to the given parameter. * * @param string $name Name of the route parameter. * * @return bool */ public function hasOption($name) { return array_key_exists($name, $this->options); } /** * Returns route options. * * @return array */ public function getOptions() { return $this->options; } /** * Sets the host name to the route. * When defining a host name, the route must first match the host in order that it could match the route path. * * @param string $host Host name. * * @return $this */ public function setHost($host) { $this->host = $host; return $this; } /** * Get current host name. * Example host name: webiny.com | www.webiny.com * * @return string */ public function getHost() { return $this->host; } /** * Match only requests that are within this set of schemes. * Example scheme: http | https * * @param array|string $schemes Scheme(s) to match. * * @return $this */ public function setSchemes($schemes) { $this->schemes = array_map('strtolower', (array)$schemes); return $this; } /** * Get the current defined schemes. * * @return array */ public function getSchemes() { return $this->schemes; } /** * Match only requests that are within this set of methods. * Example methods: POST | GET * * @param array|string $methods Method(s) to match. * * @return $this */ public function setMethods($methods) { $this->methods = array_map('strtoupper', $methods); return $this; } /** * Get the current defined methods. * * @return array */ public function getMethods() { return $this->methods; } /** * Sets the route tags. * * @param array $tags * * @return $this */ public function setTags(array $tags) { $this->tags = $tags; return $this; } /** * Get the route tags. * * @return array */ public function getTags() { return $this->tags; } /** * Compiles the route object and returns an instance of CompiledRoute. * * @return CompiledRoute */ public function compile() { if($this->isNull($this->compiledRoute)) { $this->compiledRoute = RouteCompiler::compile($this); } return $this->compiledRoute; } }
Webiny/Framework
src/Webiny/Component/Router/Route/Route.php
PHP
mit
6,931
<div class="row section"> <h2>Chancecoin Web casino</h2> <p>The Web casino is a single HTML file that you can <a href="https://github.com/chancecoin/chancecoinj/blob/master/index.html">download to your desktop</a> or run from <a href="http://chancecoin.github.io/">GitHub</a>.</p> <h2>Chancecoin desktop software &#8212; including decentralized casino, decentralized exchange, and wallet</h2> <ul> <li><a href="http://chancecoin.github.io/downloads/Chancecoin-2.9.zip">Download Chancecoin-2.9.zip</a></li> <li>We no longer support versions of Chancecoin earlier than version 2.9. The official Chancecoin implementation uses Java. We no longer support the Python implementation.</li> <li>Download and install Java SE Runtime Environment 8 from <a href="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html">http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html</a>.</li> <li>Unzip the Chancecoin zip file.</li> <li>Run Chancecoin.jar.</li> <li>If you are using OS X and your security settings prevent you from opening the jar file, right click on it and choose "Open."</li> </ul> <h3>Upgrade instructions</h3> <ul> <li>The Chancecoin software will automatically update to the latest version. If you are upgrading manually, you will need to copy and paste database and wallet files from the old version into the new version. These files can be found in the "resources/db" folder.</li> </ul> <h3>Importing your addresses</h3> <ul> <li>If you are a first time user and would like to import your Bitcoin address into Chancecoin, simply open the Chancecoin software and go to the "Wallet" page. From there, you can import your private key in WIF format.</li> <li>If you are using Blockchain.info, go to your Wallet, click on "Import / Export," click "Export Unencrypted," choose "Bitcoin-Qt Format," and copy the "priv" key.</li> </ul> </div>
chancecoin/chancecoin.github.io
templates/participate.html
HTML
mit
1,925
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>serial_port_service::serial_port_service</title> <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../boost_asio.html" title="Boost.Asio"> <link rel="up" href="../serial_port_service.html" title="serial_port_service"> <link rel="prev" href="send_break.html" title="serial_port_service::send_break"> <link rel="next" href="set_option.html" title="serial_port_service::set_option"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td align="center"><a href="../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="send_break.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../serial_port_service.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="set_option.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="boost_asio.reference.serial_port_service.serial_port_service"></a><a class="link" href="serial_port_service.html" title="serial_port_service::serial_port_service">serial_port_service::serial_port_service</a> </h4></div></div></div> <p> <a class="indexterm" name="idp191218192"></a> Construct a new serial port service for the specified <a class="link" href="../io_service.html" title="io_service"><code class="computeroutput"><span class="identifier">io_service</span></code></a>. </p> <pre class="programlisting"><span class="identifier">serial_port_service</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_service</span> <span class="special">&amp;</span> <span class="identifier">io_service</span><span class="special">);</span> </pre> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2014 Christopher M. Kohlhoff<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="send_break.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../serial_port_service.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="set_option.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
rkq/cxxexp
third-party/src/boost_1_56_0/doc/html/boost_asio/reference/serial_port_service/serial_port_service.html
HTML
mit
3,703
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-models-table' };
bmac/ember-models-table
index.js
JavaScript
mit
90
// // Copyright 2016 Intel Corporation // // 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 in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // module.exports = function( grunt ) { "use strict"; var path = require( "path" ); var suites; require( "load-grunt-config" )( grunt, { configPath: [ path.join( __dirname, "grunt-build", "tasks", "options" ), path.join( __dirname, "grunt-build", "tasks" ) ], init: true } ); suites = grunt.option( "ocf-suites" ) ? grunt.option( "ocf-suites" ).split( "," ) : undefined; if ( suites ) { grunt.config.set( "iot-js-api.plain.tests", suites ); grunt.config.set( "iot-js-api.secure.tests", suites ); grunt.config.set( "iot-js-api.coverage.tests", suites ); } require( "load-grunt-tasks" )( grunt ); grunt.task.loadNpmTasks( "iot-js-api" ); };
otcshare/iotivity-node
Gruntfile.js
JavaScript
mit
1,253
#!/bin/bash # # Script to launch the CarND Unity simulator USER_PROFILE="profile.tmp" if [ ! -f "$USER_PROFILE" ]; then echo "What is the full path to your Unity simulator?" read unity_path # write to the file echo "$unity_path" > $USER_PROFILE else unity_path=$(cat "$USER_PROFILE") fi $unity_path
shernshiou/CarND
Term3/03-CarND-Capstone/ros/src/styx/unity_simulator_launcher.sh
Shell
mit
327
<?php /* Whois.php PHP classes to conduct whois queries Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic Maintained by David Saez (david@ols.es) For the most recent version of this package visit: http://www.phpwhois.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* neulevel.whois 2.2 David Saez */ /* neulevel.whois 1.0 by Brian Blood <brian@macserve.net> */ if (!defined('__BIZ_HANDLER__')) define('__BIZ_HANDLER__', 1); require_once('whois.parser.php'); class biz_handler { function parse($data_str, $query) { $items = array( 'Domain Name:' => 'domain.name', 'Domain ID:' => 'domain.handle', 'Sponsoring Registrar:' => 'domain.sponsor', 'Domain Status:' => 'domain.status', 'Name Server:' => 'domain.nserver.', 'Domain Registration Date:' => 'domain.created', 'Domain Expiration Date:' => 'domain.expires', 'Domain Last Updated Date:' => 'domain.changed', 'Registrant ID:' => 'owner.handle', 'Registrant Name:' => 'owner.name', 'Registrant Organization:' => 'owner.organization', 'Registrant Address1:' => 'owner.address.street.0', 'Registrant Address2:' => 'owner.address.street.1', 'Registrant Postal Code:' => 'owner.address.pcode', 'Registrant City:' => 'owner.address.city', 'Registrant State/Province:' => 'owner.address.state', 'Registrant Country:' => 'owner.address.country', 'Registrant Phone Number:' => 'owner.phone', 'Registrant Facsimile Number:' => 'owner.fax', 'Registrant Email:' => 'owner.email', 'Administrative Contact ID:' => 'admin.handle', 'Administrative Contact Name:' => 'admin.name', 'Administrative Contact Organization:' => 'admin.organization', 'Administrative Contact Address1:' => 'admin.address.street.0', 'Administrative Contact Address2:' => 'admin.address.street.1', 'Administrative Contact Postal Code:' => 'admin.address.pcode', 'Administrative Contact City:' => 'admin.address.city', 'Administrative Contact State/Province:' => 'admin.address.state', 'Administrative Contact Country:' => 'admin.address.country', 'Administrative Contact Phone Number:' => 'admin.phone', 'Administrative Contact Email:' => 'admin.email', 'Administrative Contact Facsimile Number:' => 'admin.fax', 'Technical Contact ID:' => 'tech.handle', 'Technical Contact Name:' => 'tech.name', 'Technical Contact Organization:' => 'tech.organization', 'Technical Contact Address1:' => 'tech.address.street.0', 'Technical Contact Address2:' => 'tech.address.street.1', 'Technical Contact Postal Code:' => 'tech.address.pcode', 'Technical Contact City:' => 'tech.address.city', 'Technical Contact State/Province:' => 'tech.address.state', 'Technical Contact Country:' => 'tech.address.country', 'Technical Contact Phone Number:' => 'tech.phone', 'Technical Contact Facsimile Number:' => 'tech.fax', 'Technical Contact Email:' => 'tech.email', 'Billing Contact ID:' => 'billing.handle', 'Billing Contact Name:' => 'billing.name', 'Billing Contact Organization:' => 'billing.organization', 'Billing Contact Address1:' => 'billing.address.street.1', 'Billing Contact Address2:' => 'billing.address.street.0', 'Billing Contact Postal Code:' => 'billing.address.pcode', 'Billing Contact City:' => 'billing.address.city', 'Billing Contact State/Province:' => 'billing.address.state', 'Billing Contact Country:' => 'billing.address.country', 'Billing Contact Phone Number:' => 'billing.phone', 'Billing Contact Facsimile Number:' => 'billing.fax', 'Billing Contact Email:' => 'billing.email' ); $r['regrinfo'] = generic_parser_b($data_str['rawdata'], $items, '-md--y'); $r['regyinfo'] = array( 'referrer' => 'http://www.neulevel.biz', 'registrar' => 'NEULEVEL' ); return ($r); } } ?>
maastermedia/sfWhoisPlugin
lib/phpwhois/whois.biz.php
PHP
mit
5,383
local conf = { sailor = { app_name = 'Sailor! A Lua MVC Framework', default_static = nil, -- If defined, default page will be a rendered lp as defined. -- Example: 'maintenance' will render /views/maintenance.lp default_controller = 'main', default_action = 'index', theme = 'default', layout = 'main', route_parameter = 'r', default_error404 = 'error/404', enable_autogen = true, -- default is false, should be true only in development environment friendly_urls = false, max_upload = 1024 * 1024, environment = "test", -- this will use db configuration named test }, db = { test = { -- current environment driver = 'mysql', host = 'localhost', user = '', pass = '', dbname = '' } }, smtp = { server = '', user = '', pass = '', from = '' }, debug = { inspect = true } } return conf
baiwenlu/sailor
test/dev-app/conf/conf.lua
Lua
mit
859
<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> <title>Demo: Copy to Canvas</title> <script type="module" src="../ccwc-glvideo.js"></script> <style> ccwc-glvideo { width: 250px; height: 250px; } </style> </head> <body> <h2>Demo: Apply WebGL Filter</h2> <p> Apply WebGL Filter - possible glfilters are "sepia", "greyscale", "sobel_edge_detection", and "freichen_edge_detection" </p> <ccwc-glvideo src="SampleVideo_360x240_1mb.mp4" useCanvasForDisplay canvasRefreshInterval="10" useWebGL='{"filter": "sobel_edge_detection", "textureOffset": { "x": -250, "y": -10 }}'> </ccwc-glvideo> </body> </html>
creativecode-webcomponents/ccwc-videoplayer
demo/videogl-texture-offset.html
HTML
mit
904
// package bitswap implements the IPFS Exchange interface with the BitSwap // bilateral exchange protocol. package bitswap import ( "errors" "math" "sync" "time" process "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess" procctx "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context" context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" blocks "github.com/ipfs/go-ipfs/blocks" blockstore "github.com/ipfs/go-ipfs/blocks/blockstore" key "github.com/ipfs/go-ipfs/blocks/key" exchange "github.com/ipfs/go-ipfs/exchange" decision "github.com/ipfs/go-ipfs/exchange/bitswap/decision" bsmsg "github.com/ipfs/go-ipfs/exchange/bitswap/message" bsnet "github.com/ipfs/go-ipfs/exchange/bitswap/network" notifications "github.com/ipfs/go-ipfs/exchange/bitswap/notifications" wantlist "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist" peer "github.com/ipfs/go-ipfs/p2p/peer" "github.com/ipfs/go-ipfs/thirdparty/delay" logging "github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0" ) var log = logging.Logger("bitswap") const ( // maxProvidersPerRequest specifies the maximum number of providers desired // from the network. This value is specified because the network streams // results. // TODO: if a 'non-nice' strategy is implemented, consider increasing this value maxProvidersPerRequest = 3 providerRequestTimeout = time.Second * 10 hasBlockTimeout = time.Second * 15 provideTimeout = time.Second * 15 sizeBatchRequestChan = 32 // kMaxPriority is the max priority as defined by the bitswap protocol kMaxPriority = math.MaxInt32 HasBlockBufferSize = 256 provideKeysBufferSize = 2048 provideWorkerMax = 512 ) var rebroadcastDelay = delay.Fixed(time.Second * 10) // New initializes a BitSwap instance that communicates over the provided // BitSwapNetwork. This function registers the returned instance as the network // delegate. // Runs until context is cancelled. func New(parent context.Context, p peer.ID, network bsnet.BitSwapNetwork, bstore blockstore.Blockstore, nice bool) exchange.Interface { // important to use provided parent context (since it may include important // loggable data). It's probably not a good idea to allow bitswap to be // coupled to the concerns of the IPFS daemon in this way. // // FIXME(btc) Now that bitswap manages itself using a process, it probably // shouldn't accept a context anymore. Clients should probably use Close() // exclusively. We should probably find another way to share logging data ctx, cancelFunc := context.WithCancel(parent) notif := notifications.New() px := process.WithTeardown(func() error { notif.Shutdown() return nil }) bs := &Bitswap{ self: p, blockstore: bstore, notifications: notif, engine: decision.NewEngine(ctx, bstore), // TODO close the engine with Close() method network: network, findKeys: make(chan *blockRequest, sizeBatchRequestChan), process: px, newBlocks: make(chan *blocks.Block, HasBlockBufferSize), provideKeys: make(chan key.Key, provideKeysBufferSize), wm: NewWantManager(ctx, network), } go bs.wm.Run() network.SetDelegate(bs) // Start up bitswaps async worker routines bs.startWorkers(px, ctx) // bind the context and process. // do it over here to avoid closing before all setup is done. go func() { <-px.Closing() // process closes first cancelFunc() }() procctx.CloseAfterContext(px, ctx) // parent cancelled first return bs } // Bitswap instances implement the bitswap protocol. type Bitswap struct { // the ID of the peer to act on behalf of self peer.ID // network delivers messages on behalf of the session network bsnet.BitSwapNetwork // the peermanager manages sending messages to peers in a way that // wont block bitswap operation wm *WantManager // blockstore is the local database // NB: ensure threadsafety blockstore blockstore.Blockstore notifications notifications.PubSub // send keys to a worker to find and connect to providers for them findKeys chan *blockRequest engine *decision.Engine process process.Process newBlocks chan *blocks.Block provideKeys chan key.Key counterLk sync.Mutex blocksRecvd int dupBlocksRecvd int dupDataRecvd uint64 } type blockRequest struct { keys []key.Key ctx context.Context } // GetBlock attempts to retrieve a particular block from peers within the // deadline enforced by the context. func (bs *Bitswap) GetBlock(parent context.Context, k key.Key) (*blocks.Block, error) { // Any async work initiated by this function must end when this function // returns. To ensure this, derive a new context. Note that it is okay to // listen on parent in this scope, but NOT okay to pass |parent| to // functions called by this one. Otherwise those functions won't return // when this context's cancel func is executed. This is difficult to // enforce. May this comment keep you safe. ctx, cancelFunc := context.WithCancel(parent) ctx = logging.ContextWithLoggable(ctx, logging.Uuid("GetBlockRequest")) log.Event(ctx, "Bitswap.GetBlockRequest.Start", &k) defer log.Event(ctx, "Bitswap.GetBlockRequest.End", &k) defer func() { cancelFunc() }() promise, err := bs.GetBlocks(ctx, []key.Key{k}) if err != nil { return nil, err } select { case block, ok := <-promise: if !ok { select { case <-ctx.Done(): return nil, ctx.Err() default: return nil, errors.New("promise channel was closed") } } return block, nil case <-parent.Done(): return nil, parent.Err() } } func (bs *Bitswap) WantlistForPeer(p peer.ID) []key.Key { var out []key.Key for _, e := range bs.engine.WantlistForPeer(p) { out = append(out, e.Key) } return out } // GetBlocks returns a channel where the caller may receive blocks that // correspond to the provided |keys|. Returns an error if BitSwap is unable to // begin this request within the deadline enforced by the context. // // NB: Your request remains open until the context expires. To conserve // resources, provide a context with a reasonably short deadline (ie. not one // that lasts throughout the lifetime of the server) func (bs *Bitswap) GetBlocks(ctx context.Context, keys []key.Key) (<-chan *blocks.Block, error) { select { case <-bs.process.Closing(): return nil, errors.New("bitswap is closed") default: } promise := bs.notifications.Subscribe(ctx, keys...) for _, k := range keys { log.Event(ctx, "Bitswap.GetBlockRequest.Start", &k) } bs.wm.WantBlocks(keys) req := &blockRequest{ keys: keys, ctx: ctx, } select { case bs.findKeys <- req: return promise, nil case <-ctx.Done(): return nil, ctx.Err() } } // CancelWant removes a given key from the wantlist func (bs *Bitswap) CancelWants(ks []key.Key) { bs.wm.CancelWants(ks) } // HasBlock announces the existance of a block to this bitswap service. The // service will potentially notify its peers. func (bs *Bitswap) HasBlock(blk *blocks.Block) error { select { case <-bs.process.Closing(): return errors.New("bitswap is closed") default: } err := bs.tryPutBlock(blk, 4) // attempt to store block up to four times if err != nil { log.Errorf("Error writing block to datastore: %s", err) return err } bs.notifications.Publish(blk) select { case bs.newBlocks <- blk: // send block off to be reprovided case <-bs.process.Closing(): return bs.process.Close() } return nil } func (bs *Bitswap) tryPutBlock(blk *blocks.Block, attempts int) error { var err error for i := 0; i < attempts; i++ { if err = bs.blockstore.Put(blk); err == nil { break } time.Sleep(time.Millisecond * time.Duration(400*(i+1))) } return err } func (bs *Bitswap) connectToProviders(ctx context.Context, entries []wantlist.Entry) { ctx, cancel := context.WithCancel(ctx) defer cancel() // Get providers for all entries in wantlist (could take a while) wg := sync.WaitGroup{} for _, e := range entries { wg.Add(1) go func(k key.Key) { defer wg.Done() child, cancel := context.WithTimeout(ctx, providerRequestTimeout) defer cancel() providers := bs.network.FindProvidersAsync(child, k, maxProvidersPerRequest) for prov := range providers { go func(p peer.ID) { bs.network.ConnectTo(ctx, p) }(prov) } }(e.Key) } wg.Wait() // make sure all our children do finish. } func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg.BitSwapMessage) { // This call records changes to wantlists, blocks received, // and number of bytes transfered. bs.engine.MessageReceived(p, incoming) // TODO: this is bad, and could be easily abused. // Should only track *useful* messages in ledger iblocks := incoming.Blocks() if len(iblocks) == 0 { return } // quickly send out cancels, reduces chances of duplicate block receives var keys []key.Key for _, block := range iblocks { if _, found := bs.wm.wl.Contains(block.Key()); !found { log.Info("received un-asked-for block: %s", block) continue } keys = append(keys, block.Key()) } bs.wm.CancelWants(keys) wg := sync.WaitGroup{} for _, block := range iblocks { wg.Add(1) go func(b *blocks.Block) { defer wg.Done() if err := bs.updateReceiveCounters(b); err != nil { return // ignore error, is either logged previously, or ErrAlreadyHaveBlock } k := b.Key() log.Event(ctx, "Bitswap.GetBlockRequest.End", &k) log.Debugf("got block %s from %s", b, p) if err := bs.HasBlock(b); err != nil { log.Warningf("ReceiveMessage HasBlock error: %s", err) } }(block) } wg.Wait() } var ErrAlreadyHaveBlock = errors.New("already have block") func (bs *Bitswap) updateReceiveCounters(b *blocks.Block) error { bs.counterLk.Lock() defer bs.counterLk.Unlock() bs.blocksRecvd++ has, err := bs.blockstore.Has(b.Key()) if err != nil { log.Infof("blockstore.Has error: %s", err) return err } if err == nil && has { bs.dupBlocksRecvd++ bs.dupDataRecvd += uint64(len(b.Data)) } if has { return ErrAlreadyHaveBlock } return nil } // Connected/Disconnected warns bitswap about peer connections func (bs *Bitswap) PeerConnected(p peer.ID) { bs.wm.Connected(p) } // Connected/Disconnected warns bitswap about peer connections func (bs *Bitswap) PeerDisconnected(p peer.ID) { bs.wm.Disconnected(p) bs.engine.PeerDisconnected(p) } func (bs *Bitswap) ReceiveError(err error) { log.Infof("Bitswap ReceiveError: %s", err) // TODO log the network error // TODO bubble the network error up to the parent context/error logger } func (bs *Bitswap) Close() error { return bs.process.Close() } func (bs *Bitswap) GetWantlist() []key.Key { var out []key.Key for _, e := range bs.wm.wl.Entries() { out = append(out, e.Key) } return out }
sroerick/go-ipfs
exchange/bitswap/bitswap.go
GO
mit
10,821
# coding: utf-8 from django.views.generic import CreateView, UpdateView, DeleteView from django.http import HttpResponse, HttpResponseRedirect from django.template.loader import render_to_string from django.template import RequestContext from django.core.serializers.json import DjangoJSONEncoder from django.conf import settings try: import json except ImportError: from django.utils import simplejson as json class JSONResponseMixin(object): """ This is a slightly modified version from django-braces project (https://github.com/brack3t/django-braces) """ content_type = None json_dumps_kwargs = None def get_content_type(self): return self.content_type or u"application/json" def get_json_dumps_kwargs(self): if self.json_dumps_kwargs is None: self.json_dumps_kwargs = {} self.json_dumps_kwargs.setdefault(u'ensure_ascii', False) return self.json_dumps_kwargs def render_json_response(self, context_dict, status=200): """ Limited serialization for shipping plain data. Do not use for models or other complex or custom objects. """ json_context = json.dumps( context_dict, cls=DjangoJSONEncoder, **self.get_json_dumps_kwargs() ).encode(u'utf-8') return HttpResponse( json_context, content_type=self.get_content_type(), status=status ) class AjaxFormMixin(JSONResponseMixin): message_template = None def pre_save(self): pass def post_save(self): pass def form_valid(self, form): """ If the request is ajax, save the form and return a json response. Otherwise return super as expected. """ self.object = form.save(commit=False) self.pre_save() self.object.save() if hasattr(form, 'save_m2m'): form.save_m2m() self.post_save() if self.request.is_ajax(): return self.render_json_response(self.get_success_result()) return HttpResponseRedirect(self.get_success_url()) def form_invalid(self, form): """ We have errors in the form. If ajax, return them as json. Otherwise, proceed as normal. """ if self.request.is_ajax(): return self.render_json_response(self.get_error_result(form)) return super(AjaxFormMixin, self).form_invalid(form) def get_message_template_context(self): return { 'instance': self.object, 'object': self.object } def get_message_template_html(self): return render_to_string( self.message_template, self.get_message_template_context(), context_instance=RequestContext(self.request) ) def get_response_message(self): message = '' if self.message_template: message = self.get_message_template_html() return message def get_success_result(self): return {'status': 'ok', 'message': self.get_response_message()} def get_error_result(self, form): html = render_to_string( self.template_name, self.get_context_data(form=form), context_instance=RequestContext(self.request) ) return {'status': 'error', 'message': html} DEFAULT_FORM_TEMPLATE = getattr(settings, "FM_DEFAULT_FORM_TEMPLATE", "fm/form.html") class AjaxCreateView(AjaxFormMixin, CreateView): template_name = DEFAULT_FORM_TEMPLATE class AjaxUpdateView(AjaxFormMixin, UpdateView): template_name = DEFAULT_FORM_TEMPLATE class AjaxDeleteView(JSONResponseMixin, DeleteView): def pre_delete(self): pass def post_delete(self): pass def get_success_result(self): return {'status': 'ok'} def delete(self, request, *args, **kwargs): """ The same logic as in DeleteView but some hooks and JSON response in case of AJAX request """ self.object = self.get_object() self.pre_delete() self.object.delete() self.post_delete() if self.request.is_ajax(): return self.render_json_response(self.get_success_result()) success_url = self.get_success_url() return HttpResponseRedirect(success_url)
kobox/achilles.pl
src/static/fm/views.py
Python
mit
4,377
<?php class UserHelper { /** * Verify that the logged in user is an administrator. * * @example UserHelper::verifyAdministrator($db, $_SESSION['userid'], $_SESSION["key"]) * * @param $db * @param $user_id * @param $key * @return bool */ public static function verifyAdministrator ($db, $user_id, $key) { $query = "SELECT count(user_id) as amount FROM users WHERE user_id=%d AND tempkey='%s' AND uploaderstatus = 99"; $result = $db->select(sprintf($query, $user_id, $key)); return $result[0]['amount'] === '1'; } /** * Verify that the logged in user is the given role. * * @example UserHelper::verifyRole($db, $_SESSION['userid'], $_SESSION['key'], 99) * * @param $db * @param $user_id * @param $key * @param $roleNumber * @return bool */ public static function verifyRole ($db, $user_id, $key, $roleNumber) { $query = "SELECT COUNT(user_id) as amount FROM users WHERE user_id=%d AND tempkey='%s' AND uploaderstatus = %d;"; $result = $db->select(sprintf($query, $user_id, $key, $roleNumber)); return $result[0]['amount'] === '1'; } /** * Return Human readable user status string along with the database IDs. * * @example UserHelper::translateUserStatus(99); * * @param $uploaderstatus * @return string */ public static function translateUserStatus ($uploaderstatus) { switch ($uploaderstatus) { case 99: return 'Administrator User (99)'; break; case 3: return 'VIP User (3)'; break; case 2: return 'Trusted User (2)'; break; case -1: return 'Banned User (-1)'; break; default: return 'Basic User (0)'; } } /** * Returns the HTML string to display user icons. * * @example UserHelper::displayUserIcon(99); * * @param $status * @return string */ public static function displayUserIcon ($status) { switch ($status) { case 99: return ' <img src="/css/vip.png" alt="Administrator User">'; break; case 3: return ' <img src="/css/vip.png" alt="VIP User">'; break; case 2: return ' <img src="/css/trusted.png" alt="Trusted User">'; break; default: return ''; } } }
KevinJDurant/PVT-OpenTorrentSite
php/libs/UserHelper.php
PHP
mit
2,703
%////////////////////////////////////////////////////////////////////////////// % % Copyright (c) 2007,2009 Daniel Adler <dadler@uni-goettingen.de>, % Tassilo Philipp <tphilipp@potion-studios.com> % % Permission to use, copy, modify, and distribute this software for any % purpose with or without fee is hereby granted, provided that the above % copyright notice and this permission notice appear in all copies. % % THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES % WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF % MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR % ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES % WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN % ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF % OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. % %////////////////////////////////////////////////////////////////////////////// % ================================================== % x86 % ================================================== \subsection{x86 Calling Conventions} \paragraph{Overview} There are numerous different calling conventions on the x86 processor architecture, like cdecl \cite{x86cdecl}, MS fastcall \cite{x86Winfastcall}, GNU fastcall \cite{x86GNUfastcall}, Borland fastcall \cite{x86Borlandfastcall}, Watcom fastcall \cite{x86Watcomfastcall}, Win32 stdcall \cite{x86Winstdcall}, MS thiscall \cite{x86Winthiscall}, GNU thiscall \cite{x86GNUthiscall}, the pascal calling convention \cite{x86Pascal} and a cdecl-like version for Plan9 \cite{x86Plan9} (dubbed plan9call by us), etc. \paragraph{\product{dyncall} support} Currently cdecl, stdcall, fastcall (MS and GNU), thiscall (MS and GNU) and plan9call are supported.\\ \\ \subsubsection{cdecl} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch\\ {\bf edx} & scratch, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 cdecl calling convention} \end{table} \pagebreak \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item caller cleans up the stack \item all arguments are pushed onto the stack \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers \item floating point types are returned via the st0 register \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 cdecl calling convention} \end{figure} \pagebreak \subsubsection{MS fastcall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch, parameter 0\\ {\bf edx} & scratch, parameter 1, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 fastcall (MS) calling convention} \end{table} \pagebreak \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item called function cleans up the stack \item first two integers/pointers (\textless=\ 32bit) are passed via ecx and edx (even if preceded by other arguments) \item integer types 64 bits in size @@@ ? first in edx:eax ? \item if first argument is a 64 bit integer, it is passed via ecx and edx \item all other parameters are pushed onto the stack \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers@@@verify \item floating point types are returned via the st0 register@@@ really ? \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 fastcall (MS) calling convention} \end{figure} \pagebreak \subsubsection{GNU fastcall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch, parameter 0\\ {\bf edx} & scratch, parameter 1, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 fastcall (GNU) calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item called function cleans up the stack \item first two integers/pointers (\textless=\ 32bit) are passed via ecx and edx (even if preceded by other arguments) \item if first argument is a 64 bit integer, it is pushed on the stack and the two registers are skipped \item all other parameters are pushed onto the stack \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register. \item integers \textgreater\ 32 bits are returned via the eax and edx registers. \item floating point types are returned via the st0. \end{itemize} \pagebreak \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 fastcall (GNU) calling convention} \end{figure} \subsubsection{Borland fastcall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, parameter 0, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch, parameter 2\\ {\bf edx} & scratch, parameter 1, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 fastcall (Borland) calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: left-to-right \item called function cleans up the stack \item first three integers/pointers (\textless=\ 32bit) are passed via eax, ecx and edx (even if preceded by other arguments@@@?) \item integer types 64 bits in size @@@ ? \item all other parameters are pushed onto the stack \end{itemize} \pagebreak \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers@@@ verify \item floating point types are returned via the st0 register@@@ really ? \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 fastcall (Borland) calling convention} \end{figure} \subsubsection{Watcom fastcall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, parameter 0, return value@@@\\ {\bf ebx} & scratch when used for parameter, parameter 2\\ {\bf ecx} & scratch when used for parameter, parameter 3\\ {\bf edx} & scratch when used for parameter, parameter 1, return value@@@\\ {\bf esi} & scratch when used for return pointer @@@??\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 fastcall (Watcom) calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item called function cleans up the stack \item first four integers/pointers (\textless=\ 32bit) are passed via eax, edx, ebx and ecx (even if preceded by other arguments@@@?) \item integer types 64 bits in size @@@ ? \item all other parameters are pushed onto the stack \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register@@@verify, I thnik its esi? \item integers \textgreater\ 32 bits are returned via the eax and edx registers@@@ verify \item floating point types are returned via the st0 register@@@ really ? \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 fastcall (Watcom) calling convention} \end{figure} \subsubsection{win32 stdcall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch\\ {\bf edx} & scratch, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 stdcall calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item Stack parameter order: right-to-left \item Called function cleans up the stack \item All parameters are pushed onto the stack \item Stack is usually 4 byte aligned (GCC \textgreater=\ 3.x seems to use a 16byte alignement@@@) \item Function name is decorated by prepending an underscore character and appending a '@' character and the number of bytes of stack space required \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers \item floating point types are returned via the st0 register \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 stdcall calling convention} \end{figure} \subsubsection{MS thiscall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch, parameter 0\\ {\bf edx} & scratch, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 thiscall (MS) calling convention} \end{table} \newpage \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item called function cleans up the stack \item first parameter (this pointer) is passed via ecx \item all other parameters are pushed onto the stack \item Function name is decorated by prepending a '@' character and appending a '@' character and the number of bytes (decimal) of stack space required \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers@@@verify \item floating point types are returned via the st0 register@@@ really ? \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 thiscall (MS) calling convention} \end{figure} \subsubsection{GNU thiscall} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch\\ {\bf edx} & scratch, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 thiscall (GNU) calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item caller cleans up the stack \item all parameters are pushed onto the stack \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers@@@verify \item floating point types are returned via the st0 register@@@ really ? \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 thiscall (GNU) calling convention} \end{figure} \subsubsection{pascal} The best known uses of the pascal calling convention are the 16 bit OS/2 APIs, Microsoft Windows 3.x and Borland Delphi 1.x. \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & permanent\\ {\bf ecx} & scratch\\ {\bf edx} & scratch, return value\\ {\bf esi} & permanent\\ {\bf edi} & permanent\\ {\bf ebp} & permanent\\ {\bf esp} & stack pointer\\ {\bf st0} & scratch, floating point return value\\ {\bf st1-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 pascal calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: left-to-right \item called function cleans up the stack \item all parameters are pushed onto the stack \end{itemize} \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits are returned via the eax and edx registers \item floating point types are returned via the st0 register \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \caption{Stack layout on x86 pascal calling convention} \end{figure} \newpage \subsubsection{plan9call} \paragraph{Registers and register usage} \begin{table}[h] \begin{tabular}{3 B} \hline Name & Brief description\\ \hline {\bf eax} & scratch, return value\\ {\bf ebx} & scratch\\ {\bf ecx} & scratch\\ {\bf edx} & scratch\\ {\bf esi} & scratch\\ {\bf edi} & scratch\\ {\bf ebp} & scratch\\ {\bf esp} & stack pointer\\ {\bf st0-st7} & scratch\\ \hline \end{tabular} \caption{Register usage on x86 plan9call calling convention} \end{table} \paragraph{Parameter passing} \begin{itemize} \item stack parameter order: right-to-left \item caller cleans up the stack%@@@ doesn't belong to "parameter passing" \item all parameters are pushed onto the stack \end{itemize} \pagebreak \paragraph{Return values} \begin{itemize} \item return values of pointer or integral type (\textless=\ 32 bits) are returned via the eax register \item integers \textgreater\ 32 bits or structures are returned by the caller allocating the space and passing a pointer to the callee as a new, implicit first parameter (this means, on the stack) \item floating point types are returned via the st0 register \end{itemize} \paragraph{Stack layout} Stack directly after function prolog:\\ \begin{figure}[h] \begin{tabular}{5|3|1 1} \hhline{~-~~} & \vdots & & \\ \hhline{~=~~} local data & & & \mrrbrace{5}{caller's frame} \\ \hhline{~-~~} \mrlbrace{3}{parameter area} & \ldots & \mrrbrace{3}{stack parameters} & \\ & \ldots & & \\ & \ldots & & \\ \hhline{~-~~} & return address & & \\ \hhline{~=~~} local data & & & \mrrbrace{3}{current frame} \\ \hhline{~-~~} parameter area & & & \\ \hhline{~-~~} & \vdots & & \\ \hhline{~-~~} \end{tabular} \\ \\ \\ \caption{Stack layout on x86 plan9call calling convention} \end{figure}
atsushieno/jenoa
jni/dyncall/doc/callconvs/callconv_x86.tex
TeX
mit
30,321
require File.dirname(__FILE__) + '/spec_helper' describe SuperExport do end
Aissac/radiant-super-export-extension
spec/super_export_spec.rb
Ruby
mit
79
# Copyright (c) 2015 Boocock James <james.boocock@otago.ac.nz> # Author: Boocock James <james.boocock@otago.ac.nz> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from fine_mapping_pipeline.finemap.finemap import run_finemap, remove_surrogates, _write_matrix, _write_zscores import logging logging.basicConfig(level=logging.INFO) def test_remove_surrogate(tmpdir): input_matrix = 'tests/finemap_data/test.matrix' input_zscore = 'tests/finemap_data/test.Z' surrogates_out = 'tests/finemap_data/out.surro' (matrix, zscores) = remove_surrogates(input_matrix,input_zscore, surrogates_out) _write_matrix(matrix, "tests/finemap_data/out.matrix") _write_zscores(zscores, "tests/finemap_data/out.zscores") assert 1 == 2
theboocock/fine_mapping_pipeline
tests/test_run_finemap.py
Python
mit
1,755
package remoteio.common.core.compat; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import remoteio.common.block.BlockRemoteInterface; import remoteio.common.block.BlockRemoteInventory; import remoteio.common.lib.VisualState; import remoteio.common.tile.TileRemoteInterface; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import mcp.mobius.waila.api.IWailaDataProvider; import mcp.mobius.waila.api.IWailaRegistrar; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import remoteio.common.tile.TileRemoteInventory; import java.util.List; /** * @author dmillerw */ public class WailaProvider implements IWailaDataProvider { public static void registerProvider(IWailaRegistrar wailaRegistrar) { WailaProvider provider = new WailaProvider(); wailaRegistrar.registerStackProvider(provider, BlockRemoteInterface.class); wailaRegistrar.registerBodyProvider(provider, BlockRemoteInterface.class); wailaRegistrar.registerBodyProvider(provider, BlockRemoteInventory.class); wailaRegistrar.registerTailProvider(provider, BlockRemoteInventory.class); } @Override public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { TileEntity tileEntity = accessor.getTileEntity(); if (tileEntity != null && tileEntity instanceof TileRemoteInterface) { TileRemoteInterface tileRemoteInterface = (TileRemoteInterface) tileEntity; if (tileRemoteInterface.visualState == VisualState.CAMOUFLAGE_REMOTE) { if (tileRemoteInterface.remotePosition != null && tileRemoteInterface.remotePosition.inWorld(accessor.getWorld())) { return new ItemStack(tileRemoteInterface.remotePosition.getBlock(), 1, tileRemoteInterface.remotePosition.getMeta()); } } } return accessor.getStack(); } @Override public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { return null; } @Override public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { TileEntity tile = accessor.getTileEntity(); if(tile != null){ if(tile instanceof TileRemoteInterface){ TileRemoteInterface remoteInterface = (TileRemoteInterface) tile; if(!remoteInterface.visualState.isCamouflage()){ currenttip.add(remoteInterface.visualState.toString()); } } else if(tile instanceof TileRemoteInventory){ TileRemoteInventory remoteInventory = (TileRemoteInventory) tile; if(!remoteInventory.visualState.isCamouflage()){ currenttip.add(remoteInventory.visualState.toString()); } } } return currenttip; } @Override public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { TileEntity tile = accessor.getTileEntity(); if(tile != null){ if(tile instanceof TileRemoteInventory){ TileRemoteInventory remoteInventory = (TileRemoteInventory) tile; if(!remoteInventory.visualState.isCamouflage() && remoteInventory.getPlayer() != null){ currenttip.add("Bound To: " + remoteInventory.getPlayer().getDisplayName()); } } } return currenttip; } @Override public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z){ return tag; } }
s0cks/RemoteIO
src/main/java/remoteio/common/core/compat/WailaProvider.java
Java
mit
3,919
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="ico/favicon.ico"> <title>AppSensor - Application Intrusion Detection and Response</title> <!-- Bootstrap core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="css/font-awesome.min.css"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <!-- Custom styles for this template --> <link href="css/jumbotron.css" rel="stylesheet"> <!-- <link href="css/carousel.css" rel="stylesheet"> --> <link href="css/appsensor.css" rel="stylesheet"> </head> <!-- NAVBAR ================================================== --> <body> <a href="https://github.com/jtmelton/appsensor"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 100" src="img/gh_fork.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a> <div class="navbar-wrapper"> <div class="container"> <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <!-- navbar-inverse --> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">AppSensor</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li><a href="/">Home</a></li> <li class="active"><a href="overview.html">Overview</a></li> <li><a href="getting-started.html">Getting Started</a></li> <li><a href="user-guide.html">User Guide</a></li> <li><a href="documentation.html">Documentation</a></li> <li><a href="api.html">API</a></li> <li><a href="https://www.owasp.org/index.php/OWASP_AppSensor_Project" target="_blank"><i class="fa fa-globe fa-lg"></i> OWASP</a></li> <li><a href="#"></a></li> </ul> </div> </div> </div> </div> </div> <!-- page header --> <div class="jumbotron"> <div class="container"> <h1 class="pageheader">Overview</h1> <hr class="bluehr" /> </div> </div> <div class="container"> <div class="row alert alert-info"> <div class="col-md-1 text-center"> <i class="fa fa-info-circle fa-lg glyph3"></i> </div> <div class="col-md-11"> While this site primarily discusses the reference implementation of AppSensor, this page describes any AppSensor-like system. </div> </div> <p>&nbsp;</p><h2><i class="fa fa-file-text-o fa-lg"></i>&nbsp;&nbsp;&nbsp; Read the Documentation</h2><hr /> <p> The AppSensor Guide can be found here: [<a href="https://www.owasp.org/index.php/OWASP_AppSensor_Project" title="AppSensor Guide">https://www.owasp.org/index.php/OWASP_AppSensor_Project</a>]. The guide contains extensive discussions of the methodology behind AppSensor. There are various topics covered, including: <ul> <li>Overview of AppSensor</li> <li>Motivation for AppSensor</li> <li>Benefits of AppSensor</li> <li>Illustrative Case Studies</li> <li>Possible Deployment Models</li> <li>System Design Considerations</li> <li>System Integration Considerations</li> <li>Dashboard Design Concepts</li> </ul> </p> <p> The guide is the best resource for comprehensive coverage of the AppSensor concept as well as coverage of design ideas that are not used by the reference implementation. </p> <p>&nbsp;</p><h2><i class="fa fa-wrench fa-lg"></i>&nbsp;&nbsp;&nbsp; Configure AppSensor</h2><hr /> <p> Any AppSensor system will need some measure of configuration and setup. One defining characteristic for any AppSensor system is the methods of analysis that are supported. While the guide describes several (behavioral, model-driven, expert-system, stochastic, etc.), the simplest and that chosen by the reference implementation is a policy-driven analysis solution. This section briefly describes the steps involved in configuring a policy upon which to base your analysis. </p> <p> There are a few primary components of policy-based configuration: <ul> <li>Detection Points</li> <li>Thresholds</li> <li>Responses</li> </ul> </p> <p>We'll cover each of these briefly.</p> <h4>Detection Points</h4> <p> Detection Points (<a href="https://www.owasp.org/index.php/AppSensor_DetectionPoints" title="Detection Points">examples here</a>) represent the specific concerns you are interested in detecting within your application. These are suspcicious activities that may trigger an attack if detected with a certain frequency (defined by the threshold). Part of policy configuration is defining the detection points that your application should be able to handle. </p> <h4>Thresholds</h4> <p> Thresholds are simple definitions used to determine the acceptable number of events over a given period of time, for a given user or group of users. An example might be: <pre>3 IE2 events in 5 minutes for an individual user represents an attack.</pre> </p> <p>There can be more complex definitions of thresholds, namely trends, but these may or may not be necessary in your system.</p> <h4>Responses</h4> <p> Responses (<a href="https://www.owasp.org/index.php/AppSensor_ResponseActions" title="Responses">examples here</a>) are actions taken as the result of detecting that a certain detection point has crossed its' configured threshold, and therefore now represents an attack. Responses allow you to handle an attack in any way you like, given policy and legal requirements. The reference implementation allows for a chained response order, in which several responses can be configured, and executed as subsequent attacks for the same detection point are registered in the system. </p> <p>&nbsp;</p><h2><i class="fa fa-sliders fa-lg"></i>&nbsp;&nbsp;&nbsp; Instrument Your System</h2><hr /> <p> Another key component of a functional AppSensor is the system instrumentation. In order to detect and respond to events, the application and its' surrounding components must be capable of performing the initial event detection. The AppSensor system is responsible for evaluating where an event or series of events constitutes an attack as well as finding the appropriate response for said attack. However, the initial event detection is handled outside AppSensor. There are various ways for this to occur: <ul> <li>The application itself is augmented to detect events (most common)</li> <li>A WAF or some other security component external to the application detects events and/or attacks and reports them to AppSensor</li> <li>Application frameworks are modified, so the detection code is re-usable across applications (see ESAPI)</li> </ul> </p> <p> Whatever mechanism or set of mechanisms you use, instrumentation is critical as detection must happen first before analysis and response can occur within the AppSensor architecture. </p> <p>&nbsp;</p><h2><i class="fa fa-eye fa-lg"></i>&nbsp;&nbsp;&nbsp; Deploy and Monitor</h2><hr /> <p> The last step is deployment and monitoring. As with any production system, you must first test, then deploy your AppSensor system. </p> <p> However, the AppSensor system is somewhat unique in that it is intended to be a monitored and tweaked system. The detection points, thresholds and responses should be evaluated on a regular basis for their efficacy within your environment. The <a href="https://www.owasp.org/index.php/OWASP_AppSensor_Project" title="AppSensor Guide">AppSensor Guide</a> provides great planning resources and details about how to perform this step effectively. The insights in the guide should allow you to grow AppSensor with your deployed system. </p> <p>&nbsp;</p><h2>Summary</h2><hr /> <p> With proper planning, configuration, deployment and monitoring, AppSensor should be an extremely useful part of your infrastructure and lead to enhanced security awareness and an improved security posture. </p> <hr /> <!-- /END THE FEATURETTES --> <!-- FOOTER --> <footer> <p class="pull-right"><a href="#">Back to top</a></p> <p>&copy; 2018 OWASP &middot; <a href="https://lists.owasp.org/listinfo/owasp-appsensor-project">Contact the Mailing List</a> &middot; <a href="https://www.owasp.org/index.php/OWASP_AppSensor_Project">AppSensor at OWASP</a></p> </footer> </div><!-- /.container --> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script src="js/appsensor.js"></script> </body> </html>
ProZachJ/appsensor
appsensor-dot-org/site-contents/overview.html
HTML
mit
10,321
<div class="title clearfix"> <h3>{{post.category.title}}</h3> <div class="location">当前位置&nbsp;>&nbsp;<a href="/kyc">本站首页&nbsp;>&nbsp;</a><span>{{post.category.title}}</span></div> </div> <style type="text/css"> .detail-share .jiathis_style { display: inline-block; vertical-align: middle; } .detail-share .jiathis_style span { padding-right: 0; } </style> <div class="details-box clearfix"> <h2 class="detail-title">{{post.title}}</h2> <div class="detail-tools clearfix"> <h2 class="detail-time"> <span> 发布时间:<em>{{post.date_created | dateFormat:'YYYY-MM-DD hh:mm:ss'}} </em></span> <span>阅读:<em>{{post.view_count}}</em>次</span> <span>来源:<em>{{post.display_name}}</em></span> </h2> <div class="detail-share">分享到: <!-- JiaThis Button BEGIN --> <div class="jiathis_style"> <a class="jiathis_button_tsina"></a> <a class="jiathis_button_tqq"></a> <a class="jiathis_button_weixin"></a> <a class="jiathis_button_renren"></a> <a class="jiathis_button_qzone"></a> <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a> <a class="jiathis_counter_style"></a> </div> <!-- JiaThis Button END --> </div> </div> <div class="detail-info">{{#post.content}}</div> </div> <script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js" charset="utf-8"></script> <script type="text/javascript" src="http://v3.jiathis.com/code/jiathis_r.js" charset="utf-8"></script>
xLeonard/ahtvu.ah.cn
themes/kyc/widgets/kyc_post/view.html
HTML
mit
1,609
import RecordArray from "./record_array"; /** @module ember-data */ var get = Ember.get; /** Represents a list of records whose membership is determined by the store. As records are created, loaded, or modified, the store evaluates them to determine if they should be part of the record array. @class FilteredRecordArray @namespace DS @extends DS.RecordArray */ var FilteredRecordArray = RecordArray.extend({ /** The filterFunction is a function used to test records from the store to determine if they should be part of the record array. Example ```javascript var allPeople = store.all('person'); allPeople.mapBy('name'); // ["Tom Dale", "Yehuda Katz", "Trek Glowacki"] var people = store.filter('person', function(person) { if (person.get('name').match(/Katz$/)) { return true; } }); people.mapBy('name'); // ["Yehuda Katz"] var notKatzFilter = function(person) { return !person.get('name').match(/Katz$/); }; people.set('filterFunction', notKatzFilter); people.mapBy('name'); // ["Tom Dale", "Trek Glowacki"] ``` @method filterFunction @param {DS.Model} record @return {Boolean} `true` if the record should be in the array */ filterFunction: null, isLoaded: true, replace: function() { var type = get(this, 'type').toString(); throw new Error("The result of a client-side filter (on " + type + ") is immutable."); }, /** @method updateFilter @private */ updateFilter: Ember.observer(function() { var manager = get(this, 'manager'); manager.updateFilter(this, get(this, 'type'), get(this, 'filterFunction')); }, 'filterFunction') }); export default FilteredRecordArray;
slindberg/data
packages/ember-data/lib/system/record_arrays/filtered_record_array.js
JavaScript
mit
1,724
<!DOCTYPE html> <html lang="en"> <head> <title>DataDecoder Reference</title> <link rel="stylesheet" type="text/css" href="css/jazzy.css" /> <link rel="stylesheet" type="text/css" href="css/highlight.css" /> <meta charset='utf-8'> <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1.0" /> <script src="js/jquery.min.js" defer></script> <script src="js/jazzy.js" defer></script> </head> <body> <a title="DataDecoder Reference"></a> <header> <div class="content-wrapper"> <p> <a href="index.html">DataDecoder Docs</a> <span class="no-mobile"> (72% documented)</span> </p> <p class="header-right"> <a href="https://github.com/FitnessKit/DataDecoder"> <img src="img/gh.png"/> <span class="no-mobile">View on GitHub</span> </a> </p> </div> </header> <div id="breadcrumbs-container"> <div class="content-wrapper"> <p id="breadcrumbs"> <span class="no-mobile"> <a href="index.html">DataDecoder Reference</a> <img id="carat" src="img/carat.png" /> </span> DataDecoder Reference </p> </div> </div> <div class="wrapper"> <div class="article-wrapper"> <article class="main-content"> <section> <section class="section"> <h1 id='datadecoder' class='heading'>DataDecoder</h1> <p>Swift Data Decoder. Easily Decode Data values</p> <p><a href="https://developer.apple.com/swift"><img src="https://img.shields.io/badge/swift5-compatible-4BC51D.svg?style=flat" alt="Swift5"></a> <a href="https://travis-ci.org/FitnessKit/DataDecoder"><img src="http://img.shields.io/travis/FitnessKit/DataDecoder.svg?style=flat" alt="CI Status"></a> <a href="http://cocoapods.org/pods/DataDecoder"><img src="https://img.shields.io/cocoapods/v/DataDecoder.svg?style=flat" alt="Version"></a> <a href="http://cocoapods.org/pods/DataDecoder"><img src="https://img.shields.io/cocoapods/l/DataDecoder.svg?style=flat" alt="License"></a> <a href="http://cocoapods.org/pods/DataDecoder"><img src="https://img.shields.io/cocoapods/p/DataDecoder.svg?style=flat" alt="Platform"></a> <a href="http://clayallsopp.github.io/readme-score?url=https://github.com/fitnesskit/datadecoder"><img src="http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/fitnesskit/datadecoder" alt="Readme Score"></a></p> <h2 id='installation' class='heading'>Installation</h2> <p>DataDecoder is available through <a href="http://cocoapods.org">CocoaPods</a>. To install it, simply add the following line to your Podfile:</p> <pre class="highlight ruby"><code><span class="n">pod</span> <span class="s2">"DataDecoder"</span> </code></pre> <p>Swift Package Manager:</p> <pre class="highlight swift"><code> <span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span> <span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/FitnessKit/DataDecoder"</span><span class="p">,</span> <span class="nv">from</span><span class="p">:</span> <span class="s">"5.0.0"</span><span class="p">),</span> <span class="p">]</span> </code></pre> <p>Swift4</p> <pre class="highlight swift"><code> <span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span> <span class="o">.</span><span class="nf">package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/FitnessKit/DataDecoder"</span><span class="p">,</span> <span class="o">.</span><span class="nf">branch</span><span class="p">(</span><span class="s">"swift42"</span><span class="p">)),</span> <span class="p">]</span> </code></pre> <h2 id='how-to-use' class='heading'>How to Use</h2> <p>Example:</p> <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">sensorData</span><span class="p">:</span> <span class="kt">Data</span> <span class="o">=</span> <span class="kt">Data</span><span class="p">([</span> <span class="mh">0x02</span><span class="p">,</span> <span class="mh">0xFE</span><span class="p">,</span> <span class="mh">0xFF</span><span class="p">,</span> <span class="mh">0xEF</span><span class="p">,</span> <span class="mh">0xBE</span><span class="p">,</span> <span class="mh">0xAD</span><span class="p">,</span> <span class="mh">0xDE</span><span class="p">,</span> <span class="mh">0xA5</span><span class="p">])</span> <span class="k">var</span> <span class="nv">decoder</span> <span class="o">=</span> <span class="kt">DecodeData</span><span class="p">()</span> <span class="k">let</span> <span class="nv">height</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt8</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="k">let</span> <span class="nv">weight</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt16</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="k">let</span> <span class="nv">deadbeef</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt32</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="k">let</span> <span class="nv">nib</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeNibble</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="c1">//This should come back 0 as there is no more data left</span> <span class="k">let</span> <span class="nv">novalue</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeNibble</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> </code></pre> <p>Example Using Optionals:</p> <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">sensorData</span><span class="p">:</span> <span class="kt">Data</span> <span class="o">=</span> <span class="kt">Data</span><span class="p">([</span> <span class="mh">0x02</span><span class="p">,</span> <span class="mh">0xFE</span><span class="p">,</span> <span class="mh">0xFF</span><span class="p">,</span> <span class="mh">0xEF</span><span class="p">,</span> <span class="mh">0xBE</span><span class="p">,</span> <span class="mh">0xAD</span><span class="p">,</span> <span class="mh">0xDE</span><span class="p">,</span> <span class="mh">0xA5</span><span class="p">])</span> <span class="k">var</span> <span class="nv">decoder</span> <span class="o">=</span> <span class="kt">DecodeData</span><span class="p">()</span> <span class="k">if</span> <span class="k">let</span> <span class="nv">height</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt8IfPresent</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="p">{}</span> <span class="k">let</span> <span class="nv">weight</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt16IfPresent</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="k">let</span> <span class="nv">deadbeef</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt32IfPresent</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="k">let</span> <span class="nv">nib</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeNibbleIfPresent</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> <span class="c1">// This will be nil as there is no data left</span> <span class="k">let</span> <span class="nv">novalue</span> <span class="o">=</span> <span class="n">decoder</span><span class="o">.</span><span class="nf">decodeUInt8IfPresent</span><span class="p">(</span><span class="n">sensorData</span><span class="p">)</span> </code></pre> <h2 id='data-decoders' class='heading'>Data Decoders</h2> <ul> <li>Nibble</li> <li>UInt8/Int8</li> <li>UInt16/Int16</li> <li>UInt24/Int23</li> <li>UInt32/Int32</li> <li>UInt48</li> <li>UInt64/Int64</li> <li>IP Address to String Value</li> <li>MAC Address to String Value</li> </ul> <h3 id='ieee-11073' class='heading'>IEEE-11073</h3> <ul> <li>16-bit SFLOAT</li> <li>32-bit FLOAT</li> </ul> <h3 id='ieee-754' class='heading'>IEEE-754</h3> <ul> <li>Float32</li> <li>Float64</li> </ul> <h2 id='author' class='heading'>Author</h2> <p>This package is developed and maintained by Kevin A. Hoogheem</p> <h2 id='license' class='heading'>License</h2> <p>DataDecoder is available under the <a href="http://opensource.org/licenses/MIT">MIT license</a></p> </section> </section> </article> </div> <div class="nav-wrapper"> <nav class="nav-bottom"> <ul class="nav-groups"> <li class="nav-group-name"> <a href="Extensions.html">Extensions</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="Extensions/UInt8.html">UInt8</a> </li> </ul> </li> <li class="nav-group-name"> <a href="Structs.html">Structures</a> <ul class="nav-group-tasks"> <li class="nav-group-task"> <a href="Structs/ANTToggleByte.html">ANTToggleByte</a> </li> <li class="nav-group-task"> <a href="Structs/DecodeData.html">DecodeData</a> </li> <li class="nav-group-task"> <a href="Structs/MACAddress.html">MACAddress</a> </li> <li class="nav-group-task"> <a href="Structs/Nibble.html">Nibble</a> </li> </ul> </li> </ul> </nav> </div> <div class="footer-wrapper"> <section id="footer"> <p>© 2017 Kevin A. Hoogheem</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p> </section> </div> </div> </body> </div> </html>
FitnessKit/DataDecoder
docs/index.html
HTML
mit
10,842
{% comment %} Adds inline media queries to optimize hero-full-screen image size. Partial has 2 arguments: required id and optional path to an image source. When image is missing, use bg-dots pattern and blue background. Original image sources are replaced by Imgix-optimized versions in production. Example: {% include inline-css/hero-full-screen.html id=id image=image-source-file %} {% endcomment %} {% assign id = include.id %} {% if include.image %} {% assign image = include.image %} {% else %} {% assign image = false %} {% endif %} <style> {% if image %} {% comment %} Mobile default {% endcomment %} #{{ id }} { background-image: url('{{ image | imgix_url: w:400, h:400, fit:"crop", q:50 }}'); } {% comment %} Mobile retina and high res displays {% endcomment %} @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { #{{ id }} { background-image: url('{{ image | imgix_url: w:400, h:400, fit:"crop", q:50, dpr: 2 }}'); } } {% comment %} Desktop default {% endcomment %} @media only screen and (min-width:600px) { #{{ id }} { background-image: url('{{ image | imgix_url: w:1200, h:800, fit:"crop", q:50 }}'); } } {% comment %} Desktop retina and high res displays {% endcomment %} @media only screen and (min-width:600px) and (-webkit-min-device-pixel-ratio: 2), only screen and (min-width:600px) and (min--moz-device-pixel-ratio: 2), only screen and (min-width:600px) and (-o-min-device-pixel-ratio: 2/1), only screen and (min-width:600px) and (min-device-pixel-ratio: 2), only screen and (min-width:600px) and (min-resolution: 192dpi), only screen and (min-width:600px) and (min-resolution: 2dppx) { #{{ id }} { background-image: url('{{ image | imgix_url: w:1200, h:800, fit:"crop", q:50, dpr:2 }}'); } } {% comment %} Desktop large default {% endcomment %} @media only screen and (min-width: 1800px) { #{{ id }} { background-image: url('{{ image | imgix_url: w:1800, h:1080, fit:"crop", q:50 }}'); } } {% comment %} Desktop large retina and high res displays {% endcomment %} @media only screen and (min-width:1800px) and (-webkit-min-device-pixel-ratio: 2), only screen and (min-width:1800px) and (min--moz-device-pixel-ratio: 2), only screen and (min-width:1800px) and (-o-min-device-pixel-ratio: 2/1), only screen and (min-width:1800px) and (min-device-pixel-ratio: 2), only screen and (min-width:1800px) and (min-resolution: 192dpi), only screen and (min-width:1800px) and (min-resolution: 2dppx) { #{{ id }} { background-image: url('{{ image | imgix_url: w:1800, h:1080, fit:"crop", q:50, dpr: 2 }}'); } } {% else %} #{{ id }} { background: #3b71e8; background-image: url("/media/bg-dots.svg"); background-repeat: repeat; } {% endif %} </style>
metroideas/beta.metroideas.org
_includes/inline-css/hero-full-screen.html
HTML
mit
3,191
require 'rails_helper' feature 'Zonefile settings', type: :feature do before :all do @user = Fabricate(:admin_user) end context 'as unknown user' do it 'should redirect to login path' do visit admin_zonefile_settings_url current_path.should == '/admin/login' end end context 'as logged in user' do it 'should show index of contacts' do sign_in @user visit admin_zonefile_settings_url page.should have_content('Zonefile settings') end it 'should create zone' do sign_in @user visit admin_zonefile_settings_url page.should_not have_content('Generate zonefile') click_link 'New' fill_in 'Origin', with: 'ee' fill_in 'TTL', with: '43200' fill_in 'Refresh', with: '3600' fill_in 'Retry', with: '900' fill_in 'Expire', with: '1209600' fill_in 'Minimum TTL', with: '3600' fill_in 'E-Mail', with: 'hostmaster.eestiinternet.ee' fill_in 'Master nameserver', with: 'ns.tld.ee' fill_in('Ns records', with: ' ee. IN NS sunic.sunet.se. ee. IN NS ns.eenet.ee. ee. IN NS ns.tld.ee. ee. IN NS ns.ut.ee. ee. IN NS e.tld.ee. ee. IN NS b.tld.ee. ee. IN NS ee.aso.ee. ') fill_in('A records', with: ' ns.ut.ee. IN A 193.40.5.99 ns.tld.ee. IN A 195.43.87.10 ee.aso.ee. IN A 213.184.51.122 b.tld.ee. IN A 194.146.106.110 ns.eenet.ee. IN A 193.40.56.245 e.tld.ee. IN A 204.61.216.36 ') fill_in('AAAA records', with: ' ee.aso.ee. IN AAAA 2A02:88:0:21::2 b.tld.ee. IN AAAA 2001:67C:1010:28::53 ns.eenet.ee. IN AAAA 2001:BB8::1 e.tld.ee. IN AAAA 2001:678:94:53::53 ') click_button 'Save' page.should have_content('Record created') page.should have_content('ee') page.should have_content('Generate zonefile') click_link 'Generate zonefile' response_headers['Content-Type'].should == 'text/plain' response_headers['Content-Disposition'].should == "attachment; filename=\"ee.txt\"" end it 'does not delete zone with existin domains' do ZonefileSetting.find_by(origin: 'ee') || Fabricate(:zonefile_setting) Fabricate(:domain) sign_in @user visit admin_zonefile_settings_url click_link 'ee' click_link 'Delete' page.should have_content("There are 1 domains in this zone") page.should have_content('Failed to delete record') end it 'deletes a zone' do ZonefileSetting.find_by(origin: 'ee') || Fabricate(:zonefile_setting) Domain.destroy_all sign_in @user visit admin_zonefile_settings_url click_link 'ee' click_link 'Delete' page.should have_content('Record deleted') page.should_not have_content("Generate zonefile") end end end
domify/registry
spec/features/admin/zonefile_setting_spec.rb
Ruby
mit
2,880
<?php /** * Webiny Framework (http://www.webiny.com/framework) * * @copyright Copyright Webiny LTD */ namespace Webiny\Component\Image\Bridge; use Webiny\Component\StdLib\Exception\AbstractException; /** * Exception for image bridge library. * * @package Webiny\Component\Image\Bridge */ class ImageException extends AbstractException { }
Webiny/Framework
src/Webiny/Component/Image/Bridge/ImageException.php
PHP
mit
357
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace AppBundle\Command; use AppBundle\Entity\User; use AppBundle\Utils\Validator; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; /** * A console command that deletes users from the database. * * To use this command, open a terminal window, enter into your project * directory and execute the following: * * $ php bin/console app:delete-user * * Check out the code of the src/AppBundle/Command/AddUserCommand.php file for * the full explanation about Symfony commands. * * See https://symfony.com/doc/current/cookbook/console/console_command.html * For more advanced uses, commands can be defined as services too. See * https://symfony.com/doc/current/console/commands_as_services.html * * @author Oleg Voronkovich <oleg-voronkovich@yandex.ru> */ class DeleteUserCommand extends Command { const MAX_ATTEMPTS = 5; private $io; private $entityManager; private $validator; public function __construct(EntityManagerInterface $em, Validator $validator) { parent::__construct(); $this->entityManager = $em; $this->validator = $validator; } /** * {@inheritdoc} */ protected function configure() { $this ->setName('app:delete-user') ->setDescription('Deletes users from the database') ->addArgument('username', InputArgument::REQUIRED, 'The username of an existing user') ->setHelp(<<<'HELP' The <info>%command.name%</info> command deletes users from the database: <info>php %command.full_name%</info> <comment>username</comment> If you omit the argument, the command will ask you to provide the missing value: <info>php %command.full_name%</info> HELP ); } protected function initialize(InputInterface $input, OutputInterface $output) { // SymfonyStyle is an optional feature that Symfony provides so you can // apply a consistent look to the commands of your application. // See https://symfony.com/doc/current/console/style.html $this->io = new SymfonyStyle($input, $output); } protected function interact(InputInterface $input, OutputInterface $output) { if (null !== $input->getArgument('username')) { return; } $this->io->title('Delete User Command Interactive Wizard'); $this->io->text([ 'If you prefer to not use this interactive wizard, provide the', 'arguments required by this command as follows:', '', ' $ php bin/console app:delete-user username', '', 'Now we\'ll ask you for the value of all the missing command arguments.', '', ]); $username = $this->io->ask('Username', null, [$this, 'usernameValidator']); $input->setArgument('username', $username); } protected function execute(InputInterface $input, OutputInterface $output) { $username = $this->validator->validateUsername($input->getArgument('username')); $repository = $this->entityManager->getRepository(User::class); /** @var User $user */ $user = $repository->findOneByUsername($username); if (null === $user) { throw new \RuntimeException(sprintf('User with username "%s" not found.', $username)); } // After an entity has been removed its in-memory state is the same // as before the removal, except for generated identifiers. // See http://docs.doctrine-project.org/en/latest/reference/working-with-objects.html#removing-entities $userId = $user->getId(); $this->entityManager->remove($user); $this->entityManager->flush(); $this->io->success(sprintf('User "%s" (ID: %d, email: %s) was successfully deleted.', $user->getUsername(), $userId, $user->getEmail())); } }
dzuelke/symfony-demo
src/AppBundle/Command/DeleteUserCommand.php
PHP
mit
4,351
const findMatchingPermission = (permissions, action, subject) => permissions.find(perm => perm.action === action && perm.subject === subject); export default findMatchingPermission;
wistityhq/strapi
packages/core/admin/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/findMatchingPermissions.js
JavaScript
mit
185
module.exports = { development: { options: { paths: ['<%= src %>/less'], cleancss: false, compress: false, modifyVars: { 'fa-font-path' : '"//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"' } }, files: { '<%= public %>/css/kc-theme-default.css': '<%= src %>/less/kc-theme-default.less', '<%= public %>/css/kc-theme-caring.css': '<%= src %>/less/kc-theme-caring.less', '<%= public %>/css/kc-theme-corporate.css': '<%= src %>/less/kc-theme-corporate.less', '<%= public %>/css/kc-theme-environment.css': '<%= src %>/less/kc-theme-environment.less', '<%= public %>/css/kc-print.css': '<%= src %>/less/print/kc-print.less', '<%= public %>/css/ie-only.css': '<%= src %>/less/IE-only/ie-only.less' } }, tfs: { options: { paths: ['<%= src %>/src/less'], cleancss: false, compress: false, modifyVars: { 'fa-font-path' : '"//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"' } }, files: { '<%= tfs%>/css/kc-theme-default.css': '<%= src %>/less/kc-theme-default.less', '<%= tfs %>/css/kc-theme-caring.css': '<%= src %>/less/kc-theme-caring.less', '<%= tfs %>/css/kc-theme-corporate.css': '<%= src %>/less/kc-theme-corporate.less', '<%= tfs %>/css/kc-theme-environment.css': '<%= src %>/less/kc-theme-environment.less', '<%= tfs %>/css/kc-print.css': '<%= src %>/less/print/kc-print.less', '<%= tfs %>/css/ie-only.css': '<%= src %>/less/IE-only/ie-only.less' } }, app: { options: { paths: ['<%= app %>/less'], cleancss: false, compress: false, modifyVars: { 'fa-font-path' : '"//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"' } }, files: { '<%= app%>/public/css/kc-app-theme-corporate.css': '<%= app %>/less/kc-app-theme-corporate.less', } } };
kcwebteam/kcdev
grunt/less.js
JavaScript
mit
1,892
<?php /* freepost * http://freepo.st * * Copyright © 2014-2015 zPlus * * This file is part of freepost. * freepost is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * freepost is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with freepost. If not, see <http://www.gnu.org/licenses/>. */ namespace AppBundle\Entity; use Doctrine\ORM\EntityRepository; /** * CommentRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class CommentRepository extends EntityRepository { /* Retrieve a list of hottest comments sorted by vote * $user is used to find $user vote for each post */ public function findHot($post = NULL, $user = NULL) { if (is_null($post)) return NULL; $em = $this->getEntityManager(); return $em->createQuery( 'SELECT c, u, v FROM AppBundle:Comment c JOIN c.user u LEFT JOIN c.votes v WITH v.user = :user WHERE c.post = :post ORDER BY c.vote DESC, c.created DESC' ) ->setParameter('user', $user) ->setParameter('post', $post) ->setMaxResults(1000) ->getResult(); } // Get user comments public function findComments($user = NULL) { $em = $this->getEntityManager(); return $em->createQuery( 'SELECT c FROM AppBundle:Comment c WHERE c.user = :user ORDER BY c.created DESC' ) ->setParameter('user', $user) ->setMaxResults(100) ->getResult(); } // Get replies to user comments public function findReplies($user = NULL) { $em = $this->getEntityManager(); return $em->createQuery( 'SELECT c FROM AppBundle:Comment c WHERE c.parentUser = :user AND c.user != :user ORDER BY c.created DESC' ) ->setParameter('user', $user) ->setMaxResults(100) ->getResult(); } // Set replies as "read" public function setRepliesAsRead($user = NULL) { $em = $this->getEntityManager(); $em->createQuery( 'UPDATE AppBundle:Comment c SET c.read = 1 WHERE c.parentUser = :user AND c.read = 0' ) ->setParameter('user', $user) ->execute(); } // Find how many replies are still unread public function findNumberOfUnreadReplies($user = NULL) { $em = $this->getEntityManager(); return $em->createQuery( 'SELECT COUNT(c) FROM AppBundle:Comment c WHERE c.parentUser = :user AND c.user != :user AND c.read = 0' ) ->setParameter('user', $user) ->getSingleScalarResult(); } public function submitNew(&$post, &$parentComment, &$user, &$text) { $em = $this->getEntityManager(); $datetime = new \DateTime(); $c = new Comment(); $c->setPost($post); $c->setParent($parentComment); $c->setParentUser(is_null($parentComment) ? $post->getUser() : $parentComment->getUser()); $c->setUser($user); $c->setText($text); $c->setCreated($datetime); $c->setDateCreated($datetime); // If it's a reply to myself, don't mark it as "unread" ($c->getParentUser()->getId() == $user->getId()) && $c->setRead(); $post->increaseCommentsCount(); $em->persist($c); $em->persist($post); $em->flush(); return $c; } }
razzaghi/MessageCenter
src/AppBundle/Entity/CommentRepository.php
PHP
mit
4,082
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M14 6h3v7.88l2 2V4h-5V3H6.12L14 10.88zm-2 5.71V13h-2v-2h1.29L2.41 2.13 1 3.54l4 4V19H3v2h11v-4.46L20.46 23l1.41-1.41z" /> , 'NoMeetingRoomSharp');
callemall/material-ui
packages/material-ui-icons/src/NoMeetingRoomSharp.js
JavaScript
mit
272
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.8/esri/copyright.txt for details. //>>built define({widgetLabel:"\u8a66_Locate___\u9a57",title:"\u8a66_Find my location______\u9a57"});
ycabon/presentations
2018-user-conference/arcgis-js-api-road-ahead/demos/gamepad/api-snapshot/esri/widgets/Locate/nls/zh-tw/Locate.js
JavaScript
mit
247
require 'helper' describe Surveygizmo::API do let(:client) { Surveygizmo::Client.new } describe "#formatted_filters" do context "no filters" do context "empty hash" do let(:input) { Hash.new } it "returns a empty hash" do client.formatted_filters(input).should == {} end end context "nil" do let(:input) { nil } it "returns a empty hash" do client.formatted_filters(input).should == {} end end end context "one filter" do it "format filters for the request querystring" do filters = client.formatted_filters({ "field" => "status", "operator" => "=", "value" => "Active" }) filters.should == { "filter[field][0]"=>"status", "filter[operator][0]"=>"=", "filter[value][0]"=>"Active" } end end context "more than one filters" do it "format filters for the request querystring" do filters = client.formatted_filters( { "field" => "datesubmitted", "operator" => "<=", "value" => "2012-12-02" }, { "field" => "status", "operator" => "=", "value" => "Active" } ) filters.should == { "filter[field][0]" => "datesubmitted", "filter[operator][0]" => "<=", "filter[value][0]" => "2012-12-02", "filter[field][1]" =>"status", "filter[operator][1]" =>"=", "filter[value][1]" =>"Active" } end end end end
whereisciao/surveygizmo
spec/surveygizmo/client/filter_spec.rb
Ruby
mit
1,647
<html> <META HTTP-EQUIV=Content-Type Content="text/html; charset=big5"> <!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/01119/0111923032300.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:07:11 GMT --> <head><title>ªk½s¸¹:01119 ª©¥»:023032300</title> <link rel="stylesheet" type="text/css" href="../../version.css" > </HEAD> <body><left> <table><tr><td><FONT COLOR=blue SIZE=5>¤áÄyªk(01119)</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <tr><td align=left valign=top> <a href=0111920120100.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 20 ¦~ 12 ¤ë 1 ¤é</font></nobr></a> </td> <td valign=top><font size=2>¨î©w132±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 20 ¦~ 12 ¤ë 12 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111923032300.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 23 ¦~ 3 ¤ë 23 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä17, 23¦Ü25±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 23 ¦~ 3 ¤ë 31 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111934121400.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 34 ¦~ 12 ¤ë 14 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿¥þ¤å61±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 35 ¦~ 1 ¤ë 3 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111943120700.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 43 ¦~ 12 ¤ë 7 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä17, 18±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 43 ¦~ 12 ¤ë 18 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111962070300.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 62 ¦~ 7 ¤ë 3 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿¥þ¤å71±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 62 ¦~ 7 ¤ë 17 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111981062300.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 81 ¦~ 6 ¤ë 23 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä5, 7, 16, 42, 62¦Ü64, 66±ø<br> §R°£²Ä6, 17, 18, 19, 20, 21±ø<br>§R°£²Ä2³¹³¹¦W </font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 81 ¦~ 6 ¤ë 29 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111986042900.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 86 ¦~ 4 ¤ë 29 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿¥þ¤å61±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 86 ¦~ 5 ¤ë 21 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111989062000.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 89 ¦~ 6 ¤ë 20 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä2, 5, 52±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 89 ¦~ 7 ¤ë 5 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111992122600.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 92 ¦~ 12 ¤ë 26 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä28, 29±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 93 ¦~ 1 ¤ë 7 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111994052000.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 94 ¦~ 5 ¤ë 20 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä4, 13, 19, 34, 47, 52±ø<br> ¼W­q²Ä55¤§1±ø<br> §R°£²Ä57±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 94 ¦~ 6 ¤ë 15 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111996121400.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 96 ¦~ 12 ¤ë 14 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä12, 20, 28, 35, 36, 44, 46, 61±ø<br> ¼W­q²Ä17¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 97 ¦~ 1 ¤ë 9 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0111997050900.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 97 ¦~ 5 ¤ë 9 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿¥þ¤å83±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 97 ¦~ 5 ¤ë 28 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=01119100050600.html target=law01119><nobr><font size=2>¤¤µØ¥Á°ê 100 ¦~ 5 ¤ë 6 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä16, 17, 34, 48, 49, 55, 67, 69, 83±ø<br> ¼W­q²Ä65¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 100 ¦~ 5 ¤ë 25 ¤é¤½¥¬</font></nobr></td> </table></table></table></table> <p><table><tr><td><font color=blue size=4>¥Á°ê23¦~3¤ë23¤é(«D²{¦æ±ø¤å)</font></td> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤@³¹ Á`«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ãö©ó¤áÄy¤Î¤H¨Æ¤§µn°O¡A¨Ì¥»ªk¤§³W©w¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¤§Äy§O¡A¥H¿¤¥«¬°³æ¦ì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¤Î¤H¨Æ¤§µn°O¡A¥H¿¤¤§¶mÂí°Ï°ì¤Î¥«¤§§{°Ï°ì¬°¨äºÞÁҰϰì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤¤µØ¥Á°ê¤H¥Á¡A¨Ì¥ª¦C¤§³W©w¡A©w¨ä¤áÄy¡C<br> ¡@¡@¤@¡B¦b¤@¿¤©Î¤@¥«°Ï°ì¤º¦³¦í©Ò¤T¦~¥H¤W¦Ó¦b¥L¿¤¥«¤ºµL¥»ÄyªÌ¡A¥H¸Ó¿¤©Î¥«¬°¥»Äy¡C<br> ¡@¡@¤G¡B¤l¤k°£§O¦³¥»ÄyªÌ¥~¡A¥H¨ä¤÷¥À¤§¥»Äy¬°¥»Äy¡C<br> ¡@¡@¤T¡B±ó¨à¤÷¥ÀµL¥i¦ÒªÌ¡A¥Hµo²{¤H³ø§i¦a¬°¥»Äy¡C<br> ¡@¡@¥|¡B©d¥H¤Ò¤§¥»Äy¬°¥»Äy¡AÂØ¤Ò¥H©d¤§¥»Äy¬°¥»Äy¡C<br> ¡@¡@¤@¤H¤£±o¦P®É¦³¨â¥»Äy¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤w¦³¥»Äy¦Ó¦b¥L¿¤¥«¤º¦³¦í©Ò©Î©~©Òº¡¤»­Ó¤ëªÌ¡A¥H¸Ó¿¤©Î¥«¬°¨ä±HÄy¡AµL¥»Äy©Î¥»Äy¤£©ú¦Ó¦b¤@¿¤¥«¤º¦³¦í©Ò©Î©~©Ò¥¼º¡¤»­Ó¤ëªÌ¥ç¦P¡C<br> ¡@¡@¤@¤H¤£±o¦P®É¦³¨â±HÄy¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µL¤¤µØ¥Á°ê°êÄyªÌ¡A¤£±o©ó¤¤µØ¥Á°ê»â°ì¤º³]©w¥»Äy¡A¨ä¦b¤¤µØ¥Á°ê¤§¿¤¥«¤º¦³¦í©Ò©Î©~©Òº¡¤»­Ó¤ë¥H¤WªÌ¡A¥H¸Ó¿¤©Î¥«¬°¨ä±H¯d¦a¡C<br> ¡@¡@¥»ªkÃö©ó±HÄy¤§³W©w¡A©ó±H¯d¦a·Ç¥Î¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@³°¤WµL¦í©Ò©~©Ò¦Ó¦b²î²í¤W¦í©~ªÌ¡A¥H²î²í¤§±`ªy¦a¬°¨ä¦í©Ò©~©Ò©Ò¦b¦a¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¤§½s³y¡A¥H¤@®a¬°¤@¤á¡AÁöÄݤ@®a¦Ó²§©~ªÌ¡A¦U¬°¤@¤á¡C<br> ¡@¡@¹¬¹D©Î¨ä¥L©v±Ð®{©Ò¦í¤§¦x°|¡A¥H¤@¦x°|¬°¤@¤á¡A¦x°|¤§¥DºÞ¤H¦b¥»ªk¤W¤§¦a¦ì¡A»P®aªø¦P¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µL¥»Äy©Î¥»Äy¤£©ú¦Ó¦b¦P¤@±ÏÀÙ¾÷Ãö¯d¾iªÌ¡A¦X½s¬°¤@¤á¡A¸Ó¾÷Ãö¤§ºÞ²z¤H¦b¥»ªk¤W¤§¦a¦ì¡A»P®aªø¦P¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨C¤áÄyºÞÁҰϰì¡A³]¤áÄy¥D¥ô¤@¤H¡A¤áÄy­û­Y¤z¤H¡A´x²z¤áÄy¤Î¤H¨Æµn°O¨Æ°È¡A©ó¶mÂí¤½©Ò©Î§{¤½©Ò¤º¿ì²z¤§¡C<br> ¡@¡@¤áÄy¥D¥ô¥Ñ¶mªø¡BÂíªø©Î§{ªø­Ý¥ô¤§¡A¤áÄy­û¥Ñ¶mÂíªø©Î§{ªø«ü©w©ÒÄݦ۪v¤H­û­Ý¥ô¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô¡B¤áÄy­û¡AÃö©ó¥»¤H©Î»P¥»¤H¦PÄݤ@®a¤§¤H¤§¤áÄy¤Î¤H¨Æµn°O¨Æ¥ó¡A¤£±o°õ¦æ¨ä¾°È¡AÀ³¥Ñ¥L¤áÄy­û¤§¦~ªøªÌ¬°¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô©Î¤áÄy­û¡A©ó°õ¦æÂ¾°È¦]¬G·N©Î­«¤j¹L¥¢­PÁn½Ð¤H©Î¨ä¥LÃö«Y¤H¨ü·l®`®É¡AÀ³­t½ßÀv¤§³d¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¤Î¤H¨Æµn°O¨Æ°È¡A¥H¶mÂí¤½©Ò©Î§{¤½©Ò©ÒÄݤ§¿¤¥«¬F©²¬°ª½±µºÊ·þ©x¸p¡C<br> ¡@¡@°Ïªø¦³Á¸§U¿¤ªø©Î¥«ªø«ü¾É°Ï¤º¦U¶mÂí©Î¦U§{¿ì²z¤áÄy¤Î¤H¨Æµn°O¨Æ°È¤§³d¥ô¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ôÀ³¨Ì¾Ú¤áÄyµn°Oï¡B¤H¨Æµn°Oï¡A¤À§O½s³y¥ª¦C¦U¶µ²Î­p©u³ø¤Î²Î­p¦~³ø¡A§e°eºÊ·þ©x¸p¡C<br> ¡@¡@¤@¡B¥»Äy¤Î±HÄy¤á¼Æ¤H¤f©Ê§O¦~Äֲέp¡C<br> ¡@¡@¤G¡B¥X¥Í¤§¨k¤k¤Î¨ä¤÷¥À¦~ÄÖ¾·~²Î­p¡C<br> ¡@¡@¤T¡B¦º¤`¤§¨k¤k¤Î¨ä¦~ÄÖ¾·~»P¦º¤`­ì¦]²Î­p¡C<br> ¡@¡@¥|¡B¦º²£¤Î¨ä©Ê§O»P¦º²£­ì¦]²Î­p¡C<br> ¡@¡@¤­¡Bµ²±B»PÂ÷±B¤§¨k¤k¤Î¨ä¦~ÄÖ¾·~²Î­p¡C<br> ¡@¡@¤»¡B¨k¤k¤§Â¾·~²Î­p¡C<br> ¡@¡@¤C¡B«Å§i¦º¤`¨Æ¥ó²Î­p¡C<br> ¡@¡@¤K¡B¤áÄyÅܧ󍯥ó²Î­p¡C<br> ¡@¡@¤E¡B¦P¤@¤áÄyºÊ·þ°Ï°ì¤§¾E©~²Î­p¡C<br> ¡@¡@¤Q¡B°êÄyÅܧ󍯥ó²Î­p¡C<br> ¡@¡@¤Q¤@¡B¹´©~¤§¥~°ê¤H¤Î¨ä©Ê§O¦~ÄÖ¾·~°êÄy²Î­p¡C<br> ¡@¡@¤Q¤G¡B¨ä¥LÀ³¦æ§e³ø¨Æ¶µ¡C<br> ¡@¡@ºÊ·þ©x¸p±µ¨ì«e¶µ³ø§i«á¡AÀ³§Y½s³yÃö©ó¥þ¿¤¥«¤§¤ÀÃþ²Î­p©u³ø¤Î²Î­p¦~³ø¦U¤G¥÷¡A§e°e¥Á¬FÆU¡A¥Ñ¥Á¬FÆU¥H¤@¥÷¦s¬d¡A¤@¥÷¶Ç§e¤º¬F³¡¡C<br> ¡@¡@ª½Áõ¦æ¬F°|¤§¥«¡AÀ³¨Ì«e¶µ³W©w¡A½s³y²Î­p©u³ø¤Î²Î­p¦~³ø¡A«t°e¤º¬F³¡¡C<br> ¡@¡@«e¤T¶µ²Î­pªí®æ¡A¥Ñ¤º¬F³¡©w¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¤Î¤H¨Æµn°O¨Æ°È¤§¸g¶O¡A¥Ñ¿¤¥«¬F©²µ|¦¬¶µ¤U¤ä¥X¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤G³¹ µn°Oï</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤@¸` ¤áÄyµn°Oï</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°Oï¡A¤À¥»Äyµn°Oï»P±HÄyµn°Oï¨âºØ¡A¨CºØ¦U³Æ¥¿°Æ¤G¥»¡C<br> ¡@¡@«e¶µµn°Oï®æ¦¡¡A¥Ñ¤º¬F³¡©w¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°Oï¥Ñ¿¤¥«¬F©²¨Ì·Ó®æ¦¡¤À§O»s©w¡A©ó¨C±i½s°O¯È¼Æ¸¹¼Æ»\¦L¡A¨Ã©óï­±¤§¸Ì­±°O©ú±i¼Æ»\¦L¡A¥ý´Áµo¥æ¦U¤áÄy¥D¥ô¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°O¡A¨C¤á¥Î¯È¤@¥÷¡A¨C¤á¤@¸¹¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°O¡AÀ³¨ÌºÞÁҰϰ줺¤§¦Ûªv°Ï¹º¡A½s­q¸¹¼Æ¡A¤À§O°O©ú©ó¤áÄyµn°O鷺¨C¤á¥Î¯È¤§­º¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¾ã°O勵¥»¡A¥Ñ¶mÂí¤½©Ò©Î§{¤½©Ò¥Ã¤[«O¦s¡A°Æ¥»§e°eºÊ·þ©x¸p¥Ã¤[«O¦s¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°Oï¡A°£¦]Á×§K¤Ñ¨a¨ÆÅÜ¥~¡A¤£±oÄâ¥X«O¦s³B©Ò¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°Oï¡AµL½×¦ó¤H±o¯Ç¶O½Ð¨D¾\Äý©Î¥æ¥IÁÃ¥»¡C<br> ¡@¡@«e¶µ¾\Äý¶O¡A¨C¦¸¤­¤À¡AÁÃ¥»§Û¿ý¶O¡A¨C¦Ê¦r¤@¨¤¡A¤£º¡¦Ê¦rªÌ¡A¥H¦Ê¦r­pºâ¡C<br> ¡@¡@ªk°|©ó¥²­n®É¡A±o©R¤áÄy¥D¥ô¥æ¥IÁÃ¥»¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°Oï¦]¤Ñ¨a¨ÆÅÜ­P¤@³¡©Î¥þ³¡·À¥¢·´·l®É¡A¤áÄy¥D¥ôÀ³±q³t¶}¨ã¥ª¦C¨Æ¶µ¡A³ø§iºÊ·þ©x¸p¡C<br> ¡@¡@¤@¡B«O¦s¤§³B©Ò¡C<br> ¡@¡@¤G¡B·À¥¢·´·l¤§±i¼Æ¤Î¥U¼Æ¡C<br> ¡@¡@¤T¡B·À¥¢·´·l¤§¨Æ¥Ñ¡C<br> ¡@¡@¥|¡B·À¥¢·´·l¤§¦~¤ë¤é¡C<br> ¡@¡@ºÊ·þ©x¸p±µ¨ì«e¶µ³ø§i«á¡AÀ³¥O¤áÄy¥D¥ô¨Ì·Ó¤áÄyµn°Oï°Æ¥»¡A­«¦æ½s³y©Î¸É³y¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤G¸` ¤H¨Æµn°Oï</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤H¨Æµn°OïÀ³¨Ì¥ª¦C¨Æ¶µ¦U¬°¤@¥U¡C<br> ¡@¡@¤@¡B¥X¥Í¡C<br> ¡@¡@¤G¡B»{»â¡C<br> ¡@¡@¤T¡B¦¬¾i¡C<br> ¡@¡@¥|¡Bµ²±B¡C<br> ¡@¡@¤­¡BÂ÷±B¡C<br> ¡@¡@¤»¡BºÊÅ@¡C<br> ¡@¡@¤C¡B¦º¤`¡C<br> ¡@¡@¤K¡B¦º¤`«Å§i¡C<br> ¡@¡@¤E¡BÄ~©Ó¡C<br> ¡@¡@«e¶µµn°O蠟»sµo¡A·Ç¥Î²Ä¤Q¤C±ø¤§³W©w¡A¦ý¬é¶·¨C±iÃMÁ_»\¦L¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²Ä¤Q¤»±ø¤Î²Ä¤G¤Q±ø¦Ü²Ä¤G¤Q¤T±ø¤§³W©w¡A©ó¤H¨Æµn°Oï·Ç¥Î¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤T³¹ µn°O¤§Án½Ð</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤@¸` ³q«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¤Î¤H¨Æµn°O¤§Án½Ð¡A°£¥t¦³³W©w¥~¡AÀ³¦VÁn½Ð¤H¥»Äy©Î±HÄy©Ò¦b¦a¤§¶mÂí¤½©Ò©Î§{¤½©Ò¬°¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°O¤§Án½Ð¡A¥H®Ñ­±¬°¤§¡C¦ý¦³¥¿·í¨Æ¥Ñ®É¡A±o¥ÑÁn½Ð¤H¿Ë¦V¤áÄy¥D¥ô¥H¨¥µü¬°¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°OÁn½Ð®Ñ¡AÀ³°O¸ü¥ª¦C¨Æ¶µ¡A¥ÑÁn½Ð¤Hñ¦W¡C<br> ¡@¡@¤@¡BÁn½Ð¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¡BÄy§O¤Î¦í©Ò¡C<br> ¡@¡@¤G¡BÁn½Ð¨Æ¥ó¤Î¦~¤ë¤é¡C<br> ¡@¡@Án½Ð¤H¥H¨¥µü¬°Án½Ð®É¡A¤áÄy¥D¥ôÀ³¨Ì«e¶µ¦U´Ú©Ò©w¨Æ¶µ¡A»s§@µ§¿ý¡A¦VÁn½Ð¤H®ÔŪ¡A¨Ã¥O¨äñ¦W¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨Ì¥»ªk¤§³W©wÁn½Ð®ÑÀ³°O¸ü¤§¨Æ¶µ¡A¨ä¨Æ¹ê¤£¦s¦b©Î¤£ª¾±xªÌ¡A±o°O©ú¨ä¨Æ¥Ñ¦Ó¯Ê²¤¤§¡C¦ý¨ä¨Æ¶µ¯S§O­«­n¤£±o¯Ê²¤ªÌ¡A¤£¦b¦¹­­¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð¤H«D¬°Án½Ð¨Æ¥ó¤§¥»¤H®É¡AÀ³©óÁn½Ð®Ñ¤¤°O¸ü¨ä»P¥»¤H¤§Ãö«Y¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð¸q°È¤H¬°¥¼¦¨¦~¤H©Î¸Tªv²£¤H®É¡A¥H¨äªk©w¥N²z¤H¬°Án½Ð¤H¡C¦ý©ó±B«Ã©Î»{»â¨Æ¥ó¡A¤£¦b¦¹­­¡C<br> ¡@¡@«e¶µÁn½Ð¡AÀ³©óÁn½Ð®Ñ¤¤¸ü©ú¥ª¦C¦U´Ú¨Æ¶µ¡C<br> ¡@¡@¤@¡BÁn½Ð¸q°È¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¡BÄy§O¤Î¦í©Ò¡C<br> ¡@¡@¤G¡B¤£¯à¦Û¦æÁn½Ð¤§­ì¦]¡C<br> ¡@¡@¤T¡BÁn½Ð¤H»PÁn½Ð¸q°È¤H¤§Ãö«Y¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð¨Æ¥óÀ³¦³ÃÒ©ú¤HªÌ¡AÁn½Ð®Ñ¤¤À³¸ü©úÃÒ©ú¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¡BÄy§O¤Î¦í©Ò¡A¨Ã¥ÑÃÒ©ú¤Hñ¦W¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð®ÑÀ³µ§µe¤À©ú¡A¤£±o¥Î²¦r©Î²Å¸¹¡A¨Ã¤£±o¶î©Ù¡C¦p¦³§ó§ï¼W§R¡AÀ³°O©ú¦r¼Æ¡A¨Ã©ó§ó§ï¼W§R³B¥ÑÁn½Ð¤H»\³¹¡C<br> ¡@¡@°O¸ü¦~¤ë¤é¤Î¦~ÄÖ¤§¼Æ¥Ø¦r¡AÀ³¥Î¤j¼g¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤Zµn°O¨Æ¥óÀ³¦b¨â³B¥H¤W¤§¶mÂí¤½©Ò©Î§{¤½©Ò¤§µn°Oאּ°O¸üªÌ¡AÀ³´£¥X»P¶mÂí¤½©Ò§{¤½©Ò¦P¼Æ¤§Án½Ð®Ñ¡C<br> ¡@¡@¦b¥»Äy±HÄy¦a¥H¥~¬°Án½Ð®É¡A°£¨Ì«e¶µ³W©w¥~¡AÀ³¥t´£¥XÁn½Ð®Ñ¤@¥÷¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð¨Æ¥óÀ³¸g©x¸p¤§³\¥iªÌ¡AÁn½Ð¤HÀ³ªþ¨ã³\¥i®Ñ¤§ÁÃ¥»¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð¤H¦]¯e¯f©Î¨ä¥L¨Æ¬G¤£¯à¿Ë¦ÛÁn½ÐªÌ¡A±o¥Ñ¥N²z¤H¬°¤§¡C<br> ¡@¡@«e¶µ³W©w¡A©ó»{»â¡B¦¬¾i¡Bµ²±B¡BÂ÷±Bµn°O¤§Án½Ð¡A¤£¾A¥Î¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¹´©~¥~°ê¤§¤¤°ê¤H¡A¹J¦³Án½Ð¨Æ¥ó¡AÀ³¦V¤¤°ê¨ÏÀ]©Î»â¨ÆÀ]¬°¤§¡C<br> ¡@¡@¹´©~¥~°ê¤§¤¤°ê¤H¡A¦p¨Ì©Ò¦b°ê¤§ªk«ßµ{§Ç¡A§@¦¨Ãö©óÁn½Ð¨Æ¥ó¤§ÃÒ©ú®Ñ®É¡AÀ³©ó¤@­Ó¤ë¤º¡A±N¨äÃÒ©ú®ÑÁÃ¥»§e°e©Ò¦b°ê¤§¤¤°ê¨ÏÀ]©Î»â¨ÆÀ]¡C¦ý¨ä©Ò¦b°êµL¤¤°ê¨ÏÀ]¤Î»â¨ÆÀ]ªÌ¡AÀ³©ó¤T­Ó¤ë¤º©ÎÂk°ê«á¤@­Ó¤ë¤º¡A±NÃÒ©ú®ÑÁÃ¥»§e°e¥»Äy¦a¸ÓºÞ¤áÄy¥D¥ô¡C<br> ¡@¡@¨ÏÀ]©Î»â¨ÏÀ]±µ¨ìÁn½Ð®Ñ©ÎÃÒ©ú®ÑÁÃ¥»«á¡AÀ³©ó¤@­Ó¤ë¤º±H°e¥~¥æ³¡¡AÂà«t¤º¬F³¡¶½¥æÁn½Ð¨Æ¥ó¥»¤H¤§¥»Äy¦a¸ÓºÞ¤áÄy¥D¥ô¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð´Á¶¡¡A¦ÛÁn½Ð¨Æ¦ñµo¥Í¤§¤é°_ºâ¡C<br> ¡@¡@Án½Ð´Á¶¡À³¥Ñªk°|µô§P½T©w¤§¤é°_ºâªÌ¡A¦pµô§P°e¹F«e¤w½T©w®É¡A¦Ûµô§P®Ñ°e¹F©óÁn½Ð¤H¤§¤é°_ºâ¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô¡AÀ³±N¥»ªk©Ò©w¦U¶µÁn½Ð¨Æ¥ó¤ÎÁn½Ð´Á¶¡¤½§i¤§¡C<br> ¡@¡@¤áÄy¥D¥ô¬d¦³¤£©óªk©wÁn½Ð´Á¶¡Án½ÐªÌ¡AÀ³©w¬Û·í´Á¶¡¶Ê§iÁn½Ð¸q°È¤HÁn½Ð¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¸g«e±ø¶Ê§i¦Ó¤´¤£¨Ì´ÁÁn½ÐªÌ¡A¤áÄy¥D¥ô°£§e½ÐºÊ·þ©x¸p¤À§O®Ö¿ì¥~¡AÀ³¦A¥OÁn½Ð¸q°È¤H§Y¸É¦æÁn½Ð¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð´Á¶¡©Î¶Ê§i´Á¶¡¸g¹L«á©l¦æÁn½ÐªÌ¡A¤áÄy¥D¥ô¤´À³¨ü²z¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô¦]Án½Ð¤H¤§½Ð¨D¡AÀ³µoµ¹¨ü²zÁn½Ð¤§ÃÒ©ú®Ñ¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ãö©óµn°OÁn½Ð¤§³W©w¡A©óºM¾Pµn°O¤ÎÅܧóµn°O¤§Án½Ð·Ç¥Î¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤G¸` ¤áÄyµn°O¤§Án½Ð</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤Z¤@¤á±ý±N¥»Äy¥Ñ¤@¿¤¥«²¾Âà©ó¥L¤@¿¤¥«ªÌ¡A¥Ñ®aªø¦V¥»Äy¦a¤áÄy¥D¥ô½Ð¨Dµoµ¹ÂàÄyÃÒ©ú®Ñ¡A¨Ã¨ãÁn½Ð®Ñ¤G¥÷¡A¸ü©ú¥ª¦C¦U´Ú¨Æ¶µÁn½Ð¤§¡C<br> ¡@¡@¤@¡B®aªø¤Î®aÄݤ§©m¦W©Ê§O¥X¥Í¦~¤ë¤é¤Î¾·~¡C<br> ¡@¡@¤G¡B¥»Äy¦a¤Î¤áÄy¸¹¼Æ¡C<br> ¡@¡@¤T¡B·sÄy¦a¸ÓºÞ¶mÂí§{¤§¦WºÙ¡C<br> ¡@¡@«e¶µÁn½Ð¡A±o¦V·sÄy¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> ¡@¡@«e¤G¶µ¤§³W©w¡A©ó±HÄy¤§²¾Âà·Ç¥Î¤§¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦b¦P¤@¿¤¥«¤º¤§¤á¡A±ý¥Ñ¤@¶mÂí§{¾E±p©ó¥L¶mÂí§{ªÌ¡AÀ³¥Ñ®aªø¨ãÁn½Ð®Ñ¡A¸ü©ú¤áÄy¸¹¼Æ¤Î¥L¶mÂí§{¤§¦WºÙ¡A¦V­ì¶mÂí§{¤§¤áÄy¥D¥ôÁn½Ð¤§¡C<br> ¡@¡@¤áÄy¥D¥ô±µ¨ì«e¶µÁn½Ð®Ñ«á¡AÀ³§Y§@¦¨Án½Ð¤H¤§¤áÄyÁÃ¥»¡A°e¥æ¥L¶mÂí§{¤§¤áÄy¥D¥ô¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦]Án½Ð¤§¿òº|©Î¨ä¥L¨Æ¥Ñ¡A­PµL¥»Äy©Îµo¥Í½Æ¥»Äy¦ÓÁn½Ð³]Äy©Î°£ÄyªÌ¡AÀ³¥ý¸g³]Äy¦a©Î°£Äy¦aºÊ·þ©x¸p¤§³\¥i¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@³]Äy¤§Án½Ð¡AÀ³¦Û³\¥i¤§¤é°_¤Q¤­¤é¤º¡A¥Ñ®aªø¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¡A³s¦P³\¥i®ÑÁÃ¥»¦V³]Äy¦a¤§¸ÓºÞ¤áÄy¥D¥ô¬°¤§¡C<br> ¡@¡@¤@¡B³]Äy¤H¤Î¨ä¦P®a¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¤Î¾·~¡C<br> ¡@¡@¤G¡BµL¥»Äy¤§­ì¦]¡C<br> ¡@¡@¤T¡BµL¥»Äy­ì¦]µo¥Í«e¤§ÂÂ¥»Äy¡C<br> ¡@¡@¥|¡B³]Äy¤H¦p¬°®aªø¡A¨ä¬°®aªø¤§­ì¦]¡C<br> ¡@¡@¤­¡B³]Äy¤H¦p«Y®aÄÝ¡A¨ä»P®aªø¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¨Ì°êÄyªk¤§³W©w¨ú±o°êÄy©Î¦^´_°êÄy¦Ó³]ÄyªÌ¡A·Ç¥Î«e¶µ¤§³W©w¡A¨ÃÀ³¶}¨ã¨ú±o°êÄy©Î¦^´_°êÄy¤§­ì¦]¡A¨ä¨ú±o°êÄy¦^´_°êÄy¤§³\¥i®Ñ¡A»P¸ÓºÞºÊ·þ©x¸p¤§³\¥i®Ñ¦³¦P¤@¤§®Ä¤O¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@°£Äy¤§Án½Ð¡AÀ³¦Û³\¥i¤§¤é°_¤Q¤­¤é¤º¡A¥Ñ®aªø¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¡A³s¦P³\¥i®ÑÁÃ¥»¡A¦V°£Äy¦a¤§¸ÓºÞ¤áÄy¥D¥ô¬°¤§¡C<br> ¡@¡@¤@¡B°£Äy¤H¤Î¨ä¦P®a¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¤Î¾·~¡C<br> ¡@¡@¤G¡B¥»Äy¤Î½Æ¥»Äy¡C<br> ¡@¡@¤T¡Bµo¥Í½Æ¥»Äy¤§­ì¦]¡C<br> ¡@¡@¥|¡B¥»Äy¤§®aÄÝ»P½Æ¥»Äy¬Û²§®É¡A¨ä¬Û²§¤§­ì¦]¡C<br> ¡@¡@¦]¤@¤á®ø·À¦Ó°£ÄyªÌ¡A¥H¸Ó¤á³Ì«á¦º¤`ªÌ¦º¤`µn°O¤§Án½Ðµø¬°°£Äy¤§Án½Ð¡C<br> ¡@¡@¨Ì°êÄyªk¤§³W©w³à¥¢°êÄy¦Ó°£ÄyªÌ¡A¤º¬F³¡©óµoµ¹³\¥iÃÒ©ú®Ñ«á¡AÀ³±N³\¥i®ÑÁÃ¥»¶½¥æ¨ä¥»Äy¦a¤áÄy¥D¥ô¡Aµø¬°°£Äy¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨Ì½T©w§P¨M¦Ó¬°³]Äy©Î°£Äy¤§Án½ÐªÌ¡AµL¶·¸gºÊ·þ©x¸p¤§³\¥i¡A¦ýÀ³ªþ¨ã§P¨M®ÑÁÃ¥»¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦]¤À¤á©Î¨ä¥L­ì¦]¦Ó³Ð³]·s¤áªÌ¡A·Ç¥Î²Ä¥|¤Q¤C±ø²Ä¤@¶µ¤§³W©w¨Ã¶}¨ã³Ð³]·s¤á¤§­ì¦]¡C<br> </td> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤T¸` ¤H¨Æµn°O¤§Án½Ð</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤@´Ú ¥X¥Í</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤l¤k¤§¥X¥Í¡AÀ³¦Û¥X¥Í¤§¤é°_¤@­Ó¤ë¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µÁn½Ðµn°O¡C<br> ¡@¡@¤@¡B¤l¤k¤§©m¦W¡B¥X¥Í¦~¤ë¤é®É¤Î¥X¥Í¦a¡C<br> ¡@¡@¤G¡B¤÷¥À¤§©m¦W¡B¾·~¤Î¥»Äy¡C¦ý¥¼¸g»{»â¤§«D±B¥Í¤l¤k¡A¶È°O¸ü¨ä¥À¤l©m¦W¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤T¡B®aªø¤§©m¦W¡B¾·~¤Î»P¥X¥Í¤l¤k¤§¨­¤ÀÃö«Y¡C<br> ¡@¡@¥|¡B¤÷¥ÀµL°êÄyªÌ¡A¨äµL°êÄy¤§­ì¦]¡C<br> ¡@¡@¤­¡BÁn½Ðµn°O¤§¦~¤ë¤é¡C<br> ¡@¡@¤»¡BÁn½Ð¤H«D¬°¤÷¥À®É¡A¨ä©m¦W¡B©Ê§O¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¥X¥Í¦p«YÂù­L©Î¦h­L¡AÀ³¬°¨C¤@¤l¤k¦U¨ãÁn½Ð®Ñ¡A¨Ã¸ü©ú¨ä¥X¥Í¤§¥ý«á¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥X¥Í¤§µn°O¡A¥Ñ¤÷©Î¥ÀÁn½Ð¤§¡C¤÷¥À§¡¤£¯à¬°Án½Ð®É¡A¨Ì¥ª¦C¦¸§Ç©w¨äÁn½Ð¸q°È¤H¡C<br> ¡@¡@¤@¡B®aªø¡C<br> ¡@¡@¤G¡B¦P©~¤H¡C<br> ¡@¡@¤T¡B¤À®Y®ÉÁ{µø¤§Âå¥Í©Î§U²£¤h¡C<br> ¡@¡@¥|¡B¤À®Y®É¦b®Ç·ÓÅ@¤§¤H¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥X¥Íµn°O¤§Án½Ð¡AÀ³¦V¥X¥Í¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¹ï©ó¥X¥Í¤§¤l¤k±ý´£°_§_»{¤§¶DªÌ¡A¤´À³¬°¥X¥Íµn°O¤§Án½Ð¡A«S¨ä§_»{¸g§P¨M½T©w«á¡A¦A¦æªþ¨ã§P¨M®ÑÁÃ¥»Án½ÐÅܧóµn°O¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦bÂå°|¡BºÊº»©Î¨ä¥L¤½¦@³õ©Ò¥X¥Í¤§¤l¤k¡A¨ä¤÷¥À¤£¯à¬°µn°O¤§Án½Ð®É¡A¥ÑÂå°|°|ªø¡BºÊº»ªø©x©Î¨ä¥L¤½¦@³õ©ÒºÞ²z¤HÁn½Ð¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦b¦æ¾p¤§¤õ¨®¡Bªø³~¨T¨®¡B¹q¨®©Î­¸¾÷¤¤©Î¤£³Æ¯è¦æ¤é°O蠟²î²í¤¤¥X¥ÍªÌ¡A¥H¨ä¥À¤§¨ìµÛ¦aµø¬°¥X¥Í¦a¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦b²îÄ¥¯è¦æ¤¤¥X¥ÍªÌ¡A²îªø©ÎÄ¥ªøÀ³©ó¤G¤Q¥|¤p®É¤º¡A¥Ñ²îÄ¥¤¤¿ï©wÃÒ©ú¤H¡A¨Ì²Ä¤­¤Q¤@±ø©Ò¦C¨Æ¶µ¡A°O¸ü©ó¯è¦æ¤é°Oï¡A¨Ã°O¸üÃÒ©ú¤H¤§©m¦W¡B¾·~¤Î¥»Äy¡C»PÃÒ©ú¤H¦P¦æÃ±¦W¡C<br> ¡@¡@²îÄ¥¨ì¤¤°ê¤f©¤®É¡A²îªø©ÎÄ¥ªøÀ³©ó¤G¤Q¥|¤p®É¤º¡A±NÃö©ó¥X¥Í¤§¯è¦æ¤é°OÁÃ¥»¡A°e¥æ©ó¨ä¦a¤§¤áÄy¥D¥ô¡C²îÄ¥¨ì¥~°ê¤f©¤®É¡A²îªø©ÎÄ¥ªøÀ³©ó¤G¤Q¥|¤p®É¤º¡A±NÃö©ó¥X¥Í¤§¯è¦æ¤é°OÁÃ¥»¡A°e¥æ©Ò¦b°ê¤§¤¤°ê¨ÏÀ]©Î»â¨ÆÀ]¡A°e¸g¥~¥æ³¡Âà«t¤º¬F³¡µo¥æ¥X¥ÍªÌ¤§¤÷¥À¥»Äy¦a¤áÄy¥D¥ô¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µo¨£±ó¨à®É¡Aµo¨£¤H©Î±µµo¨£³ø§i¤§Äµ¹î©x¸p¡AÀ³©ó¤G¤Q¥|¤p®É¤º¡A¦Vµo¨£¦a¤áÄy¥D¥ô¬°¥X¥Íµn°O¤§Án½Ð¡C<br> ¡@¡@¤áÄy¥D¥ô©ó±µ¦³«e¶µÁn½Ð®É¡A¦p±ó¨àµL©m¦WªÌ¡AÀ³§Y¬°¥ß©m©R¦W¡A¨Ã±Nµo¨£¤§¦~¤ë¤é®É¡B³B©Ò¡BªþÄݤ§¦çªAª«¥ó»P±ó¨à¤§©m¦W¡B©Ê§O¤Î±À©w¥X¥Í¤§¦~¤ë¤é¡A§@¦¨µ§¿ý¡A²Kªþ©óÁn½Ð®Ñ¡C<br> ¡@¡@«e¶µ±ó¨à¡A¦p¦³»â¨ü¤H©Î±ÏÀÙ¾÷ÃöªÌ¡AÀ³±N»â¨ü¤H¤§©m¦W¡B¾·~¡B¥»Äy¦í©Ò¤Î»â¨ü¦~¤ë¤é©Î±ÏÀÙ¾÷Ãö¤§¦WºÙ³B©Ò¤Î¥æ¥I¦~¤ë¤é¤@¨Ö§@¦¨µ§¿ý¡C<br> ¡@¡@²Ä¤T¶µ¤§»â¨ü¤H©Î±ÏÀÙ¾÷Ãö¦³Åܧó®É¡AÀ³¥ÑÂù¤èÃö«Y¤H©ó¤Q¤­¤é¤º¡A¦V­ìµn°O¦a¤áÄy¥D¥ô§e³ø¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@±ó¨à¤§¤÷©Î¥À©Ó»â±ó¨à®É¡AÀ³©ó¤Q¤­¤é¤º¡A¨Ì²Ä¤­¤Q¤@±ø¤§³W©w¡A¬°§ó¥¿µn°O¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥X¥Í¤l¤k¥¼¤ÎÁn½Ðµn°O¦Ó¦º¤`ªÌ¡A¤´À³¬°¥X¥Í¤Î¦º¤`µn°O¤§Án½Ð¡C<br> ¡@¡@«e¶µ³W©w¡A©ó±ó¨à·Ç¥Î¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥X¥Í®ÉµL®ð®§ªÌ¡A¬°¦º²£¡C¤Z¦º²£À³¨ã¦º²£µn°OÁn½Ð®ÑÁn½Ðµn°O¡A¨Ã©óÁn½Ð®Ñ¤º¸ü©ú¦º²£¤§­ì¦]¡C¦ý¦]Ãh­L¥¼º¡¤»­Ó¤ë¦Ó¬y²£ªÌ¡A¤£¦b¦¹­­¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤G´Ú »{»â</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@«D±B¥Í¤l¤k»{»âµn°O¤§Án½Ð¡AÀ³¥Ñ»{»â¤H¦Û»{»â¤§¤é°_¤@­Ó¤ë¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡B¤l¤k¤§©m¦W¡B¥X¥Í¦~¤ë¤é®É¤Î¥X¥Í¦a¡C<br> ¡@¡@¤G¡B¤÷¤§Â¾·~¤Î¥À¤§©m¦W¡B¥»Äy¡C<br> ¡@¡@¤T¡B¤l¤k¬°®aÄݮɡA¨ä®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î¨ä»P¤l¤k¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¤l¤k¦p«Y¥~°ê¤H®É¡A°£«e¶µ©Ò¦C¦U´Ú¥~¡A¨ÃÀ³¶}¨ã¥»¤H¤Î¨ä¥À¤§­ì°êÄy¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@»{»â¥¼¥X¥Í¤§¤l¤k®É¡AÀ³©óÁn½Ð®Ñ¤º¸ü©ú¨ä¥¼¥X¥Í¤§¨Æ¹ê¡C¦p»{»â«á¥X¥Í¤l¤k¬°¦º²£®É¡A»{»â¤HÀ³¦Ûª¾¨ä¨Æ¹ê¤§¤é°_¤Q¤­¤é¤º¡A¦V»{»âµn°O¤§­ìÁn½Ð¦a¬°¦º²£µn°O¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨Ì¿òÅñ¬°»{»â®É¡A¿òÅñ°õ¦æ¤HÀ³¦Û´N¾¤§¤é°_¤Q¤­¤é¤º¡Aªþ¨ã¿òÅñÁÃ¥»¡A¬°»{»âµn°O¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@»{»â¤§§P¨M½T©w®É¡A°_¶D¤HÀ³¦Û§P¨M½T©w¤§¤é°_¤Q¤­¤é¤º¡Aªþ¨ã§P¨M®ÑÁÃ¥»¡A¬°»{»âµn°O¤§Án½Ð¨ÃÀ³©óÁn½Ð®Ñ¤º¸ü©ú§P¨M½T©w¤§¦~¤ë¤é¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@ºÊ·þ©x¸p¤Î¤áÄy¤H­û½s»sÃö©ó«D±B¥Í¤l¤k¤§¥X¥Í²Î­p³ø§i®É¡A¤£±o°O¸ü¨ä©m¦W¤Î¨ä¤÷¥À¤§©m¦W¡C<br> ¡@¡@¹H¤Ï«e¶µ¤§³W©wªÌ¡A§Q®`Ãö«Y¤H±o½Ð¨D½ßÀv¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤T´Ú ¦¬¾i</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦¬¾iµn°O¤§Án½Ð¡AÀ³¥Ñ¾i¤÷©Î¾i¥À¦Û¦¬¾i¤§¤é°_¤@­Ó¤ë¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡B¾i¤÷¥À¤Î¾i¤l¤k¤§©m¦W¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡B¾i¤l¤k¥»¥Í¤÷¥À¤§©m¦W¡B¾·~¤Î¥»Äy¡A¾i¤l¤k¬°±ó¨à®É¡A¨äµo¨£³B©Ò¤Î»â¨ü¤H¤§©m¦W¡B¾·~©Î±ÏÀÙ¾÷Ãö¤§¦WºÙ¡C<br> ¡@¡@¤T¡B·í¨Æ¤H¬°®aÄݮɡA¨ä®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î»P¾i¤l¤k¤§Ãö«Y¡C<br> ¡@¡@¥|¡BÃÒ©ú¤H¤§©m¦W¡B©Ê§O¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤­¡B¾i¤l¤k¬°¥~°ê¤H®É¡A¨ä­ì°êÄy¡C<br> ¡@¡@«e¶µµn°OÁn½Ð¡AÀ³¦V¾i¤÷¥À¤§¥»Äy¦a©Î±HÄy¦a¤áÄy¥D¥ô¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²×¤î¦¬¾iÃö«Yµn°O¤§Án½Ð¡AÀ³¦Û¦¬¾iÃö«Y²×¤î¤§¤é°_¤@­Ó¤ë¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡B¾i¤÷¥À¤Î¾i¤l¤k¤§©m¦W¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡B¾i¤l¤k¥»¥Í¤÷¥À¤§©m¦W¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤T¡B·í¨Æ¤H¬°®aÄݮɡA¨ä®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î»P¾i¤l¤k¤§Ãö«Y¡C<br> ¡@¡@¥|¡BÃÒ©ú¤H¤§©m¦W¡B©Ê§O¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤­¡B¦¬¾iµn°OÁn½Ð¤§¦~¤ë¤é¡C<br> ¡@¡@¤»¡B¦¬¾iÃö«Y²×¤î¤§­ì¦]¤Î¦~¤ë¤é¡C<br> ¡@¡@¤C¡B¾i¤l¤kµL®a¥iÂk®É¨ä¨Æ¥Ñ¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@«e±øµn°O¤§Án½Ð¤H¦]§P¨M²×¤î¦¬¾iÃö«Y®É¡A¥Ñ¾i¤÷¥À½Ð¨D²×¤îªÌ¬°¾i¤÷¥À¡A¥Ñ¾i¤l¤k½Ð¨D²×¤îªÌ¬°¾i¤l¤k¡A¦]¦P·N²×¤î®É¬°¾i¤÷¥À¤Î¾i¤l¤k¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¥|´Ú µ²±B</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µ²±Bµn°O¤§Án½Ð¡AÀ³¥ÑÂù¤è·í¨Æ¤H¦Ûµ²±B¤§¤é°_¤Q¤­¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡BÂù¤è·í¨Æ¤H¤§©m¦W¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡BÂù¤è¤÷¥À¤§©m¦W¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤T¡BÂù¤è®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î»P·í¨Æ¤H¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¥|¡BÃÒ¤H¤§©m¦W¡B©Ê§O¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤­¡Bµ²±B¤§¦~¤ë¤é¤Î©Ò¦b¦a¡C<br> ¡@¡@¤»¡B¦³«D±B¥Í¤l¤k¦]µ²±B¦Ó¨ú±o±B¥Í¤l¤k¨­¤ÀÃö«Y®É¡B¨ä¤l¤k¤§©m¦W¤Î¥X¥Í¦~¤ë¤é¡C<br> ¡@¡@¤C¡B·í¨Æ¤H¤§¤@¤è¬°¥~°ê¤H®É¡A¨ä­ì°êÄy¡C<br> ¡@¡@¤K¡B¦A±BªÌ¡A¨ä«e©d©Î«e¤Ò¤§©m¦W¡B¾·~¡B¥»Äy¤Î«e±B«ÃÃö«Y®ø·À¤§¦~¤ë¤é¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µ²±BÀ³±oªk©w¥N²z¤H¤§¦P·NªÌ¡AÀ³ªþ¨ã¦P·N¤§ÃÒ©ú®ÑÃþ¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µ²±Bµn°O¤§Án½Ð¡AÀ³¦Vµ²±B®É¦í©Ò©Ò¦b¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦]µ²±BµL®Ä¦ÓÁn½ÐºM¾Pµn°OªÌ¡AÀ³´£¥XµL®Ä¨Æ¥Ñ¤§ÃÒ©ú®ÑÃþ¬°¤§¡C<br> ¡@¡@¦]µ²±BºM¾P¦ÓÁn½ÐºM¾Pµn°OªÌ¡AÀ³¥Ñ½Ð¨DºM¾P¤H¦Û§P¨M½T©w¤§¤é°_¤Q¤­¤é¤º¡A´£¥X§P¨M®ÑÁÃ¥»¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤­´Ú Â÷±B</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Â÷±Bµn°O¤§Án½Ð¡AÀ³¥ÑÂù¤è·í¨Æ¤H¦ÛÂ÷±B¤§¤é°_¤Q¤­¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡BÂù¤è·í¨Æ¤H¤§©m¦W¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡BÂù¤è¤÷¥À¤§©m¦W¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤T¡BÂù¤è®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î»P·í¨Æ¤H¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¥|¡BÂ÷±B¤§¦~¤ë¤é¤Î©Ò¦b¦a¡C<br> ¡@¡@¤­¡B¨âÄ@Â÷±BªÌ¡B¨äÂ÷±B¤§®Ñ­±ÁÃ¥»¡A§P¨MÂ÷±BªÌ¡A¨ä§P¨M®ÑÁÃ¥»¡C<br> ¡@¡@¤»¡BÂ÷±BÀ³±oªk©w¥N²z¤H¤§¦P·NªÌ¡AÀ³ªþ¨ã¦P·N¤§ÃÒ©ú®ÑÃþ¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Â÷±Bµn°O¤§Án½Ð¡AÀ³¦VÂ÷±B®É·í¨Æ¤H¦í©Ò©Ò¦b¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤»´Ú ºÊÅ@</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@ºÊÅ@µn°O¤§Án½Ð¡AÀ³¥ÑºÊÅ@¤H¦ÛºÊÅ@¶}©l¤§¤é°_¤Q¤­¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡BºÊÅ@¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¡B¥»Äy¤Î¦í©Ò¡C<br> ¡@¡@¤G¡B¨üºÊÅ@¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤T¡B®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î»P¨üºÊÅ@¤H¤§Ãö«Y¡C<br> ¡@¡@¥|¡BºÊÅ@¤§­ì¦]¤ÎºÊÅ@¶}©l¤§¦~¤ë¤é¡C<br> ¡@¡@¤­¡B¬°ºÊÅ@¤H¤§­ì¦]¤Î¨äÃÒ©ú®ÑÃþ¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@ºÊÅ@¤H¦³§ó´«®É¡A·sºÊÅ@¤H°£¨Ì«e±ø³W©wÁn½Ðµn°O¥~¡A¨ÃÀ³¶}¨ã­ìºÊÅ@¤H¤§©m¦W¤Î¨ä§ó´«­ì¦]¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@ºÊÅ@Ãö«Y²×¤î®É¡AºÊÅ@¤HÀ³©ó¤Q¤­¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¡AÁn½Ð¬°ºÊÅ@Ãö«Y²×¤î¤§µn°O¡C<br> ¡@¡@¤@¡B¨üºÊÅ@¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡BºÊÅ@Ãö«Y²×¤î¤§­ì¦]¤Î¦~¤ë¤é¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ãö©óºÊÅ@µn°O¤§Án½Ð¡AÀ³¦V¨üºÊÅ@¤H¥»Äy¦a©Î±HÄy¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤C´Ú ¦º¤`</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦º¤`µn°O¤§Án½Ð¡AÀ³¥ÑÁn½Ð¤H©óª¾¨ä¦º¤`¤§¤é°_¤C¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡B¦º¤`ªÌ¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡B¦º¤`¤§¦~¤ë¤é®É¤Î©Ò¦b¦a¡C<br> ¡@¡@¤T¡B¦º¤`¤§­ì¦]¡C<br> ¡@¡@¥|¡B¦º¤`ªÌ°t°¸¤§¦³µL¡A¦³°t°¸®É¡A¨ä©m¦W¡C<br> ¡@¡@¤­¡B¦º¤`ªÌ¤÷¥À¤§©m¦W¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤»¡B®aªø¤§©m¦W¡B¾·~¡B¥»Äy¤Î»P¦º¤`ªÌ¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¤C¡B°±­í©Î®I¸®¦a¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@«e±øÁn½Ð¤H¨Ì¥ª¦C¦¸§Ç©w¤§¡C<br> ¡@¡@¤@¡B®aªø¡C<br> ¡@¡@¤G¡B¦P©~¤§¤H¡C<br> ¡@¡@¤T¡B¦º¤`ªÌ¦º¤`®É©Ò¦b¤§©Ð«Î©Î¤g¦aºÞ²z¤H¡C<br> ¡@¡@¥|¡B¸g²zÀÔ¸®¤§¤H¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦º¤`µn°O¤§Án½Ð¡AÀ³¦V¦º¤`¦a©Î¦º¤`ªÌ¤§¥»Äy¦a©Î±HÄy¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> ¡@¡@¦b¦æ¾p¤§¤õ¨®¡Bªø³~¨T¨®¡B¹q¨®©Î­¸¾÷¤¤©Î¤£³Æ¯è¦æ¤é°O蠟²î²í¤¤¦º¤`ªÌ¡A±o©ó¨ì¾i¦a¬°¦º¤`¾ã°O¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²Ä¤­¤Q¤C±ø¤§³W©w¡A©ó¦º¤`µn°O¤§Án½Ð·Ç¥Î¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@°õ¦æ¦º¦D®É¡AÀ³¥Ñ¦æ¦D¤½°È­û¶}¨ã²Ä¤K¤Q±ø©Ò¦C¦U´Ú¨Æ¶µ¡A¦V¦æ¦D¦a¤§¤áÄy¥D¥ô¬°¦º¤`¤§³qª¾¡C<br> ¡@¡@¦bºÊ¤H©óºÊº»¤º¦º¤`¦ÓµL¤H©Ó»â®É¡AÀ³¥ÑºÊº»ºÞ²z¤H¦VºÊº»©Ò¦b¦a¤§¤áÄy¥D¥ô¬°«e¶µ¤§³qª¾¡A¨ÃÀ³ªþ¨ã¶EÂ_®Ñ©ÎÀËÅçµ§¿ýÁÃ¥»¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦]¤ô¨a¡B¤õ¨a©Î¨ä¥L¨ÆÅܦӦº¤`ªÌ¡AÀ³¥Ñ½Õ¬d¨aÃø¤§¤½°È­û¡A¦V¦º¤`ªÌ¥»Äy¦a¤§¤áÄy¥D¥ô¬°¦º¤`¤§³qª¾¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦º¤`ªÌ¤§¥»Äy¤£©ú©Î¤£¯à»{ÃѨ䬰¦ó¤H®É¡A¸ÓºÞĵ¹î©x¸p¡B¦Ûªv¾÷Ãö¡AÀ³³ø§i¸ÓºÞ¥qªk¾÷Ãö¬£­û»Y³õÀËÅç¡AÀH§@ÀËÅçµ§¿ýÁÃ¥»¡A³qª¾¦º¤`¦a¤§¤áÄy¥D¥ô¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤K´Ú ¦º¤`¤§«Å§i</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦º¤`«Å§iµn°O¤§Án½Ð¡AÀ³¥ÑÁn½Ð«Å§i¦º¤`¤§¤H¦Û§P¨M½T©w¤§¤é°_©ó¤Q¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¡Aªþ¨ã§P¨M®ÑÁÃ¥»¬°¤§¡C<br> ¡@¡@¤@¡B¨ü¦º¤`«Å§iªÌ¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡B¨ü¦º¤`«Å§iªÌ¤§¥¢Âܦ~¤ë¤é¡C<br> ¡@¡@¤T¡B¦º¤`«Å§i¤§¦~¤ë¤é¡C<br> ¡@¡@¥|¡B®aªø¤§©m¦W¡B¾·~¤Î»P¨ü¦º¤`«Å§iªÌ¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¤­¡B¨ü¦º¤`«Å§iªÌ¬°­àªø®É¡A¨ä·s®aªø¤§©m¦W¡B¾·~¤Î»P«e®aªø¤§¿ËÄÝÃö«Y¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦º¤`«Å§i¸gºM¾P®É¡AÀ³¥ÑÁn½ÐºM¾P¦º¤`«Å§i¤§¤H¦Û§P¨M½T©w¤§¤é°_¤Q¤é¤º¡A´£¥X§P¨M®ÑÁÃ¥»¡A¬°ºM¾Pµn°O¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤E´Ú Ä~©Ó</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ä~©Óµn°O¤§Án½Ð¡AÄ~©Ó¤HÀ³¦Ûª¾±x¨ä±oÄ~©Ó¤§®É°_¤G­Ó¤ë¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¬°¤§¡C<br> ¡@¡@¤@¡BÄ~©Ó¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¡B¥»Äy¤Î©Ò¦b¦a¡C<br> ¡@¡@¤G¡B³QÄ~©Ó¤H¤§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¡B¥»Äy¤Î»PÄ~©Ó¤H¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¤T¡BÄ~©Ó¶}©l¤§¦~¤ë¤é¡C<br> ¡@¡@¥|¡BÄ~©Ó¤H¬°¥¼¦¨¦~¤H®É¡A¨äªk©w¥N²z¤H¤§©m¦W¡B©Ê§O¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@«ü©wÄ~©Ó¤H¬°Ä~©Óµn°O¤§Án½Ð®É¡A¨ÃÀ³ªþ¨ã¿òÅñÁÃ¥»¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ä~©Ó¤H¬°­L¨à®É¡AÄ~©Óµn°O¤§Án½Ð¡AÀ³¥Ñ¨ä¥À©ÎºÊÅ@¤H¬°¤§¡A¨ÃÀ³ªþ¸ü¨ä¥À©ÎºÊÅ@¤H¤§©m¦W¡B¾·~¤Î¥»Äy¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦]Ä~©Ó¦Ó´£°_¶D³^ªÌ¡AÀ³©ó§P¨M½T©w«áªþ¨ã§P¨M®ÑÁÃ¥»¬°Ä~©Óµn°O¤§Án½Ð¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²Ä¤K¤Q¤E±ø¦Ü²Ä¤E¤Q¤@±ø¤§Án½Ð¡AÀ³¦V³QÄ~©Ó¤H¤§¥»Äy¦a©Î±HÄy¦a¤§¤áÄy¥D¥ô¬°¤§¡C<br> </td> </table> </table> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¥|³¹ µn°O¤§µ{§Ç</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô¦¬¨üÃö©ó¤áÄy¤Î¤H¨Æµn°O¤§¦U¶µ®ÑÃþ®É¡AÀ³¨Ì¥»Äy¡B±HÄy¤ÎÀ³¦æµn°O¨Æ¶µ¤§©Ê½è¡A¤À§Oµn°O©ó¬Û·í¤§µn°Oï¡C¦p¦]¤H¨Æµn°O¨Æ¶µ­P¤áÄy¦³Åܧó®É¡A¨ÃÀ³µn°O©ó¬Û·í¤§¤áÄyµn°Oï©Î³qª¾¸ÓºÞ¤áÄy¥D¥ô¡C¦p¥»Äy©Î±HÄy¦³Åܧó®É¡AÀ³³qª¾Ãö«Y¤áÄy¥D¥ô¬°¥»Äy¡B±HÄy¤§µù¾P©ÎÂàÄy¤§µn°O¡C<br> ¡@¡@«e¶µµn°O¡A¨ÃÀ³°O©ú¦U¶µ®ÑÃþ¦¬¨ü¤§¸¹¼Æ¡B¦~¤ë¤é¤Î°e¥æªÌ¤§©m¦W¡B¾·~¡B¦í©Ò¡A°e¥æªÌ¬°¾÷Ãö©Î¤½°È­û®É¡A¨ä¾÷Ãö¦WºÙ©Î©x¾©m¦W¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦b¦P¤@ºÊ·þ°Ï°ì¤º¤@ºØµn°O¯A¤Î¥»Äy¤H¤Î±HÄy¤HªÌ¡AÀ³¤À§Oµn°O©ó¥»Äyµn°Oï¤Î±HÄyµn°Oï¡A¨Ã¦Uªþ°O¹ï·Ó¸¹¼Æ©óµn°OÄæ¥~¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°O¤§ºM¾P©ÎÅܧó¡AÀ³©ó­ìµn°OÄæ¥~µn°O¤§¡A¨ÃÀ³¨Ì¨ä¥»¦®µù¾P©ÎÅܧó­ìµn°O¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»Äy¤£©úªÌ¡A¸gµn°O©ó±HÄyµn°Oï«á¡A¨ä¥»Äy¤À©ú®É¡AÀ³¨ÌÁn½Ð©Î³qª¾¡A©ó­ìµn°OÄæ¥~¬°Åܧóµn°O¡C<br> ¡@¡@«e¶µ¤w¤À©ú¤§¥»Äy¡A¦p»P¨äµn°O¤§±HÄyÄÝ©ó¦P¤@ºÞÁҰϰì®É¡AÀ³µn°O©ó¥»Äyµn°Oï¦ÓºM¾P±HÄyµn°O蠟­ìµn°O¡A¨Ã¦Uªþ°O¹ï·Ó¸¹¼Æ©óµn°OÄæ¥~¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@³Qµn°OªÌ«D¥»Äy¤H®É¡B¨üÁn½Ð¤§¤áÄy¥D¥ô¡BÀ³©óµn°O«á¡B§Y±NÁn½Ð®Ñ½Æ¥»¡B¤À§O°e¥æ¨ä¥»Äy¦a¡A±HÄy¦a¤§ºÞÁÒ¤áÄy¥D¥ô¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ãö©ó¤H¨Æµn°O¡AÀ³¨Ì²Ä¤T³¹²Ä¤T¸`¦U´Ú©Ò©wÁn½Ð®Ñ¤ºÀ³°O¸ü¨Æ¶µ¡A¤À§Oµn°O©ó²Ä¤G¤Q¥|±ø©Ò©w¤§µn°O鷺¡C¦pµn°O¨Æ¶µ¯A¤Î¤G´Ú¥H¤WªÌ¡A¨ÃÀ³¦Uªþ°O¹ï·Ó¸¹¼Æ©óµn°OÄæ¥~¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄyµn°O¡AÀ³©ó²Ä¤Q¤K±ø©Ò©w¤§µn°Oï¥Î¯È¤ºµn°O¥ª¦C¨Æ¶µ¡C<br> ¡@¡@¤@¡B®aªø¡B«e®aªø¤Î®aÄݤ§©m¦W¡B©Ê§O¡B¥X¥Í¦~¤ë¤é¡B¾·~¤Î¥»Äy¡C<br> ¡@¡@¤G¡B¦¨¬°®aªø¤Î®aÄݤ§­ì¦]¤Î¦~¤ë¤é¡A¦ý¦]¥X¥Í¦Ó¬°®aÄݪ̡A¤£¦b¦¹­­¡C<br> ¡@¡@¤T¡B®aªø»P«e®aªø¤§¿ËÄÝÃö«Y¡C<br> ¡@¡@¥|¡B®aªø»P®aÄݤ§¿ËÄÝÃö«Y¡C<br> ¡@¡@¤­¡B¥Ñ¥L®a¤J¬°®aÄݪ̡A¨ä­ìÄy¡C<br> ¡@¡@¤»¡B®aªø¡B®aÄݦ³Åܧó®É¡A¨ä­ì¦]¤Î¦~¤ë¤é¡C<br> ¡@¡@¤C¡B¦³ºÊÅ@¤H®É¡BºÊÅ@¤H¤§©m¦W¡B¦í©Ò¡B¾·~¤ÎºÊÅ@¶}©l²×¤î¤§¦~¤ë¤é¡C<br> ¡@¡@¤K¡B¨ä¥LÃö©ó®aªø©Î®aÄݤ§Ãö«Y¨Æ¶µ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°O®aªø¤Î®aÄݤ§©m¦W®É¡AÀ³¨Ì¥ª¦C¦¸§Ç¡C<br> ¡@¡@¤@¡B®aªø¡C<br> ¡@¡@¤G¡B®aªø¤§°t°¸¡C<br> ¡@¡@¤T¡B®aªø¤§ª½¨t´L¿ËÄÝ¡C<br> ¡@¡@¥|¡B®aªø¤§ª½¨t¨õ¿ËÄݤΨä°t°¸¡C<br> ¡@¡@¤­¡B®aªø¤§®Ç¨t¿ËÄݤΨä°t°¸¡C<br> ¡@¡@¤»¡B¨ä¥L®aÄÝ¡C<br> ¡@¡@ª½¨t¿ËÄݩήǨt¿ËÄݶ¡¤§¦¸§Ç¡A¥H¿Ëµ¥ªñªÌ¬°¥ý¡A¿Ëµ¥¦PªÌ¨Ì¨ä¥X¥Í¤§¥ý«á¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü²z®aªøÅܧó¤§Án½Ð®É¡AÀ³®Ú¾Ú«e®aªø¤§¤áÄy¤Î¨ä¸¹¼Æ¨Ã´NÅܧ󍯶µ¡A½s­q·s®aªø¤§¤áÄy¡A±N«e®aªø¤§¤áÄyµù¾P¡C<br> ¡@¡@«e¶µ·s½s¤áÄy¤§°Æ¥»¡AÀ³»P­ì¤áÄy¤§µù¾PÁÃ¥»¤@¨Ö°e§eºÊ·þ©x¸p¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü²z²Ä¤T¤Q¤C±ø¤§Án½Ð®É¡A¤áÄy¥D¥ôÀ³¨Ìªkµn°O¡A¨Ã±N¨äÁn½Ð®Ñ¤§ÁÃ¥»°e§eºÊ·þ©x¸p¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü²z²Ä¥|¤Q¥|±øÂàÄyÁn½Ð®É¡A¤áÄy¥D¥ôÀ³¨Ì¾ÚÁn½Ð®Ñ©Ò¸ü¨Æ¶µ¡A½s­q·s¤áÄy¡A¥H·s¤áÄy¤§°Æ¥»°e§eºÊ·þ©x¸p¡C<br> ¡@¡@­ìÄy¦a¤§¤áÄy¥D¥ô¡A©ó±µ¨ü«e¶µ¤§Án½Ð®Ñ®É¡AÀ³°O¸ü¨äÂàÄy¨Æ¥Ñ©ó­ì¤áÄy¦Óµù¾P¤§¡A¨Ã±N¨äÁÃ¥»§e°eºÊ·þ©x¸p¡C<br> ¡@¡@ÂàÄy¤H©ó·sºÞÁÒ¤áÄy¥D¥ô¬°ÂàÄy¤§µn°O®É¡A¨ú±o·s¥»Äy©Î±HÄy¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤@¤á¶È¦³¤@¤H¦]¦º¤`©Î¨ü¦º¤`«Å§i¦Ó¬°µ´¤áªÌ¡A¤áÄy¥D¥ôÀ³¸gºÊ·þ©x¸p³\¥i¡A©ó¸Ó¤áÄy°O¸üµ´¤á­ì¦]¤Î¦~¤ë¤é¦Óµù¾P¤§¡A¨Ã±N¨äµù¾PÁÃ¥»°e§eºÊ·þ©x¸p¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü²z²Ä¥|¤Q¤­±ø¤§¾E±pÁn½Ð®É¡A¤áÄy¥D¥ô°£±NÁn½Ð¤H¤§¤áÄyÁÃ¥»°e¥æ·sºÞÁҰϰ줧¤áÄy¥D¥ô¥~¡AÀ³°O¸ü¨ä¾E±p¨Æ¥Ñ©ó­ì¤áÄy¦Óµù¾P¤§¡A¨Ã±N¨äµù¾PÁÃ¥»°e§eºÊ·þ©x¸p¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü²z²Ä¥|¤Q¤C±ø¤§³]ÄyÁn½Ð®É¡A·Ç¥Î²Ä¤@¦Ê¹s¤T±ø²Ä¤@¶µ¤§³W©w¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü²z²Ä¥|¤Q¤K±ø¤§°£ÄyÁn½Ð®É¡A¤áÄy¥D¥ôÀ³°O¸ü¨ä°£Äy¨Æ¥Ñ©ó­ì¤áÄy¦Óµù¾P¤§¡A¨Ã±N¨äµù¾PÁÃ¥»°e§eºÊ·þ©x¸p¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy½s­q«á¦¨¬°®aÄݦӤ£¯à¨Ì²Ä¤@¦Ê±ø¤§¦¸§Çµn°O®É¡AÀ³µn°O©ó¤wµn°O¤§®aÄÝ©m¦W¤§¦¸¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¹s¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°O°£¥t¦³³W©w¥~¡AÀ³«ö¥ó¨Ì¦¬¨ü¦¸§Ç¬°¤§¡A¨Ã³v¥ó½s­q¸¹¼Æ¡C<br> ¡@¡@¤áÄy¥D¥ôÀ³©ó¨C¥óµn°O¥½§À»\¦L¡C<br> ¡@¡@¬°Äæ¥~µn°O¦Ó¥Î¯È¤£¼Å®É¡A±o¥Îªþºà¡A¦ýÀ³¥Ñ¤áÄy¥D¥ô©óÖߪþ³B¥[»\ÃMÁ_¦L¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²Ä¤T¤Q¤T±ø¤§³W©w¡A©óµn°O·Ç¥Î¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°O«á¡BÀ³±Nµn°O¨Æ¶µ¤§Ãö«Y®ÑÃþ¡Bªþ°Oµn°O¸¹¼Æ¤Î¦~¤ë¤é¡A¨Ì·Óµn°OïºØÃþ¡A½s­q¦¨¥U¡Aªþ¨ã¥Ø¿ý¡A«ö¤ë°e¥æºÊ·þ©x¸p«O¦s¤§¡A¨ä«O¦s´Á¶¡¡A¥Ñ¤º¬F³¡©w¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô©óµn°O«á¡AÀ³§Y«ö¥ó¤À§OÁüg©óÃö«Yµn°Oï°Æ¥»¡A°e§eºÊ·þ©x¸p¡A°e§e«áÀ³¬°Äæ¥~µn°O®É¡A¥Ñ¤áÄy¥D¥ô§@¦¨Äæ¥~µn¬öÁÃ¥»¡A¸É°eºÊ·þ©x¸p¡C<br> ¡@¡@ºÊ·þ©x¸p±µ¨ü«e¶µ¸É°eÁÃ¥»®É¡AÀ³Öߪþ©óµn°Oï°Æ¥»¤¤¬Û·íµn°OÄæ¥~¡A¥[»\ÃMÁ_¦L¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤ZºÞÁҰϰì¤g¦a°Ï¹º¡B¦WºÙ¤ÎªùµP¸¹¼Æ¦³Åܧó®É¡Aµn°Oï©Ò°O¸ü¤§°Ï°ì¡B°Ï¹º¡B¦WºÙ¤Î¸¹¼Æ¡AÀ³§Y«ö·Ó§ó¥¿¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨C©¡¦~²×¤áÄy¥D¥ôÀ³©ó³Ì«áµn°O¤§¥½¡A°O¸ü²×µ²¦r¼Ë¡Añ¦W»\¦L¡C<br> ¡@¡@«e¶µ³W©w¡A©ó¥¼¦Ü¦~²×¦Óµn°Oï¥Î¯È¤wºÉ®É·Ç¥Î¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤­³¹ µn°O¤§Åܧó©Î§ó¥¿</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@±ýÅܧó¤áÄy¤Î¤H¨Æµn°OªÌ¡AÀ³¸g¸ÓºÞºÊ·þ©x¸p³\¥i¡A©l±oÁn½Ð¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Åܧóµn°O¤§Án½Ð¡AÀ³¦Û³\¥i¤§¤é°_©ó¤Q¤­¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¡Aªþ¨ã³\¥i®ÑÁÃ¥»¡A¦V­ìµn°O¤§¤áÄy¥D¥ô¬°¤§¡C<br> ¡@¡@¤@¡B­ìµn°O¨Æ¶µ¤§¦WºÙ¤Î¦~¤ë¤é¡C<br> ¡@¡@¤G¡B©ÒÅܧ󤧨ƶµ¡C<br> ¡@¡@¤T¡BÅܧ󤧭ì¦]¤Î³\¥i¦~¤ë¤é¡C<br> ¡@¡@¦]½T©w§P¨M¦ÓÅܧóµn°O®É¡A¨ÃÀ³ªþ¨ã§P¨M®ÑÁÃ¥»¡A¨Ì«e¶µ³W©wÁn½Ð¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µn°O«á¡A§Q®`Ãö«Y¤H¦pµo¨£¦³ªk«ß¤W¤£¯à¤¹³\¤§¨Æ¶µ©Î¦³¿ù»~²æº|±¡¨Æ®É¡A±o¸g¸ÓºÞºÊ·þ©x¸p©Î¥qªk¾÷Ãö¤§³\¥i¡AÁn½Ð§ó¥¿µn¡C<br> ¡@¡@«e¶µ±¡¨Æ¡A¥Ñ¤áÄy¥D¥ôµo¨£®É¡AÀ³§Y³qª¾­ìÁn½Ð¤H©Î§Q®`Ãö«Y¤H¬°§ó¥¿µn°O¤§Án½Ð¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦]½T©w§P¨M¦ÓÀ³¬°§ó¥¿µn°O®É¡A§Q®`Ãö«Y¤HÀ³¦Û§P¨M½T©w¤§¤é°_©ó¤@­Ó¤ë¤º¡Aªþ¨ã§P¨M®ÑÁÃ¥»Án½Ð¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Åܧó©m¦WªÌ¡AÀ³¦Û³\¥i¤§¤é°_¤Q¤­¤é¤º¡A¶}¨ã¥ª¦C¦U´Ú¨Æ¶µ¡Aªþ¨ä³\¥i®ÑÁÃ¥»Án½Ð¤§¡C<br> ¡@¡@¤@¡BÅܧó«e¤§­ì©m¦W¡C<br> ¡@¡@¤G¡BÅܧó«á¤§·s©m¦W¡C<br> ¡@¡@¤T¡BÅܧ󤧭ì¦]¤Î³\¥i¤§¦~¤ë¤é¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤»³¹ ¶DÄ@</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Ãö©ó¤áÄy©Î¤H¨Æµn°O¨Æ¥ó¡A¥H¤áÄy¥D¥ô¤§³B¤À¬°¤£·í©Î¹HªkªÌ¡A±o¶DÄ@©ó¸Ó¤áÄy¥D¥ô©ÒÄݤ§ºÊ·þ©x¸p¡C<br> ¡@¡@«e¶µ¶DÄ@¡AÀ³´£¥X¶DÄ@®Ñ¡Aªþ¨ãÁn½Ð®Ñ¤Î¨ä¥LÃö«Y®ÑÃþ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@«e±ø¶DÄ@®Ñ¡AÀ³Âµ¨ã°Æ¥»¡A¤À°e­ì³B¤À¤§¤áÄy¥D¥ô¡A¤áÄy¥D¥ô±µ¨ì¶DÄ@®Ñ°Æ¥»¡A»{¶DÄ@¬°¦³²z¥ÑªÌ¡AÀ³§Y¦æÅܧó©ÎºM¾P¨ä­ì³B¤À¡A§e³øºÊ·þ©x¸p¡A¨Ã³qª¾¶DÄ@¤H¡A»{¬°µL²z¥ÑªÌ¡AÀ³ªþ¨ãµªÅG®Ñ¤ÎÃö«Y®ÑÃþ¡A©ó¤Q¤­¤é¤º°e§eºÊ·þ©x¸p¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@ºÊ·þ©x¸p»{¶DÄ@¬°µL²z¥ÑªÌ¡AÀ³¥H¨M©w»é¦^¤§¡A¦³²z¥ÑªÌ¡AÀ³¥H¨M©w¥O¤áÄy¥D¥ôÅܧó©ÎºM¾P­ì³B¤À¡A¶DÄ@¤§¨M©w¡AÀ³°e¹F©ó¤áÄy¥D¥ô¤Î¶DÄ@¤H¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¶DÄ@¤H¤£ªAºÊ·þ©x¸p¤§¨M©wªÌ¡A±o¦Vª½±µ¤W¯Å©x¸p´£°_¦A¶DÄ@¡A¥H¦A¶DÄ@¤§¨M©w¬°³Ì²×¤§¨M©w¡C<br> ¡@¡@¦ý¹Hªk³B¤À¡A©ó¦A¶DÄ@¨M©w«á¡A¤´±o¨Ìªk´£°_¦æ¬F¶D³^¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤C³¹ »@«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@©óªk©w´Á¶¡¤ºµL¥¿·í²z¥ÑÀ³Án½Ðµn°O¦Ó¤£¬°Án½ÐªÌ¡A³B¤­¨¤¥H¤U¤§»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@©ó¤áÄy¥D¥ô©Ò©w¶Ê§i´Á¶¡¤º¤´¤£¬°Án½ÐªÌ¡A³B¤@¤¸¥H¤U¤§»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án½Ð¤H¬°¤£¹ê¤§§e³øªÌ³B¤G¤¸¥H¤U¤§»@Áì¡A¦]¦Ó­Pµo¥Í¨â¥»Äy©Î¨â±HÄyªÌ¡A³B¤T¤¸¥H¤U¤§»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô¦³¥ª¦C±¡¨Æ¤§¤@ªÌ¡A³B¤Q¤¸¥H¤U¤§»@Áì¡C<br> ¡@¡@¤@¡BµL¥¿·í²z¥Ñ¤£¨ü²zÃö©ó¤áÄy©Î¤H¨Æµn°O¤§Án½ÐªÌ¡C<br> ¡@¡@¤G¡B«å©ó¤áÄy©Î¤H¨Æ¤§µn°OªÌ¡C<br> ¡@¡@¤T¡B¨Ì¥»ªkÀ³¦æ§e³øºÊ·þ©x¸p©ÎÂà°e¨ä¥L¤áÄy¥D¥ô¤§¨Æ¶µ¡A¤£¬°§e³ø©ÎÂà°eªÌ¡C<br> ¡@¡@¥|¡B¹ï©ó¥»ªk³W©w¤§²Î­p©u³ø¡B²Î­p¦~³ø¤Î¨ä¥L³ø§i¤£«ö´Á½s°eªÌ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤áÄy¥D¥ô¦³¥ª¦C±¡¨Æ¤§¤@ªÌ¡A³B¤­¤¸¥H¤U¤§»@Áì¡C<br> ¡@¡@¤@¡BµL¥¿±`²z¥Ñ©Úµ´½Ð¨D¾\Äý¤áÄyµn°Oï©Î¤H¨Æµn°OïªÌ¡C<br> ¡@¡@¤G¡BµL¥¿·í²z¥Ñ¤£¥æ¥I¤áÄy©Î¤H¨Æµn°O¤§ÁÃ¥»ªÌ¡C<br> ¡@¡@¤T¡BµL¥¿·í²z¥Ñ¤£¥æ¥I¤áÄy©Î¤H¨ÆÁn½Ð¤§ÃÒ©ú®ÑªÌ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤G¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@«e¤G±ø»@Á줧¨M©w¡A¥Ñ¤áÄy¥D¥ô©ÒÄݤ§ºÊ·þ©x¸p¬°¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤T¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@·N¹Ï«K§Q¦Û¤v©Î¥L¤H©Î³´®`¥L¤H¡AÃö©ó¤áÄy¤Î¤H¨Æµn°O¬°¶B°°¤§Án½ÐªÌ¡A³B¤@¦~¥H¤U¤§®{¦D©Î¤­¤Q¤¸¥H¤W¤­¦Ê¤¸¥H¤U¤§»@ª÷¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤K³¹ ªþ«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤T¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»ªk¬I¦æ²Ó«h¡A¥Ñ¤º¬F³¡©w¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@¦Ê¤T¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»ªk¬I¦æ¤é´Á¡A¥H©R¥O©w¤§¡C<br> </td> </table> </table> </table> </left> </body> <!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/01119/0111923032300.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:07:11 GMT --> </html>
g0v/laweasyread-data
rawdata/lawstat/version2/01119/0111923032300.html
HTML
mit
63,327
define([], function(){ // module: // dojo/aspect "use strict"; var undefined; function advise(dispatcher, type, advice, receiveArguments){ var previous = dispatcher[type]; var around = type == "around"; var signal; if(around){ var advised = advice(function(){ return previous.advice(this, arguments); }); signal = { remove: function(){ if(advised){ advised = dispatcher = advice = null; } }, advice: function(target, args){ return advised ? advised.apply(target, args) : // called the advised function previous.advice(target, args); // cancelled, skip to next one } }; }else{ // create the remove handler signal = { remove: function(){ if(signal.advice){ var previous = signal.previous; var next = signal.next; if(!next && !previous){ delete dispatcher[type]; }else{ if(previous){ previous.next = next; }else{ dispatcher[type] = next; } if(next){ next.previous = previous; } } // remove the advice to signal that this signal has been removed dispatcher = advice = signal.advice = null; } }, id: dispatcher.nextId++, advice: advice, receiveArguments: receiveArguments }; } if(previous && !around){ if(type == "after"){ // add the listener to the end of the list // note that we had to change this loop a little bit to workaround a bizarre IE10 JIT bug while(previous.next && (previous = previous.next)){} previous.next = signal; signal.previous = previous; }else if(type == "before"){ // add to beginning dispatcher[type] = signal; signal.next = previous; previous.previous = signal; } }else{ // around or first one just replaces dispatcher[type] = signal; } return signal; } function aspect(type){ return function(target, methodName, advice, receiveArguments){ var existing = target[methodName], dispatcher; if(!existing || existing.target != target){ // no dispatcher in place target[methodName] = dispatcher = function(){ var executionId = dispatcher.nextId; // before advice var args = arguments; var before = dispatcher.before; while(before){ if(before.advice){ args = before.advice.apply(this, args) || args; } before = before.next; } // around advice if(dispatcher.around){ var results = dispatcher.around.advice(this, args); } // after advice var after = dispatcher.after; while(after && after.id < executionId){ if(after.advice){ if(after.receiveArguments){ var newResults = after.advice.apply(this, args); // change the return value only if a new value was returned results = newResults === undefined ? results : newResults; }else{ results = after.advice.call(this, results, args); } } after = after.next; } return results; }; if(existing){ dispatcher.around = {advice: function(target, args){ return existing.apply(target, args); }}; } dispatcher.target = target; dispatcher.nextId = dispatcher.nextId || 0; } var results = advise((dispatcher || existing), type, advice, receiveArguments); advice = null; return results; }; } // TODOC: after/before/around return object var after = aspect("after"); /*===== after = function(target, methodName, advice, receiveArguments){ // summary: // The "after" export of the aspect module is a function that can be used to attach // "after" advice to a method. This function will be executed after the original method // is executed. By default the function will be called with a single argument, the return // value of the original method, or the the return value of the last executed advice (if a previous one exists). // The fourth (optional) argument can be set to true to so the function receives the original // arguments (from when the original method was called) rather than the return value. // If there are multiple "after" advisors, they are executed in the order they were registered. // target: Object // This is the target object // methodName: String // This is the name of the method to attach to. // advice: Function // This is function to be called after the original method // receiveArguments: Boolean? // If this is set to true, the advice function receives the original arguments (from when the original mehtod // was called) rather than the return value of the original/previous method. // returns: // A signal object that can be used to cancel the advice. If remove() is called on this signal object, it will // stop the advice function from being executed. }; =====*/ var before = aspect("before"); /*===== before = function(target, methodName, advice){ // summary: // The "before" export of the aspect module is a function that can be used to attach // "before" advice to a method. This function will be executed before the original method // is executed. This function will be called with the arguments used to call the method. // This function may optionally return an array as the new arguments to use to call // the original method (or the previous, next-to-execute before advice, if one exists). // If the before method doesn't return anything (returns undefined) the original arguments // will be preserved. // If there are multiple "before" advisors, they are executed in the reverse order they were registered. // target: Object // This is the target object // methodName: String // This is the name of the method to attach to. // advice: Function // This is function to be called before the original method }; =====*/ var around = aspect("around"); /*===== around = function(target, methodName, advice){ // summary: // The "around" export of the aspect module is a function that can be used to attach // "around" advice to a method. The advisor function is immediately executed when // the around() is called, is passed a single argument that is a function that can be // called to continue execution of the original method (or the next around advisor). // The advisor function should return a function, and this function will be called whenever // the method is called. It will be called with the arguments used to call the method. // Whatever this function returns will be returned as the result of the method call (unless after advise changes it). // example: // If there are multiple "around" advisors, the most recent one is executed first, // which can then delegate to the next one and so on. For example: // | around(obj, "foo", function(originalFoo){ // | return function(){ // | var start = new Date().getTime(); // | var results = originalFoo.apply(this, arguments); // call the original // | var end = new Date().getTime(); // | console.log("foo execution took " + (end - start) + " ms"); // | return results; // | }; // | }); // target: Object // This is the target object // methodName: String // This is the name of the method to attach to. // advice: Function // This is function to be called around the original method }; =====*/ return { // summary: // provides aspect oriented programming functionality, allowing for // one to add before, around, or after advice on existing methods. // example: // | define(["dojo/aspect"], function(aspect){ // | var signal = aspect.after(targetObject, "methodName", function(someArgument){ // | this will be called when targetObject.methodName() is called, after the original function is called // | }); // // example: // The returned signal object can be used to cancel the advice. // | signal.remove(); // this will stop the advice from being executed anymore // | aspect.before(targetObject, "methodName", function(someArgument){ // | // this will be called when targetObject.methodName() is called, before the original function is called // | }); before: before, around: around, after: after }; });
synico/springframework
lobtool/src/main/webapp/resources/javascript/dojo/aspect.js
JavaScript
mit
8,451
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class CI_Test extends PHPUnit_Framework_TestCase{ /** * Constructor * * @access public */ function __construct($name = NULL,$data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); $class = new ReflectionClass($this); log_message('debug', "Test Class Initialized ".$class->getName()); } /** * __get * * Allows models to access CI's loaded classes using the same * syntax as controllers. * * @param string * @access private */ function __get($key) { $CI =& get_instance(); if(property_exists($CI,$key) === true ) return $CI->$key; return parent::$key; } }
milkbobo/FishCI
system/core/Test.php
PHP
mit
704
// **************************************************************** // Copyright 2007, Charlie Poole // This is free software licensed under the NUnit license. You may // obtain a copy of the license at http://nunit.org // **************************************************************** using System; namespace NUnit.Framework { /// <summary> /// Attribute used to provide descriptive text about a /// test case or fixture. /// </summary> [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)] public class DescriptionAttribute : Attribute { string description; /// <summary> /// Construct the attribute /// </summary> /// <param name="description">Text describing the test</param> public DescriptionAttribute(string description) { this.description=description; } /// <summary> /// Gets the test description /// </summary> public string Description { get { return description; } } } }
acken/AutoTest.Net
lib/NUnit/src/NUnit-2.6.0.12051/src/NUnitFramework/framework/Attributes/DescriptionAttribute.cs
C#
mit
1,044
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require jquery //= require jquery-ui //= require jquery_ujs //= require bootstrap-sprockets //= require underscore //= require backbone //= require codemirror //= require codemirror/modes/markdown //= require select2 //= require nprogress //= require nprogress-ajax //= require locomotive/vendor //= require ./locomotive/application $(document).ready(function() { $.datepicker.setDefaults($.datepicker.regional[window.locale]); });
chepri/engine
app/assets/javascripts/locomotive.js
JavaScript
mit
842
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); var BaseStream_1 = require("./BaseStream"); var GroupDisposable_1 = require("../Disposable/GroupDisposable"); var ConcatObserver_1 = require("../observer/ConcatObserver"); var registerClass_1 = require("../definition/typescript/decorator/registerClass"); var RepeatStream = (function (_super) { __extends(RepeatStream, _super); function RepeatStream(source, count) { var _this = _super.call(this, null) || this; _this._source = null; _this._count = null; _this._source = source; _this._count = count; _this.scheduler = _this._source.scheduler; return _this; } RepeatStream.create = function (source, count) { var obj = new this(source, count); return obj; }; RepeatStream.prototype.subscribeCore = function (observer) { var self = this, d = GroupDisposable_1.GroupDisposable.create(); function loopRecursive(count) { if (count === 0) { observer.completed(); return; } d.add(self._source.buildStream(ConcatObserver_1.ConcatObserver.create(observer, function () { loopRecursive(count - 1); }))); } this.scheduler.publishRecursive(observer, this._count, loopRecursive); return GroupDisposable_1.GroupDisposable.create(d); }; RepeatStream = __decorate([ registerClass_1.registerClass("RepeatStream") ], RepeatStream); return RepeatStream; }(BaseStream_1.BaseStream)); exports.RepeatStream = RepeatStream; //# sourceMappingURL=RepeatStream.js.map
yyc-git/DYReactive
dist/commonjs/stream/RepeatStream.js
JavaScript
mit
2,739
<?php use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputArgument; class ImportBooksISBNCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'books:import'; /** * The console command description. * * @var string */ protected $description = 'Import from a CSV file, a list of ISBN for EESoc Book Sales'; /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * Execute the console command. * * @return void */ public function fire() { $google = false; $amazon= false; $responsible = User::where('id', '=', 1291)->firstOrFail(); //Sautrik Banerjee of EESoc 2015s $file = $this->argument("path"); $this->info("Reading from list: ".$file); $failed = array(); //Import CSV $row = 0; if (($handle = fopen($file,'r')) !== FALSE) { $this->info('File opened: '.$file.'.'); while (($data = fgetcsv($handle, 20, ",")) !== FALSE) { $row++; //Next row //Clean input for($i=0; $i < count($data); $i++){ $data[$i] = trim($data[$i]); } $this->info($row." : Searching ISBN: ".$data[0]); if (count($data) > 1){ $this->info("Metadata discarded: ".$data[1]); } if ($google){ $this->info('Searching on Google '.$data[0]); $search = file_get_contents("https://www.googleapis.com/books/v1/volumes?q=isbn:".urlencode($data[0])."&key=AIzaSyABWOEVCQ83nB81klr3V_6i6XmGE9Oiz04&country=UK&maxResults=1"); $results = json_decode($search, true); //['google_book_id', 'thumbnail', 'isbn', 'name', 'condition', 'target_student_groups', 'target_course', 'price', 'quantity', 'contact_instructions', 'expires_at']; if (isset($results['items'][0])) { $return = $results['items'][0]; $book = new Book; $book->user()->associate($responsible); $book->google_book_id = $return['id']; if (isset($return['volumeInfo']['imageLinks'])) { $book->thumbnail = $return['volumeInfo']['imageLinks']['thumbnail']; } $book->isbn = $data[0]; $book->name = $return['volumeInfo']['title']; $book->condition = "Used"; $book->target_student_groups = "EESoc Book Sales"; //$book->target_course = ""; $book->price = 25.00; $book->quantity = 1; $book->contact_instructions = "This is part of the EESoc Book Sales, please contact sautrik.banerjee13@imperial.ac.uk for more information."; $book->expires_at = "2016-08-01"; $book->save(); $this->info('...Import of '.$book->name.' completed successfully.'); }else { $failed[] = $data[0]; $this->error('...failed!!!!' . " Info:\r\n" . $search); } }else if ($amazon){ $this->info('Searching on Amazon ' . $data[0]); /* * * http://webservices.amazon.com/onca/xml? Service=AWSECommerceService &Operation=ItemLookup &ResponseGroup=Large &SearchIndex=All &IdType=ISBN &ItemId=076243631X &AWSAccessKeyId=[Your_AWSAccessKeyID] &AssociateTag=[Your_AssociateTag] &Timestamp=[YYYY-MM-DDThh:mm:ssZ] &Signature=[Request_Signature] * * */ $private_key = "l3XC2Kft00cja2VZyOpNt79I4jxnRXYUaBeBHzM9"; $params = array(); $method = "GET"; $host = "webservices.amazon.com"; $uri = "/onca/xml"; // additional parameters $params["Service"] = "AWSECommerceService"; $params["Operation"] = "ItemLookup"; $params["ResponseGroup"] = "Large"; $params["SearchIndex"] = "All"; $params["IdType"] = "ISBN"; $params["ItemId"] = $data[0]; $params["AWSAccessKeyId"] = "AKIAI4OV6KZBMHKOS6MQ"; $params["AssociateTag"] = "e03ef-21"; // GMT timestamp $params["Timestamp"] = gmdate("Y-m-d\TH:i:s\Z"); $params["Version"] = "2013-08-01"; // sort the parameters uksort($params, 'strcmp'); // create the canonicalized query $canonicalized_query = array(); foreach ($params as $param => $value) { $param = str_replace("%7E", "~", rawurlencode($param)); $value = str_replace("%7E", "~", rawurlencode($value)); $canonicalized_query[] = $param . "=" . $value; } $canonicalized_query = implode("&", $canonicalized_query); // create the string to sign $string_to_sign = $method . "\n" . $host . "\n" . $uri . "\n" . $canonicalized_query; // calculate HMAC with SHA256 and base64-encoding $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $private_key, True)); // encode the signature for the request $signature = str_replace("%7E", "~", rawurlencode($signature)); $url = "http://" . $host . $uri . "?" . $canonicalized_query . "&Signature=" . $signature; $retry = false; $tries = 0; do { // $search = file_get_contents($url); /* Use CURL to retrieve the data so that http errors can be examined */ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 7); $search = curl_exec($ch); $curl_info = curl_getinfo($ch); curl_close($ch); if($curl_info['http_code']==200){ $retry = false; }else{ $this->error("Lookup HTTP req failed. See"); var_dump($curl_info, $search); $tries++; if ($tries <= 6) { $this->info("Retrying in " . pow(2, $tries)); sleep(pow(2, $tries)); }else{ $this->error($data[0]." SKIPPED."); $failed[] = $data[0]; continue 2; } } }while($retry === false); $item = new SimpleXMLElement($search); $json_string = json_encode($item); $results = json_decode($json_string, TRUE); //['google_book_id', 'thumbnail', 'isbn', 'name', 'condition', 'target_student_groups', 'target_course', 'price', 'quantity', 'contact_instructions', 'expires_at']; if (isset($results['Items']['Item'][0])) { $return = $results['Items']['Item'][0]; } elseif (isset($results['Items']['Item'])) { $return = $results['Items']['Item']; } else { $failed[] = $data[0]; $this->error('...failed!!!!' . " Info:\r\n" . $search); continue; } $book = new Book; $book->user()->associate($responsible); //$book->google_book_id = $return['id']; if (isset($return['LargeImage'])) { $book->thumbnail = $return['LargeImage']['URL']; } $book->isbn = $data[0]; $book->name = $return['ItemAttributes']['Title']; $book->condition = "Used"; $book->target_student_groups = "EESoc Book Sales"; //$book->target_course = ""; $book->price = 25.00; $book->quantity = 1; if (isset($return['ItemAttributes']['Author'])) { if (is_array($return['ItemAttributes']['Author'])) { $book->authors = implode(", ", $return['ItemAttributes']['Author']); } else { $book->authors = $return['ItemAttributes']['Author']; } }else if (isset($return['ItemAttributes']['Manufacturer']) && is_string($return['ItemAttributes']['Manufacturer'])) { $book->authors = $return['ItemAttributes']['Manufacturer']; } $book->contact_instructions = "This is part of the EESoc Book Sales, please contact sautrik.banerjee13@imperial.ac.uk for more information. For more details about this book, please visit ".$return['DetailPageURL']." on Amazon."; if (isset($return['EditorialReviews']['EditorialReview']['Content'])){ $book->contact_instructions .= "\r\n\r\n".$return['EditorialReviews']['EditorialReview']['Content']; } $book->expires_at = "2016-08-01"; $book->save(); $this->info('...Import of '.$book->name.' completed successfully.'); sleep(3); }else{ //http://isbndb.com/api/v2/json/39ZFTDCD/book/ISBN //39ZFTDCD $this->info('Searching on ISBNDB ' . $data[0]); $url = "http://isbndb.com/api/v2/json/39ZFTDCD/book/".$data[0]; $retry = false; $tries = 0; do { // $search = file_get_contents($url); /* Use CURL to retrieve the data so that http errors can be examined */ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 7); $search = curl_exec($ch); $curl_info = curl_getinfo($ch); curl_close($ch); if($curl_info['http_code']==200){ $retry = false; }else{ $this->error("Lookup HTTP req failed. See"); var_dump($curl_info, $search); $tries++; if ($tries <= 6) { $this->info("Retrying in " . pow(2, $tries)); sleep(pow(2, $tries)); $retry = true; }else{ $this->error($data[0]." SKIPPED."); $failed[] = $data[0]; $retry = false; continue 2; } } }while($retry === true); $results = json_decode($search, TRUE); //['google_book_id', 'thumbnail', 'isbn', 'name', 'condition', 'target_student_groups', 'target_course', 'price', 'quantity', 'contact_instructions', 'expires_at']; if (isset($results['data'][0])) { $return = $results['data'][0]; } else { $failed[] = $data[0]; $this->error('...failed!!!!' . " Info:\r\n" . $search); continue; } $book = new Book; $book->user()->associate($responsible); //$book->google_book_id = $return['id']; //$book->thumbnail = $return['LargeImage']['URL']; $book->isbn = $data[0]; $book->name = $return['title']; $book->condition = "Used"; $book->target_student_groups = "EESoc Book Sales"; //$book->target_course = ""; $book->price = 25.00; $book->quantity = 1; if (isset($return['author_data']['name'])) { $book->authors = $return['author_data']['name']; }else if (isset($return['publisher_name'])) { $book->authors = $return['publisher_name']; } $book->contact_instructions = "This is part of the EESoc Book Sales, please contact sautrik.banerjee13@imperial.ac.uk for more information."; $book->expires_at = "2016-08-01"; $book->save(); $this->info('...Import of '.$book->name.' completed successfully.'); sleep(1); } } fclose($handle); $this->error('Failed:'); foreach ($failed as $isbn){ $this->error($isbn); } }else{ $this->error('Cannot open the csv file at '.$this->argument(path).'!'); return; } } /** * Get the console command arguments. * * @return array */ protected function getArguments() { return array( array('path', InputArgument::REQUIRED, 'Path to CSV file'), ); } }
hsed/eesoc-website
app/commands/ImportBooksISBNCommand.php
PHP
mit
14,253
package com.common.example; import android.app.Activity; import android.os.Bundle; import android.widget.ImageView; import com.common.utils.Common; import com.common.utils.R; public class BlurEffectActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_blur_effect); ImageView ivBlur = (ImageView) findViewById(R.id.blur_effect_iv_blur); ivBlur.setImageDrawable(Common.blurEffectsOnDrawable(this, R.drawable.ic_launcher, 5)); } }
androidroadies/AndroidUtils
app/src/main/java/com/common/example/BlurEffectActivity.java
Java
mit
586
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CMakeGraphVizOptions &mdash; CMake 3.8.1 Documentation</title> <link rel="stylesheet" href="../_static/cmake.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '3.8.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="CMakePackageConfigHelpers" href="CMakePackageConfigHelpers.html" /> <link rel="prev" title="CMakeForceCompiler" href="CMakeForceCompiler.html" /> </head> <body role="document"> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="CMakePackageConfigHelpers.html" title="CMakePackageConfigHelpers" accesskey="N">next</a> |</li> <li class="right" > <a href="CMakeForceCompiler.html" title="CMakeForceCompiler" accesskey="P">previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> &#187; </li> <li> <a href="../index.html">3.8.1 Documentation</a> &#187; </li> <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> &#187;</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="cmakegraphvizoptions"> <span id="module:CMakeGraphVizOptions"></span><h1>CMakeGraphVizOptions<a class="headerlink" href="#cmakegraphvizoptions" title="Permalink to this headline">¶</a></h1> <p>The builtin graphviz support of CMake.</p> <div class="section" id="variables-specific-to-the-graphviz-support"> <h2>Variables specific to the graphviz support<a class="headerlink" href="#variables-specific-to-the-graphviz-support" title="Permalink to this headline">¶</a></h2> <p>CMake can generate graphviz files, showing the dependencies between the targets in a project and also external libraries which are linked against. When CMake is run with the &#8211;graphviz=foo.dot option, it will produce:</p> <ul class="simple"> <li>a foo.dot file showing all dependencies in the project</li> <li>a foo.dot.&lt;target&gt; file for each target, file showing on which other targets the respective target depends</li> <li>a foo.dot.&lt;target&gt;.dependers file, showing which other targets depend on the respective target</li> </ul> <p>This can result in huge graphs. Using the file CMakeGraphVizOptions.cmake the look and content of the generated graphs can be influenced. This file is searched first in ${CMAKE_BINARY_DIR} and then in ${CMAKE_SOURCE_DIR}. If found, it is read and the variables set in it are used to adjust options for the generated graphviz files.</p> <dl class="variable"> <dt id="variable:GRAPHVIZ_GRAPH_TYPE"> <code class="descname">GRAPHVIZ_GRAPH_TYPE</code><a class="headerlink" href="#variable:GRAPHVIZ_GRAPH_TYPE" title="Permalink to this definition">¶</a></dt> <dd><p>The graph type.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : &#8220;digraph&#8221;</li> </ul> <p>Valid graph types are:</p> <ul class="simple"> <li>&#8220;graph&#8221; : Nodes are joined with lines</li> <li>&#8220;digraph&#8221; : Nodes are joined with arrows showing direction</li> <li>&#8220;strict graph&#8221; : Like &#8220;graph&#8221; but max one line between each node</li> <li>&#8220;strict digraph&#8221; : Like &#8220;graph&#8221; but max one line between each node in each direction</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_GRAPH_NAME"> <code class="descname">GRAPHVIZ_GRAPH_NAME</code><a class="headerlink" href="#variable:GRAPHVIZ_GRAPH_NAME" title="Permalink to this definition">¶</a></dt> <dd><p>The graph name.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : &#8220;GG&#8221;</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_GRAPH_HEADER"> <code class="descname">GRAPHVIZ_GRAPH_HEADER</code><a class="headerlink" href="#variable:GRAPHVIZ_GRAPH_HEADER" title="Permalink to this definition">¶</a></dt> <dd><p>The header written at the top of the graphviz file.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : &#8220;node [n fontsize = &#8220;12&#8221;];&#8221;</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_NODE_PREFIX"> <code class="descname">GRAPHVIZ_NODE_PREFIX</code><a class="headerlink" href="#variable:GRAPHVIZ_NODE_PREFIX" title="Permalink to this definition">¶</a></dt> <dd><p>The prefix for each node in the graphviz file.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : &#8220;node&#8221;</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_EXECUTABLES"> <code class="descname">GRAPHVIZ_EXECUTABLES</code><a class="headerlink" href="#variable:GRAPHVIZ_EXECUTABLES" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude executables from the generated graphs.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_STATIC_LIBS"> <code class="descname">GRAPHVIZ_STATIC_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_STATIC_LIBS" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude static libraries from the generated graphs.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_SHARED_LIBS"> <code class="descname">GRAPHVIZ_SHARED_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_SHARED_LIBS" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude shared libraries from the generated graphs.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_MODULE_LIBS"> <code class="descname">GRAPHVIZ_MODULE_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_MODULE_LIBS" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude module libraries from the generated graphs.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_EXTERNAL_LIBS"> <code class="descname">GRAPHVIZ_EXTERNAL_LIBS</code><a class="headerlink" href="#variable:GRAPHVIZ_EXTERNAL_LIBS" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude external libraries from the generated graphs.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_IGNORE_TARGETS"> <code class="descname">GRAPHVIZ_IGNORE_TARGETS</code><a class="headerlink" href="#variable:GRAPHVIZ_IGNORE_TARGETS" title="Permalink to this definition">¶</a></dt> <dd><p>A list of regular expressions for ignoring targets.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : empty</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_GENERATE_PER_TARGET"> <code class="descname">GRAPHVIZ_GENERATE_PER_TARGET</code><a class="headerlink" href="#variable:GRAPHVIZ_GENERATE_PER_TARGET" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude per target graphs <code class="docutils literal"><span class="pre">foo.dot.&lt;target&gt;</span></code>.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> <dl class="variable"> <dt id="variable:GRAPHVIZ_GENERATE_DEPENDERS"> <code class="descname">GRAPHVIZ_GENERATE_DEPENDERS</code><a class="headerlink" href="#variable:GRAPHVIZ_GENERATE_DEPENDERS" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to FALSE to exclude depender graphs <code class="docutils literal"><span class="pre">foo.dot.&lt;target&gt;.dependers</span></code>.</p> <ul class="simple"> <li>Mandatory : NO</li> <li>Default : TRUE</li> </ul> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">CMakeGraphVizOptions</a><ul> <li><a class="reference internal" href="#variables-specific-to-the-graphviz-support">Variables specific to the graphviz support</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="CMakeForceCompiler.html" title="previous chapter">CMakeForceCompiler</a></p> <h4>Next topic</h4> <p class="topless"><a href="CMakePackageConfigHelpers.html" title="next chapter">CMakePackageConfigHelpers</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/module/CMakeGraphVizOptions.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="CMakePackageConfigHelpers.html" title="CMakePackageConfigHelpers" >next</a> |</li> <li class="right" > <a href="CMakeForceCompiler.html" title="CMakeForceCompiler" >previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> &#187; </li> <li> <a href="../index.html">3.8.1 Documentation</a> &#187; </li> <li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> &#187;</li> </ul> </div> <div class="footer" role="contentinfo"> &#169; Copyright 2000-2017 Kitware, Inc. and Contributors. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2. </div> </body> </html>
pipou/rae
builder/cmake/windows/doc/cmake/html/module/CMakeGraphVizOptions.html
HTML
mit
11,863