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
### MacDeploy ### You will need the appscript package for the fancy disk image creation to work: sudo easy_install appscript For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package: sudo easy_install argparse This script should not be run manually, instead, after building as usual: make deploy During the process, the disk image window will pop up briefly where the fancy settings are applied. This is normal, please do not interfere. When finished, it will produce `AstroCoin-Qt.dmg`.
corefork/astrocoincore
contrib/macdeploy/README.md
Markdown
mit
573
<?php $this->load->view('common/header'); ?> <div class="jumbotron"> <div class="container"> <form class="navbar-form"> <div class="form-group"> <input type="text" placeholder="Keyword" class="form-control"> </div> <div class="form-group"> <select class="form-control" id="sel1"> <option value="4456">men seeking men </option> <option value="4454">men seeking women </option> <option value="4453" selected="">women seeking men</option> <option value="4452">women seeking women</option> </select> </div> <button type="submit" class="btn btn-success">Search</button> </form> </div> </div> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-lg-12"> <a href="#">Home >></a><a href="#">Register</a> </div> </div> </div> <div class="container"> <div id="content"> Thank You <?php echo $first_name . ' ' . $last_name; ?>, You have registered scuccesfully. Please check your email to verify the account. Click <a href="<?php echo base_url(); ?>user/register"> Here </a>to Login. </div><!--/content--> </div> <?php $this->load->view('common/footer'); ?>
cubicwebsolutions/pstar
application/views/user/thank_view.php
PHP
mit
1,218
module MedialibClient VERSION = '1.9.0' unless defined? MedialibClient::VERSION end
Go-Promo/medialib-client
lib/medialib_client/version.rb
Ruby
mit
86
module.exports = { entry: './test/unit/specs/index.js', output: { path: './test/unit', filename: 'specs.js' }, module: { loaders: [ { test: /\.js$/, exclude: /test|node_modules\/dist/, loader: 'babel-loader' } ] } }
Clunt/clantujs
test/unit/webpack.config.js
JavaScript
mit
278
<!DOCTYPE html> <html lang = "es"> <head> <meta charset="UTF-8"> <title>App Movil</title> <link rel="shortcut icon" type="text/css" href="{{STATIC_URL}}img/icono de la Aplicacion Movil.png"> <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}jquery.mobile-1.3.1/jquery.mobile-1.3.1.css"> <script type="text/javascript" src="{{STATIC_URL}}js/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="{{STATIC_URL}}jquery.mobile-1.3.1/jquery.mobile-1.3.1.js"></script> <style type="text/css"> img{ margin: auto; display: block; } .ui-page { background: transparent url({{STATIC_URL}}icons/cerrito_de_la_libertad.jpg); /*width: 100% !important; height: auto !important;*/ background-repeat: no-repeat; position: absolute; z-index: 1; background-size: cover; -webkit-cara trasera-visibility: hidden; } .ui-content{ background: transparent no-repeat; } li{ opacity: 0.7; } } </style> </head> <body> <!--Cabecera--> <div data-role="header" data-theme="a"> <img src="{{STATIC_URL}}img/Logo de la Aplicacion Movils.png" width="50%"> </div> <div data-role="header" data-theme="b"> <h1>Lugares Turísticos en Huncayo</h1> <a href="/lugares" data-icon="arrow-l" data-rel="back">Atrás</a> </div> <!--Contenido--> <div data-role="content"> <ul data-role="listview" data-inset="false" data-filter="true" data-filter-reveal="true" data-filter-placeholder="Buscar Lugares..."> {% for elemento in vistalugares %} <li><a href="/lugares_turisticos/{{elemento.id}}" data-transition="slide">{{elemento.nombre}}</a></li> {% endfor %} </ul> </div> <!--Pie de pagina--> <div data-role="content2" data-position="fixed" > <ul data-role="listview" data-theme="a" > {% for elemento in lugares %} <li><a href="/Lugar/{{provincias.id}}/TipoDeLugar/{{elemento.id}}" data-transition="slide"><img src="{{STATIC_URL}}icons/lugares.ico" class="ui-li-icon" >{{elemento.nombre}}</a></li> {% endfor %} </ul> </div> </body> </html>
pynef/turismo
mobile/plantillas/lugares_tipo.html
HTML
mit
2,035
#!/bin/bash TEMP_PROJECT_DIR=/tmp/bumper_$(date +%s) git clone https://github.com/Latyntsev/bumper.git "${TEMP_PROJECT_DIR}" ${TEMP_PROJECT_DIR}/scripts/build.sh BAMPER_INSTALL_ROOT="/usr/local" bumper --h
Latyntsev/bumper
scripts/install.sh
Shell
mit
206
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="AttemptOnUnregisteredTypeBsonSerializationConfiguration{T}.cs" company="OBeautifulCode"> // Copyright (c) OBeautifulCode 2018. All rights reserved. // </copyright> // -------------------------------------------------------------------------------------------------------------------- namespace OBeautifulCode.Serialization.Bson { using System.Collections.Generic; using OBeautifulCode.Serialization; /// <summary> /// A BSON serialization configuration that sets <see cref="DependentBsonSerializationConfigurationTypes"/> to typeof(T), /// sets <see cref="SerializationConfigurationBase.UnregisteredTypeEncounteredStrategy"/> to <see cref="UnregisteredTypeEncounteredStrategy.Attempt"/>, /// and sets the remaining public/overrideable properties to the corresponding properties on the dependent serialization configuration. /// </summary> /// <typeparam name="T">The dependent BSON serialization configuration type.</typeparam> public sealed class AttemptOnUnregisteredTypeBsonSerializationConfiguration<T> : BsonSerializationConfigurationBase where T : BsonSerializationConfigurationBase { /// <inheritdoc /> public override UnregisteredTypeEncounteredStrategy UnregisteredTypeEncounteredStrategy => UnregisteredTypeEncounteredStrategy.Attempt; /// <inheritdoc /> protected override IReadOnlyCollection<BsonSerializationConfigurationType> DependentBsonSerializationConfigurationTypes => new[] { typeof(T).ToBsonSerializationConfigurationType() }; } }
OBeautifulCode/OBeautifulCode.Serialization
OBeautifulCode.Serialization.Bson/SerializationConfiguration/CannedConfigurations/UnregisteredType/AttemptOnUnregisteredTypeBsonSerializationConfiguration{T}.cs
C#
mit
1,684
// // SCAboutNode.h // Scnr // // Created by Steve Dekorte . // Copyright (c) Steve Dekorte. All rights reserved. // #import <Cocoa/Cocoa.h> #import <NavKit/NavKit.h> #import "SCArtists.h" #import "SCUnpurchased.h" @interface SCRootNode : NavInfoNode + (SCRootNode *)sharedSCRootNode; @property (strong, nonatomic) SCArtists *artists; @property (strong, nonatomic) SCUnpurchased *unpurchased; @end
stevedekorte/Scnr
Scnr/Classes/SCRootNode.h
C
mit
406
# Downgen PHP Downgen is on-air markdown documentation parser. ## Why Downgen? I was really bored always commiting my project documentation written in markdown to project repo when I wanted to see how it looks. For this reason I wrote Downgen. And I really wanted simple and clean design. ## How it works You setup your documentation directory and Downgen will parse directory structure as navigation, then you can browse your .MD files. When you try to access your page Downgen will parse it and display as HTML page. ## How to use Downgen? You have to clone this repository to your project documentation directory and create index.php file. Or you can use this one and customize it. File `index.php` in your doc directory should look like this one: ``` <?php require_once(dirname(__FILE__) . "/_downgen/Downgen.php"); $generator = new Downgen(dirname(__FILE__)); // Pages directory path is first argument and must be absolute path $generator->cssUrl = "_downgen/downgen.css"; // CSS url - should be relative from index to Downgen or custom $generator->indexName = "README"; // You can change default page name $generator->title = "DownGEN Generator"; // The blue title $generator->description = "Markdown documentation"; // Text under The blue title $generator->excludePattern = "[_\.]" // You can modify navigation exclude regexp pattern $generator->render(); // Start that little machine ?> ``` Yep, thats all. This configuration will look for you markdown pages in same directory as index.php is. In this example Downgen source files are located in `_downgen` subdirectory. See [Hidden pages](#hidden-pages) section for explanation why the directory name begins with underscore. ## User interface screenshot [![alt downgen](screenshot_thumb.jpg "Downgen screenshot")](screenshot.jpg) ## Navigation page names Page and directory title is filename without .md extension and underscores with dashed are replaced by spaces. You can also number your files due to file ordering in following format and numbers will be removed: `01__First page`. For example: - `Page.md` = `Page` - `My_page.md` = `My page` - `My-page.md` = `My page` - `01__First-page` = `First page` <a name="hidden-pages"/> ## Hidden pages and directories Pages or directories prefixed with `.` or `_` are hidden from navigation tree. ## Relative links Links beginning with `./` are rewrited to use Downgen - for example: `./Page.md` is rewrited to `?page=Page`. ## MD2HTML Utility md2html.php is command-line script which converts all .md files in source directory into stand-alone HTML files with CSS and contents included. Usage: `php md2html.php <src dir> <dst dir> <title> <description> [index name]` Example of converting all files in same directory as script to _html directory with INDEX.md as homepage: `php md2html.php . _html "MyTitle" "MyDoc Description" INDEX` ## Licenses Downgen is licensed under MIT license - see [LICENSE.md](./LICENSE.md) ### Used libraries - [Parsedown](https://github.com/erusev/parsedown) and Parsedown Extra by [Emanuil Rusev](https://github.com/erusev) licensed under MIT license - [Markdown / Github CSS](https://github.com/sindresorhus/github-markdown-css) by [Sindre Sorhus](https://github.com/sindresorhus) licensed under MIT license ## Whats next? Future development ideas: - Syntax highlighting - Page editing
jirihybek/downgen
README.md
Markdown
mit
3,385
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_101) on Sat Jul 08 21:03:43 CEST 2017 --> <title>YarnString (jarn 1.0.0 API)</title> <meta name="date" content="2017-07-08"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="YarnString (jarn 1.0.0 API)"; } } catch(err) { } //--> var methods = {"i0":6}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/mini2Dx/yarn/types/YarnNumber.html" title="interface in org.mini2Dx.yarn.types"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../org/mini2Dx/yarn/types/YarnType.html" title="enum in org.mini2Dx.yarn.types"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/mini2Dx/yarn/types/YarnString.html" target="_top">Frames</a></li> <li><a href="YarnString.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.mini2Dx.yarn.types</div> <h2 title="Interface YarnString" class="title">Interface YarnString</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Superinterfaces:</dt> <dd>java.lang.Comparable&lt;<a href="../../../../org/mini2Dx/yarn/types/YarnValue.html" title="interface in org.mini2Dx.yarn.types">YarnValue</a>&gt;, <a href="../../../../org/mini2Dx/yarn/types/YarnValue.html" title="interface in org.mini2Dx.yarn.types">YarnValue</a></dd> </dl> <dl> <dt>All Known Implementing Classes:</dt> <dd><a href="../../../../org/mini2Dx/yarn/literal/StringLiteral.html" title="class in org.mini2Dx.yarn.literal">StringLiteral</a>, <a href="../../../../org/mini2Dx/yarn/variable/StringVariable.html" title="class in org.mini2Dx.yarn.variable">StringVariable</a></dd> </dl> <hr> <br> <pre>public interface <span class="typeNameLabel">YarnString</span> extends <a href="../../../../org/mini2Dx/yarn/types/YarnValue.html" title="interface in org.mini2Dx.yarn.types">YarnValue</a></pre> <div class="block">Base interface for Yarn strings</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/mini2Dx/yarn/types/YarnString.html#getValue--">getValue</a></span>()</code> <div class="block">Returns the underlying <code>String</code> value</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.mini2Dx.yarn.types.YarnValue"> <!-- --> </a> <h3>Methods inherited from interface&nbsp;org.mini2Dx.yarn.types.<a href="../../../../org/mini2Dx/yarn/types/YarnValue.html" title="interface in org.mini2Dx.yarn.types">YarnValue</a></h3> <code><a href="../../../../org/mini2Dx/yarn/types/YarnValue.html#getType--">getType</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Comparable"> <!-- --> </a> <h3>Methods inherited from interface&nbsp;java.lang.Comparable</h3> <code>compareTo</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getValue--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>getValue</h4> <pre>java.lang.String&nbsp;getValue()</pre> <div class="block">Returns the underlying <code>String</code> value</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/mini2Dx/yarn/types/YarnNumber.html" title="interface in org.mini2Dx.yarn.types"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../org/mini2Dx/yarn/types/YarnType.html" title="enum in org.mini2Dx.yarn.types"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/mini2Dx/yarn/types/YarnString.html" target="_top">Frames</a></li> <li><a href="YarnString.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
mini2Dx/jarn
docs/javadoc/1.0.0/org/mini2Dx/yarn/types/YarnString.html
HTML
mit
9,013
/** * "First, solve the problem. Then, write the code. -John Johnson" * "Or use Vangav M" * www.vangav.com * */ /** * MIT License * * Copyright (c) 2016 Vangav * * 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. * */ /** * Community * Facebook Group: Vangav Open Source - Backend * fb.com/groups/575834775932682/ * Facebook Page: Vangav * fb.com/vangav.f * * Third party communities for Vangav Backend * - play framework * - cassandra * - datastax * * Tag your question online (e.g.: stack overflow, etc ...) with * #vangav_backend * to easier find questions/answers online * */ package com.vangav.vos_instagram.cassandra_keyspaces.ig_logging; import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.ResultSetFuture; import com.vangav.backend.cassandra.keyspaces.Query; import com.vangav.backend.cassandra.keyspaces.Table; import com.vangav.backend.cassandra.keyspaces.dispatch_message.QueryDispatchable; /** * GENERATED using JavaClientGeneratorMain.java */ /** * DailyRequestsCounters represents * Table [daily_requests_counters] * in Keyspace [ig_logging] * * Name: daily_requests_counters * Description: * stores counters per-day for all controllers and per-controller * * Columns: * year_month_day_controller : varchar * requests : counter * ok_responses : counter * bad_request_responses : counter * internal_error_responses : counter * run_time_milli_seconds : counter * Partition Keys: year_month_day_controller * Secondary Keys: * Caching: ALL * Order By: * Queries: * - Name: increment_ok_responses * Description: * increments requests with OK responses * Prepared Statement: * UPDATE ig_logging.daily_requests_counters SET requests = requests + * 1, ok_responses = ok_responses + 1, run_time_milli_seconds = * run_time_milli_seconds + :run_time_milli_seconds WHERE * year_month_day_controller = :year_month_day_controller; * - Name: increment_bad_request_responses * Description: * increments requests with BAD_REQUEST responses * Prepared Statement: * UPDATE ig_logging.daily_requests_counters SET requests = requests + * 1, bad_request_responses = bad_request_responses + 1, * run_time_milli_seconds = run_time_milli_seconds + * :run_time_milli_seconds WHERE year_month_day_controller = * :year_month_day_controller; * - Name: increment_internal_error_responses * Description: * increments requests with INTERNAL_ERROR responses * Prepared Statement: * UPDATE ig_logging.daily_requests_counters SET requests = requests + * 1, internal_error_responses = internal_error_responses + 1, * run_time_milli_seconds = run_time_milli_seconds + * :run_time_milli_seconds WHERE year_month_day_controller = * :year_month_day_controller; * - Name: select * Description: * selects counters per-hour * Prepared Statement: * SELECT requests, ok_responses, bad_request_responses, * internal_error_responses, run_time_milli_seconds FROM * ig_logging.daily_requests_counters WHERE * year_month_day_controller = :year_month_day_controller; * */ public class DailyRequestsCounters extends Table { private static final String kKeySpaceName = "ig_logging"; private static final String kTableName = "daily_requests_counters"; public static final String kYearMonthDayControllerColumnName = "year_month_day_controller"; public static final String kRequestsColumnName = "requests"; public static final String kOkResponsesColumnName = "ok_responses"; public static final String kBadRequestResponsesColumnName = "bad_request_responses"; public static final String kInternalErrorResponsesColumnName = "internal_error_responses"; public static final String kRunTimeMilliSecondsColumnName = "run_time_milli_seconds"; /** * Query: * Name: increment_ok_responses * Description: * increments requests with OK responses * Prepared Statement: * UPDATE ig_logging.daily_requests_counters SET requests = requests + * 1, ok_responses = ok_responses + 1, run_time_milli_seconds = * run_time_milli_seconds + :run_time_milli_seconds WHERE * year_month_day_controller = :year_month_day_controller; */ private static final String kIncrementOkResponsesName = "increment_ok_responses"; private static final String kIncrementOkResponsesDescription = "increments requests with OK responses "; private static final String kIncrementOkResponsesPreparedStatement = "UPDATE ig_logging.daily_requests_counters SET requests = requests + 1, " + "ok_responses = ok_responses + 1, run_time_milli_seconds = " + "run_time_milli_seconds + :run_time_milli_seconds WHERE " + "year_month_day_controller = :year_month_day_controller; "; /** * Query: * Name: increment_bad_request_responses * Description: * increments requests with BAD_REQUEST responses * Prepared Statement: * UPDATE ig_logging.daily_requests_counters SET requests = requests + * 1, bad_request_responses = bad_request_responses + 1, * run_time_milli_seconds = run_time_milli_seconds + * :run_time_milli_seconds WHERE year_month_day_controller = * :year_month_day_controller; */ private static final String kIncrementBadRequestResponsesName = "increment_bad_request_responses"; private static final String kIncrementBadRequestResponsesDescription = "increments requests with BAD_REQUEST responses "; private static final String kIncrementBadRequestResponsesPreparedStatement = "UPDATE ig_logging.daily_requests_counters SET requests = requests + 1, " + "bad_request_responses = bad_request_responses + 1, " + "run_time_milli_seconds = run_time_milli_seconds + " + ":run_time_milli_seconds WHERE year_month_day_controller = " + ":year_month_day_controller; "; /** * Query: * Name: increment_internal_error_responses * Description: * increments requests with INTERNAL_ERROR responses * Prepared Statement: * UPDATE ig_logging.daily_requests_counters SET requests = requests + * 1, internal_error_responses = internal_error_responses + 1, * run_time_milli_seconds = run_time_milli_seconds + * :run_time_milli_seconds WHERE year_month_day_controller = * :year_month_day_controller; */ private static final String kIncrementInternalErrorResponsesName = "increment_internal_error_responses"; private static final String kIncrementInternalErrorResponsesDescription = "increments requests with INTERNAL_ERROR responses "; private static final String kIncrementInternalErrorResponsesPreparedStatement = "UPDATE ig_logging.daily_requests_counters SET requests = requests + 1, " + "internal_error_responses = internal_error_responses + 1, " + "run_time_milli_seconds = run_time_milli_seconds + " + ":run_time_milli_seconds WHERE year_month_day_controller = " + ":year_month_day_controller; "; /** * Query: * Name: select * Description: * selects counters per-hour * Prepared Statement: * SELECT requests, ok_responses, bad_request_responses, * internal_error_responses, run_time_milli_seconds FROM * ig_logging.daily_requests_counters WHERE * year_month_day_controller = :year_month_day_controller; */ private static final String kSelectName = "select"; private static final String kSelectDescription = "selects counters per-hour "; private static final String kSelectPreparedStatement = "SELECT requests, ok_responses, bad_request_responses, " + "internal_error_responses, run_time_milli_seconds FROM " + "ig_logging.daily_requests_counters WHERE " + "year_month_day_controller = :year_month_day_controller; "; /** * Constructor DailyRequestsCounters * @return new DailyRequestsCounters Object * @throws Exception */ private DailyRequestsCounters () throws Exception { super ( kKeySpaceName, kTableName, new Query ( kIncrementOkResponsesDescription, kIncrementOkResponsesName, kIncrementOkResponsesPreparedStatement), new Query ( kIncrementBadRequestResponsesDescription, kIncrementBadRequestResponsesName, kIncrementBadRequestResponsesPreparedStatement), new Query ( kIncrementInternalErrorResponsesDescription, kIncrementInternalErrorResponsesName, kIncrementInternalErrorResponsesPreparedStatement), new Query ( kSelectDescription, kSelectName, kSelectPreparedStatement)); } private static DailyRequestsCounters instance = null; /** * loadTable * OPTIONAL method * instance is created either upon calling this method or upon the first call * to singleton instance method i * this method is useful for loading upon program start instead of loading * it upon the first use since there's a small time overhead for loading * since all queries are prepared synchronously in a blocking network * operation with Cassandra's server * @throws Exception */ public static void loadTable () throws Exception { if (instance == null) { instance = new DailyRequestsCounters(); } } /** * i * @return singleton static instance of DailyRequestsCounters * @throws Exception */ public static DailyRequestsCounters i () throws Exception { if (instance == null) { instance = new DailyRequestsCounters(); } return instance; } // Query: IncrementOkResponses // Description: // increments requests with OK responses // Parepared Statement: // UPDATE ig_logging.daily_requests_counters SET requests = requests + // 1, ok_responses = ok_responses + 1, run_time_milli_seconds = // run_time_milli_seconds + :run_time_milli_seconds WHERE // year_month_day_controller = :year_month_day_controller; /** * getQueryIncrementOkResponses * @return IncrementOkResponses Query in the form of * a Query Object * @throws Exception */ public Query getQueryIncrementOkResponses ( ) throws Exception { return this.getQuery(kIncrementOkResponsesName); } /** * getQueryDispatchableIncrementOkResponses * @param runtimemilliseconds * @param yearmonthdaycontroller * @return IncrementOkResponses Query in the form of * a QueryDisbatchable Object * (e.g.: to be passed on to a worker instance) * @throws Exception */ public QueryDispatchable getQueryDispatchableIncrementOkResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQueryDispatchable( kIncrementOkResponsesName, runtimemilliseconds, yearmonthdaycontroller); } /** * getBoundStatementIncrementOkResponses * @param runtimemilliseconds * @param yearmonthdaycontroller * @return IncrementOkResponses Query in the form of * a BoundStatement ready for execution or to be added to * a BatchStatement * @throws Exception */ public BoundStatement getBoundStatementIncrementOkResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementOkResponsesName).getBoundStatement( runtimemilliseconds, yearmonthdaycontroller); } /** * executeAsyncIncrementOkResponses * executes IncrementOkResponses Query asynchronously * @param runtimemilliseconds * @param yearmonthdaycontroller * @return ResultSetFuture * @throws Exception */ public ResultSetFuture executeAsyncIncrementOkResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementOkResponsesName).executeAsync( runtimemilliseconds, yearmonthdaycontroller); } /** * executeSyncIncrementOkResponses * BLOCKING-METHOD: blocks till the ResultSet is ready * executes IncrementOkResponses Query synchronously * @param runtimemilliseconds * @param yearmonthdaycontroller * @return ResultSet * @throws Exception */ public ResultSet executeSyncIncrementOkResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementOkResponsesName).executeSync( runtimemilliseconds, yearmonthdaycontroller); } // Query: IncrementBadRequestResponses // Description: // increments requests with BAD_REQUEST responses // Parepared Statement: // UPDATE ig_logging.daily_requests_counters SET requests = requests + // 1, bad_request_responses = bad_request_responses + 1, // run_time_milli_seconds = run_time_milli_seconds + // :run_time_milli_seconds WHERE year_month_day_controller = // :year_month_day_controller; /** * getQueryIncrementBadRequestResponses * @return IncrementBadRequestResponses Query in the form of * a Query Object * @throws Exception */ public Query getQueryIncrementBadRequestResponses ( ) throws Exception { return this.getQuery(kIncrementBadRequestResponsesName); } /** * getQueryDispatchableIncrementBadRequestResponses * @param runtimemilliseconds * @param yearmonthdaycontroller * @return IncrementBadRequestResponses Query in the form of * a QueryDisbatchable Object * (e.g.: to be passed on to a worker instance) * @throws Exception */ public QueryDispatchable getQueryDispatchableIncrementBadRequestResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQueryDispatchable( kIncrementBadRequestResponsesName, runtimemilliseconds, yearmonthdaycontroller); } /** * getBoundStatementIncrementBadRequestResponses * @param runtimemilliseconds * @param yearmonthdaycontroller * @return IncrementBadRequestResponses Query in the form of * a BoundStatement ready for execution or to be added to * a BatchStatement * @throws Exception */ public BoundStatement getBoundStatementIncrementBadRequestResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementBadRequestResponsesName).getBoundStatement( runtimemilliseconds, yearmonthdaycontroller); } /** * executeAsyncIncrementBadRequestResponses * executes IncrementBadRequestResponses Query asynchronously * @param runtimemilliseconds * @param yearmonthdaycontroller * @return ResultSetFuture * @throws Exception */ public ResultSetFuture executeAsyncIncrementBadRequestResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementBadRequestResponsesName).executeAsync( runtimemilliseconds, yearmonthdaycontroller); } /** * executeSyncIncrementBadRequestResponses * BLOCKING-METHOD: blocks till the ResultSet is ready * executes IncrementBadRequestResponses Query synchronously * @param runtimemilliseconds * @param yearmonthdaycontroller * @return ResultSet * @throws Exception */ public ResultSet executeSyncIncrementBadRequestResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementBadRequestResponsesName).executeSync( runtimemilliseconds, yearmonthdaycontroller); } // Query: IncrementInternalErrorResponses // Description: // increments requests with INTERNAL_ERROR responses // Parepared Statement: // UPDATE ig_logging.daily_requests_counters SET requests = requests + // 1, internal_error_responses = internal_error_responses + 1, // run_time_milli_seconds = run_time_milli_seconds + // :run_time_milli_seconds WHERE year_month_day_controller = // :year_month_day_controller; /** * getQueryIncrementInternalErrorResponses * @return IncrementInternalErrorResponses Query in the form of * a Query Object * @throws Exception */ public Query getQueryIncrementInternalErrorResponses ( ) throws Exception { return this.getQuery(kIncrementInternalErrorResponsesName); } /** * getQueryDispatchableIncrementInternalErrorResponses * @param runtimemilliseconds * @param yearmonthdaycontroller * @return IncrementInternalErrorResponses Query in the form of * a QueryDisbatchable Object * (e.g.: to be passed on to a worker instance) * @throws Exception */ public QueryDispatchable getQueryDispatchableIncrementInternalErrorResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQueryDispatchable( kIncrementInternalErrorResponsesName, runtimemilliseconds, yearmonthdaycontroller); } /** * getBoundStatementIncrementInternalErrorResponses * @param runtimemilliseconds * @param yearmonthdaycontroller * @return IncrementInternalErrorResponses Query in the form of * a BoundStatement ready for execution or to be added to * a BatchStatement * @throws Exception */ public BoundStatement getBoundStatementIncrementInternalErrorResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementInternalErrorResponsesName).getBoundStatement( runtimemilliseconds, yearmonthdaycontroller); } /** * executeAsyncIncrementInternalErrorResponses * executes IncrementInternalErrorResponses Query asynchronously * @param runtimemilliseconds * @param yearmonthdaycontroller * @return ResultSetFuture * @throws Exception */ public ResultSetFuture executeAsyncIncrementInternalErrorResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementInternalErrorResponsesName).executeAsync( runtimemilliseconds, yearmonthdaycontroller); } /** * executeSyncIncrementInternalErrorResponses * BLOCKING-METHOD: blocks till the ResultSet is ready * executes IncrementInternalErrorResponses Query synchronously * @param runtimemilliseconds * @param yearmonthdaycontroller * @return ResultSet * @throws Exception */ public ResultSet executeSyncIncrementInternalErrorResponses ( Object runtimemilliseconds, Object yearmonthdaycontroller) throws Exception { return this.getQuery(kIncrementInternalErrorResponsesName).executeSync( runtimemilliseconds, yearmonthdaycontroller); } // Query: Select // Description: // selects counters per-hour // Parepared Statement: // SELECT requests, ok_responses, bad_request_responses, // internal_error_responses, run_time_milli_seconds FROM // ig_logging.daily_requests_counters WHERE // year_month_day_controller = :year_month_day_controller; /** * getQuerySelect * @return Select Query in the form of * a Query Object * @throws Exception */ public Query getQuerySelect ( ) throws Exception { return this.getQuery(kSelectName); } /** * getQueryDispatchableSelect * @param yearmonthdaycontroller * @return Select Query in the form of * a QueryDisbatchable Object * (e.g.: to be passed on to a worker instance) * @throws Exception */ public QueryDispatchable getQueryDispatchableSelect ( Object yearmonthdaycontroller) throws Exception { return this.getQueryDispatchable( kSelectName, yearmonthdaycontroller); } /** * getBoundStatementSelect * @param yearmonthdaycontroller * @return Select Query in the form of * a BoundStatement ready for execution or to be added to * a BatchStatement * @throws Exception */ public BoundStatement getBoundStatementSelect ( Object yearmonthdaycontroller) throws Exception { return this.getQuery(kSelectName).getBoundStatement( yearmonthdaycontroller); } /** * executeAsyncSelect * executes Select Query asynchronously * @param yearmonthdaycontroller * @return ResultSetFuture * @throws Exception */ public ResultSetFuture executeAsyncSelect ( Object yearmonthdaycontroller) throws Exception { return this.getQuery(kSelectName).executeAsync( yearmonthdaycontroller); } /** * executeSyncSelect * BLOCKING-METHOD: blocks till the ResultSet is ready * executes Select Query synchronously * @param yearmonthdaycontroller * @return ResultSet * @throws Exception */ public ResultSet executeSyncSelect ( Object yearmonthdaycontroller) throws Exception { return this.getQuery(kSelectName).executeSync( yearmonthdaycontroller); } }
vangav/vos_instagram
app/com/vangav/vos_instagram/cassandra_keyspaces/ig_logging/DailyRequestsCounters.java
Java
mit
22,265
import { Injector } from '@angular/core'; import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http'; import { HttpClientTestingModule, HttpTestingController, TestRequest } from '@angular/common/http/testing'; import { Router, DefaultUrlSerializer } from '@angular/router'; import { Observable } from 'rxjs/Observable'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { publish, refCount } from 'rxjs/operators'; import { AuthOptions, DA_USER_OPTIONS_TOKEN, DA_OPTIONS_TOKEN } from '../../auth.options'; import { DA_SERVICE_TOKEN, ITokenService, ITokenModel } from '../interface'; import { DA_STORE_TOKEN } from '../../store/interface'; import { LocalStorageStore } from '../../store/local-storage.service'; import { SimpleInterceptor } from './simple.interceptor'; import { SimpleTokenModel } from './simple.model'; import { optionsFactory } from '../../index'; function genModel(token: string = `123`) { const model = new SimpleTokenModel(); model.token = token; model.uid = 1; return model; } class MockTokenService implements ITokenService { [key: string]: any; _data: any; set(data: ITokenModel): boolean { this._data = data; return true; } get(): ITokenModel { return this._data; } change(): Observable<ITokenModel> { return this.change$.pipe(publish(), refCount()); } clear() { this._data = null; } get login_url() { return '/login'; } } describe('auth: simple.interceptor', () => { let injector: Injector; const mockRouter = { navigate: jasmine.createSpy('navigate'), parseUrl: jasmine.createSpy('parseUrl').and.callFake((value: any) => { return (new DefaultUrlSerializer()).parse(value); }) }; function genModule(options: AuthOptions, tokenData?: SimpleTokenModel) { injector = TestBed.configureTestingModule({ imports: [ HttpClientTestingModule, RouterTestingModule.withRoutes([]) ], providers: [ { provide: Router, useValue: mockRouter }, { provide: DA_USER_OPTIONS_TOKEN, useValue: options }, { provide: DA_OPTIONS_TOKEN, useFactory: optionsFactory, deps: [DA_USER_OPTIONS_TOKEN] }, { provide: DA_STORE_TOKEN, useClass: LocalStorageStore }, { provide: HTTP_INTERCEPTORS, useClass: SimpleInterceptor, multi: true }, { provide: DA_SERVICE_TOKEN, useClass: MockTokenService } ] }); if (tokenData) injector.get(DA_SERVICE_TOKEN).set(tokenData); } describe('basic', () => { const basicModel = genModel(); beforeEach(() => { genModule({}, basicModel); }); it('initializes HttpClient properly', (done: () => void) => { injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { expect(value).toBe('ok!'); done(); }); injector.get(HttpTestingController).expectOne('/test').flush('ok!'); }); it(`should be token in headers`, (done: () => void) => { injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { done(); }); const req = injector.get(HttpTestingController).expectOne('/test') as TestRequest; expect(req.request.headers.get('token')).toBe(basicModel.token); req.flush('ok!'); }); it(`should be ignores Authorization in headers`, (done: () => void) => { injector.get(HttpClient).get('/login', { responseType: 'text' }).subscribe(value => { done(); }); const req = injector.get(HttpTestingController).expectOne('/login') as TestRequest; expect(req.request.headers.get('token')).toBeNull(); req.flush('ok!'); }); it(`should be ignores Authorization when exists allow_anonymous_key`, (done: () => void) => { injector.get(HttpClient).get('/user', { responseType: 'text', params: { _allow_anonymous: '' } }).subscribe(value => { done(); }); const ret = injector.get(HttpTestingController) .expectOne(req => req.method === 'GET' && req.url === '/user') as TestRequest; expect(ret.request.headers.get('Authorization')).toBeNull(); ret.flush('ok!'); }); }); describe('url ignores', () => { const basicModel = genModel(); beforeEach(() => { genModule({ ignores: [ `\\/login`, `assets\\/` ] }, basicModel); }); it(`should be ignore /login`, (done: () => void) => { injector.get(HttpClient).get('/login', { responseType: 'text' }).subscribe(value => { done(); }); const req = injector.get(HttpTestingController).expectOne('/login') as TestRequest; expect(req.request.headers.get('token')).toBeNull(); req.flush('ok!'); }); }); describe('invalid token', () => { beforeEach(() => { genModule({}, genModel(null)); }); it('should be go to login', (done: () => void) => { injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { }, (err: any) => { expect(err.status).toBe(401); expect(mockRouter.navigate).toHaveBeenCalledWith([ '/login' ]); done(); }); }); }); describe('should be token in body', () => { beforeEach(() => { genModule({ token_send_place: 'body' }, genModel('123')); }); it(``, (done: () => void) => { injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { done(); }); const req = injector.get(HttpTestingController).expectOne('/test') as TestRequest; expect(req.request.body.token).toBe('123'); req.flush('ok!'); }); }); describe('should be token in url', () => { beforeEach(() => { genModule({ token_send_place: 'url' }, genModel('123')); }); it(``, (done: () => void) => { injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { done(); }); const req = injector.get(HttpTestingController).expectOne('/test?token=123') as TestRequest; expect(req.request.url).toContain(`token=123`); req.flush('ok!'); }); }); describe('token template', () => { const basicModel = genModel(); it('should be [Bearer ${token}]', (done: () => void) => { genModule({ token_send_place: 'header', token_send_key: 'Authorization', token_send_template: 'Bearer ${token}' }, basicModel); injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { done(); }); const ret = injector.get(HttpTestingController) .expectOne(r => r.method === 'GET' && (<string>r.url).startsWith('/test')) as TestRequest; expect(ret.request.headers.get('Authorization')).toBe(`Bearer ${basicModel.token}`); ret.flush('ok!'); }); it('should be [Bearer ${uid}-${token}]', (done: () => void) => { genModule({ token_send_place: 'header', token_send_key: 'Authorization', token_send_template: 'Bearer ${uid}-${token}' }, basicModel); injector.get(HttpClient).get('/test', { responseType: 'text' }).subscribe(value => { done(); }); const ret = injector.get(HttpTestingController) .expectOne(r => r.method === 'GET' && (<string>r.url).startsWith('/test')) as TestRequest; expect(ret.request.headers.get('Authorization')).toBe(`Bearer ${basicModel.uid}-${basicModel.token}`); ret.flush('ok!'); }); }); });
yoryu/cardinn
src/00.core/00.auth/token/simple/simple.interceptor.spec.ts
TypeScript
mit
8,474
/* * File: demo_table.css * CVS: $Id$ * Description: CSS descriptions for DataTables demo pages * Author: Allan Jardine * Created: Tue May 12 06:47:22 BST 2009 * Modified: $Date$ by $Author$ * Language: CSS * Project: DataTables * * Copyright 2009 Allan Jardine. All Rights Reserved. * * *************************************************************************** * DESCRIPTION * * The styles given here are suitable for the demos that are used with the standard DataTables * distribution (see www.datatables.net). You will most likely wish to modify these styles to * meet the layout requirements of your site. * * Common issues: * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is * no conflict between the two pagination types. If you want to use full_numbers pagination * ensure that you either have "example_alt_pagination" as a body class name, or better yet, * modify that selector. * Note that the path used for Images is relative. All images are by default located in * ../images/ - relative to this CSS file. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables features */ .dataTables_wrapper { position: relative; clear: both; zoom: 1; /* Feeling sorry for IE */ } .dataTables_processing { position: absolute; top: 50%; left: 50%; width: 250px; height: 30px; margin-left: -125px; margin-top: -15px; padding: 14px 0 2px 0; border: 1px solid #ddd; text-align: center; color: #999; font-size: 14px; background-color: white; } .dataTables_length { width: 40%; float: left; } .dataTables_filter { width: 50%; float: right; text-align: right; } .dataTables_info { width: 60%; float: left; } .dataTables_paginate { float: right; text-align: right; } /* Pagination nested */ .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { height: 19px; float: left; cursor: pointer; *cursor: hand; color: #111 !important; } .paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover { text-decoration: none !important; } .paginate_disabled_previous:active, .paginate_enabled_previous:active, .paginate_disabled_next:active, .paginate_enabled_next:active { outline: none; } .paginate_disabled_previous, .paginate_disabled_next { color: #666 !important; } .paginate_disabled_previous, .paginate_enabled_previous { padding-left: 23px; } .paginate_disabled_next, .paginate_enabled_next { padding-right: 23px; margin-left: 10px; } .paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; } .paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; } .paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; } .paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; } .paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; } .paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables display */ table.display { margin: 0 auto; clear: both; width: 100%; /* Note Firefox 3.5 and before have a bug with border-collapse * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 ) * border-spacing: 0; is one possible option. Conditional-css.com is * useful for this kind of thing * * Further note IE 6/7 has problems when calculating widths with border width. * It subtracts one px relative to the other browsers from the first column, and * adds one to the end... * * If you want that effect I'd suggest setting a border-top/left on th/td's and * then filling in the gaps with other borders. */ } table.display thead th { padding: 3px 18px 3px 10px; border-bottom: 1px solid black; font-weight: bold; cursor: pointer; * cursor: hand; } table.display tfoot th { padding: 3px 18px 3px 10px; border-top: 1px solid black; font-weight: bold; } table.display tr.heading2 td { border-bottom: 1px solid #aaa; } table.display td { padding: 3px 10px; } table.display td.center { text-align: center; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables sorting */ .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; } .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; } .sorting { background: url('../images/sort_both.png') no-repeat center right; } .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; } .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; } table.display thead th:active, table.display thead td:active { outline: none; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables row classes */ table.display tr.odd.gradeA { background-color: #ddffdd; } table.display tr.even.gradeA { background-color: #eeffee; } table.display tr.odd.gradeC { background-color: #ddddff; } table.display tr.even.gradeC { background-color: #eeeeff; } table.display tr.odd.gradeX { background-color: #ffdddd; } table.display tr.even.gradeX { background-color: #ffeeee; } table.display tr.odd.gradeU { background-color: #ddd; } table.display tr.even.gradeU { background-color: #eee; } table.display tr.odd { background-color: #9fda58; } table.display tr.even { background-color: white; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Misc */ .dataTables_scroll { clear: both; } .dataTables_scrollBody { *margin-top: -1px; -webkit-overflow-scrolling: touch; } .top, .bottom { padding: 15px; background-color: #F5F5F5; border: 1px solid #CCCCCC; } .top .dataTables_info { float: none; } .clear { clear: both; } .dataTables_empty { text-align: center; } tfoot input { margin: 0.5em 0; width: 100%; color: #444; } tfoot input.search_init { color: #999; } td.group { background-color: #d1cfd0; border-bottom: 2px solid #A19B9E; border-top: 2px solid #A19B9E; } td.details { background-color: #d1cfd0; border: 2px solid #A19B9E; } .example_alt_pagination div.dataTables_info { width: 40%; } .paging_full_numbers { width: 400px; height: 22px; line-height: 22px; } .paging_full_numbers a:active { outline: none } .paging_full_numbers a:hover { text-decoration: none; } .paging_full_numbers a.paginate_button, .paging_full_numbers a.paginate_active { border: 1px solid #aaa; -webkit-border-radius: 5px; -moz-border-radius: 5px; padding: 2px 5px; margin: 0 3px; cursor: pointer; *cursor: hand; color: #333 !important; } .paging_full_numbers a.paginate_button { background-color: #ddd; } .paging_full_numbers a.paginate_button:hover { background-color: #ccc; text-decoration: none !important; } .paging_full_numbers a.paginate_active { background-color: #99B3FF; } table.display tr.even.row_selected td { background-color: #B0BED9; } table.display tr.odd.row_selected td { background-color: #9FAFD1; } /* * Sorting classes for columns */ /* For the standard odd/even */ tr.odd td.sorting_1 { background-color: #D3D6FF; } tr.odd td.sorting_2 { background-color: #DADCFF; } tr.odd td.sorting_3 { background-color: #E0E2FF; } tr.even td.sorting_1 { background-color: #EAEBFF; } tr.even td.sorting_2 { background-color: #F2F3FF; } tr.even td.sorting_3 { background-color: #F9F9FF; } /* For the Conditional-CSS grading rows */ /* Colour calculations (based off the main row colours) Level 1: dd > c4 ee > d5 Level 2: dd > d1 ee > e2 */ tr.odd.gradeA td.sorting_1 { background-color: #c4ffc4; } tr.odd.gradeA td.sorting_2 { background-color: #d1ffd1; } tr.odd.gradeA td.sorting_3 { background-color: #d1ffd1; } tr.even.gradeA td.sorting_1 { background-color: #d5ffd5; } tr.even.gradeA td.sorting_2 { background-color: #e2ffe2; } tr.even.gradeA td.sorting_3 { background-color: #e2ffe2; } tr.odd.gradeC td.sorting_1 { background-color: #c4c4ff; } tr.odd.gradeC td.sorting_2 { background-color: #d1d1ff; } tr.odd.gradeC td.sorting_3 { background-color: #d1d1ff; } tr.even.gradeC td.sorting_1 { background-color: #d5d5ff; } tr.even.gradeC td.sorting_2 { background-color: #e2e2ff; } tr.even.gradeC td.sorting_3 { background-color: #e2e2ff; } tr.odd.gradeX td.sorting_1 { background-color: #ffc4c4; } tr.odd.gradeX td.sorting_2 { background-color: #ffd1d1; } tr.odd.gradeX td.sorting_3 { background-color: #ffd1d1; } tr.even.gradeX td.sorting_1 { background-color: #ffd5d5; } tr.even.gradeX td.sorting_2 { background-color: #ffe2e2; } tr.even.gradeX td.sorting_3 { background-color: #ffe2e2; } tr.odd.gradeU td.sorting_1 { background-color: #c4c4c4; } tr.odd.gradeU td.sorting_2 { background-color: #d1d1d1; } tr.odd.gradeU td.sorting_3 { background-color: #d1d1d1; } tr.even.gradeU td.sorting_1 { background-color: #d5d5d5; } tr.even.gradeU td.sorting_2 { background-color: #e2e2e2; } tr.even.gradeU td.sorting_3 { background-color: #e2e2e2; } /* * Row highlighting example */ .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { background-color: #ECFFB3; } .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { background-color: #E6FF99; } .ex_highlight_row #example tr.even:hover { background-color: #ECFFB3; } .ex_highlight_row #example tr.even:hover td.sorting_1 { background-color: #DDFF75; } .ex_highlight_row #example tr.even:hover td.sorting_2 { background-color: #E7FF9E; } .ex_highlight_row #example tr.even:hover td.sorting_3 { background-color: #E2FF89; } .ex_highlight_row #example tr.odd:hover { background-color: #E6FF99; } .ex_highlight_row #example tr.odd:hover td.sorting_1 { background-color: #D6FF5C; } .ex_highlight_row #example tr.odd:hover td.sorting_2 { background-color: #E0FF84; } .ex_highlight_row #example tr.odd:hover td.sorting_3 { background-color: #DBFF70; } /* * KeyTable */ table.KeyTable td { border: 3px solid transparent; } table.KeyTable td.focus { border: 3px solid #3366FF; } table.display tr.gradeA { background-color: #eeffee; } table.display tr.gradeC { background-color: #ddddff; } table.display tr.gradeX { background-color: #ffdddd; } table.display tr.gradeU { background-color: #ddd; } div.box { height: 100px; padding: 10px; overflow: auto; border: 1px solid #8080FF; background-color: #E5E5FF; }
bartongroup/AlmostSignificant
almostSignificant/static/almostSignificant/css/datatable.css
CSS
mit
10,796
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> #include <IDirect3DViewport3.hpp> START_ATF_NAMESPACE typedef IDirect3DViewport3 *LPDIRECT3DVIEWPORT3; END_ATF_NAMESPACE
goodwinxp/Yorozuya
library/ATF/LPDIRECT3DVIEWPORT3.hpp
C++
mit
277
<html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head><body>Time,TemperatureF,DewpointF,PressureIn,WindDirection,WindDirectionDegrees,WindSpeedMPH,WindSpeedGustMPH,Humidity,HourlyPrecipIn,Conditions,Clouds,dailyrainin,SoftwareType<br> <!-- 0.204:1 --> </body></html>
arkadyan/Wind-Dance
data/winddatafiles/264WXDailyHistory.asp.html
HTML
mit
305
define(function(require, exports, module){ 'use strict'; var layers = require('cqwrap/layers'); var BaseLayer = layers.BaseLayer, BgLayer = layers.BgLayer; var BaseScene = cc.Scene.extend({ ctor:function() { this._super(); this.init.apply(this, arguments); cc.associateWithNative( this, cc.Scene ); } }); function loadFrames(cache, frames, callback){ callback(frames); if(frames.length <= 0){ return; } cache.addSpriteFrames(frames[0][0], frames[0][1]); setTimeout(function(){ loadFrames(cache, frames.slice(1), callback); }, 100); } var LoadingLayer = BaseLayer.extend({ init: function(frameCaches){ this._super(); var self = this; setTimeout(function(){ var cache = cc.SpriteFrameCache.getInstance(); loadFrames(cache, frameCaches, function(frames){ self.getParent().onProgressChange(1 - frames.length / frameCaches.length); if(frames.length <= 0){ setTimeout(function(){ self.getParent().onLoaded(); }, 200); } }); }, 100); if(this.setKeypadEnabled){ this.setKeypadEnabled(true); } }, backClicked: function(){ this.getParent().backClicked(); } }); var LoadingScene = BaseScene.extend({ init: function(resFrames){ this._super(); var loadingLayer = new LoadingLayer(resFrames); this.addChild(loadingLayer); }, onProgressChange: function(){ //Overload by subclass }, onLoaded: function(){ //Overload by subclass }, backClicked: function(){ director.end(); } }); module.exports = { BaseScene: BaseScene, LoadingScene: LoadingScene }; });
lyosaki88/DotNetRocks
DotNetRocks.Web/WebApp/flappybird/cqwrap/scenes.js
JavaScript
mit
1,890
# `today_cmd` A simple script to create and manipulate a directory for loose files made on a particular day. ``` $ tree ~/today/ /Users/matt/today/ ├── 2015-07-15 │   └── notes.md └── 2015-07-19 └── commandresults ``` ## Getting started Clone the repo. ```bash git clone https://github.com/mdsummers/today_cmd.git cd today_cmd ``` You can chose to either source the `today` script in your `.bashrc`/`.bash_profile` or install it as a standalone script. ### Option A: Source `today` function - Preferred Linux ```bash echo '. /path/to/today_cmd/today' >> ~/.bashrc . ~/.bashrc ``` On the Mac ```bash echo '. /path/to/today_cmd/today' >> ~/.bash_profile . ~/.bash_profile ``` ### Option B: Run `today` as script Make a symlink under your user's `bin` directory for today ```bash ln -s /path/to/today_cmd/today ~/bin/today ``` ## Usage ### Make a directory for today ``` $ today /Users/matt/today/2015-07-15 ``` ### Write or amend a set of notes for today Opens a file called `notes.md` under today's directory using the default editor. ```bash today notes ``` ### Open today's directory in a file browser ```bash today open ``` ### Change directory to today ** Requires `today` to be sourced ** ```bash today cd ``` ### Print the last "today" directory It could be yesterday, it could be older (upto a year older infact) ``` $ today last /Users/matt/today/2015-07-20 ``` ### Not done with yesterday's directory? Link today's directory with the last "today" directory ``` $ today link /Users/matt/today/2015-07-21 $ ls -l $TODAYDIR lrwxr-xr-x 1 matt staff 10 Jul 21 11:52 /Users/matt/today/2015-07-21 -> 2015-07-20 ``` ### List contents of today's directory ``` $ today ls notes.md $ today ls -l total 4 -rw-r--r-- 1 matt staff 24 Jul 21 12:29 notes.md ``` Any arguments passed after ls are passed through directly to the system's `ls`. ## Customising today It is possible to change a number of settings by writing a `~/.todayrc` file. ```bash DATEFORMAT='%Y/%m/%d' #defaults to %Y-%m-%d TODAYROOT=~/Documents/notes #defaults to ~/today NOTESUFFIX=.txt #defaults to .md ```
mdsummers/today_cmd
README.md
Markdown
mit
2,121
import { assert } from "chai"; import * as helper from "./helper/index"; import { getConfig } from "../src/config/config"; const { defaults } = getConfig(); const searchDefaults = defaults.placesSearch; const { Place } = helper; describe("Place Model", () => { before(async function () { this.timeout(0); await helper.clearPostcodeDb(); await helper.seedPostcodeDb(); }); after(async () => helper.clearPostcodeDb); const searchMethods = [ { name: "Prefix Search", fn: Place.prefixSearch, }, { name: "Terms Search", fn: Place.termsSearch, }, ]; const testQueries = ["taobh a chaolais", "llwyn y groes", "corston"]; searchMethods.forEach((method) => { const fn = method.fn; describe(`${method.name}`, () => { testQueries.forEach((testQuery) => { it(`finds exact matches on query: ${testQuery}`, async () => { const results = await fn({ name: testQuery }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1_search, testQuery); }); }); }); }); describe("_prefixSearch", () => { const testQueries = ["be", "s", "br"]; testQueries.forEach((query) => { it(`finds incomplete words. like '${query}'`, async () => { const results = await Place.prefixSearch({ name: query }); assert(results.length > 0); results.forEach(helper.isRawPlaceObject); results.forEach((result) => { assert(result.name_1_search.startsWith(query)); }); }); }); }); describe("_termsSearch", () => { it("matches prepositions like 'of'", async () => { const results = await Place.termsSearch({ name: "of" }); assert(results.length > 0); results.forEach(helper.isRawPlaceObject); results.forEach((result) => { assert(result.name_1_search.includes("of")); }); }); }); describe("#search", () => { it("returns a list of places for given search term", async () => { const results = await Place.search({ name: "b" }); results.forEach(helper.isRawPlaceObject); }); it("returns null if no query", async () => { const results = await Place.search({}); assert.isNull(results); }); it("is sensitive to limit", async () => { const results = await Place.search({ name: "b", limit: 1, }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); }); it("returns up to 10 results by default", async () => { const results = await Place.search({ name: "b" }); assert.equal(results.length, 10); results.forEach(helper.isRawPlaceObject); }); it("sets limit to default maximum if it's greater than it", async () => { const searchDefaultMax = searchDefaults.limit.MAX; searchDefaults.limit.MAX = 5; const results = await Place.search({ name: "b", limit: 1000, }); assert.equal(results.length, 5); results.forEach(helper.isRawPlaceObject); searchDefaults.limit.MAX = searchDefaultMax; }); it("uses default limit if invalid limit supplied", async () => { const results = await Place.search({ name: "b", limit: -1, }); assert.equal(results.length, 10); results.forEach(helper.isRawPlaceObject); }); it("searches with name_2", async () => { const name = "East Kilbride"; const results = await Place.search({ name: name }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_2, name); }); describe("result specs", () => { it("returns names with apostrophes", async () => { const name = "Taobh a' Chaolais"; const results = await Place.search({ name: name.replace(/'/g, ""), }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("returns names with non-ascii characters", async () => { const name = "Mynydd-llêch"; const results = await Place.search({ name: name.replace("ê", "e"), }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("returns names with hyphens", async () => { const name = "Llwyn-y-groes"; const results = await Place.search({ name: name.replace(/-/g, " "), }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("successfully matches where query is middle word", async () => { const query = "of"; const results = await Place.search({ name: query, }); assert(results.length > 0); results.forEach(helper.isRawPlaceObject); results.forEach((result) => { assert(result.name_1_search.includes(query)); }); }); it("returns null if both prefix and terms search fail", async () => { const query = "this is never gonna get matched"; const results = await Place.search({ name: query, }); assert.isNull(results); }); }); describe("query specs", () => { it("is case insensitive", async () => { const name = "Corston"; const results = await Place.search({ name: name.toUpperCase(), }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("handles apostrophes", async () => { const name = "Taobh a' Chaolais"; const results = await Place.search({ name: name, }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("handles non-ascii characters", async () => { const name = "Mynydd-llêch"; const results = await Place.search({ name: name }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("handles non-ascii character prefix searches", async () => { const prefix = "Mynydd-llêc"; const name = "Mynydd-llêch"; const results = await Place.search({ name: prefix }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); it("handles hyphens as spaces", async () => { const name = "Llwyn-y-groes"; const results = await Place.search({ name: name }); assert.equal(results.length, 1); results.forEach(helper.isRawPlaceObject); assert.equal(results[0].name_1, name); }); }); }); });
ideal-postcodes/postcodes.io
test/place.search.unit.ts
TypeScript
mit
7,062
'use strict'; var React = require('React'); var createReactClass = require('create-react-class'); var Component = createReactClass({ displayName: 'Component', render() { return <div />; }, });
reactjs/react-codemod
transforms/__testfixtures__/class/class-no-conversion.output.js
JavaScript
mit
207
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="flayoutclass"><div class="flayoutclass_first"><table class="tableoutfmt2"><tr><th class="std1"><b>條目&nbsp;</b></th><td class="std2">暢通無阻</td></tr> <tr><th class="std1"><b>注音&nbsp;</b></th><td class="std2">ㄔㄤ<sup class="subfont">ˋ</sup> ㄊㄨㄥ ㄨ<sup class="subfont">ˊ</sup> ㄗㄨ<sup class="subfont">ˇ</sup></td></tr> <tr><th class="std1"><b>漢語拼音&nbsp;</b></th><td class="std2"><font class="english_word">chàng tōng wú zǔ</font></td></tr> <tr><th class="std1"><b>釋義&nbsp;</b></th><td class="std2">順利的通行,沒有阻礙。如:<img src=/cydic/dicword/fa40.gif border=0 alt=* class=fontimg valign=center>今天從高雄回臺北時,居然一路暢通無阻,真是奇蹟!<img src=/cydic/dicword/fa41.gif border=0 alt=* class=fontimg valign=center></td></tr> <tr><th class="std1"><b><font class="fltypefont">附錄</font>&nbsp;</b></th><td class="std2">修訂本參考資料</td></tr> </td></tr></table></div> <!-- flayoutclass_first --><div class="flayoutclass_second"></div> <!-- flayoutclass_second --></div> <!-- flayoutclass --></td></tr></table>
BuzzAcademy/idioms-moe-unformatted-data
all-data/15000-15999/15063-22.html
HTML
mit
1,336
package controllers /** * Created by Stanislaw Robak on 2014-12-31. */ class CanvasController { }
fib1123/scagraph
src/main/scala/controllers/CanvasController.scala
Scala
mit
102
import Ember from 'ember'; import layout from '../templates/container'; import UnlessDestroyedMixin from '../mixins/unless-destroyed'; const { RSVP, Component, Logger:logger } = Ember; const AsyncActionContainer = Component.extend(UnlessDestroyedMixin, { layout, inFlight: false, result: null, actions: { invoke() { if (!this.attrs.hasOwnProperty('asyncAction')) { logger.warn('No async-container attribute found for action'); return; } this.set('inFlight', true); this.set('result', null); return RSVP .cast(this.attrs.asyncAction(...arguments)) .then(this.unlessDestroyed(function(result) { this.set('result', result); return result; })) .finally(this.unlessDestroyed(function() { this.set('inFlight', false); })); } } }); AsyncActionContainer.reopenClass({ positionalParams: ['asyncAction'] }); export default AsyncActionContainer;
jasonmit/async-container
addon/components/container.js
JavaScript
mit
977
/*jslint nomen:true*/ /*global define*/ define([ 'backgrid', 'orodatagrid/js/datagrid/formatter/cell-formatter' ], function (Backgrid, CellFormatter) { 'use strict'; var StringCell; /** * String column cell. Added missing behaviour. * * @export oro/datagrid/cell/string-cell * @class oro.datagrid.cell.StringCell * @extends Backgrid.StringCell */ StringCell = Backgrid.StringCell.extend({ /** @property {(Backgrid.CellFormatter|Object|string)} */ formatter: new CellFormatter(), /** * @inheritDoc */ enterEditMode: function (e) { if (this.column.get("editable")) { e.stopPropagation(); } return StringCell.__super__.enterEditMode.apply(this, arguments); } }); return StringCell; });
morontt/platform
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/cell/string-cell.js
JavaScript
mit
880
require "socket" gs = TCPServer.open(0, 20000) socks = [gs] addr = gs.addr addr.shift printf("server is on %s\n", addr.join(":")) while true Thread.start(gs.accept) do |s| print(s, " is accepted\n") while s.gets %w[1 5 15 20 30 40 50 60].each do |ss| ii = Time.now.to_i sleep ss.to_i * 60 s.write((Time.now.to_i - ii) / 60) s.write("min\n") end end print(s, " is gone") s.close end end
higanworks/ruby-tcptest
rt.rb
Ruby
mit
454
class Admin::RoundsController < ApplicationController before_action :authenticate_user! before_action :authenticate_admin! def index @rounds = Round.order(from_date: :desc).page(params[:page]) end def mark_as_close @round = Round.find(params[:round_id]) @round.round_close redirect_to admin_rounds_path end end
prasadsurase/code-curiosity
app/controllers/admin/rounds_controller.rb
Ruby
mit
341
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <!-- Generated by chxdoc (build 606) on 2013-03-01 --> <title>Overlay (awe6)</title> <meta name="date" content="2013-03-01"/> <meta name="keywords" content="awe6.core.Overlay alias"/> <link href="../../../stylesheet.css" type="text/css" rel="stylesheet"/> <script type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Overlay (awe6)"; } } </script> <noscript></noscript> </head> <body onload="windowTitle();"> <div class="type-frame" id="class-frame"> <!-- ======== START OF class DATA ======== --> <h1 class="typedef">awe6.core.Overlay</h1> <dl> </dl> <div class="doc"> <!-- Comment block --> The Overlay class provides a minimalist implementation of the IOverlay interface. <p>For API documentation please review the corresponding Interfaces.</p> <p>Overlay includes target specific code so is implemented using the awe6.core.drivers package.</p> </div> <div class="members-panel"> <h2><a name="field_detail"></a>Alias for <a href="../../awe6/core/drivers/AOverlay.html" class="type">awe6.core.drivers.AOverlay</a> in </h2> </div> </div> <!-- ========= END OF TYPEDEF DATA ========= --> </body> </html>
hypersurge/awe6
docs/api/types/awe6/core/Overlay.html
HTML
mit
1,359
# -*- coding: utf-8 -*- import sys def diff(a,b): return compareTree(a, b) def getType(a): if isinstance(a, dict): return 'object' elif isinstance(a, list): return 'array' elif isinstance(a, str): return 'string' elif isinstance(a, int): return 'number' elif isinstance(a, bool): return 'boolean' return 'null' def compareTree(a, b): diff = {'_sys_diff':{}} a_type = getType(a) b_type = getType(b) if a_type == b_type: if a_type == 'object': return compareTree_dict(a, b) elif a_type == 'array': return compareTree_list(a, b) else: if a == b: return a else: return {'+':a,'-':b} else: return {'+':a,'-':b} def compareTree_dict(a, b): diff = {'_sys_diff':{}} for key in a: diff[key] = None for key in b: diff[key] = None for key in diff: if key in a and key in b: diff[key] = compareTree(a[key], b[key]) elif key in a: diff['_sys_diff'][key] = '+' diff[key] = a[key] elif key in b: diff['_sys_diff'][key] = '-' diff[key] = b[key] #else: #print 'error ' + key return diff def compareTree_list(a, b): diff = [] for i in a: diff.append(i) for i in b: if i in diff: pass else: diff.append(i) return diff def merge_part(a, b): if isinstance(a, str): return a if isinstance(a, int): return a if isinstance(a, bool): return a if isinstance(a, dict): pass if isinstance(a, list): return a result = {} keys = {} for key in a: keys[key] = None for key in b: keys[key] = None for key in keys: if key == '_sys_diff': continue #if key[0:4] == '_sys': # continue state = 0 if a.has_key('_sys_diff') and key in a['_sys_diff']: if a['_sys_diff'][key] == '+': state = 0 elif a['_sys_diff'][key] == '-': state = 1 else: state = 2 if b.has_key('_sys_diff') and key in b['_sys_diff']: if b['_sys_diff'][key] == '+': state += 3 * 0 elif b['_sys_diff'][key] == '-': state += 3 * 1 else: state += 3 * 2 if state == 0: # #a=+ b=+ result[key] = merge_part(a[key], b[key]) elif state == 1: #- + pass elif state == 2: #none + result[key] = b[key] elif state == 3: #+ - pass elif state == 4: #- - pass elif state == 5: #none - pass elif state == 6: #+ none result[key] = a[key] elif state == 7: #- none pass elif state == 8: #none none if a.has_key(key) and b.has_key(key): result[key] = merge_part(a[key], b[key]) elif a.has_key(key): result[key] = a[key] elif b.has_key(key): result[key] = b[key] elif state == 9: pass return result def clean_sys_diff(a): if isinstance(a, dict): if a.has_key('_sys_diff'): del a['_sys_diff'] for key in a: clean_sys_diff(a[str(key)]) def merge(src, dest, base): src_diff = diff(src, base) dest_diff = diff(dest, base) merged_model = merge_part(src_diff, dest_diff) clean_sys_diff(merged_model) return merged_model
syuhei176/json-mergepy
jsonutil.py
Python
mit
3,813
<?php namespace Cheetahmail\Data\Subscribers; class ArrayOfString implements \ArrayAccess, \Iterator, \Countable { /** * @var string[] $string */ protected $string = null; public function __construct() { } /** * @return string[] */ public function getString() { return $this->string; } /** * @param string[] $string * @return \Cheetahmail\Data\Subscribers\ArrayOfString */ public function setString(array $string = null) { $this->string = $string; return $this; } /** * ArrayAccess implementation * * @param mixed $offset An offset to check for * @return boolean true on success or false on failure */ public function offsetExists($offset) { return isset($this->string[$offset]); } /** * ArrayAccess implementation * * @param mixed $offset The offset to retrieve * @return string */ public function offsetGet($offset) { return $this->string[$offset]; } /** * ArrayAccess implementation * * @param mixed $offset The offset to assign the value to * @param string $value The value to set * @return void */ public function offsetSet($offset, $value) { if (!isset($offset)) { $this->string[] = $value; } else { $this->string[$offset] = $value; } } /** * ArrayAccess implementation * * @param mixed $offset The offset to unset * @return void */ public function offsetUnset($offset) { unset($this->string[$offset]); } /** * Iterator implementation * * @return string Return the current element */ public function current() { return current($this->string); } /** * Iterator implementation * Move forward to next element * * @return void */ public function next() { next($this->string); } /** * Iterator implementation * * @return string|null Return the key of the current element or null */ public function key() { return key($this->string); } /** * Iterator implementation * * @return boolean Return the validity of the current position */ public function valid() { return $this->key() !== null; } /** * Iterator implementation * Rewind the Iterator to the first element * * @return void */ public function rewind() { reset($this->string); } /** * Countable implementation * * @return string Return count of elements */ public function count() { return count($this->string); } }
pgrimaud/cheetahmail-sdk
src/Data/Subscribers/ArrayOfString.php
PHP
mit
2,818
--- title: "Release notes 1.2.0" date: 2017-04-07 draft: false weight: 270 --- Avola 1.2-20170406.4 was released on April 7th, 2017. ##### Features * You can now manage your domain's knowledge sources. Navigate to "Domains" and find the new tab. You can attach your source documents, limited to 50MB per document. Contact us if this limit is a problem for your organisation. * It is now possible to create value lists and pairs when you are creating the business data element that uses it, also directly from the decision logic. On top of that, value list items can be added directly when editing a decision logic condition cell value. * Percentages are no longer handled as their decimal values, which makes it a lot easier to work with them in the user interface. The API still expects (and returns) the value as the fraction. This means 10.75% is 0.1075 in the API. * The Execution Result in the API has been extended with an extra field (FinalConclusionBusinessDataIds) to mark the main conclusions. It is an array because we plan to support multiple conclusion business data elements per decision (#185) ##### Enhancements / Changes * performance enhancements in test execution for individual scenarios * Decisions with pair conclusions now return the actual pair value instead of the corresponding boolean value. (#186) * Better performance when uploading large scenario collection excel files. (#187, #190) * API now accepts date without time when this is not required by the business data precision. * Edit your date values in the decision logic, without opening the edit popup * In the row expression that is passed to the API in the execution result, we now omit the "any..." parts. When a value is not tested, it is not mentioned anymore. * Table headers in decision logic now have extra infomation about constraints and precision of the corresponding business data element * Stricter handling of business data editing possibilities. (#197) * Better error handling when it is not allowed to delete a business data element (#194) * Business data questions in a test scenario are now grouped by business concept. * The Administrator and Security Administrator role are merged into the administrator role ##### Fixes * Don't allow empty date values in decision logic * Correct handling of empty datetime values in scenario collection excel uploads * Don't allow saving a text operator when the operand is not defined * It is no longer possible to save a condition with a "between" operator, without entering the "until" value. * Several small but not breaking display issues in Firefox and Internet Explorer ##### Known Issues * Some older (pre 1.1) scenario's, with date values, can not be cloned. please re-create these scenarios * Scenarios with pair conclusions will not behave correctly until saved again (changed conclusion value) * We are aware that the execution of very large scenario collections does not perform well, and can result in confusing time-out errors. * The stricter handling of editing Business Data Elements removes some functionalities (like editing decimal places for a decimal value). We are working on audit trail (history) of business data edits that have an effect on Decision Services. We will release full editing of Business Data Elements with this feature.
Avola/docs
content/releases/release-notes-1.2.0.md
Markdown
mit
3,310
#!/usr/bin/env python3 # Copyright (c) 2016 The PlanBcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test segwit transactions and blocks on P2P network.""" from test_framework.mininode import * from test_framework.test_framework import PlanbcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment, get_witness_script, WITNESS_COMMITMENT_HEADER from test_framework.key import CECKey, CPubKey import time import random from binascii import hexlify # The versionbit bit used to signal activation of SegWit VB_WITNESS_BIT = 1 VB_PERIOD = 144 VB_ACTIVATION_THRESHOLD = 108 VB_TOP_BITS = 0x20000000 MAX_SIGOP_COST = 80000 # Calculate the virtual size of a witness block: # (base + witness/4) def get_virtual_size(witness_block): base_size = len(witness_block.serialize()) total_size = len(witness_block.serialize(with_witness=True)) # the "+3" is so we round up vsize = int((3*base_size + total_size + 3)/4) return vsize class TestNode(NodeConnCB): def __init__(self): super().__init__() self.getdataset = set() def on_getdata(self, conn, message): for inv in message.inv: self.getdataset.add(inv.hash) def announce_tx_and_wait_for_getdata(self, tx, timeout=60): with mininode_lock: self.last_message.pop("getdata", None) self.send_message(msg_inv(inv=[CInv(1, tx.sha256)])) self.wait_for_getdata(timeout) def announce_block_and_wait_for_getdata(self, block, use_header, timeout=60): with mininode_lock: self.last_message.pop("getdata", None) self.last_message.pop("getheaders", None) msg = msg_headers() msg.headers = [ CBlockHeader(block) ] if use_header: self.send_message(msg) else: self.send_message(msg_inv(inv=[CInv(2, block.sha256)])) self.wait_for_getheaders() self.send_message(msg) self.wait_for_getdata() def request_block(self, blockhash, inv_type, timeout=60): with mininode_lock: self.last_message.pop("block", None) self.send_message(msg_getdata(inv=[CInv(inv_type, blockhash)])) self.wait_for_block(blockhash, timeout) return self.last_message["block"].block def test_transaction_acceptance(self, tx, with_witness, accepted, reason=None): tx_message = msg_tx(tx) if with_witness: tx_message = msg_witness_tx(tx) self.send_message(tx_message) self.sync_with_ping() assert_equal(tx.hash in self.connection.rpc.getrawmempool(), accepted) if (reason != None and not accepted): # Check the rejection reason as well. with mininode_lock: assert_equal(self.last_message["reject"].reason, reason) # Test whether a witness block had the correct effect on the tip def test_witness_block(self, block, accepted, with_witness=True): if with_witness: self.send_message(msg_witness_block(block)) else: self.send_message(msg_block(block)) self.sync_with_ping() assert_equal(self.connection.rpc.getbestblockhash() == block.hash, accepted) # Used to keep track of anyone-can-spend outputs that we can use in the tests class UTXO(object): def __init__(self, sha256, n, nValue): self.sha256 = sha256 self.n = n self.nValue = nValue # Helper for getting the script associated with a P2PKH def GetP2PKHScript(pubkeyhash): return CScript([CScriptOp(OP_DUP), CScriptOp(OP_HASH160), pubkeyhash, CScriptOp(OP_EQUALVERIFY), CScriptOp(OP_CHECKSIG)]) # Add signature for a P2PK witness program. def sign_P2PK_witness_input(script, txTo, inIdx, hashtype, value, key): tx_hash = SegwitVersion1SignatureHash(script, txTo, inIdx, hashtype, value) signature = key.sign(tx_hash) + chr(hashtype).encode('latin-1') txTo.wit.vtxinwit[inIdx].scriptWitness.stack = [signature, script] txTo.rehash() class SegWitTest(PlanbcoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 3 self.extra_args = [["-whitelist=127.0.0.1"], ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0"], ["-whitelist=127.0.0.1", "-vbparams=segwit:0:0"]] def setup_network(self): self.setup_nodes() connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 2) self.sync_all() ''' Helpers ''' # Build a block on top of node0's tip. def build_next_block(self, nVersion=4): tip = self.nodes[0].getbestblockhash() height = self.nodes[0].getblockcount() + 1 block_time = self.nodes[0].getblockheader(tip)["mediantime"] + 1 block = create_block(int(tip, 16), create_coinbase(height), block_time) block.nVersion = nVersion block.rehash() return block # Adds list of transactions to block, adds witness commitment, then solves. def update_witness_block_with_transactions(self, block, tx_list, nonce=0): block.vtx.extend(tx_list) add_witness_commitment(block, nonce) block.solve() return ''' Individual tests ''' def test_witness_services(self): self.log.info("Verifying NODE_WITNESS service bit") assert((self.test_node.connection.nServices & NODE_WITNESS) != 0) # See if sending a regular transaction works, and create a utxo # to use in later tests. def test_non_witness_transaction(self): # Mine a block with an anyone-can-spend coinbase, # let it mature, then try to spend it. self.log.info("Testing non-witness transaction") block = self.build_next_block(nVersion=1) block.solve() self.test_node.send_message(msg_block(block)) self.test_node.sync_with_ping() # make sure the block was processed txid = block.vtx[0].sha256 self.nodes[0].generate(99) # let the block mature # Create a transaction that spends the coinbase tx = CTransaction() tx.vin.append(CTxIn(COutPoint(txid, 0), b"")) tx.vout.append(CTxOut(49*100000000, CScript([OP_TRUE]))) tx.calc_sha256() # Check that serializing it with or without witness is the same # This is a sanity check of our testing framework. assert_equal(msg_tx(tx).serialize(), msg_witness_tx(tx).serialize()) self.test_node.send_message(msg_witness_tx(tx)) self.test_node.sync_with_ping() # make sure the tx was processed assert(tx.hash in self.nodes[0].getrawmempool()) # Save this transaction for later self.utxo.append(UTXO(tx.sha256, 0, 49*100000000)) self.nodes[0].generate(1) # Verify that blocks with witnesses are rejected before activation. def test_unnecessary_witness_before_segwit_activation(self): self.log.info("Testing behavior of unnecessary witnesses") # For now, rely on earlier tests to have created at least one utxo for # us to use assert(len(self.utxo) > 0) assert(get_bip9_status(self.nodes[0], 'segwit')['status'] != 'active') tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, CScript([OP_TRUE]))) tx.wit.vtxinwit.append(CTxInWitness()) tx.wit.vtxinwit[0].scriptWitness.stack = [CScript([CScriptNum(1)])] # Verify the hash with witness differs from the txid # (otherwise our testing framework must be broken!) tx.rehash() assert(tx.sha256 != tx.calc_sha256(with_witness=True)) # Construct a segwit-signaling block that includes the transaction. block = self.build_next_block(nVersion=(VB_TOP_BITS|(1 << VB_WITNESS_BIT))) self.update_witness_block_with_transactions(block, [tx]) # Sending witness data before activation is not allowed (anti-spam # rule). self.test_node.test_witness_block(block, accepted=False) # TODO: fix synchronization so we can test reject reason # Right now, planbcoind delays sending reject messages for blocks # until the future, making synchronization here difficult. #assert_equal(self.test_node.last_message["reject"].reason, "unexpected-witness") # But it should not be permanently marked bad... # Resend without witness information. self.test_node.send_message(msg_block(block)) self.test_node.sync_with_ping() assert_equal(self.nodes[0].getbestblockhash(), block.hash) sync_blocks(self.nodes) # Create a p2sh output -- this is so we can pass the standardness # rules (an anyone-can-spend OP_TRUE would be rejected, if not wrapped # in P2SH). p2sh_program = CScript([OP_TRUE]) p2sh_pubkey = hash160(p2sh_program) scriptPubKey = CScript([OP_HASH160, p2sh_pubkey, OP_EQUAL]) # Now check that unnecessary witnesses can't be used to blind a node # to a transaction, eg by violating standardness checks. tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, scriptPubKey)) tx2.rehash() self.test_node.test_transaction_acceptance(tx2, False, True) self.nodes[0].generate(1) sync_blocks(self.nodes) # We'll add an unnecessary witness to this transaction that would cause # it to be non-standard, to test that violating policy with a witness before # segwit activation doesn't blind a node to a transaction. Transactions # rejected for having a witness before segwit activation shouldn't be added # to the rejection cache. tx3 = CTransaction() tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), CScript([p2sh_program]))) tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, scriptPubKey)) tx3.wit.vtxinwit.append(CTxInWitness()) tx3.wit.vtxinwit[0].scriptWitness.stack = [b'a'*400000] tx3.rehash() # Note that this should be rejected for the premature witness reason, # rather than a policy check, since segwit hasn't activated yet. self.std_node.test_transaction_acceptance(tx3, True, False, b'no-witness-yet') # If we send without witness, it should be accepted. self.std_node.test_transaction_acceptance(tx3, False, True) # Now create a new anyone-can-spend utxo for the next test. tx4 = CTransaction() tx4.vin.append(CTxIn(COutPoint(tx3.sha256, 0), CScript([p2sh_program]))) tx4.vout.append(CTxOut(tx3.vout[0].nValue-1000, CScript([OP_TRUE]))) tx4.rehash() self.test_node.test_transaction_acceptance(tx3, False, True) self.test_node.test_transaction_acceptance(tx4, False, True) self.nodes[0].generate(1) sync_blocks(self.nodes) # Update our utxo list; we spent the first entry. self.utxo.pop(0) self.utxo.append(UTXO(tx4.sha256, 0, tx4.vout[0].nValue)) # Mine enough blocks for segwit's vb state to be 'started'. def advance_to_segwit_started(self): height = self.nodes[0].getblockcount() # Will need to rewrite the tests here if we are past the first period assert(height < VB_PERIOD - 1) # Genesis block is 'defined'. assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'defined') # Advance to end of period, status should now be 'started' self.nodes[0].generate(VB_PERIOD-height-1) assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'started') # Mine enough blocks to lock in segwit, but don't activate. # TODO: we could verify that lockin only happens at the right threshold of # signalling blocks, rather than just at the right period boundary. def advance_to_segwit_lockin(self): height = self.nodes[0].getblockcount() assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'started') # Advance to end of period, and verify lock-in happens at the end self.nodes[0].generate(VB_PERIOD-1) height = self.nodes[0].getblockcount() assert((height % VB_PERIOD) == VB_PERIOD - 2) assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'started') self.nodes[0].generate(1) assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'locked_in') # Mine enough blocks to activate segwit. # TODO: we could verify that activation only happens at the right threshold # of signalling blocks, rather than just at the right period boundary. def advance_to_segwit_active(self): assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'locked_in') height = self.nodes[0].getblockcount() self.nodes[0].generate(VB_PERIOD - (height%VB_PERIOD) - 2) assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'locked_in') self.nodes[0].generate(1) assert_equal(get_bip9_status(self.nodes[0], 'segwit')['status'], 'active') # This test can only be run after segwit has activated def test_witness_commitments(self): self.log.info("Testing witness commitments") # First try a correct witness commitment. block = self.build_next_block() add_witness_commitment(block) block.solve() # Test the test -- witness serialization should be different assert(msg_witness_block(block).serialize() != msg_block(block).serialize()) # This empty block should be valid. self.test_node.test_witness_block(block, accepted=True) # Try to tweak the nonce block_2 = self.build_next_block() add_witness_commitment(block_2, nonce=28) block_2.solve() # The commitment should have changed! assert(block_2.vtx[0].vout[-1] != block.vtx[0].vout[-1]) # This should also be valid. self.test_node.test_witness_block(block_2, accepted=True) # Now test commitments with actual transactions assert (len(self.utxo) > 0) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) # Let's construct a witness program witness_program = CScript([OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, scriptPubKey)) tx.rehash() # tx2 will spend tx1, and send back to a regular anyone-can-spend address tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, witness_program)) tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[0].scriptWitness.stack = [witness_program] tx2.rehash() block_3 = self.build_next_block() self.update_witness_block_with_transactions(block_3, [tx, tx2], nonce=1) # Add an extra OP_RETURN output that matches the witness commitment template, # even though it has extra data after the incorrect commitment. # This block should fail. block_3.vtx[0].vout.append(CTxOut(0, CScript([OP_RETURN, WITNESS_COMMITMENT_HEADER + ser_uint256(2), 10]))) block_3.vtx[0].rehash() block_3.hashMerkleRoot = block_3.calc_merkle_root() block_3.rehash() block_3.solve() self.test_node.test_witness_block(block_3, accepted=False) # Add a different commitment with different nonce, but in the # right location, and with some funds burned(!). # This should succeed (nValue shouldn't affect finding the # witness commitment). add_witness_commitment(block_3, nonce=0) block_3.vtx[0].vout[0].nValue -= 1 block_3.vtx[0].vout[-1].nValue += 1 block_3.vtx[0].rehash() block_3.hashMerkleRoot = block_3.calc_merkle_root() block_3.rehash() assert(len(block_3.vtx[0].vout) == 4) # 3 OP_returns block_3.solve() self.test_node.test_witness_block(block_3, accepted=True) # Finally test that a block with no witness transactions can # omit the commitment. block_4 = self.build_next_block() tx3 = CTransaction() tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), b"")) tx3.vout.append(CTxOut(tx.vout[0].nValue-1000, witness_program)) tx3.rehash() block_4.vtx.append(tx3) block_4.hashMerkleRoot = block_4.calc_merkle_root() block_4.solve() self.test_node.test_witness_block(block_4, with_witness=False, accepted=True) # Update available utxo's for use in later test. self.utxo.pop(0) self.utxo.append(UTXO(tx3.sha256, 0, tx3.vout[0].nValue)) def test_block_malleability(self): self.log.info("Testing witness block malleability") # Make sure that a block that has too big a virtual size # because of a too-large coinbase witness is not permanently # marked bad. block = self.build_next_block() add_witness_commitment(block) block.solve() block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.append(b'a'*5000000) assert(get_virtual_size(block) > MAX_BLOCK_BASE_SIZE) # We can't send over the p2p network, because this is too big to relay # TODO: repeat this test with a block that can be relayed self.nodes[0].submitblock(bytes_to_hex_str(block.serialize(True))) assert(self.nodes[0].getbestblockhash() != block.hash) block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.pop() assert(get_virtual_size(block) < MAX_BLOCK_BASE_SIZE) self.nodes[0].submitblock(bytes_to_hex_str(block.serialize(True))) assert(self.nodes[0].getbestblockhash() == block.hash) # Now make sure that malleating the witness nonce doesn't # result in a block permanently marked bad. block = self.build_next_block() add_witness_commitment(block) block.solve() # Change the nonce -- should not cause the block to be permanently # failed block.vtx[0].wit.vtxinwit[0].scriptWitness.stack = [ ser_uint256(1) ] self.test_node.test_witness_block(block, accepted=False) # Changing the witness nonce doesn't change the block hash block.vtx[0].wit.vtxinwit[0].scriptWitness.stack = [ ser_uint256(0) ] self.test_node.test_witness_block(block, accepted=True) def test_witness_block_size(self): self.log.info("Testing witness block size limit") # TODO: Test that non-witness carrying blocks can't exceed 1MB # Skipping this test for now; this is covered in p2p-fullblocktest.py # Test that witness-bearing blocks are limited at ceil(base + wit/4) <= 1MB. block = self.build_next_block() assert(len(self.utxo) > 0) # Create a P2WSH transaction. # The witness program will be a bunch of OP_2DROP's, followed by OP_TRUE. # This should give us plenty of room to tweak the spending tx's # virtual size. NUM_DROPS = 200 # 201 max ops per script! NUM_OUTPUTS = 50 witness_program = CScript([OP_2DROP]*NUM_DROPS + [OP_TRUE]) witness_hash = uint256_from_str(sha256(witness_program)) scriptPubKey = CScript([OP_0, ser_uint256(witness_hash)]) prevout = COutPoint(self.utxo[0].sha256, self.utxo[0].n) value = self.utxo[0].nValue parent_tx = CTransaction() parent_tx.vin.append(CTxIn(prevout, b"")) child_value = int(value/NUM_OUTPUTS) for i in range(NUM_OUTPUTS): parent_tx.vout.append(CTxOut(child_value, scriptPubKey)) parent_tx.vout[0].nValue -= 50000 assert(parent_tx.vout[0].nValue > 0) parent_tx.rehash() child_tx = CTransaction() for i in range(NUM_OUTPUTS): child_tx.vin.append(CTxIn(COutPoint(parent_tx.sha256, i), b"")) child_tx.vout = [CTxOut(value - 100000, CScript([OP_TRUE]))] for i in range(NUM_OUTPUTS): child_tx.wit.vtxinwit.append(CTxInWitness()) child_tx.wit.vtxinwit[-1].scriptWitness.stack = [b'a'*195]*(2*NUM_DROPS) + [witness_program] child_tx.rehash() self.update_witness_block_with_transactions(block, [parent_tx, child_tx]) vsize = get_virtual_size(block) additional_bytes = (MAX_BLOCK_BASE_SIZE - vsize)*4 i = 0 while additional_bytes > 0: # Add some more bytes to each input until we hit MAX_BLOCK_BASE_SIZE+1 extra_bytes = min(additional_bytes+1, 55) block.vtx[-1].wit.vtxinwit[int(i/(2*NUM_DROPS))].scriptWitness.stack[i%(2*NUM_DROPS)] = b'a'*(195+extra_bytes) additional_bytes -= extra_bytes i += 1 block.vtx[0].vout.pop() # Remove old commitment add_witness_commitment(block) block.solve() vsize = get_virtual_size(block) assert_equal(vsize, MAX_BLOCK_BASE_SIZE + 1) # Make sure that our test case would exceed the old max-network-message # limit assert(len(block.serialize(True)) > 2*1024*1024) self.test_node.test_witness_block(block, accepted=False) # Now resize the second transaction to make the block fit. cur_length = len(block.vtx[-1].wit.vtxinwit[0].scriptWitness.stack[0]) block.vtx[-1].wit.vtxinwit[0].scriptWitness.stack[0] = b'a'*(cur_length-1) block.vtx[0].vout.pop() add_witness_commitment(block) block.solve() assert(get_virtual_size(block) == MAX_BLOCK_BASE_SIZE) self.test_node.test_witness_block(block, accepted=True) # Update available utxo's self.utxo.pop(0) self.utxo.append(UTXO(block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue)) # submitblock will try to add the nonce automatically, so that mining # software doesn't need to worry about doing so itself. def test_submit_block(self): block = self.build_next_block() # Try using a custom nonce and then don't supply it. # This shouldn't possibly work. add_witness_commitment(block, nonce=1) block.vtx[0].wit = CTxWitness() # drop the nonce block.solve() self.nodes[0].submitblock(bytes_to_hex_str(block.serialize(True))) assert(self.nodes[0].getbestblockhash() != block.hash) # Now redo commitment with the standard nonce, but let planbcoind fill it in. add_witness_commitment(block, nonce=0) block.vtx[0].wit = CTxWitness() block.solve() self.nodes[0].submitblock(bytes_to_hex_str(block.serialize(True))) assert_equal(self.nodes[0].getbestblockhash(), block.hash) # This time, add a tx with non-empty witness, but don't supply # the commitment. block_2 = self.build_next_block() add_witness_commitment(block_2) block_2.solve() # Drop commitment and nonce -- submitblock should not fill in. block_2.vtx[0].vout.pop() block_2.vtx[0].wit = CTxWitness() self.nodes[0].submitblock(bytes_to_hex_str(block_2.serialize(True))) # Tip should not advance! assert(self.nodes[0].getbestblockhash() != block_2.hash) # Consensus tests of extra witness data in a transaction. def test_extra_witness_data(self): self.log.info("Testing extra witness data in tx") assert(len(self.utxo) > 0) block = self.build_next_block() witness_program = CScript([OP_DROP, OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) # First try extra witness data on a tx that doesn't require a witness tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-2000, scriptPubKey)) tx.vout.append(CTxOut(1000, CScript([OP_TRUE]))) # non-witness output tx.wit.vtxinwit.append(CTxInWitness()) tx.wit.vtxinwit[0].scriptWitness.stack = [CScript([])] tx.rehash() self.update_witness_block_with_transactions(block, [tx]) # Extra witness data should not be allowed. self.test_node.test_witness_block(block, accepted=False) # Try extra signature data. Ok if we're not spending a witness output. block.vtx[1].wit.vtxinwit = [] block.vtx[1].vin[0].scriptSig = CScript([OP_0]) block.vtx[1].rehash() add_witness_commitment(block) block.solve() self.test_node.test_witness_block(block, accepted=True) # Now try extra witness/signature data on an input that DOES require a # witness tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) # witness output tx2.vin.append(CTxIn(COutPoint(tx.sha256, 1), b"")) # non-witness tx2.vout.append(CTxOut(tx.vout[0].nValue, CScript([OP_TRUE]))) tx2.wit.vtxinwit.extend([CTxInWitness(), CTxInWitness()]) tx2.wit.vtxinwit[0].scriptWitness.stack = [ CScript([CScriptNum(1)]), CScript([CScriptNum(1)]), witness_program ] tx2.wit.vtxinwit[1].scriptWitness.stack = [ CScript([OP_TRUE]) ] block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx2]) # This has extra witness data, so it should fail. self.test_node.test_witness_block(block, accepted=False) # Now get rid of the extra witness, but add extra scriptSig data tx2.vin[0].scriptSig = CScript([OP_TRUE]) tx2.vin[1].scriptSig = CScript([OP_TRUE]) tx2.wit.vtxinwit[0].scriptWitness.stack.pop(0) tx2.wit.vtxinwit[1].scriptWitness.stack = [] tx2.rehash() add_witness_commitment(block) block.solve() # This has extra signature data for a witness input, so it should fail. self.test_node.test_witness_block(block, accepted=False) # Now get rid of the extra scriptsig on the witness input, and verify # success (even with extra scriptsig data in the non-witness input) tx2.vin[0].scriptSig = b"" tx2.rehash() add_witness_commitment(block) block.solve() self.test_node.test_witness_block(block, accepted=True) # Update utxo for later tests self.utxo.pop(0) self.utxo.append(UTXO(tx2.sha256, 0, tx2.vout[0].nValue)) def test_max_witness_push_length(self): ''' Should only allow up to 520 byte pushes in witness stack ''' self.log.info("Testing maximum witness push size") MAX_SCRIPT_ELEMENT_SIZE = 520 assert(len(self.utxo)) block = self.build_next_block() witness_program = CScript([OP_DROP, OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, scriptPubKey)) tx.rehash() tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))) tx2.wit.vtxinwit.append(CTxInWitness()) # First try a 521-byte stack element tx2.wit.vtxinwit[0].scriptWitness.stack = [ b'a'*(MAX_SCRIPT_ELEMENT_SIZE+1), witness_program ] tx2.rehash() self.update_witness_block_with_transactions(block, [tx, tx2]) self.test_node.test_witness_block(block, accepted=False) # Now reduce the length of the stack element tx2.wit.vtxinwit[0].scriptWitness.stack[0] = b'a'*(MAX_SCRIPT_ELEMENT_SIZE) add_witness_commitment(block) block.solve() self.test_node.test_witness_block(block, accepted=True) # Update the utxo for later tests self.utxo.pop() self.utxo.append(UTXO(tx2.sha256, 0, tx2.vout[0].nValue)) def test_max_witness_program_length(self): # Can create witness outputs that are long, but can't be greater than # 10k bytes to successfully spend self.log.info("Testing maximum witness program length") assert(len(self.utxo)) MAX_PROGRAM_LENGTH = 10000 # This program is 19 max pushes (9937 bytes), then 64 more opcode-bytes. long_witness_program = CScript([b'a'*520]*19 + [OP_DROP]*63 + [OP_TRUE]) assert(len(long_witness_program) == MAX_PROGRAM_LENGTH+1) long_witness_hash = sha256(long_witness_program) long_scriptPubKey = CScript([OP_0, long_witness_hash]) block = self.build_next_block() tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, long_scriptPubKey)) tx.rehash() tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))) tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[0].scriptWitness.stack = [b'a']*44 + [long_witness_program] tx2.rehash() self.update_witness_block_with_transactions(block, [tx, tx2]) self.test_node.test_witness_block(block, accepted=False) # Try again with one less byte in the witness program witness_program = CScript([b'a'*520]*19 + [OP_DROP]*62 + [OP_TRUE]) assert(len(witness_program) == MAX_PROGRAM_LENGTH) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) tx.vout[0] = CTxOut(tx.vout[0].nValue, scriptPubKey) tx.rehash() tx2.vin[0].prevout.hash = tx.sha256 tx2.wit.vtxinwit[0].scriptWitness.stack = [b'a']*43 + [witness_program] tx2.rehash() block.vtx = [block.vtx[0]] self.update_witness_block_with_transactions(block, [tx, tx2]) self.test_node.test_witness_block(block, accepted=True) self.utxo.pop() self.utxo.append(UTXO(tx2.sha256, 0, tx2.vout[0].nValue)) def test_witness_input_length(self): ''' Ensure that vin length must match vtxinwit length ''' self.log.info("Testing witness input length") assert(len(self.utxo)) witness_program = CScript([OP_DROP, OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) # Create a transaction that splits our utxo into many outputs tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) nValue = self.utxo[0].nValue for i in range(10): tx.vout.append(CTxOut(int(nValue/10), scriptPubKey)) tx.vout[0].nValue -= 1000 assert(tx.vout[0].nValue >= 0) block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) # Try various ways to spend tx that should all break. # This "broken" transaction serializer will not normalize # the length of vtxinwit. class BrokenCTransaction(CTransaction): def serialize_with_witness(self): flags = 0 if not self.wit.is_null(): flags |= 1 r = b"" r += struct.pack("<i", self.nVersion) if flags: dummy = [] r += ser_vector(dummy) r += struct.pack("<B", flags) r += ser_vector(self.vin) r += ser_vector(self.vout) if flags & 1: r += self.wit.serialize() r += struct.pack("<I", self.nLockTime) return r tx2 = BrokenCTransaction() for i in range(10): tx2.vin.append(CTxIn(COutPoint(tx.sha256, i), b"")) tx2.vout.append(CTxOut(nValue-3000, CScript([OP_TRUE]))) # First try using a too long vtxinwit for i in range(11): tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[i].scriptWitness.stack = [b'a', witness_program] block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx2]) self.test_node.test_witness_block(block, accepted=False) # Now try using a too short vtxinwit tx2.wit.vtxinwit.pop() tx2.wit.vtxinwit.pop() block.vtx = [block.vtx[0]] self.update_witness_block_with_transactions(block, [tx2]) self.test_node.test_witness_block(block, accepted=False) # Now make one of the intermediate witnesses be incorrect tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[-1].scriptWitness.stack = [b'a', witness_program] tx2.wit.vtxinwit[5].scriptWitness.stack = [ witness_program ] block.vtx = [block.vtx[0]] self.update_witness_block_with_transactions(block, [tx2]) self.test_node.test_witness_block(block, accepted=False) # Fix the broken witness and the block should be accepted. tx2.wit.vtxinwit[5].scriptWitness.stack = [b'a', witness_program] block.vtx = [block.vtx[0]] self.update_witness_block_with_transactions(block, [tx2]) self.test_node.test_witness_block(block, accepted=True) self.utxo.pop() self.utxo.append(UTXO(tx2.sha256, 0, tx2.vout[0].nValue)) def test_witness_tx_relay_before_segwit_activation(self): self.log.info("Testing relay of witness transactions") # Generate a transaction that doesn't require a witness, but send it # with a witness. Should be rejected for premature-witness, but should # not be added to recently rejected list. assert(len(self.utxo)) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, CScript([OP_TRUE]))) tx.wit.vtxinwit.append(CTxInWitness()) tx.wit.vtxinwit[0].scriptWitness.stack = [ b'a' ] tx.rehash() tx_hash = tx.sha256 tx_value = tx.vout[0].nValue # Verify that if a peer doesn't set nServices to include NODE_WITNESS, # the getdata is just for the non-witness portion. self.old_node.announce_tx_and_wait_for_getdata(tx) assert(self.old_node.last_message["getdata"].inv[0].type == 1) # Since we haven't delivered the tx yet, inv'ing the same tx from # a witness transaction ought not result in a getdata. try: self.test_node.announce_tx_and_wait_for_getdata(tx, timeout=2) self.log.error("Error: duplicate tx getdata!") assert(False) except AssertionError as e: pass # Delivering this transaction with witness should fail (no matter who # its from) assert_equal(len(self.nodes[0].getrawmempool()), 0) assert_equal(len(self.nodes[1].getrawmempool()), 0) self.old_node.test_transaction_acceptance(tx, with_witness=True, accepted=False) self.test_node.test_transaction_acceptance(tx, with_witness=True, accepted=False) # But eliminating the witness should fix it self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) # Cleanup: mine the first transaction and update utxo self.nodes[0].generate(1) assert_equal(len(self.nodes[0].getrawmempool()), 0) self.utxo.pop(0) self.utxo.append(UTXO(tx_hash, 0, tx_value)) # After segwit activates, verify that mempool: # - rejects transactions with unnecessary/extra witnesses # - accepts transactions with valid witnesses # and that witness transactions are relayed to non-upgraded peers. def test_tx_relay_after_segwit_activation(self): self.log.info("Testing relay of witness transactions") # Generate a transaction that doesn't require a witness, but send it # with a witness. Should be rejected because we can't use a witness # when spending a non-witness output. assert(len(self.utxo)) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, CScript([OP_TRUE]))) tx.wit.vtxinwit.append(CTxInWitness()) tx.wit.vtxinwit[0].scriptWitness.stack = [ b'a' ] tx.rehash() tx_hash = tx.sha256 # Verify that unnecessary witnesses are rejected. self.test_node.announce_tx_and_wait_for_getdata(tx) assert_equal(len(self.nodes[0].getrawmempool()), 0) self.test_node.test_transaction_acceptance(tx, with_witness=True, accepted=False) # Verify that removing the witness succeeds. self.test_node.announce_tx_and_wait_for_getdata(tx) self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) # Now try to add extra witness data to a valid witness tx. witness_program = CScript([OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx_hash, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, scriptPubKey)) tx2.rehash() tx3 = CTransaction() tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), b"")) tx3.wit.vtxinwit.append(CTxInWitness()) # Add too-large for IsStandard witness and check that it does not enter reject filter p2sh_program = CScript([OP_TRUE]) p2sh_pubkey = hash160(p2sh_program) witness_program2 = CScript([b'a'*400000]) tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, CScript([OP_HASH160, p2sh_pubkey, OP_EQUAL]))) tx3.wit.vtxinwit[0].scriptWitness.stack = [witness_program2] tx3.rehash() # Node will not be blinded to the transaction self.std_node.announce_tx_and_wait_for_getdata(tx3) self.std_node.test_transaction_acceptance(tx3, True, False, b'tx-size') self.std_node.announce_tx_and_wait_for_getdata(tx3) self.std_node.test_transaction_acceptance(tx3, True, False, b'tx-size') # Remove witness stuffing, instead add extra witness push on stack tx3.vout[0] = CTxOut(tx2.vout[0].nValue-1000, CScript([OP_TRUE])) tx3.wit.vtxinwit[0].scriptWitness.stack = [CScript([CScriptNum(1)]), witness_program ] tx3.rehash() self.test_node.test_transaction_acceptance(tx2, with_witness=True, accepted=True) self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=False) # Get rid of the extra witness, and verify acceptance. tx3.wit.vtxinwit[0].scriptWitness.stack = [ witness_program ] # Also check that old_node gets a tx announcement, even though this is # a witness transaction. self.old_node.wait_for_inv([CInv(1, tx2.sha256)]) # wait until tx2 was inv'ed self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=True) self.old_node.wait_for_inv([CInv(1, tx3.sha256)]) # Test that getrawtransaction returns correct witness information # hash, size, vsize raw_tx = self.nodes[0].getrawtransaction(tx3.hash, 1) assert_equal(int(raw_tx["hash"], 16), tx3.calc_sha256(True)) assert_equal(raw_tx["size"], len(tx3.serialize_with_witness())) vsize = (len(tx3.serialize_with_witness()) + 3*len(tx3.serialize_without_witness()) + 3) / 4 assert_equal(raw_tx["vsize"], vsize) assert_equal(len(raw_tx["vin"][0]["txinwitness"]), 1) assert_equal(raw_tx["vin"][0]["txinwitness"][0], hexlify(witness_program).decode('ascii')) assert(vsize != raw_tx["size"]) # Cleanup: mine the transactions and update utxo for next test self.nodes[0].generate(1) assert_equal(len(self.nodes[0].getrawmempool()), 0) self.utxo.pop(0) self.utxo.append(UTXO(tx3.sha256, 0, tx3.vout[0].nValue)) # Test that block requests to NODE_WITNESS peer are with MSG_WITNESS_FLAG # This is true regardless of segwit activation. # Also test that we don't ask for blocks from unupgraded peers def test_block_relay(self, segwit_activated): self.log.info("Testing block relay") blocktype = 2|MSG_WITNESS_FLAG # test_node has set NODE_WITNESS, so all getdata requests should be for # witness blocks. # Test announcing a block via inv results in a getdata, and that # announcing a version 4 or random VB block with a header results in a getdata block1 = self.build_next_block() block1.solve() self.test_node.announce_block_and_wait_for_getdata(block1, use_header=False) assert(self.test_node.last_message["getdata"].inv[0].type == blocktype) self.test_node.test_witness_block(block1, True) block2 = self.build_next_block(nVersion=4) block2.solve() self.test_node.announce_block_and_wait_for_getdata(block2, use_header=True) assert(self.test_node.last_message["getdata"].inv[0].type == blocktype) self.test_node.test_witness_block(block2, True) block3 = self.build_next_block(nVersion=(VB_TOP_BITS | (1<<15))) block3.solve() self.test_node.announce_block_and_wait_for_getdata(block3, use_header=True) assert(self.test_node.last_message["getdata"].inv[0].type == blocktype) self.test_node.test_witness_block(block3, True) # Check that we can getdata for witness blocks or regular blocks, # and the right thing happens. if segwit_activated == False: # Before activation, we should be able to request old blocks with # or without witness, and they should be the same. chain_height = self.nodes[0].getblockcount() # Pick 10 random blocks on main chain, and verify that getdata's # for MSG_BLOCK, MSG_WITNESS_BLOCK, and rpc getblock() are equal. all_heights = list(range(chain_height+1)) random.shuffle(all_heights) all_heights = all_heights[0:10] for height in all_heights: block_hash = self.nodes[0].getblockhash(height) rpc_block = self.nodes[0].getblock(block_hash, False) block_hash = int(block_hash, 16) block = self.test_node.request_block(block_hash, 2) wit_block = self.test_node.request_block(block_hash, 2|MSG_WITNESS_FLAG) assert_equal(block.serialize(True), wit_block.serialize(True)) assert_equal(block.serialize(), hex_str_to_bytes(rpc_block)) else: # After activation, witness blocks and non-witness blocks should # be different. Verify rpc getblock() returns witness blocks, while # getdata respects the requested type. block = self.build_next_block() self.update_witness_block_with_transactions(block, []) # This gives us a witness commitment. assert(len(block.vtx[0].wit.vtxinwit) == 1) assert(len(block.vtx[0].wit.vtxinwit[0].scriptWitness.stack) == 1) self.test_node.test_witness_block(block, accepted=True) # Now try to retrieve it... rpc_block = self.nodes[0].getblock(block.hash, False) non_wit_block = self.test_node.request_block(block.sha256, 2) wit_block = self.test_node.request_block(block.sha256, 2|MSG_WITNESS_FLAG) assert_equal(wit_block.serialize(True), hex_str_to_bytes(rpc_block)) assert_equal(wit_block.serialize(False), non_wit_block.serialize()) assert_equal(wit_block.serialize(True), block.serialize(True)) # Test size, vsize, weight rpc_details = self.nodes[0].getblock(block.hash, True) assert_equal(rpc_details["size"], len(block.serialize(True))) assert_equal(rpc_details["strippedsize"], len(block.serialize(False))) weight = 3*len(block.serialize(False)) + len(block.serialize(True)) assert_equal(rpc_details["weight"], weight) # Upgraded node should not ask for blocks from unupgraded block4 = self.build_next_block(nVersion=4) block4.solve() self.old_node.getdataset = set() # Blocks can be requested via direct-fetch (immediately upon processing the announcement) # or via parallel download (with an indeterminate delay from processing the announcement) # so to test that a block is NOT requested, we could guess a time period to sleep for, # and then check. We can avoid the sleep() by taking advantage of transaction getdata's # being processed after block getdata's, and announce a transaction as well, # and then check to see if that particular getdata has been received. # Since 0.14, inv's will only be responded to with a getheaders, so send a header # to announce this block. msg = msg_headers() msg.headers = [ CBlockHeader(block4) ] self.old_node.send_message(msg) self.old_node.announce_tx_and_wait_for_getdata(block4.vtx[0]) assert(block4.sha256 not in self.old_node.getdataset) # V0 segwit outputs should be standard after activation, but not before. def test_standardness_v0(self, segwit_activated): self.log.info("Testing standardness of v0 outputs (%s activation)" % ("after" if segwit_activated else "before")) assert(len(self.utxo)) witness_program = CScript([OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) p2sh_pubkey = hash160(witness_program) p2sh_scriptPubKey = CScript([OP_HASH160, p2sh_pubkey, OP_EQUAL]) # First prepare a p2sh output (so that spending it will pass standardness) p2sh_tx = CTransaction() p2sh_tx.vin = [CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")] p2sh_tx.vout = [CTxOut(self.utxo[0].nValue-1000, p2sh_scriptPubKey)] p2sh_tx.rehash() # Mine it on test_node to create the confirmed output. self.test_node.test_transaction_acceptance(p2sh_tx, with_witness=True, accepted=True) self.nodes[0].generate(1) sync_blocks(self.nodes) # Now test standardness of v0 P2WSH outputs. # Start by creating a transaction with two outputs. tx = CTransaction() tx.vin = [CTxIn(COutPoint(p2sh_tx.sha256, 0), CScript([witness_program]))] tx.vout = [CTxOut(p2sh_tx.vout[0].nValue-10000, scriptPubKey)] tx.vout.append(CTxOut(8000, scriptPubKey)) # Might burn this later tx.rehash() self.std_node.test_transaction_acceptance(tx, with_witness=True, accepted=segwit_activated) # Now create something that looks like a P2PKH output. This won't be spendable. scriptPubKey = CScript([OP_0, hash160(witness_hash)]) tx2 = CTransaction() if segwit_activated: # if tx was accepted, then we spend the second output. tx2.vin = [CTxIn(COutPoint(tx.sha256, 1), b"")] tx2.vout = [CTxOut(7000, scriptPubKey)] tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[0].scriptWitness.stack = [witness_program] else: # if tx wasn't accepted, we just re-spend the p2sh output we started with. tx2.vin = [CTxIn(COutPoint(p2sh_tx.sha256, 0), CScript([witness_program]))] tx2.vout = [CTxOut(p2sh_tx.vout[0].nValue-1000, scriptPubKey)] tx2.rehash() self.std_node.test_transaction_acceptance(tx2, with_witness=True, accepted=segwit_activated) # Now update self.utxo for later tests. tx3 = CTransaction() if segwit_activated: # tx and tx2 were both accepted. Don't bother trying to reclaim the # P2PKH output; just send tx's first output back to an anyone-can-spend. sync_mempools([self.nodes[0], self.nodes[1]]) tx3.vin = [CTxIn(COutPoint(tx.sha256, 0), b"")] tx3.vout = [CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))] tx3.wit.vtxinwit.append(CTxInWitness()) tx3.wit.vtxinwit[0].scriptWitness.stack = [witness_program] tx3.rehash() self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=True) else: # tx and tx2 didn't go anywhere; just clean up the p2sh_tx output. tx3.vin = [CTxIn(COutPoint(p2sh_tx.sha256, 0), CScript([witness_program]))] tx3.vout = [CTxOut(p2sh_tx.vout[0].nValue-1000, witness_program)] tx3.rehash() self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=True) self.nodes[0].generate(1) sync_blocks(self.nodes) self.utxo.pop(0) self.utxo.append(UTXO(tx3.sha256, 0, tx3.vout[0].nValue)) assert_equal(len(self.nodes[1].getrawmempool()), 0) # Verify that future segwit upgraded transactions are non-standard, # but valid in blocks. Can run this before and after segwit activation. def test_segwit_versions(self): self.log.info("Testing standardness/consensus for segwit versions (0-16)") assert(len(self.utxo)) NUM_TESTS = 17 # will test OP_0, OP1, ..., OP_16 if (len(self.utxo) < NUM_TESTS): tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) split_value = (self.utxo[0].nValue - 4000) // NUM_TESTS for i in range(NUM_TESTS): tx.vout.append(CTxOut(split_value, CScript([OP_TRUE]))) tx.rehash() block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) self.utxo.pop(0) for i in range(NUM_TESTS): self.utxo.append(UTXO(tx.sha256, i, split_value)) sync_blocks(self.nodes) temp_utxo = [] tx = CTransaction() count = 0 witness_program = CScript([OP_TRUE]) witness_hash = sha256(witness_program) assert_equal(len(self.nodes[1].getrawmempool()), 0) for version in list(range(OP_1, OP_16+1)) + [OP_0]: count += 1 # First try to spend to a future version segwit scriptPubKey. scriptPubKey = CScript([CScriptOp(version), witness_hash]) tx.vin = [CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")] tx.vout = [CTxOut(self.utxo[0].nValue-1000, scriptPubKey)] tx.rehash() self.std_node.test_transaction_acceptance(tx, with_witness=True, accepted=False) self.test_node.test_transaction_acceptance(tx, with_witness=True, accepted=True) self.utxo.pop(0) temp_utxo.append(UTXO(tx.sha256, 0, tx.vout[0].nValue)) self.nodes[0].generate(1) # Mine all the transactions sync_blocks(self.nodes) assert(len(self.nodes[0].getrawmempool()) == 0) # Finally, verify that version 0 -> version 1 transactions # are non-standard scriptPubKey = CScript([CScriptOp(OP_1), witness_hash]) tx2 = CTransaction() tx2.vin = [CTxIn(COutPoint(tx.sha256, 0), b"")] tx2.vout = [CTxOut(tx.vout[0].nValue-1000, scriptPubKey)] tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[0].scriptWitness.stack = [ witness_program ] tx2.rehash() # Gets accepted to test_node, because standardness of outputs isn't # checked with fRequireStandard self.test_node.test_transaction_acceptance(tx2, with_witness=True, accepted=True) self.std_node.test_transaction_acceptance(tx2, with_witness=True, accepted=False) temp_utxo.pop() # last entry in temp_utxo was the output we just spent temp_utxo.append(UTXO(tx2.sha256, 0, tx2.vout[0].nValue)) # Spend everything in temp_utxo back to an OP_TRUE output. tx3 = CTransaction() total_value = 0 for i in temp_utxo: tx3.vin.append(CTxIn(COutPoint(i.sha256, i.n), b"")) tx3.wit.vtxinwit.append(CTxInWitness()) total_value += i.nValue tx3.wit.vtxinwit[-1].scriptWitness.stack = [witness_program] tx3.vout.append(CTxOut(total_value - 1000, CScript([OP_TRUE]))) tx3.rehash() # Spending a higher version witness output is not allowed by policy, # even with fRequireStandard=false. self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=False) self.test_node.sync_with_ping() with mininode_lock: assert(b"reserved for soft-fork upgrades" in self.test_node.last_message["reject"].reason) # Building a block with the transaction must be valid, however. block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx2, tx3]) self.test_node.test_witness_block(block, accepted=True) sync_blocks(self.nodes) # Add utxo to our list self.utxo.append(UTXO(tx3.sha256, 0, tx3.vout[0].nValue)) def test_premature_coinbase_witness_spend(self): self.log.info("Testing premature coinbase witness spend") block = self.build_next_block() # Change the output of the block to be a witness output. witness_program = CScript([OP_TRUE]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) block.vtx[0].vout[0].scriptPubKey = scriptPubKey # This next line will rehash the coinbase and update the merkle # root, and solve. self.update_witness_block_with_transactions(block, []) self.test_node.test_witness_block(block, accepted=True) spend_tx = CTransaction() spend_tx.vin = [CTxIn(COutPoint(block.vtx[0].sha256, 0), b"")] spend_tx.vout = [CTxOut(block.vtx[0].vout[0].nValue, witness_program)] spend_tx.wit.vtxinwit.append(CTxInWitness()) spend_tx.wit.vtxinwit[0].scriptWitness.stack = [ witness_program ] spend_tx.rehash() # Now test a premature spend. self.nodes[0].generate(98) sync_blocks(self.nodes) block2 = self.build_next_block() self.update_witness_block_with_transactions(block2, [spend_tx]) self.test_node.test_witness_block(block2, accepted=False) # Advancing one more block should allow the spend. self.nodes[0].generate(1) block2 = self.build_next_block() self.update_witness_block_with_transactions(block2, [spend_tx]) self.test_node.test_witness_block(block2, accepted=True) sync_blocks(self.nodes) def test_signature_version_1(self): self.log.info("Testing segwit signature hash version 1") key = CECKey() key.set_secretbytes(b"9") pubkey = CPubKey(key.get_pubkey()) witness_program = CScript([pubkey, CScriptOp(OP_CHECKSIG)]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) # First create a witness output for use in the tests. assert(len(self.utxo)) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, scriptPubKey)) tx.rehash() self.test_node.test_transaction_acceptance(tx, with_witness=True, accepted=True) # Mine this transaction in preparation for following tests. block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) sync_blocks(self.nodes) self.utxo.pop(0) # Test each hashtype prev_utxo = UTXO(tx.sha256, 0, tx.vout[0].nValue) for sigflag in [ 0, SIGHASH_ANYONECANPAY ]: for hashtype in [SIGHASH_ALL, SIGHASH_NONE, SIGHASH_SINGLE]: hashtype |= sigflag block = self.build_next_block() tx = CTransaction() tx.vin.append(CTxIn(COutPoint(prev_utxo.sha256, prev_utxo.n), b"")) tx.vout.append(CTxOut(prev_utxo.nValue - 1000, scriptPubKey)) tx.wit.vtxinwit.append(CTxInWitness()) # Too-large input value sign_P2PK_witness_input(witness_program, tx, 0, hashtype, prev_utxo.nValue+1, key) self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=False) # Too-small input value sign_P2PK_witness_input(witness_program, tx, 0, hashtype, prev_utxo.nValue-1, key) block.vtx.pop() # remove last tx self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=False) # Now try correct value sign_P2PK_witness_input(witness_program, tx, 0, hashtype, prev_utxo.nValue, key) block.vtx.pop() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) prev_utxo = UTXO(tx.sha256, 0, tx.vout[0].nValue) # Test combinations of signature hashes. # Split the utxo into a lot of outputs. # Randomly choose up to 10 to spend, sign with different hashtypes, and # output to a random number of outputs. Repeat NUM_TESTS times. # Ensure that we've tested a situation where we use SIGHASH_SINGLE with # an input index > number of outputs. NUM_TESTS = 500 temp_utxos = [] tx = CTransaction() tx.vin.append(CTxIn(COutPoint(prev_utxo.sha256, prev_utxo.n), b"")) split_value = prev_utxo.nValue // NUM_TESTS for i in range(NUM_TESTS): tx.vout.append(CTxOut(split_value, scriptPubKey)) tx.wit.vtxinwit.append(CTxInWitness()) sign_P2PK_witness_input(witness_program, tx, 0, SIGHASH_ALL, prev_utxo.nValue, key) for i in range(NUM_TESTS): temp_utxos.append(UTXO(tx.sha256, i, split_value)) block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) block = self.build_next_block() used_sighash_single_out_of_bounds = False for i in range(NUM_TESTS): # Ping regularly to keep the connection alive if (not i % 100): self.test_node.sync_with_ping() # Choose random number of inputs to use. num_inputs = random.randint(1, 10) # Create a slight bias for producing more utxos num_outputs = random.randint(1, 11) random.shuffle(temp_utxos) assert(len(temp_utxos) > num_inputs) tx = CTransaction() total_value = 0 for i in range(num_inputs): tx.vin.append(CTxIn(COutPoint(temp_utxos[i].sha256, temp_utxos[i].n), b"")) tx.wit.vtxinwit.append(CTxInWitness()) total_value += temp_utxos[i].nValue split_value = total_value // num_outputs for i in range(num_outputs): tx.vout.append(CTxOut(split_value, scriptPubKey)) for i in range(num_inputs): # Now try to sign each input, using a random hashtype. anyonecanpay = 0 if random.randint(0, 1): anyonecanpay = SIGHASH_ANYONECANPAY hashtype = random.randint(1, 3) | anyonecanpay sign_P2PK_witness_input(witness_program, tx, i, hashtype, temp_utxos[i].nValue, key) if (hashtype == SIGHASH_SINGLE and i >= num_outputs): used_sighash_single_out_of_bounds = True tx.rehash() for i in range(num_outputs): temp_utxos.append(UTXO(tx.sha256, i, split_value)) temp_utxos = temp_utxos[num_inputs:] block.vtx.append(tx) # Test the block periodically, if we're close to maxblocksize if (get_virtual_size(block) > MAX_BLOCK_BASE_SIZE - 1000): self.update_witness_block_with_transactions(block, []) self.test_node.test_witness_block(block, accepted=True) block = self.build_next_block() if (not used_sighash_single_out_of_bounds): self.log.info("WARNING: this test run didn't attempt SIGHASH_SINGLE with out-of-bounds index value") # Test the transactions we've added to the block if (len(block.vtx) > 1): self.update_witness_block_with_transactions(block, []) self.test_node.test_witness_block(block, accepted=True) # Now test witness version 0 P2PKH transactions pubkeyhash = hash160(pubkey) scriptPKH = CScript([OP_0, pubkeyhash]) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(temp_utxos[0].sha256, temp_utxos[0].n), b"")) tx.vout.append(CTxOut(temp_utxos[0].nValue, scriptPKH)) tx.wit.vtxinwit.append(CTxInWitness()) sign_P2PK_witness_input(witness_program, tx, 0, SIGHASH_ALL, temp_utxos[0].nValue, key) tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue, CScript([OP_TRUE]))) script = GetP2PKHScript(pubkeyhash) sig_hash = SegwitVersion1SignatureHash(script, tx2, 0, SIGHASH_ALL, tx.vout[0].nValue) signature = key.sign(sig_hash) + b'\x01' # 0x1 is SIGHASH_ALL # Check that we can't have a scriptSig tx2.vin[0].scriptSig = CScript([signature, pubkey]) block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx, tx2]) self.test_node.test_witness_block(block, accepted=False) # Move the signature to the witness. block.vtx.pop() tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[0].scriptWitness.stack = [signature, pubkey] tx2.vin[0].scriptSig = b"" tx2.rehash() self.update_witness_block_with_transactions(block, [tx2]) self.test_node.test_witness_block(block, accepted=True) temp_utxos.pop(0) # Update self.utxos for later tests. Just spend everything in # temp_utxos to a corresponding entry in self.utxos tx = CTransaction() index = 0 for i in temp_utxos: # Just spend to our usual anyone-can-spend output # Use SIGHASH_SINGLE|SIGHASH_ANYONECANPAY so we can build up # the signatures as we go. tx.vin.append(CTxIn(COutPoint(i.sha256, i.n), b"")) tx.vout.append(CTxOut(i.nValue, CScript([OP_TRUE]))) tx.wit.vtxinwit.append(CTxInWitness()) sign_P2PK_witness_input(witness_program, tx, index, SIGHASH_SINGLE|SIGHASH_ANYONECANPAY, i.nValue, key) index += 1 block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) for i in range(len(tx.vout)): self.utxo.append(UTXO(tx.sha256, i, tx.vout[i].nValue)) # Test P2SH wrapped witness programs. def test_p2sh_witness(self, segwit_activated): self.log.info("Testing P2SH witness transactions") assert(len(self.utxo)) # Prepare the p2sh-wrapped witness output witness_program = CScript([OP_DROP, OP_TRUE]) witness_hash = sha256(witness_program) p2wsh_pubkey = CScript([OP_0, witness_hash]) p2sh_witness_hash = hash160(p2wsh_pubkey) scriptPubKey = CScript([OP_HASH160, p2sh_witness_hash, OP_EQUAL]) scriptSig = CScript([p2wsh_pubkey]) # a push of the redeem script # Fund the P2SH output tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) tx.vout.append(CTxOut(self.utxo[0].nValue-1000, scriptPubKey)) tx.rehash() # Verify mempool acceptance and block validity self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True, with_witness=segwit_activated) sync_blocks(self.nodes) # Now test attempts to spend the output. spend_tx = CTransaction() spend_tx.vin.append(CTxIn(COutPoint(tx.sha256, 0), scriptSig)) spend_tx.vout.append(CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))) spend_tx.rehash() # This transaction should not be accepted into the mempool pre- or # post-segwit. Mempool acceptance will use SCRIPT_VERIFY_WITNESS which # will require a witness to spend a witness program regardless of # segwit activation. Note that older planbcoind's that are not # segwit-aware would also reject this for failing CLEANSTACK. self.test_node.test_transaction_acceptance(spend_tx, with_witness=False, accepted=False) # Try to put the witness script in the scriptSig, should also fail. spend_tx.vin[0].scriptSig = CScript([p2wsh_pubkey, b'a']) spend_tx.rehash() self.test_node.test_transaction_acceptance(spend_tx, with_witness=False, accepted=False) # Now put the witness script in the witness, should succeed after # segwit activates. spend_tx.vin[0].scriptSig = scriptSig spend_tx.rehash() spend_tx.wit.vtxinwit.append(CTxInWitness()) spend_tx.wit.vtxinwit[0].scriptWitness.stack = [ b'a', witness_program ] # Verify mempool acceptance self.test_node.test_transaction_acceptance(spend_tx, with_witness=True, accepted=segwit_activated) block = self.build_next_block() self.update_witness_block_with_transactions(block, [spend_tx]) # If we're before activation, then sending this without witnesses # should be valid. If we're after activation, then sending this with # witnesses should be valid. if segwit_activated: self.test_node.test_witness_block(block, accepted=True) else: self.test_node.test_witness_block(block, accepted=True, with_witness=False) # Update self.utxo self.utxo.pop(0) self.utxo.append(UTXO(spend_tx.sha256, 0, spend_tx.vout[0].nValue)) # Test the behavior of starting up a segwit-aware node after the softfork # has activated. As segwit requires different block data than pre-segwit # nodes would have stored, this requires special handling. # To enable this test, pass --oldbinary=<path-to-pre-segwit-planbcoind> to # the test. def test_upgrade_after_activation(self, node_id): self.log.info("Testing software upgrade after softfork activation") assert(node_id != 0) # node0 is assumed to be a segwit-active planbcoind # Make sure the nodes are all up sync_blocks(self.nodes) # Restart with the new binary self.stop_node(node_id) self.nodes[node_id] = self.start_node(node_id, self.options.tmpdir) connect_nodes(self.nodes[0], node_id) sync_blocks(self.nodes) # Make sure that this peer thinks segwit has activated. assert(get_bip9_status(self.nodes[node_id], 'segwit')['status'] == "active") # Make sure this peers blocks match those of node0. height = self.nodes[node_id].getblockcount() while height >= 0: block_hash = self.nodes[node_id].getblockhash(height) assert_equal(block_hash, self.nodes[0].getblockhash(height)) assert_equal(self.nodes[0].getblock(block_hash), self.nodes[node_id].getblock(block_hash)) height -= 1 def test_witness_sigops(self): '''Ensure sigop counting is correct inside witnesses.''' self.log.info("Testing sigops limit") assert(len(self.utxo)) # Keep this under MAX_OPS_PER_SCRIPT (201) witness_program = CScript([OP_TRUE, OP_IF, OP_TRUE, OP_ELSE] + [OP_CHECKMULTISIG]*5 + [OP_CHECKSIG]*193 + [OP_ENDIF]) witness_hash = sha256(witness_program) scriptPubKey = CScript([OP_0, witness_hash]) sigops_per_script = 20*5 + 193*1 # We'll produce 2 extra outputs, one with a program that would take us # over max sig ops, and one with a program that would exactly reach max # sig ops outputs = (MAX_SIGOP_COST // sigops_per_script) + 2 extra_sigops_available = MAX_SIGOP_COST % sigops_per_script # We chose the number of checkmultisigs/checksigs to make this work: assert(extra_sigops_available < 100) # steer clear of MAX_OPS_PER_SCRIPT # This script, when spent with the first # N(=MAX_SIGOP_COST//sigops_per_script) outputs of our transaction, # would push us just over the block sigop limit. witness_program_toomany = CScript([OP_TRUE, OP_IF, OP_TRUE, OP_ELSE] + [OP_CHECKSIG]*(extra_sigops_available + 1) + [OP_ENDIF]) witness_hash_toomany = sha256(witness_program_toomany) scriptPubKey_toomany = CScript([OP_0, witness_hash_toomany]) # If we spend this script instead, we would exactly reach our sigop # limit (for witness sigops). witness_program_justright = CScript([OP_TRUE, OP_IF, OP_TRUE, OP_ELSE] + [OP_CHECKSIG]*(extra_sigops_available) + [OP_ENDIF]) witness_hash_justright = sha256(witness_program_justright) scriptPubKey_justright = CScript([OP_0, witness_hash_justright]) # First split our available utxo into a bunch of outputs split_value = self.utxo[0].nValue // outputs tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) for i in range(outputs): tx.vout.append(CTxOut(split_value, scriptPubKey)) tx.vout[-2].scriptPubKey = scriptPubKey_toomany tx.vout[-1].scriptPubKey = scriptPubKey_justright tx.rehash() block_1 = self.build_next_block() self.update_witness_block_with_transactions(block_1, [tx]) self.test_node.test_witness_block(block_1, accepted=True) tx2 = CTransaction() # If we try to spend the first n-1 outputs from tx, that should be # too many sigops. total_value = 0 for i in range(outputs-1): tx2.vin.append(CTxIn(COutPoint(tx.sha256, i), b"")) tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[-1].scriptWitness.stack = [ witness_program ] total_value += tx.vout[i].nValue tx2.wit.vtxinwit[-1].scriptWitness.stack = [ witness_program_toomany ] tx2.vout.append(CTxOut(total_value, CScript([OP_TRUE]))) tx2.rehash() block_2 = self.build_next_block() self.update_witness_block_with_transactions(block_2, [tx2]) self.test_node.test_witness_block(block_2, accepted=False) # Try dropping the last input in tx2, and add an output that has # too many sigops (contributing to legacy sigop count). checksig_count = (extra_sigops_available // 4) + 1 scriptPubKey_checksigs = CScript([OP_CHECKSIG]*checksig_count) tx2.vout.append(CTxOut(0, scriptPubKey_checksigs)) tx2.vin.pop() tx2.wit.vtxinwit.pop() tx2.vout[0].nValue -= tx.vout[-2].nValue tx2.rehash() block_3 = self.build_next_block() self.update_witness_block_with_transactions(block_3, [tx2]) self.test_node.test_witness_block(block_3, accepted=False) # If we drop the last checksig in this output, the tx should succeed. block_4 = self.build_next_block() tx2.vout[-1].scriptPubKey = CScript([OP_CHECKSIG]*(checksig_count-1)) tx2.rehash() self.update_witness_block_with_transactions(block_4, [tx2]) self.test_node.test_witness_block(block_4, accepted=True) # Reset the tip back down for the next test sync_blocks(self.nodes) for x in self.nodes: x.invalidateblock(block_4.hash) # Try replacing the last input of tx2 to be spending the last # output of tx block_5 = self.build_next_block() tx2.vout.pop() tx2.vin.append(CTxIn(COutPoint(tx.sha256, outputs-1), b"")) tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[-1].scriptWitness.stack = [ witness_program_justright ] tx2.rehash() self.update_witness_block_with_transactions(block_5, [tx2]) self.test_node.test_witness_block(block_5, accepted=True) # TODO: test p2sh sigop counting def test_getblocktemplate_before_lockin(self): self.log.info("Testing getblocktemplate setting of segwit versionbit (before lockin)") # Node0 is segwit aware, node2 is not. for node in [self.nodes[0], self.nodes[2]]: gbt_results = node.getblocktemplate() block_version = gbt_results['version'] # If we're not indicating segwit support, we will still be # signalling for segwit activation. assert_equal((block_version & (1 << VB_WITNESS_BIT) != 0), node == self.nodes[0]) # If we don't specify the segwit rule, then we won't get a default # commitment. assert('default_witness_commitment' not in gbt_results) # Workaround: # Can either change the tip, or change the mempool and wait 5 seconds # to trigger a recomputation of getblocktemplate. txid = int(self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1), 16) # Using mocktime lets us avoid sleep() sync_mempools(self.nodes) self.nodes[0].setmocktime(int(time.time())+10) self.nodes[2].setmocktime(int(time.time())+10) for node in [self.nodes[0], self.nodes[2]]: gbt_results = node.getblocktemplate({"rules" : ["segwit"]}) block_version = gbt_results['version'] if node == self.nodes[2]: # If this is a non-segwit node, we should still not get a witness # commitment, nor a version bit signalling segwit. assert_equal(block_version & (1 << VB_WITNESS_BIT), 0) assert('default_witness_commitment' not in gbt_results) else: # For segwit-aware nodes, check the version bit and the witness # commitment are correct. assert(block_version & (1 << VB_WITNESS_BIT) != 0) assert('default_witness_commitment' in gbt_results) witness_commitment = gbt_results['default_witness_commitment'] # Check that default_witness_commitment is present. witness_root = CBlock.get_merkle_root([ser_uint256(0), ser_uint256(txid)]) script = get_witness_script(witness_root, 0) assert_equal(witness_commitment, bytes_to_hex_str(script)) # undo mocktime self.nodes[0].setmocktime(0) self.nodes[2].setmocktime(0) # Uncompressed pubkeys are no longer supported in default relay policy, # but (for now) are still valid in blocks. def test_uncompressed_pubkey(self): self.log.info("Testing uncompressed pubkeys") # Segwit transactions using uncompressed pubkeys are not accepted # under default policy, but should still pass consensus. key = CECKey() key.set_secretbytes(b"9") key.set_compressed(False) pubkey = CPubKey(key.get_pubkey()) assert_equal(len(pubkey), 65) # This should be an uncompressed pubkey assert(len(self.utxo) > 0) utxo = self.utxo.pop(0) # Test 1: P2WPKH # First create a P2WPKH output that uses an uncompressed pubkey pubkeyhash = hash160(pubkey) scriptPKH = CScript([OP_0, pubkeyhash]) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(utxo.sha256, utxo.n), b"")) tx.vout.append(CTxOut(utxo.nValue-1000, scriptPKH)) tx.rehash() # Confirm it in a block. block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx]) self.test_node.test_witness_block(block, accepted=True) # Now try to spend it. Send it to a P2WSH output, which we'll # use in the next test. witness_program = CScript([pubkey, CScriptOp(OP_CHECKSIG)]) witness_hash = sha256(witness_program) scriptWSH = CScript([OP_0, witness_hash]) tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, scriptWSH)) script = GetP2PKHScript(pubkeyhash) sig_hash = SegwitVersion1SignatureHash(script, tx2, 0, SIGHASH_ALL, tx.vout[0].nValue) signature = key.sign(sig_hash) + b'\x01' # 0x1 is SIGHASH_ALL tx2.wit.vtxinwit.append(CTxInWitness()) tx2.wit.vtxinwit[0].scriptWitness.stack = [ signature, pubkey ] tx2.rehash() # Should fail policy test. self.test_node.test_transaction_acceptance(tx2, True, False, b'non-mandatory-script-verify-flag (Using non-compressed keys in segwit)') # But passes consensus. block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx2]) self.test_node.test_witness_block(block, accepted=True) # Test 2: P2WSH # Try to spend the P2WSH output created in last test. # Send it to a P2SH(P2WSH) output, which we'll use in the next test. p2sh_witness_hash = hash160(scriptWSH) scriptP2SH = CScript([OP_HASH160, p2sh_witness_hash, OP_EQUAL]) scriptSig = CScript([scriptWSH]) tx3 = CTransaction() tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), b"")) tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, scriptP2SH)) tx3.wit.vtxinwit.append(CTxInWitness()) sign_P2PK_witness_input(witness_program, tx3, 0, SIGHASH_ALL, tx2.vout[0].nValue, key) # Should fail policy test. self.test_node.test_transaction_acceptance(tx3, True, False, b'non-mandatory-script-verify-flag (Using non-compressed keys in segwit)') # But passes consensus. block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx3]) self.test_node.test_witness_block(block, accepted=True) # Test 3: P2SH(P2WSH) # Try to spend the P2SH output created in the last test. # Send it to a P2PKH output, which we'll use in the next test. scriptPubKey = GetP2PKHScript(pubkeyhash) tx4 = CTransaction() tx4.vin.append(CTxIn(COutPoint(tx3.sha256, 0), scriptSig)) tx4.vout.append(CTxOut(tx3.vout[0].nValue-1000, scriptPubKey)) tx4.wit.vtxinwit.append(CTxInWitness()) sign_P2PK_witness_input(witness_program, tx4, 0, SIGHASH_ALL, tx3.vout[0].nValue, key) # Should fail policy test. self.test_node.test_transaction_acceptance(tx4, True, False, b'non-mandatory-script-verify-flag (Using non-compressed keys in segwit)') block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx4]) self.test_node.test_witness_block(block, accepted=True) # Test 4: Uncompressed pubkeys should still be valid in non-segwit # transactions. tx5 = CTransaction() tx5.vin.append(CTxIn(COutPoint(tx4.sha256, 0), b"")) tx5.vout.append(CTxOut(tx4.vout[0].nValue-1000, CScript([OP_TRUE]))) (sig_hash, err) = SignatureHash(scriptPubKey, tx5, 0, SIGHASH_ALL) signature = key.sign(sig_hash) + b'\x01' # 0x1 is SIGHASH_ALL tx5.vin[0].scriptSig = CScript([signature, pubkey]) tx5.rehash() # Should pass policy and consensus. self.test_node.test_transaction_acceptance(tx5, True, True) block = self.build_next_block() self.update_witness_block_with_transactions(block, [tx5]) self.test_node.test_witness_block(block, accepted=True) self.utxo.append(UTXO(tx5.sha256, 0, tx5.vout[0].nValue)) def test_non_standard_witness(self): self.log.info("Testing detection of non-standard P2WSH witness") pad = chr(1).encode('latin-1') # Create scripts for tests scripts = [] scripts.append(CScript([OP_DROP] * 100)) scripts.append(CScript([OP_DROP] * 99)) scripts.append(CScript([pad * 59] * 59 + [OP_DROP] * 60)) scripts.append(CScript([pad * 59] * 59 + [OP_DROP] * 61)) p2wsh_scripts = [] assert(len(self.utxo)) tx = CTransaction() tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) # For each script, generate a pair of P2WSH and P2SH-P2WSH output. outputvalue = (self.utxo[0].nValue - 1000) // (len(scripts) * 2) for i in scripts: p2wsh = CScript([OP_0, sha256(i)]) p2sh = hash160(p2wsh) p2wsh_scripts.append(p2wsh) tx.vout.append(CTxOut(outputvalue, p2wsh)) tx.vout.append(CTxOut(outputvalue, CScript([OP_HASH160, p2sh, OP_EQUAL]))) tx.rehash() txid = tx.sha256 self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) self.nodes[0].generate(1) sync_blocks(self.nodes) # Creating transactions for tests p2wsh_txs = [] p2sh_txs = [] for i in range(len(scripts)): p2wsh_tx = CTransaction() p2wsh_tx.vin.append(CTxIn(COutPoint(txid,i*2))) p2wsh_tx.vout.append(CTxOut(outputvalue - 5000, CScript([OP_0, hash160(hex_str_to_bytes(""))]))) p2wsh_tx.wit.vtxinwit.append(CTxInWitness()) p2wsh_tx.rehash() p2wsh_txs.append(p2wsh_tx) p2sh_tx = CTransaction() p2sh_tx.vin.append(CTxIn(COutPoint(txid,i*2+1), CScript([p2wsh_scripts[i]]))) p2sh_tx.vout.append(CTxOut(outputvalue - 5000, CScript([OP_0, hash160(hex_str_to_bytes(""))]))) p2sh_tx.wit.vtxinwit.append(CTxInWitness()) p2sh_tx.rehash() p2sh_txs.append(p2sh_tx) # Testing native P2WSH # Witness stack size, excluding witnessScript, over 100 is non-standard p2wsh_txs[0].wit.vtxinwit[0].scriptWitness.stack = [pad] * 101 + [scripts[0]] self.std_node.test_transaction_acceptance(p2wsh_txs[0], True, False, b'bad-witness-nonstandard') # Non-standard nodes should accept self.test_node.test_transaction_acceptance(p2wsh_txs[0], True, True) # Stack element size over 80 bytes is non-standard p2wsh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 81] * 100 + [scripts[1]] self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, False, b'bad-witness-nonstandard') # Non-standard nodes should accept self.test_node.test_transaction_acceptance(p2wsh_txs[1], True, True) # Standard nodes should accept if element size is not over 80 bytes p2wsh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 80] * 100 + [scripts[1]] self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, True) # witnessScript size at 3600 bytes is standard p2wsh_txs[2].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, scripts[2]] self.test_node.test_transaction_acceptance(p2wsh_txs[2], True, True) self.std_node.test_transaction_acceptance(p2wsh_txs[2], True, True) # witnessScript size at 3601 bytes is non-standard p2wsh_txs[3].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, pad, scripts[3]] self.std_node.test_transaction_acceptance(p2wsh_txs[3], True, False, b'bad-witness-nonstandard') # Non-standard nodes should accept self.test_node.test_transaction_acceptance(p2wsh_txs[3], True, True) # Repeating the same tests with P2SH-P2WSH p2sh_txs[0].wit.vtxinwit[0].scriptWitness.stack = [pad] * 101 + [scripts[0]] self.std_node.test_transaction_acceptance(p2sh_txs[0], True, False, b'bad-witness-nonstandard') self.test_node.test_transaction_acceptance(p2sh_txs[0], True, True) p2sh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 81] * 100 + [scripts[1]] self.std_node.test_transaction_acceptance(p2sh_txs[1], True, False, b'bad-witness-nonstandard') self.test_node.test_transaction_acceptance(p2sh_txs[1], True, True) p2sh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 80] * 100 + [scripts[1]] self.std_node.test_transaction_acceptance(p2sh_txs[1], True, True) p2sh_txs[2].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, scripts[2]] self.test_node.test_transaction_acceptance(p2sh_txs[2], True, True) self.std_node.test_transaction_acceptance(p2sh_txs[2], True, True) p2sh_txs[3].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, pad, scripts[3]] self.std_node.test_transaction_acceptance(p2sh_txs[3], True, False, b'bad-witness-nonstandard') self.test_node.test_transaction_acceptance(p2sh_txs[3], True, True) self.nodes[0].generate(1) # Mine and clean up the mempool of non-standard node # Valid but non-standard transactions in a block should be accepted by standard node sync_blocks(self.nodes) assert_equal(len(self.nodes[0].getrawmempool()), 0) assert_equal(len(self.nodes[1].getrawmempool()), 0) self.utxo.pop(0) def run_test(self): # Setup the p2p connections and start up the network thread. self.test_node = TestNode() # sets NODE_WITNESS|NODE_NETWORK self.old_node = TestNode() # only NODE_NETWORK self.std_node = TestNode() # for testing node1 (fRequireStandard=true) self.p2p_connections = [self.test_node, self.old_node] self.connections = [] self.connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.test_node, services=NODE_NETWORK|NODE_WITNESS)) self.connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.old_node, services=NODE_NETWORK)) self.connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], self.std_node, services=NODE_NETWORK|NODE_WITNESS)) self.test_node.add_connection(self.connections[0]) self.old_node.add_connection(self.connections[1]) self.std_node.add_connection(self.connections[2]) NetworkThread().start() # Start up network handling in another thread # Keep a place to store utxo's that can be used in later tests self.utxo = [] # Test logic begins here self.test_node.wait_for_verack() self.log.info("Starting tests before segwit lock in:") self.test_witness_services() # Verifies NODE_WITNESS self.test_non_witness_transaction() # non-witness tx's are accepted self.test_unnecessary_witness_before_segwit_activation() self.test_block_relay(segwit_activated=False) # Advance to segwit being 'started' self.advance_to_segwit_started() sync_blocks(self.nodes) self.test_getblocktemplate_before_lockin() sync_blocks(self.nodes) # At lockin, nothing should change. self.log.info("Testing behavior post lockin, pre-activation") self.advance_to_segwit_lockin() # Retest unnecessary witnesses self.test_unnecessary_witness_before_segwit_activation() self.test_witness_tx_relay_before_segwit_activation() self.test_block_relay(segwit_activated=False) self.test_p2sh_witness(segwit_activated=False) self.test_standardness_v0(segwit_activated=False) sync_blocks(self.nodes) # Now activate segwit self.log.info("Testing behavior after segwit activation") self.advance_to_segwit_active() sync_blocks(self.nodes) # Test P2SH witness handling again self.test_p2sh_witness(segwit_activated=True) self.test_witness_commitments() self.test_block_malleability() self.test_witness_block_size() self.test_submit_block() self.test_extra_witness_data() self.test_max_witness_push_length() self.test_max_witness_program_length() self.test_witness_input_length() self.test_block_relay(segwit_activated=True) self.test_tx_relay_after_segwit_activation() self.test_standardness_v0(segwit_activated=True) self.test_segwit_versions() self.test_premature_coinbase_witness_spend() self.test_uncompressed_pubkey() self.test_signature_version_1() self.test_non_standard_witness() sync_blocks(self.nodes) self.test_upgrade_after_activation(node_id=2) self.test_witness_sigops() if __name__ == '__main__': SegWitTest().main()
planbcoin/planbcoin
test/functional/p2p-segwit.py
Python
mit
90,174
"Levantando su mano gritó herejes"
deltaworld/create-your-own-adventure
espanol/templo/manos/manoArriba.md
Markdown
mit
35
--- layout: post date: 2017-01-06 title: "Antonio Riva CS_158" category: Antonio Riva tags: [Antonio Riva] --- ### Antonio Riva CS_158 Just **$329.99** ### <a href="https://www.readybrides.com/en/antonio-riva/6059-antonio-riva-cs158.html"><img src="//img.readybrides.com/13116/antonio-riva-cs158.jpg" alt="Antonio Riva CS_158" style="width:100%;" /></a> <!-- break --> Buy it: [https://www.readybrides.com/en/antonio-riva/6059-antonio-riva-cs158.html](https://www.readybrides.com/en/antonio-riva/6059-antonio-riva-cs158.html)
HOLEIN/HOLEIN.github.io
_posts/2017-01-06-Antonio-Riva-CS158.md
Markdown
mit
529
' ' News Articles for DotNetNuke - http://www.dotnetnuke.com ' Copyright (c) 2002-2007 ' by Ventrian ( sales@ventrian.com ) ( http://www.ventrian.com ) ' Imports System Imports System.Configuration Imports System.Data Imports DotNetNuke.Common.Utilities Namespace Ventrian.NewsArticles.Components.Types Public Enum TextEditorModeType Basic Rich End Enum End Namespace
ventrian/News-Articles
Components/Types/TextEditorModeType.vb
Visual Basic
mit
422
<?php /* * 2007-2013 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class OrderFollowControllerCore extends FrontController { public $auth = true; public $php_self = 'order-follow'; public $authRedirection = 'order-follow'; public $ssl = true; /** * Start forms process * @see FrontController::postProcess() */ public function postProcess() { if (Tools::isSubmit('submitReturnMerchandise')) { $customizationQtyInput = Tools::getValue('customization_qty_input'); if (!$id_order = (int)(Tools::getValue('id_order'))) Tools::redirect('index.php?controller=history'); if (!$order_qte_input = Tools::getValue('order_qte_input')) Tools::redirect('index.php?controller=order-follow&errorDetail1'); if (!$customizationQtyInput && $customizationIds = Tools::getValue('customization_ids')) Tools::redirect('index.php?controller=order-follow&errorDetail1'); if (!$customizationIds && !$ids_order_detail = Tools::getValue('ids_order_detail')) Tools::redirect('index.php?controller=order-follow&errorDetail2'); $order = new Order((int)($id_order)); if (!$order->isReturnable()) Tools::redirect('index.php?controller=order-follow&errorNotReturnable'); if ($order->id_customer != $this->context->customer->id) die(Tools::displayError()); $orderReturn = new OrderReturn(); $orderReturn->id_customer = (int)$this->context->customer->id; $orderReturn->id_order = $id_order; $orderReturn->question = strval(Tools::getValue('returnText')); if (empty($orderReturn->question)) Tools::redirect('index.php?controller=order-follow&errorMsg&'. http_build_query(array( 'ids_order_detail' => $ids_order_detail, 'order_qte_input' => $order_qte_input, 'id_order' => Tools::getValue('id_order'), ))); if (!$orderReturn->checkEnoughProduct($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput)) Tools::redirect('index.php?controller=order-follow&errorQuantity'); $orderReturn->state = 1; $orderReturn->add(); $orderReturn->addReturnDetail($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput); Hook::exec('actionOrderReturn', array('orderReturn' => $orderReturn)); Tools::redirect('index.php?controller=order-follow'); } } /** * Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { parent::initContent(); $ordersReturn = OrderReturn::getOrdersReturn($this->context->customer->id); if (Tools::isSubmit('errorQuantity')) $this->context->smarty->assign('errorQuantity', true); elseif (Tools::isSubmit('errorMsg')) $this->context->smarty->assign( array( 'errorMsg' => true, 'ids_order_detail' => Tools::getValue('ids_order_detail', array()), 'order_qte_input' => Tools::getValue('order_qte_input', array()), 'id_order' => Tools::getValue('id_order'), ) ); elseif (Tools::isSubmit('errorDetail1')) $this->context->smarty->assign('errorDetail1', true); elseif (Tools::isSubmit('errorDetail2')) $this->context->smarty->assign('errorDetail2', true); elseif (Tools::isSubmit('errorNotReturnable')) $this->context->smarty->assign('errorNotReturnable', true); $this->context->smarty->assign('ordersReturn', $ordersReturn); $this->setTemplate(_PS_THEME_DIR_.'order-follow.tpl'); } public function setMedia() { parent::setMedia(); $this->addCSS(array(_THEME_CSS_DIR_.'history.css', _THEME_CSS_DIR_.'addresses.css')); $this->addJqueryPlugin('scrollTo'); $this->addJS(array(_THEME_JS_DIR_.'history.js', _THEME_JS_DIR_.'tools.js')); } }
rafaeljuzo/makeuptown
site/controllers/front/OrderFollowController.php
PHP
mit
4,661
Rails.application.routes.draw do post '/sign-up' => 'users#signup' post '/sign-in' => 'users#signin' delete '/sign-out/:id' => 'users#signout' patch '/change-password/:id' => 'users#changepw' resources :users, only: [:index, :show] end
ga-wdi-boston/rails-validations-constraints
config/routes.rb
Ruby
mit
246
import { PipeTransform, Pipe } from '@angular/core'; import { IProduct } from './product' @Pipe({ name: 'productFilter' }) export class ProductFilterPipe implements PipeTransform { transform(value: IProduct[], filterBy: string): IProduct[] { filterBy = filterBy ? filterBy.toLocaleLowerCase() : null; return filterBy ? value.filter((product: IProduct) => product.productName.toLocaleLowerCase().indexOf(filterBy) !== -1) : value; } }
sebastienmuller/Angular2-GettingStarted
APM - Start/app/products/product-filter.pipe.ts
TypeScript
mit
476
#!/usr/bin/perl use strict; use warnings; use diagnostics; # This works for IMGUI 1.50 WIP and does not get all functions # # to use ./generate_imgui_bindings.pl <imgui.h >imgui_iterator.cpp # and define macros properly as in example imgui_lua_bindings.cpp # # check imgui_iterator for explanations of why some functions are not supported yet my %bannedNames = ( "GetColorU32" => "banned", "NewFrame" => "banned", "Shutdown" => "banned", ); #define bannedNames with keys of functions to exclude them # EXAMPLE: #my %bannedNames = ( # "NewFrame" => "banned", # "Render" => "banned", # "Shutdown" => "banned" ); # This is only useful for ENABLE_IM_LUA_END_STACK # We hold a list of differnet 'things' that can be pushed to the stack # i.e. Group for BeginGroup # It usually works like this BeginBlah EndBlah # We have to redefine stuff when it doesn't work so cleanly my %beginN = ( "TreeNode" => "Tree", "TreePush" => "Tree" ); my %changeN = ( "Tree" => "TreePop" ); my %endN = ( "TreePop" => "Tree" ); my %endOverride = ( "PopupModal" => "Popup", "PopupContextItem" => "Popup", "PopupContextWindow" => "Popup", "PopupContextVoid" => "Popup" ); my $numSupported = 0; my $numUnsupported = 0; my $line; my %funcNames; my %endTypeToInt; my @endTypes; while ($line = <STDIN>) { #replace ImVec2(x, y) with ImVec2 x, y so it's easier for regex $line =~ s/ImVec2\(([^,]*),([^\)]*)\)/ImVec2 $1 $2/g; $line =~ s/ImVec4\(([^,]*),([^,]*),([^,]*),([^\)]*)\)/ImVec4 $1 $2 $3 $4/g; #delete this so it's eaiser for regexes $line =~ s/\s+IM_FMTARGS\(.\);/;/g; $line =~ s/\s+IM_FMTLIST\(.\);/;/g; if ($line =~ m/ *IMGUI_API *(const char*\*|[^ ]+) *([^\(]+)\(([^\;]*)\);/) { print "//" . $line; # this will be set to 0 if something is not supported yet my $shouldPrint = 1; my @args = split(',', $3); # things to do before calling real c++ function my @before; # arguments to real c++ function my @funcArgs; # things to do after callign real c++ function my @after; # real c++ function name my $funcName = $2; if (defined($bannedNames{$funcName})) { print "//Not allowed to use this function\n"; $shouldPrint = 0; } # c++ type of return value my $retLine = $1; my $retType; # macro used for calling function my $callMacro; # if it has a return value (yes I know this is not the cleanest code) my $hasRet = 1; if ($retLine =~ /^void$/) { $callMacro = "CALL_FUNCTION_NO_RET"; $hasRet = 0; } elsif ($retLine =~ /^bool$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "bool"); push(@after, "PUSH_BOOL(ret)"); } elsif ($retLine =~ /^float$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "float"); push(@after, "PUSH_NUMBER(ret)"); } elsif ($retLine =~ /^ImVec2$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "ImVec2"); push(@after, "PUSH_NUMBER(ret.x)"); push(@after, "PUSH_NUMBER(ret.y)"); } elsif ($retLine =~ /^ImVec4$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "ImVec4"); push(@after, "PUSH_NUMBER(ret.x)"); push(@after, "PUSH_NUMBER(ret.y)"); push(@after, "PUSH_NUMBER(ret.z)"); push(@after, "PUSH_NUMBER(ret.w)"); } elsif ($retLine =~ /^(unsigned int|ImGuiID|ImU32)$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "unsigned int"); push(@after, "PUSH_NUMBER(ret)"); } elsif ($retLine =~ /^(ImGuiMouseCursor)$/) { # Enums $callMacro = "CALL_FUNCTION"; push(@funcArgs, "int"); push(@after, "PUSH_NUMBER(ret)"); } elsif ($retLine =~ /^int$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "int"); push(@after, "PUSH_NUMBER(ret)"); } elsif ($retLine =~ /^const char*\*$/) { $callMacro = "CALL_FUNCTION"; push(@funcArgs, "const char*"); push(@after, "PUSH_STRING(ret)"); } else { print "// Unsupported return type $1\n"; $shouldPrint = 0; } for (my $i = 0; $i < @args; $i++) { # bool * x = NULL or bool * x if ($args[$i] =~ m/^ *bool *\* *([^ =\[]*)( = NULL|) *$/) { my $name = $1; if ($2 =~ m/^ = NULL$/) { push(@before, "OPTIONAL_BOOL_POINTER_ARG($name)"); } else { push(@before, "BOOL_POINTER_ARG($name)"); } push(@funcArgs, $name); push(@after, "END_BOOL_POINTER($name)"); # float * x } elsif ($args[$i] =~ m/^ *float *\* *([^ =\[]*)$/) { my $name = $1; push(@before, "FLOAT_POINTER_ARG($name)"); push(@funcArgs, $name); push(@after, "END_FLOAT_POINTER($name)"); # const float * x } elsif ($args[$i] =~ m/^ *const float *\* *([^ =\[]*)$/) { my $name = $1; push(@before, "FLOAT_ARRAY_ARG($name)"); push(@funcArgs, $name); #float a or float a = number } elsif ($args[$i] =~ m/^ *float *([^ =\[]*)( *= *[^ ]*|)$/) { my $name = $1; if ($2 =~ m/^ *= *([^ ]*)$/) { push(@before, "OPTIONAL_NUMBER_ARG($name, $1)"); } else { push(@before, "NUMBER_ARG($name)"); } push(@funcArgs, $name); # const char* a or const char* a = NULL or "blah" } elsif ($args[$i] =~ m/^ *const char\* *([^ =\[]*)( *= *(NULL|".*")|) *$/) { my $name = $1; if ($2 =~ m/^ *= *(NULL|".*") *$/) { push(@before, "OPTIONAL_LABEL_ARG($name, $1)"); } else { push(@before, "LABEL_ARG($name)"); } push(@funcArgs, $name); # char * } elsif ($args[$i] =~ m/^ *char *\* *([^ =\[]*)$/) { my $name = $1; push(@before, "LABEL_POINTER_ARG($name)"); push(@funcArgs, $name); push(@funcArgs, "buf_size"); push(@after, "END_LABEL_POINTER($name)"); # skip next argument $i = $i + 1; # const char** a } elsif ($args[$i] =~ m/^ *const char\*\* *([^ =\[]*) *$/ or $args[$i] =~ m/^ *const char\* const\* *([^ =\[]*) *$/ or $args[$i] =~ m/^ *const char\* const *([^ =\[]*)\[\] *$/) { my $name = $1; push(@before, "LABEL_ARRAY_ARG($name)"); push(@funcArgs, $name); #const ImVec2& size with or without default value of ImVec(0,0) } elsif ($args[$i] =~ m/^ *(const)? ImVec2&? ([^ ]*) *(= * ImVec2 .* .*|) *$/) { my $name = $2; if ($3 =~ m/^= * ImVec2 (.*) (.*)$/) { push(@before, "OPTIONAL_IM_VEC_2_ARG($name, $1, $2)"); } else { push(@before, "IM_VEC_2_ARG($name)"); } push(@funcArgs, $name); #const ImVec4& size with or without default value of ImVec(0,0) } elsif ($args[$i] =~ m/^ *const ImVec4& ([^ ]*) *(= * ImVec4 .* .* .* .*|) *$/) { my $name = $1; if ($2 =~ m/^= * ImVec4 (.*) (.*) (.*) (.*)$/) { push(@before, "OPTIONAL_IM_VEC_4_ARG($name, $1, $2, $3, $4)"); } else { push(@before, "IM_VEC_4_ARG($name)"); } push(@funcArgs, $name); # one of the various enums # we are handling these as ints } elsif ($args[$i] =~ m/^ *(ImGuiWindowFlags|ImGuiCol|ImGuiStyleVar|ImGuiKey|ImGuiAlign|ImGuiColorEditMode|ImGuiMouseCursor|ImGuiSetCond|ImGuiInputTextFlags|ImGuiSelectableFlags|ImGuiTreeNodeFlags|ImGuiComboFlags|ImGuiFocusedFlags|ImGuiHoveredFlags|ImGuiDragDropFlags|ImGuiColorEditFlags|ImGuiCond|ImGuiStyle) ([^ ]*)( = 0|) *$/) { #These are ints my $name = $2; if ($3 =~ m/^ = 0$/) { push(@before, "OPTIONAL_ENUM_ARG($name, 0)"); } else { push(@before, "ENUM_ARG($name)"); } push(@funcArgs, $name); #int with default value or not } elsif ($args[$i] =~ m/^ *int ([^ =\[]*)( = [^ ]*|) *$/) { my $name = $1; if ($2 =~ m/^ = ([^ ]*)$/) { push(@before, "OPTIONAL_INT_ARG($name, $1)"); } else { push(@before, "INT_ARG($name)"); } push(@funcArgs, $name); #unsigned int with default value or not } elsif ($args[$i] =~ m/^ *(unsigned +int|ImGuiID|ImU32) ([^ =\[]*)( = [^ ]*|) *$/) { my $name = $2; if ($2 =~ m/^ = ([^ ]*)$/) { push(@before, "OPTIONAL_UINT_ARG($name, $1)"); } else { push(@before, "UINT_ARG($name)"); } push(@funcArgs, $name); # bool with default value or not } elsif ($args[$i] =~ m/^ *bool ([^ =\[]*)( *= *true| *= *false|) *$/) { my $name = $1; if ($2 =~ m/^ *= *([^ ]*)$/) { push(@before, "OPTIONAL_BOOL_ARG($name, $1)"); } else { push(@before, "BOOL_ARG($name)"); } push(@funcArgs, $name); # int * x } elsif ($args[$i] =~ m/^ *int *\* *([^ =\[]*)$/) { my $name = $1; if ($name eq "current_item") { push(@before, "INT_CURRENT_ITEM_POINTER_ARG($name)"); push(@funcArgs, $name); push(@after, "END_INT_CURRENT_ITEM_POINTER($name)"); } else { push(@before, "INT_POINTER_ARG($name)"); push(@funcArgs, $name); push(@after, "END_INT_POINTER($name)"); } # unsigned int * x } elsif ($args[$i] =~ m/^ *unsigned +int *\* *([^ =\[]*)$/) { my $name = $1; push(@before, "UINT_POINTER_ARG($name)"); push(@funcArgs, $name); push(@after, "END_UINT_POINTER($name)"); # float x[] } elsif ($args[$i] =~ m/^ *float *([^ =\[]*)\[(.)\]$/) { my $name = $1; push(@before, "FLOAT_ARRAY$2_ARG($name)"); push(@funcArgs, $name); push(@after, "END_FLOAT_ARRAY$2($name)"); # int x[] } elsif ($args[$i] =~ m/^ *int *([^ =\[]*)\[(.)\]$/) { my $name = $1; push(@before, "INT_ARRAY$2_ARG($name)"); push(@funcArgs, $name); push(@after, "END_INT_ARRAY$2($name)"); # ImTextureID } elsif ($args[$i] =~ m/^ *ImTextureID ([^ =\[]*) *$/) { my $name = $1; push(@before, "TEXTURE_ARG($name)"); push(@funcArgs, $name); } elsif ($args[$i] =~ m/^ *(.*) (.*) = (.*)$/) { my $type = $1; my $name = $2; my $value = $3; push(@before, "DEFAULT_ARG($type, $name, $value)"); push(@funcArgs, $name); } elsif ($args[$i] =~ m/^ *int *\* *([^ =\[]*)$/) { # we don't support variadic functions yet but we let you use it without extra variables } elsif ($args[$i] =~ m/^ *\.\.\. *$/) { print "// Variadic functions aren't suppported but here it is anyway\n"; } else { print "// Unsupported arg type " . $args[$i] . "\n"; $shouldPrint = 0; } } if ($retLine =~ /^bool$/) { push(@after, "PUSH_LAST_BOOL(ret)"); } elsif ($retLine =~ /^float$/) { push(@after, "PUSH_LAST_NUMBER(ret)"); } elsif ($retLine =~ /^ImVec2$/) { push(@after, "PUSH_LAST_NUMBER(ret.x)"); push(@after, "PUSH_LAST_NUMBER(ret.y)"); } elsif ($retLine =~ /^ImVec4$/) { push(@after, "PUSH_LAST_NUMBER(ret.x)"); push(@after, "PUSH_LAST_NUMBER(ret.y)"); push(@after, "PUSH_LAST_NUMBER(ret.z)"); push(@after, "PUSH_LAST_NUMBER(ret.w)"); } elsif ($retLine =~ /^(unsigned int|ImGuiID|ImU32)$/) { push(@after, "PUSH_LAST_NUMBER(ret)"); } elsif ($retLine =~ /^(ImGuiMouseCursor)$/) { # Enums push(@after, "PUSH_LAST_NUMBER(ret)"); } elsif ($retLine =~ /^int$/) { push(@after, "PUSH_LAST_NUMBER(ret)"); } elsif ($retLine =~ /^const char*\*$/) { push(@after, "PUSH_LAST_STRING(ret)"); } my $luaFunc = $funcName; # Stupid way of implementing overriding if ($funcNames{$luaFunc}) { $funcNames{$luaFunc} = $funcNames{$luaFunc} + 1; $luaFunc .= "_" . $funcNames{$luaFunc}; } else { $funcNames{$luaFunc} = 1; } if ($shouldPrint != 0) { print "IMGUI_FUNCTION($luaFunc)\n"; for (my $i = 0; $i < @before; $i++) { print $before[$i] . "\n"; } print $callMacro . "($funcName"; for (my $i = 0; $i < @funcArgs; $i++) { print ", " . $funcArgs[$i]; } print ")\n"; #for begin and end stack stuff if ($funcName =~ m/^Begin(.*)$/ || defined($beginN{$funcName})) { my $curEndType; if (defined($beginN{$funcName})) { $curEndType = $beginN{$funcName}; } else { $curEndType = $1; } if (defined($endOverride{$curEndType})) { $curEndType = $endOverride{$curEndType}; } if (!defined($endTypeToInt{$curEndType})) { $endTypeToInt{$curEndType} = scalar(@endTypes); push(@endTypes, $curEndType); } my $curEndTypeInt = $endTypeToInt{$curEndType}; if ($hasRet) { print "IF_RET_ADD_END_STACK($curEndTypeInt)\n"; } else { print "ADD_END_STACK($curEndTypeInt)\n"; } } elsif ($funcName =~ m/^End(.*)$/ || defined($endN{$funcName})) { my $curEndType; if (defined($endN{$funcName})) { $curEndType = $endN{$funcName}; } else { $curEndType = $1; } if (defined($endOverride{$curEndType})) { $curEndType = $endOverride{$curEndType}; } if (!defined($endTypeToInt{$curEndType})) { $endTypeToInt{$curEndType} = scalar(@endTypes); push(@endTypes, $curEndType); } my $curEndTypeInt = $endTypeToInt{$curEndType}; print "POP_END_STACK($curEndTypeInt)\n" } for (my $i = 0; $i < @after; $i++) { print $after[$i] . "\n"; } print "END_IMGUI_FUNC\n"; $numSupported += 1; } else { $numUnsupported += 1; } } elsif ($line =~ m/^} \/\/ namespace ImGui$/) { last; } } #for end stack stuff print "END_STACK_START\n"; for (my $i = 0; $i < @endTypes; $i++) { my $endFunc; if (defined($changeN{$endTypes[$i]})) { $endFunc = $changeN{$endTypes[$i]}; } else { $endFunc = "End" . $endTypes[$i]; } print "END_STACK_OPTION($i, " . $endFunc .")\n"; } print "END_STACK_END\n"; #debug info print STDERR "Supported: $numSupported Unsupported: $numUnsupported\n";
slages/love-imgui
generate_imgui_bindings.pl
Perl
mit
14,170
<!DOCTYPE html> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. --><html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width"> <meta name="generator" content="joDoc"> <link href="//s3.amazonaws.com/appgyver.assets/global-assets/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"> <title>AppGyver Steroids API Documentation</title> <!-- AppGyver fonts --> <link type="text/css" rel="stylesheet" href="//fast.fonts.net/cssapi/aa8407d2-1212-415a-8e54-031ff8ee71fe.css"> <link type="text/css" rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="index.css"> <link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)"> <link rel="stylesheet" type="text/css" href="steroids.css"> <link rel="stylesheet" type="text/css" href="service_menu.css"> <link rel="stylesheet" type="text/css" href="prettify/prettify.css"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> <script src="https://s3.amazonaws.com/appgyver.assets/topbar.js" type="text/javascript"></script> </head> <body class="appgyver-x"> <div class="clear" style="margin-bottom: 50px;"></div> <div id="cordova-wrapper"> <div id="header"> <h1 id="nonmobile"><a href="index.html"><strong>AppGyver Steroids</strong> API Documentation</a></h1> <h1 id="mobile"><a href="index.html"><strong>AppGyver Steroids</strong> API Docs</a></h1> <small> <select><optgroup label="English" value="en"> <option value="stable">stable</option> <option value="edge">edge</option> <option value="3.5.8">3.5.8</option> <option value="3.5.7">3.5.7</option> <option value="3.5.5">3.5.5</option> <option selected value="3.5.3">3.5.3</option> <option value="3.5.12">3.5.12</option> <option value="3.5.1">3.5.1</option> <option value="3.5.0">3.5.0</option> <option value="3.1.9">3.1.9</option> </optgroup></select> </small> </div> <div id="subheader"> <h1>steroids.layers</h1> <small><select><option value="steroids.layers">steroids.layers</option> <option value="steroids.layers_methods">      - Methods</option></select></small> </div> <div id="sidebar"> <div class="vertical_divider"></div> <h1>Steroids 3.5.3 API Reference</h1> <ul> <li><a href="steroids_Steroids%20Analytics%20and%20Log_index.md.html#Steroids%C2%A0Analytics%C2%A0and%C2%A0Log">Steroids Analytics and Log</a></li> <li><a href="steroids_Steroids%20App%20and%20Device_index.md.html#Steroids%C2%A0App%C2%A0and%C2%A0Device">Steroids App and Device</a></li> <li><a href="steroids_Steroids%20Config_index.md.html#Steroids%C2%A0Config">Steroids Config</a></li> <li><a href="steroids_Steroids%20Events_index.md.html#Steroids%C2%A0Events">Steroids Events</a></li> <li><a href="steroids_Steroids%20File%20System_index.md.html#Steroids%C2%A0File%C2%A0System">Steroids File System</a></li> <li><a href="steroids_Steroids%20Media_index.md.html#Steroids%C2%A0Media">Steroids Media</a></li> <li><a href="steroids_Steroids%20Views_index.md.html#Steroids%C2%A0Views">Steroids Views</a></li> <li><a href="steroids_Steroids%20UI%20Components_index.md.html#Steroids%C2%A0UI%C2%A0Components">Steroids UI Components</a></li> </ul> <h1>Cordova 3.5.0 API Reference</h1> <ul> <li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li> <li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li> <li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li> <li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li> <li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li> <li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li> <li><a href="cordova_device_device.md.html#Device">Device</a></li> <li><a href="cordova_events_events.md.html#Events">Events</a></li> <li><a href="cordova_file_file.md.html#File">File</a></li> <li><a href="cordova_file_filetransfer_filetransfer.md.html#FileTransfer">FileTransfer</a></li> <li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li> <li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li> <li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a></li> <li><a href="cordova_media_media.md.html#Media">Media</a></li> <li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li> </ul> <h1>Guides</h1> <ul><li><a href="_index.html">Keyword Index</a></li></ul> </div> <div id="scrollable"> <div id="content"> <h1><a name="steroids.layers">steroids.layers</a></h1> <p>A collection of <code><a href="steroids_Steroids%20Views_Steroids.views_index.md.html#steroids.views">steroids.views</a>.*</code> objects that represent the navigation stack for the whole application (when the tabs are disabled) or for a single tab (when the tab bar is enabled).</p> <iframe src="http://player.vimeo.com/video/58669216?autoplay=1&amp;loop=1" width="320" height="480" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <h2><a name="steroids.layers_methods">Methods</a></h2> <ul> <li><a href="steroids_Steroids%20Views_Steroids.layers_layers.push.md.html#steroids.layers.push">steroids.layers.push</a></li> <li><a href="steroids_Steroids%20Views_Steroids.layers_layers.pop.md.html#steroids.layers.pop">steroids.layers.pop</a></li> <li><a href="steroids_Steroids%20Views_Steroids.layers_layers.popAll.md.html#steroids.layers.popAll">steroids.layers.popAll</a></li> <li><a href="steroids_Steroids%20Views_Steroids.layers_layers.replace.md.html#steroids.layers.replace">steroids.layers.replace</a></li> <li><a href="steroids_Steroids%20Views_Steroids.layers_layers.on.md.html#steroids.layers.on">steroids.layers.on</a></li> <li><a href="steroids_Steroids%20Views_Steroids.layers_layers.off.md.html#steroids.layers.off">steroids.layers.off</a></li> </ul> </div> </div> </div> <!-- Functionality and Syntax Highlighting --> <script type="text/javascript" src="index.js"></script> <script type="text/javascript" src="prettify/prettify.js"></script> </body> </html>
AppGyver/supersonic
docs/en/3.5.3/steroids_Steroids Views_Steroids.layers_index.md.html
HTML
mit
7,608
--- title: COPPER is_name: true --- COPPER (name)
stokeclimsland/stokeclimsland
_cards/Copper.md
Markdown
mit
55
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Система управления презентациями</title> <link rel="stylesheet" href="style/main.css"/> <!-- <script type="text/javascript" src="js/lib/jquery.js"></script> <script type="text/javascript" src="js/lib/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="js/lib/jquery.throttle.min.js"></script> <script type="text/javascript" src="js/lib/html2canvas.min.js"></script> <script type="text/javascript" src="js/slide_system.js"></script>--> <script type="text/javascript" src="js/allinone_example_1.js"></script> <script type="text/javascript"> $(function(){ $(".slides", "#first").presentation( { slideClass: ".slide", thumbnails: "#first .thumbs", enableHotKeys: true, enableScroll: true } ); $(".slides", "#second").presentation( { slideClass: ".slide", thumbnails: "#second .thumbs", enableScroll: true } ); }) </script> </head> <body> <div id="first"> <div class="thumbs"></div><div class="slides"> <div class="slide"> <h1>Как можно управлять?</h1> <ol> <li>Кнопками на панели управления</li> <li>Кликая по миниатюрам на навигационной панеле</li> <li>Горячими клавишами</li> <li>Колесом мыши</li> <li>Программно, используя методы презентации</li> <li>Включить autoplay с самого начала и наслаждаться</li> </ol> <h1>Из навигации есть что?</h1> <ol> <li>Навигационная панель с миниатюрами слайдов <span class="optional">[ optional ]</span></li> <li>Номера слайдов и их состояние на навигационной панеле <span class="optional">[ optional ]</span></li> <li>Подписи к слайдам на навигационной панеле <span class="optional">[ optional ]</span></li> <li>Номер текущего слайда <span class="optional">[ optional ]</span></li> <li>Прогрессбар презентации <span class="optional">[ optional ]</span></li> </ol> </div> <div class="slide"> <h1>А как же анимация?</h1> <p>Для презентации можно задать эффект смены слайдов!</p> <h1>А если меня не устроит решение из коробки?</h1> <p>Кому известны слова <span class="cool">deferred</span> и <span class="cool">promise</span>, сможет без проблем добавить и заюзать свой любимый кастомный эффект!</p> <h1 class="woo">Сейчас <span style="color: #888">исч</span><span style="color:#aaa">езну</span> <span style="color: #ccc;">пла</span><span style="color: #eee;">вно...</span></h1> </div> <div class="slide" data-effect="fade"> <h1>Если хочется кого-то выделить?</h1> <p>Можно декларативно задать любому слайду любой эффект появления! Независимо от глобальных настроек презентации.</p> <h1 class="woo">&#8595; Падаем вниз &#8595;</h1> </div> <div class="slide" data-effect="scrolltb"> <h1>А если направо?</h1> <h1 class="woo">&#8594; Теперь направо! &#8594;</h1> </div> <div class="slide " data-effect="scrolllr" > <h1>Технические детали</h1> <p>подробности и исходники <a href="https://github.com/BelirafoN/slideSystem" target="_blank">на github</a></p> <img src="img/github.png" class="github" alt="логотип github"/> </div> <div class="control-panel-wrpr ss-control"> <div class="control-panel ss-control"> <a class="ss-prev" href="#">&#8592; назад</a><a class="ss-next" href="#">вперед &#8594;</a><a class="ss-play" href="#">воспроизвести</a><a class="ss-fullscreen" href="#">на весь экран</a> </div> </div> </div> </div> <div id="second"> <div class="thumbs"></div><div class="slides"> <div class="slide" data-desc="слайд с подписью"> <h1>СЛАЙД</h1> </div> <div class="slide ss-disabled" data-desc="какой-то слайд"> <h1>какой-то слайд</h1> </div> <div class="slide ss-start" data-desc="слайд с подписью"> <h1>С чего начать?</h1> <p>Можно декларативно указать стартовый слайд</p> <h1>А спрятать ненужное?</h1> <p>Можно декларативно исключить нужный слайд из потока презентации не удаляя его верстку. Система сама актуализирует номера слайдов и прогрессбар. </p> <h1>Подписать что хочется?</h1> <p>Можно декларативно задать подпись эскизу слайда</p> </div> <div class="slide" data-desc="слайд с подписью"> <h1>СЛАЙД</h1> </div> <div class="slide ss-disabled" data-effect="scrolllr" data-desc="еще какой-то слайд" >слайд №5</div> <div class="control-panel-wrpr ss-control"> <div class="control-panel ss-control"> <a class="ss-prev" href="#">&#8592; назад</a><a class="ss-next" href="#">вперед &#8594;</a><a class="ss-play" href="#">воспроизвести</a><a class="ss-fullscreen" href="#">на весь экран</a> </div> </div> </div> </div> </body> </html>
BelirafoN/slideSystem
example/index.html
HTML
mit
7,289
java ^ -Djava.library.path=../.. ^ -classpath ../../aparapi.jar;info.jar ^ com.amd.aparapi.sample.info.Main
sadikovi/spark-gpu
aparapi/samples/info/info.bat
Batchfile
mit
112
#ifndef ___INANITY_OIL_VIEW_SCRIPT_OBJECT_HPP___ #define ___INANITY_OIL_VIEW_SCRIPT_OBJECT_HPP___ #include "oil.hpp" #include <map> BEGIN_INANITY_OIL class ViewPluginInstance; class ViewRenderer; /// Script object for 'view' plugin instance. class ViewScriptObject : public Object { private: ViewPluginInstance* pluginInstance; //*** Workaround for wrapper problem. // Plugin object's methods accept objects created // by main plugin instance, wrapping them into special // Mozilla class. It prevents from converting them to // Inanity objects. To workaround, script gets the object // by another channel - via static method with id, so // object is created "by main instance", and no wrapping // happens. int id; typedef std::map<int, ViewScriptObject*> Ids; static Ids ids; static int nextId; public: ViewScriptObject(ViewPluginInstance* pluginInstance); ~ViewScriptObject(); int GetId() const; static ptr<ViewScriptObject> GetById(int id); void Invalidate(); void SetViewRenderer(ptr<ViewRenderer> viewRenderer); }; END_INANITY_OIL #endif
quyse/oil
ViewScriptObject.hpp
C++
mit
1,071
require 'spec_helper' require 'shared_examples_for_randomizers' require 'tabletop/randomizers/fudge_die' module Tabletop RSpec.describe FudgeDie do it_behaves_like 'a randomizer', :roll, [-1,0,1] describe "#sides" do it "is always 3" do expect(subject.sides).to eq 3 end end describe "#to_s" do it "should return cute little dice with symbols" do expect(FudgeDie.new(value:1).to_s).to eq "[+]" expect(FudgeDie.new(value:0).to_s).to eq "[ ]" expect(FudgeDie.new(value:-1).to_s).to eq "[-]" end end end end
nicknovitski/tabletop
spec/tabletop/randomizers/fudge_die_spec.rb
Ruby
mit
588
require 'sequel' require 'configatron/plus' require_relative "db_connection/version" module Nmo module DbConnection # Your code goes here... end end require 'sequel' require 'configatron/plus' require_relative 'db_connection/version' ### CONFIGURATION conf.load_files! '.nmorc' DB = Sequel.mysql2(conf.db_name, user: conf.db_username, password: conf.db_password, encoding: conf.db_encoding)
NeuroMorpho/nmo-db_connection
lib/nmo/db_connection.rb
Ruby
mit
403
#!/bin/bash set -euo pipefail printf 'Building swap from commit %s\n' "$TRAVIS_COMMIT" if [[ "$TRAVIS_BRANCH" == "develop" ]]; then echo "Start running build_auto_dev" npm run build_auto_dev echo "Finished running build_auto_dev" echo "Start running build_auto_ropsten" npm run build_auto_ropsten &> /dev/null echo "Finished running build_auto_ropsten" elif [[ "$TRAVIS_BRANCH" == "staging" ]]; then echo "Start running build_auto_staging_limit_order" npm run build_auto_staging_limit_order echo "Finished running build_auto_staging_limit_order" elif [[ "$TRAVIS_BRANCH" == "master" ]]; then echo "Start running build_auto_production" npm run build_auto_production echo "Finished running build_auto_production" echo "Start running build_auto_ropsten" npm run build_auto_ropsten &> /dev/null echo "Finished running build_auto_ropsten" echo "Start running build-ropsten" npm run build-ropsten &> /dev/null echo "Finished running build-ropsten" echo "Start running build-staging" npm run build-staging &> /dev/null echo "Finished running build-staging" else echo "Branch is not set for auto-build." exit 0 fi
KyberNetwork/KyberWallet
.travis/build_swap.sh
Shell
mit
1,162
<table cellspacing="0" cellpadding="0" style="width: 100%" class="data"> <tbody> <tr class="firstr"> <th class="width100perc nopad">torrent name</th> <th class="center"><a rel="nofollow" href="/usearch/elementary%20os/?field=size&amp;sorder=desc">size</a></th> <th class="center"><span class="files"><a rel="nofollow" href="/usearch/elementary%20os/?field=files_count&amp;sorder=desc">files</a></span></th> <th class="center"><span><a rel="nofollow" href="/usearch/elementary%20os/?field=time_add&amp;sorder=desc">age</a></span></th> <th class="center"><span class="seed"><a rel="nofollow" href="/usearch/elementary%20os/?field=seeders&amp;sorder=desc">seed</a></span></th> <th class="lasttd nobr center"><a rel="nofollow" href="/usearch/elementary%20os/?field=leechers&amp;sorder=desc">leech</a></th> </tr> <tr id="torrent_elementary_os10490126" class="odd"> <td> <div class="iaconbox center floatright"> <a href="/elementary-os-freya-64-bit-t10490126.html#comment" class="icommentjs kaButton smallButton rightButton" rel="10490126,0">117 <i class="ka ka-comment"></i></a> <a title="Verified Torrent" href="/elementary-os-freya-64-bit-t10490126.html" class="icon16"><i class="ka ka16 ka-verify ka-green"></i></a> <div data-sc-params="{ 'name': 'Elementary%20OS%20Freya%2064%20Bit', 'extension': 'iso', 'magnet': 'magnet:?xt=urn:btih:FC85DC999730A42DE3924444AADBCFA183B5F388&amp;dn=elementary+os+freya+64+bit&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&amp;tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce' }" class="none" data-sc-slot="_ae58c272c09a10c792c6b17d55c20208" data-sc-replace=""></div> <a class="icon16" href="magnet:?xt=urn:btih:12345" title="Torrent magnet link" data-nop=""><i class="ka ka16 ka-magnet"></i></a> <a class="icon16" href="https://torcache.net/torrent/12345.torrent" title="Download torrent file" data-download=""><i class="ka ka16 ka-arrow-down"></i></a> </div> <div class="torrentname"> <a class="torType zipType" href="/elementary-os-freya-64-bit-t10490126.html"></a> <a class="normalgrey font12px plain bold" href="/elementary-os-freya-64-bit-t10490126.html"></a> <div class="markeredBlock torType zipType"> <a class="cellMainLink" href="/elementary-os-freya-64-bit-t10490126.html"><strong class="red">Elementary</strong> <strong class="red">OS</strong> Freya 64 Bit</a> <span class="font11px lightgrey block"> Posted by <i style="font-size: 16px;color:orange;" class="ka ka-verify" title="Verified Uploader"></i> <a href="/user/realmania/" class="plain">realmania</a> in <span id="cat_10490126"><strong><a href="/applications/">Applications</a></strong></span> </span> </div> </div> </td> <td class="nobr center">852 <span>MB</span></td> <td class="center">1</td> <td title="11 Apr 2015, 17:00" class="center">1&nbsp;year</td> <td class="green center">5</td> <td class="red lasttd center">0</td> </tr> <tr id="torrent_elementary_os4774959" class="even"> <td> <div class="iaconbox center floatright"> <div data-sc-params="{ 'name': 'Elementary%20OS%200.1.6', 'extension': 'iso', 'magnet': 'magnet:?xt=urn:btih:0ffd95a33d1a3863513756947dfcfc5eff80fe4d&amp;dn=elementary+os+0+1+6&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&amp;tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce' }" class="none" data-sc-slot="_ae58c272c09a10c792c6b17d55c20208" data-sc-replace=""></div> <a class="icon16" href="magnet:?xt=urn:btih:0ffd95a33d1a3863513756947dfcfc5eff80fe4d&amp;dn=elementary+os+0+1+6&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&amp;tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce" title="Torrent magnet link" data-nop=""><i class="ka ka16 ka-magnet"></i></a> <a class="icon16" href="//torcache.net/torrent/0FFD95A33D1A3863513756947DFCFC5EFF80FE4D.torrent?title=[kat.cr]elementary.os.0.1.6" title="Download torrent file" data-download=""><i class="ka ka16 ka-arrow-down"></i></a> </div> <div class="torrentname"> <a class="torType zipType" href="/elementary-os-0-1-6-t4774959.html"></a> <a class="normalgrey font12px plain bold" href="/elementary-os-0-1-6-t4774959.html"></a> <div class="markeredBlock torType zipType"> <a class="cellMainLink" href="/elementary-os-0-1-6-t4774959.html"><strong class="red">Elementary</strong> <strong class="red">OS</strong> 0.1.6</a> <span class="font11px lightgrey block"> in <span id="cat_4774959"><strong><a href="/applications/">Applications</a></strong></span> </span> </div> </div> </td> <td class="nobr center">665.83 <span>MB</span></td> <td class="center">1</td> <td title="03 Dec 2010, 22:51" class="center">5&nbsp;years</td> <td class="green center">0</td> <td class="red lasttd center">0</td> </tr> <tr id="torrent_elementary_os11632101" class="odd"> <td> <div class="iaconbox center floatright"> <a href="/elementary-os-0-3-1-64-bit-t11632101.html#comment" class="icommentjs kaButton smallButton rightButton" rel="11632101,0">1 <i class="ka ka-comment"></i></a> <div data-sc-params="{ 'name': 'Elementary%20OS%200.3.1%2064-bit', 'extension': 'iso', 'magnet': 'magnet:?xt=urn:btih:292F20A2F5090E61677AADC70071D50F3D41A3B0&amp;dn=elementary+os+0+3+1+64+bit&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&amp;tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&amp;tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce' }" class="none" data-sc-slot="_ae58c272c09a10c792c6b17d55c20208" data-sc-replace=""></div> <a class="icon16" href="magnet:?xt=urn:btih:56789" title="Torrent magnet link" data-nop=""><i class="ka ka16 ka-magnet"></i></a> <a class="icon16" href="https://torcache.net/torrent/56789.torrent" title="Download torrent file" data-download=""><i class="ka ka16 ka-arrow-down"></i></a> </div> <div class="torrentname"> <a class="torType zipType" href="/elementary-os-0-3-1-64-bit-t11632101.html"></a> <a class="normalgrey font12px plain bold" href="/elementary-os-0-3-1-64-bit-t11632101.html"></a> <div class="markeredBlock torType zipType"> <a class="cellMainLink" href="/elementary-os-0-3-1-64-bit-t11632101.html"><strong class="red">Elementary</strong> <strong class="red">OS</strong> 0.3.1 64-bit</a> <span class="font11px lightgrey block"> Posted by <a href="/user/Router1011/" class="plain">Router1011</a> in <span id="cat_11632101"><strong><a href="/applications/">Applications</a> &gt; <a href="/linux/">Linux</a></strong></span> </span> </div> </div> </td> <td class="nobr center">867 <span>MB</span></td> <td class="center">2</td> <td title="22 Nov 2015, 00:40" class="center">6&nbsp;months</td> <td class="green center">0</td> <td class="red lasttd center">0</td> </tr> </tbody> </table>
ncpierson/KickassScala
src/test/resources/search.html
HTML
mit
7,963
form.login { width: 23%; border-radius: 10px; margin: 5em auto; box-shadow: 4px 4px 14px #000000; } form.login p { margin: 0; } form.login .row { position: relative; } form.login .username input, form.login .password input { width: 68%; } form.login .username { border-top-left-radius: 10px; border-top-right-radius: 10px; color: white; padding: .5em; background-color: #262626; } form.login .password { background-color: #DBDEE7; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; padding: 0.5em; } form.login .username i.fa { position: absolute; bottom: -4px; font-size: 3em; color: #DBDEE7; width: 28%; text-align: center; } form.login .password button[type="submit"] { width: 28%; } p.fyi { color: #DBDEE7; background-color: #262626; width: 50%; margin: 0 auto; padding: 1em; border-radius: 10px; }
shamess/PR-me-bro
css/login.css
CSS
mit
944
# 前六天课程大复习 > 爬楼密码:六六大顺 小伙伴们,咱们的基金专列已经过去6站啦,勤奋努力并坚持到现在的你,真的非常棒!允许让你小骄傲一下,就一下哦! 本来计划大周末给大家来点浓浓的鸡汤,想了想还是算了吧,大家可能也是周末有加班有不休息的,有宝妈都特别辛苦,班班相信大家不是不想听课,只是时间上有些忙不开,班班也很理解,但是!我们也不能一直松懈,今天听课率直线下降,班班真是有些着急了,我们要对自己负责,同时班班也会一直督促大家,所以我的小皮鞭可能要出现了。大家没听得课程要追赶上来,班班还是那句话要对得起自己的钱! 直接进入今天的主题哈,希望咱们沉迷学习无法自拔,内心里除了学习还是学习! 6天的时间我们学习了哪些知识,大家还记得嘛? 今晚,就让我来带着大家把这6天学习到的知识串联起来,结束之后,白天还晕晕的小伙伴可不能再晕了哦。 ![img](../../resources/img/jijin/lesson/0901_1.png) 首先我们知道了基金是基金公司收集投资者的钱,按照证监会制定的规则,进行各种各样的投资的一种投资品。基金家族按照投资品种划分有如下四类 ![img](../../resources/img/jijin/lesson/0901_2.png) 没错,就是货币基金、债券基金、混合基金和股票基金。 他们的风险排序是这样的: 货币基金<债券基金<混合基金<股票基金 货币基金风险最低收益也最低,债券基金的收益和风险略高于货币基金,股票基金则是收益和风险都最高的,混合基金的收益和风险则介乎于股票基金和债券基金之间。 ![img](../../resources/img/jijin/lesson/0901_3.png) 如果按交易渠道可分为场内基金和场外基金? 这个地方很多小伙伴总是区分不清楚,其实这里呢,我们直接来看交易方式,可以竞价交易的就是场内基金,不能竞价只有一个价格的是场外基金啦哈。 我们还学会了师兄的“扪心自问三问法”,能够快速阅读基金招募书。这扪心自问大家还记得要问什么吗? 第一问:我买的是什么?第二问:我的钱交给谁?第三问呢是:我的钱用在哪? ![img](../../resources/img/jijin/lesson/0901_4.png) 只要回答了这三个问题,基金招募书的关键内容就能快速读懂哦,看着上百页的文字被自己轻轻松松1分钟就搞定,是不是超有成就感。 初识基金的庐山真面目后,我们从风险和收益的角度,深扒了各种基金的收益和风险情况,以及适合用什么钱投资,怎么筛选等等,我们重点来捋一捋如何筛选。 ![img](../../resources/img/jijin/lesson/0901_5.png) 首先看货币基金: ![img](../../resources/img/jijin/lesson/0901_6.png) 那么债券基金呢? ![img](../../resources/img/jijin/lesson/0901_7.png) 接下来混合基金: ![img](../../resources/img/jijin/lesson/0901_8.png) 最后看一下股票基金: ![img](../../resources/img/jijin/lesson/0901_9.png) 今天我们还学习了指数基金的筛选方法,那么作为打败巴菲特老爷子的指数基金我们又该如何筛选呢?一起来看一下哦: ![img](../../resources/img/jijin/lesson/0901_10.png) 投资指数最好选择宽基指数,基金公司的资金规模要超1000亿,而指数基金的最终锁定要看四个指标:跟踪误差率越低越好;规模越大,流动性越强越好;成立年限要选择超过3年的,低于1年的pass掉,管理费率不用说,当然是越低越好啦。 好啦,小伙伴们,今天的6天课程大总结就到这里结束啦。实战作业一已发布,宝宝们赶紧分析完成作业哦!
R-ambler/R-ambler.github.io
money/jijin/lesson/0901wanfenxiang.md
Markdown
mit
3,869
# flotilla flotilla
simulatedsimian/flotilla
README.md
Markdown
mit
20
<?php namespace Ray\Di\Demo; use Ray\Di\Injector; use Ray\Di\AbstractModule; require __DIR__ . '/bootstrap.php'; class ProviderBindingModule extends AbstractModule { protected function configure() { $this->bind(LangInterface::class)->toProvider(PhpProvider::class); $this->bind()->annotatedWith('php_version')->toInstance('7.0'); } } $injector = new Injector(new ProviderBindingModule); $computer = $injector->getInstance(Computer::class); /* @var $computer Computer */ $works = ($computer->lang instanceof Php) && $computer->lang->version === '7.0'; echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
deizel/Ray.Di
docs/demo/03-provider-binding.php
PHP
mit
646
# -*- coding: utf-8 -*- """ Decorators module """ import logging from docktors.core import decorated from docktors.wdocker import DockerContainer logger = logging.getLogger(__name__) def docker(func=None, **kwargs): """ Decorator to startup and shutdown a docker container. :param image: The name of the image to use. :param command: The input docker command to run, :param ports: The ports bindings to made :param volumes: The volumes to mount :param environment: The environment value :param wait_for_log: A string to wait in the logs before going into the function :param wait_for_port: A string to wait before going into the function :param kill_signal: If you want to kill the container, the signal to use. Otherwise, only a stop will be made. :param func: the function to be decorated :return: the decorated function """ docker_container = DockerContainer(**kwargs) # Decorator in variable assignment : function is undefined if func is None: def decorator(func): # pylint: disable=locally-disabled, missing-docstring return decorated(docker_container, func) return decorator return decorated(docker_container, func)
Patouche/pydocktors
docktors/decorators.py
Python
mit
1,226
package com.mbh.mbutils.db.sharedprefs; /** * Created By MBH on 2016-06-21. */ public interface IPreferences { boolean contains(String key); int getInt(String key, int defValue); String getString(String key, String defValue); boolean getBoolean(String key, boolean defValue); void putInt(String key, int value); void putBoolean(String key, boolean value); void putString(String key, String value); // easiness of use void put(String key, String value); void put(String key, int value); void put(String key, boolean value); }
iballan/MBUtils
MBUtils/src/main/java/com/mbh/mbutils/db/sharedprefs/IPreferences.java
Java
mit
575
<?php // Create connection include "ConnectDB.php"; $request = json_decode(file_get_contents('php://input')); $id = $conn->real_escape_string($request->id); $table = $conn->real_escape_string($request->table); $delete_row = $conn->query("DELETE FROM $table WHERE id=$id"); $conn->close(); ?>
aekfin/Movies-Store-SE
php/RemoveDataByID.php
PHP
mit
294
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Coq bench</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <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="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../../..">Unstable</a></li> <li><a href=".">8.4.dev / contrib:karatsuba dev</a></li> <li class="active"><a href="">2014-11-29 17:44:14</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="../../../../../about.html">About</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href=".">« Up</a> <h1> contrib:karatsuba <small> dev <span class="label label-info">Not compatible with this Coq</span> </small> </h1> <p><em><script>document.write(moment("2014-11-29 17:44:14 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2014-11-29 17:44:14 UTC)</em><p> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>ruby lint.rb unstable ../unstable/packages/coq:contrib:karatsuba/coq:contrib:karatsuba.dev</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Output</dt> <dd><pre>The package is valid. </pre></dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --dry-run coq:contrib:karatsuba.dev coq.8.4.dev</code></dd> <dt>Return code</dt> <dd>768</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.4.dev). The following dependencies couldn&#39;t be met: - coq:contrib:karatsuba -&gt; coq = dev Your request can&#39;t be satisfied: - Conflicting version constraints for coq No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq, to test if the problem was incompatibility with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --dry-run coq:contrib:karatsuba.dev</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>3 s</dd> <dt>Output</dt> <dd><pre>The following actions will be performed: - remove coq.8.4.dev === 1 to remove === =-=- Removing Packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Removing coq.8.4.dev. [WARNING] Directory /home/bench/.opam/system/lib/coq is not empty, not removing [WARNING] Directory /home/bench/.opam/system/share/coq is not empty, not removing The following actions will be performed: - install coq.dev [required by coq:contrib:karatsuba] - install coq:contrib:karatsuba.dev === 2 to install === =-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= =-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Building coq.dev: ./configure -configdir /home/bench/.opam/system/lib/coq/config -mandir /home/bench/.opam/system/man -docdir /home/bench/.opam/system/doc -prefix /home/bench/.opam/system -usecamlp5 -camlp5dir /home/bench/.opam/system/lib/camlp5 -coqide no make -j4 make install Installing coq.dev. Building coq:contrib:karatsuba.dev: coq_makefile -f Make -o Makefile make -j4 make install Installing coq:contrib:karatsuba.dev. </pre></dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>Data not available in this bench.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io-old
clean/Linux-x86_64-4.02.1-1.2.0/unstable/8.4.dev/contrib:karatsuba/dev/2014-11-29_17-44-14.html
HTML
mit
6,937
require 'active_support/core_ext/string/output_safety' require 'gmaps/js' require 'gmaps/rails/core_ext' class GMaps class << self def [](*args) GMaps.new(*args) end end attr_accessor :map, :directives def initialize(options={}) @map = options @directives = [] end def method_missing(m, *args) @directives << {name: m, args: args} end def name @name ||= @map[:div] ? @map[:div].gsub(/[#\.]/, '') : 'map' end attr_writer :name def to_js ("var #{name} = GMaps(#{{div: '#map'}.merge!(@map)._to_s19});\n" + @directives.map{ |directive| func = directive[:name] args = directive[:args] "#{name}.#{func}(#{args.map{|e| e._to_s19}.join(', ')})" }.join(";\n")).html_safe end def to_s {map: @map, directives: @directives}._to_s19 end end
kentaroi/gmaps-rails
lib/gmaps.rb
Ruby
mit
827
/* The MIT License (MIT) * * Copyright (c) 2015 Marc Clifton * * 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 System.Collections; using System.Collections.Generic; using System.Threading; namespace Clifton.Core.Utils { // http://stackoverflow.com/questions/6601611/no-concurrentlistt-in-net-4-0 public class ConcurrentList<T> : IList<T>, IDisposable { private readonly List<T> _list; private readonly ReaderWriterLockSlim _lock; public ConcurrentList() { this._lock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); this._list = new List<T>(); } public ConcurrentList(int capacity) { this._lock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); this._list = new List<T>(capacity); } public ConcurrentList(IEnumerable<T> items) { this._lock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); this._list = new List<T>(items); } public void Add(T item) { try { this._lock.EnterWriteLock(); this._list.Add(item); } finally { this._lock.ExitWriteLock(); } } public void Insert(int index, T item) { try { this._lock.EnterWriteLock(); this._list.Insert(index, item); } finally { this._lock.ExitWriteLock(); } } public bool Remove(T item) { try { this._lock.EnterWriteLock(); return this._list.Remove(item); } finally { this._lock.ExitWriteLock(); } } public void RemoveAt(int index) { try { this._lock.EnterWriteLock(); this._list.RemoveAt(index); } finally { this._lock.ExitWriteLock(); } } public int IndexOf(T item) { try { this._lock.EnterReadLock(); return this._list.IndexOf(item); } finally { this._lock.ExitReadLock(); } } public void Clear() { try { this._lock.EnterWriteLock(); this._list.Clear(); } finally { this._lock.ExitWriteLock(); } } public bool Contains(T item) { try { this._lock.EnterReadLock(); return this._list.Contains(item); } finally { this._lock.ExitReadLock(); } } public void CopyTo(T[] array, int arrayIndex) { try { this._lock.EnterReadLock(); this._list.CopyTo(array, arrayIndex); } finally { this._lock.ExitReadLock(); } } public IEnumerator<T> GetEnumerator() { return new ConcurrentEnumerator<T>(this._list, this._lock); } IEnumerator IEnumerable.GetEnumerator() { return new ConcurrentEnumerator<T>(this._list, this._lock); } ~ConcurrentList() { this.Dispose(false); } public void Dispose() { this.Dispose(true); } private void Dispose(bool disposing) { if (disposing) GC.SuppressFinalize(this); this._lock.Dispose(); } public T this[int index] { get { try { this._lock.EnterReadLock(); return this._list[index]; } finally { this._lock.ExitReadLock(); } } set { try { this._lock.EnterWriteLock(); this._list[index] = value; } finally { this._lock.ExitWriteLock(); } } } public int Count { get { try { this._lock.EnterReadLock(); return this._list.Count; } finally { this._lock.ExitReadLock(); } } } public bool IsReadOnly { get { return false; } } } public class ConcurrentEnumerator<T> : IEnumerator<T> { private readonly IEnumerator<T> _inner; private readonly ReaderWriterLockSlim _lock; public ConcurrentEnumerator(IEnumerable<T> inner, ReaderWriterLockSlim @lock) { this._lock = @lock; this._lock.EnterReadLock(); this._inner = inner.GetEnumerator(); } T IEnumerator<T>.Current { get { return _inner.Current; } } void IDisposable.Dispose() { this._lock.ExitReadLock(); } object IEnumerator.Current { get { return _inner.Current; } } bool IEnumerator.MoveNext() { return _inner.MoveNext(); } void IEnumerator.Reset() { _inner.Reset(); } } }
cliftonm/clifton
Clifton.Core/Clifton.Core.Utils/ConcurrentList.cs
C#
mit
5,364
using System; using System.Collections.Generic; using System.Linq; using SJP.Schematic.Core; using SJP.Schematic.Core.Extensions; namespace SJP.Schematic.Dot { /// <summary> /// A formatter for constructing a DOT graph for tables in a relational database. /// </summary> /// <seealso cref="IDotFormatter" /> public class DotFormatter : IDotFormatter { /// <summary> /// Initializes a new instance of the <see cref="DotFormatter"/> class. /// </summary> /// <param name="identifierDefaults">The identifier defaults, used when any components of identifiers are missing.</param> /// <exception cref="ArgumentNullException"><paramref name="identifierDefaults"/></exception> public DotFormatter(IIdentifierDefaults identifierDefaults) { IdentifierDefaults = identifierDefaults ?? throw new ArgumentNullException(nameof(identifierDefaults)); } /// <summary> /// Gets the identifier defaults. /// </summary> /// <value>Identifier defaults.</value> protected IIdentifierDefaults IdentifierDefaults { get; } /// <summary> /// Renders the tables as a DOT graph. /// </summary> /// <param name="tables">The tables.</param> /// <returns>A string containing a dot representation of the table relationship graph.</returns> /// <exception cref="ArgumentNullException"><paramref name="tables"/></exception> public string RenderTables(IEnumerable<IRelationalDatabaseTable> tables) { if (tables == null) throw new ArgumentNullException(nameof(tables)); return RenderTables(tables, DotRenderOptions.Default); } /// <summary> /// Renders the tables as a DOT graph. /// </summary> /// <param name="tables">The tables.</param> /// <param name="options">Options to configure how the DOT graph is rendered.</param> /// <returns>A string containing a dot representation of the table relationship graph.</returns> /// <exception cref="ArgumentNullException"><paramref name="tables"/> or <paramref name="options"/></exception> public string RenderTables(IEnumerable<IRelationalDatabaseTable> tables, DotRenderOptions options) { if (tables == null) throw new ArgumentNullException(nameof(tables)); if (options == null) throw new ArgumentNullException(nameof(options)); options.ShowRowCounts = false; return RenderTables(tables, EmptyRowCounts, options); } /// <summary> /// Renders the tables as a DOT graph. /// </summary> /// <param name="tables">The tables.</param> /// <param name="rowCounts">Row counts for each of the provided tables.</param> /// <returns>A string containing a dot representation of the table relationship graph.</returns> /// <exception cref="ArgumentNullException"><paramref name="tables"/> or <paramref name="rowCounts"/></exception> public string RenderTables(IEnumerable<IRelationalDatabaseTable> tables, IReadOnlyDictionary<Identifier, ulong> rowCounts) { if (tables == null) throw new ArgumentNullException(nameof(tables)); if (rowCounts == null) throw new ArgumentNullException(nameof(rowCounts)); return RenderTables(tables, rowCounts, DotRenderOptions.Default); } /// <summary> /// Renders the tables as a DOT graph. /// </summary> /// <param name="tables">The tables.</param> /// <param name="rowCounts">Row counts for each of the provided tables.</param> /// <param name="options">Options to configure how the DOT graph is rendered.</param> /// <returns>A string containing a dot representation of the table relationship graph.</returns> /// <exception cref="ArgumentNullException"><paramref name="tables"/> or <paramref name="rowCounts"/> or <paramref name="options"/></exception> public string RenderTables(IEnumerable<IRelationalDatabaseTable> tables, IReadOnlyDictionary<Identifier, ulong> rowCounts, DotRenderOptions options) { if (tables == null) throw new ArgumentNullException(nameof(tables)); if (rowCounts == null) throw new ArgumentNullException(nameof(rowCounts)); if (options == null) throw new ArgumentNullException(nameof(options)); var tableNames = tables.Select(t => t.Name).ToList(); var tableNodes = new Dictionary<DotIdentifier, DotNode>(); var edges = new List<DotEdge>(); foreach (var table in tables) { var tableIdentifier = table.Name.ToSafeKey(); var tableName = table.Name.ToVisibleName(); var nodeIdentifier = new DotIdentifier(tableIdentifier); var tableColumns = table.Columns; var columnNames = tableColumns.Select(c => c.Name.LocalName).ToList(); var columnTypes = tableColumns.Select(c => c.Type.Definition).ToList(); var primaryKey = table.PrimaryKey; var uniqueKeys = table.UniqueKeys; var childKeys = table.ChildKeys; var parentKeys = table.ParentKeys; var keyColumnNames = uniqueKeys .Concat(parentKeys.Select(fk => fk.ChildKey)) .Concat(primaryKey.Match(pk => new[] { pk }, Array.Empty<IDatabaseKey>)) .SelectMany(key => key.Columns.Select(c => c.Name.LocalName)) .Distinct() .ToList(); var childKeysCount = childKeys.ToList().UCount(); var parentKeysCount = parentKeys.ToList().UCount(); if (!rowCounts.TryGetValue(table.Name, out var rowCount)) rowCount = 0; var tableNodeAttrs = new[] { NodeAttribute.Tooltip(tableName) }; var tableNodeOptions = new TableNodeOptions { IsReducedColumnSet = options.IsReducedColumnSet, ShowColumnDataType = options.ShowColumnDataType, IsHighlighted = table.Name == options.HighlightedTable, ShowRowCounts = options.ShowRowCounts }; var tableConstraints = new List<TableConstraint>(); primaryKey.IfSome(pk => { var primaryKeyNameText = pk.Name.Match( pkName => pkName.LocalName, () => pk.GetKeyHash(table.Name).ToString() ); var primaryKeyName = pk.Name.Match(pkName => pkName.LocalName, () => string.Empty); var primaryKeyConstraint = new TableConstraint( primaryKeyNameText, pk.KeyType, primaryKeyName, pk.Columns.Select(c => c.Name.LocalName).ToList(), pk.Columns.Select(c => c.Type.Definition).ToList() ); tableConstraints.Add(primaryKeyConstraint); }); foreach (var uniqueKey in uniqueKeys) { var uniqueKeyNameText = uniqueKey.Name.Match( ukName => ukName.LocalName, () => uniqueKey.GetKeyHash(table.Name).ToString() ); var uniqueKeyName = uniqueKey.Name.Match(pkName => pkName.LocalName, () => string.Empty); var uniqueKeyConstraint = new TableConstraint( uniqueKeyNameText, uniqueKey.KeyType, uniqueKeyName, uniqueKey.Columns.Select(c => c.Name.LocalName).ToList(), uniqueKey.Columns.Select(c => c.Type.Definition).ToList() ); tableConstraints.Add(uniqueKeyConstraint); } foreach (var relationalKey in parentKeys) { var childKey = relationalKey.ChildKey; var parentKey = relationalKey.ParentKey; var hasParentKey = tableNames.Contains(relationalKey.ParentTable); if (!hasParentKey) continue; var childKeyTableName = relationalKey.ChildTable.ToSafeKey(); var childKeyName = childKey.Name.Match( ckName => ckName.LocalName, () => childKey.GetKeyHash(relationalKey.ChildTable).ToString() ); var parentKeyTableName = relationalKey.ParentTable.ToSafeKey(); var parentKeyName = parentKey.Name.Match( fkName => fkName.LocalName, () => parentKey.GetKeyHash(relationalKey.ParentTable).ToString() ); var childKeyToParentKeyEdge = new DotEdge( new DotIdentifier(childKeyTableName), new DotIdentifier(childKeyName), new DotIdentifier(parentKeyTableName), new DotIdentifier(parentKeyName), Array.Empty<EdgeAttribute>() ); edges.Add(childKeyToParentKeyEdge); var childKeyConstraintName = childKey.Name.Match(name => name.LocalName, () => string.Empty); var tableConstraint = new TableConstraint( childKeyName, childKey.KeyType, childKeyConstraintName, childKey.Columns.Select(c => c.Name.LocalName).ToList(), childKey.Columns.Select(c => c.Type.Definition).ToList() ); tableConstraints.Add(tableConstraint); } tableNodes[nodeIdentifier] = new TableNode( nodeIdentifier, tableName, columnNames, columnTypes, keyColumnNames, childKeysCount, parentKeysCount, rowCount, tableNodeAttrs, tableConstraints, tableNodeOptions ); } var recordNodes = tableNodes.Values .OrderBy(node => node.Identifier.ToString()) .ToList(); var graphName = !IdentifierDefaults.Database.IsNullOrWhiteSpace() ? IdentifierDefaults.Database : "unnamed graph"; var graphAttrs = _globalGraphAttrs.ToList(); graphAttrs.Add(GraphAttribute.BackgroundColor(options.Theme.BackgroundColor)); var graph = new DotGraph( new DotIdentifier(graphName), graphAttrs, _globalNodeAttrs, _globalEdgeAttrs, recordNodes, edges ); return graph.ToString(); } private static readonly IEnumerable<GraphAttribute> _globalGraphAttrs = new[] { GraphAttribute.RankDirection(RankDirection.RL), GraphAttribute.Ratio(GraphRatio.Compress) }; private static readonly IEnumerable<NodeAttribute> _globalNodeAttrs = new[] { NodeAttribute.FontFace(FontFace.Courier), NodeAttribute.EmptyNodeShape() }; private static readonly IEnumerable<EdgeAttribute> _globalEdgeAttrs = new[] { EdgeAttribute.ArrowHead(ArrowStyleName.Open) }; private static readonly IReadOnlyDictionary<Identifier, ulong> EmptyRowCounts = new Dictionary<Identifier, ulong>(); } }
sjp/SJP.Schema
src/SJP.Schematic.Dot/DotFormatter.cs
C#
mit
12,160
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WMAP.Common.Consts; namespace WMAP.Common.Security { public static class RandomCode { #region Random Setting private const int RandomDefaultLength = 16; #endregion /// <summary> /// Generate Random Code /// </summary> /// <param name="codeLen"></param> /// <returns></returns> /// <exception cref="System.ArgumentOutOfRange"/> public static string CreateRandCode(int codeLen = RandomDefaultLength) { if (codeLen <= 0) { codeLen = RandomDefaultLength; } int randValue = -1; Random rand = new Random(unchecked((int)(DateTime.Now.Ticks%int.MaxValue))); StringBuilder codeBuilder = new StringBuilder(); for (int i = 0; i < codeLen; i++) { randValue = rand.Next(0, BaseT42Encoding.CodeBaseT42Dictionary.Length - 1); codeBuilder.Append(BaseT42Encoding.CodeBaseT42Dictionary[randValue]); } return codeBuilder.ToString(); } } }
wang-xinhong/wechat-mvc-webapp
src/wechat-mvc-webapp/WMAP.Common/Security/RandomCode.cs
C#
mit
1,230
var conectaN_8cpp = [ [ "main", "conectaN_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ] ];
antcc/practicas-mp
final_conecta_N/v1.0/doc/html/conectaN_8cpp.js
JavaScript
mit
101
# frozen_string_literal: true module HTMLProofer module Configuration require_relative 'version' PROOFER_DEFAULTS = { allow_missing_href: false, allow_hash_href: false, alt_ignore: [], assume_extension: false, check_external_hash: false, check_favicon: false, check_html: false, check_img_http: false, check_opengraph: false, checks_to_ignore: [], check_sri: false, directory_index_file: 'index.html', disable_external: false, empty_alt_ignore: false, enforce_https: false, error_sort: :path, extension: '.html', external_only: false, file_ignore: [], http_status_ignore: [], internal_domains: [], log_level: :info, only_4xx: false, url_ignore: [], url_swap: {} }.freeze TYPHOEUS_DEFAULTS = { followlocation: true, headers: { 'User-Agent' => "Mozilla/5.0 (compatible; HTML Proofer/#{HTMLProofer::VERSION}; +https://github.com/gjtorikian/html-proofer)", 'Accept' => 'application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5' }, connecttimeout: 10, timeout: 30 }.freeze HYDRA_DEFAULTS = { max_concurrency: 50 }.freeze PARALLEL_DEFAULTS = {}.freeze VALIDATION_DEFAULTS = { report_script_embeds: false, report_missing_names: false, report_invalid_tags: false, report_missing_doctype: false, report_eof_tags: false, report_mismatched_tags: false }.freeze CACHE_DEFAULTS = {}.freeze def self.to_regex?(item) if item.start_with?('/') && item.end_with?('/') Regexp.new item[1...-1] else item end end def self.parse_json_option(option_name, config) raise ArgumentError, 'Must provide an option name in string format.' unless option_name.is_a?(String) raise ArgumentError, 'Must provide an option name in string format.' if option_name.strip.empty? return {} if config.nil? raise ArgumentError, 'Must provide a JSON configuration in string format.' unless config.is_a?(String) return {} if config.strip.empty? begin JSON.parse(config) rescue StandardError raise ArgumentError, "Option '" + option_name + "' did not contain valid JSON." end end end end
georgeluong/georgeluong.github.io
vendor/bundle/ruby/2.6.0/gems/html-proofer-3.15.2/lib/html-proofer/configuration.rb
Ruby
mit
2,390
<!-- Unsafe sample input : get the field userData from the variable $_GET via an object, which store it in a array SANITIZE : use of rawurlencode File : unsafe, use of untrusted data in a quoted property value (CSS) --> <!--Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.--> <!DOCTYPE html> <html> <head> <style> <?php class Input{ private $input; public function getInput(){ return $this->input[1]; } public function __construct(){ $this->input = array(); $this->input[0]= 'safe' ; $this->input[1]= $_GET['UserData'] ; $this->input[2]= 'safe' ; } } $temp = new Input(); $tainted = $temp->getInput(); $tainted = rawurlencode($tainted); //flaw echo "body { color :\'". $tainted ."\' ; }" ; ?> </style> </head> <body> <h1>Hello World!</h1> </body> </html>
stivalet/PHP-Vulnerability-test-suite
XSS/CWE_79/unsafe/CWE_79__object-Array__func_rawurlencode__Use_untrusted_data_propertyValue_CSS-quoted_Property_Value.php
PHP
mit
1,648
-- fts3b.test -- -- execsql { -- SELECT snippet(t3) FROM t3 WHERE t3 MATCH 'test'; -- } SELECT snippet(t3) FROM t3 WHERE t3 MATCH 'test';
bkiers/sqlite-parser
src/test/resources/fts3b.test_14.sql
SQL
mit
142
/* * Copyright (c) 2006-2007 Christopher J. W. Lloyd * * 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/NSCharacterSet.h> #import <Foundation/characterset/bitmapRepresentation.h> @interface NSMutableCharacterSet_bitmap : NSMutableCharacterSet { uint8_t _bitmap[NSBitmapCharacterSetSize]; } -initWithCharacterSet:(NSCharacterSet *)set; -initWithData:(NSData *)data; -initWithString:(NSString *)string; -initWithRange:(NSRange)range; @end
DmitrySkiba/itoa-foundation
src/todo/Foundation/characterset/NSMutableCharacterSet_bitmap.h
C
mit
1,505
module Cifrado class Progressbar include Cifrado::Utils def initialize(segments, current_segment, options = {}) @style = (options[:style] || :fancy).to_sym @segments = segments @current_segment = current_segment end def block if @style == :fancy fancy elsif @style == :fast fast elsif @style == :infinite infinite else nil end end private def fancy require 'ruby-progressbar' title = (@segments == 1 ? \ 'Progress' : "Segment [#{@current_segment}/#{@segments}]") progressbar = ProgressBar.create :title => title, :total => 100, :format => '%t: |%B| %p%% [%E ]' read = 0 percentage = 0 time = Time.now.to_f last_time = Time.now.to_f Proc.new do |total, bytes| next if total == 0 read += bytes newt = Time.now.to_f if newt - last_time > 1 last_time = newt percentage = (read*100/total) kbs = "%0.2f" % (read*8/((Time.now.to_f - time)*1024*1024)) progressbar.title = " [#{kbs} Mb/s] #{title}" progressbar.progress = percentage unless percentage > 100 end progressbar.finish if (progressbar.progress < 100) and \ read >= total end end def infinite read = 0 time = Time.now.to_f Proc.new do |tbytes, bytes| read += bytes kbs = "%0.2f" % (read*8/((Time.now.to_f - time)*1024*1024)) print "Progress (unknown total size): #{humanize_bytes(read).ljust(10)} read (#{kbs} Mb/s)".ljust(60) print "\r" end end def fast title = (@segments == 1) ? ' ' : \ " [#{@current_segment}/#{@segments}]" read = 0 progressbar_finished = false time = Time.now.to_f Proc.new do |tbytes, bytes| read += bytes percentage = ((read*100.0/tbytes)) kbs = "%0.2f" % (read*8/((Time.now.to_f - time)*1024*1024)) print "\r" print "Progress (#{percentage.round}%) #{kbs} Mb/s#{title}: " print "#{humanize_bytes(read)} read" if (read + bytes) >= tbytes and !progressbar_finished progressbar_finished = true percentage = 100 print "\r" print "Progress (#{percentage.round}%) #{title}: " puts end end end end end
rubiojr/cifrado
lib/cifrado/cli/progressbar.rb
Ruby
mit
2,455
console.log("Hello space !");
seraum/nectarjs
example/with space.js
JavaScript
mit
29
require 'bio-ucsc' describe "Bio::Ucsc::Hg18::EncodeNhgriDnaseHsChipRawHepG2" do describe "#find_by_interval" do context "given range chr1:1-150,000,000" do it 'returns a record (r.chrom == "chr1")' do Bio::Ucsc::Hg18::DBConnection.default Bio::Ucsc::Hg18::DBConnection.connect i = Bio::GenomicInterval.parse("chr1:1-150,000,000") r = Bio::Ucsc::Hg18::EncodeNhgriDnaseHsChipRawHepG2.find_by_interval(i) r.chrom.should == "chr1" end end end end
misshie/bioruby-ucsc-api
spec/hg18/encodenhgridnasehschiprawhepg2_spec.rb
Ruby
mit
510
<?php /* V4.990 11 July 2008 (c) 2000-2008 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. Set tabs to 4 for best viewing. Latest version is available at http://adodb.sourceforge.net Support Borland Interbase 6.5 and later */ // security - hide paths if (!defined('ADODB_DIR')) die(); include_once(ADODB_DIR."/drivers/adodb-ibase.inc.php"); class ADODB_borland_ibase extends ADODB_ibase { var $databaseType = "borland_ibase"; function ADODB_borland_ibase() { $this->ADODB_ibase(); } function BeginTrans() { if ($this->transOff) return true; $this->transCnt += 1; $this->autoCommit = false; $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID); return $this->_transactionID; } function ServerInfo() { $arr['dialect'] = $this->dialect; switch($arr['dialect']) { case '': case '1': $s = 'Interbase 6.5, Dialect 1'; break; case '2': $s = 'Interbase 6.5, Dialect 2'; break; default: case '3': $s = 'Interbase 6.5, Dialect 3'; break; } $arr['version'] = '6.5'; $arr['description'] = $s; return $arr; } // Note that Interbase 6.5 uses ROWS instead - don't you love forking wars! // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2 // Firebird uses // SELECT FIRST 5 SKIP 2 col1, col2 FROM TABLE function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) { if ($nrows > 0) { if ($offset <= 0) $str = " ROWS $nrows "; else { $a = $offset+1; $b = $offset+$nrows; $str = " ROWS $a TO $b"; } } else { // ok, skip $a = $offset + 1; $str = " ROWS $a TO 999999999"; // 999 million } $sql .= $str; return ($secs2cache) ? $this->CacheExecute($secs2cache,$sql,$inputarr) : $this->Execute($sql,$inputarr); } }; class ADORecordSet_borland_ibase extends ADORecordSet_ibase { var $databaseType = "borland_ibase"; function ADORecordSet_borland_ibase($id,$mode=false) { $this->ADORecordSet_ibase($id,$mode); } } ?>
N3X15/ATBBS-Plus
includes/3rdParty/adodb/drivers/adodb-borland_ibase.inc.php
PHP
mit
2,248
'use strict'; const Input = require('./input'), Level = require('./level'), StartScreen = require('./start-screen'), LevelEnding = require('./level-ending'), GameEnding = require('./game-ending'), Sound = require('./sound'), FpsCounter = require('./fps-counter'); const config = require('./config'), stats = require('./stats'), eventBus = require('./event-bus'); Window.meow = () => { eventBus.fire({ name: 'event.level.end'}); }; class Game { constructor(stage, renderer) { this._stage = stage; this._renderer = renderer; this._input = new Input(); this._startScreen = new StartScreen(stage, this._input); this._levelEnding = new LevelEnding(stage, renderer, this._input); this._gameEnding = new GameEnding(stage); this._sound = new Sound(this._stage); this._fpsCounter = new FpsCounter(this._stage, this._input); this._level = null; this._levelNumber = 0; this._mazeOrder = []; this._lastStep = Date.now(); this._state = 'initialized'; } start() { document.body.appendChild(this._renderer.view); this._input.start(); stats.start(); this._sound.start(); this._fpsCounter.start(); this._fillMazeOrder(); eventBus.register('event.startscreen.end', () => { this._switchState('level-starting'); }); eventBus.register('event.level.end', () => { this._switchState('level-ending'); }); eventBus.register('event.level.ending.readyfornext', () => { this._switchState('level-starting'); }); eventBus.register('event.level.ending.lastlevel', () => { this._switchState('game-ending'); }); this._switchState('startscreen-active'); } /** * Not sure if this will ever be called. */ stop() { this._level.stop(); stats.stop(); this._sound.stop(); this._fpsCounter.stop(); } draw() { this._renderer.render(this._stage); this._fpsCounter.stepRender(); } step() { let elapsed = this._calculateElapsed(); switch (this._state) { case 'initialized': break; case 'startscreen-active': this._startScreen.step(elapsed); break; case 'level-starting': this._level.step(elapsed); if (this._level.checkForEndLevelCondition()) { eventBus.fire({ name: 'event.level.end' }); } break; case 'level-ending': this._levelEnding.step(elapsed); break; case 'game-ending': this._gameEnding.step(elapsed); break; } this._sound.step(elapsed); this._fpsCounter.step(elapsed); this._resortStageChildren(); } _fillMazeOrder() { for (let num = 0; num < config.mazes.length; num++) { this._mazeOrder.push(num); } shuffleArray(this._mazeOrder); } _switchState(state) { this._state = state; switch (state) { case 'initialized': // Do nothing break; case 'startscreen-active': this._startScreen.start(); break; case 'level-starting': // TODO: Determine if that was the final level let currentLevel = this._level; if (currentLevel !== null && currentLevel !== undefined) { this._levelNumber = currentLevel.number + 1; } else { this._levelNumber = 0; } this._level = new Level( this._levelNumber, this._input, this._stage, this._levelEnding, this._mazeOrder[this._levelNumber] ); this._level.start(); break; case 'level-ending': this._levelEnding.start(this._levelNumber); this._level.stop(); break; case 'game-ending': this._gameEnding.start(); break; } } _calculateElapsed() { let elapsed = Date.now() - this._lastStep; if (elapsed > 1000) { elapsed = 1000; // enforce speed limit } this._lastStep = Date.now(); return elapsed; } /** * Re-sort the stage children to their z-order, if any. * @private */ _resortStageChildren() { this._stage.children.sort((a, b) => { if (a.z === undefined || a.z === null) { return -1; } else if (b.z === undefined || b.z === null) { return 1; } else { return b.z - a.z; } }); } } module.exports = Game; /** * Fischer-Yates Algorithm * http://stackoverflow.com/a/6274398/738081 */ function shuffleArray(arr) { var counter = arr.length, temp, index; // While there are elements in the array while (counter > 0) { // Pick a random index index = Math.floor(Math.random() * counter); // Decrease counter by 1 counter--; // And swap the last element with it temp = arr[counter]; arr[counter] = arr[index]; arr[index] = temp; } return arr; }
hiddenwaffle/mazing
src/js/game.js
JavaScript
mit
5,667
extern zend_class_entry *zendframework_view_exception_invalidhelperexception_ce; ZEPHIR_INIT_CLASS(ZendFramework_View_Exception_InvalidHelperException);
golovanov/php-ext-zendframework
php-ext-zendframework/ext/zendframework/view/exception/invalidhelperexception.zep.h
C
mit
156
<?php class Passport extends CI_Controller { public function __construct(){ parent::__construct(); $this->load->model('user_model'); $this->load->helper('url_helper'); $this->app_id = $this->config->item('app_id'); $this->app_secret = $this->config->item('app_secret'); $this->template_id = $this->config->item('passport_template_id'); } public function index() { $thisPageUri = base_url("passport/index"); $redirect_uri = $this->input->get('redirect_uri', TRUE); $state = $this->input->get('state', TRUE); $code = $this->input->get('code', TRUE); //记录回跳页面的cookie if($redirect_uri) { setcookie("redirect_uri", $_GET['redirect_uri'], time()+3600, '/', 'www.szuswzx.com'); } if($state) { switch ($state) { case 'checkuser': { if ($code) { $json = json_decode($this->http_get('https://api.weixin.qq.com/sns/oauth2/access_token?appid='.$this->app_id.'&secret='.$this->app_secret.'&code='.$code.'&grant_type=authorization_code'), true); $openid = $json['openid']; //$userinfo = $db->get_one('sdbk_user', array('openid' => $openid)); $userinfo = $this->user_model->get_user($openid); if (count($userinfo) == 0) { //用户第一次使用百科功能,请求用户授权,保存用户信息 header('Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$this->app_id.'&redirect_uri='.$thisPageUri.'&response_type=code&scope=snsapi_userinfo&state=login#wechat_redirect'); exit(); } setcookie("openid", $openid, time() + 3600, '/', 'www.szuswzx.com'); setcookie("secret", md5($openid), time() + 3600, '/', 'www.szuswzx.com'); } else { header('Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$this->app_id.'&redirect_uri='.$thisPageUri.'&response_type=code&scope=snsapi_base&state=checkuser#wechat_redirect'); exit(); } break; } case 'login': //用户注册 { if ($code) { $json = json_decode($this->http_get('https://api.weixin.qq.com/sns/oauth2/access_token?appid='.$this->app_id.'&secret='.$this->app_secret.'&code='.$code.'&grant_type=authorization_code'),true); $openid = $json['openid']; $access_token = $json['access_token']; $userinfo = json_decode($this->http_get('https://api.weixin.qq.com/sns/userinfo?access_token='.$access_token.'&openid='.$openid.'&lang=zh_CN'),true); if (isset($userinfo['errcode'])) { echo $userinfo['errcode']; exit; } $nickname = str_replace('\'', '', $userinfo['nickname']); $sex = $userinfo['sex']; $province = $userinfo['province']; $city = $userinfo['city']; $country = $userinfo['country']; $headimgurl = $userinfo['headimgurl']; $unionid = isset($userinfo['unionid']) ? $userinfo['unionid'] : ''; $time = time(); $in = array( 'openid' => $openid, 'nickname' => $nickname, 'province' => $province, 'city' => $city, 'country' => $country, 'headimgurl' => $headimgurl, 'unionid' => $unionid, 'time' => $time ); //$done = $Mysql->Insert('sdbk_user','openid,nickname,province,city,country,headimgurl,unionid,time',"'$openid','$nickname','$province','$city','$country','$headimgurl','$unionid','$time'"); $this->user_model->insert_user($in); setcookie('openid', $openid, time() + 3600, '/', 'www.szuswzx.com'); setcookie('secret', md5($openid), time() + 3600, '/', 'www.szuswzx.com'); header('Location: '.$thisPageUri); exit(); } else { echo "2"; } break; } } } if (isset($_COOKIE["openid"]) && isset($_COOKIE['secret'])) { if ($_COOKIE["secret"] != md5($_COOKIE["openid"])) { header('Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$this->app_id.'&redirect_uri='.$thisPageUri.'&response_type=code&scope=snsapi_base&state=checkuser#wechat_redirect'); exit(); } $openid = $_COOKIE["openid"]; //$userinfo = $db->get_one('sdbk_user', array('openid' => $openid)); $userinfo = $this->user_model->get_user($openid); } else { header('Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$this->app_id.'&redirect_uri='.$thisPageUri.'&response_type=code&scope=snsapi_base&state=checkuser#wechat_redirect'); exit(); } //用户已经将校园卡绑定 if ($userinfo['studentNo'] != 0) { header('Location: '.base_url("passport/bind").'?ticket=LOGIN'); exit(); } if ($userinfo['nickname'] == null) { setcookie('openid', '', time() - 3600); setcookie('secret', '', time() - 3600); } //用户已经注册,但是尚未将校园卡绑定 $data['userinfo'] = $userinfo; $this->load->view('passport/bind', $data); } //将微信号与校园卡绑定 public function bind() { $thisPageUri = base_url("passport/index"); $ticket = $this->input->get('ticket', TRUE); $status = 0; $userinfo = array(); if(isset($_COOKIE['openid'])) { $openid = $_COOKIE['openid']; //$userinfo = $db->get_one('sdbk_user', array('openid' => $openid)); $userinfo = $this->user_model->get_user($openid); if(!$userinfo) { echo 'error'; exit(); } } else { header('Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$this->app_id.'&redirect_uri='.$thisPageUri.'&response_type=code&scope=snsapi_userinfo&state=login#wechat_redirect'); exit(); } if($ticket) { if ($userinfo['studentNo'] == 0) { $CASserver = 'https://auth.szu.edu.cn/cas.aspx/'; //深圳大学统一身份认证URL**不能修改** $ReturnURL = 'http://swzx.szu.edu.cn/sdbk'; //用户认证后跳回到您的网站,根据实际情况修改 $URL = $CASserver . 'serviceValidate?ticket=' . $ticket . '&service='. $ReturnURL; $test = file_get_contents($URL); $userinfo['status'] = 1; $userinfo['data']['studentName']= $this->RegexLog($test, "PName"); //姓名 $userinfo['data']['org']= $this->RegexLog($test, "OrgName"); //单位 $userinfo['data']['sex']= $this->RegexLog($test, "SexName"); //性别 $userinfo['data']['studentNo']= $this->RegexLog($test, "StudentNo"); //学号 $userinfo['data']['icAccount']= $this->RegexLog($test, "ICAccount"); //校园卡号 // $userinfo['data']['personalId']= $this->RegexLog($test, "personalid"); //身份证号 $userinfo['data']['phone']= $this->RegexLog($test, "mobile"); $cdt = array('openid' => $userinfo['openid']); $cdt1 = array('icAccount' => $userinfo['data']['icAccount']); $isBind = $this->user_model->get_users($cdt1); if ($isBind) { $status = 2; } else { //$updating = $db->update('sdbk_user', $userinfo['data'], $cdt); $updating = $this->user_model->update_user($userinfo['data'], $cdt); if ($updating != 0) { $this->load->model('wechat_model'); $access_token = $this->wechat_model->get_access_token(); $this->load->library('weixin', $config = array('AppId' => $this->app_id, 'AppSecret' => $this->app_secret)); $templeurl = $thisPageUri; $textPic = array( 'first' => array('value'=> '您已经成功将'.$userinfo['data']['studentName'].'的校园卡与深大百科通行证绑定!\n', 'color'=> '#df4848'), 'keyword1' => array('value'=> $userinfo['data']['icAccount'], 'color'=> '#408ec0'), 'keyword2' => array('value'=> date("Y-m-d h:i:s", time()), 'color'=> '#333'), 'remark' => array('value'=> '\n如果不是本人操作,请联系事务君(微信号:szushiwujun)取消绑定。', 'color'=> '#bbbbbb'), ); $this->weixin->pushtemple($access_token, $userinfo['openid'], $this->template_id, $templeurl, $textPic); if (isset($_COOKIE['redirect_uri'])) { $redirect_uri = urldecode($_COOKIE['redirect_uri']); setcookie('redirect_uri', '', time() - 3600); header('Location: '.$redirect_uri); exit(); } $status = 1; } else { $status = 0; } } } else { if (isset($_COOKIE['redirect_uri'])) { $redirect_uri = urldecode($_COOKIE['redirect_uri']); setcookie('redirect_uri', '', time() - 3600); header('Location: '.$redirect_uri); exit(); } $status = 1; } } else { header("Location: ".$thisPageUri); exit(); } //显示绑定结果 $data = array(); $data['userinfo']['headimgurl'] = $userinfo['headimgurl']; $data['userinfo']['nickname'] = $userinfo['nickname']; $data['status'] = $status; $this->load->view('passport/bind_result',$data); } function http_get($url) { $oCurl = curl_init(); if(stripos($url,"https://") !== FALSE) { curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($oCurl, CURLOPT_SSLVERSION, 1); //CURL_SSLVERSION_TLSv1 } curl_setopt($oCurl, CURLOPT_URL, $url); curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1); $sContent = curl_exec($oCurl); $aStatus = curl_getinfo($oCurl); curl_close($oCurl); if(intval($aStatus["http_code"]) == 200) { return $sContent; } else { return false; } } function RegexLog($xmlString, $subStr) { preg_match('/<cas:'.$subStr.'>(.*)<\/cas:'.$subStr.'>/i', $xmlString, $matches); return $matches[1]; } }
szuswzx/sdbk
application/controllers/Passport.php
PHP
mit
9,558
export { default } from 'ember-fhir/models/encounter-class-history';
davekago/ember-fhir
app/models/encounter-class-history.js
JavaScript
mit
68
/* Generates a deck of cards. You can swap cards between the "main" deck and other decks (which can represent players, dealers etc) Sebastian Lenton 2013 */ "use strict"; //globals var cardValues = [ 'ace', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'jack', 'queen', 'king' ]; var suits = [ 'hearts', 'diamonds', 'spades', 'clubs' ]; var deckCardOffset = 2; function Card( suit, value, index ) { this.index = index; this.suit = suit; this.value = value; this.flipped = false; this.getCardString = function( offset ) { return '<div id="card' + this.index + '" style="top:-' + ( offset * deckCardOffset ) + 'px;" class="card ' + this.suit + '"><p>' + this.value + '</p></div>'; }; this.identify = function() { return this.suit + ' ' + this.value + ' ' + this.index; } } function Deck( name ) { this.cards = []; this.name = name; this.generate = function() { var counter = 0; for( var j = 0; j < suits.length; j++ ) { for( var i = 0; i < cardValues.length; i++ ) { this.cards.push( new Card( suits[ j ], cardValues[ i ], counter ) ); //console.log( this.cards[ this.howMany( true ) ].identify() ); } } }; this.shuffle = function() { this.cards = shuffle( this.cards ); }; this.howMany = function( countFromZero ) { var length = this.cards.length; if( countFromZero ) { return length - 1; } else { return length; } }; this.passCards = function( deck, amount ) { //this could be more efficient if( !amount ) { amount = 1; } for( var i = 0; i < amount; i++ ) { var cardToPass = this.cards.pop(); deck.cards.push( cardToPass ); } } this.renderAll = function() { var deckString = ''; for( var j = 0; j < this.cards.length; j++ ) { deckString += this.cards[ j ].getCardString( j ); } deckString = '<div id="deck' + this.name + '" class="deck">' + deckString + '</div>'; $( 'body' ).append( deckString ); } } var deck = new Deck( 'DefaultDeck' ); var startDeck = new Deck( 'StartDeck' ); var eggDeck = new Deck( 'EggDeck' ); deck.generate(); deck.passCards( eggDeck, 20 ); //deck.passCards( startDeck ); //need to stop too large amounts throwing errors deck.renderAll(); startDeck.renderAll(); eggDeck.renderAll(); $( '.card' ).click( function() { console.log( 'clicked;' ); $( this ).toggleClass( 'flipped' ); } ) /********************* HELPERS *********************/ function shuffle(array) { var counter = array.length, temp, index; // While there are elements in the array while (counter > 0) { // Pick a random index index = (Math.random() * counter--) | 0; // And swap the last element with it temp = array[counter]; array[counter] = array[index]; array[index] = temp; } return array; }
sebastianlenton/Sebs-Cards
js/main.js
JavaScript
mit
2,765
<?php namespace AppBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use AppBundle\Entity\Ordenantzaparrafoa; use AppBundle\Form\OrdenantzaparrafoaType; /** * Ordenantzaparrafoa controller. * * @Route("/admin/ordenantzaparrafoa") */ class OrdenantzaparrafoaController extends Controller { /** * @Route("/up/{id}", name="admin_ordenantzaparrafoa_up") * @Method("GET") */ public function upAction(Request $request, Ordenantzaparrafoa $op) { $em = $this->getDoctrine()->getManager(); $op->setOrdena($op->getOrdena() - 1); $em->persist($op); $em->flush(); return $this->redirect($request->headers->get('referer')); } /** * @Route("/down/{id}", name="admin_ordenantzaparrafoa_down") * @Method("GET") */ public function downAction(Request $request, Ordenantzaparrafoa $op) { $em = $this->getDoctrine()->getManager(); $op->setOrdena($op->getOrdena() + 1); $em->persist($op); $em->flush(); return $this->redirect($request->headers->get('referer')); } /** * Creates a new Ordenantzaparrafoa entity. * * @Route("/new/{ordenantzaid}", name="admin_ordenantzaparrafoa_new") * @Method({"GET", "POST"}) */ public function newAction(Request $request, $ordenantzaid) { $em = $this->getDoctrine(); $ordenantzaparrafoa = new Ordenantzaparrafoa(); $ordenantza = $em->getRepository( 'AppBundle:Ordenantza' )->find( $ordenantzaid ); $ordenantzaparrafoa->setOrdenantza( $ordenantza ); $ordenantzaparrafoa->setUdala( $this->getUser()->getUdala() ); $form = $this->createForm('AppBundle\Form\OrdenantzaparrafoaType', $ordenantzaparrafoa); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($ordenantzaparrafoa); $em->flush(); return $this->redirect( $request->headers->get( 'referer' ) . '#ordenantzaparrafoa'.$ordenantzaparrafoa->getId()); } return $this->render('ordenantzaparrafoa/new.html.twig', array( 'ordenantzaparrafoa' => $ordenantzaparrafoa, 'ordenantzaid' => $ordenantzaid, 'form' => $form->createView(), )); } /** * * @Route("/ezabatu/{id}", name="admin_ordenantzaparrafoa_ezabatu") * @Method("GET") */ public function ezabatuAction(Ordenantzaparrafoa $ordenantzaparrafoa) { $deleteForm = $this->createDeleteForm($ordenantzaparrafoa); return $this->render('ordenantzaparrafoa/_ordenantzaparrafoadeleteform.html.twig', array( 'delete_form' => $deleteForm->createView(), 'id' => $ordenantzaparrafoa->getId() )); } /** * Deletes a Ordenantzaparrafoa entity. * * @Route("/{id}", name="admin_ordenantzaparrafoa_delete") * @Method("DELETE") */ public function deleteAction(Request $request, Ordenantzaparrafoa $ordenantzaparrafoa) { $form = $this->createDeleteForm($ordenantzaparrafoa); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->remove($ordenantzaparrafoa); $em->flush(); } return $this->redirect($request->headers->get('referer')); } /** * Creates a form to delete a Ordenantzaparrafoa entity. * * @param Ordenantzaparrafoa $ordenantzaparrafoa The Ordenantzaparrafoa entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(Ordenantzaparrafoa $ordenantzaparrafoa) { return $this->createFormBuilder() ->setAction($this->generateUrl('admin_ordenantzaparrafoa_delete', array('id' => $ordenantzaparrafoa->getId()))) ->setMethod('DELETE') ->getForm() ; } }
PasaiakoUdala/ZergaOrdenantzak
src/AppBundle/Controller/OrdenantzaparrafoaController.php
PHP
mit
4,235
# Makefile for Hagstrom time-interpolation fortran drivers & MEX. Unix/MAC only. # Alex Barnett 12/16/16 # # Note the MEX interface is to Alex's f77 versions, eg interpmatnoalloc which # uses already-allocated and fixed size incoming umat, upmat arrays FC=gfortran FLIBS= -llapack -lblas # for driver linking (see MEX libs/flags below) #FFLAGS=-fPIC -O2 # makes no difference... FFLAGS=-fPIC -O3 -march=native -funroll-loops # Change this to location of MATLAB's command line mex executable: # (For a Mac system, this is something of the form # /Applications/MATLAB_R2014a.app/bin/mex ) MEX=mex # If you want to rebuild the MEX gateway for some reason, set this to location # of your MWrap executable: # (after installing mwrap from http://www.cs.cornell.edu/~bindel/sw/mwrap ) MWRAP=mwrap default: mexfile # usual: compile a MEX interface (not run mwrap) #default: mwrapclean mexfile # Barnett default runs mwrap # generic fortran modules %.o: %.f90 $(FC) -c $(FFLAGS) $< %.mod: %.f90 $(FC) -c $(FFLAGS) $< # needed for some weird f90 thing (actually specfuns.mod is produced)... volterra.o: SpecFuns.mod # this rule makes and runs all Tom's f90 drivers... fdrivers: TestInterp.f90 TestInterpMat.f90 dspline.o volterra.o $(FC) $(FFLAGS) TestInterp.f90 dspline.o $(FLIBS) -o TestInterp ./TestInterp $(FC) $(FFLAGS) TestInterpMat.f90 dspline.o $(FLIBS) -o TestInterpMat ./TestInterpMat $(FC) $(FFLAGS) volterrasolve.f90 dspline.o volterra.o SpecFuns.o $(FLIBS) -o volterrasolve ./volterrasolve # to remake the C file that MEX will compile... (not needed by basic user) gateway.c: gateway.mw Makefile $(MWRAP) -c99complex -mex gateway -mb -list gateway.mw $(MWRAP) -c99complex -mex gateway -c gateway.c gateway.mw # Hack to link to F90 modules, which mwrap seems not to. Replaces 2 lines, # in particular the f2c line starting #define MWF77_interpmat... sed -i 's/interpmatnoalloc_/__dspline_MOD_interpmatnoalloc/' gateway.c sed -i 's/extrapnoalloc_/__dspline_MOD_extrapnoalloc/' gateway.c # to do the MEX compilation via MATLAB's compiler... mexfile: gateway.c dspline.o Makefile $(MEX) gateway.c dspline.o -largeArrayDims -lgfortran -lm # remove objects, executables, outputs, but not the mwrap-generated stuff... clean: rm -f *.o *.mod *.out *.mex* fort.* # clean the stuff that mwrap makes... (careful; not needed by basic user!) mwrapclean: clean rm -f interpmat.m extrap.m gateway.c
ahbarnett/BIE3D
timedomainwaveeqn/timeinterp/Makefile
Makefile
mit
2,442
package de.rub.lafaag.binaryclock; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
DarthPanda69/BinaryClock
app/src/test/java/de/rub/lafaag/binaryclock/ExampleUnitTest.java
Java
mit
403
require 'oj' require 'active_support/core_ext/module/delegation' require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/hash' require 'active_support/core_ext/array/conversions' require 'active_support/core_ext/hash/keys' require 'enumerable_observer' require 'concurrent' module JSONAPIonify::Structure module Objects class Base include JSONAPIonify::Callbacks include Enumerable include EnumerableObserver include Helpers::InheritsOrigin define_callbacks :initialize, :validation include Helpers::ObjectSetters include Helpers::Validations include Helpers::ObjectDefaults # Attributes attr_reader :object, :parent delegate :cache_store, to: JSONAPIonify delegate(*(Hash.instance_methods - instance_methods), to: :object) before_initialize do observe(self.object).added do |items| items.each do |_, value| value.instance_variable_set(:@parent, self) unless value.frozen? end end end def self.from_hash(hash) new hash.deep_symbolize_keys end def self.define_order(*keys) define_singleton_method :ordered_keys do keys end end define_order def self.from_json(json) from_hash Oj.load json end # Initialize the object def initialize(**attributes) @object = Hash.new run_callbacks :initialize do attributes.each do |k, v| self[k] = v end end end def copy self.class.from_hash to_h end def ==(other) return unless other.respond_to? :[] object.all? do |k, v| other[k] == v end end def ===(other) other.class == self.class && self == other end # Compile as json attr_reader :errors, :warnings def compile(validate: true) self.validate if validate && !JSONAPIonify.validation_disabled? to_h end def as_json(**opts) compile(**opts).deep_stringify_keys end def to_json(**opts) Oj.dump as_json(**opts) end def signature "#{self.class.name}:#{Digest::SHA2.hexdigest to_h.to_s}" end def to_h ordered_object = [ *object.slice(*self.class.ordered_keys), *object.except(*self.class.ordered_keys) ] ordered_object.reduce({}) do |hash, (k, v)| hash[k] = case v when Objects::Base v.to_h when Hash v.deep_stringify_keys when Collections::Base v.collect_hashes else v end hash end end def compile!(*args) compile(*args).tap do if (wrns = warnings).present? warn validation_error wrns.all_messages.to_sentence + '.' end if (errs = errors).present? raise validation_error errs.all_messages.to_sentence + '.' end end end def validate object.values.each { |val| val.validate if val.respond_to? :validate } [errors, warnings].each(&:clear) @errors, @warnings = cache_store.fetch(signature) do run_callbacks :validation do collect_child_errors collect_child_warnings end [errors, warnings] end errors.blank? end def errors @errors ||= Helpers::Errors.new end def warnings @warnings ||= Helpers::Errors.new end def pretty_json JSON.pretty_generate as_json end def inspect hash_inspect = to_h.to_s.gsub( /\:([a-zA-Z_-]+)=>/, '\\1: ' )[1..-2].gsub( /\{([^\s])/, '{ \\1').gsub(/([^\s])\}/, '\\1 }' ) to_s.sub(/>$/, " #{hash_inspect}>") end private def collect_child_errors object.each do |key, value| next unless value.respond_to? :errors value.errors.each do |error_key, messages| errors.replace [key, error_key].join('/'), messages end end end def collect_child_warnings object.each do |key, value| next unless value.respond_to? :warnings value.warnings.each do |warning_key, messages| warnings.replace [key, warning_key].join('/'), messages end end end end end end
brandfolder/jsonapionify
lib/jsonapionify/structure/objects/base.rb
Ruby
mit
4,581
<?php namespace Couture\TailleurBundle\Entity; //use FOS\UserBundle\Model\User as BaseUser; use Sonata\UserBundle\Entity\BaseUser as BaseUser; use Doctrine\ORM\Mapping as ORM; use Couture\CoutureBundle\Entity\Couture as Couture ; /** * Tailleur * * @ORM\Table(name="tailleur") * @ORM\Entity */ class Tailleur extends BaseUser { /** * @var integer * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ protected $id; /** * @var string * * @ORM\Column(name="nom", type="string", length=255, nullable=true) */ private $nom; /** * @var string * * @ORM\Column(name="prenom", type="string", length=255, nullable=true) */ private $prenom; /** * @var string * * @ORM\Column(name="telephone", type="string", length=255, nullable=true) */ private $telephone; /** * @var \DateTime * * @ORM\Column(name="dateEmbauche", type="date", nullable=true) */ private $dateembauche; /** * @var string * * @ORM\Column(name="salaire", type="decimal", precision=10, scale=0, nullable=true) */ private $salaire; /** * @var integer * * @ORM\Column(name="user", type="integer", nullable=true) */ private $user; /** * @var \DateTime * * @ORM\Column(name="datemod", type="datetime", nullable=true) */ private $datemod; /** * @var integer * * @ORM\Column(name="idUser", type="integer", nullable=true) */ private $iduser; /** * @var \DateTime * * @ORM\Column(name="datec", type="datetime", nullable=true) */ private $datec; public function __construct() { parent::__construct(); $this->datec = new \DateTime(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set nom * * @param string $nom * @return Tailleur */ public function setNom($nom) { $this->nom = $nom; return $this; } /** * Get nom * * @return string */ public function getNom() { return $this->nom; } /** * Set prenom * * @param string $prenom * @return Tailleur */ public function setPrenom($prenom) { $this->prenom = $prenom; return $this; } /** * Get prenom * * @return string */ public function getPrenom() { return $this->prenom; } /** * Set telephone * * @param string $telephone * @return Tailleur */ public function setTelephone($telephone) { $this->telephone = $telephone; return $this; } /** * Get telephone * * @return string */ public function getTelephone() { return $this->telephone; } /** * Set email * * @param string $email * @return Tailleur */ public function setEmail($email) { $this->email = $email; return $this; } /** * Get email * * @return string */ public function getEmail() { return $this->email; } /** * Set login * * @param string $login * @return Tailleur */ public function setLogin($login) { $this->login = $login; return $this; } /** * Get login * * @return string */ public function getLogin() { return $this->login; } /** * Set password * * @param string $password * @return Tailleur */ public function setPassword($password) { $this->password = $password; return $this; } /** * Get password * * @return string */ public function getPassword() { return $this->password; } /** * Set dateembauche * * @param \DateTime $dateembauche * @return Tailleur */ public function setDateembauche($dateembauche) { $this->dateembauche = $dateembauche; return $this; } /** * Get dateembauche * * @return \DateTime */ public function getDateembauche() { return $this->dateembauche; } /** * Set salaire * * @param string $salaire * @return Tailleur */ public function setSalaire($salaire) { $this->salaire = $salaire; return $this; } /** * Get salaire * * @return string */ public function getSalaire() { return $this->salaire; } /** * Set user * * @param integer $user * @return Tailleur */ public function setUser($user) { $this->user = $user; return $this; } /** * Get user * * @return integer */ public function getUser() { return $this->user; } /** * Set datemod * * @param \DateTime $datemod * @return Tailleur */ public function setDatemod($datemod) { $this->datemod = $datemod; return $this; } /** * Get datemod * * @return \DateTime */ public function getDatemod() { return $this->datemod; } /** * Set iduser * * @param integer $iduser * @return Tailleur */ public function setIduser($iduser) { $this->iduser = $iduser; return $this; } /** * Get iduser * * @return integer */ public function getIduser() { return $this->iduser; } /** * Set datec * * @param \DateTime $datec * @return Tailleur */ public function setDatec($datec) { $this->datec = $datec; return $this; } /** * Get datec * * @return \DateTime */ public function getDatec() { return $this->datec; } public function getStatistique($em) { $req="SELECT COUNT(*), DATE(datec) AS valeur " . "FROM CoutureCoutureBundle:Couture " ; // . "GROUP BY valeur " ; // $couture = new Couture(); // $query = $couture->createQueryBuilder('ct') // ->select('count(ct) as nb, DATE(datec) as valeur') // ->groupBy('valeur') ; //->orderBy('v.date', 'ASC') ; // $query->setParameters(array( // 'studentId' => $studentId, // 'PaymentData' => $compareTo->format('Y-m-d')) ); // // $query->setParameter(1, $id); $query = $em->createQuery($req); $query->groupBy('valeur'); $coutures = $query->getResult(); \Doctrine\Common\Util\Debug::dump($coutures);die; //return $coutures; } /*public function __toString() { return ($this->getTitle() === null) ? 'Untitled news' : (string) $this->getTitle(); } */ }
teleinformatique/spiderman
src/Couture/TailleurBundle/Entity/Tailleur.php
PHP
mit
7,342
using System; static class LogLine { public static string Message(string logLine) { throw new NotImplementedException("Please implement the (static) LogLine.Message() method"); } public static string LogLevel(string logLine) { throw new NotImplementedException("Please implement the (static) LogLine.LogLevel() method"); } public static string Reformat(string logLine) { throw new NotImplementedException("Please implement the (static) LogLine.Reformat() method"); } }
exercism/xcsharp
exercises/concept/log-levels/LogLevels.cs
C#
mit
532
## Web_Study This is a repo hosted for my practice of learning web development
medifle/Web_Study
README.md
Markdown
mit
80
/* ----------------------------------------------------------------------------------------------- * BuddyTok Application * ----------------------------------------------------------------------------------------------*/ /* global jQuery, _, OT, Backbone, log, alert */ /* global LocalUser, BuddyList, InvitationList, UserInfoView, ConnectModalView, BuddyListView */ /* global InvitationListView, ChatView */ // Declare dependencies and prevent leaking into global scope (function( exports, doc, // Environment $, _, OT, Backbone, log, // External libraries LocalUser, // Application modules BuddyList, InvitationList, UserInfoView, ConnectModalView, BuddyListView, InvitationListView, ChatView, undefined ) { var App = exports.App = { // Models presenceSession: null, me: null, buddyList: null, invitationList: null, // Views userInfoView: null, connectModalView: null, buddyListView: null, invitationListView: null, chatView: null, initialize: function() { // Presence session initialization App.once('presenceSessionReady', App.presenceSessionReady, this); App.retrievePresenceConfig(); // Model initialization App.me = new LocalUser({}, { dispatcher: App }); App.buddyList = new BuddyList([], { dispatcher: App }); App.invitationList = new InvitationList([], { dispatcher: App }); // View initialization App.connectModalView = new ConnectModalView({ model: App.me, el: $('#connect-modal'), dispatcher: App }); App.userInfoView = new UserInfoView({ model: App.me }); App.buddyListView = new BuddyListView({ collection: App.buddyList, dispatcher: App }); App.invitationListView = new InvitationListView({ collection: App.invitationList }); App.chatView = new ChatView({ dispatcher: App, localUser: App.me }); $(doc).ready(App.domReady); }, retrievePresenceConfig: function() { $.get('/presence') .done(function(presenceConfig) { log.info('App: presenceSessionReady'); App.presenceSession = OT.initSession(presenceConfig.apiKey, presenceConfig.sessionId); App.trigger('presenceSessionReady', App.presenceSession); }) .fail(function(jqXHR, responseText, errorThrown) { log.error('App: presenceSessionReady failed', errorThrown); alert('Could not retreive the presence configuration. Please try again later'); }); }, domReady: function() { log.info('App: domReady'); // NOTE: App.connectModalView is already in the DOM and does not need to be rendered App.connectModalView.show(); App.userInfoView.render().$el.appendTo('.navbar-right'); App.buddyListView.render().$el.appendTo('.sidebar-left'); App.invitationListView.render().$el.appendTo('.row-top'); App.chatView.render().$el.appendTo('.content-right'); }, }; _.extend(App, Backbone.Events); App.initialize(); }(window, window.document, jQuery, _, OT, Backbone, log, LocalUser, BuddyList, InvitationList, UserInfoView, ConnectModalView, BuddyListView, InvitationListView, ChatView));
aoberoi/buddytok-php
web/js/app.js
JavaScript
mit
3,372
/** * AssMinus.hpp - * @author: Jonathan Beard * @version: Mon Feb 10 08:27:56 2014 */ #ifndef _ASSMINUS_HPP_ #define _ASSMINUS_HPP_ 1 #include "Assignment.hpp" namespace Node { class AssMinus : public Assignment { public: AssMinus(); virtual ~AssMinus() = default; }; } #endif /* END _ASSMINUS_HPP_ */
jonathan-beard/Raft
ASTNodes/AssMinus.hpp
C++
mit
315
.win-pivot .win-pivot-surface { height: 75vh; } .win-pivot .win-pivot-viewport { padding-top: 0px; margin-top: 98px; } .win-pivot-item .win-pivot-item-content { padding: 0px; } .hubpage header[role=banner] { position: relative; z-index: 2; } .hubpage section[role=main] { -ms-grid-row: 1; -ms-grid-row-span: 2; z-index: 1; } .hubpage .hub { margin-top: 4px; height: 100%; } .hubpage .hub .win-hub-surface { height: 100%; } .hubpage .hub .hero { -ms-high-contrast-adjust: none; background-image: url(/images/gray.png); background-size: cover; margin-left: -80px; margin-right: 80px; padding: 0; width: 780px; } .hubpage .hub .hero:-ms-lang(ar, dv, fa, he, ku-Arab, pa-Arab, prs, ps, sd-Arab, syr, ug, ur, qps-plocm) { margin-left: 80px; margin-right: -80px; } .hubpage .hub .hero .win-hub-section-header { display: none; } .hubpage .hub .section1 { width: 95vw; } .hubpage .hub .section1 .win-hub-section-content { overflow-y: hidden; } .hubpage .hub .section1 .subtext { margin-bottom: 7px; margin-top: 9px; } .hubpage .hub .section1 .title { margin-top: 13px; margin-bottom: 3px; } .hubpage .hub .section1 img { width: 260px; height: 260px; } .hubpage .hub .section2 { width: 95vw; } .hubpage .hub .section2 .win-hub-section-content { overflow-y: hidden; } .hubpage .hub .section2 .item-title { margin-bottom: 16px; } .hubpage .hub .section2 .article-header { margin-bottom: 24px; } .hubpage .hub .section3 .lvcontenthost { } .hubpage .hub .section3 { } .hubpage .hub .section3 .itemslist { height: 71vh; margin-top: -5px; margin-right: 20px; } .hubpage .hub .section3 .win-container { margin-bottom: 10px; margin-left: 0px; margin-right: 0px; } .hubpage .hub .section3 .templatecontainer { display: -ms-grid; -ms-grid-columns: 100px 1fr; min-height: 100px; width: 100%; } .hubpage .hub .section3 .templatecontainer .itemcontainer { -ms-grid-column: 2; margin-left: 15px; } .hubpage .hub .section3 .templatecontainer .itemcontainer img { max-width: 173px; width: 100%; height: auto; -ms-grid-column: 1; } .hubpage .hub .section3 .win-item { height: 144px; width: 100%; } .hubpage .hub .section3 .win-item .itemtitle { margin-bottom: 3px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .hubpage .hub .section3 .win-item img { height: 144px; width: 144px; margin-right: 12px; } .hubpage .hub .section4 { width: 97vw; } .hubpage .hub .section4 .win-hub-section-content { /*overflow-y: hidden;*/ } .hubpage .hub .section4 .top-image-row { margin-bottom: 10px; width: 100%; height: 236px; } .hubpage .hub .section4 .top-image-row img { width: 360px; height: 236px; } .hubpage .hub .section4 .sub-image-row { margin-bottom: 20px; display: -ms-flexbox; -ms-flex-flow: row nowrap; -ms-flex-pack: justify; width: 360px; } .hubpage .hub .section4 .sub-image-row img { height: 113px; width: 113px; } .hubpage .hub .section { margin-left: 20px; margin-right: 0px; } .label-extralarge { font-size: 28pt; line-height: 30pt; } .label-medium { font-size: 15pt; line-height: 17.5pt; } .label-mediummid { font-size: 15pt; line-height: 17.5pt; } @media screen and (orientation: landscape) { .win-pivot .win-pivot-surface { height: 60vh; } } .logo { height:100px; /*flex: 0 0 0;*/ /*height: 98px;*/ /*max-width: 98px;*/ background-size: cover; background-position: center center; /*background-image: url('/images/Reasonlogo.png');*/ /*position: relative;*/ -ms-grid-column: 1; padding: 0; } .sectionLVpage .templatecontainer { } .sectionLVpage .itemcontainer { max-height: 100px; } .sectionLVpage .itemcontainer h3 { font-size: 12pt; line-height: 1.5em; } .sectionLVpage .itemcontainer h4 { font-size: 10pt; padding-top: 5px; opacity: .8; } .sectionLVpage .win-container { max-height: 100px; } .section3 .sectionLVpage .win-itemsblock .win-container { margin: 0; border-bottom: 1px solid gray; } .sectionLVpage .itemcontainer .titleDiv { height: 3.5em; line-height: 1.5em; overflow: hidden; } .sectionLVpage .feedStatus .feedLoadingProgress { /*margin-left: 25vw; margin-right: auto; width: 50vw;*/ /*width: inherit;*/ margin-top: 0; margin-bottom: 0; } .fragment .sectionLVpage .feedStatus { height: 20px; margin-top: -10px; } .hubpage .hub .section3 .itemslist { /*height: 75vh;*/ }
ThorgalAegirsson/Reason-for-Windows-Phone-8.1
ProjectFreedomWP81/pages/hub/hubPhone - Copy.css
CSS
mit
4,743
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta content="Craig McClellan" name="author"> <title>Craig McClellan - T250336585801940992 </title> <link href="/assets/css/style.css" rel="stylesheet"> <link href="/assets/css/highlight.css" rel="stylesheet"> <link rel="stylesheet" href="/custom.css"> <link rel="shortcut icon" href="https://micro.blog/craigmcclellan/favicon.png" type="image/x-icon" /> <link rel="alternate" type="application/rss+xml" title="Craig McClellan" href="http://craigmcclellan.com/feed.xml" /> <link rel="alternate" type="application/json" title="Craig McClellan" href="http://craigmcclellan.com/feed.json" /> <link rel="EditURI" type="application/rsd+xml" href="/rsd.xml" /> <link rel="me" href="https://micro.blog/craigmcclellan" /> <link rel="me" href="https://twitter.com/craigmcclellan" /> <link rel="me" href="https://github.com/craigwmcclellan" /> <link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth" /> <link rel="token_endpoint" href="https://micro.blog/indieauth/token" /> <link rel="micropub" href="https://micro.blog/micropub" /> <link rel="webmention" href="https://micro.blog/webmention" /> <link rel="subscribe" href="https://micro.blog/users/follow" /> </head> <body> <nav class="main-nav"> <a class="normal" href="/"> <span class="arrow">←</span> Home</a> <a href="/archive/">Archive</a> <a href="/about/">About</a> <a href="/tools-of-choice/">Tools of Choice</a> <a class="cta" href="https://micro.blog/craigmcclellan" rel="me">Also on Micro.blog</a> </nav> <section id="wrapper"> <article class="h-entry post"> <header> <h2 class="headline"> <time class="dt-published" datetime="2012-09-24 15:51:07 -0500"> <a class="u-url dates" href="/2012/09/24/t250336585801940992.html">September 24, 2012</a> </time> </h2> </header> <section class="e-content post-body"> <p>WadsI the only one who somehow missed that Marcus Mumford was a really good drummer (and not just kick drum)? #iTunesFestival</p> </section> </article> <section id="post-meta" class="clearfix"> <a href="/"> <img class="u-photo avatar" src="https://micro.blog/craigmcclellan/avatar.jpg"> <div> <span class="p-author h-card dark">Craig McClellan</span> <span><a href="https://micro.blog/craigmcclellan">@craigmcclellan</a></span> </div> </a> </section> </section> <footer id="footer"> <section id="wrapper"> <ul> <li><a href="/feed.xml">RSS</a></li> <li><a href="/feed.json">JSON Feed</a></li> <li><a href="https://micro.blog/craigmcclellan" rel="me">Micro.blog</a></li> <!-- <li><a class="u-email" href="mailto:" rel="me">Email</a></li> --> </ul> <form method="get" id="search" action="https://duckduckgo.com/"> <input type="hidden" name="sites" value="http://craigmcclellan.com"/> <input type="hidden" name="k8" value="#444444"/> <input type="hidden" name="k9" value="#ee4792"/> <input type="hidden" name="kt" value="h"/> <input class="field" type="text" name="q" maxlength="255" placeholder="To search, type and hit Enter&hellip;"/> <input type="submit" value="Search" style="display: none;" /> </form> </section> </footer> </body> </html>
craigwmcclellan/craigwmcclellan.github.io
_site/2012/09/24/t250336585801940992.html
HTML
mit
4,889
//----------------------------------------------------------------------------- // <copyright file="Extensions.cs" company="WheelMUD Development Team"> // Copyright (c) WheelMUD Development Team. See LICENSE.txt. This file is // subject to the Microsoft Public License. All other rights reserved. // </copyright> // <summary> // Provides extension methods for the whole MUD framework. // </summary> //----------------------------------------------------------------------------- namespace WheelMUD.Utilities { using System; using System.Collections.Generic; /// <summary>Provides extension methods for the whole MUD framework.</summary> public static class Extensions { /// <summary>Extension method that converts anything enumerable to a dictionary.</summary> /// <typeparam name="TKey">The type of dictionary key.</typeparam> /// <typeparam name="TValue">The type of dictionary value, and the type of the enumerable.</typeparam> /// <param name="values">The enumerable values.</param> /// <param name="indexer">The lambda for creating a key from the value.</param> /// <returns>The created dictionary.</returns> public static Dictionary<TKey, TValue> CreateMapping<TKey, TValue>(this IEnumerable<TValue> values, Func<TValue, TKey> indexer) { var mappings = new Dictionary<TKey, TValue>(); foreach (TValue value in values) { mappings[indexer(value)] = value; } return mappings; } /// <summary>Gets the value from the dictionary or uses the supplied lambda to create an exception message.</summary> /// <typeparam name="TKey">The type of the key of the dictionary.</typeparam> /// <typeparam name="TValue">The type of the value in the dictionary.</typeparam> /// <param name="dict">The dictionary.</param> /// <param name="key">The actual key.</param> /// <param name="messageBuilder">The lambda to create the exception message.</param> /// <returns>The value, if it can correctly be accessed the key.</returns> public static TValue GetValueOrFailWith<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, Func<TKey, string> messageBuilder) { TValue ret; if (!dict.TryGetValue(key, out ret)) { throw new KeyNotFoundException(messageBuilder(key)); } return ret; } } }
ArcherSys/ArcherSys
Mud/WheelMUD-master/src/Utilities/Extensions.cs
C#
mit
2,522
--- layout: post title: 147 date: 2010-03-09 06:10 comments: false categories: [aphorisms] --- A lot of what you say sounds like something you would say.
thisduck/nothing
_posts/aphorisms/2010-03-09-147.markdown
Markdown
mit
155
using UnityEngine; using System.Collections; using System.Collections.Generic; using System; using KUtils; namespace KFrameWork { public enum HttpConnectionType { Post, Get, } public class HttpMessage : PoolCls<HttpMessage>, NetMessage,IPool { public string url; public HttpConnectionType method = HttpConnectionType.Post; private SimpleClsDictionary<string, string> fields ; public bool IgnoreResp { get; set; } public int reiceved { get; set; } public int total { get; set; } public bool HasError { get { return this.errorType != NetError.None; } } public NetError errorType { get; set; } public static T Create<T>() where T: HttpMessage,new() { T msg = TrySpawn<T>(); if (msg == null) { msg = new T(); } return msg; } public void AddField(string k,string v) { if (fields == null) fields = new SimpleClsDictionary<string, string>(); fields[k] = v; } public void RemoveField(string k) { if (fields == null) fields = new SimpleClsDictionary<string, string>(); fields.RemoveKey(k); } public SimpleClsDictionary<string, string> getFields() { ////protect //if (fields == null) // fields = new SimpleClsDictionary<string, string>(); return fields; } public string ToFieldString() { if (this.fields == null) { return ""; } string endstring = ""; var keys = this.fields.ReadOnlyKeys; var values = this.fields.ReadOnlyValues; for (int i = 0; i < keys.Count; ++i) { if(i != keys.Count-1) endstring += string.Format("{0}={1}&", keys[i], values[i]); else endstring += string.Format("{0}={1}", keys[i], values[i]); } return endstring; } public virtual void RemoveToPool() { if (fields != null) { fields.Clear(); } } } }
cjsjy123/KFrameWork
Assets/KFrameWork/FrameWork/Modules/Net/Http/HttpMessage.cs
C#
mit
2,420
# Plugins ## LowG33kDev/cakephp-gravatar-plugin ``` https://github.com/LowG33kDev/cakephp-gravatar-plugin/archive/Cake-3.X.zip ```
el-cms/elabs
plugins/README.md
Markdown
mit
132
#ifndef CARD_H #define CARD_H #include <string> #include <vector> using namespace std; /* Represents a single chance or community chest card */ class Card { public: // Basic card, no actions Card(const string& name, const string& type); // Card that can advance to a specific space (or negative if relative) Card(const string& name, const string& type, int advanceTo); // Card that can advance to a range of spaces (i.e. nearest railroad) Card(const string& name, const string& type, int advanceTo[], int advanceToSize); // Card that sends you to jail Card(const string& name, const string& type, int advanceTo, bool goToJail); // Represents a get out of jail free card Card(const string& name, const string& type, bool getOutOfJailCard); virtual ~Card(); string getName(); string getType(); bool isGoToJail() const; bool isOutOfJailFree() const; bool isAdvanceToCard() const; vector<int> getAdvanceToSpace() const; int getNumAdvanceToSpaces() const; private: string name; string type; bool advance; vector<int> advanceToSpaces; bool goToJail; bool outOfJail; }; #endif
mikehelmick/teaching
uc/computerScience2/fall2013/liveDemos/solutions/monopoly-helmick/Card.h
C
mit
1,131
!------------------------------------------------------------------------------- ! Copyright (c) 2019 FrontISTR Commons ! This software is released under the MIT License, see LICENSE.txt !------------------------------------------------------------------------------- module hecmw_local_matrix use hecmw_util use hecmw_pair_array private public :: hecmwST_local_matrix public :: hecmw_localmat_write public :: hecmw_localmat_blocking public :: hecmw_localmat_free public :: hecmw_localmat_mulvec public :: hecmw_trimatmul_TtKT public :: hecmw_trimatmul_TtKT_serial public :: hecmw_trimatmul_TtKT_mpc public :: hecmw_localmat_transpose public :: hecmw_localmat_assemble public :: hecmw_localmat_add public :: hecmw_localmat_init_with_hecmat public :: hecmw_localmat_add_hecmat public :: hecmw_localmat_multmat public :: hecmw_localmat_make_hecmat public :: hecmw_localmat_shrink_comm_table type hecmwST_local_matrix integer :: nr, nc, nnz, ndof integer(kind=kint), pointer :: index(:) integer(kind=kint), pointer :: item(:) real(kind=kreal), pointer :: A(:) end type hecmwST_local_matrix integer(kind=kint), parameter :: cNCOL_ITEM = 2 !< num of column items to be migrated (2 or 3) integer(kind=kint), parameter :: cLID = 1 !< index for local ID in belonging rank (node_ID(2*i-1)) integer(kind=kint), parameter :: cRANK = 2 !< index for belonging rank (node_ID(2*i)) integer(kind=kint), parameter :: cGID = 3 !< index for global ID (used only when cNCOL_ITEM==3) integer(kind=kint), parameter :: DEBUG = 0 integer(kind=kint), parameter :: TIMER = 0 contains subroutine hecmw_localmat_write(Tmat,iunit) implicit none type (hecmwST_local_matrix), intent(in) :: Tmat integer(kind=kint), intent(in) :: iunit integer(kind=kint) :: nr, nc, nnz, ndof, ndof2, i, js, je, j, jj character(len=64) :: fmt nr=Tmat%nr nc=Tmat%nc nnz=Tmat%nnz ndof=Tmat%ndof ndof2=ndof*ndof write(iunit,'(a,4i10)') 'nr, nc, nnz, ndof', nr, nc, nnz, ndof write(iunit,'(a)') 'i, j, A' write(fmt,'(a,i0,a)') '(',ndof,'f12.3)' do i=1,nr js=Tmat%index(i-1)+1 je=Tmat%index(i) do j=js,je jj=Tmat%item(j) if (ndof==1) then write(iunit,'(2i10,f12.3)') i, jj, Tmat%A(j) else write(iunit,'(2i10)') i, jj write(iunit,fmt) Tmat%A((j-1)*ndof2+1:j*ndof2) endif enddo enddo end subroutine hecmw_localmat_write subroutine hecmw_localmat_write_ij(Tmat,iunit) implicit none type (hecmwST_local_matrix), intent(in) :: Tmat integer(kind=kint), intent(in) :: iunit integer(kind=kint) :: nr, nc, nnz, ndof, i, js, je, j, jj nr=Tmat%nr nc=Tmat%nc nnz=Tmat%nnz ndof=Tmat%ndof write(iunit,'(a,4i10)') 'nr, nc, nnz, ndof', nr, nc, nnz, ndof write(iunit,'(a)') 'i, j' do i=1,nr js=Tmat%index(i-1)+1 je=Tmat%index(i) do j=js,je jj=Tmat%item(j) write(iunit,'(2i10)') i, jj enddo enddo end subroutine hecmw_localmat_write_ij subroutine hecmw_localmat_blocking(Tmat, ndof, BTmat) implicit none type (hecmwST_local_matrix), intent(in) :: Tmat integer, intent(in) :: ndof type (hecmwST_local_matrix), intent(out) :: BTmat integer, allocatable :: iw(:) integer :: ndof2, i, icnt, idof, idx, ls, le, l, j, jb, k, lb0, jdof, ks, ke ndof2=ndof*ndof if (mod(Tmat%nr, ndof) /= 0 .or. mod(Tmat%nc, ndof) /= 0) then write(0,*) Tmat%nr, Tmat%nc, ndof stop 'ERROR: blocking_Tmat failed' endif BTmat%nr=Tmat%nr/ndof BTmat%nc=Tmat%nc/ndof BTmat%ndof=ndof allocate(iw(BTmat%nc)) allocate(BTmat%index(0:BTmat%nr)) BTmat%index(0)=0 do i=1,BTmat%nr icnt=0 do idof=1,ndof idx=(i-1)*ndof+idof ls=Tmat%index(idx-1)+1 le=Tmat%index(idx) lcol: do l=ls,le j=Tmat%item(l) jb=(j-1)/ndof+1 do k=1,icnt if (iw(k)==jb) cycle lcol enddo icnt=icnt+1 iw(icnt)=jb enddo lcol enddo BTmat%index(i)=BTmat%index(i-1)+icnt enddo BTmat%nnz=BTmat%index(BTmat%nr) allocate(BTmat%item(BTmat%nnz)) allocate(BTmat%A(BTmat%nnz*ndof2)) BTmat%A=0.d0 do i=1,BTmat%nr icnt=0 do idof=1,ndof idx=(i-1)*ndof+idof ls=Tmat%index(idx-1)+1 le=Tmat%index(idx) lcol2: do l=ls,le j=Tmat%item(l) jb=(j-1)/ndof+1 do k=1,icnt if (iw(k)==jb) cycle lcol2 enddo icnt=icnt+1 iw(icnt)=jb enddo lcol2 enddo ! if (icnt /= BTmat%index(i)-BTmat%index(i-1)) stop 'ERROR: blocking Tmat' ! ! call qsort(iw, 1, icnt) lb0=BTmat%index(i-1) do k=1,icnt BTmat%item(lb0+k)=iw(k) enddo do idof=1,ndof idx=(i-1)*ndof+idof ls=Tmat%index(idx-1)+1 le=Tmat%index(idx) lcol3: do l=ls,le j=Tmat%item(l) jb=(j-1)/ndof+1 jdof=mod((j-1), ndof)+1 ks=BTmat%index(i-1)+1 ke=BTmat%index(i) do k=ks,ke if (BTmat%item(k)==jb) then BTmat%A((k-1)*ndof2+(idof-1)*ndof+jdof)=Tmat%A(l) cycle lcol3 endif enddo stop 'ERROR: something wrong in blocking Tmat' enddo lcol3 enddo enddo end subroutine hecmw_localmat_blocking subroutine hecmw_localmat_free(Tmat) implicit none type (hecmwST_local_matrix), intent(inout) :: Tmat deallocate(Tmat%index) if (associated(Tmat%item)) deallocate(Tmat%item) if (associated(Tmat%A)) deallocate(Tmat%A) Tmat%nr=0 Tmat%nc=0 Tmat%nnz=0 Tmat%ndof=0 end subroutine hecmw_localmat_free subroutine hecmw_trimatmul_TtKT(hecMESH, BTtmat, hecMAT, BTmat, & iwS, num_lagrange, hecTKT) use hecmw_matrix_misc implicit none type (hecmwST_local_mesh), intent(inout) :: hecMESH type (hecmwST_local_matrix), intent(inout) :: BTtmat, BTmat type (hecmwST_matrix), intent(in) :: hecMAT integer(kind=kint), intent(in) :: iwS(:) integer(kind=kint), intent(in) :: num_lagrange type (hecmwST_matrix), intent(inout) :: hecTKT if (hecMESH%n_neighbor_pe == 0) then call hecmw_trimatmul_TtKT_serial(hecMESH, BTtmat, hecMAT, BTmat, & iwS, num_lagrange, hecTKT) else call hecmw_trimatmul_TtKT_parallel(hecMESH, BTtmat, hecMAT, BTmat, & iwS, num_lagrange, hecTKT) endif end subroutine hecmw_trimatmul_TtKT subroutine hecmw_trimatmul_TtKT_serial(hecMESH, BTtmat, hecMAT, BTmat, & iwS, num_lagrange, hecTKT) use hecmw_matrix_misc implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_matrix), intent(in) :: BTtmat, BTmat type (hecmwST_matrix), intent(in) :: hecMAT integer(kind=kint), intent(in) :: iwS(:) integer(kind=kint), intent(in) :: num_lagrange type (hecmwST_matrix), intent(inout) :: hecTKT type (hecmwST_local_matrix) :: BTtKT real(kind=kreal) :: num ! perform three matrices multiplication for elimination call trimatmul_TtKT(BTtmat, hecMAT, BTmat, BTtKT) !write(700+hecmw_comm_get_rank(),*) 'DEBUG: BTtKT(MPC)' !call hecmw_localmat_write(BTtKT, 700+hecmw_comm_get_rank()) ! place small numbers where the DOF is eliminated !num = hecmw_mat_diag_max(hecMAT, hecMESH) * 1.0d-10 num = 1.d0 call place_num_on_diag(BTtKT, iwS, num_lagrange, num) !write(700+hecmw_comm_get_rank(),*) 'DEBUG: BTtKT(MPC)' !call hecmw_localmat_write(BTtKT, 700+hecmw_comm_get_rank()) ! make_new HECMW matrix call make_new_hecmat(hecMAT, BTtKT, hecTKT) call hecmw_localmat_free(BTtKT) end subroutine hecmw_trimatmul_TtKT_serial subroutine hecmw_trimatmul_TtKT_parallel(hecMESH, BTtmat, hecMAT, BTmat, & iwS, num_lagrange, hecTKT) use hecmw_matrix_misc implicit none type (hecmwST_local_mesh), intent(inout) :: hecMESH type (hecmwST_local_matrix), intent(inout) :: BTtmat, BTmat type (hecmwST_matrix), intent(in) :: hecMAT integer(kind=kint), intent(in) :: iwS(:) integer(kind=kint), intent(in) :: num_lagrange type (hecmwST_matrix), intent(inout) :: hecTKT type (hecmwST_local_matrix) :: BKmat, BTtKmat, BTtKTmat real(kind=kreal) :: num real(kind=kreal) :: t0, t1 ! perform three matrices multiplication for elimination t0 = hecmw_wtime() call hecmw_localmat_init_with_hecmat(BKmat, hecMAT) if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'BKmat (hecMAT)' if (DEBUG == 3) then call hecmw_localmat_write_ij(BKmat, 700+hecmw_comm_get_rank()) else call hecmw_localmat_write(BKmat, 700+hecmw_comm_get_rank()) endif endif t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "#### hecmw_trimatmul_TtKT_parallel (1) : ",t1-t0 t0 = hecmw_wtime() call hecmw_localmat_multmat(BTtmat, BKmat, hecMESH, BTtKmat) if (DEBUG >= 2) write(0,*) ' DEBUG2: multiply Tt and K done' if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'BTtKmat' if (DEBUG == 3) then call hecmw_localmat_write_ij(BTtKmat, 700+hecmw_comm_get_rank()) else call hecmw_localmat_write(BTtKmat, 700+hecmw_comm_get_rank()) endif endif call hecmw_localmat_free(BKmat) t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "#### hecmw_trimatmul_TtKT_parallel (2) : ",t1-t0 t0 = hecmw_wtime() call hecmw_localmat_multmat(BTtKmat, BTmat, hecMESH, BTtKTmat) if (DEBUG >= 2) write(0,*) ' DEBUG2: multiply TtK and T done' if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'BTtKTmat' if (DEBUG == 3) then call hecmw_localmat_write_ij(BTtKTmat, 700+hecmw_comm_get_rank()) else call hecmw_localmat_write(BTtKTmat, 700+hecmw_comm_get_rank()) endif endif call hecmw_localmat_free(BTtKmat) t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "#### hecmw_trimatmul_TtKT_parallel (3) : ",t1-t0 t0 = hecmw_wtime() ! place small numbers where the DOF is eliminated !num = hecmw_mat_diag_max(hecMAT, hecMESH) * 1.0d-10 num = 1.d0 call place_num_on_diag(BTtKTmat, iwS, num_lagrange, num) if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'num_lagrange =', num_lagrange write(700+hecmw_comm_get_rank(),*) 'iwS(1:num_lagrange)' write(700+hecmw_comm_get_rank(),*) iwS(1:num_lagrange) write(700+hecmw_comm_get_rank(),*) 'BTtKTmat (place 1.0 on slave diag)' if (DEBUG == 3) then call hecmw_localmat_write_ij(BTtKTmat, 700+hecmw_comm_get_rank()) else call hecmw_localmat_write(BTtKTmat, 700+hecmw_comm_get_rank()) endif endif t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "#### hecmw_trimatmul_TtKT_parallel (4) : ",t1-t0 t0 = hecmw_wtime() ! make_new HECMW matrix call make_new_hecmat(hecMAT, BTtKTmat, hecTKT) call hecmw_localmat_free(BTtKTmat) t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "#### hecmw_trimatmul_TtKT_parallel (5) : ",t1-t0 end subroutine hecmw_trimatmul_TtKT_parallel subroutine trimatmul_TtKT(BTtmat, hecMAT, BTmat, BTtKT) implicit none type (hecmwST_local_matrix), intent(in) :: BTtmat, BTmat type (hecmwST_matrix), intent(in) :: hecMAT type (hecmwST_local_matrix), intent(out) :: BTtKT integer :: nr, nc, ndof, ndof2, i, icnt, js, je, j, jj, ks, ke, k, kk integer :: ls, le, l, ll, m, ms, me, mm integer, allocatable :: iw(:) real(kind=kreal), pointer :: Ttp(:), Kp(:), Tp(:), TtKTp(:) ! real(kind=kreal) :: tsym_s, tsym_e, tnum_s, tnum_e nr=BTtmat%nr nc=BTmat%nc ndof=BTtmat%ndof ndof2=ndof*ndof BTtKT%nr=nr BTtKT%nc=nc BTtKT%ndof=ndof allocate(BTtKT%index(0:nr)) ! tsym_s = hecmw_wtime() !$omp parallel default(none), & !$omp& private(iw,i,icnt,js,je,j,jj,ks,ke,k,kk,ls,le,l,ll,m), & !$omp& shared(nr,nc,BTtmat,hecMAT,BTmat,BTtKT) allocate(iw(nc)) !$omp do do i=1,nr icnt=0 js=BTtmat%index(i-1)+1 je=BTtmat%index(i) do j=js,je jj=BTtmat%item(j) ! lower ks=hecMAT%indexL(jj-1)+1 ke=hecMAT%indexL(jj) do k=ks,ke kk=hecMAT%itemL(k) ls=BTmat%index(kk-1)+1 le=BTmat%index(kk) ll1: do l=ls,le ll=BTmat%item(l) do m=1,icnt if (iw(m)==ll) cycle ll1 enddo icnt=icnt+1 iw(icnt)=ll !if (i==1) write(0,*) 'l', icnt, jj, kk, ll enddo ll1 enddo ! diagonal ls=BTmat%index(jj-1)+1 le=BTmat%index(jj) ll2: do l=ls,le ll=BTmat%item(l) do m=1,icnt if (iw(m)==ll) cycle ll2 enddo icnt=icnt+1 iw(icnt)=ll !if (i==1) write(0,*) 'd', icnt, jj, kk, ll enddo ll2 ! upper ks=hecMAT%indexU(jj-1)+1 ke=hecMAT%indexU(jj) do k=ks,ke kk=hecMAT%itemU(k) ls=BTmat%index(kk-1)+1 le=BTmat%index(kk) ll3: do l=ls,le ll=BTmat%item(l) do m=1,icnt if (iw(m)==ll) cycle ll3 enddo icnt=icnt+1 iw(icnt)=ll !if (i==1) write(0,*) 'u', icnt, jj, kk, ll enddo ll3 enddo enddo if (icnt == 0) icnt=1 !if (i==1) write(0,*) iw(1:icnt) BTtKT%index(i)=icnt enddo !$omp end do deallocate(iw) !$omp end parallel ! tsym_e = hecmw_wtime() ! write(0,*) 'tsym:',tsym_e-tsym_s BTtKT%index(0)=0 do i=1,nr BTtKT%index(i)=BTtKT%index(i-1)+BTtKT%index(i) enddo !write(0,*) BTtKT%index(1:n)-BTtKT%index(0:n-1) BTtKT%nnz=BTtKT%index(nr) allocate(BTtKT%item(BTtKT%nnz)) allocate(BTtKT%A(BTtKT%nnz*ndof2)) BTtKT%item=0 BTtKT%A=0.d0 ! tnum_s = hecmw_wtime() !$omp parallel default(none), & !$omp& private(i,icnt,js,je,j,jj,ks,ke,k,kk,ls,le,l,ll,m, & !$omp& ms,me,mm,Ttp,Kp,Tp,TtKTp), & !$omp& shared(nr,nc,BTtmat,hecMAT,BTmat,BTtKT,ndof,ndof2) !$omp do do i=1,nr icnt=0 ms=BTtKT%index(i-1)+1 !me=BTtKT%index(i) js=BTtmat%index(i-1)+1 je=BTtmat%index(i) do j=js,je jj=BTtmat%item(j) Ttp=>BTtmat%A((j-1)*ndof2+1:j*ndof2) ! lower ks=hecMAT%indexL(jj-1)+1 ke=hecMAT%indexL(jj) do k=ks,ke kk=hecMAT%itemL(k) Kp=>hecMAT%AL((k-1)*ndof2+1:k*ndof2) ls=BTmat%index(kk-1)+1 le=BTmat%index(kk) do l=ls,le ll=BTmat%item(l) Tp=>BTmat%A((l-1)*ndof2+1:l*ndof2) me=ms-1+icnt mm=-1 do m=ms,me if (BTtKT%item(m)==ll) mm=m enddo if (mm<0) then icnt=icnt+1 mm=me+1 BTtKT%item(mm)=ll !if (i==1) write(0,*) 'l', mm, jj, kk, ll endif TtKTp=>BTtKT%A((mm-1)*ndof2+1:mm*ndof2) call blk_trimatmul_add(ndof, Ttp, Kp, Tp, TtKTp) enddo enddo ! diagonal Kp=>hecMAT%D((jj-1)*ndof2+1:jj*ndof2) ls=BTmat%index(jj-1)+1 le=BTmat%index(jj) do l=ls,le ll=BTmat%item(l) Tp=>BTmat%A((l-1)*ndof2+1:l*ndof2) me=ms-1+icnt mm=-1 do m=ms,me if (BTtKT%item(m)==ll) mm=m enddo if (mm<0) then icnt=icnt+1 mm=me+1 BTtKT%item(mm)=ll !if (i==1) write(0,*) 'd', mm, jj, kk, ll endif TtKTp=>BTtKT%A((mm-1)*ndof2+1:mm*ndof2) call blk_trimatmul_add(ndof, Ttp, Kp, Tp, TtKTp) enddo ! upper ks=hecMAT%indexU(jj-1)+1 ke=hecMAT%indexU(jj) do k=ks,ke kk=hecMAT%itemU(k) Kp=>hecMAT%AU((k-1)*ndof2+1:k*ndof2) ls=BTmat%index(kk-1)+1 le=BTmat%index(kk) do l=ls,le ll=BTmat%item(l) Tp=>BTmat%A((l-1)*ndof2+1:l*ndof2) me=ms-1+icnt mm=-1 do m=ms,me if (BTtKT%item(m)==ll) mm=m enddo if (mm<0) then icnt=icnt+1 mm=me+1 BTtKT%item(mm)=ll !if (i==1) write(0,*) 'u', mm, jj, kk, ll endif TtKTp=>BTtKT%A((mm-1)*ndof2+1:mm*ndof2) call blk_trimatmul_add(ndof, Ttp, Kp, Tp, TtKTp) enddo enddo enddo if (icnt == 0) then icnt=1 BTtKT%item(ms)=i endif ! error check! !write(0,*) BTtKT%item(ms:ms-1+icnt) !write(0,*) BTtKT%index(i)-BTtKT%index(i-1), icnt if (ms-1+icnt /= BTtKT%index(i)) stop 'ERROR: trimatmul' enddo !$omp end do !$omp end parallel ! tnum_e = hecmw_wtime() ! write(0,*) 'tnum:',tnum_e-tnum_s end subroutine trimatmul_TtKT subroutine blk_trimatmul_add(ndof, A, B, C, ABC) implicit none integer, intent(in) :: ndof real(kind=kreal), intent(in) :: A(:), B(:), C(:) real(kind=kreal), intent(inout) :: ABC(:) real(kind=kreal), allocatable :: AB(:) integer :: ndof2, i, j, k, i0, j0, ij, ik, jk ndof2=ndof*ndof allocate(AB(ndof2)) AB=0.d0 do i=1,ndof i0=(i-1)*ndof do j=1,ndof ij=i0+j j0=(j-1)*ndof do k=1,ndof ik=i0+k jk=j0+k AB(ik)=AB(ik)+A(ij)*B(jk) enddo enddo enddo do i=1,ndof i0=(i-1)*ndof do j=1,ndof ij=i0+j j0=(j-1)*ndof do k=1,ndof ik=i0+k jk=j0+k ABC(ik)=ABC(ik)+AB(ij)*C(jk) enddo enddo enddo deallocate(AB) end subroutine blk_trimatmul_add subroutine place_num_on_diag(BTtKT, iwS, num_lagrange, num) implicit none type (hecmwST_local_matrix), intent(inout) :: BTtKT integer(kind=kint), intent(in) :: iwS(:) integer(kind=kint), intent(in) :: num_lagrange real(kind=kreal), intent(in) :: num integer(kind=kint) :: ndof, ndof2, ilag, i, idof, js, je, j, jj integer(kind=kint) :: nmissing, k, ks, ke integer(kind=kint), allocatable :: missing(:), cnt(:) integer(kind=kint), pointer :: index(:), item(:) real(kind=kreal), pointer :: A(:) ndof=BTtKT%ndof ndof2=ndof*ndof ! check if there are places allocate(missing(num_lagrange)) nmissing = 0 outer1: do ilag=1,num_lagrange i=(iwS(ilag)-1)/ndof+1 idof=mod(iwS(ilag)-1, ndof)+1 js=BTtKT%index(i-1)+1 je=BTtKT%index(i) do j=js,je jj=BTtKT%item(j) if (jj==i) cycle outer1 ! found place enddo ! not found do k=1,nmissing if (missing(k) == i) cycle outer1 ! already marked as missing enddo nmissing = nmissing + 1 missing(nmissing) = i enddo outer1 ! if not, reallocate if (nmissing > 0) then allocate(cnt(BTtKT%nr)) allocate(index(0:BTtKT%nr)) do i=1,BTtKT%nr cnt(i) = BTtKT%index(i) - BTtKT%index(i-1) enddo do i=1,nmissing cnt(missing(i)) = cnt(missing(i)) + 1 enddo call make_index(BTtKT%nr, cnt, index) allocate(item(BTtKT%nnz + nmissing)) allocate(A(ndof2 * (BTtKT%nnz + nmissing))) do i=1,BTtKT%nr ks=index(i-1)+1 js=BTtKT%index(i-1)+1 je=BTtKT%index(i) item(ks:ks+(je-js))=BTtKT%item(js:je) A(ndof2*(ks-1)+1:ndof2*(ks+(je-js)))=BTtKT%A(ndof2*(js-1)+1:ndof2*je) enddo do i=1,nmissing ke=index(missing(i)) item(ke)=missing(i) A(ndof2*(ke-1)+1:ndof2*ke)=0.d0 enddo deallocate(BTtKT%index) deallocate(BTtKT%item) deallocate(BTtKT%A) BTtKT%index => index BTtKT%item => item BTtKT%A => A BTtKT%nnz = index(BTtKT%nr) deallocate(cnt) endif deallocate(missing) ! place num outer: do ilag=1,num_lagrange i=(iwS(ilag)-1)/ndof+1 idof=mod(iwS(ilag)-1, ndof)+1 js=BTtKT%index(i-1)+1 je=BTtKT%index(i) do j=js,je jj=BTtKT%item(j) if (jj==i) then !write(0,*) ilag, i, idof BTtKT%A((j-1)*ndof2+(idof-1)*ndof+idof)=num cycle outer endif enddo enddo outer end subroutine place_num_on_diag subroutine replace_hecmat(hecMAT, BTtKT) implicit none type (hecmwST_matrix), intent(inout) :: hecMAT type (hecmwST_local_matrix), intent(in) :: BTtKT integer :: nr, nc, ndof, ndof2, i, nl, nu, js, je, j, jj integer :: ksl, ksu, k nr=BTtKT%nr nc=BTtKT%nc ndof=hecMAT%NDOF ndof2=ndof*ndof ! free old hecMAT if (associated(hecMAT%AL)) deallocate(hecMAT%AL) if (associated(hecMAT%AU)) deallocate(hecMAT%AU) if (associated(hecMAT%itemL)) deallocate(hecMAT%itemL) if (associated(hecMAT%itemU)) deallocate(hecMAT%itemU) hecMAT%indexL=0 hecMAT%indexU=0 ! count NPL, NPU !$omp parallel default(none),private(i,nl,nu,js,je,j,jj), & !$omp& shared(nr,BTtKT,hecMAT) !$omp do do i=1,nr nl=0 nu=0 js=BTtKT%index(i-1)+1 je=BTtKT%index(i) do j=js,je jj=BTtKT%item(j) if (jj < i) then nl=nl+1 elseif (i < jj) then nu=nu+1 else ! diagonal endif enddo hecMAT%indexL(i)=nl hecMAT%indexU(i)=nu enddo !$omp end do !$omp end parallel hecMAT%indexL(0)=0 hecMAT%indexU(0)=0 do i=1,nc hecMAT%indexL(i)=hecMAT%indexL(i-1)+hecMAT%indexL(i) hecMAT%indexU(i)=hecMAT%indexU(i-1)+hecMAT%indexU(i) enddo hecMAT%NPL=hecMAT%indexL(nc) hecMAT%NPU=hecMAT%indexU(nc) ! allocate new hecMAT allocate(hecMAT%itemL(hecMAT%NPL), hecMAT%itemU(hecMAT%NPU)) allocate(hecMAT%AL(hecMAT%NPL*ndof2), hecMAT%AU(hecMAT%NPU*ndof2)) hecMAT%itemL=0 hecMAT%itemU=0 hecMAT%D=0.d0 hecMAT%AL=0.d0 hecMAT%AU=0.d0 ! copy from BTtKT to hecMAT !$omp parallel default(none),private(i,nl,nu,js,je,ksl,ksu,j,jj,k), & !$omp& shared(nr,BTtKT,hecMAT,ndof2) !$omp do do i=1,nr nl=0 nu=0 js=BTtKT%index(i-1)+1 je=BTtKT%index(i) ksl=hecMAT%indexL(i-1)+1 ksu=hecMAT%indexU(i-1)+1 do j=js,je jj=BTtKT%item(j) if (jj < i) then k=ksl+nl hecMAT%itemL(k)=jj hecMAT%AL((k-1)*ndof2+1:k*ndof2)=BTtKT%A((j-1)*ndof2+1:j*ndof2) nl=nl+1 elseif (i < jj) then k=ksu+nu hecMAT%itemU(k)=jj hecMAT%AU((k-1)*ndof2+1:k*ndof2)=BTtKT%A((j-1)*ndof2+1:j*ndof2) nu=nu+1 else hecMAT%D((i-1)*ndof2+1:i*ndof2)=BTtKT%A((j-1)*ndof2+1:j*ndof2) endif enddo ! if (ksl+nl /= hecMAT%indexL(i)+1) stop 'ERROR: indexL' ! if (ksu+nu /= hecMAT%indexU(i)+1) stop 'ERROR: indexU' enddo !$omp end do !$omp end parallel ! do i=1,hecMAT%NPL ! if (hecMAT%itemL(i) <= 0) stop 'ERROR: negative itemL' ! if (hecMAT%itemL(i) > nc) stop 'ERROR: too big itemL' ! enddo ! do i=1,hecMAT%NPU ! if (hecMAT%itemU(i) <= 0) stop 'ERROR: negative itemU' ! if (hecMAT%itemU(i) > nc) stop 'ERROR: too big itemU' ! enddo end subroutine replace_hecmat subroutine make_new_hecmat(hecMAT, BTtKT, hecTKT) implicit none type(hecmwST_matrix), intent(in) :: hecMAT type(hecmwST_local_matrix), intent(in) :: BTtKT type(hecmwST_matrix), intent(inout) :: hecTKT integer(kind=kint) :: nr, nc, ndof, ndof2 nr=BTtKT%nr nc=BTtKT%nc ndof=BTtKT%ndof ndof2=ndof*ndof !write(0,*) 'DEBUG: nr, nc =',nr,nc ! if (nr /= nc) then ! stop 'ERROR: nr /= nc' ! endif hecTKT%N =hecMAT%N hecTKT%NP=nc hecTKT%NDOF=ndof if (associated(hecTKT%D)) deallocate(hecTKT%D) allocate(hecTKT%D(nc*ndof2)) if (associated(hecTKT%indexL)) deallocate(hecTKT%indexL) if (associated(hecTKT%indexU)) deallocate(hecTKT%indexU) allocate(hecTKT%indexL(0:nc)) allocate(hecTKT%indexU(0:nc)) hecTKT%Iarray=hecMAT%Iarray hecTKT%Rarray=hecMAT%Rarray call replace_hecmat(hecTKT, BTtKT) end subroutine make_new_hecmat subroutine hecmw_localmat_mulvec(BTmat, V, TV) implicit none type (hecmwST_local_matrix), intent(in) :: BTmat real(kind=kreal), intent(in), target :: V(:) real(kind=kreal), intent(out), target :: TV(:) real(kind=kreal), pointer :: TVp(:), Tp(:), Vp(:) integer :: nr, ndof, ndof2, i, js, je, j, jj, k, kl0, l !!$ real(kind=kreal) :: vnorm nr=BTmat%nr ndof=BTmat%ndof ndof2=ndof*ndof TV=0.d0 !!$ vnorm=0.d0 !!$ do i=1,nr*ndof !!$ vnorm=vnorm+V(i)**2 !!$ enddo !!$ write(0,*) 'vnorm:', sqrt(vnorm) !$omp parallel default(none),private(i,TVp,js,je,j,jj,Tp,Vp,k,kl0,l), & !$omp& shared(nr,TV,ndof,BTmat,ndof2,V) !$omp do do i=1,nr TVp=>TV((i-1)*ndof+1:i*ndof) js=BTmat%index(i-1)+1 je=BTmat%index(i) do j=js,je jj=BTmat%item(j) Tp=>BTmat%A((j-1)*ndof2+1:j*ndof2) Vp=>V((jj-1)*ndof+1:jj*ndof) do k=1,ndof kl0=(k-1)*ndof do l=1,ndof TVp(k)=TVp(k)+Tp(kl0+l)*Vp(l) enddo enddo enddo enddo !$omp end do !$omp end parallel end subroutine hecmw_localmat_mulvec subroutine hecmw_trimatmul_TtKT_mpc(hecMESH, hecMAT, hecTKT) implicit none type (hecmwST_local_mesh), intent(inout) :: hecMESH type (hecmwST_matrix), intent(in) :: hecMAT type (hecmwST_matrix), intent(inout) :: hecTKT type (hecmwST_local_matrix) :: BTmat, BTtmat integer(kind=kint), allocatable :: iwS(:) integer(kind=kint) :: ndof, n_mpc, i_mpc integer(kind=kint) :: i, j, k, kk, ilag real(kind=kreal) :: t0, t1 t0 = hecmw_wtime() ndof=hecMAT%NDOF n_mpc=0 OUTER: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER enddo n_mpc=n_mpc+1 enddo OUTER allocate(iwS(n_mpc)) i_mpc=0 OUTER2: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER2 enddo i_mpc=i_mpc+1 k=hecMESH%mpc%mpc_index(i-1)+1 kk=ndof*(hecMESH%mpc%mpc_item(k)-1)+hecMESH%mpc%mpc_dof(k) iwS(i_mpc)=kk enddo OUTER2 if (DEBUG >= 2) then write(700+hecmw_comm_get_rank(),*) 'DEBUG: n_mpc, slaves',n_mpc,iwS(1:n_mpc) endif t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "### hecmw_trimatmul_TtKT_mpc (1) : ",t1-t0 t0 = hecmw_wtime() call make_BTmat_mpc(hecMESH, ndof, BTmat) if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'DEBUG: BTmat(MPC)' if (DEBUG == 3) then call hecmw_localmat_write_ij(BTmat,700+hecmw_comm_get_rank()) else call hecmw_localmat_write(BTmat,700+hecmw_comm_get_rank()) endif endif t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "### hecmw_trimatmul_TtKT_mpc (2) : ",t1-t0 t0 = hecmw_wtime() ! call make_BTtmat_mpc(hecMESH, ndof, BTtmat) call hecmw_localmat_transpose(BTmat, BTtmat) ! if (hecmw_localmat_equal(BTtmat, BTtmat2) == 0) then ! write(0,*) 'ERROR: BTtmat2 is incorrect!!!' ! else ! write(0,*) 'DEBUG: BTtmat2 is correct' ! endif if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'DEBUG: BTtmat(MPC)' if (DEBUG == 3) then call hecmw_localmat_write_ij(BTtmat,700+hecmw_comm_get_rank()) else call hecmw_localmat_write(BTtmat,700+hecmw_comm_get_rank()) endif endif t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "### hecmw_trimatmul_TtKT_mpc (3) : ",t1-t0 t0 = hecmw_wtime() call hecmw_trimatmul_TtKT(hecMESH, BTtmat, hecMAT, BTmat, iwS, n_mpc, hecTKT) t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "### hecmw_trimatmul_TtKT_mpc (4) : ",t1-t0 t0 = hecmw_wtime() if (associated(hecTKT%B)) deallocate(hecTKT%B) if (associated(hecTKT%X)) deallocate(hecTKT%X) allocate(hecTKT%B(ndof*hecTKT%NP)) allocate(hecTKT%X(ndof*hecTKT%NP)) do i=1, size(hecMAT%B) hecTKT%B(i) = hecMAT%B(i) enddo do i=1, size(hecMAT%X) hecTKT%X(i) = hecMAT%X(i) enddo do ilag=1,n_mpc hecTKT%X(iwS(ilag)) = 0.d0 enddo call hecmw_localmat_free(BTmat) call hecmw_localmat_free(BTtmat) ! call hecmw_localmat_free(BTtmat2) deallocate(iwS) t1 = hecmw_wtime() if (TIMER >= 1) write(0, '(A,f10.4)') "### hecmw_trimatmul_TtKT_mpc (5) : ",t1-t0 end subroutine hecmw_trimatmul_TtKT_mpc subroutine make_BTmat_mpc(hecMESH, ndof, BTmat) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: ndof type (hecmwST_local_matrix), intent(out) :: BTmat type (hecmwST_local_matrix) :: Tmat integer(kind=kint) :: n_mpc integer(kind=kint) :: i,j,k,js,jj,kk n_mpc=0 OUTER: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER enddo n_mpc=n_mpc+1 enddo OUTER Tmat%nr=hecMESH%n_node*ndof Tmat%nc=Tmat%nr Tmat%ndof=1 allocate(Tmat%index(0:Tmat%nr)) ! count nonzero in each row Tmat%index(1:Tmat%nr)=1 OUTER2: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER2 enddo k=hecMESH%mpc%mpc_index(i-1)+1 kk=ndof*(hecMESH%mpc%mpc_item(k)-1)+hecMESH%mpc%mpc_dof(k) Tmat%index(kk)=hecMESH%mpc%mpc_index(i)-hecMESH%mpc%mpc_index(i-1)-1 enddo OUTER2 ! index Tmat%index(0)=0 do i=1,Tmat%nr Tmat%index(i)=Tmat%index(i-1)+Tmat%index(i) enddo Tmat%nnz=Tmat%index(Tmat%nr) allocate(Tmat%item(Tmat%nnz), Tmat%A(Tmat%nnz)) ! diag do i=1,Tmat%nr js=Tmat%index(i-1)+1 Tmat%item(js)=i Tmat%A(js)=1.d0 enddo ! others OUTER3: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER3 enddo k=hecMESH%mpc%mpc_index(i-1)+1 kk=ndof*(hecMESH%mpc%mpc_item(k)-1)+hecMESH%mpc%mpc_dof(k) js=Tmat%index(kk-1)+1 do j= hecMESH%mpc%mpc_index(i-1) + 2, hecMESH%mpc%mpc_index(i) jj = ndof * (hecMESH%mpc%mpc_item(j) - 1) + hecMESH%mpc%mpc_dof(j) Tmat%item(js)=jj Tmat%A(js)=-hecMESH%mpc%mpc_val(j) js=js+1 enddo enddo OUTER3 !write(700+hecmw_comm_get_rank(),*) 'DEBUG: Tmat(MPC)' !call hecmw_localmat_write(Tmat,700+hecmw_comm_get_rank()) call hecmw_localmat_blocking(Tmat, ndof, BTmat) call hecmw_localmat_free(Tmat) end subroutine make_BTmat_mpc subroutine make_BTtmat_mpc(hecMESH, ndof, BTtmat) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: ndof type (hecmwST_local_matrix), intent(out) :: BTtmat type (hecmwST_local_matrix) :: Ttmat integer(kind=kint) :: n_mpc integer(kind=kint) :: i,j,k,js,je,jj,kk integer(kind=kint), allocatable :: iw(:) n_mpc=0 OUTER: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER enddo n_mpc=n_mpc+1 enddo OUTER Ttmat%nr=hecMESH%n_node*ndof Ttmat%nc=Ttmat%nr Ttmat%ndof=1 allocate(Ttmat%index(0:Ttmat%nr)) ! count nonzero in each row Ttmat%index(1:Ttmat%nr)=1 OUTER2: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER2 enddo k=hecMESH%mpc%mpc_index(i-1)+1 kk=ndof*(hecMESH%mpc%mpc_item(k)-1)+hecMESH%mpc%mpc_dof(k) Ttmat%index(kk)=0 do j= hecMESH%mpc%mpc_index(i-1) + 2, hecMESH%mpc%mpc_index(i) jj = ndof * (hecMESH%mpc%mpc_item(j) - 1) + hecMESH%mpc%mpc_dof(j) Ttmat%index(jj)=Ttmat%index(jj)+1 enddo enddo OUTER2 ! index Ttmat%index(0)=0 do i=1,Ttmat%nr Ttmat%index(i)=Ttmat%index(i-1)+Ttmat%index(i) enddo Ttmat%nnz=Ttmat%index(Ttmat%nr) allocate(Ttmat%item(Ttmat%nnz), Ttmat%A(Ttmat%nnz)) ! diag do i=1,Ttmat%nr js=Ttmat%index(i-1)+1 je=Ttmat%index(i) if (js <= je) then Ttmat%item(js)=i Ttmat%A(js)=1.d0 endif enddo ! others allocate(iw(Ttmat%nr)) iw(:)=1 OUTER3: do i=1,hecMESH%mpc%n_mpc do j= hecMESH%mpc%mpc_index(i-1) + 1, hecMESH%mpc%mpc_index(i) if (hecMESH%mpc%mpc_dof(j) > ndof) cycle OUTER3 enddo k=hecMESH%mpc%mpc_index(i-1)+1 kk=ndof*(hecMESH%mpc%mpc_item(k)-1)+hecMESH%mpc%mpc_dof(k) do j= hecMESH%mpc%mpc_index(i-1) + 2, hecMESH%mpc%mpc_index(i) jj = ndof * (hecMESH%mpc%mpc_item(j) - 1) + hecMESH%mpc%mpc_dof(j) js=Ttmat%index(jj-1)+1+iw(jj) Ttmat%item(js)=kk Ttmat%A(js)=-hecMESH%mpc%mpc_val(j) iw(jj)=iw(jj)+1 enddo enddo OUTER3 deallocate(iw) !write(700+hecmw_comm_get_rank(),*) 'DEBUG: Ttmat(MPC)' !call hecmw_localmat_write(Ttmat,700+hecmw_comm_get_rank()) call hecmw_localmat_blocking(Ttmat, ndof, BTtmat) call hecmw_localmat_free(Ttmat) end subroutine make_BTtmat_mpc subroutine hecmw_localmat_transpose(Tmat, Ttmat) implicit none type (hecmwST_local_matrix), intent(in) :: Tmat type (hecmwST_local_matrix), intent(out) :: Ttmat integer(kind=kint), allocatable :: iw(:) integer(kind=kint) :: i, j, jj, ndof, ndof2, k, idof, jdof allocate(iw(Tmat%nc)) iw = 0 do i = 1, Tmat%nr do j = Tmat%index(i-1)+1, Tmat%index(i) jj = Tmat%item(j) iw(jj) = iw(jj) + 1 enddo enddo Ttmat%nr = Tmat%nc Ttmat%nc = Tmat%nr Ttmat%nnz = Tmat%nnz Ttmat%ndof = Tmat%ndof ndof = Tmat%ndof ndof2 = ndof * ndof allocate(Ttmat%index(0:Ttmat%nr)) allocate(Ttmat%item(Ttmat%nnz)) allocate(Ttmat%A(Ttmat%nnz*ndof2)) Ttmat%index(0) = 0 do i = 1, Ttmat%nr Ttmat%index(i) = Ttmat%index(i-1) + iw(i) iw(i) = Ttmat%index(i-1) + 1 enddo do i = 1, Tmat%nr do j = Tmat%index(i-1)+1, Tmat%index(i) jj = Tmat%item(j) k = iw(jj) Ttmat%item( k ) = i do idof = 1, ndof do jdof = 1, ndof Ttmat%A((k-1)*ndof2+(idof-1)*ndof+jdof) = & Tmat%A((j-1)*ndof2+(jdof-1)*ndof+idof) enddo enddo iw(jj) = k + 1 enddo enddo end subroutine hecmw_localmat_transpose function hecmw_localmat_equal(Tmat1, Tmat2) implicit none type (hecmwST_local_matrix), intent(in) :: Tmat1, Tmat2 integer(kind=kint) :: hecmw_localmat_equal integer(kind=kint) :: i, j, k0, k, ndof, ndof2 hecmw_localmat_equal = 0 if (Tmat1%nr /= Tmat2%nr) return if (Tmat1%nc /= Tmat2%nc) return if (Tmat1%nnz /= Tmat2%nnz) return if (Tmat1%ndof /= Tmat2%ndof) return ndof = Tmat1%ndof ndof2 = ndof * ndof do i = 1, Tmat1%nr if (Tmat1%index(i) /= Tmat2%index(i)) return do j = Tmat1%index(i-1)+1, Tmat1%index(i) if (Tmat1%item(j) /= Tmat2%item(j)) return k0 = (j-1)*ndof2 do k = 1, ndof2 if (Tmat1%A(k0+k) /= Tmat2%A(k0+k)) return enddo enddo enddo hecmw_localmat_equal = 1 end function hecmw_localmat_equal !!! !!! Subroutines for parallel contact analysis with iterative linear solver !!! subroutine hecmw_localmat_assemble(BTmat, hecMESH, hecMESHnew) implicit none type (hecmwST_local_matrix), intent(inout) :: BTmat type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_mesh), intent(inout) :: hecMESHnew integer(kind=kint) :: nn_int, np, ndof, ndof2, nr_ext, nnz_ext integer(kind=kint), allocatable :: exp_rows_index(:), exp_cols_index(:) integer(kind=kint), allocatable :: exp_rows_item(:,:), exp_cols_item(:,:) type (hecmwST_local_matrix), allocatable :: BT_ext(:) type (hecmwST_local_matrix) :: BT_int type (hecmwST_local_matrix) :: BTnew ! some checks if (DEBUG >= 1) write(0,*) 'DEBUG: nr,nc,nnz,ndof',BTmat%nr,BTmat%nc,BTmat%nnz,BTmat%ndof if (BTmat%nr /= hecMESH%n_node) stop 'ERROR: invalid size in hecmw_localmat_assemble' ! nn_int = hecMESH%nn_internal np = hecMESH%n_node ndof = BTmat%ndof ndof2 = ndof*ndof ! nr_ext = np - nn_int nnz_ext = BTmat%index(np) - BTmat%index(nn_int) ! call prepare_BT_ext(BTmat, hecMESH, exp_rows_index, exp_rows_item, BT_ext) if (DEBUG >= 1) write(0,*) 'DEBUG: prepare_BT_ext done' ! call prepare_column_info(hecMESH, BT_ext, exp_cols_index, exp_cols_item) if (DEBUG >= 1) write(0,*) 'DEBUG: prepare_column info done' ! call send_BT_ext_and_recv_BT_int(hecMESH, exp_rows_index, exp_rows_item, BT_ext, & exp_cols_index, exp_cols_item, BT_int, hecMESHnew) if (DEBUG >= 1) write(0,*) 'DEBUG: send BT_ext and recv BT_int done' ! !write(0,*) 'BTmat%ndof,BT_int%ndof',BTmat%ndof,BT_int%ndof call hecmw_localmat_add(BTmat, BT_int, BTnew) if (DEBUG >= 1) write(0,*) 'DEBUG: localmat_add done' ! call hecmw_localmat_free(BTmat) call hecmw_localmat_free(BT_int) ! BTmat%nr = BTnew%nr BTmat%nc = BTnew%nc BTmat%nnz = BTnew%nnz BTmat%ndof = BTnew%ndof BTmat%index => BTnew%index BTmat%item => BTnew%item BTmat%A => BTnew%A ! ! hecMESH%n_node = hecMESHnew%n_node ! hecMESH%n_neighbor_pe = hecMESHnew%n_neighbor_pe ! deallocate(hecMESH%neighbor_pe) ! deallocate(hecMESH%import_index) ! deallocate(hecMESH%export_index) ! deallocate(hecMESH%import_item) ! deallocate(hecMESH%export_item) ! deallocate(hecMESH%node_ID) ! deallocate(hecMESH%global_node_ID) ! hecMESH%neighbor_pe => hecMESHnew%neighbor_pe ! hecMESH%import_index => hecMESHnew%import_index ! hecMESH%export_index => hecMESHnew%export_index ! hecMESH%import_item => hecMESHnew%import_item ! hecMESH%export_item => hecMESHnew%export_item ! hecMESH%node_ID => hecMESHnew%node_ID ! hecMESH%global_node_ID => hecMESHnew%global_node_ID ! if (DEBUG >= 1) write(0,*) 'DEBUG: update BTmat and hecMESH done' end subroutine hecmw_localmat_assemble subroutine prepare_BT_ext(BTmat, hecMESH, exp_rows_index, exp_rows_item, BT_ext) implicit none type (hecmwST_local_matrix), intent(in) :: BTmat type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), allocatable, intent(out) :: exp_rows_index(:) integer(kind=kint), allocatable, intent(out) :: exp_rows_item(:,:) type (hecmwST_local_matrix), allocatable, intent(out) :: BT_ext(:) integer(kind=kint), allocatable :: incl_nz(:), exp_cols_per_row(:), exp_rows_per_rank(:) integer(kind=kint) :: nn_int nn_int = hecMESH%nn_internal ! call check_external_nz_blocks(BTmat, nn_int, incl_nz) ! call count_ext_rows_with_nz(BTmat, nn_int, incl_nz, exp_cols_per_row) ! call count_exp_rows_per_rank(hecMESH, exp_cols_per_row, exp_rows_per_rank) ! allocate(exp_rows_index(0:hecMESH%n_neighbor_pe)) call make_index(hecMESH%n_neighbor_pe, exp_rows_per_rank, exp_rows_index) !write(0,*) 'exp_rows_index',exp_rows_index(:) ! deallocate(exp_rows_per_rank) ! call make_exp_rows_item(hecMESH, exp_cols_per_row, exp_rows_index, exp_rows_item) ! deallocate(exp_cols_per_row) ! allocate(BT_ext(hecMESH%n_neighbor_pe)) call extract_BT_ext(hecMESH, BTmat, incl_nz, exp_rows_index, exp_rows_item, BT_ext) ! deallocate(incl_nz) end subroutine prepare_BT_ext subroutine check_external_nz_blocks(BTmat, nn_internal, incl_nz) implicit none type (hecmwST_local_matrix), intent(in) :: BTmat integer(kind=kint), intent(in) :: nn_internal integer(kind=kint), allocatable, intent(out) :: incl_nz(:) integer(kind=kint) :: ndof2, i0, nnz_ext, i, k, nnz_blk if (nn_internal > BTmat%nr) stop 'ERROR: invalid nn_internal' ndof2 = BTmat%ndof ** 2 i0 = BTmat%index(nn_internal) nnz_ext = BTmat%index(BTmat%nr) - i0 allocate(incl_nz(nnz_ext)) nnz_blk = 0 do i = 1, nnz_ext incl_nz(i) = 0 do k = 1, ndof2 if (BTmat%A(ndof2*(i0+i-1)+k) /= 0.0d0) then incl_nz(i) = 1 nnz_blk = nnz_blk + 1 exit endif enddo enddo if (DEBUG >= 1) write(0,*) 'DEBUG: nnz_blk',nnz_blk end subroutine check_external_nz_blocks subroutine count_ext_rows_with_nz(BTmat, nn_internal, incl_nz, exp_cols_per_row) implicit none type (hecmwST_local_matrix), intent(in) :: BTmat integer(kind=kint), intent(in) :: nn_internal integer(kind=kint), intent(in) :: incl_nz(:) integer(kind=kint), allocatable, intent(out) :: exp_cols_per_row(:) integer(kind=kint) :: nr_ext, nnz_int, i, irow, js, je, j, jcol nr_ext = BTmat%nr - nn_internal nnz_int = BTmat%index(nn_internal) allocate(exp_cols_per_row(nr_ext)) exp_cols_per_row(:) = 0 do i = 1, nr_ext irow = nn_internal+i js = BTmat%index(irow-1)+1 je = BTmat%index(irow) do j = js, je jcol = BTmat%item(j) if (incl_nz(j-nnz_int) == 1) exp_cols_per_row(i) = exp_cols_per_row(i) + 1 enddo enddo !write(0,*) 'exp_cols_per_row',exp_cols_per_row(:) end subroutine count_ext_rows_with_nz subroutine count_exp_rows_per_rank(hecMESH, exp_cols_per_row, exp_rows_per_rank) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: exp_cols_per_row(:) integer(kind=kint), allocatable, intent(out) :: exp_rows_per_rank(:) integer(kind=kint) :: nn_int, np, nr_ext, i, irow, exp_rank, idom allocate(exp_rows_per_rank(hecMESH%n_neighbor_pe)) exp_rows_per_rank(1:hecMESH%n_neighbor_pe) = 0 nn_int = hecMESH%nn_internal np = hecMESH%n_node nr_ext = np - nn_int do i = 1, nr_ext if (exp_cols_per_row(i) > 0) then irow = nn_int + i exp_rank = hecMESH%node_ID(2*irow) call rank_to_idom(hecMESH, exp_rank, idom) exp_rows_per_rank(idom) = exp_rows_per_rank(idom) + 1 endif enddo !write(0,*) 'exp_rows_per_rank',exp_rows_per_rank(:) end subroutine count_exp_rows_per_rank subroutine rank_to_idom(hecMESH, rank, idom) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: rank integer(kind=kint), intent(out) :: idom integer(kind=kint) :: i do i = 1, hecMESH%n_neighbor_pe if (hecMESH%neighbor_pe(i) == rank) then idom = i return endif enddo stop 'ERROR: exp_rank not found in neighbor_pe' end subroutine rank_to_idom subroutine make_index(len, cnt, index) implicit none integer(kind=kint), intent(in) :: len integer(kind=kint), intent(in) :: cnt(len) integer(kind=kint), intent(out) :: index(0:) integer(kind=kint) :: i ! write(0,*) 'make_index: len',len index(0) = 0 do i = 1,len index(i) = index(i-1) + cnt(i) enddo end subroutine make_index subroutine make_exp_rows_item(hecMESH, exp_cols_per_row, exp_rows_index, exp_rows_item) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: exp_cols_per_row(:) integer(kind=kint), allocatable, intent(in) :: exp_rows_index(:) integer(kind=kint), allocatable, intent(out) :: exp_rows_item(:,:) integer(kind=kint), allocatable :: cnt(:) integer(kind=kint) :: nn_int, np, nr_ext, i, irow, exp_rank, idom, idx allocate(exp_rows_item(2,exp_rows_index(hecMESH%n_neighbor_pe))) allocate(cnt(hecMESH%n_neighbor_pe)) cnt(:) = 0 nn_int = hecMESH%nn_internal np = hecMESH%n_node nr_ext = np - nn_int do i = 1, nr_ext if (exp_cols_per_row(i) > 0) then irow = nn_int + i exp_rank = hecMESH%node_ID(2*irow) call rank_to_idom(hecMESH, exp_rank, idom) cnt(idom) = cnt(idom) + 1 idx = exp_rows_index(idom-1) + cnt(idom) exp_rows_item(1,idx) = irow exp_rows_item(2,idx) = exp_cols_per_row(i) endif enddo !write(0,*) 'cnt',cnt(:) do idom = 1, hecMESH%n_neighbor_pe if (cnt(idom) /= exp_rows_index(idom)-exp_rows_index(idom-1)) stop 'ERROR: make exp_rows_item' enddo !write(0,*) 'exp_rows_item(1,:)',exp_rows_item(1,:) !write(0,*) 'exp_rows_item(2,:)',exp_rows_item(2,:) end subroutine make_exp_rows_item subroutine extract_BT_ext(hecMESH, BTmat, incl_nz, exp_rows_index, exp_rows_item, BT_ext) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_matrix), intent(in) :: BTmat integer(kind=kint), intent(in) :: incl_nz(:) integer(kind=kint), allocatable, intent(in) :: exp_rows_index(:) integer(kind=kint), intent(in) :: exp_rows_item(:,:) type (hecmwST_local_matrix), allocatable, intent(out) :: BT_ext(:) integer(kind=kint) :: ndof, ndof2, nn_int, nnz_int, idom, j, idx, ncol, cnt, jrow, ks, ke, k, kcol allocate(BT_ext(hecMESH%n_neighbor_pe)) ndof = BTmat%ndof ndof2 = ndof * ndof nn_int = hecMESH%nn_internal nnz_int = BTmat%index(nn_int) do idom = 1, hecMESH%n_neighbor_pe BT_ext(idom)%nr = exp_rows_index(idom) - exp_rows_index(idom-1) BT_ext(idom)%nc = BTmat%nc BT_ext(idom)%nnz = 0 BT_ext(idom)%ndof = ndof allocate(BT_ext(idom)%index(0:BT_ext(idom)%nr)) BT_ext(idom)%index(0) = 0 do j = 1, BT_ext(idom)%nr idx = exp_rows_index(idom-1) + j ncol = exp_rows_item(2,idx) BT_ext(idom)%index(j) = BT_ext(idom)%index(j-1) + ncol enddo BT_ext(idom)%nnz = BT_ext(idom)%index(BT_ext(idom)%nr) if (DEBUG >= 1) write(0,*) 'DEBUG: idom,nr,nc,nnz,ndof', & idom,BT_ext(idom)%nr,BT_ext(idom)%nc,BT_ext(idom)%nnz,BT_ext(idom)%ndof allocate(BT_ext(idom)%item(BT_ext(idom)%nnz)) allocate(BT_ext(idom)%A(BT_ext(idom)%nnz * ndof2)) cnt = 0 do j = 1, BT_ext(idom)%nr idx = exp_rows_index(idom-1) + j jrow = exp_rows_item(1,idx) if (jrow < 1 .or. BTmat%nr < jrow) stop 'ERROR: extract BT_ext: jrow' ks = BTmat%index(jrow-1)+1 ke = BTmat%index(jrow) do k = ks, ke kcol = BTmat%item(k) if (incl_nz(k-nnz_int) == 0) cycle cnt = cnt + 1 BT_ext(idom)%item(cnt) = kcol BT_ext(idom)%A(ndof2*(cnt-1)+1:ndof2*cnt) = BTmat%A(ndof2*(k-1)+1:ndof2*k) enddo if (cnt /= BT_ext(idom)%index(j)) stop 'ERROR: extract BT_ext' enddo ! if (DEBUG >= 3) write(100+hecMESH%my_rank,*) 'BT_ext(',idom,')' ! call hecmw_localmat_write(BT_ext(idom), 100+hecMESH%my_rank) enddo end subroutine extract_BT_ext subroutine prepare_column_info(hecMESH, BT_ext, exp_cols_index, exp_cols_item) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_matrix), intent(in) :: BT_ext(:) integer(kind=kint), allocatable, intent(out) :: exp_cols_index(:) integer(kind=kint), allocatable, intent(out) :: exp_cols_item(:,:) ! call make_exp_cols_index(hecMESH%n_neighbor_pe, BT_ext, exp_cols_index) if (DEBUG >= 2) write(0,*) ' DEBUG2: make exp_cols_index done' if (DEBUG >= 3) write(0,*) ' DEBUG3: exp_cols_index', exp_cols_index(0:hecMESH%n_neighbor_pe) ! ! (col ID, rank, global ID) ! call make_exp_cols_item(hecMESH, BT_ext, exp_cols_index, exp_cols_item) if (DEBUG >= 2) write(0,*) ' DEBUG2: make exp_cols_item done' ! if (DEBUG >= 3) write(0,*) ' DEBUG3: exp_cols_item', exp_cols_item(1:cNCOL_ITEM,1:exp_cols_index(hecMESH%n_neighbor_pe)) end subroutine prepare_column_info subroutine make_exp_cols_index(nnb, BT_ext, exp_cols_index) implicit none integer(kind=kint), intent(in) :: nnb type (hecmwST_local_matrix), intent(in) :: BT_ext(:) integer(kind=kint), allocatable, intent(out) :: exp_cols_index(:) integer(kind=kint) :: idom allocate(exp_cols_index(0:nnb)) exp_cols_index(0) = 0 do idom = 1, nnb exp_cols_index(idom) = exp_cols_index(idom-1) + BT_ext(idom)%nnz enddo end subroutine make_exp_cols_index subroutine make_exp_cols_item(hecMESH, BT_ext, exp_cols_index, exp_cols_item) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_matrix), intent(in) :: BT_ext(:) integer(kind=kint), allocatable, intent(in) :: exp_cols_index(:) integer(kind=kint), allocatable, intent(out) :: exp_cols_item(:,:) integer(kind=kint) :: cnt, idom, j, jcol allocate(exp_cols_item(cNCOL_ITEM,exp_cols_index(hecMESH%n_neighbor_pe))) cnt = 0 do idom = 1, hecMESH%n_neighbor_pe do j = 1, BT_ext(idom)%nnz cnt = cnt + 1 jcol = BT_ext(idom)%item(j) ! if (DEBUG >= 3) write(0,*) ' DEBUG3: idom,j,cnt,jcol,nn_internal,n_node',& ! idom,j,cnt,jcol,hecMESH%nn_internal,hecMESH%n_node ! if (DEBUG >= 3) write(0,*) ' DEBUG3: size of exp_cols_item',size(exp_cols_item) ! if (DEBUG >= 3) write(0,*) ' DEBUG3: size of node_ID',size(hecMESH%node_ID) ! if (DEBUG >= 3) write(0,*) ' DEBUG3: size of global_node_ID',size(hecMESH%global_node_ID) exp_cols_item(cLID,cnt) = hecMESH%node_ID(2*jcol-1) exp_cols_item(cRANK,cnt) = hecMESH%node_ID(2*jcol) if (cNCOL_ITEM >= 3) exp_cols_item(cGID,cnt) = hecMESH%global_node_ID(jcol) ! if (DEBUG >= 3) write(0,*) ' DEBUG3: lid,rank(,gid)',exp_cols_item(1:cNCOL_ITEM,cnt) enddo if (cnt /= exp_cols_index(idom)) stop 'ERROR: make exp_cols_item' enddo end subroutine make_exp_cols_item subroutine send_BT_ext_and_recv_BT_int(hecMESH, exp_rows_index, exp_rows_item, BT_ext, & exp_cols_index, exp_cols_item, BT_int, hecMESHnew) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), allocatable, intent(inout) :: exp_rows_index(:), exp_cols_index(:) integer(kind=kint), allocatable, intent(inout) :: exp_rows_item(:,:), exp_cols_item(:,:) type (hecmwST_local_matrix), allocatable, intent(inout) :: BT_ext(:) type (hecmwST_local_matrix), intent(out) :: BT_int type (hecmwST_local_mesh), intent(inout) :: hecMESHnew integer(kind=kint), allocatable :: imp_rows_index(:), imp_cols_index(:) integer(kind=kint), allocatable :: imp_rows_item(:,:), imp_cols_item(:,:) real(kind=kreal), allocatable :: imp_vals_item(:) integer(kind=kint), allocatable :: map(:), add_nodes(:,:) integer(kind=kint) :: ndof, ndof2, idom, n_add_node, i0 if (hecMESH%n_neighbor_pe == 0) return ndof = BT_ext(1)%ndof ndof2 = ndof*ndof ! call convert_rowID_to_remote_localID(hecMESH, exp_rows_index(hecMESH%n_neighbor_pe), exp_rows_item) if (DEBUG >= 2) write(0,*) ' DEBUG2: convert rowID to remote localID done' ! call send_recv_BT_ext_nr_nnz(hecMESH, BT_ext, imp_rows_index, imp_cols_index) if (DEBUG >= 2) write(0,*) ' DEBUG2: send recv BT_ext nr and nnz done' ! call send_recv_BT_ext_contents(hecMESH, BT_ext, & exp_rows_index, exp_cols_index, exp_rows_item, exp_cols_item, & imp_rows_index, imp_cols_index, & imp_rows_item, imp_cols_item, imp_vals_item) if (DEBUG >= 2) write(0,*) ' DEBUG2: send recv BT_ext contents done' ! do idom = 1, hecMESH%n_neighbor_pe call hecmw_localmat_free(BT_ext(idom)) enddo deallocate(BT_ext) ! call allocate_BT_int(hecMESH, ndof, imp_rows_index, imp_rows_item, BT_int) if (DEBUG >= 2) write(0,*) ' DEBUG2: allocate BT_int done' ! ! call copy_mesh(hecMESH, hecMESHnew) ! if (DEBUG >= 2) write(0,*) ' DEBUG2: copy mesh done' ! call map_imported_cols(hecMESHnew, imp_cols_index(hecMESH%n_neighbor_pe), & imp_cols_item, n_add_node, add_nodes, map, i0) if (DEBUG >= 2) write(0,*) ' DEBUG2: map imported cols done' ! call update_comm_table(hecMESHnew, n_add_node, add_nodes, i0) if (DEBUG >= 2) write(0,*) ' DEBUG2: update comm_table done' ! BT_int%nc = hecMESHnew%n_node ! call copy_vals_to_BT_int(hecMESH%n_neighbor_pe, imp_rows_index, imp_cols_index, & imp_rows_item, map, ndof2, imp_vals_item, BT_int) if (DEBUG >= 2) write(0,*) ' DEBUG2: copy vals to BT_int done' ! deallocate(imp_rows_index) deallocate(imp_cols_index) deallocate(imp_rows_item) deallocate(imp_cols_item) deallocate(imp_vals_item) deallocate(map) ! call sort_and_uniq_rows(BT_int) if (DEBUG >= 2) write(0,*) ' DEBUG2: sort and uniq rows of BT_int done' end subroutine send_BT_ext_and_recv_BT_int subroutine convert_rowID_to_remote_localID(hecMESH, len, exp_rows_item) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: len integer(kind=kint), intent(out) :: exp_rows_item(:,:) integer(kind=kint) :: i do i = 1, len exp_rows_item(1,i) = hecMESH%node_ID(2 * exp_rows_item(1,i) - 1) enddo end subroutine convert_rowID_to_remote_localID subroutine send_recv_BT_ext_nr_nnz(hecMESH, BT_ext, imp_rows_index, imp_cols_index) use m_hecmw_comm_f implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_matrix), intent(in) :: BT_ext(:) integer(kind=kint), allocatable, intent(out) :: imp_rows_index(:), imp_cols_index(:) integer(kind=kint) :: nnb, idom, irank, tag, recvbuf(2) integer(kind=kint), allocatable :: sendbuf(:,:) integer(kind=kint), allocatable :: requests(:) integer(kind=kint), allocatable :: statuses(:,:) nnb = hecMESH%n_neighbor_pe allocate(imp_rows_index(0:nnb)) allocate(imp_cols_index(0:nnb)) allocate(requests(nnb)) allocate(statuses(HECMW_STATUS_SIZE, nnb)) allocate(sendbuf(2,nnb)) do idom = 1, nnb irank = hecMESH%neighbor_pe(idom) ! nr = exp_rows_per_rank(idom) sendbuf(1,idom) = BT_ext(idom)%nr sendbuf(2,idom) = BT_ext(idom)%nnz tag=2001 call HECMW_ISEND_INT(sendbuf(1,idom), 2, irank, tag, hecMESH%MPI_COMM, & requests(idom)) enddo imp_rows_index(0) = 0 imp_cols_index(0) = 0 do idom = 1, nnb irank = hecMESH%neighbor_pe(idom) tag = 2001 call HECMW_RECV_INT(recvbuf, 2, irank, tag, & hecMESH%MPI_COMM, statuses(:,1)) imp_rows_index(idom) = imp_rows_index(idom-1) + recvbuf(1) imp_cols_index(idom) = imp_cols_index(idom-1) + recvbuf(2) enddo call HECMW_Waitall(nnb, requests, statuses) deallocate(requests) deallocate(statuses) deallocate(sendbuf) end subroutine send_recv_BT_ext_nr_nnz subroutine send_recv_BT_ext_contents(hecMESH, BT_ext, & exp_rows_index, exp_cols_index, exp_rows_item, exp_cols_item, & imp_rows_index, imp_cols_index, & imp_rows_item, imp_cols_item, imp_vals_item) use m_hecmw_comm_f implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_local_matrix), intent(in) :: BT_ext(:) integer(kind=kint), allocatable, intent(inout) :: exp_rows_index(:), exp_cols_index(:) integer(kind=kint), allocatable, intent(inout) :: exp_rows_item(:,:), exp_cols_item(:,:) integer(kind=kint), allocatable, intent(in) :: imp_rows_index(:), imp_cols_index(:) integer(kind=kint), allocatable, intent(out) :: imp_rows_item(:,:), imp_cols_item(:,:) real(kind=kreal), allocatable, intent(out) :: imp_vals_item(:) integer(kind=kint) :: nnb, ndof2, n_send, idom, irank, tag, nr, nnz integer(kind=kint), allocatable :: requests(:) integer(kind=kint), allocatable :: statuses(:,:) nnb = hecMESH%n_neighbor_pe if (nnb < 1) return ndof2 = BT_ext(1)%ndof ** 2 allocate(imp_rows_item(2,imp_rows_index(nnb))) allocate(imp_cols_item(cNCOL_ITEM,imp_cols_index(nnb))) allocate(imp_vals_item(ndof2*imp_cols_index(nnb))) allocate(requests(3*nnb)) allocate(statuses(HECMW_STATUS_SIZE, 3*nnb)) n_send = 0 do idom = 1, nnb irank = hecMESH%neighbor_pe(idom) if (BT_ext(idom)%nr > 0) then n_send = n_send + 1 tag = 2002 call HECMW_ISEND_INT(exp_rows_item(1,exp_rows_index(idom-1)+1), & 2*BT_ext(idom)%nr, irank, tag, hecMESH%MPI_COMM, & requests(n_send)) n_send = n_send + 1 tag = 2003 call HECMW_ISEND_INT(exp_cols_item(1,exp_cols_index(idom-1)+1), & cNCOL_ITEM*BT_ext(idom)%nnz, irank, tag, hecMESH%MPI_COMM, & requests(n_send)) n_send = n_send + 1 tag = 2004 call HECMW_ISEND_R(BT_ext(idom)%A, ndof2*BT_ext(idom)%nnz, irank, & tag, hecMESH%MPI_COMM, requests(n_send)) endif enddo do idom = 1, nnb irank = hecMESH%neighbor_pe(idom) nr = imp_rows_index(idom) - imp_rows_index(idom-1) nnz = imp_cols_index(idom) - imp_cols_index(idom-1) if (nr > 0) then tag = 2002 call HECMW_RECV_INT(imp_rows_item(1,imp_rows_index(idom-1)+1), & 2*nr, irank, tag, hecMESH%MPI_COMM, statuses(:,1)) tag = 2003 call HECMW_RECV_INT(imp_cols_item(1,imp_cols_index(idom-1)+1), & cNCOL_ITEM*nnz, irank, tag, hecMESH%MPI_COMM, statuses(:,1)) tag = 2004 call HECMW_RECV_R(imp_vals_item(ndof2*imp_cols_index(idom-1)+1), & ndof2*nnz, irank, tag, hecMESH%MPI_COMM, statuses(:,1)) endif enddo call HECMW_Waitall(n_send, requests, statuses) deallocate(exp_rows_index) deallocate(exp_rows_item) deallocate(exp_cols_index) deallocate(exp_cols_item) end subroutine send_recv_BT_ext_contents subroutine allocate_BT_int(hecMESH, ndof, imp_rows_index, imp_rows_item, BT_int) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: ndof integer(kind=kint), allocatable, intent(in) :: imp_rows_index(:), imp_rows_item(:,:) type (hecmwST_local_matrix), intent(out) :: BT_int integer(kind=kint), allocatable :: cnt(:) integer(kind=kint) :: idom, is, ie, i, irow, ncol, ndof2 ndof2 = ndof*ndof BT_int%nr = hecMESH%nn_internal BT_int%nc = hecMESH%n_node BT_int%nnz = 0 BT_int%ndof = ndof allocate(cnt(BT_int%nr)) cnt(:) = 0 do idom = 1, hecMESH%n_neighbor_pe is = imp_rows_index(idom-1)+1 ie = imp_rows_index(idom) do i = is, ie irow = imp_rows_item(1,i) ncol = imp_rows_item(2,i) if (irow < 1 .or. BT_int%nr < irow) stop 'ERROR: allocate BT_int' cnt(irow) = cnt(irow) + ncol !!! might include duplicate cols enddo enddo ! allocate(BT_int%index(0:BT_int%nr)) call make_index(BT_int%nr, cnt, BT_int%index) ! BT_int%nnz = BT_int%index(BT_int%nr) allocate(BT_int%item(BT_int%nnz)) allocate(BT_int%A(BT_int%nnz * ndof2)) BT_int%A(:) = 0.d0 end subroutine allocate_BT_int subroutine copy_mesh(src, dst) implicit none type (hecmwST_local_mesh), intent(in) :: src type (hecmwST_local_mesh), intent(out) :: dst dst%zero = src%zero dst%MPI_COMM = src%MPI_COMM dst%PETOT = src%PETOT dst%PEsmpTOT = src%PEsmpTOT dst%my_rank = src%my_rank dst%n_subdomain = src%n_subdomain dst%n_node = src%n_node dst%nn_internal = src%nn_internal dst%n_dof = src%n_dof dst%n_neighbor_pe = src%n_neighbor_pe allocate(dst%neighbor_pe(dst%n_neighbor_pe)) dst%neighbor_pe(:) = src%neighbor_pe(:) allocate(dst%import_index(0:dst%n_neighbor_pe)) allocate(dst%export_index(0:dst%n_neighbor_pe)) dst%import_index(:)= src%import_index(:) dst%export_index(:)= src%export_index(:) allocate(dst%import_item(dst%import_index(dst%n_neighbor_pe))) dst%import_item(:) = src%import_item(:) allocate(dst%export_item(dst%export_index(dst%n_neighbor_pe))) dst%export_item(:) = src%export_item(:) allocate(dst%node_ID(2*dst%n_node)) dst%node_ID(1:2*dst%n_node) = src%node_ID(1:2*src%n_node) allocate(dst%global_node_ID(dst%n_node)) dst%global_node_ID(1:dst%n_node) = src%global_node_ID(1:src%n_node) dst%mpc%n_mpc = 0 dst%node => src%node end subroutine copy_mesh subroutine map_imported_cols(hecMESHnew, ncols, cols, n_add_node, add_nodes, map, i0) implicit none type (hecmwST_local_mesh), intent(inout) :: hecMESHnew integer(kind=kint), intent(in) :: ncols integer(kind=kint), intent(in) :: cols(cNCOL_ITEM,ncols) integer(kind=kint), allocatable, intent(out) :: map(:) integer(kind=kint), intent(out) :: n_add_node integer(kind=kint), allocatable, intent(out) :: add_nodes(:,:) integer(kind=kint), intent(out) :: i0 allocate(map(ncols)) ! call map_present_nodes(hecMESHnew, ncols, cols, map, n_add_node) ! ! add nodes == unmapped nodes ! call extract_add_nodes(ncols, cols, map, n_add_node, add_nodes) ! call append_nodes(hecMESHnew, n_add_node, add_nodes, i0) ! call map_additional_nodes(ncols, cols, n_add_node, add_nodes, i0, map) end subroutine map_imported_cols subroutine map_present_nodes(hecMESH, ncols, cols, map, n_add_node) implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH integer(kind=kint), intent(in) :: ncols integer(kind=kint), intent(in) :: cols(cNCOL_ITEM,ncols) integer(kind=kint), intent(out) :: map(ncols) integer(kind=kint), intent(out) :: n_add_node integer(kind=kint) :: i, j, lid, rank, llid, n_ext_node, idx integer(kind=kint), allocatable :: ext_node(:) type (hecmwST_pair_array) :: parray ! call hecmw_pair_array_init(parray, hecMESH%n_node - hecMESH%nn_internal) do i = hecMESH%nn_internal + 1, hecMESH%n_node call hecmw_pair_array_append(parray, i, hecMESH%node_ID(2*i-1), hecMESH%node_ID(2*i)) enddo call hecmw_pair_array_sort(parray) ! n_add_node = 0 n_ext_node = 0 allocate(ext_node(ncols)) !$omp parallel default(none), & !$omp& private(i,lid,rank,llid,idx,j), & !$omp& shared(ncols,hecMESH,cols,map,n_ext_node,ext_node,parray), & !$omp& reduction(+:n_add_node) !$omp do do i = 1, ncols lid = cols(cLID,i) rank = cols(cRANK,i) ! check rank if (rank == hecMESH%my_rank) then ! internal: set mapping map(i) = lid else ! external !$omp atomic capture n_ext_node = n_ext_node + 1 idx = n_ext_node !$omp end atomic ext_node(idx) = i endif enddo !$omp end do !$omp do do j = 1, n_ext_node i = ext_node(j) lid = cols(cLID,i) rank = cols(cRANK,i) ! search node_ID in external nodes llid = hecmw_pair_array_find_id(parray, lid, rank) if (llid > 0) then ! found: set mapping map(i) = llid else ! not found map(i) = -1 n_add_node = n_add_node + 1 endif enddo !$omp end do !$omp end parallel deallocate(ext_node) ! call hecmw_pair_array_finalize(parray) end subroutine map_present_nodes subroutine extract_add_nodes(ncols, cols, map, n_add_node, add_nodes) implicit none integer(kind=kint), intent(in) :: ncols integer(kind=kint), intent(in) :: cols(cNCOL_ITEM,ncols), map(ncols) integer(kind=kint), intent(inout) :: n_add_node integer(kind=kint), allocatable, intent(out) :: add_nodes(:,:) integer(kind=kint) :: cnt, i allocate(add_nodes(cNCOL_ITEM,n_add_node)) cnt = 0 do i = 1, ncols if (map(i) == -1) then cnt = cnt + 1 add_nodes(1:cNCOL_ITEM,cnt) = cols(1:cNCOL_ITEM,i) endif enddo if (cnt /= n_add_node) stop 'ERROR: extract add_nodes' call sort_and_uniq_add_nodes(n_add_node, add_nodes) end subroutine extract_add_nodes subroutine sort_and_uniq_add_nodes(n_add_node, add_nodes) implicit none integer(kind=kint), intent(inout) :: n_add_node integer(kind=kint), intent(inout) :: add_nodes(cNCOL_ITEM,n_add_node) integer(kind=kint) :: ndup call sort_add_nodes(add_nodes, 1, n_add_node) call uniq_add_nodes(add_nodes, n_add_node, ndup) n_add_node = n_add_node - ndup end subroutine sort_and_uniq_add_nodes recursive subroutine sort_add_nodes(add_nodes, id1, id2) implicit none integer(kind=kint), intent(inout) :: add_nodes(:,:) integer(kind=kint), intent(in) :: id1, id2 integer(kind=kint) :: center, left, right integer(kind=kint) :: pivot(cNCOL_ITEM), tmp(cNCOL_ITEM) if (id1 >= id2) return center = (id1 + id2) / 2 pivot(1:cNCOL_ITEM) = add_nodes(1:cNCOL_ITEM,center) left = id1 right = id2 do do while ((add_nodes(cRANK,left) < pivot(cRANK)) .or. & (add_nodes(cRANK,left) == pivot(cRANK) .and. add_nodes(cLID,left) < pivot(cLID))) left = left + 1 enddo do while ((pivot(cRANK) < add_nodes(cRANK,right)) .or. & (pivot(cRANK) == add_nodes(cRANK,right) .and. pivot(cLID) < add_nodes(cLID,right))) right = right - 1 enddo if (left >= right) exit tmp(1:cNCOL_ITEM) = add_nodes(1:cNCOL_ITEM,left) add_nodes(1:cNCOL_ITEM,left) = add_nodes(1:cNCOL_ITEM,right) add_nodes(1:cNCOL_ITEM,right) = tmp(1:cNCOL_ITEM) left = left + 1 right = right - 1 enddo if (id1 < left-1) call sort_add_nodes(add_nodes, id1, left-1) if (right+1 < id2) call sort_add_nodes(add_nodes, right+1, id2) return end subroutine sort_add_nodes subroutine uniq_add_nodes(add_nodes, len, ndup) implicit none integer(kind=kint), intent(inout) :: add_nodes(:,:) integer(kind=kint), intent(in) :: len integer(kind=kint), intent(out) :: ndup integer(kind=kint) :: i ndup = 0 do i = 2,len if (add_nodes(cLID,i) == add_nodes(cLID,i-1-ndup) .and. & add_nodes(cRANK,i) == add_nodes(cRANK,i-1-ndup)) then ndup = ndup + 1 else if (ndup > 0) then add_nodes(1:cNCOL_ITEM,i-ndup) = add_nodes(1:cNCOL_ITEM,i) endif enddo end subroutine uniq_add_nodes subroutine search_add_nodes(n_add_node, add_nodes, rank, lid, idx) implicit none integer(kind=kint), intent(in) :: n_add_node integer(kind=kint), intent(in) :: add_nodes(cNCOL_ITEM,n_add_node) integer(kind=kint), intent(in) :: rank integer(kind=kint), intent(in) :: lid integer(kind=kint), intent(out) :: idx integer(kind=kint) :: left, right, center left = 1 right = n_add_node do while (left <= right) center = (left + right) / 2 if ((rank == add_nodes(cRANK,center)) .and. (lid == add_nodes(cLID,center))) then idx = center return else if ((rank < add_nodes(cRANK,center)) .or. & (rank == add_nodes(cRANK,center) .and. lid < add_nodes(cLID,center))) then right = center - 1 else if ((add_nodes(cRANK,center) < rank) .or. & (add_nodes(cRANK,center) == rank .and. add_nodes(cLID,center) < lid)) then left = center + 1 endif end do idx = -1 end subroutine search_add_nodes subroutine append_nodes(hecMESHnew, n_add_node, add_nodes, i0) implicit none type (hecmwST_local_mesh), intent(inout) :: hecMESHnew integer(kind=kint), intent(in) :: n_add_node integer(kind=kint), intent(in) :: add_nodes(:,:) integer(kind=kint), intent(out) :: i0 integer(kind=kint) :: n_node, i, ii integer(kind=kint), pointer :: node_ID(:), global_node_ID(:) i0 = hecMESHnew%n_node n_node = hecMESHnew%n_node + n_add_node allocate(node_ID(2*n_node)) allocate(global_node_ID(n_node)) do i = 1, hecMESHnew%n_node node_ID(2*i-1) = hecMESHnew%node_ID(2*i-1) node_ID(2*i ) = hecMESHnew%node_ID(2*i ) global_node_ID(i) = hecMESHnew%global_node_ID(i) enddo do i = 1, n_add_node ii = hecMESHnew%n_node + i node_ID(2*ii-1) = add_nodes(cLID,i) node_ID(2*ii ) = add_nodes(cRANK,i) if (cNCOL_ITEM >= 3) then global_node_ID(i) = add_nodes(cGID,i) else global_node_ID(i) = -1 endif enddo deallocate(hecMESHnew%node_ID) deallocate(hecMESHnew%global_node_ID) hecMESHnew%n_node = n_node hecMESHnew%node_ID => node_ID hecMESHnew%global_node_ID => global_node_ID end subroutine append_nodes subroutine map_additional_nodes(ncols, cols, n_add_node, add_nodes, i0, map) implicit none integer(kind=kint), intent(in) :: ncols integer(kind=kint), intent(in) :: cols(cNCOL_ITEM,ncols) integer(kind=kint), intent(in) :: n_add_node integer(kind=kint), intent(in) :: add_nodes(cNCOL_ITEM,n_add_node) integer(kind=kint), intent(in) :: i0 integer(kind=kint), intent(inout) :: map(ncols) integer(kind=kint) :: i, j do i = 1, ncols if (map(i) > 0) cycle call search_add_nodes(n_add_node, add_nodes, cols(cRANK,i), cols(cLID,i), j) if (j == -1) stop 'ERROR: map_additional_nodes' map(i) = i0 + j enddo end subroutine map_additional_nodes subroutine update_comm_table(hecMESHnew, n_add_node, add_nodes, i0) use m_hecmw_comm_f implicit none type (hecmwST_local_mesh), intent(inout) :: hecMESHnew integer(kind=kint), intent(in) :: n_add_node integer(kind=kint), allocatable, intent(inout) :: add_nodes(:,:) integer(kind=kint), intent(in) :: i0 integer(kind=kint), allocatable :: n_add_imp(:), add_imp_index(:) integer(kind=kint), allocatable :: add_imp_item_remote(:), add_imp_item_local(:) integer(kind=kint), allocatable :: n_add_exp(:), add_exp_index(:), add_exp_item(:) integer(kind=kint), allocatable :: n_new_imp(:), n_new_exp(:) integer(kind=kint) :: npe, nnb, comm, new_nnb integer(kind=kint), pointer :: nbpe(:), new_nbpe(:) integer(kind=kint), pointer :: import_index(:), export_index(:), import_item(:), export_item(:) integer(kind=kint), pointer :: new_import_index(:), new_export_index(:) integer(kind=kint), pointer :: new_import_item(:), new_export_item(:) npe = hecMESHnew%PETOT nnb = hecMESHnew%n_neighbor_pe comm = hecMESHnew%MPI_COMM nbpe => hecMESHnew%neighbor_pe import_index => hecMESHnew%import_index export_index => hecMESHnew%export_index import_item => hecMESHnew%import_item export_item => hecMESHnew%export_item ! call count_add_imp_per_rank(n_add_node, add_nodes, npe, n_add_imp) if (DEBUG >= 3) write(0,*) ' DEBUG3: count add_imp per rank done' ! allocate(add_imp_index(0:npe)) call make_index(npe, n_add_imp, add_imp_index) if (DEBUG >= 3) write(0,*) ' DEBUG3: make add_imp_index done' ! call make_add_imp_item(n_add_node, add_nodes, npe, i0, add_imp_index, & add_imp_item_remote, add_imp_item_local) if (DEBUG >= 3) write(0,*) ' DEBUG3: make add_imp_item done' ! deallocate(add_nodes) ! ! all_to_all n_add_imp -> n_add_exp ! allocate(n_add_exp(npe)) call HECMW_ALLTOALL_INT(n_add_imp, 1, n_add_exp, 1, comm) if (DEBUG >= 3) write(0,*) ' DEBUG3: alltoall n_add_imp to n_add_exp done' ! allocate(add_exp_index(0:npe)) call make_index(npe, n_add_exp, add_exp_index) if (DEBUG >= 3) write(0,*) ' DEBUG3: make add_exp_index done' ! call send_recv_add_imp_exp_item(npe, add_imp_index, add_imp_item_remote, & add_exp_index, add_exp_item, comm) if (DEBUG >= 3) write(0,*) ' DEBUG3: send recv add_imp/exp_item done' ! ! count new import ! call count_new_comm_nodes(npe, nnb, nbpe, import_index, n_add_imp, n_new_imp) if (DEBUG >= 3) write(0,*) ' DEBUG3: count new comm_nodes (import) done' ! ! count new export ! call count_new_comm_nodes(npe, nnb, nbpe, export_index, n_add_exp, n_new_exp) if (DEBUG >= 3) write(0,*) ' DEBUG3: count new comm_nodes (export) done' ! call update_neighbor_pe(npe, n_new_imp, n_new_exp, new_nnb, new_nbpe) if (DEBUG >= 3) write(0,*) ' DEBUG3: update neighbor_pe done' ! ! merge import table: import ! call merge_comm_table(npe, nnb, nbpe, import_index, import_item, & new_nnb, new_nbpe, add_imp_index, add_imp_item_local, n_add_imp, n_new_imp, & new_import_index, new_import_item) if (DEBUG >= 3) write(0,*) ' DEBUG3: merge comm_table (import) done' ! deallocate(n_add_imp) deallocate(add_imp_index) deallocate(add_imp_item_remote, add_imp_item_local) deallocate(n_new_imp) ! ! merge export table: export ! call merge_comm_table(npe, nnb, nbpe, export_index, export_item, & new_nnb, new_nbpe, add_exp_index, add_exp_item, n_add_exp, n_new_exp, & new_export_index, new_export_item) if (DEBUG >= 3) write(0,*) ' DEBUG3: merge comm_table (export) done' ! deallocate(n_add_exp) deallocate(add_exp_index) deallocate(add_exp_item) deallocate(n_new_exp) ! deallocate(nbpe) deallocate(import_index,import_item) deallocate(export_index,export_item) hecMESHnew%n_neighbor_pe = new_nnb hecMESHnew%neighbor_pe => new_nbpe hecMESHnew%import_index => new_import_index hecMESHnew%export_index => new_export_index hecMESHnew%import_item => new_import_item hecMESHnew%export_item => new_export_item end subroutine update_comm_table subroutine count_add_imp_per_rank(n_add_node, add_nodes, npe, n_add_imp) implicit none integer(kind=kint), intent(in) :: n_add_node integer(kind=kint), intent(in) :: add_nodes(cNCOL_ITEM,n_add_node) integer(kind=kint), intent(in) :: npe integer(kind=kint), allocatable, intent(out) :: n_add_imp(:) integer(kind=kint) :: i, rank allocate(n_add_imp(npe)) n_add_imp(:) = 0 do i = 1, n_add_node rank = add_nodes(cRANK,i) n_add_imp(rank+1) = n_add_imp(rank+1) + 1 enddo end subroutine count_add_imp_per_rank subroutine make_add_imp_item(n_add_node, add_nodes, npe, i0, add_imp_index, & add_imp_item_remote, add_imp_item_local) implicit none integer(kind=kint), intent(in) :: n_add_node integer(kind=kint), intent(in) :: add_nodes(cNCOL_ITEM,n_add_node) integer(kind=kint), intent(in) :: npe, i0 integer(kind=kint), allocatable, intent(in) :: add_imp_index(:) integer(kind=kint), allocatable, intent(out) :: add_imp_item_remote(:), add_imp_item_local(:) integer(kind=kint), allocatable :: cnt(:) integer(kind=kint) :: i, lid, rank, ipe allocate(add_imp_item_remote(add_imp_index(npe))) allocate(add_imp_item_local(add_imp_index(npe))) allocate(cnt(npe)) cnt(:) = 0 do i = 1, n_add_node lid = add_nodes(cLID,i) rank = add_nodes(cRANK,i) ipe = rank + 1 cnt(ipe) = cnt(ipe) + 1 add_imp_item_remote(add_imp_index(ipe-1) + cnt(ipe)) = lid add_imp_item_local(add_imp_index(ipe-1) + cnt(ipe)) = i0 + i enddo deallocate(cnt) end subroutine make_add_imp_item subroutine send_recv_add_imp_exp_item(npe, add_imp_index, add_imp_item_remote, & add_exp_index, add_exp_item, mpi_comm) use m_hecmw_comm_f implicit none integer(kind=kint), intent(in) :: npe integer(kind=kint), allocatable, intent(in) :: add_imp_index(:), add_imp_item_remote(:) integer(kind=kint), allocatable, intent(in) :: add_exp_index(:) integer(kind=kint), allocatable, intent(out) :: add_exp_item(:) integer(kind=kint), intent(in) :: mpi_comm integer(kind=kint) :: n_send, i, irank, is, ie, len, tag integer(kind=kint), allocatable :: requests(:) integer(kind=kint), allocatable :: statuses(:,:) allocate(add_exp_item(add_exp_index(npe))) allocate(requests(npe)) allocate(statuses(HECMW_STATUS_SIZE, npe)) n_send = 0 do i = 1, npe irank = i-1 is = add_imp_index(i-1)+1 ie = add_imp_index(i) len = ie - is + 1 if (len == 0) cycle tag = 4001 n_send = n_send + 1 call HECMW_ISEND_INT(add_imp_item_remote(is:ie), len, irank, tag, & mpi_comm, requests(n_send)) enddo ! do i = 1, npe irank = i-1 is = add_exp_index(i-1)+1 ie = add_exp_index(i) len = ie - is + 1 if (len == 0) cycle tag = 4001 call HECMW_RECV_INT(add_exp_item(is:ie), len, irank, tag, & mpi_comm, statuses(:,1)) enddo call HECMW_Waitall(n_send, requests, statuses) end subroutine send_recv_add_imp_exp_item subroutine count_new_comm_nodes(npe, org_nnb, org_nbpe, org_index, n_add, n_new) implicit none integer(kind=kint), intent(in) :: npe, org_nnb !integer(kind=kint), intent(in) :: org_nbpe(org_nnb), org_index(0:org_nnb), n_add(npe) integer(kind=kint), pointer, intent(in) :: org_nbpe(:), org_index(:) integer(kind=kint), intent(in) :: n_add(:) integer(kind=kint), allocatable, intent(out) :: n_new(:) integer(kind=kint) :: i, irank, n_org allocate(n_new(npe)) n_new(:) = n_add(:) do i = 1, org_nnb irank = org_nbpe(i) n_org = org_index(i) - org_index(i-1) n_new(irank+1) = n_new(irank+1) + n_org enddo end subroutine count_new_comm_nodes subroutine update_neighbor_pe(npe, n_new_imp, n_new_exp, & new_nnb, new_nbpe) implicit none integer(kind=kint), intent(in) :: npe integer(kind=kint), intent(in) :: n_new_imp(npe), n_new_exp(npe) integer(kind=kint), intent(out) :: new_nnb integer(kind=kint), pointer, intent(out) :: new_nbpe(:) integer(kind=kint) :: i new_nnb = 0 do i = 1, npe if (n_new_imp(i) > 0 .or. n_new_exp(i) > 0) new_nnb = new_nnb+1 enddo allocate(new_nbpe(new_nnb)) new_nnb = 0 do i = 1, npe if (n_new_imp(i) > 0 .or. n_new_exp(i) > 0) then new_nnb = new_nnb+1 new_nbpe(new_nnb) = i-1 endif enddo end subroutine update_neighbor_pe subroutine merge_comm_table(npe, org_nnb, org_nbpe, org_index, org_item, & new_nnb, new_nbpe, add_index, add_item, n_add, n_new, new_index, new_item) implicit none integer(kind=kint), intent(in) :: npe, org_nnb !integer(kind=kint), intent(in) :: org_nbpe(org_nnb), org_index(0:org_nnb), org_item(:) integer(kind=kint), pointer, intent(in) :: org_nbpe(:), org_index(:), org_item(:) integer(kind=kint), intent(in) :: new_nnb !integer(kind=kint), intent(in) :: new_nbpe(new_nnb), add_index(0:npe), add_item(:) integer(kind=kint), pointer, intent(in) :: new_nbpe(:) integer(kind=kint), allocatable, intent(in) :: add_index(:), add_item(:) integer(kind=kint), intent(in) :: n_add(npe), n_new(npe) integer(kind=kint), pointer, intent(out) :: new_index(:), new_item(:) integer(kind=kint), allocatable :: cnt(:) integer(kind=kint) :: i, irank, j, jrank, i0, j0, len ! if (associated(new_index)) deallocate(new_index) ! if (associated(new_item)) deallocate(new_item) allocate(new_index(0:new_nnb)) new_index(0) = 0 do i = 1, new_nnb irank = new_nbpe(i) new_index(i) = new_index(i-1) + n_new(irank+1) enddo allocate(new_item(new_index(new_nnb))) allocate(cnt(npe)) cnt(:) = 0 j = 1 jrank = new_nbpe(j) do i = 1, org_nnb if (org_index(i) - org_index(i-1) == 0) cycle irank = org_nbpe(i) do while (jrank < irank) j = j + 1 if (j > new_nnb) exit jrank = new_nbpe(j) enddo if (jrank /= irank) stop 'ERROR: merging comm table: org into new' i0 = org_index(i-1) len = org_index(i) - i0 j0 = new_index(j-1) new_item(j0+1:j0+len) = org_item(i0+1:i0+len) cnt(jrank+1) = len enddo j = 1 jrank = new_nbpe(j) do i = 1, npe if (n_add(i) == 0) cycle irank = i-1 do while (jrank < irank) j = j + 1 jrank = new_nbpe(j) enddo if (jrank /= irank) stop 'ERROR: merging comm table: add into new' i0 = add_index(i-1) len = add_index(i) - i0 j0 = new_index(j-1) + cnt(jrank+1) new_item(j0+1:j0+len) = add_item(i0+1:i0+len) cnt(jrank+1) = cnt(jrank+1) + len if (cnt(jrank+1) /= new_index(j)-new_index(j-1)) stop 'ERROR: merging comm table' enddo deallocate(cnt) end subroutine merge_comm_table subroutine copy_vals_to_BT_int(nnb, imp_rows_index, imp_cols_index, & imp_rows_item, map, ndof2, imp_vals_item, BT_int) implicit none integer(kind=kint), intent(in) :: nnb integer(kind=kint), allocatable, intent(in) :: imp_rows_index(:), imp_cols_index(:) integer(kind=kint), intent(in) :: imp_rows_item(:,:), map(:) integer(kind=kint), intent(in) :: ndof2 real(kind=kreal), intent(in) :: imp_vals_item(:) type (hecmwST_local_matrix), intent(inout) :: BT_int integer(kind=kint), allocatable :: cnt(:) integer(kind=kint) :: idom, is, ie, ic0, i, irow, ncol, j0, j allocate(cnt(BT_int%nr)) cnt(:) = 0 do idom = 1, nnb is = imp_rows_index(idom-1)+1 ie = imp_rows_index(idom) ic0 = imp_cols_index(idom-1) do i = is, ie irow = imp_rows_item(1,i) ncol = imp_rows_item(2,i) if (irow < 1 .or. BT_int%nr < irow) stop 'ERROR: copy vals to BT_int: irow' j0 = BT_int%index(irow-1) + cnt(irow) do j = 1, ncol BT_int%item(j0+j) = map(ic0+j) BT_int%A(ndof2*(j0+j-1)+1:ndof2*(j0+j)) = imp_vals_item(ndof2*(ic0+j-1)+1:ndof2*(ic0+j)) enddo cnt(irow) = cnt(irow) + ncol ic0 = ic0 + ncol enddo if (ic0 /= imp_cols_index(idom)) stop 'ERROR: copy vals to BT_int: ic0' enddo deallocate(cnt) end subroutine copy_vals_to_BT_int subroutine sort_and_uniq_rows(BTmat) use hecmw_array_util implicit none type (hecmwST_local_matrix), intent(inout) :: BTmat integer(kind=kint) :: nr, ndof, ndof2 integer(kind=kint) :: irow, is, ie, is_new, ie_new, i, i_new integer(kind=kint) :: ndup, ndup_tot integer(kind=kint) :: js, je, js_new, je_new integer(kind=kint) :: new_nnz integer(kind=kint), allocatable :: cnt(:) integer(kind=kint), pointer :: sort_item(:), new_index(:), new_item(:) real(kind=kreal), pointer :: new_A(:) logical :: sorted real(kind=kreal) :: t0, t1 t0 = hecmw_wtime() nr = BTmat%nr ! check if already sorted sorted = .true. OUTER: do irow = 1, nr is = BTmat%index(irow-1)+1 ie = BTmat%index(irow) do i = is, ie-1 if (BTmat%item(i) >= BTmat%item(i+1)) then sorted = .false. exit OUTER endif enddo end do OUTER t1 = hecmw_wtime() if (TIMER >= 4) write(0, '(A,f10.4,L2)') "####### sort_and_uniq_rows (1) : ",t1-t0,sorted t0 = hecmw_wtime() if (sorted) return ! perform sort ndof = BTmat%ndof ndof2 = ndof*ndof ! duplicate item array (sort_item) allocate(sort_item(BTmat%nnz)) do i = 1, BTmat%nnz sort_item(i) = BTmat%item(i) enddo ! sort and uniq item for each row allocate(cnt(nr)) ndup_tot = 0 !$omp parallel do default(none), & !$omp& schedule(dynamic,1), & !$omp& private(irow,is,ie,ndup), & !$omp& shared(nr,BTmat,sort_item,cnt), & !$omp& reduction(+:ndup_tot) do irow = 1, nr is = BTmat%index(irow-1)+1 ie = BTmat%index(irow) call hecmw_qsort_int_array(sort_item, is, ie) call hecmw_uniq_int_array(sort_item, is, ie, ndup) cnt(irow) = (ie-is+1) - ndup ndup_tot = ndup_tot + ndup enddo !$omp end parallel do t1 = hecmw_wtime() if (TIMER >= 4) write(0, '(A,f10.4,I5)') "####### sort_and_uniq_rows (2) : ",t1-t0,ndup_tot t0 = hecmw_wtime() ! make new index and item array (new_index, new_item) if (ndup_tot == 0) then new_index => BTmat%index new_nnz = BTmat%nnz new_item => sort_item else allocate(new_index(0:nr)) call make_index(nr, cnt, new_index) new_nnz = new_index(nr) allocate(new_item(new_nnz)) do irow = 1, nr is = BTmat%index(irow-1)+1 ie = is+cnt(irow)-1 is_new = new_index(irow-1)+1 ie_new = is_new+cnt(irow)-1 new_item(is_new:ie_new) = sort_item(is:ie) enddo deallocate(sort_item) endif deallocate(cnt) t1 = hecmw_wtime() if (TIMER >= 4) write(0, '(A,f10.4)') "####### sort_and_uniq_rows (3) : ",t1-t0 t0 = hecmw_wtime() ! allocate and clear value array (new_A) allocate(new_A(ndof2*new_nnz)) new_A(:) = 0.d0 ! copy/add value from old A to new A !$omp parallel do default(none), & !$omp& schedule(dynamic,1), & !$omp& private(irow,is,ie,is_new,ie_new,i,i_new,js,je,js_new,je_new), & !$omp& shared(nr,BTmat,new_index,new_item,ndof2,new_A) do irow = 1, nr is = BTmat%index(irow-1)+1 ie = BTmat%index(irow) is_new = new_index(irow-1)+1 ie_new = new_index(irow) ! for each item in row do i = is, ie ! find place in new item call hecmw_bsearch_int_array(new_item, is_new, ie_new, BTmat%item(i), i_new) if (i_new == -1) stop 'ERROR: sort_and_uniq_rows' js = ndof2*(i-1)+1 je = ndof2*i js_new = ndof2*(i_new-1)+1 je_new = ndof2*i_new new_A(js_new:je_new) = new_A(js_new:je_new) + BTmat%A(js:je) enddo enddo !$omp end parallel do t1 = hecmw_wtime() if (TIMER >= 4) write(0, '(A,f10.4)') "####### sort_and_uniq_rows (4) : ",t1-t0 t0 = hecmw_wtime() ! deallocate/update nnz, index, item, A if (ndup_tot == 0) then deallocate(BTmat%item) BTmat%item => new_item deallocate(BTmat%A) BTmat%A => new_A else BTmat%nnz = new_nnz deallocate(BTmat%index) BTmat%index => new_index deallocate(BTmat%item) BTmat%item => new_item deallocate(BTmat%A) BTmat%A => new_A endif end subroutine sort_and_uniq_rows subroutine hecmw_localmat_add(Amat, Bmat, Cmat) implicit none type (hecmwST_local_matrix), intent(in) :: Amat type (hecmwST_local_matrix), intent(in) :: Bmat type (hecmwST_local_matrix), intent(out) :: Cmat integer(kind=kint) :: ndof, ndof2, nr, nc, i, icnt, js, je, j, jcol, idx, i0, k integer(kind=kint), allocatable :: iw(:) if (Amat%ndof /= Bmat%ndof) stop 'ERROR: hecmw_localmat_add: non-matching ndof' ndof = Amat%ndof ndof2 = ndof*ndof nr = min(Amat%nr, Bmat%nr) nc = max(Amat%nc, Bmat%nc) Cmat%ndof = ndof Cmat%nr = nr Cmat%nc = nc Cmat%nnz = 0 allocate(Cmat%index(0:nr)) Cmat%index(0) = 0 allocate(iw(nc)) do i = 1, nr icnt = 0 ! Amat js = Amat%index(i-1)+1 je = Amat%index(i) do j = js, je jcol = Amat%item(j) icnt = icnt + 1 iw(icnt) = jcol enddo ! Bmat js = Bmat%index(i-1)+1 je = Bmat%index(i) lj1: do j = js, je jcol = Bmat%item(j) do k = 1, icnt if (iw(k) == jcol) cycle lj1 enddo icnt = icnt + 1 iw(icnt) = jcol enddo lj1 Cmat%index(i) = Cmat%index(i-1) + icnt enddo Cmat%nnz = Cmat%index(nr) allocate(Cmat%item(Cmat%nnz)) allocate(Cmat%A(ndof2*Cmat%nnz)) do i = 1, nr i0 = Cmat%index(i-1) icnt = 0 ! Amat js = Amat%index(i-1)+1 je = Amat%index(i) do j = js, je jcol = Amat%item(j) icnt = icnt + 1 idx = i0 + icnt Cmat%item(idx) = jcol Cmat%A(ndof2*(idx-1)+1:ndof2*idx) = Amat%A(ndof2*(j-1)+1:ndof2*j) enddo ! Bmat js = Bmat%index(i-1)+1 je = Bmat%index(i) lj2: do j = js, je jcol = Bmat%item(j) do k = 1, icnt idx = i0 + k if (Cmat%item(idx) == jcol) then Cmat%A(ndof2*(idx-1)+1:ndof2*idx) = & Cmat%A(ndof2*(idx-1)+1:ndof2*idx) + Bmat%A(ndof2*(j-1)+1:ndof2*j) cycle lj2 endif enddo icnt = icnt + 1 idx = i0 + icnt Cmat%item(idx) = jcol Cmat%A(ndof2*(idx-1)+1:ndof2*idx) = Bmat%A(ndof2*(j-1)+1:ndof2*j) enddo lj2 if (i0 + icnt /= Cmat%index(i)) stop 'ERROR: merge localmat' enddo call sort_and_uniq_rows(Cmat) end subroutine hecmw_localmat_add ! subroutine hecmw_localmat_add(Amat, Bmat, Cmat) ! implicit none ! type (hecmwST_local_matrix), intent(in) :: Amat ! type (hecmwST_local_matrix), intent(in) :: Bmat ! type (hecmwST_local_matrix), intent(out) :: Cmat ! integer(kind=kint) :: ndof, ndof2, nr, nc, i, js, je, j, jcol, nnz_row, idx, ks, ke, k, kcol ! if (Amat%ndof /= Bmat%ndof) stop 'ERROR: hecmw_localmat_add: non-matching ndof' ! ndof = Amat%ndof ! ndof2 = ndof*ndof ! nr = min(Amat%nr, Bmat%nr) ! nc = max(Amat%nc, Bmat%nc) ! Cmat%ndof = ndof ! Cmat%nr = nr ! Cmat%nc = nc ! Cmat%nnz = Amat%index(nr) + Bmat%index(nr) ! allocate(Cmat%index(0:nr)) ! allocate(Cmat%item(Cmat%nnz)) ! allocate(Cmat%A(ndof2 * Cmat%nnz)) ! Cmat%index(0) = 0 ! idx = 0 ! do i = 1, nr ! ! Amat ! js = Amat%index(i-1)+1 ! je = Amat%index(i) ! do j = js, je ! idx = idx + 1 ! Cmat%item(idx) = Amat%item(j) ! Cmat%A(ndof2*(idx-1)+1:ndof2*idx) = Amat%A(ndof2*(j-1)+1:ndof2*j) ! enddo ! ! Bmat ! js = Bmat%index(i-1)+1 ! je = Bmat%index(i) ! do j = js, je ! idx = idx + 1 ! Cmat%item(idx) = Bmat%item(j) ! Cmat%A(ndof2*(idx-1)+1:ndof2*idx) = Bmat%A(ndof2*(j-1)+1:ndof2*j) ! enddo ! Cmat%index(i) = idx ! enddo ! if (Cmat%index(nr) /= Cmat%nnz) stop 'ERROR: merge localmat' ! call sort_and_uniq_rows(Cmat) ! end subroutine hecmw_localmat_add subroutine hecmw_localmat_init_with_hecmat(BKmat, hecMAT, num_lagrange) implicit none type (hecmwST_local_matrix), intent(inout) :: BKmat type (hecmwST_matrix), intent(in) :: hecMAT integer(kind=kint), optional, intent(in) :: num_lagrange integer(kind=kint) :: ndof, ndof2, i, idx, idx2, js, je, j, k integer(kind=kint), allocatable :: incl_nz(:), cnt(:) logical :: check_nonzero !check_nonzero = .false. check_nonzero = .true. !!! always checking nonzero seems to be faster ! ndof = hecMAT%NDOF ndof2 = ndof*ndof ! nr, nc, nnz BKmat%nr = hecMAT%NP BKmat%nc = hecMAT%NP BKmat%ndof = ndof ! if (present(num_lagrange)) then !!! TEMPORARY (DUE TO WRONG conMAT WHEN num_lagrange==0) !!! if (num_lagrange == 0) then BKmat%nnz = 0 allocate(BKmat%index(0:BKmat%nr)) BKmat%index(:) = 0 BKmat%item => null() BKmat%A => null() return endif check_nonzero = .true. endif ! if (check_nonzero) then allocate(incl_nz(hecMAT%NPL + hecMAT%NPU + hecMAT%NP)) allocate(cnt(BKmat%nr)) incl_nz(:) = 0 !$omp parallel default(none), & !$omp& private(i,idx,js,je,j,k), & !$omp& shared(BKmat,hecMAT,cnt,ndof2,incl_nz) !$omp do do i = 1, BKmat%nr idx = hecMAT%indexL(i-1) + (i-1) + hecMAT%indexU(i-1) cnt(i) = 0 ! lower js = hecMAT%indexL(i-1)+1 je = hecMAT%indexL(i) do j = js, je idx = idx + 1 do k = 1, ndof2 if (hecMAT%AL(ndof2*(j-1)+k) /= 0.0d0) then incl_nz(idx) = 1 cnt(i) = cnt(i) + 1 exit endif enddo enddo ! diag idx = idx + 1 do k = 1, ndof2 if (hecMAT%D(ndof2*(i-1)+k) /= 0.0d0) then incl_nz(idx) = 1 cnt(i) = cnt(i) + 1 exit endif enddo ! upper js = hecMAT%indexU(i-1)+1 je = hecMAT%indexU(i) do j = js, je idx = idx + 1 do k = 1, ndof2 if (hecMAT%AU(ndof2*(j-1)+k) /= 0.0d0) then incl_nz(idx) = 1 cnt(i) = cnt(i) + 1 exit endif enddo enddo if (idx /= hecMAT%indexL(i) + i + hecMAT%indexU(i)) stop 'ERROR: hecmw_localmat_init_with_hecmat: count' enddo !$omp end do !$omp end parallel ! index allocate(BKmat%index(0:BKmat%nr)) call make_index(BKmat%nr, cnt, BKmat%index) deallocate(cnt) BKmat%nnz = BKmat%index(BKmat%nr) ! item, A allocate(BKmat%item(BKmat%nnz)) allocate(BKmat%A(ndof2 * BKmat%nnz)) !$omp parallel default(none), & !$omp& private(i,idx,idx2,js,je,j), & !$omp& shared(BKmat,hecMAT,ndof2,incl_nz) !$omp do do i = 1, BKmat%nr idx = hecMAT%indexL(i-1) + (i-1) + hecMAT%indexU(i-1) idx2 = BKmat%index(i-1) ! lower js = hecMAT%indexL(i-1)+1 je = hecMAT%indexL(i) do j = js, je idx = idx + 1 if (incl_nz(idx) == 1) then idx2 = idx2 + 1 BKmat%item(idx2) = hecMAT%itemL(j) BKmat%A(ndof2*(idx2-1)+1:ndof2*idx2) = hecMAT%AL(ndof2*(j-1)+1:ndof2*j) endif enddo ! diag idx = idx + 1 if (incl_nz(idx) == 1) then idx2 = idx2 + 1 BKmat%item(idx2) = i BKmat%A(ndof2*(idx2-1)+1:ndof2*idx2) = hecMAT%D(ndof2*(i-1)+1:ndof2*i) endif ! upper js = hecMAT%indexU(i-1)+1 je = hecMAT%indexU(i) do j = js, je idx = idx + 1 if (incl_nz(idx) == 1) then idx2 = idx2 + 1 BKmat%item(idx2) = hecMAT%itemU(j) BKmat%A(ndof2*(idx2-1)+1:ndof2*idx2) = hecMAT%AU(ndof2*(j-1)+1:ndof2*j) endif enddo if (idx /= hecMAT%indexL(i) + i + hecMAT%indexU(i)) stop 'ERROR: hecmw_localmat_init_with_hecmat: copy' if (idx2 /= BKmat%index(i)) stop 'ERROR: hecmw_localmat_init_with_hecmat: index' enddo !$omp end do !$omp end parallel deallocate(incl_nz) else BKmat%nnz = hecMAT%NPL + hecMAT%NP + hecMAT%NPU allocate(BKmat%index(0:BKmat%nr)) allocate(BKmat%item(BKmat%nnz)) allocate(BKmat%A(ndof2 * BKmat%nnz)) BKmat%index(0) = 0 !$omp parallel do default(none), & !$omp& private(i,idx,js,je,j), & !$omp& shared(BKmat,hecMAT,ndof2) do i = 1, BKmat%nr idx = hecMAT%indexL(i-1) + (i-1) + hecMAT%indexU(i-1) ! lower js = hecMAT%indexL(i-1)+1 je = hecMAT%indexL(i) do j = js, je idx = idx + 1 BKmat%item(idx) = hecMAT%itemL(j) BKmat%A(ndof2*(idx-1)+1:ndof2*idx) = hecMAT%AL(ndof2*(j-1)+1:ndof2*j) enddo ! diag idx = idx + 1 BKmat%item(idx) = i BKmat%A(ndof2*(idx-1)+1:ndof2*idx) = hecMAT%D(ndof2*(i-1)+1:ndof2*i) ! upper js = hecMAT%indexU(i-1)+1 je = hecMAT%indexU(i) do j = js, je idx = idx + 1 BKmat%item(idx) = hecMAT%itemU(j) BKmat%A(ndof2*(idx-1)+1:ndof2*idx) = hecMAT%AU(ndof2*(j-1)+1:ndof2*j) enddo BKmat%index(i) = idx if (idx /= hecMAT%indexL(i) + i + hecMAT%indexU(i)) stop 'ERROR: hecmw_localmat_init_with_hecmat: copy' enddo !$omp end parallel do endif end subroutine hecmw_localmat_init_with_hecmat subroutine hecmw_localmat_add_hecmat(BKmat, hecMAT) implicit none type (hecmwST_local_matrix), intent(inout) :: BKmat type (hecmwST_matrix), intent(in) :: hecMAT type (hecmwST_local_matrix) :: W1mat, W2mat !! Should Be Simple If Non-Zero Profile Is Kept !! call hecmw_localmat_init_with_hecmat(W1mat, hecMAT) if (DEBUG >= 3) then write(700+hecmw_comm_get_rank(),*) 'BKmat (hecMAT)' if (DEBUG == 3) then call hecmw_localmat_write_ij(W1mat, 700+hecmw_comm_get_rank()) else call hecmw_localmat_write(W1mat, 700+hecmw_comm_get_rank()) endif endif call hecmw_localmat_add(BKmat, W1mat, W2mat) call hecmw_localmat_free(BKmat) call hecmw_localmat_free(W1mat) BKmat%nr = W2mat%nr BKmat%nc = W2mat%nc BKmat%nnz = W2mat%nnz BKmat%ndof = W2mat%ndof BKmat%index => W2mat%index BKmat%item => W2mat%item BKmat%A => W2mat%A end subroutine hecmw_localmat_add_hecmat subroutine hecmw_localmat_multmat(BKmat, BTmat, hecMESH, BKTmat) implicit none type (hecmwST_local_matrix), intent(inout) :: BKmat type (hecmwST_local_matrix), intent(inout) :: BTmat type (hecmwST_local_mesh), intent(inout) :: hecMESH type (hecmwST_local_matrix), intent(out) :: BKTmat type (hecmwST_matrix_comm) :: hecCOMM type (hecmwST_local_mesh) :: hecMESHnew type (hecmwST_local_matrix), allocatable :: BT_exp(:) type (hecmwST_local_matrix) :: BT_imp, BT_all integer(kind=kint), allocatable :: exp_cols_index(:) integer(kind=kint), allocatable :: exp_cols_item(:,:) real(kind=kreal) :: t0, t1 t0 = hecmw_wtime() ! call make_comm_table(BKmat, hecMESH, hecCOMM) if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: make_comm_table done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (1) : ',t1-t0 t0 = hecmw_wtime() ! if (BTmat%nr > hecMESH%nn_internal) then ! consider only internal part of BTmat if (DEBUG >= 1) write(0,'(A)') 'DEBUG: hecmw_localmat_multmat: ignore external part of BTmat' BTmat%nr = hecMESH%nn_internal BTmat%nnz = BTmat%index(BTmat%nr) endif ! call extract_BT_exp(BTmat, hecCOMM, BT_exp) if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: extract_BT_exp done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (2) : ',t1-t0 t0 = hecmw_wtime() ! call prepare_column_info(hecMESH, BT_exp, exp_cols_index, exp_cols_item) if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: prepare column info done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (3) : ',t1-t0 t0 = hecmw_wtime() ! call send_BT_exp_and_recv_BT_imp(hecMESH, hecCOMM, BT_exp, exp_cols_index, exp_cols_item, BT_imp, hecMESHnew) if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: send BT_exp and recv BT_imp done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (4) : ',t1-t0 t0 = hecmw_wtime() call free_comm_table(hecCOMM) ! call concat_BTmat_and_BT_imp(BTmat, BT_imp, BT_all) if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: concat BTmat and BT_imp into BT_all done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (5) : ',t1-t0 t0 = hecmw_wtime() call hecmw_localmat_free(BT_imp) ! call multiply_mat_mat(BKmat, BT_all, BKTmat) if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: multiply BKmat and BT_all into BKTmat done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (6) : ',t1-t0 t0 = hecmw_wtime() call hecmw_localmat_free(BT_all) ! if (hecMESH%n_neighbor_pe > 0) then hecMESH%n_node = hecMESHnew%n_node hecMESH%n_neighbor_pe = hecMESHnew%n_neighbor_pe deallocate(hecMESH%neighbor_pe) deallocate(hecMESH%import_index) deallocate(hecMESH%export_index) deallocate(hecMESH%import_item) deallocate(hecMESH%export_item) deallocate(hecMESH%node_ID) deallocate(hecMESH%global_node_ID) hecMESH%neighbor_pe => hecMESHnew%neighbor_pe hecMESH%import_index => hecMESHnew%import_index hecMESH%export_index => hecMESHnew%export_index hecMESH%import_item => hecMESHnew%import_item hecMESH%export_item => hecMESHnew%export_item hecMESH%node_ID => hecMESHnew%node_ID hecMESH%global_node_ID => hecMESHnew%global_node_ID if (DEBUG >= 1) write(0,*) 'DEBUG: hecmw_localmat_multmat: update hecMESH done' t1 = hecmw_wtime() if (TIMER >= 2) write(0,'(A,f10.4)') '##### hecmw_localmat_multmat (7) : ',t1-t0 endif end subroutine hecmw_localmat_multmat subroutine make_comm_table(BKmat, hecMESH, hecCOMM) use m_hecmw_comm_f implicit none type (hecmwST_local_matrix), intent(in) :: BKmat type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_matrix_comm), intent(out) :: hecCOMM integer(kind=kint) :: nn_int, nn_ext, nnb, i, icol, irank, idom, idx, n_send, tag, js, je, len integer(kind=kint), allocatable :: is_nz_col(:), imp_cnt(:), exp_cnt(:), import_item_remote(:) integer(kind=kint), allocatable :: requests(:), statuses(:,:) hecCOMM%zero = hecMESH%zero hecCOMM%HECMW_COMM = hecMESH%MPI_COMM hecCOMM%PETOT = hecMESH%PETOT hecCOMM%PEsmpTOT = hecMESH%PEsmpTOT hecCOMM%my_rank = hecMESH%my_rank hecCOMM%errnof = hecMESH%errnof hecCOMM%n_subdomain = hecMESH%n_subdomain hecCOMM%n_neighbor_pe = hecMESH%n_neighbor_pe allocate(hecCOMM%neighbor_pe(hecCOMM%n_neighbor_pe)) hecCOMM%neighbor_pe(:) = hecMESH%neighbor_pe(:) ! nn_int = hecMESH%nn_internal nn_ext = hecMESH%n_node - hecMESH%nn_internal nnb = hecCOMM%n_neighbor_pe ! ! check_external_nz_cols (by profile (not number)) allocate(is_nz_col(nn_ext)) is_nz_col(:) = 0 do i = 1, BKmat%index(nn_int) icol = BKmat%item(i) if (icol > nn_int) is_nz_col(icol - nn_int) = 1 enddo ! ! count_nz_cols_per_rank allocate(imp_cnt(nnb)) imp_cnt(:) = 0 do i = 1, nn_ext if (is_nz_col(i) == 1) then irank = hecMESH%node_ID(2*(nn_int+i)) call rank_to_idom(hecMESH, irank, idom) imp_cnt(idom) = imp_cnt(idom) + 1 endif enddo if (DEBUG >= 3) write(0,*) ' DEBUG3: imp_cnt',imp_cnt(:) ! ! make_index allocate(hecCOMM%import_index(0:nnb)) call make_index(nnb, imp_cnt, hecCOMM%import_index) if (DEBUG >= 3) write(0,*) ' DEBUG3: import_index',hecCOMM%import_index(:) ! ! fill item allocate(hecCOMM%import_item(hecCOMM%import_index(nnb))) imp_cnt(:) = 0 do i = 1, nn_ext if (is_nz_col(i) == 1) then irank = hecMESH%node_ID(2*(nn_int+i)) call rank_to_idom(hecMESH, irank, idom) imp_cnt(idom) = imp_cnt(idom) + 1 idx = hecCOMM%import_index(idom-1)+imp_cnt(idom) hecCOMM%import_item(idx) = nn_int+i endif enddo if (DEBUG >= 3) write(0,*) ' DEBUG3: import_item',hecCOMM%import_item(:) ! allocate(import_item_remote(hecCOMM%import_index(nnb))) do i = 1, hecCOMM%import_index(nnb) import_item_remote(i) = hecMESH%node_ID(2*hecCOMM%import_item(i)-1) enddo if (DEBUG >= 3) write(0,*) ' DEBUG3: import_item_remote',import_item_remote(:) ! allocate(requests(2*nnb)) allocate(statuses(HECMW_STATUS_SIZE, 2*nnb)) ! ! send/recv n_send = 0 do idom = 1, nnb irank = hecCOMM%neighbor_pe(idom) n_send = n_send + 1 tag = 6001 call HECMW_ISEND_INT(imp_cnt(idom), 1, irank, tag, hecCOMM%HECMW_COMM, requests(n_send)) if (imp_cnt(idom) > 0) then js = hecCOMM%import_index(idom-1)+1 je = hecCOMM%import_index(idom) len = je-js+1 n_send = n_send + 1 tag = 6002 call HECMW_ISEND_INT(import_item_remote(js:je), len, irank, tag, & hecCOMM%HECMW_COMM, requests(n_send)) endif enddo ! ! index allocate(exp_cnt(nnb)) do idom = 1, nnb irank = hecCOMM%neighbor_pe(idom) tag = 6001 call HECMW_RECV_INT(exp_cnt(idom), 1, irank, tag, hecCOMM%HECMW_COMM, statuses(:,1)) enddo allocate(hecCOMM%export_index(0:nnb)) call make_index(nnb, exp_cnt, hecCOMM%export_index) if (DEBUG >= 3) write(0,*) ' DEBUG3: export_index',hecCOMM%export_index(:) ! ! item allocate(hecCOMM%export_item(hecCOMM%export_index(nnb))) do idom = 1, nnb if (exp_cnt(idom) <= 0) cycle irank = hecCOMM%neighbor_pe(idom) js = hecCOMM%export_index(idom-1)+1 je = hecCOMM%export_index(idom) len = je-js+1 tag = 6002 call HECMW_RECV_INT(hecCOMM%export_item(js:je), len, irank, tag, & hecCOMM%HECMW_COMM, statuses(:,1)) enddo if (DEBUG >= 3) write(0,*) ' DEBUG3: export_item',hecCOMM%export_item(:) call HECMW_Waitall(n_send, requests, statuses) ! deallocate(imp_cnt) deallocate(exp_cnt) deallocate(import_item_remote) end subroutine make_comm_table subroutine free_comm_table(hecCOMM) implicit none type (hecmwST_matrix_comm), intent(inout) :: hecCOMM deallocate(hecCOMM%neighbor_pe) deallocate(hecCOMM%import_index) deallocate(hecCOMM%import_item) deallocate(hecCOMM%export_index) deallocate(hecCOMM%export_item) end subroutine free_comm_table subroutine extract_BT_exp(BTmat, hecCOMM, BT_exp) implicit none type (hecmwST_local_matrix), intent(in) :: BTmat type (hecmwST_matrix_comm), intent(in) :: hecCOMM type (hecmwST_local_matrix), allocatable, intent(out) :: BT_exp(:) integer(kind=kint) :: ndof, ndof2, idom, idx_0, idx_n, j, jrow, nnz_row, idx, ks, ke, k if (hecCOMM%n_neighbor_pe == 0) return allocate(BT_exp(hecCOMM%n_neighbor_pe)) ndof = BTmat%ndof ndof2 = ndof * ndof do idom = 1, hecCOMM%n_neighbor_pe idx_0 = hecCOMM%export_index(idom-1) idx_n = hecCOMM%export_index(idom) BT_exp(idom)%nr = idx_n - idx_0 BT_exp(idom)%nc = BTmat%nc BT_exp(idom)%nnz = 0 BT_exp(idom)%ndof = ndof allocate(BT_exp(idom)%index(0:BT_exp(idom)%nr)) BT_exp(idom)%index(0) = 0 do j = 1, BT_exp(idom)%nr jrow = hecCOMM%export_item(idx_0 + j) nnz_row = BTmat%index(jrow) - BTmat%index(jrow-1) BT_exp(idom)%index(j) = BT_exp(idom)%index(j-1) + nnz_row enddo BT_exp(idom)%nnz = BT_exp(idom)%index(BT_exp(idom)%nr) allocate(BT_exp(idom)%item(BT_exp(idom)%nnz)) allocate(BT_exp(idom)%A(ndof2 * BT_exp(idom)%nnz)) idx = 0 do j = 1, BT_exp(idom)%nr jrow = hecCOMM%export_item(idx_0 + j) ks = BTmat%index(jrow-1) + 1 ke = BTmat%index(jrow) do k = ks, ke idx = idx + 1 BT_exp(idom)%item(idx) = BTmat%item(k) BT_exp(idom)%A(ndof2*(idx-1)+1:ndof2*idx) = BTmat%A(ndof2*(k-1)+1:ndof2*k) enddo if (idx /= BT_exp(idom)%index(j)) stop 'ERROR: extract BT_exp' enddo enddo end subroutine extract_BT_exp subroutine send_BT_exp_and_recv_BT_imp(hecMESH, hecCOMM, BT_exp, exp_cols_index, exp_cols_item, BT_imp, hecMESHnew) use m_hecmw_comm_f implicit none type (hecmwST_local_mesh), intent(in) :: hecMESH type (hecmwST_matrix_comm), intent(in) :: hecCOMM type (hecmwST_local_matrix), allocatable, intent(inout) :: BT_exp(:) integer(kind=kint), allocatable, intent(inout) :: exp_cols_index(:) integer(kind=kint), allocatable, intent(inout) :: exp_cols_item(:,:) type (hecmwST_local_matrix), intent(out) :: BT_imp type (hecmwST_local_mesh), intent(inout) :: hecMESHnew integer(kind=kint), allocatable :: nnz_imp(:), cnt(:), index_imp(:) integer(kind=kint), allocatable :: imp_cols_index(:) integer(kind=kint), allocatable :: imp_cols_item(:,:) real(kind=kreal), allocatable :: imp_vals_item(:) integer(kind=kint) :: nnb, ndof, ndof2, idom, irank, nr, n_send, tag, idx_0, idx_n, j, jj, nnz integer(kind=kint), allocatable :: requests(:) integer(kind=kint), allocatable :: statuses(:,:) integer(kind=kint), allocatable :: map(:), add_nodes(:,:) integer(kind=kint) :: n_add_node, i0 nnb = hecCOMM%n_neighbor_pe if (nnb == 0) then BT_imp%nr = 0 BT_imp%nc = 0 BT_imp%nnz = 0 BT_imp%ndof = 0 allocate(BT_imp%index(0:0)) BT_imp%index(0) = 0 return endif ndof = BT_exp(1)%ndof ndof2 = ndof*ndof allocate(requests(nnb*3)) allocate(statuses(HECMW_STATUS_SIZE, nnb*3)) n_send = 0 do idom = 1, nnb irank = hecCOMM%neighbor_pe(idom) nr = BT_exp(idom)%nr if (nr == 0) cycle n_send = n_send + 1 tag = 3001 call HECMW_ISEND_INT(BT_exp(idom)%index(0:BT_exp(idom)%nr), BT_exp(idom)%nr + 1, & irank, tag, hecCOMM%HECMW_COMM, requests(n_send)) if (BT_exp(idom)%nnz == 0) cycle n_send = n_send + 1 tag = 3002 call HECMW_ISEND_INT(exp_cols_item(1,exp_cols_index(idom-1)+1), & cNCOL_ITEM * BT_exp(idom)%nnz, irank, tag, hecCOMM%HECMW_COMM, requests(n_send)) n_send = n_send + 1 tag = 3003 call HECMW_ISEND_R(BT_exp(idom)%A, ndof2 * BT_exp(idom)%nnz, & irank, tag, hecCOMM%HECMW_COMM, requests(n_send)) enddo ! ! BT_imp%nr = hecCOMM%import_index(nnb) BT_imp%nr = hecMESH%n_node - hecMESH%nn_internal BT_imp%nc = 0 !!! TEMPORARY BT_imp%nnz = 0 BT_imp%ndof = ndof ! allocate(nnz_imp(nnb)) allocate(cnt(BT_imp%nr)) ! cnt(:) = 0 do idom = 1, nnb irank = hecCOMM%neighbor_pe(idom) idx_0 = hecCOMM%import_index(idom-1) idx_n = hecCOMM%import_index(idom) nr = idx_n - idx_0 if (nr == 0) then nnz_imp(idom) = 0 cycle endif allocate(index_imp(0:nr)) tag = 3001 call HECMW_RECV_INT(index_imp(0:nr), nr+1, irank, tag, & hecCOMM%HECMW_COMM, statuses(:,1)) nnz_imp(idom) = index_imp(nr) do j = 1, nr jj = hecCOMM%import_item(idx_0 + j) - hecMESH%nn_internal if (jj < 1 .or. BT_imp%nr < jj) stop 'ERROR: jj out of range' if (cnt(jj) /= 0) stop 'ERROR: duplicate import rows?' cnt(jj) = index_imp(j) - index_imp(j-1) enddo deallocate(index_imp) enddo ! allocate(imp_cols_index(0:nnb)) call make_index(nnb, nnz_imp, imp_cols_index) deallocate(nnz_imp) ! allocate(BT_imp%index(0:BT_imp%nr)) call make_index(BT_imp%nr, cnt, BT_imp%index) deallocate(cnt) ! BT_imp%nnz = BT_imp%index(BT_imp%nr) if (BT_imp%nnz /= imp_cols_index(nnb)) & stop 'ERROR: total num of nonzero of BT_imp' ! allocate(imp_cols_item(cNCOL_ITEM, BT_imp%nnz)) allocate(imp_vals_item(ndof2 * BT_imp%nnz)) ! do idom = 1, nnb irank = hecCOMM%neighbor_pe(idom) idx_0 = imp_cols_index(idom-1) idx_n = imp_cols_index(idom) nnz = idx_n - idx_0 if (nnz == 0) cycle tag = 3002 call HECMW_RECV_INT(imp_cols_item(1, idx_0 + 1), cNCOL_ITEM * nnz, & irank, tag, hecCOMM%HECMW_COMM, statuses(:,1)) tag = 3003 call HECMW_RECV_R(imp_vals_item(ndof2*idx_0 + 1), ndof2 * nnz, & irank, tag, hecCOMM%HECMW_COMM, statuses(:,1)) enddo call HECMW_Waitall(n_send, requests, statuses) if (DEBUG >= 2) write(0,*) ' DEBUG2: send BT_imp and recv into temporary data done' ! deallocate(requests) deallocate(statuses) ! do idom = 1, nnb call hecmw_localmat_free(BT_exp(idom)) enddo deallocate(BT_exp) deallocate(exp_cols_index) deallocate(exp_cols_item) ! call copy_mesh(hecMESH, hecMESHnew) ! call map_imported_cols(hecMESHnew, imp_cols_index(nnb), imp_cols_item, n_add_node, add_nodes, map, i0) if (DEBUG >= 2) write(0,*) ' DEBUG2: map imported cols done' ! call update_comm_table(hecMESHnew, n_add_node, add_nodes, i0) if (DEBUG >= 2) write(0,*) ' DEBUG2: update comm_table done' ! BT_imp%nc = hecMESHnew%n_node ! allocate(BT_imp%item(BT_imp%nnz)) allocate(BT_imp%A(ndof2 * BT_imp%nnz)) call copy_vals_to_BT_imp(hecCOMM, hecMESH%nn_internal, imp_cols_index, map, imp_vals_item, BT_imp) if (DEBUG >= 2) write(0,*) ' DEBUG2: copy vals to BT_imp done' ! deallocate(imp_cols_index) deallocate(imp_cols_item) deallocate(imp_vals_item) deallocate(map) end subroutine send_BT_exp_and_recv_BT_imp subroutine copy_vals_to_BT_imp(hecCOMM, nn_internal, imp_cols_index, map, imp_vals_item, BT_imp) implicit none type (hecmwST_matrix_comm), intent(in) :: hecCOMM integer(kind=kint), intent(in) :: nn_internal integer(kind=kint), allocatable, intent(in) :: imp_cols_index(:) integer(kind=kint), intent(in) :: map(:) real(kind=kreal), intent(in) :: imp_vals_item(:) type (hecmwST_local_matrix), intent(inout) :: BT_imp integer(kind=kint) :: nnb, ndof2, idx, idom, idx_0, idx_n, nr, j, jrow, ks, ke, k nnb = hecCOMM%n_neighbor_pe ndof2 = BT_imp%ndof ** 2 idx = 0 do idom = 1, nnb idx_0 = hecCOMM%import_index(idom-1) idx_n = hecCOMM%import_index(idom) nr = idx_n - idx_0 if (nr == 0) cycle do j = 1, nr jrow = hecCOMM%import_item(idx_0 + j) - nn_internal ks = BT_imp%index(jrow-1)+1 ke = BT_imp%index(jrow) do k = ks, ke idx = idx + 1 BT_imp%item(k) = map(idx) BT_imp%A(ndof2*(k-1)+1:ndof2*k) = imp_vals_item(ndof2*(idx-1)+1:ndof2*idx) enddo enddo if (idx /= imp_cols_index(idom)) stop 'ERROR: copy vals to BT_imp' enddo end subroutine copy_vals_to_BT_imp subroutine concat_BTmat_and_BT_imp(BTmat, BT_imp, BT_all) implicit none type (hecmwST_local_matrix), intent(in) :: BTmat type (hecmwST_local_matrix), intent(in) :: BT_imp type (hecmwST_local_matrix), intent(out) :: BT_all integer(kind=kint) :: ndof, ndof2, i, ii ndof = BTmat%ndof if (BT_imp%nr > 0 .and. BT_imp%ndof /= ndof) stop 'ERROR: concat BTmat and BT_imp: ndof' ndof2 = ndof*ndof BT_all%nr = BTmat%nr + BT_imp%nr BT_all%nc = max(BTmat%nc, BT_imp%nc) BT_all%nnz = BTmat%nnz + BT_imp%nnz BT_all%ndof = ndof allocate(BT_all%index(0:BT_all%nr)) allocate(BT_all%item(BT_all%nnz)) allocate(BT_all%A(ndof2 * BT_all%nnz)) BT_all%index(0) = 0 do i = 1, BTmat%nr BT_all%index(i) = BTmat%index(i) enddo do i = 1, BT_imp%nr BT_all%index(BTmat%nr+i) = BT_all%index(BTmat%nr+i-1) + & BT_imp%index(i) - BT_imp%index(i-1) enddo do i = 1, BTmat%nnz BT_all%item(i) = BTmat%item(i) BT_all%A(ndof2*(i-1)+1:ndof2*i) = BTmat%A(ndof2*(i-1)+1:ndof2*i) enddo do i = 1, BT_imp%nnz ii = BTmat%nnz + i BT_all%item(ii) = BT_imp%item(i) BT_all%A(ndof2*(ii-1)+1:ndof2*ii) = BT_imp%A(ndof2*(i-1)+1:ndof2*i) enddo end subroutine concat_BTmat_and_BT_imp subroutine multiply_mat_mat(Amat, Bmat, Cmat) implicit none type (hecmwST_local_matrix), intent(in) :: Amat type (hecmwST_local_matrix), intent(in) :: Bmat type (hecmwST_local_matrix), intent(out) :: Cmat integer(kind=kint) :: ndof, ndof2, nr, nc, nnz, i, icnt integer(kind=kint) :: js, je, j, jj, ks, ke, k, kk, l, ll, l0 integer(kind=kint), allocatable :: iw(:) real(kind=kreal), pointer :: Ap(:), Bp(:), Cp(:) real(kind=kreal) :: t0, t1 t0 = hecmw_wtime() if (Amat%ndof /= Bmat%ndof) stop 'ERROR: multiply_mat_mat: unmatching ndof' ndof = Amat%ndof ndof2 = ndof*ndof nr = Amat%nr nc = Bmat%nc if (Amat%nc /= Bmat%nr) then write(0,*) 'Amat: nr, nc = ', Amat%nr, Amat%nc write(0,*) 'Bmat: nr, nc = ', Bmat%nr, Bmat%nc stop 'ERROR: multiply_mat_mat: unmatching size' endif Cmat%ndof = ndof Cmat%nr = nr Cmat%nc = nc allocate(Cmat%index(0:nr)) Cmat%index(0) = 0 !$omp parallel default(none), & !$omp& private(iw,i,icnt,js,je,j,jj,ks,ke,k,kk,l), & !$omp& shared(nr,nc,Amat,Bmat,Cmat) allocate(iw(nc)) !$omp do do i = 1, nr icnt = 0 js = Amat%index(i-1)+1 je = Amat%index(i) do j = js, je jj = Amat%item(j) ks = Bmat%index(jj-1)+1 ke = Bmat%index(jj) kl1: do k = ks, ke kk = Bmat%item(k) do l = 1, icnt if (iw(l) == kk) cycle kl1 enddo icnt = icnt + 1 iw(icnt) = kk enddo kl1 enddo Cmat%index(i) = icnt enddo !$omp end do deallocate(iw) !$omp end parallel do i = 1, nr Cmat%index(i) = Cmat%index(i-1) + Cmat%index(i) enddo nnz = Cmat%index(nr) Cmat%nnz = nnz !write(0,*) 'nnz',nnz t1 = hecmw_wtime() if (TIMER >= 3) write(0, '(A,f10.4)') "###### multiply_mat_mat (1) : ",t1-t0 t0 = hecmw_wtime() allocate(Cmat%item(nnz)) allocate(Cmat%A(ndof2 * nnz)) Cmat%A(:) = 0.0d0 !$omp parallel default(none), & !$omp& private(i,icnt,l0,js,je,j,jj,Ap,ks,ke,k,kk,Bp,ll,l,Cp), & !$omp& shared(nr,Cmat,Amat,Bmat,ndof2,ndof) !$omp do do i = 1, nr icnt = 0 l0 = Cmat%index(i-1) ! item js = Amat%index(i-1)+1 je = Amat%index(i) do j = js, je jj = Amat%item(j) Ap => Amat%A(ndof2*(j-1)+1:ndof2*j) ks = Bmat%index(jj-1)+1 ke = Bmat%index(jj) do k = ks, ke kk = Bmat%item(k) Bp => Bmat%A(ndof2*(k-1)+1:ndof2*k) ll = -1 do l = 1, icnt if (Cmat%item(l0+l) == kk) then ll = l0 + l exit endif enddo if (ll < 0) then icnt = icnt + 1 ll = l0 + icnt Cmat%item(ll) = kk endif Cp => Cmat%A(ndof2*(ll-1)+1:ndof2*ll) call blk_matmul_add(ndof, Ap, Bp, Cp) enddo enddo !write(0,*) 'l0,icnt,index(i)',Cmat%index(i-1),icnt,Cmat%index(i) if (l0+icnt /= Cmat%index(i)) stop 'ERROR: multiply_mat_mat: unknown error' enddo !$omp end do !$omp end parallel t1 = hecmw_wtime() if (TIMER >= 3) write(0, '(A,f10.4)') "###### multiply_mat_mat (2) : ",t1-t0 t0 = hecmw_wtime() call sort_and_uniq_rows(Cmat) t1 = hecmw_wtime() if (TIMER >= 3) write(0, '(A,f10.4)') "###### multiply_mat_mat (3) : ",t1-t0 end subroutine multiply_mat_mat subroutine blk_matmul_add(ndof, A, B, AB) implicit none integer, intent(in) :: ndof real(kind=kreal), intent(in) :: A(:), B(:) real(kind=kreal), intent(inout) :: AB(:) integer :: ndof2, i, j, k, i0, j0, ij, ik, jk ndof2=ndof*ndof do i=1,ndof i0=(i-1)*ndof do j=1,ndof ij=i0+j j0=(j-1)*ndof do k=1,ndof ik=i0+k jk=j0+k !$omp atomic AB(ik)=AB(ik)+A(ij)*B(jk) enddo enddo enddo end subroutine blk_matmul_add subroutine hecmw_localmat_make_hecmat(hecMAT, BTtKTmat, hecTKT) implicit none type (hecmwST_matrix), intent(in) :: hecMAT type (hecmwST_local_matrix), intent(in) :: BTtKTmat type (hecmwST_matrix), intent(inout) :: hecTKT call make_new_hecmat(hecMAT, BTtKTmat, hecTKT) end subroutine hecmw_localmat_make_hecmat subroutine hecmw_localmat_shrink_comm_table(BKmat, hecMESH) implicit none type (hecmwST_local_matrix), intent(in) :: BKmat type (hecmwST_local_mesh), intent(inout) :: hecMESH type (hecmwST_matrix_comm) :: hecCOMM call make_comm_table(BKmat, hecMESH, hecCOMM) deallocate(hecMESH%import_index) deallocate(hecMESH%import_item) deallocate(hecMESH%export_index) deallocate(hecMESH%export_item) hecMESH%import_index => hecCOMM%import_index hecMESH%import_item => hecCOMM%import_item hecMESH%export_index => hecCOMM%export_index hecMESH%export_item => hecCOMM%export_item deallocate(hecCOMM%neighbor_pe) end subroutine hecmw_localmat_shrink_comm_table end module hecmw_local_matrix
FrontISTR/FrontISTR
hecmw1/src/solver/matrix/hecmw_local_matrix.f90
FORTRAN
mit
120,168
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_22) on Sun Aug 26 15:13:09 EDT 2012 --> <TITLE> org.newdawn.slick.tests.shader Class Hierarchy (Slick - The 2D Library) </TITLE> <META NAME="date" CONTENT="2012-08-26"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.newdawn.slick.tests.shader Class Hierarchy (Slick - The 2D Library)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/newdawn/slick/tests/package-tree.html"><B>PREV</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/newdawn/slick/tests/states/package-tree.html"><B>NEXT</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/newdawn/slick/tests/shader/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> Hierarchy For Package org.newdawn.slick.tests.shader </H2> </CENTER> <DL> <DT><B>Package Hierarchies:</B><DD><A HREF="../../../../../overview-tree.html">All Packages</A></DL> <HR> <H2> Class Hierarchy </H2> <UL> <LI TYPE="circle">java.lang.Object<UL> <LI TYPE="circle">org.newdawn.slick.<A HREF="../../../../../org/newdawn/slick/BasicGame.html" title="class in org.newdawn.slick"><B>BasicGame</B></A> (implements org.newdawn.slick.<A HREF="../../../../../org/newdawn/slick/Game.html" title="interface in org.newdawn.slick">Game</A>, org.newdawn.slick.<A HREF="../../../../../org/newdawn/slick/InputListener.html" title="interface in org.newdawn.slick">InputListener</A>) <UL> <LI TYPE="circle">org.newdawn.slick.tests.shader.<A HREF="../../../../../org/newdawn/slick/tests/shader/GeomShaderTest.html" title="class in org.newdawn.slick.tests.shader"><B>GeomShaderTest</B></A><LI TYPE="circle">org.newdawn.slick.tests.shader.<A HREF="../../../../../org/newdawn/slick/tests/shader/MyGame.html" title="class in org.newdawn.slick.tests.shader"><B>MyGame</B></A><LI TYPE="circle">org.newdawn.slick.tests.shader.<A HREF="../../../../../org/newdawn/slick/tests/shader/ShaderLesson1.html" title="class in org.newdawn.slick.tests.shader"><B>ShaderLesson1</B></A><LI TYPE="circle">org.newdawn.slick.tests.shader.<A HREF="../../../../../org/newdawn/slick/tests/shader/ShaderTest.html" title="class in org.newdawn.slick.tests.shader"><B>ShaderTest</B></A><LI TYPE="circle">org.newdawn.slick.tests.shader.<A HREF="../../../../../org/newdawn/slick/tests/shader/ShaderTestAdvanced.html" title="class in org.newdawn.slick.tests.shader"><B>ShaderTestAdvanced</B></A></UL> <LI TYPE="circle">org.newdawn.slick.opengl.shader.<A HREF="../../../../../org/newdawn/slick/opengl/shader/ShaderProgram.html" title="class in org.newdawn.slick.opengl.shader"><B>ShaderProgram</B></A><UL> <LI TYPE="circle">org.newdawn.slick.tests.shader.<A HREF="../../../../../org/newdawn/slick/tests/shader/GeomShaderTest.GeometryShaderProgram.html" title="class in org.newdawn.slick.tests.shader"><B>GeomShaderTest.GeometryShaderProgram</B></A></UL> </UL> </UL> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/newdawn/slick/tests/package-tree.html"><B>PREV</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/newdawn/slick/tests/states/package-tree.html"><B>NEXT</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/newdawn/slick/tests/shader/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright &#169; 2006 New Dawn Software. All Rights Reserved.</i> </BODY> </HTML>
dxiao/PPBunnies
slick/trunk/Slick/javadoc/org/newdawn/slick/tests/shader/package-tree.html
HTML
mit
8,133
--- layout: post title: You're up and running! --- Hello Internet! This blog is up, running, and ready to cover development topics, testing, and my personal favorite - soft skills improvement. I have to say that I love forking a repo, editing some files, and having a blog up and running quickly without needing a large and frequently vulnerable CMS. Thank you @barryclark and github for being awesome!
AnnAddicks/AnnAddicks.github.io
_posts/2015-4-2-Hello-World.md
Markdown
mit
411
'use strict'; /* global angular */ (function() { var register = angular.module('register'); register.controller('RegisterController', function($rootScope, $scope, $state, sessionFactory) { $scope.stateName = 'register'; $scope.name = ''; $scope.email = ''; $scope.password = ''; $scope.loading = false; $scope.registerAndLogin = function() { if (!$scope.form.$valid) { return; } $scope.loading = false; var user = { }; user.name = $scope.name; user.email = $scope.email; user.password = $scope.password; sessionFactory.registerAndLogin(user) .then(function() { $scope.loading = false; $state.go('app-root.list'); }); }; }); })();
RyanWarner/app-sprout-client
app/states/register/register_controller.js
JavaScript
mit
698
module Gitlab module PathRegex extend self # All routes that appear on the top level must be listed here. # This will make sure that groups cannot be created with these names # as these routes would be masked by the paths already in place. # # Example: # /api/api-project # # the path `api` shouldn't be allowed because it would be masked by `api/*` # TOP_LEVEL_ROUTES = %w[ - .well-known abuse_reports admin all api assets autocomplete ci dashboard explore files groups health_check help hooks import invites issues jwt koding member merge_requests new notes notification_settings oauth profile projects public repository robots.txt s search sent_notifications services snippets teams u unicorn_test unsubscribes uploads users ].freeze # This list should contain all words following `/*namespace_id/:project_id` in # routes that contain a second wildcard. # # Example: # /*namespace_id/:project_id/badges/*ref/build # # If `badges` was allowed as a project/group name, we would not be able to access the # `badges` route for those projects: # # Consider a namespace with path `foo/bar` and a project called `badges`. # The route to the build badge would then be `/foo/bar/badges/badges/master/build.svg` # # When accessing this path the route would be matched to the `badges` path # with the following params: # - namespace_id: `foo` # - project_id: `bar` # - ref: `badges/master` # # Failing to find the project, this would result in a 404. # # By rejecting `badges` the router can _count_ on the fact that `badges` will # be preceded by the `namespace/project`. PROJECT_WILDCARD_ROUTES = %w[ - badges blame blob builds commits create create_dir edit environments/folders files find_file gitlab-lfs/objects info/lfs/objects new preview raw refs tree update wikis ].freeze # These are all the paths that follow `/groups/*id/ or `/groups/*group_id` # We need to reject these because we have a `/groups/*id` page that is the same # as the `/*id`. # # If we would allow a subgroup to be created with the name `activity` then # this group would not be accessible through `/groups/parent/activity` since # this would map to the activity-page of its parent. GROUP_ROUTES = %w[ - activity analytics audit_events avatar edit group_members hooks issues labels ldap ldap_group_links merge_requests milestones notification_setting pipeline_quota projects subgroups ].freeze ILLEGAL_PROJECT_PATH_WORDS = PROJECT_WILDCARD_ROUTES ILLEGAL_GROUP_PATH_WORDS = (PROJECT_WILDCARD_ROUTES | GROUP_ROUTES).freeze # The namespace regex is used in JavaScript to validate usernames in the "Register" form. However, Javascript # does not support the negative lookbehind assertion (?<!) that disallows usernames ending in `.git` and `.atom`. # Since this is a non-trivial problem to solve in Javascript (heavily complicate the regex, modify view code to # allow non-regex validations, etc), `NAMESPACE_FORMAT_REGEX_JS` serves as a Javascript-compatible version of # `NAMESPACE_FORMAT_REGEX`, with the negative lookbehind assertion removed. This means that the client-side validation # will pass for usernames ending in `.atom` and `.git`, but will be caught by the server-side validation. PATH_REGEX_STR = '[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*'.freeze NAMESPACE_FORMAT_REGEX_JS = PATH_REGEX_STR + '[a-zA-Z0-9_\-]|[a-zA-Z0-9_]'.freeze NO_SUFFIX_REGEX = /(?<!\.git|\.atom)/.freeze NAMESPACE_FORMAT_REGEX = /(?:#{NAMESPACE_FORMAT_REGEX_JS})#{NO_SUFFIX_REGEX}/.freeze PROJECT_PATH_FORMAT_REGEX = /(?:#{PATH_REGEX_STR})#{NO_SUFFIX_REGEX}/.freeze FULL_NAMESPACE_FORMAT_REGEX = %r{(#{NAMESPACE_FORMAT_REGEX}/)*#{NAMESPACE_FORMAT_REGEX}}.freeze def root_namespace_route_regex @root_namespace_route_regex ||= begin illegal_words = Regexp.new(Regexp.union(TOP_LEVEL_ROUTES).source, Regexp::IGNORECASE) single_line_regexp %r{ (?!(#{illegal_words})/) #{NAMESPACE_FORMAT_REGEX} }x end end def full_namespace_route_regex @full_namespace_route_regex ||= begin illegal_words = Regexp.new(Regexp.union(ILLEGAL_GROUP_PATH_WORDS).source, Regexp::IGNORECASE) single_line_regexp %r{ #{root_namespace_route_regex} (?: / (?!#{illegal_words}/) #{NAMESPACE_FORMAT_REGEX} )* }x end end def project_route_regex @project_route_regex ||= begin illegal_words = Regexp.new(Regexp.union(ILLEGAL_PROJECT_PATH_WORDS).source, Regexp::IGNORECASE) single_line_regexp %r{ (?!(#{illegal_words})/) #{PROJECT_PATH_FORMAT_REGEX} }x end end def project_git_route_regex @project_git_route_regex ||= /#{project_route_regex}\.git/.freeze end def root_namespace_path_regex @root_namespace_path_regex ||= %r{\A#{root_namespace_route_regex}/\z} end def full_namespace_path_regex @full_namespace_path_regex ||= %r{\A#{full_namespace_route_regex}/\z} end def project_path_regex @project_path_regex ||= %r{\A#{project_route_regex}/\z} end def full_project_path_regex @full_project_path_regex ||= %r{\A#{full_namespace_route_regex}/#{project_route_regex}/\z} end def full_namespace_format_regex @namespace_format_regex ||= /A#{FULL_NAMESPACE_FORMAT_REGEX}\z/.freeze end def namespace_format_regex @namespace_format_regex ||= /\A#{NAMESPACE_FORMAT_REGEX}\z/.freeze end def namespace_format_message "can contain only letters, digits, '_', '-' and '.'. " \ "Cannot start with '-' or end in '.', '.git' or '.atom'." \ end def project_path_format_regex @project_path_format_regex ||= /\A#{PROJECT_PATH_FORMAT_REGEX}\z/.freeze end def project_path_format_message "can contain only letters, digits, '_', '-' and '.'. " \ "Cannot start with '-', end in '.git' or end in '.atom'" \ end def archive_formats_regex # |zip|tar| tar.gz | tar.bz2 | @archive_formats_regex ||= /(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/.freeze end def git_reference_regex # Valid git ref regex, see: # https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html @git_reference_regex ||= single_line_regexp %r{ (?! (?# doesn't begins with) \/| (?# rule #6) (?# doesn't contain) .*(?: [\/.]\.| (?# rule #1,3) \/\/| (?# rule #6) @\{| (?# rule #8) \\ (?# rule #9) ) ) [^\000-\040\177~^:?*\[]+ (?# rule #4-5) (?# doesn't end with) (?<!\.lock) (?# rule #1) (?<![\/.]) (?# rule #6-7) }x end private def single_line_regexp(regex) # Turns a multiline extended regexp into a single line one, # beacuse `rake routes` breaks on multiline regexes. Regexp.new(regex.source.gsub(/\(\?#.+?\)/, '').gsub(/\s*/, ''), regex.options ^ Regexp::EXTENDED).freeze end end end
dplarson/gitlabhq
lib/gitlab/path_regex.rb
Ruby
mit
7,915
import json class JSONRenderer(object): def render(self, data): return json.dumps(data)
Quantify-world/apification
src/apification/renderers.py
Python
mit
101
--- layout: post title: Trois jours et c'est le week-end categories: - Musique tags: [] status: publish type: post published: true meta: _utw_tags_0: a:2:{i:0;O:8:"stdClass":1:{s:3:"tag";s:7:"Bootleg";}i:1;O:8:"stdClass":1:{s:3:"tag";s:7:"Musique";}} enclosure: "http://www.musicremixed.org/dunproofin/Dunproofin-FiddyFiddyFiddyFiddy.mp3\r\n8138880\r\naudio/mpeg\r\n" _edit_last: '1' tmac_last_id: '' --- alors on se donne du courage ! [dewplayer:http://www.musicremixed.org/dunproofin/Dunproofin-FiddyFiddyFiddyFiddy.mp3]
alienlebarge/alienlebarge.github.com
_posts/2007-05-14-trois-jours-et-cest-le-week-end.html
HTML
mit
534
require 'pathname' require 'time' require_relative './file_utils/idempotent' require_relative './setup/collector_id_generator' require_relative './setup/structure' require_relative './setup/creator' require_relative './gathering/rspec/listener' require_relative './file_tree/git/snapshot' require_relative './storage/appender' require_relative './storage/dir_path' module Suspect ## # A facade enabling easy setup: # # require 'suspect/rspec_listener' # # RSpec.configure do |config| # ::Suspect::RSpecListener.setup_using config # class RSpecListener class << self def setup_using(rspec_config) new.register_listener rspec_config.reporter end end def register_listener(reporter) return unless supported_platform? structure = build_structure listener = build_listener(structure) reporter.register_listener listener, *listener.notification_names end private def build_structure root_path = ::Pathname.new('.') file_helper = ::Suspect::FileUtils::Idempotent.new structure = ::Suspect::Setup::Structure.new(root_path) collector_id_generator = ::Suspect::Setup::CollectorIdGenerator.new ::Suspect::Setup::Creator.new(structure, collector_id_generator, file_helper).build structure end def build_listener(structure) storage_path = ::Suspect::Storage::DirPath.new(structure.storage_path, Time.now.utc) file_helper = ::Suspect::FileUtils::Idempotent.new collector_id = file_helper.read(structure.collector_id_path) storage = ::Suspect::Storage::Appender.new(dir_path: storage_path, dir_helper: file_helper, collector_id: collector_id) file_tree = ::Suspect::FileTree::Git::Snapshot.new ::Suspect::Gathering::RSpec::Listener.new(file_tree, storage, collector_id, ::Time.now.utc) end def supported_platform? ::Gem::Platform.local.os == 'linux' end end end
MitinPavel/suspect
lib/suspect/rspec_listener.rb
Ruby
mit
1,955
using SumIntList; using System; using Xunit; namespace SumIntListTest { public class SumIntListTest { Random _generator = new Random(); [Fact] public void ShouldReturnNoElementsWhenNoInput() { // Arrange int[] elements = new int[] { }; int target = _generator.Next(); // Act int[] actual = SumIntListMain.GetArray(elements, target); // Assert Assert.NotNull(actual); Assert.Empty(actual); } [Fact] public void ShouldReturnElementWhenHaveATargetAndCorrespondingElements() { // Arrange int[] elements = new int[] { 5, 10 }; int target = 10; int[] expected = new int[] { 1 }; // Act int[] actual = SumIntListMain.GetArray(elements, target); // Assert Assert.NotNull(actual); Assert.Equal(expected[0], actual[0]); } [Fact] public void ShouldReturnElementWhenHaveATargetAndCorrespondingElementsWithThreeElements() { // Arrange int[] elements = new int[] { 5, 3, 20 }; int target = 20; int[] expected = new int[] { 2 }; // Act int[] actual = SumIntListMain.GetArray(elements, target); // Assert Assert.NotNull(actual); Assert.Equal(expected[0], actual[0]); } [Fact] public void ShouldReturnTwoElementsWhenTargetIsSumOfTwoElements() { // Arrange int[] element = new int[] { 5, 3, 20 }; int target = 8; int[] expected = new int[] { 0, 1 }; // Act int[] actual = SumIntListMain.GetArray(element, target); // Assert Assert.NotNull(actual); Assert.Equal(expected.Length, actual.Length); Assert.Equal(expected[0], actual[0]); Assert.Equal(expected[1], actual[1]); } [Fact] public void ShouldReturnThreeElementsWhenTargetIsSumOfThreeElements() { // Arrange int[] elements = new int[] { 5, 3, 21, 4 }; int target = 12; int[] expected = new[] { 0, 1, 3 }; // Act int[] actual = SumIntListMain.GetArray(elements, target); // Assert Assert.NotNull(actual); Assert.Equal(expected.Length, actual.Length); Assert.Equal(expected[0], actual[0]); Assert.Equal(expected[1], actual[1]); Assert.Equal(expected[2], actual[2]); } [Fact] public void ShouldReturnZeroElementWhenNoMatchedElements() { // Arrange int[] elements = new int[] { 5 }; int target = 12; int[] expected = new int[] { }; // Act int[] actual = SumIntListMain.GetArray(elements, target); // Assert Assert.NotNull(actual); Assert.Equal(expected.Length, actual.Length); } } }
slimktari/tdd_code_katas
src/SumIntList/SumIntListTest/SumIntListTest.cs
C#
mit
3,251
INSERT INTO ORDER_DETAIL VALUES (10100, 'S18_1749', 30, 171.70, 3), (10100, 'S18_2248', 50, 67.80, 2), (10100, 'S18_4409', 22, 86.51, 4), (10100, 'S24_3969', 49, 34.47, 1), (10101, 'S18_2325', 25, 151.28, 4), (10101, 'S18_2795', 26, 145.13, 1), (10101, 'S24_1937', 45, 31.20, 3), (10101, 'S24_2022', 46, 53.76, 2), (10102, 'S18_1342', 39, 123.29, 2), (10102, 'S18_1367', 41, 50.14, 1), (10103, 'S10_1949', 26, 207.87, 11), (10103, 'S10_4962', 42, 128.53, 4), (10103, 'S12_1666', 27, 125.74, 8), (10103, 'S18_1097', 35, 112.00, 10), (10103, 'S18_2432', 22, 54.09, 2), (10103, 'S18_2949', 27, 83.07, 12), (10103, 'S18_2957', 35, 57.46, 14), (10103, 'S18_3136', 25, 101.58, 13), (10103, 'S18_3320', 46, 104.17, 16), (10103, 'S18_4600', 36, 117.45, 5), (10103, 'S18_4668', 41, 47.29, 9), (10103, 'S24_2300', 36, 102.23, 1), (10103, 'S24_4258', 25, 114.92, 15), (10103, 'S32_1268', 31, 104.01, 3), (10103, 'S32_3522', 45, 75.63, 7), (10103, 'S700_2824', 42, 106.21, 6), (10104, 'S12_3148', 34, 175.25, 1), (10104, 'S12_4473', 41, 112.58, 9), (10104, 'S18_2238', 24, 144.08, 8), (10104, 'S18_2319', 29, 130.09, 12), (10104, 'S18_3232', 23, 198.13, 13), (10104, 'S18_4027', 38, 140.75, 3), (10104, 'S24_1444', 35, 55.49, 6), (10104, 'S24_2840', 44, 39.60, 10), (10104, 'S24_4048', 26, 112.37, 5), (10104, 'S32_2509', 35, 47.62, 11), (10104, 'S32_3207', 49, 65.87, 4), (10104, 'S50_1392', 33, 112.28, 7), (10104, 'S50_1514', 32, 53.31, 2), (10105, 'S10_4757', 50, 144.16, 2), (10105, 'S12_1108', 41, 211.96, 15), (10105, 'S12_3891', 29, 157.45, 14), (10105, 'S18_3140', 22, 139.32, 11), (10105, 'S18_3259', 38, 113.95, 13), (10105, 'S18_4522', 41, 82.50, 10), (10105, 'S24_2011', 43, 147.47, 9), (10105, 'S24_3151', 44, 72.58, 4), (10105, 'S24_3816', 50, 79.67, 1), (10105, 'S700_1138', 41, 70.67, 5), (10105, 'S700_1938', 29, 70.15, 12), (10105, 'S700_2610', 31, 65.77, 3), (10105, 'S700_3505', 39, 81.14, 6), (10105, 'S700_3962', 22, 116.19, 7), (10105, 'S72_3212', 25, 56.78, 8), (10106, 'S18_1662', 36, 146.65, 12), (10106, 'S18_2581', 34, 90.39, 2), (10106, 'S18_3029', 41, 83.44, 18), (10106, 'S18_3856', 41, 116.46, 17), (10106, 'S24_1785', 28, 88.63, 4), (10106, 'S24_2841', 49, 74.68, 13), (10106, 'S24_3420', 31, 52.60, 14), (10106, 'S24_3949', 50, 64.83, 11), (10106, 'S24_4278', 26, 63.76, 3), (10106, 'S32_4289', 33, 72.92, 5), (10106, 'S50_1341', 39, 40.15, 6), (10106, 'S700_1691', 31, 106.87, 7), (10106, 'S700_2047', 30, 105.91, 16), (10106, 'S700_2466', 34, 110.69, 9), (10106, 'S700_2834', 32, 124.58, 1), (10106, 'S700_3167', 44, 74.40, 8), (10106, 'S700_4002', 48, 61.44, 10), (10106, 'S72_1253', 48, 52.64, 15), (10107, 'S10_1678', 30, 95.70, 2), (10107, 'S10_2016', 39, 99.91, 5), (10107, 'S10_4698', 27, 224.65, 4), (10107, 'S12_2823', 21, 144.60, 1), (10107, 'S18_2625', 29, 70.87, 6), (10107, 'S24_1578', 25, 113.83, 3), (10107, 'S24_2000', 38, 83.03, 7), (10107, 'S32_1374', 20, 92.90, 8), (10108, 'S12_1099', 33, 159.55, 6), (10108, 'S12_3380', 45, 136.23, 4), (10108, 'S12_3990', 39, 89.38, 7), (10108, 'S12_4675', 36, 103.64, 3), (10108, 'S18_1889', 38, 82.39, 2), (10108, 'S18_3278', 26, 68.35, 9), (10108, 'S18_3482', 29, 139.64, 8), (10108, 'S18_3782', 43, 67.77, 12), (10108, 'S18_4721', 44, 126.48, 11), (10108, 'S24_2360', 35, 58.87, 15), (10108, 'S24_3371', 30, 63.07, 5), (10108, 'S24_3856', 40, 136.22, 1), (10108, 'S24_4620', 31, 68.71, 10), (10108, 'S32_2206', 27, 43.45, 13), (10108, 'S32_4485', 31, 118.38, 16), (10108, 'S50_4713', 34, 82.99, 14), (10109, 'S18_1129', 26, 168.43, 4), (10109, 'S18_1984', 38, 116.65, 3), (10109, 'S18_2870', 26, 121.44, 1), (10109, 'S18_3232', 46, 179.50, 5), (10109, 'S18_3685', 47, 132.80, 2), (10109, 'S24_2972', 29, 32.10, 6), (10110, 'S18_1589', 37, 146.84, 16), (10110, 'S18_1749', 42, 144.50, 7), (10110, 'S18_2248', 32, 50.25, 6), (10110, 'S18_2325', 33, 116.96, 4), (10110, 'S18_2795', 31, 163.69, 1), (10110, 'S18_4409', 28, 89.27, 8), (10110, 'S18_4933', 42, 61.29, 9), (10110, 'S24_1046', 36, 85.25, 13), (10110, 'S24_1628', 29, 59.37, 15), (10110, 'S24_1937', 20, 35.51, 3), (10110, 'S24_2022', 39, 44.35, 2), (10110, 'S24_2766', 43, 78.15, 11), (10110, 'S24_2887', 46, 129.18, 10), (10110, 'S24_3191', 27, 73.62, 12), (10110, 'S24_3432', 37, 100.66, 14), (10110, 'S24_3969', 48, 34.47, 5), (10111, 'S18_1342', 33, 99.66, 6), (10111, 'S18_1367', 48, 49.06, 5), (10111, 'S18_2957', 28, 64.33, 2), (10111, 'S18_3136', 43, 112.05, 1), (10111, 'S18_3320', 39, 107.15, 4), (10111, 'S24_4258', 26, 86.68, 3), (10112, 'S10_1949', 29, 248.59, 1), (10112, 'S18_2949', 23, 110.43, 2), (10113, 'S12_1666', 21, 162.64, 2), (10113, 'S18_1097', 49, 100.34, 4), (10113, 'S18_4668', 50, 49.81, 3), (10113, 'S32_3522', 23, 68.52, 1), (10114, 'S10_4962', 31, 138.88, 8), (10114, 'S18_2319', 39, 106.78, 3), (10114, 'S18_2432', 45, 68.67, 6), (10114, 'S18_3232', 48, 171.03, 4), (10114, 'S18_4600', 41, 117.45, 9), (10114, 'S24_2300', 21, 139.29, 5), (10114, 'S24_2840', 24, 30.06, 1), (10114, 'S32_1268', 32, 114.61, 7), (10114, 'S32_2509', 28, 55.73, 2), (10114, 'S700_2824', 42, 113.29, 10), (10115, 'S12_4473', 46, 124.43, 5), (10115, 'S18_2238', 46, 160.46, 4), (10115, 'S24_1444', 47, 69.36, 2), (10115, 'S24_4048', 44, 126.56, 1), (10115, 'S50_1392', 27, 105.33, 3), (10116, 'S32_3207', 27, 63.38, 1), (10117, 'S12_1108', 33, 182.86, 9), (10117, 'S12_3148', 43, 137.48, 10), (10117, 'S12_3891', 39, 152.26, 8), (10117, 'S18_3140', 26, 136.59, 5), (10117, 'S18_3259', 21, 95.80, 7), (10117, 'S18_4027', 22, 126.39, 12), (10117, 'S18_4522', 23, 97.42, 4), (10117, 'S24_2011', 41, 126.58, 3), (10117, 'S50_1514', 21, 49.21, 11), (10117, 'S700_1938', 38, 79.68, 6), (10117, 'S700_3962', 45, 83.42, 1), (10117, 'S72_3212', 50, 43.68, 2), (10118, 'S700_3505', 36, 117.20, 1), (10119, 'S10_4757', 46, 108.80, 11), (10119, 'S18_1662', 43, 160.84, 3), (10119, 'S18_3029', 21, 89.46, 9), (10119, 'S18_3856', 27, 99.52, 8), (10119, 'S24_2841', 41, 59.60, 4), (10119, 'S24_3151', 35, 87.62, 13), (10119, 'S24_3420', 20, 72.98, 5), (10119, 'S24_3816', 35, 90.57, 10), (10119, 'S24_3949', 28, 70.29, 2), (10119, 'S700_1138', 25, 76.67, 14), (10119, 'S700_2047', 29, 94.14, 7), (10119, 'S700_2610', 38, 65.77, 12), (10119, 'S700_4002', 26, 59.22, 1), (10119, 'S72_1253', 28, 48.17, 6), (10120, 'S10_2016', 29, 96.34, 3), (10120, 'S10_4698', 46, 201.41, 2), (10120, 'S18_2581', 29, 71.81, 8), (10120, 'S18_2625', 46, 58.15, 4), (10120, 'S24_1578', 35, 98.05, 1), (10120, 'S24_1785', 39, 119.27, 10), (10120, 'S24_2000', 34, 83.79, 5), (10120, 'S24_4278', 29, 85.49, 9), (10120, 'S32_1374', 22, 111.88, 6), (10120, 'S32_4289', 29, 72.23, 11), (10120, 'S50_1341', 49, 50.62, 12), (10120, 'S700_1691', 47, 82.21, 13), (10120, 'S700_2466', 24, 107.70, 15), (10120, 'S700_2834', 24, 142.38, 7), (10120, 'S700_3167', 43, 76.00, 14), (10121, 'S10_1678', 34, 81.35, 5), (10121, 'S12_2823', 50, 165.68, 4), (10121, 'S24_2360', 32, 76.88, 2), (10121, 'S32_4485', 25, 86.74, 3), (10121, 'S50_4713', 44, 74.85, 1), (10122, 'S12_1099', 42, 180.95, 10), (10122, 'S12_3380', 37, 99.82, 8), (10122, 'S12_3990', 32, 63.84, 11), (10122, 'S12_4675', 20, 107.10, 7), (10122, 'S18_1129', 34, 147.20, 2), (10122, 'S18_1889', 43, 72.38, 6), (10122, 'S18_1984', 31, 132.29, 1), (10122, 'S18_3232', 25, 143.94, 3), (10122, 'S18_3278', 21, 73.17, 13), (10122, 'S18_3482', 21, 117.59, 12), (10122, 'S18_3782', 35, 49.74, 16), (10122, 'S18_4721', 28, 127.97, 15), (10122, 'S24_2972', 39, 30.96, 4), (10122, 'S24_3371', 34, 50.21, 9), (10122, 'S24_3856', 43, 127.79, 5), (10122, 'S24_4620', 29, 71.14, 14), (10122, 'S32_2206', 31, 44.66, 17), (10123, 'S18_1589', 26, 118.22, 2), (10123, 'S18_2870', 46, 112.20, 3), (10123, 'S18_3685', 34, 156.82, 4), (10123, 'S24_1628', 50, 59.87, 1), (10124, 'S18_1749', 21, 136.00, 6), (10124, 'S18_2248', 42, 53.88, 5), (10124, 'S18_2325', 42, 105.52, 3), (10124, 'S18_4409', 36, 85.59, 7), (10124, 'S18_4933', 23, 57.73, 8), (10124, 'S24_1046', 22, 77.90, 12), (10124, 'S24_1937', 45, 37.84, 2), (10124, 'S24_2022', 22, 45.25, 1), (10124, 'S24_2766', 32, 72.70, 10), (10124, 'S24_2887', 25, 93.95, 9), (10124, 'S24_3191', 49, 83.04, 11), (10124, 'S24_3432', 43, 121.00, 13), (10124, 'S24_3969', 46, 33.23, 4), (10125, 'S18_1342', 32, 101.71, 1), (10125, 'S18_2795', 34, 190.69, 2), (10126, 'S10_1949', 38, 192.87, 11), (10126, 'S10_4962', 22, 152.17, 4), (10126, 'S12_1666', 21, 116.17, 8), (10126, 'S18_1097', 38, 101.50, 10), (10126, 'S18_1367', 42, 54.99, 17), (10126, 'S18_2432', 43, 65.02, 2), (10126, 'S18_2949', 31, 90.17, 12), (10126, 'S18_2957', 46, 73.70, 14), (10126, 'S18_3136', 30, 97.39, 13), (10126, 'S18_3320', 38, 82.34, 16), (10126, 'S18_4600', 50, 141.66, 5), (10126, 'S18_4668', 43, 53.83, 9), (10126, 'S24_2300', 27, 126.51, 1), (10126, 'S24_4258', 34, 105.18, 15), (10126, 'S32_1268', 43, 96.31, 3), (10126, 'S32_3522', 26, 62.70, 7), (10126, 'S700_2824', 45, 102.16, 6), (10127, 'S12_1108', 46, 245.20, 2), (10127, 'S12_3148', 46, 160.14, 3), (10127, 'S12_3891', 42, 193.78, 1), (10127, 'S12_4473', 24, 106.65, 11), (10127, 'S18_2238', 45, 158.82, 10), (10127, 'S18_2319', 45, 139.91, 14), (10127, 'S18_3232', 22, 174.42, 15), (10127, 'S18_4027', 25, 137.88, 5), (10127, 'S24_1444', 20, 60.69, 8), (10127, 'S24_2840', 39, 38.19, 12), (10127, 'S24_4048', 20, 96.99, 7), (10127, 'S32_2509', 45, 51.95, 13), (10127, 'S32_3207', 29, 70.84, 6), (10127, 'S50_1392', 46, 134.27, 9), (10127, 'S50_1514', 46, 69.12, 4), (10128, 'S18_3140', 41, 135.22, 2), (10128, 'S18_3259', 41, 117.98, 4), (10128, 'S18_4522', 43, 92.16, 1), (10128, 'S700_1938', 32, 97.00, 3), (10129, 'S10_4757', 33, 133.28, 2), (10129, 'S24_2011', 45, 133.95, 9), (10129, 'S24_3151', 41, 94.71, 4), (10129, 'S24_3816', 50, 77.99, 1), (10129, 'S700_1138', 31, 60.00, 5), (10129, 'S700_2610', 45, 85.29, 3), (10129, 'S700_3505', 42, 91.15, 6), (10129, 'S700_3962', 30, 85.41, 7), (10129, 'S72_3212', 32, 64.97, 8), (10130, 'S18_3029', 40, 96.34, 2), (10130, 'S18_3856', 33, 103.75, 1), (10131, 'S18_1662', 21, 132.46, 4), (10131, 'S24_2841', 35, 67.14, 5), (10131, 'S24_3420', 29, 59.18, 6), (10131, 'S24_3949', 50, 81.89, 3), (10131, 'S700_2047', 22, 85.99, 8), (10131, 'S700_2466', 40, 110.69, 1), (10131, 'S700_4002', 26, 85.13, 2), (10131, 'S72_1253', 21, 41.71, 7), (10132, 'S700_3167', 36, 68.80, 1), (10133, 'S18_2581', 49, 69.27, 3), (10133, 'S24_1785', 41, 94.10, 5), (10133, 'S24_4278', 46, 77.52, 4), (10133, 'S32_1374', 23, 114.87, 1), (10133, 'S32_4289', 49, 57.10, 6), (10133, 'S50_1341', 27, 50.19, 7), (10133, 'S700_1691', 24, 77.64, 8), (10133, 'S700_2834', 27, 99.67, 2), (10134, 'S10_1678', 41, 94.74, 2), (10134, 'S10_2016', 27, 122.51, 5), (10134, 'S10_4698', 31, 226.58, 4), (10134, 'S12_2823', 20, 135.56, 1), (10134, 'S18_2625', 30, 61.78, 6), (10134, 'S24_1578', 35, 93.54, 3), (10134, 'S24_2000', 43, 83.03, 7), (10135, 'S12_1099', 42, 190.68, 7), (10135, 'S12_3380', 48, 125.66, 5), (10135, 'S12_3990', 24, 75.01, 8), (10135, 'S12_4675', 29, 97.89, 4), (10135, 'S18_1889', 48, 79.31, 3), (10135, 'S18_3278', 45, 78.00, 10), (10135, 'S18_3482', 42, 129.35, 9), (10135, 'S18_3782', 45, 50.36, 13), (10135, 'S18_4721', 31, 151.78, 12), (10135, 'S24_2360', 29, 61.64, 16), (10135, 'S24_2972', 20, 35.87, 1), (10135, 'S24_3371', 27, 66.13, 6), (10135, 'S24_3856', 47, 134.81, 2), (10135, 'S24_4620', 23, 87.31, 11), (10135, 'S32_2206', 33, 40.23, 14), (10135, 'S32_4485', 30, 89.80, 17), (10135, 'S50_4713', 44, 96.00, 15), (10136, 'S18_1129', 25, 145.79, 2), (10136, 'S18_1984', 36, 146.52, 1), (10136, 'S18_3232', 41, 203.21, 3), (10137, 'S18_1589', 44, 99.55, 2), (10137, 'S18_2870', 37, 117.48, 3), (10137, 'S18_3685', 31, 165.30, 4), (10137, 'S24_1628', 26, 49.81, 1), (10138, 'S18_1749', 33, 161.50, 6), (10138, 'S18_2248', 22, 48.43, 5), (10138, 'S18_2325', 38, 108.06, 3), (10138, 'S18_4409', 47, 100.31, 7), (10138, 'S18_4933', 23, 66.99, 8), (10138, 'S24_1046', 45, 84.51, 12), (10138, 'S24_1937', 22, 29.21, 2), (10138, 'S24_2022', 33, 43.01, 1), (10138, 'S24_2766', 28, 104.50, 10), (10138, 'S24_2887', 30, 138.58, 9), (10138, 'S24_3191', 49, 90.75, 11), (10138, 'S24_3432', 21, 118.86, 13), (10138, 'S24_3969', 29, 38.16, 4), (10139, 'S18_1342', 31, 102.74, 7), (10139, 'S18_1367', 49, 43.13, 6), (10139, 'S18_2795', 41, 194.06, 8), (10139, 'S18_2949', 46, 120.56, 1), (10139, 'S18_2957', 20, 71.20, 3), (10139, 'S18_3136', 20, 90.06, 2), (10139, 'S18_3320', 30, 103.18, 5), (10139, 'S24_4258', 29, 112.97, 4), (10140, 'S10_1949', 37, 199.30, 11), (10140, 'S10_4962', 26, 122.62, 4), (10140, 'S12_1666', 38, 127.10, 8), (10140, 'S18_1097', 32, 130.67, 10), (10140, 'S18_2432', 46, 61.99, 2), (10140, 'S18_4600', 40, 115.03, 5), (10140, 'S18_4668', 29, 43.27, 9), (10140, 'S24_2300', 47, 108.62, 1), (10140, 'S32_1268', 26, 108.83, 3), (10140, 'S32_3522', 28, 60.76, 7), (10140, 'S700_2824', 36, 114.30, 6), (10141, 'S12_4473', 21, 101.91, 5), (10141, 'S18_2238', 39, 152.27, 4), (10141, 'S18_2319', 47, 133.78, 8), (10141, 'S18_3232', 34, 142.25, 9), (10141, 'S24_1444', 20, 54.33, 2), (10141, 'S24_2840', 21, 42.43, 6), (10141, 'S24_4048', 40, 94.62, 1), (10141, 'S32_2509', 24, 45.99, 7), (10141, 'S50_1392', 44, 125.01, 3), (10142, 'S12_1108', 33, 243.13, 12), (10142, 'S12_3148', 33, 151.08, 13), (10142, 'S12_3891', 46, 205.89, 11), (10142, 'S18_3140', 47, 128.39, 8), (10142, 'S18_3259', 22, 97.81, 10), (10142, 'S18_4027', 24, 157.98, 15), (10142, 'S18_4522', 24, 70.22, 7), (10142, 'S24_2011', 33, 102.00, 6), (10142, 'S24_3151', 49, 98.25, 1), (10142, 'S32_3207', 42, 74.57, 16), (10142, 'S50_1514', 42, 49.79, 14), (10142, 'S700_1138', 41, 64.00, 2), (10142, 'S700_1938', 43, 84.01, 9), (10142, 'S700_3505', 21, 111.19, 3), (10142, 'S700_3962', 38, 85.41, 4), (10142, 'S72_3212', 39, 44.23, 5), (10143, 'S10_4757', 49, 114.24, 15), (10143, 'S18_1662', 32, 164.00, 7), (10143, 'S18_3029', 46, 74.84, 13), (10143, 'S18_3856', 34, 101.64, 12), (10143, 'S24_2841', 27, 60.97, 8), (10143, 'S24_3420', 33, 77.59, 9), (10143, 'S24_3816', 23, 80.51, 14), (10143, 'S24_3949', 28, 66.19, 6), (10143, 'S50_1341', 34, 36.66, 1), (10143, 'S700_1691', 36, 109.61, 2), (10143, 'S700_2047', 26, 100.48, 11), (10143, 'S700_2466', 26, 82.77, 4), (10143, 'S700_2610', 31, 85.29, 16), (10143, 'S700_3167', 28, 96.00, 3), (10143, 'S700_4002', 34, 85.87, 5), (10143, 'S72_1253', 37, 50.65, 10), (10144, 'S32_4289', 20, 81.86, 1), (10145, 'S10_1678', 45, 83.26, 6), (10145, 'S10_2016', 37, 140.35, 9), (10145, 'S10_4698', 33, 156.86, 8), (10145, 'S12_2823', 49, 170.20, 5), (10145, 'S18_2581', 30, 85.32, 14), (10145, 'S18_2625', 30, 49.67, 10), (10145, 'S24_1578', 43, 95.80, 7), (10145, 'S24_1785', 40, 87.54, 16), (10145, 'S24_2000', 47, 83.03, 11), (10145, 'S24_2360', 27, 60.95, 3), (10145, 'S24_4278', 33, 84.77, 15), (10145, 'S32_1374', 33, 93.90, 12), (10145, 'S32_2206', 31, 35.80, 1), (10145, 'S32_4485', 27, 120.42, 4), (10145, 'S50_4713', 38, 81.36, 2), (10145, 'S700_2834', 20, 137.63, 13), (10146, 'S18_3782', 47, 67.14, 2), (10146, 'S18_4721', 29, 153.26, 1), (10147, 'S12_1099', 48, 192.62, 7), (10147, 'S12_3380', 31, 112.74, 5), (10147, 'S12_3990', 21, 63.84, 8), (10147, 'S12_4675', 33, 97.89, 4), (10147, 'S18_1889', 26, 82.39, 3), (10147, 'S18_3278', 36, 86.04, 10), (10147, 'S18_3482', 37, 119.06, 9), (10147, 'S24_2972', 25, 42.67, 1), (10147, 'S24_3371', 30, 68.58, 6), (10147, 'S24_3856', 23, 126.39, 2), (10147, 'S24_4620', 31, 64.67, 11), (10148, 'S18_1129', 23, 117.48, 13), (10148, 'S18_1589', 47, 124.44, 9), (10148, 'S18_1984', 25, 169.28, 12), (10148, 'S18_2870', 27, 130.68, 10), (10148, 'S18_3232', 32, 169.34, 14), (10148, 'S18_3685', 28, 129.98, 11), (10148, 'S18_4409', 34, 105.83, 1), (10148, 'S18_4933', 29, 81.25, 2), (10148, 'S24_1046', 25, 60.26, 6), (10148, 'S24_1628', 47, 56.85, 8), (10148, 'S24_2766', 21, 73.60, 4), (10148, 'S24_2887', 34, 129.18, 3), (10148, 'S24_3191', 31, 73.62, 5), (10148, 'S24_3432', 27, 128.50, 7), (10149, 'S18_1342', 50, 118.15, 4), (10149, 'S18_1367', 30, 58.22, 3), (10149, 'S18_1749', 34, 158.10, 11), (10149, 'S18_2248', 24, 62.36, 10), (10149, 'S18_2325', 33, 150.01, 8), (10149, 'S18_2795', 23, 183.94, 5), (10149, 'S18_3320', 42, 94.25, 2), (10149, 'S24_1937', 36, 33.19, 7), (10149, 'S24_2022', 49, 49.28, 6), (10149, 'S24_3969', 26, 38.98, 9), (10149, 'S24_4258', 20, 90.57, 1), (10150, 'S10_1949', 45, 244.30, 8), (10150, 'S10_4962', 20, 159.56, 1), (10150, 'S12_1666', 30, 136.67, 5), (10150, 'S18_1097', 34, 136.50, 7), (10150, 'S18_2949', 47, 91.18, 9), (10150, 'S18_2957', 30, 49.97, 11), (10150, 'S18_3136', 26, 107.86, 10), (10150, 'S18_4600', 49, 131.98, 2), (10150, 'S18_4668', 30, 42.76, 6), (10150, 'S32_3522', 49, 58.18, 4), (10150, 'S700_2824', 20, 105.20, 3), (10151, 'S12_4473', 24, 138.65, 3), (10151, 'S18_2238', 43, 165.37, 2), (10151, 'S18_2319', 49, 110.46, 6), (10151, 'S18_2432', 39, 69.28, 9), (10151, 'S18_3232', 21, 177.81, 7), (10151, 'S24_2300', 42, 121.40, 8), (10151, 'S24_2840', 30, 40.31, 4), (10151, 'S32_1268', 27, 113.65, 10), (10151, 'S32_2509', 41, 63.85, 5), (10151, 'S50_1392', 26, 123.85, 1), (10152, 'S18_4027', 35, 129.26, 1), (10152, 'S24_1444', 25, 65.31, 4), (10152, 'S24_4048', 23, 121.83, 3), (10152, 'S32_3207', 33, 50.95, 2), (10153, 'S12_1108', 20, 245.20, 11), (10153, 'S12_3148', 42, 128.42, 12), (10153, 'S12_3891', 49, 143.61, 10), (10153, 'S18_3140', 31, 117.47, 7), (10153, 'S18_3259', 29, 88.74, 9), (10153, 'S18_4522', 22, 83.38, 6), (10153, 'S24_2011', 40, 136.41, 5), (10153, 'S50_1514', 31, 57.41, 13), (10153, 'S700_1138', 43, 64.67, 1), (10153, 'S700_1938', 31, 87.48, 8), (10153, 'S700_3505', 50, 88.15, 2), (10153, 'S700_3962', 20, 110.23, 3), (10153, 'S72_3212', 50, 60.06, 4), (10154, 'S24_3151', 31, 91.17, 2), (10154, 'S700_2610', 36, 64.33, 1), (10155, 'S10_4757', 32, 141.44, 13), (10155, 'S18_1662', 38, 171.88, 5), (10155, 'S18_3029', 44, 79.14, 11), (10155, 'S18_3856', 29, 124.93, 10), (10155, 'S24_2841', 23, 72.62, 6), (10155, 'S24_3420', 34, 55.89, 7), (10155, 'S24_3816', 37, 67.93, 12), (10155, 'S24_3949', 44, 77.11, 4), (10155, 'S700_2047', 32, 91.43, 9), (10155, 'S700_2466', 20, 117.67, 2), (10155, 'S700_3167', 43, 86.40, 1), (10155, 'S700_4002', 44, 85.87, 3), (10155, 'S72_1253', 34, 49.16, 8), (10156, 'S50_1341', 20, 41.02, 1), (10156, 'S700_1691', 48, 103.21, 2), (10157, 'S18_2581', 33, 78.57, 3), (10157, 'S24_1785', 40, 102.85, 5), (10157, 'S24_4278', 33, 86.22, 4), (10157, 'S32_1374', 34, 118.87, 1), (10157, 'S32_4289', 28, 74.98, 6), (10157, 'S700_2834', 48, 124.58, 2), (10158, 'S24_2000', 22, 67.03, 1), (10159, 'S10_1678', 49, 106.23, 14), (10159, 'S10_2016', 37, 135.59, 17), (10159, 'S10_4698', 22, 187.85, 16), (10159, 'S12_1099', 41, 202.35, 2), (10159, 'S12_2823', 38, 164.18, 13), (10159, 'S12_3990', 24, 73.42, 3), (10159, 'S18_2625', 42, 51.48, 18), (10159, 'S18_3278', 21, 81.21, 5), (10159, 'S18_3482', 25, 145.52, 4), (10159, 'S18_3782', 21, 64.66, 8), (10159, 'S18_4721', 32, 144.34, 7), (10159, 'S24_1578', 44, 121.72, 15), (10159, 'S24_2360', 27, 80.34, 11), (10159, 'S24_3371', 50, 69.80, 1), (10159, 'S24_4620', 23, 67.10, 6), (10159, 'S32_2206', 35, 35.40, 9), (10159, 'S32_4485', 23, 102.05, 12), (10159, 'S50_4713', 31, 71.60, 10), (10160, 'S12_3380', 46, 115.09, 6), (10160, 'S12_4675', 50, 103.64, 5), (10160, 'S18_1889', 38, 88.55, 4), (10160, 'S18_3232', 20, 199.82, 1), (10160, 'S24_2972', 42, 37.00, 2), (10160, 'S24_3856', 35, 136.22, 3), (10161, 'S18_1129', 28, 134.46, 12), (10161, 'S18_1589', 43, 143.11, 8), (10161, 'S18_1984', 48, 128.03, 11), (10161, 'S18_2870', 23, 138.60, 9), (10161, 'S18_3685', 36, 154.00, 10), (10161, 'S18_4933', 25, 80.54, 1), (10161, 'S24_1046', 37, 72.76, 5), (10161, 'S24_1628', 23, 53.33, 7), (10161, 'S24_2766', 20, 107.23, 3), (10161, 'S24_2887', 25, 110.39, 2), (10161, 'S24_3191', 20, 77.05, 4), (10161, 'S24_3432', 30, 104.94, 6), (10162, 'S18_1342', 48, 91.44, 2), (10162, 'S18_1367', 45, 51.21, 1), (10162, 'S18_1749', 29, 178.50, 9), (10162, 'S18_2248', 27, 69.62, 8), (10162, 'S18_2325', 38, 113.15, 6), (10162, 'S18_2795', 48, 150.19, 3), (10162, 'S18_4409', 39, 100.31, 10), (10162, 'S24_1937', 37, 27.22, 5), (10162, 'S24_2022', 43, 36.29, 4), (10162, 'S24_3969', 37, 38.98, 7), (10163, 'S10_1949', 21, 231.44, 1), (10163, 'S18_2949', 31, 107.39, 2), (10163, 'S18_2957', 48, 69.96, 4), (10163, 'S18_3136', 40, 122.52, 3), (10163, 'S18_3320', 43, 116.08, 6), (10163, 'S24_4258', 42, 91.55, 5), (10164, 'S10_4962', 21, 168.42, 2), (10164, 'S12_1666', 49, 133.94, 6), (10164, 'S18_1097', 36, 99.17, 8), (10164, 'S18_4600', 45, 111.39, 3), (10164, 'S18_4668', 25, 53.83, 7), (10164, 'S32_1268', 24, 109.79, 1), (10164, 'S32_3522', 49, 54.94, 5), (10164, 'S700_2824', 39, 81.93, 4), (10165, 'S12_1108', 44, 195.33, 3), (10165, 'S12_3148', 34, 143.53, 4), (10165, 'S12_3891', 27, 205.89, 2), (10165, 'S12_4473', 48, 142.20, 12), (10165, 'S18_2238', 29, 173.55, 11), (10165, 'S18_2319', 46, 130.09, 15), (10165, 'S18_2432', 31, 71.10, 18), (10165, 'S18_3232', 47, 186.27, 16), (10165, 'S18_3259', 50, 106.89, 1), (10165, 'S18_4027', 28, 119.20, 6), (10165, 'S24_1444', 25, 69.36, 9), (10165, 'S24_2300', 32, 145.68, 17), (10165, 'S24_2840', 27, 31.82, 13), (10165, 'S24_4048', 24, 99.36, 8), (10165, 'S32_2509', 48, 45.99, 14), (10165, 'S32_3207', 44, 53.44, 7), (10165, 'S50_1392', 48, 94.92, 10), (10165, 'S50_1514', 38, 66.78, 5), (10166, 'S18_3140', 43, 161.18, 2), (10166, 'S18_4522', 26, 73.73, 1), (10166, 'S700_1938', 29, 103.93, 3), (10167, 'S10_4757', 44, 134.64, 9), (10167, 'S18_1662', 43, 134.04, 1), (10167, 'S18_3029', 46, 73.12, 7), (10167, 'S18_3856', 34, 105.87, 6), (10167, 'S24_2011', 33, 115.52, 16), (10167, 'S24_2841', 21, 69.88, 2), (10167, 'S24_3151', 20, 79.66, 11), (10167, 'S24_3420', 32, 63.12, 3), (10167, 'S24_3816', 29, 83.86, 8), (10167, 'S700_1138', 43, 75.34, 12), (10167, 'S700_2047', 29, 101.38, 5), (10167, 'S700_2610', 46, 70.11, 10), (10167, 'S700_3505', 24, 117.20, 13), (10167, 'S700_3962', 28, 107.25, 14), (10167, 'S72_1253', 40, 41.71, 4), (10167, 'S72_3212', 38, 48.59, 15), (10168, 'S10_1678', 36, 96.66, 1), (10168, 'S10_2016', 27, 135.59, 4), (10168, 'S10_4698', 20, 209.15, 3), (10168, 'S18_2581', 21, 70.96, 9), (10168, 'S18_2625', 46, 61.18, 5), (10168, 'S24_1578', 50, 114.95, 2), (10168, 'S24_1785', 49, 131.30, 11), (10168, 'S24_2000', 29, 75.41, 6), (10168, 'S24_3949', 27, 73.02, 18), (10168, 'S24_4278', 48, 78.25, 10), (10168, 'S32_1374', 28, 115.87, 7), (10168, 'S32_4289', 31, 73.61, 12), (10168, 'S50_1341', 48, 51.93, 13), (10168, 'S700_1691', 28, 98.65, 14), (10168, 'S700_2466', 31, 110.69, 16), (10168, 'S700_2834', 36, 125.77, 8), (10168, 'S700_3167', 48, 96.00, 15), (10168, 'S700_4002', 39, 82.91, 17), (10169, 'S12_1099', 30, 167.33, 2), (10169, 'S12_2823', 35, 132.55, 13), (10169, 'S12_3990', 36, 63.84, 3), (10169, 'S18_3278', 32, 70.76, 5), (10169, 'S18_3482', 36, 123.47, 4), (10169, 'S18_3782', 38, 68.39, 8), (10169, 'S18_4721', 33, 148.80, 7), (10169, 'S24_2360', 38, 74.11, 11), (10169, 'S24_3371', 34, 50.21, 1), (10169, 'S24_4620', 24, 94.58, 6), (10169, 'S32_2206', 26, 39.83, 9), (10169, 'S32_4485', 34, 115.32, 12), (10169, 'S50_4713', 48, 80.55, 10), (10170, 'S12_3380', 47, 116.27, 4), (10170, 'S12_4675', 41, 107.10, 3), (10170, 'S18_1889', 20, 63.14, 2), (10170, 'S24_3856', 34, 112.34, 1), (10171, 'S18_1129', 35, 128.80, 2), (10171, 'S18_1984', 35, 133.72, 1), (10171, 'S18_3232', 39, 140.55, 3), (10171, 'S24_2972', 36, 35.49, 4), (10172, 'S18_1589', 42, 118.22, 6), (10172, 'S18_2870', 39, 154.44, 7), (10172, 'S18_3685', 48, 114.44, 8), (10172, 'S24_1046', 32, 75.69, 3), (10172, 'S24_1628', 34, 42.76, 5), (10172, 'S24_2766', 22, 74.51, 1), (10172, 'S24_3191', 24, 81.33, 2), (10172, 'S24_3432', 22, 98.51, 4), (10173, 'S18_1342', 43, 117.12, 6), (10173, 'S18_1367', 48, 44.21, 5), (10173, 'S18_1749', 24, 146.20, 13), (10173, 'S18_2248', 26, 57.51, 12), (10173, 'S18_2325', 31, 144.93, 10), (10173, 'S18_2795', 22, 156.94, 7), (10173, 'S18_2957', 28, 53.72, 2), (10173, 'S18_3136', 31, 89.01, 1), (10173, 'S18_3320', 29, 95.24, 4), (10173, 'S18_4409', 21, 75.46, 14), (10173, 'S18_4933', 39, 71.98, 15), (10173, 'S24_1937', 31, 31.53, 9), (10173, 'S24_2022', 27, 41.22, 8), (10173, 'S24_2887', 23, 118.61, 16), (10173, 'S24_3969', 35, 33.23, 11), (10173, 'S24_4258', 22, 116.87, 3), (10174, 'S10_1949', 34, 235.73, 4), (10174, 'S12_1666', 43, 158.54, 1), (10174, 'S18_1097', 48, 93.34, 3), (10174, 'S18_2949', 46, 121.57, 5), (10174, 'S18_4668', 49, 44.78, 2), (10175, 'S10_4962', 33, 162.51, 9), (10175, 'S12_4473', 26, 136.28, 1), (10175, 'S18_2319', 48, 122.73, 4), (10175, 'S18_2432', 41, 69.28, 7), (10175, 'S18_3232', 29, 152.41, 5), (10175, 'S18_4600', 47, 108.97, 10), (10175, 'S24_2300', 28, 106.07, 6), (10175, 'S24_2840', 37, 31.12, 2), (10175, 'S32_1268', 22, 110.76, 8), (10175, 'S32_2509', 50, 63.31, 3), (10175, 'S32_3522', 29, 74.98, 12), (10175, 'S700_2824', 42, 85.98, 11), (10176, 'S12_1108', 33, 226.50, 2), (10176, 'S12_3148', 47, 178.27, 3), (10176, 'S12_3891', 50, 157.45, 1), (10176, 'S18_2238', 20, 183.38, 10), (10176, 'S18_4027', 36, 153.67, 5), (10176, 'S24_1444', 27, 68.78, 8), (10176, 'S24_4048', 29, 100.54, 7), (10176, 'S32_3207', 22, 64.00, 6), (10176, 'S50_1392', 23, 135.43, 9), (10176, 'S50_1514', 38, 64.44, 4), (10177, 'S18_3140', 23, 159.81, 9), (10177, 'S18_3259', 29, 105.88, 11), (10177, 'S18_4522', 35, 74.60, 8), (10177, 'S24_2011', 50, 121.66, 7), (10177, 'S24_3151', 45, 72.58, 2), (10177, 'S700_1138', 24, 76.00, 3), (10177, 'S700_1938', 31, 88.34, 10), (10177, 'S700_2610', 32, 76.62, 1), (10177, 'S700_3505', 44, 92.16, 4), (10177, 'S700_3962', 24, 105.27, 5), (10177, 'S72_3212', 40, 50.23, 6), (10178, 'S10_4757', 24, 145.52, 12), (10178, 'S18_1662', 42, 154.54, 4), (10178, 'S18_3029', 41, 81.72, 10), (10178, 'S18_3856', 48, 112.22, 9), (10178, 'S24_2841', 34, 80.84, 5), (10178, 'S24_3420', 27, 73.64, 6), (10178, 'S24_3816', 21, 72.12, 11), (10178, 'S24_3949', 30, 72.33, 3), (10178, 'S700_2047', 34, 96.86, 8), (10178, 'S700_2466', 22, 87.75, 1), (10178, 'S700_4002', 45, 76.25, 2), (10178, 'S72_1253', 45, 51.15, 7), (10179, 'S18_2581', 24, 78.57, 3), (10179, 'S24_1785', 47, 124.74, 5), (10179, 'S24_4278', 27, 84.77, 4), (10179, 'S32_1374', 45, 119.87, 1), (10179, 'S32_4289', 24, 72.23, 6), (10179, 'S50_1341', 34, 42.77, 7), (10179, 'S700_1691', 23, 107.78, 8), (10179, 'S700_2834', 25, 105.60, 2), (10179, 'S700_3167', 39, 68.80, 9), (10180, 'S10_1678', 29, 86.13, 9), (10180, 'S10_2016', 42, 111.80, 12), (10180, 'S10_4698', 41, 216.90, 11), (10180, 'S12_2823', 40, 168.69, 8), (10180, 'S18_2625', 25, 64.20, 13), (10180, 'S18_3782', 21, 50.36, 3), (10180, 'S18_4721', 44, 126.48, 2), (10180, 'S24_1578', 48, 111.57, 10), (10180, 'S24_2000', 28, 68.55, 14), (10180, 'S24_2360', 35, 72.03, 6), (10180, 'S24_4620', 28, 71.14, 1), (10180, 'S32_2206', 34, 45.46, 4), (10180, 'S32_4485', 22, 114.30, 7), (10180, 'S50_4713', 21, 93.56, 5), (10181, 'S12_1099', 27, 200.41, 14), (10181, 'S12_3380', 28, 102.17, 12), (10181, 'S12_3990', 20, 81.40, 15), (10181, 'S12_4675', 36, 124.37, 11), (10181, 'S18_1129', 44, 123.14, 6), (10181, 'S18_1589', 42, 129.42, 2), (10181, 'S18_1889', 22, 73.92, 10), (10181, 'S18_1984', 21, 156.48, 5), (10181, 'S18_2870', 27, 143.88, 3), (10181, 'S18_3232', 45, 140.55, 7), (10181, 'S18_3278', 30, 82.82, 17), (10181, 'S18_3482', 22, 154.34, 16), (10181, 'S18_3685', 39, 148.34, 4), (10181, 'S24_1628', 34, 53.83, 1), (10181, 'S24_2972', 37, 42.67, 8), (10181, 'S24_3371', 23, 65.52, 13), (10181, 'S24_3856', 25, 154.47, 9), (10182, 'S18_1342', 25, 87.33, 3), (10182, 'S18_1367', 32, 54.45, 2), (10182, 'S18_1749', 44, 171.70, 10), (10182, 'S18_2248', 38, 61.15, 9), (10182, 'S18_2325', 20, 110.60, 7), (10182, 'S18_2795', 21, 145.13, 4), (10182, 'S18_3320', 33, 86.31, 1), (10182, 'S18_4409', 36, 109.52, 11), (10182, 'S18_4933', 44, 69.84, 12), (10182, 'S24_1046', 47, 74.22, 16), (10182, 'S24_1937', 39, 36.84, 6), (10182, 'S24_2022', 31, 36.74, 5), (10182, 'S24_2766', 36, 73.60, 14), (10182, 'S24_2887', 20, 119.79, 13), (10182, 'S24_3191', 33, 94.17, 15), (10182, 'S24_3432', 49, 127.43, 17), (10182, 'S24_3969', 23, 42.26, 8), (10183, 'S10_1949', 23, 233.59, 8), (10183, 'S10_4962', 28, 122.62, 1), (10183, 'S12_1666', 41, 150.34, 5), (10183, 'S18_1097', 21, 96.84, 7), (10183, 'S18_2949', 37, 89.15, 9), (10183, 'S18_2957', 39, 68.08, 11), (10183, 'S18_3136', 22, 113.10, 10), (10183, 'S18_4600', 21, 116.24, 2), (10183, 'S18_4668', 40, 49.30, 6), (10183, 'S24_4258', 47, 107.13, 12), (10183, 'S32_3522', 49, 64.64, 4), (10183, 'S700_2824', 23, 86.99, 3), (10184, 'S12_4473', 37, 122.06, 6), (10184, 'S18_2238', 46, 160.46, 5), (10184, 'S18_2319', 46, 130.09, 9), (10184, 'S18_2432', 44, 60.16, 12), (10184, 'S18_3232', 28, 157.49, 10), (10184, 'S24_1444', 31, 60.11, 3), (10184, 'S24_2300', 24, 145.68, 11), (10184, 'S24_2840', 42, 31.82, 7), (10184, 'S24_4048', 49, 118.28, 2), (10184, 'S32_1268', 46, 100.16, 13), (10184, 'S32_2509', 33, 62.77, 8), (10184, 'S32_3207', 48, 50.95, 1), (10184, 'S50_1392', 45, 109.96, 4), (10185, 'S12_1108', 21, 184.94, 13), (10185, 'S12_3148', 33, 122.37, 14), (10185, 'S12_3891', 43, 183.40, 12), (10185, 'S18_3140', 28, 122.93, 9), (10185, 'S18_3259', 49, 80.67, 11), (10185, 'S18_4027', 39, 130.69, 16), (10185, 'S18_4522', 47, 77.24, 8), (10185, 'S24_2011', 30, 105.69, 7), (10185, 'S24_3151', 33, 74.35, 2), (10185, 'S50_1514', 20, 48.62, 15), (10185, 'S700_1138', 21, 54.00, 3), (10185, 'S700_1938', 30, 94.40, 10), (10185, 'S700_2610', 39, 57.82, 1), (10185, 'S700_3505', 37, 105.18, 4), (10185, 'S700_3962', 22, 79.45, 5), (10185, 'S72_3212', 28, 64.43, 6), (10186, 'S10_4757', 26, 148.24, 9), (10186, 'S18_1662', 32, 187.65, 1), (10186, 'S18_3029', 32, 89.46, 7), (10186, 'S18_3856', 46, 106.93, 6), (10186, 'S24_2841', 22, 69.20, 2), (10186, 'S24_3420', 21, 69.04, 3), (10186, 'S24_3816', 36, 85.54, 8), (10186, 'S700_2047', 24, 99.57, 5), (10186, 'S72_1253', 28, 52.14, 4), (10187, 'S18_2581', 45, 93.77, 1), (10187, 'S24_1785', 46, 95.20, 3), (10187, 'S24_3949', 43, 58.00, 10), (10187, 'S24_4278', 33, 59.41, 2), (10187, 'S32_4289', 31, 60.54, 4), (10187, 'S50_1341', 41, 38.84, 5), (10187, 'S700_1691', 34, 92.25, 6), (10187, 'S700_2466', 44, 105.70, 8), (10187, 'S700_3167', 34, 88.00, 7), (10187, 'S700_4002', 44, 71.81, 9), (10188, 'S10_1678', 48, 114.84, 1), (10188, 'S10_2016', 38, 96.34, 4), (10188, 'S10_4698', 45, 193.66, 3), (10188, 'S18_2625', 32, 65.42, 5), (10188, 'S24_1578', 25, 101.43, 2), (10188, 'S24_2000', 40, 91.40, 6), (10188, 'S32_1374', 44, 98.89, 7), (10188, 'S700_2834', 29, 136.45, 8), (10189, 'S12_2823', 28, 161.16, 1), (10190, 'S24_2360', 42, 76.19, 3), (10190, 'S32_2206', 46, 32.99, 1), (10190, 'S32_4485', 42, 85.72, 4), (10190, 'S50_4713', 40, 66.72, 2), (10191, 'S12_1099', 21, 182.90, 3), (10191, 'S12_3380', 40, 139.75, 1), (10191, 'S12_3990', 30, 64.64, 4), (10191, 'S18_3278', 36, 94.88, 6), (10191, 'S18_3482', 23, 148.46, 5), (10191, 'S18_3782', 43, 72.74, 9), (10191, 'S18_4721', 32, 132.43, 8), (10191, 'S24_3371', 48, 60.01, 2), (10191, 'S24_4620', 44, 66.29, 7), (10192, 'S12_4675', 27, 131.28, 16), (10192, 'S18_1129', 22, 150.03, 11), (10192, 'S18_1589', 29, 146.84, 7), (10192, 'S18_1889', 45, 90.86, 15), (10192, 'S18_1984', 47, 157.90, 10), (10192, 'S18_2870', 38, 130.68, 8), (10192, 'S18_3232', 26, 150.71, 12), (10192, 'S18_3685', 45, 118.68, 9), (10192, 'S24_1046', 37, 69.82, 4), (10192, 'S24_1628', 47, 53.83, 6), (10192, 'S24_2766', 46, 83.60, 2), (10192, 'S24_2887', 23, 132.71, 1), (10192, 'S24_2972', 30, 30.59, 13), (10192, 'S24_3191', 32, 72.77, 3), (10192, 'S24_3432', 46, 121.00, 5), (10192, 'S24_3856', 45, 140.43, 14), (10193, 'S18_1342', 28, 110.96, 7), (10193, 'S18_1367', 46, 53.37, 6), (10193, 'S18_1749', 21, 149.60, 14), (10193, 'S18_2248', 42, 59.33, 13), (10193, 'S18_2325', 44, 105.52, 11), (10193, 'S18_2795', 22, 167.06, 8), (10193, 'S18_2949', 28, 93.21, 1), (10193, 'S18_2957', 24, 51.84, 3), (10193, 'S18_3136', 23, 120.43, 2), (10193, 'S18_3320', 32, 79.37, 5), (10193, 'S18_4409', 24, 97.55, 15), (10193, 'S18_4933', 25, 76.26, 16), (10193, 'S24_1937', 26, 29.21, 10), (10193, 'S24_2022', 20, 50.62, 9), (10193, 'S24_3969', 22, 41.03, 12), (10193, 'S24_4258', 20, 113.95, 4), (10194, 'S10_1949', 42, 173.58, 11), (10194, 'S10_4962', 26, 163.99, 4), (10194, 'S12_1666', 38, 129.84, 8), (10194, 'S18_1097', 21, 93.34, 10), (10194, 'S18_2432', 45, 70.49, 2), (10194, 'S18_4600', 32, 133.19, 5), (10194, 'S18_4668', 41, 44.78, 9), (10194, 'S24_2300', 49, 117.57, 1), (10194, 'S32_1268', 37, 97.27, 3), (10194, 'S32_3522', 39, 54.94, 7), (10194, 'S700_2824', 26, 89.01, 6), (10195, 'S12_4473', 49, 131.54, 6), (10195, 'S18_2238', 27, 189.93, 5), (10195, 'S18_2319', 35, 103.09, 9), (10195, 'S18_3232', 50, 152.41, 10), (10195, 'S24_1444', 44, 66.47, 3), (10195, 'S24_2840', 32, 28.29, 7), (10195, 'S24_4048', 34, 108.82, 2), (10195, 'S32_2509', 32, 43.29, 8), (10195, 'S32_3207', 33, 54.68, 1), (10195, 'S50_1392', 49, 105.33, 4), (10196, 'S12_1108', 47, 189.10, 5), (10196, 'S12_3148', 24, 158.63, 6), (10196, 'S12_3891', 38, 190.32, 4), (10196, 'S18_3140', 49, 140.69, 1), (10196, 'S18_3259', 35, 101.85, 3), (10196, 'S18_4027', 27, 168.04, 8), (10196, 'S50_1514', 46, 62.09, 7), (10196, 'S700_1938', 50, 94.40, 2), (10197, 'S10_4757', 45, 118.32, 6), (10197, 'S18_3029', 46, 87.74, 4), (10197, 'S18_3856', 22, 115.40, 3), (10197, 'S18_4522', 50, 101.81, 14), (10197, 'S24_2011', 41, 110.60, 13), (10197, 'S24_3151', 47, 83.20, 8), (10197, 'S24_3816', 22, 86.38, 5), (10197, 'S700_1138', 23, 64.67, 9), (10197, 'S700_2047', 24, 90.52, 2), (10197, 'S700_2610', 50, 78.79, 7), (10197, 'S700_3505', 27, 92.16, 10), (10197, 'S700_3962', 35, 93.35, 11), (10197, 'S72_1253', 29, 41.71, 1), (10197, 'S72_3212', 42, 50.23, 12), (10198, 'S18_1662', 42, 178.19, 4), (10198, 'S24_2841', 48, 67.82, 5), (10198, 'S24_3420', 27, 71.67, 6), (10198, 'S24_3949', 43, 66.19, 3), (10198, 'S700_2466', 42, 113.68, 1), (10198, 'S700_4002', 40, 63.67, 2), (10199, 'S50_1341', 29, 38.40, 1), (10199, 'S700_1691', 48, 83.12, 2), (10199, 'S700_3167', 38, 82.40, 3), (10200, 'S18_2581', 28, 92.93, 3), (10200, 'S24_1785', 33, 98.48, 5), (10200, 'S24_4278', 39, 72.45, 4), (10200, 'S32_1374', 35, 109.88, 1), (10200, 'S32_4289', 27, 67.41, 6), (10200, 'S700_2834', 39, 102.04, 2), (10201, 'S10_1678', 22, 98.57, 2), (10201, 'S10_2016', 24, 126.08, 5), (10201, 'S10_4698', 49, 164.61, 4), (10201, 'S12_2823', 25, 161.16, 1), (10201, 'S18_2625', 30, 64.81, 6), (10201, 'S24_1578', 39, 111.57, 3), (10201, 'S24_2000', 25, 73.88, 7), (10202, 'S18_3782', 30, 54.71, 3), (10202, 'S18_4721', 43, 136.90, 2), (10202, 'S24_2360', 50, 69.26, 6), (10202, 'S24_4620', 50, 87.31, 1), (10202, 'S32_2206', 27, 44.25, 4), (10202, 'S32_4485', 31, 102.05, 7), (10202, 'S50_4713', 40, 89.50, 5), (10203, 'S12_1099', 20, 196.52, 8), (10203, 'S12_3380', 20, 112.74, 6), (10203, 'S12_3990', 44, 82.99, 9), (10203, 'S12_4675', 47, 110.55, 5), (10203, 'S18_1889', 45, 85.47, 4), (10203, 'S18_3232', 48, 172.73, 1), (10203, 'S18_3278', 33, 86.04, 11), (10203, 'S18_3482', 32, 160.22, 10), (10203, 'S24_2972', 21, 37.00, 2), (10203, 'S24_3371', 34, 64.90, 7), (10203, 'S24_3856', 47, 148.86, 3), (10204, 'S18_1129', 42, 147.20, 17), (10204, 'S18_1589', 40, 100.80, 13), (10204, 'S18_1749', 33, 178.50, 4), (10204, 'S18_1984', 38, 169.28, 16), (10204, 'S18_2248', 23, 71.44, 3), (10204, 'S18_2325', 26, 123.32, 1), (10204, 'S18_2870', 27, 154.44, 14), (10204, 'S18_3685', 35, 163.88, 15), (10204, 'S18_4409', 29, 85.59, 5), (10204, 'S18_4933', 45, 76.26, 6), (10204, 'S24_1046', 20, 62.47, 10), (10204, 'S24_1628', 45, 49.81, 12), (10204, 'S24_2766', 47, 96.32, 8), (10204, 'S24_2887', 42, 101.00, 7), (10204, 'S24_3191', 40, 79.62, 9), (10204, 'S24_3432', 48, 91.02, 11), (10204, 'S24_3969', 39, 33.23, 2), (10205, 'S18_1342', 36, 103.77, 2), (10205, 'S18_1367', 48, 63.61, 1), (10205, 'S18_2795', 40, 187.31, 3), (10205, 'S24_1937', 32, 37.17, 5), (10205, 'S24_2022', 24, 38.08, 4), (10206, 'S10_1949', 47, 192.87, 6), (10206, 'S12_1666', 28, 144.87, 3), (10206, 'S18_1097', 34, 116.67, 5), (10206, 'S18_2949', 37, 90.17, 7), (10206, 'S18_2957', 28, 67.46, 9), (10206, 'S18_3136', 30, 119.38, 8), (10206, 'S18_3320', 28, 87.30, 11), (10206, 'S18_4668', 21, 53.33, 4), (10206, 'S24_4258', 33, 97.39, 10), (10206, 'S32_3522', 36, 58.82, 2), (10206, 'S700_2824', 33, 117.33, 1), (10207, 'S10_4962', 31, 131.49, 15), (10207, 'S12_4473', 34, 99.54, 7), (10207, 'S18_2238', 44, 160.46, 6), (10207, 'S18_2319', 43, 133.78, 10), (10207, 'S18_2432', 37, 69.89, 13), (10207, 'S18_3232', 25, 157.49, 11), (10207, 'S18_4027', 40, 153.67, 1), (10207, 'S18_4600', 47, 141.66, 16), (10207, 'S24_1444', 49, 46.82, 4), (10207, 'S24_2300', 46, 148.24, 12), (10207, 'S24_2840', 42, 29.70, 8), (10207, 'S24_4048', 28, 106.45, 3), (10207, 'S32_1268', 49, 80.90, 14), (10207, 'S32_2509', 27, 60.06, 9), (10207, 'S32_3207', 45, 56.55, 2), (10207, 'S50_1392', 28, 94.92, 5), (10208, 'S12_1108', 46, 187.02, 13), (10208, 'S12_3148', 26, 120.86, 14), (10208, 'S12_3891', 20, 155.72, 12), (10208, 'S18_3140', 24, 109.27, 9), (10208, 'S18_3259', 48, 116.97, 11), (10208, 'S18_4522', 45, 87.77, 8), (10208, 'S24_2011', 35, 122.89, 7), (10208, 'S24_3151', 20, 89.40, 2), (10208, 'S50_1514', 30, 65.61, 15), (10208, 'S700_1138', 38, 74.67, 3), (10208, 'S700_1938', 40, 80.55, 10), (10208, 'S700_2610', 46, 74.45, 1), (10208, 'S700_3505', 37, 120.20, 4), (10208, 'S700_3962', 33, 85.41, 5), (10208, 'S72_3212', 42, 63.88, 6), (10209, 'S10_4757', 39, 133.28, 8), (10209, 'S18_3029', 28, 100.64, 6), (10209, 'S18_3856', 20, 124.93, 5), (10209, 'S24_2841', 43, 82.21, 1), (10209, 'S24_3420', 36, 77.59, 2), (10209, 'S24_3816', 22, 89.73, 7), (10209, 'S700_2047', 33, 88.71, 4), (10209, 'S72_1253', 48, 44.69, 3), (10210, 'S10_2016', 23, 130.83, 2), (10210, 'S10_4698', 34, 180.10, 1), (10210, 'S18_1662', 31, 184.50, 17), (10210, 'S18_2581', 50, 76.88, 7), (10210, 'S18_2625', 40, 49.67, 3), (10210, 'S24_1785', 27, 98.48, 9), (10210, 'S24_2000', 30, 61.70, 4), (10210, 'S24_3949', 29, 69.60, 16), (10210, 'S24_4278', 40, 71.00, 8), (10210, 'S32_1374', 46, 79.91, 5), (10210, 'S32_4289', 39, 59.16, 10), (10210, 'S50_1341', 43, 41.02, 11), (10210, 'S700_1691', 21, 78.55, 12), (10210, 'S700_2466', 26, 99.72, 14), (10210, 'S700_2834', 25, 112.72, 6), (10210, 'S700_3167', 31, 86.40, 13), (10210, 'S700_4002', 42, 70.33, 15), (10211, 'S10_1678', 41, 114.84, 14), (10211, 'S12_1099', 41, 182.90, 2), (10211, 'S12_2823', 36, 132.55, 13), (10211, 'S12_3990', 28, 92.57, 3), (10211, 'S18_3278', 35, 78.00, 5), (10211, 'S18_3482', 28, 133.76, 4), (10211, 'S18_3782', 46, 54.09, 8), (10211, 'S18_4721', 41, 138.38, 7), (10211, 'S24_1578', 25, 90.16, 15), (10211, 'S24_2360', 21, 63.72, 11), (10211, 'S24_3371', 48, 48.98, 1), (10211, 'S24_4620', 22, 92.16, 6), (10211, 'S32_2206', 41, 42.24, 9), (10211, 'S32_4485', 37, 109.19, 12), (10211, 'S50_4713', 40, 80.55, 10), (10212, 'S12_3380', 39, 126.84, 16), (10212, 'S12_4675', 33, 126.68, 15), (10212, 'S18_1129', 29, 144.37, 10), (10212, 'S18_1589', 38, 118.22, 6), (10212, 'S18_1889', 20, 66.99, 14), (10212, 'S18_1984', 41, 118.07, 9), (10212, 'S18_2870', 40, 122.76, 7), (10212, 'S18_3232', 40, 138.86, 11), (10212, 'S18_3685', 45, 141.28, 8), (10212, 'S24_1046', 41, 82.31, 3), (10212, 'S24_1628', 45, 53.33, 5), (10212, 'S24_2766', 45, 88.14, 1), (10212, 'S24_2972', 34, 43.42, 12), (10212, 'S24_3191', 27, 79.62, 2), (10212, 'S24_3432', 46, 87.81, 4), (10212, 'S24_3856', 49, 141.83, 13), (10213, 'S18_4409', 38, 94.79, 1), (10213, 'S18_4933', 25, 83.39, 2), (10213, 'S24_2887', 27, 103.35, 3), (10214, 'S18_1749', 30, 198.90, 7), (10214, 'S18_2248', 21, 62.96, 6), (10214, 'S18_2325', 27, 133.49, 4), (10214, 'S18_2795', 50, 190.69, 1), (10214, 'S24_1937', 20, 34.19, 3), (10214, 'S24_2022', 49, 47.94, 2), (10214, 'S24_3969', 44, 34.88, 5), (10215, 'S10_1949', 35, 173.58, 3), (10215, 'S18_1097', 46, 112.00, 2), (10215, 'S18_1342', 27, 89.38, 10), (10215, 'S18_1367', 33, 43.13, 9), (10215, 'S18_2949', 49, 112.45, 4), (10215, 'S18_2957', 31, 58.71, 6), (10215, 'S18_3136', 49, 107.86, 5), (10215, 'S18_3320', 41, 111.12, 8), (10215, 'S18_4668', 46, 45.28, 1), (10215, 'S24_4258', 39, 90.57, 7), (10216, 'S12_1666', 43, 133.94, 1), (10217, 'S10_4962', 48, 146.26, 4), (10217, 'S18_2432', 35, 61.38, 2), (10217, 'S18_4600', 38, 118.66, 5), (10217, 'S24_2300', 28, 112.46, 1), (10217, 'S32_1268', 21, 106.90, 3), (10217, 'S32_3522', 39, 62.05, 7), (10217, 'S700_2824', 31, 88.00, 6), (10218, 'S18_2319', 22, 121.50, 1), (10218, 'S18_3232', 34, 135.47, 2), (10219, 'S12_4473', 48, 101.91, 2), (10219, 'S18_2238', 43, 196.48, 1), (10219, 'S24_2840', 21, 40.31, 3), (10219, 'S32_2509', 35, 55.19, 4), (10220, 'S12_1108', 32, 224.42, 2), (10220, 'S12_3148', 30, 157.12, 3), (10220, 'S12_3891', 27, 186.86, 1), (10220, 'S18_4027', 50, 165.16, 5), (10220, 'S24_1444', 26, 56.07, 8), (10220, 'S24_4048', 37, 136.02, 7), (10220, 'S32_3207', 20, 52.82, 6), (10220, 'S50_1392', 37, 107.65, 9), (10220, 'S50_1514', 30, 68.54, 4), (10221, 'S18_3140', 33, 133.86, 3), (10221, 'S18_3259', 23, 80.67, 5), (10221, 'S18_4522', 39, 89.53, 2), (10221, 'S24_2011', 49, 138.87, 1), (10221, 'S700_1938', 23, 97.00, 4), (10222, 'S10_4757', 49, 122.40, 12), (10222, 'S18_1662', 49, 141.92, 4), (10222, 'S18_3029', 49, 94.62, 10), (10222, 'S18_3856', 45, 85.75, 9), (10222, 'S24_2841', 32, 81.53, 5), (10222, 'S24_3151', 47, 70.81, 14), (10222, 'S24_3420', 43, 70.35, 6), (10222, 'S24_3816', 46, 80.51, 11), (10222, 'S24_3949', 48, 56.64, 3), (10222, 'S700_1138', 31, 62.67, 15), (10222, 'S700_2047', 26, 102.29, 8), (10222, 'S700_2466', 37, 87.75, 1), (10222, 'S700_2610', 36, 80.95, 13), (10222, 'S700_3505', 38, 110.19, 16), (10222, 'S700_3962', 31, 95.34, 17), (10222, 'S700_4002', 43, 74.03, 2), (10222, 'S72_1253', 31, 45.69, 7), (10222, 'S72_3212', 36, 63.34, 18), (10223, 'S10_1678', 37, 107.18, 1), (10223, 'S10_2016', 47, 115.37, 4), (10223, 'S10_4698', 49, 199.47, 3), (10223, 'S18_2581', 47, 100.53, 9), (10223, 'S18_2625', 28, 60.57, 5), (10223, 'S24_1578', 32, 91.29, 2), (10223, 'S24_1785', 34, 106.14, 11), (10223, 'S24_2000', 38, 69.31, 6), (10223, 'S24_4278', 23, 74.62, 10), (10223, 'S32_1374', 21, 117.87, 7), (10223, 'S32_4289', 20, 66.04, 12), (10223, 'S50_1341', 41, 46.26, 13), (10223, 'S700_1691', 25, 101.39, 14), (10223, 'S700_2834', 29, 110.34, 8), (10223, 'S700_3167', 26, 67.20, 15), (10224, 'S12_2823', 43, 141.58, 6), (10224, 'S18_3782', 38, 58.44, 1), (10224, 'S24_2360', 37, 80.34, 4), (10224, 'S32_2206', 43, 39.43, 2), (10224, 'S32_4485', 30, 111.23, 5), (10224, 'S50_4713', 50, 77.29, 3), (10225, 'S12_1099', 27, 167.33, 9), (10225, 'S12_3380', 25, 99.82, 7), (10225, 'S12_3990', 37, 77.41, 10), (10225, 'S12_4675', 21, 127.83, 6), (10225, 'S18_1129', 32, 141.54, 1), (10225, 'S18_1889', 47, 64.68, 5), (10225, 'S18_3232', 43, 149.02, 2), (10225, 'S18_3278', 37, 95.69, 12), (10225, 'S18_3482', 27, 169.04, 11), (10225, 'S18_4721', 35, 150.29, 14), (10225, 'S24_2972', 42, 36.63, 3), (10225, 'S24_3371', 24, 50.21, 8), (10225, 'S24_3856', 40, 113.75, 4), (10225, 'S24_4620', 46, 70.33, 13), (10226, 'S18_1589', 38, 109.51, 4), (10226, 'S18_1984', 24, 162.17, 7), (10226, 'S18_2870', 24, 134.64, 5), (10226, 'S18_3685', 46, 159.65, 6), (10226, 'S24_1046', 21, 60.26, 1), (10226, 'S24_1628', 36, 43.27, 3), (10226, 'S24_3432', 48, 92.09, 2), (10227, 'S18_1342', 25, 118.15, 3), (10227, 'S18_1367', 31, 48.52, 2), (10227, 'S18_1749', 26, 142.80, 10), (10227, 'S18_2248', 28, 50.85, 9), (10227, 'S18_2325', 46, 152.56, 7), (10227, 'S18_2795', 29, 192.38, 4), (10227, 'S18_3320', 33, 111.12, 1), (10227, 'S18_4409', 34, 104.91, 11), (10227, 'S18_4933', 37, 57.73, 12), (10227, 'S24_1937', 42, 29.21, 6), (10227, 'S24_2022', 24, 48.38, 5), (10227, 'S24_2766', 47, 88.14, 14), (10227, 'S24_2887', 33, 131.53, 13), (10227, 'S24_3191', 40, 79.62, 15), (10227, 'S24_3969', 27, 43.90, 8), (10228, 'S10_1949', 29, 222.87, 2), (10228, 'S18_1097', 32, 105.00, 1), (10228, 'S18_2949', 24, 104.35, 3), (10228, 'S18_2957', 45, 63.71, 5), (10228, 'S18_3136', 31, 102.63, 4), (10228, 'S24_4258', 33, 103.23, 6), (10229, 'S10_4962', 50, 128.53, 9), (10229, 'S12_1666', 25, 138.04, 13), (10229, 'S12_4473', 36, 125.61, 1), (10229, 'S18_2319', 26, 144.82, 4), (10229, 'S18_2432', 28, 59.55, 7), (10229, 'S18_3232', 22, 189.66, 5), (10229, 'S18_4600', 41, 115.03, 10), (10229, 'S18_4668', 39, 40.25, 14), (10229, 'S24_2300', 48, 118.84, 6), (10229, 'S24_2840', 33, 32.88, 2), (10229, 'S32_1268', 25, 111.72, 8), (10229, 'S32_2509', 23, 54.11, 3), (10229, 'S32_3522', 30, 73.04, 12), (10229, 'S700_2824', 50, 112.28, 11), (10230, 'S12_3148', 43, 163.17, 1), (10230, 'S18_2238', 49, 148.99, 8), (10230, 'S18_4027', 42, 172.34, 3), (10230, 'S24_1444', 36, 54.33, 6), (10230, 'S24_4048', 45, 105.27, 5), (10230, 'S32_3207', 46, 60.90, 4), (10230, 'S50_1392', 34, 116.91, 7), (10230, 'S50_1514', 43, 52.14, 2), (10231, 'S12_1108', 42, 199.49, 2), (10231, 'S12_3891', 49, 141.88, 1), (10232, 'S18_3140', 22, 163.91, 6), (10232, 'S18_3259', 48, 95.80, 8), (10232, 'S18_4522', 23, 89.53, 5), (10232, 'S24_2011', 46, 122.89, 4), (10232, 'S700_1938', 26, 88.34, 7), (10232, 'S700_3505', 48, 96.16, 1), (10232, 'S700_3962', 35, 82.43, 2), (10232, 'S72_3212', 24, 49.69, 3), (10233, 'S24_3151', 40, 94.71, 2), (10233, 'S700_1138', 36, 70.67, 3), (10233, 'S700_2610', 29, 82.40, 1), (10234, 'S10_4757', 48, 150.96, 9), (10234, 'S18_1662', 50, 189.23, 1), (10234, 'S18_3029', 48, 74.84, 7), (10234, 'S18_3856', 39, 125.99, 6), (10234, 'S24_2841', 44, 61.66, 2), (10234, 'S24_3420', 25, 57.20, 3), (10234, 'S24_3816', 31, 72.96, 8), (10234, 'S700_2047', 29, 87.80, 5), (10234, 'S72_1253', 40, 56.12, 4), (10235, 'S18_2581', 24, 76.03, 3), (10235, 'S24_1785', 23, 96.29, 5), (10235, 'S24_3949', 33, 60.05, 12), (10235, 'S24_4278', 40, 81.14, 4), (10235, 'S32_1374', 41, 101.89, 1), (10235, 'S32_4289', 34, 77.73, 6), (10235, 'S50_1341', 41, 35.35, 7), (10235, 'S700_1691', 25, 103.21, 8), (10235, 'S700_2466', 38, 88.75, 10), (10235, 'S700_2834', 25, 96.11, 2), (10235, 'S700_3167', 32, 92.00, 9), (10235, 'S700_4002', 34, 72.55, 11), (10236, 'S10_2016', 22, 129.64, 1), (10236, 'S18_2625', 23, 55.72, 2), (10236, 'S24_2000', 36, 87.60, 3), (10237, 'S10_1678', 23, 101.44, 7), (10237, 'S10_4698', 39, 180.10, 9), (10237, 'S12_2823', 32, 131.04, 6), (10237, 'S18_3782', 26, 52.22, 1), (10237, 'S24_1578', 20, 114.95, 8), (10237, 'S24_2360', 26, 79.65, 4), (10237, 'S32_2206', 26, 40.23, 2), (10237, 'S32_4485', 27, 115.32, 5), (10237, 'S50_4713', 20, 68.34, 3), (10238, 'S12_1099', 28, 206.24, 3), (10238, 'S12_3380', 29, 109.22, 1), (10238, 'S12_3990', 20, 74.21, 4), (10238, 'S18_3278', 41, 73.17, 6), (10238, 'S18_3482', 49, 133.76, 5), (10238, 'S18_4721', 44, 144.34, 8), (10238, 'S24_3371', 47, 62.45, 2), (10238, 'S24_4620', 22, 93.77, 7), (10239, 'S12_4675', 21, 93.28, 5), (10239, 'S18_1889', 46, 73.92, 4), (10239, 'S18_3232', 47, 150.71, 1), (10239, 'S24_2972', 20, 44.56, 2), (10239, 'S24_3856', 29, 154.47, 3), (10240, 'S18_1129', 41, 137.29, 3), (10240, 'S18_1984', 37, 149.36, 2), (10240, 'S18_3685', 37, 161.06, 1), (10241, 'S18_1589', 21, 119.46, 11), (10241, 'S18_1749', 41, 185.30, 2), (10241, 'S18_2248', 33, 72.65, 1), (10241, 'S18_2870', 44, 155.76, 12), (10241, 'S18_4409', 42, 90.19, 3), (10241, 'S18_4933', 30, 66.99, 4), (10241, 'S24_1046', 22, 76.43, 8), (10241, 'S24_1628', 21, 40.25, 10), (10241, 'S24_2766', 47, 94.50, 6), (10241, 'S24_2887', 28, 98.65, 5), (10241, 'S24_3191', 26, 81.33, 7), (10241, 'S24_3432', 27, 86.73, 9), (10242, 'S24_3969', 46, 36.93, 1), (10243, 'S18_2325', 47, 130.94, 2), (10243, 'S24_1937', 33, 29.54, 1), (10244, 'S18_1342', 40, 117.12, 7), (10244, 'S18_1367', 20, 58.22, 6), (10244, 'S18_2795', 43, 138.38, 8), (10244, 'S18_2949', 30, 117.52, 1), (10244, 'S18_2957', 24, 58.09, 3), (10244, 'S18_3136', 29, 115.19, 2), (10244, 'S18_3320', 36, 84.33, 5), (10244, 'S24_2022', 39, 45.25, 9), (10244, 'S24_4258', 40, 86.68, 4), (10245, 'S10_1949', 34, 180.01, 9), (10245, 'S10_4962', 28, 163.99, 2), (10245, 'S12_1666', 38, 155.80, 6), (10245, 'S18_1097', 29, 119.00, 8), (10245, 'S18_4600', 21, 113.82, 3), (10245, 'S18_4668', 45, 59.87, 7), (10245, 'S32_1268', 37, 111.72, 1), (10245, 'S32_3522', 44, 69.16, 5), (10245, 'S700_2824', 44, 105.20, 4), (10246, 'S12_4473', 46, 110.21, 5), (10246, 'S18_2238', 40, 163.73, 4), (10246, 'S18_2319', 22, 98.18, 8), (10246, 'S18_2432', 30, 61.99, 11), (10246, 'S18_3232', 36, 198.13, 9), (10246, 'S24_1444', 44, 52.60, 2), (10246, 'S24_2300', 29, 121.40, 10), (10246, 'S24_2840', 49, 36.07, 6), (10246, 'S24_4048', 46, 137.20, 1), (10246, 'S32_2509', 35, 48.70, 7), (10246, 'S50_1392', 22, 133.11, 3), (10247, 'S12_1108', 44, 241.05, 2), (10247, 'S12_3148', 25, 175.25, 3), (10247, 'S12_3891', 27, 153.99, 1), (10247, 'S18_4027', 48, 140.75, 5), (10247, 'S32_3207', 40, 49.71, 6), (10247, 'S50_1514', 49, 63.85, 4), (10248, 'S10_4757', 20, 145.52, 3), (10248, 'S18_3029', 21, 73.98, 1), (10248, 'S18_3140', 32, 118.83, 12), (10248, 'S18_3259', 42, 121.01, 14), (10248, 'S18_4522', 42, 75.48, 11), (10248, 'S24_2011', 48, 145.01, 10), (10248, 'S24_3151', 30, 101.79, 5), (10248, 'S24_3816', 23, 76.31, 2), (10248, 'S700_1138', 36, 71.34, 6), (10248, 'S700_1938', 40, 103.93, 13), (10248, 'S700_2610', 32, 75.89, 4), (10248, 'S700_3505', 30, 108.18, 7), (10248, 'S700_3962', 35, 90.37, 8), (10248, 'S72_3212', 23, 65.52, 9), (10249, 'S18_3856', 46, 121.75, 5), (10249, 'S24_2841', 20, 67.82, 1), (10249, 'S24_3420', 25, 69.70, 2), (10249, 'S700_2047', 40, 95.95, 4), (10249, 'S72_1253', 32, 57.61, 3), (10250, 'S18_1662', 45, 181.34, 14), (10250, 'S18_2581', 27, 98.84, 4), (10250, 'S24_1785', 31, 88.63, 6), (10250, 'S24_2000', 32, 87.60, 1), (10250, 'S24_3949', 40, 75.06, 13), (10250, 'S24_4278', 37, 74.62, 5), (10250, 'S32_1374', 31, 105.88, 2), (10250, 'S32_4289', 50, 61.22, 7), (10250, 'S50_1341', 36, 51.93, 8), (10250, 'S700_1691', 31, 91.34, 9), (10250, 'S700_2466', 35, 111.69, 11), (10250, 'S700_2834', 44, 137.63, 3), (10250, 'S700_3167', 44, 67.20, 10), (10250, 'S700_4002', 38, 62.19, 12), (10251, 'S10_1678', 28, 113.88, 2), (10251, 'S10_2016', 44, 130.83, 5), (10251, 'S10_4698', 43, 164.61, 4), (10251, 'S12_2823', 46, 164.18, 1), (10251, 'S18_2625', 29, 61.18, 6), (10251, 'S24_1578', 26, 101.43, 3), (10252, 'S18_3278', 20, 76.39, 2), (10252, 'S18_3482', 41, 164.63, 1), (10252, 'S18_3782', 31, 52.84, 5), (10252, 'S18_4721', 26, 136.90, 4), (10252, 'S24_2360', 47, 65.80, 8), (10252, 'S24_4620', 38, 87.31, 3), (10252, 'S32_2206', 36, 48.28, 6), (10252, 'S32_4485', 25, 113.28, 9), (10252, 'S50_4713', 48, 72.41, 7), (10253, 'S12_1099', 24, 163.44, 13), (10253, 'S12_3380', 22, 109.22, 11), (10253, 'S12_3990', 25, 90.17, 14), (10253, 'S12_4675', 41, 119.77, 10), (10253, 'S18_1129', 26, 117.48, 5), (10253, 'S18_1589', 24, 140.62, 1), (10253, 'S18_1889', 23, 83.93, 9), (10253, 'S18_1984', 33, 135.14, 4), (10253, 'S18_2870', 37, 139.92, 2), (10253, 'S18_3232', 40, 169.34, 6), (10253, 'S18_3685', 31, 129.98, 3), (10253, 'S24_2972', 40, 42.67, 7), (10253, 'S24_3371', 24, 52.66, 12), (10253, 'S24_3856', 39, 132.00, 8), (10254, 'S18_1749', 49, 142.80, 5), (10254, 'S18_2248', 36, 63.57, 4), (10254, 'S18_2325', 41, 110.60, 2), (10254, 'S18_4409', 34, 92.95, 6), (10254, 'S18_4933', 30, 57.73, 7), (10254, 'S24_1046', 34, 64.67, 11), (10254, 'S24_1628', 32, 60.37, 13), (10254, 'S24_1937', 38, 26.88, 1), (10254, 'S24_2766', 31, 100.87, 9), (10254, 'S24_2887', 33, 96.30, 8), (10254, 'S24_3191', 42, 96.74, 10), (10254, 'S24_3432', 49, 100.66, 12), (10254, 'S24_3969', 20, 43.49, 3), (10255, 'S18_2795', 24, 155.25, 1), (10255, 'S24_2022', 37, 45.70, 2), (10256, 'S18_1342', 34, 95.55, 2), (10256, 'S18_1367', 29, 51.75, 1), (10257, 'S18_2949', 50, 88.14, 1), (10257, 'S18_2957', 49, 53.72, 3), (10257, 'S18_3136', 37, 84.82, 2), (10257, 'S18_3320', 26, 89.29, 5), (10257, 'S24_4258', 46, 78.89, 4), (10258, 'S10_1949', 32, 240.02, 6), (10258, 'S12_1666', 41, 162.64, 3), (10258, 'S18_1097', 41, 133.00, 5), (10258, 'S18_4668', 21, 59.87, 4), (10258, 'S32_3522', 20, 61.41, 2), (10258, 'S700_2824', 45, 80.92, 1), (10259, 'S10_4962', 26, 155.13, 12), (10259, 'S12_4473', 46, 142.20, 4), (10259, 'S18_2238', 30, 189.93, 3), (10259, 'S18_2319', 34, 99.41, 7), (10259, 'S18_2432', 30, 49.22, 10), (10259, 'S18_3232', 27, 135.47, 8), (10259, 'S18_4600', 41, 113.82, 13), (10259, 'S24_1444', 28, 46.82, 1), (10259, 'S24_2300', 47, 112.46, 9), (10259, 'S24_2840', 31, 33.24, 5), (10259, 'S32_1268', 45, 86.68, 11), (10259, 'S32_2509', 40, 43.83, 6), (10259, 'S50_1392', 29, 105.33, 2), (10260, 'S12_1108', 46, 228.58, 5), (10260, 'S12_3148', 30, 170.72, 6), (10260, 'S12_3891', 44, 171.29, 4), (10260, 'S18_3140', 32, 131.13, 1), (10260, 'S18_3259', 29, 88.74, 3), (10260, 'S18_4027', 23, 155.11, 8), (10260, 'S24_4048', 23, 102.90, 10), (10260, 'S32_3207', 27, 57.17, 9), (10260, 'S50_1514', 21, 55.65, 7), (10260, 'S700_1938', 33, 85.74, 2), (10261, 'S10_4757', 27, 125.12, 1), (10261, 'S18_4522', 20, 89.53, 9), (10261, 'S24_2011', 36, 125.35, 8), (10261, 'S24_3151', 22, 91.17, 3), (10261, 'S700_1138', 34, 62.00, 4), (10261, 'S700_2610', 44, 68.67, 2), (10261, 'S700_3505', 25, 88.15, 5), (10261, 'S700_3962', 50, 81.43, 6), (10261, 'S72_3212', 29, 50.78, 7), (10262, 'S18_1662', 49, 134.04, 9), (10262, 'S18_3029', 32, 84.30, 15), (10262, 'S18_3856', 34, 120.69, 14), (10262, 'S24_1785', 34, 97.38, 1), (10262, 'S24_2841', 24, 67.14, 10), (10262, 'S24_3420', 46, 70.35, 11), (10262, 'S24_3816', 49, 87.21, 16), (10262, 'S24_3949', 48, 61.42, 8), (10262, 'S32_4289', 40, 79.11, 2), (10262, 'S50_1341', 49, 37.97, 3), (10262, 'S700_1691', 40, 84.03, 4), (10262, 'S700_2047', 44, 94.14, 13), (10262, 'S700_2466', 33, 90.75, 6), (10262, 'S700_3167', 27, 76.00, 5), (10262, 'S700_4002', 35, 71.07, 7), (10262, 'S72_1253', 21, 57.11, 12), (10263, 'S10_1678', 34, 108.14, 2), (10263, 'S10_2016', 40, 111.80, 5), (10263, 'S10_4698', 41, 203.34, 4), (10263, 'S12_2823', 48, 134.05, 1), (10263, 'S18_2581', 33, 86.17, 10), (10263, 'S18_2625', 34, 58.75, 6), (10263, 'S24_1578', 42, 102.56, 3), (10263, 'S24_2000', 37, 62.46, 7), (10263, 'S24_4278', 24, 75.35, 11), (10263, 'S32_1374', 31, 79.91, 8), (10263, 'S700_2834', 47, 116.28, 9), (10264, 'S18_3782', 48, 54.71, 3), (10264, 'S18_4721', 20, 120.53, 2), (10264, 'S24_2360', 37, 65.10, 6), (10264, 'S24_4620', 47, 83.27, 1), (10264, 'S32_2206', 20, 32.59, 4), (10264, 'S32_4485', 34, 97.97, 7), (10264, 'S50_4713', 47, 89.50, 5), (10265, 'S18_3278', 45, 86.84, 2), (10265, 'S18_3482', 49, 171.98, 1), (10266, 'S12_1099', 44, 208.19, 14), (10266, 'S12_3380', 22, 111.57, 12), (10266, 'S12_3990', 35, 76.61, 15), (10266, 'S12_4675', 40, 111.71, 11), (10266, 'S18_1129', 21, 120.31, 6), (10266, 'S18_1589', 36, 144.35, 2), (10266, 'S18_1889', 33, 74.69, 10), (10266, 'S18_1984', 49, 126.60, 5), (10266, 'S18_2870', 20, 141.24, 3), (10266, 'S18_3232', 29, 165.95, 7), (10266, 'S18_3685', 33, 152.58, 4), (10266, 'S24_1628', 28, 48.30, 1), (10266, 'S24_2972', 34, 40.40, 8), (10266, 'S24_3371', 47, 62.45, 13), (10266, 'S24_3856', 24, 122.17, 9), (10267, 'S18_4933', 36, 75.55, 1), (10267, 'S24_1046', 40, 80.10, 5), (10267, 'S24_2766', 38, 87.24, 3), (10267, 'S24_2887', 43, 108.04, 2), (10267, 'S24_3191', 44, 96.74, 4), (10267, 'S24_3432', 43, 118.86, 6), (10268, 'S18_1342', 49, 117.12, 3), (10268, 'S18_1367', 26, 64.69, 2), (10268, 'S18_1749', 34, 161.50, 10), (10268, 'S18_2248', 31, 49.04, 9), (10268, 'S18_2325', 50, 105.52, 7), (10268, 'S18_2795', 35, 151.88, 4), (10268, 'S18_3320', 39, 89.29, 1), (10268, 'S18_4409', 35, 87.43, 11), (10268, 'S24_1937', 33, 38.83, 6), (10268, 'S24_2022', 40, 46.14, 5), (10268, 'S24_3969', 30, 40.62, 8), (10269, 'S18_2957', 32, 63.08, 1), (10269, 'S24_4258', 48, 97.39, 2), (10270, 'S10_1949', 21, 233.59, 9), (10270, 'S10_4962', 32, 134.44, 2), (10270, 'S12_1666', 28, 146.24, 6), (10270, 'S18_1097', 43, 96.84, 8), (10270, 'S18_2949', 31, 96.24, 10), (10270, 'S18_3136', 38, 125.66, 11), (10270, 'S18_4600', 38, 141.66, 3), (10270, 'S18_4668', 44, 58.36, 7), (10270, 'S32_1268', 32, 85.72, 1), (10270, 'S32_3522', 21, 63.35, 5), (10270, 'S700_2824', 46, 88.00, 4), (10271, 'S12_4473', 31, 97.17, 5), (10271, 'S18_2238', 50, 183.38, 4), (10271, 'S18_2319', 50, 101.87, 8), (10271, 'S18_2432', 25, 69.28, 11), (10271, 'S18_3232', 20, 196.43, 9), (10271, 'S24_1444', 45, 64.74, 2), (10271, 'S24_2300', 43, 130.35, 10), (10271, 'S24_2840', 38, 41.72, 6), (10271, 'S24_4048', 22, 139.57, 1), (10271, 'S32_2509', 35, 47.62, 7), (10271, 'S50_1392', 34, 98.39, 3), (10272, 'S12_1108', 35, 166.24, 2), (10272, 'S12_3148', 27, 158.63, 3), (10272, 'S12_3891', 39, 204.16, 1), (10272, 'S18_4027', 25, 149.36, 5), (10272, 'S32_3207', 45, 64.63, 6), (10272, 'S50_1514', 43, 56.82, 4), (10273, 'S10_4757', 30, 116.96, 4), (10273, 'S18_3029', 34, 98.06, 2), (10273, 'S18_3140', 40, 125.66, 13), (10273, 'S18_3259', 47, 115.97, 15), (10273, 'S18_3856', 50, 85.75, 1), (10273, 'S18_4522', 33, 71.09, 12), (10273, 'S24_2011', 22, 126.58, 11), (10273, 'S24_3151', 27, 103.56, 6), (10273, 'S24_3816', 48, 83.02, 3), (10273, 'S700_1138', 21, 65.34, 7), (10273, 'S700_1938', 21, 102.20, 14), (10273, 'S700_2610', 42, 62.16, 5), (10273, 'S700_3505', 40, 86.15, 8), (10273, 'S700_3962', 26, 114.21, 9), (10273, 'S72_3212', 37, 45.86, 10), (10274, 'S18_1662', 41, 164.00, 1), (10274, 'S24_2841', 40, 65.08, 2), (10274, 'S24_3420', 24, 72.33, 3), (10274, 'S700_2047', 24, 90.52, 5), (10274, 'S72_1253', 32, 58.60, 4), (10275, 'S10_1678', 45, 92.83, 1), (10275, 'S10_2016', 22, 132.02, 4), (10275, 'S10_4698', 36, 191.72, 3), (10275, 'S18_2581', 35, 90.39, 9), (10275, 'S18_2625', 37, 63.60, 5), (10275, 'S24_1578', 21, 102.56, 2), (10275, 'S24_1785', 25, 95.20, 11), (10275, 'S24_2000', 30, 79.98, 6), (10275, 'S24_3949', 41, 81.89, 18), (10275, 'S24_4278', 27, 62.31, 10), (10275, 'S32_1374', 23, 81.91, 7), (10275, 'S32_4289', 28, 63.97, 12), (10275, 'S50_1341', 38, 45.39, 13), (10275, 'S700_1691', 32, 89.51, 14), (10275, 'S700_2466', 39, 114.68, 16), (10275, 'S700_2834', 48, 132.89, 8), (10275, 'S700_3167', 43, 73.60, 15), (10275, 'S700_4002', 31, 72.55, 17), (10276, 'S12_1099', 50, 192.62, 3), (10276, 'S12_2823', 43, 120.50, 14), (10276, 'S12_3380', 47, 116.27, 1), (10276, 'S12_3990', 38, 83.79, 4), (10276, 'S18_3278', 38, 69.96, 6), (10276, 'S18_3482', 30, 130.82, 5), (10276, 'S18_3782', 33, 50.36, 9), (10276, 'S18_4721', 48, 119.04, 8), (10276, 'S24_2360', 46, 75.49, 12), (10276, 'S24_3371', 20, 61.23, 2), (10276, 'S24_4620', 48, 75.18, 7), (10276, 'S32_2206', 27, 36.61, 10), (10276, 'S32_4485', 38, 113.28, 13), (10276, 'S50_4713', 21, 70.78, 11), (10277, 'S12_4675', 28, 111.71, 1), (10278, 'S18_1129', 34, 137.29, 6), (10278, 'S18_1589', 23, 113.24, 2), (10278, 'S18_1889', 29, 90.86, 10), (10278, 'S18_1984', 29, 129.45, 5), (10278, 'S18_2870', 39, 110.88, 3), (10278, 'S18_3232', 42, 152.41, 7), (10278, 'S18_3685', 31, 132.80, 4), (10278, 'S24_1628', 35, 45.28, 1), (10278, 'S24_2972', 31, 38.89, 8), (10278, 'S24_3856', 25, 126.39, 9), (10279, 'S18_4933', 26, 60.58, 1), (10279, 'S24_1046', 32, 74.96, 5), (10279, 'S24_2766', 49, 79.97, 3), (10279, 'S24_2887', 48, 116.27, 2), (10279, 'S24_3191', 33, 71.06, 4), (10279, 'S24_3432', 48, 128.50, 6), (10280, 'S10_1949', 34, 235.73, 2), (10280, 'S18_1097', 24, 116.67, 1), (10280, 'S18_1342', 50, 104.79, 9), (10280, 'S18_1367', 27, 57.68, 8), (10280, 'S18_1749', 26, 141.10, 16), (10280, 'S18_2248', 25, 62.96, 15), (10280, 'S18_2325', 37, 128.40, 13), (10280, 'S18_2795', 22, 202.50, 10), (10280, 'S18_2949', 46, 111.44, 3), (10280, 'S18_2957', 43, 68.71, 5), (10280, 'S18_3136', 29, 103.67, 4), (10280, 'S18_3320', 34, 102.19, 7), (10280, 'S18_4409', 35, 105.83, 17), (10280, 'S24_1937', 20, 28.88, 12), (10280, 'S24_2022', 45, 47.49, 11), (10280, 'S24_3969', 33, 41.85, 14), (10280, 'S24_4258', 21, 78.89, 6), (10281, 'S10_4962', 44, 159.56, 9), (10281, 'S12_1666', 25, 117.54, 13), (10281, 'S12_4473', 41, 127.98, 1), (10281, 'S18_2319', 48, 120.28, 4), (10281, 'S18_2432', 29, 57.73, 7), (10281, 'S18_3232', 25, 167.65, 5), (10281, 'S18_4600', 25, 99.29, 10), (10281, 'S18_4668', 44, 59.87, 14), (10281, 'S24_2300', 25, 111.18, 6), (10281, 'S24_2840', 20, 40.66, 2), (10281, 'S32_1268', 29, 82.83, 8), (10281, 'S32_2509', 31, 55.19, 3), (10281, 'S32_3522', 36, 77.57, 12), (10281, 'S700_2824', 27, 85.98, 11), (10282, 'S12_1108', 41, 172.47, 5), (10282, 'S12_3148', 27, 161.66, 6), (10282, 'S12_3891', 24, 157.45, 4), (10282, 'S18_2238', 23, 140.81, 13), (10282, 'S18_3140', 43, 155.71, 1), (10282, 'S18_3259', 36, 115.97, 3), (10282, 'S18_4027', 31, 150.80, 8), (10282, 'S24_1444', 29, 46.82, 11), (10282, 'S24_4048', 39, 123.01, 10), (10282, 'S32_3207', 36, 59.65, 9), (10282, 'S50_1392', 38, 113.44, 12), (10282, 'S50_1514', 37, 66.78, 7), (10282, 'S700_1938', 43, 86.61, 2), (10283, 'S10_4757', 25, 119.68, 6), (10283, 'S18_3029', 21, 98.06, 4), (10283, 'S18_3856', 46, 125.99, 3), (10283, 'S18_4522', 34, 105.32, 14), (10283, 'S24_2011', 42, 126.58, 13), (10283, 'S24_3151', 34, 92.94, 8), (10283, 'S24_3816', 33, 72.96, 5), (10283, 'S700_1138', 45, 78.67, 9), (10283, 'S700_2047', 20, 94.14, 2), (10283, 'S700_2610', 47, 65.77, 7), (10283, 'S700_3505', 22, 88.15, 10), (10283, 'S700_3962', 38, 89.38, 11), (10283, 'S72_1253', 43, 57.61, 1), (10283, 'S72_3212', 33, 51.32, 12), (10284, 'S18_1662', 45, 127.73, 11), (10284, 'S18_2581', 31, 71.81, 1), (10284, 'S24_1785', 22, 105.04, 3), (10284, 'S24_2841', 30, 73.99, 12), (10284, 'S24_3420', 39, 71.67, 13), (10284, 'S24_3949', 21, 55.96, 10), (10284, 'S24_4278', 21, 71.00, 2), (10284, 'S32_4289', 50, 81.86, 4), (10284, 'S50_1341', 33, 51.93, 5), (10284, 'S700_1691', 24, 83.12, 6), (10284, 'S700_2466', 45, 101.71, 8), (10284, 'S700_3167', 25, 69.60, 7), (10284, 'S700_4002', 32, 64.41, 9), (10285, 'S10_1678', 36, 113.88, 6), (10285, 'S10_2016', 47, 137.97, 9), (10285, 'S10_4698', 27, 201.41, 8), (10285, 'S12_2823', 49, 140.08, 5), (10285, 'S18_2625', 20, 49.06, 10), (10285, 'S24_1578', 34, 109.32, 7), (10285, 'S24_2000', 39, 70.08, 11), (10285, 'S24_2360', 38, 59.56, 3), (10285, 'S32_1374', 37, 98.89, 12), (10285, 'S32_2206', 37, 41.03, 1), (10285, 'S32_4485', 26, 100.01, 4), (10285, 'S50_4713', 39, 78.92, 2), (10285, 'S700_2834', 45, 119.84, 13), (10286, 'S18_3782', 38, 57.20, 1), (10287, 'S12_1099', 21, 163.44, 12), (10287, 'S12_3380', 45, 105.70, 10), (10287, 'S12_3990', 41, 69.43, 13), (10287, 'S12_4675', 23, 116.31, 9), (10287, 'S18_1129', 41, 158.52, 4), (10287, 'S18_1889', 44, 82.39, 8), (10287, 'S18_1984', 24, 146.52, 3), (10287, 'S18_2870', 44, 114.84, 1), (10287, 'S18_3232', 36, 162.57, 5), (10287, 'S18_3278', 43, 70.76, 15), (10287, 'S18_3482', 40, 169.04, 14), (10287, 'S18_3685', 27, 159.65, 2), (10287, 'S18_4721', 34, 126.48, 17), (10287, 'S24_2972', 36, 39.65, 6), (10287, 'S24_3371', 20, 67.97, 11), (10287, 'S24_3856', 36, 119.37, 7), (10287, 'S24_4620', 40, 88.12, 16), (10288, 'S18_1589', 20, 146.84, 14), (10288, 'S18_1749', 32, 183.60, 5), (10288, 'S18_2248', 28, 61.75, 4), (10288, 'S18_2325', 31, 123.32, 2), (10288, 'S18_4409', 35, 80.99, 6), (10288, 'S18_4933', 23, 73.41, 7), (10288, 'S24_1046', 36, 66.14, 11), (10288, 'S24_1628', 50, 52.32, 13), (10288, 'S24_1937', 29, 38.17, 1), (10288, 'S24_2766', 35, 80.87, 9), (10288, 'S24_2887', 48, 136.23, 8), (10288, 'S24_3191', 34, 68.49, 10), (10288, 'S24_3432', 41, 118.86, 12), (10288, 'S24_3969', 33, 40.62, 3), (10289, 'S18_1342', 38, 120.21, 2), (10289, 'S18_1367', 24, 56.07, 1), (10289, 'S18_2795', 43, 192.38, 3), (10289, 'S24_2022', 45, 48.38, 4), (10290, 'S18_3320', 26, 96.23, 2), (10290, 'S24_4258', 45, 114.92, 1), (10291, 'S10_1949', 37, 192.87, 11), (10291, 'S10_4962', 30, 128.53, 4), (10291, 'S12_1666', 41, 155.80, 8), (10291, 'S18_1097', 41, 114.34, 10), (10291, 'S18_2432', 26, 57.73, 2), (10291, 'S18_2949', 47, 121.57, 12), (10291, 'S18_2957', 37, 50.59, 14), (10291, 'S18_3136', 23, 124.62, 13), (10291, 'S18_4600', 48, 110.18, 5), (10291, 'S18_4668', 29, 51.82, 9), (10291, 'S24_2300', 48, 112.46, 1), (10291, 'S32_1268', 26, 83.79, 3), (10291, 'S32_3522', 32, 71.75, 7), (10291, 'S700_2824', 28, 116.32, 6), (10292, 'S12_4473', 21, 105.47, 8), (10292, 'S18_2238', 26, 175.19, 7), (10292, 'S18_2319', 41, 110.46, 11), (10292, 'S18_3232', 21, 135.47, 12), (10292, 'S18_4027', 44, 162.29, 2), (10292, 'S24_1444', 40, 53.75, 5), (10292, 'S24_2840', 39, 30.06, 9), (10292, 'S24_4048', 27, 141.94, 4), (10292, 'S32_2509', 50, 46.53, 10), (10292, 'S32_3207', 31, 67.73, 3), (10292, 'S50_1392', 41, 121.54, 6), (10292, 'S50_1514', 35, 55.07, 1), (10293, 'S12_1108', 46, 182.86, 8), (10293, 'S12_3148', 24, 176.76, 9), (10293, 'S12_3891', 45, 183.40, 7), (10293, 'S18_3140', 24, 117.47, 4), (10293, 'S18_3259', 22, 109.92, 6), (10293, 'S18_4522', 49, 100.94, 3), (10293, 'S24_2011', 21, 140.09, 2), (10293, 'S700_1938', 29, 71.89, 5), (10293, 'S72_3212', 32, 60.06, 1), (10294, 'S700_3962', 45, 104.28, 1), (10295, 'S10_4757', 24, 142.80, 1), (10295, 'S24_3151', 46, 84.97, 3), (10295, 'S700_1138', 26, 75.34, 4), (10295, 'S700_2610', 44, 58.55, 2), (10295, 'S700_3505', 34, 102.17, 5), (10296, 'S18_1662', 36, 157.69, 7), (10296, 'S18_3029', 21, 96.34, 13), (10296, 'S18_3856', 22, 84.70, 12), (10296, 'S24_2841', 21, 71.25, 8), (10296, 'S24_3420', 31, 53.92, 9), (10296, 'S24_3816', 22, 77.15, 14), (10296, 'S24_3949', 32, 71.65, 6), (10296, 'S50_1341', 26, 48.44, 1), (10296, 'S700_1691', 42, 102.30, 2), (10296, 'S700_2047', 34, 102.29, 11), (10296, 'S700_2466', 24, 101.71, 4), (10296, 'S700_3167', 22, 80.80, 3), (10296, 'S700_4002', 47, 86.62, 5), (10296, 'S72_1253', 21, 45.19, 10), (10297, 'S18_2581', 25, 82.79, 4), (10297, 'S24_1785', 32, 126.93, 6), (10297, 'S24_2000', 32, 65.51, 1), (10297, 'S24_4278', 23, 72.45, 5), (10297, 'S32_1374', 26, 109.88, 2), (10297, 'S32_4289', 28, 79.80, 7), (10297, 'S700_2834', 35, 113.90, 3), (10298, 'S10_2016', 39, 96.34, 1), (10298, 'S18_2625', 32, 48.46, 2), (10299, 'S10_1678', 23, 112.93, 9), (10299, 'S10_4698', 29, 230.46, 11), (10299, 'S12_2823', 24, 173.21, 8), (10299, 'S18_3782', 39, 55.95, 3), (10299, 'S18_4721', 49, 162.19, 2), (10299, 'S24_1578', 47, 116.08, 10), (10299, 'S24_2360', 33, 66.49, 6), (10299, 'S24_4620', 32, 80.84, 1), (10299, 'S32_2206', 24, 42.24, 4), (10299, 'S32_4485', 38, 115.32, 7), (10299, 'S50_4713', 44, 80.55, 5), (10300, 'S12_1099', 33, 167.33, 5), (10300, 'S12_3380', 29, 137.40, 3), (10300, 'S12_3990', 22, 76.61, 6), (10300, 'S12_4675', 23, 122.07, 2), (10300, 'S18_1889', 41, 92.40, 1), (10300, 'S18_3278', 49, 78.80, 8), (10300, 'S18_3482', 23, 164.63, 7), (10300, 'S24_3371', 31, 58.78, 4), (10301, 'S18_1129', 37, 159.94, 8), (10301, 'S18_1589', 32, 107.02, 4), (10301, 'S18_1984', 47, 159.32, 7), (10301, 'S18_2870', 22, 146.52, 5), (10301, 'S18_3232', 23, 174.42, 9), (10301, 'S18_3685', 39, 165.30, 6), (10301, 'S24_1046', 27, 72.02, 1), (10301, 'S24_1628', 22, 51.32, 3), (10301, 'S24_2972', 48, 34.36, 10), (10301, 'S24_3432', 22, 96.37, 2), (10301, 'S24_3856', 50, 154.47, 11), (10302, 'S18_1749', 43, 170.00, 1), (10302, 'S18_4409', 38, 89.27, 2), (10302, 'S18_4933', 23, 72.70, 3), (10302, 'S24_2766', 49, 108.14, 5), (10302, 'S24_2887', 45, 123.31, 4), (10302, 'S24_3191', 48, 74.48, 6), (10303, 'S18_2248', 46, 49.04, 2), (10303, 'S24_3969', 24, 40.21, 1), (10304, 'S10_1949', 47, 216.44, 6), (10304, 'S12_1666', 39, 164.00, 3), (10304, 'S18_1097', 46, 98.00, 5), (10304, 'S18_1342', 37, 95.55, 13), (10304, 'S18_1367', 37, 48.52, 12), (10304, 'S18_2325', 24, 101.70, 17), (10304, 'S18_2795', 20, 178.88, 14), (10304, 'S18_2949', 46, 100.30, 7), (10304, 'S18_2957', 24, 64.96, 9), (10304, 'S18_3136', 26, 85.87, 8), (10304, 'S18_3320', 38, 104.17, 11), (10304, 'S18_4668', 34, 49.30, 4), (10304, 'S24_1937', 23, 30.20, 16), (10304, 'S24_2022', 44, 39.42, 15), (10304, 'S24_4258', 33, 101.29, 10), (10304, 'S32_3522', 36, 73.04, 2), (10304, 'S700_2824', 40, 105.20, 1), (10305, 'S10_4962', 38, 175.81, 13), (10305, 'S12_4473', 38, 125.61, 5), (10305, 'S18_2238', 27, 145.72, 4), (10305, 'S18_2319', 36, 133.78, 8), (10305, 'S18_2432', 41, 53.48, 11), (10305, 'S18_3232', 37, 201.51, 9), (10305, 'S18_4600', 22, 99.29, 14), (10305, 'S24_1444', 45, 61.85, 2), (10305, 'S24_2300', 24, 132.90, 10), (10305, 'S24_2840', 48, 31.47, 6), (10305, 'S24_4048', 36, 128.93, 1), (10305, 'S32_1268', 28, 112.68, 12), (10305, 'S32_2509', 40, 57.90, 7), (10305, 'S50_1392', 42, 109.96, 3), (10306, 'S12_1108', 31, 211.96, 13), (10306, 'S12_3148', 34, 146.55, 14), (10306, 'S12_3891', 20, 181.67, 12), (10306, 'S18_3140', 32, 117.47, 9), (10306, 'S18_3259', 40, 91.76, 11), (10306, 'S18_4027', 23, 156.55, 16), (10306, 'S18_4522', 39, 90.40, 8), (10306, 'S24_2011', 29, 110.60, 7), (10306, 'S24_3151', 31, 84.08, 2), (10306, 'S32_3207', 46, 50.33, 17), (10306, 'S50_1514', 34, 60.34, 15), (10306, 'S700_1138', 50, 54.00, 3), (10306, 'S700_1938', 38, 91.81, 10), (10306, 'S700_2610', 43, 75.17, 1), (10306, 'S700_3505', 32, 90.15, 4), (10306, 'S700_3962', 30, 117.19, 5), (10306, 'S72_3212', 35, 59.51, 6), (10307, 'S10_4757', 22, 122.40, 9), (10307, 'S18_1662', 39, 189.23, 1), (10307, 'S18_3029', 31, 83.44, 7), (10307, 'S18_3856', 48, 86.81, 6), (10307, 'S24_2841', 25, 75.36, 2), (10307, 'S24_3420', 22, 71.67, 3), (10307, 'S24_3816', 22, 91.41, 8), (10307, 'S700_2047', 34, 97.76, 5), (10307, 'S72_1253', 34, 53.63, 4), (10308, 'S10_2016', 34, 118.94, 2), (10308, 'S10_4698', 20, 228.52, 1), (10308, 'S18_2581', 27, 82.79, 7), (10308, 'S18_2625', 34, 52.09, 3), (10308, 'S24_1785', 31, 112.70, 9), (10308, 'S24_2000', 47, 63.22, 4), (10308, 'S24_3949', 43, 76.43, 16), (10308, 'S24_4278', 44, 83.32, 8), (10308, 'S32_1374', 24, 79.91, 5), (10308, 'S32_4289', 46, 66.04, 10), (10308, 'S50_1341', 47, 43.64, 11), (10308, 'S700_1691', 21, 105.95, 12), (10308, 'S700_2466', 35, 88.75, 14), (10308, 'S700_2834', 31, 129.33, 6), (10308, 'S700_3167', 21, 87.20, 13), (10308, 'S700_4002', 39, 68.11, 15), (10309, 'S10_1678', 41, 107.18, 5), (10309, 'S12_2823', 26, 179.24, 4), (10309, 'S24_1578', 21, 126.22, 6), (10309, 'S24_2360', 24, 56.10, 2), (10309, 'S32_4485', 50, 84.70, 3), (10309, 'S50_4713', 28, 88.68, 1), (10310, 'S12_1099', 33, 210.14, 10), (10310, 'S12_3380', 24, 129.18, 8), (10310, 'S12_3990', 49, 81.40, 11), (10310, 'S12_4675', 25, 100.19, 7), (10310, 'S18_1129', 37, 168.43, 2), (10310, 'S18_1889', 20, 91.63, 6), (10310, 'S18_1984', 24, 143.67, 1), (10310, 'S18_3232', 48, 186.27, 3), (10310, 'S18_3278', 27, 80.41, 13), (10310, 'S18_3482', 49, 127.88, 12), (10310, 'S18_3782', 42, 67.14, 16), (10310, 'S18_4721', 40, 133.92, 15), (10310, 'S24_2972', 33, 41.91, 4), (10310, 'S24_3371', 38, 56.94, 9), (10310, 'S24_3856', 45, 122.17, 5), (10310, 'S24_4620', 49, 97.01, 14), (10310, 'S32_2206', 36, 43.05, 17), (10311, 'S18_1589', 29, 100.80, 9), (10311, 'S18_2870', 43, 122.76, 10), (10311, 'S18_3685', 32, 113.02, 11), (10311, 'S18_4409', 41, 81.91, 1), (10311, 'S18_4933', 25, 66.99, 2), (10311, 'S24_1046', 26, 87.45, 6), (10311, 'S24_1628', 45, 49.30, 8), (10311, 'S24_2766', 28, 93.60, 4), (10311, 'S24_2887', 43, 106.87, 3), (10311, 'S24_3191', 25, 83.04, 5), (10311, 'S24_3432', 46, 92.09, 7), (10312, 'S10_1949', 48, 242.16, 3), (10312, 'S18_1097', 32, 130.67, 2), (10312, 'S18_1342', 43, 89.38, 10), (10312, 'S18_1367', 25, 44.21, 9), (10312, 'S18_1749', 48, 168.30, 17), (10312, 'S18_2248', 30, 61.15, 16), (10312, 'S18_2325', 31, 152.56, 14), (10312, 'S18_2795', 25, 155.25, 11), (10312, 'S18_2949', 37, 100.30, 4), (10312, 'S18_2957', 35, 53.72, 6), (10312, 'S18_3136', 38, 117.29, 5), (10312, 'S18_3320', 33, 107.15, 8), (10312, 'S18_4668', 39, 56.85, 1), (10312, 'S24_1937', 39, 29.54, 13), (10312, 'S24_2022', 23, 37.63, 12), (10312, 'S24_3969', 31, 35.29, 15), (10312, 'S24_4258', 44, 111.02, 7), (10313, 'S10_4962', 40, 166.95, 7), (10313, 'S12_1666', 21, 127.10, 11), (10313, 'S18_2319', 29, 117.82, 2), (10313, 'S18_2432', 34, 52.87, 5), (10313, 'S18_3232', 25, 182.89, 3), (10313, 'S18_4600', 28, 102.92, 8), (10313, 'S24_2300', 42, 132.90, 4), (10313, 'S32_1268', 27, 87.64, 6), (10313, 'S32_2509', 38, 45.45, 1), (10313, 'S32_3522', 34, 56.24, 10), (10313, 'S700_2824', 30, 99.13, 9), (10314, 'S12_1108', 38, 209.88, 5), (10314, 'S12_3148', 46, 138.99, 6), (10314, 'S12_3891', 36, 192.05, 4), (10314, 'S12_4473', 45, 137.46, 14), (10314, 'S18_2238', 42, 137.53, 13), (10314, 'S18_3140', 20, 136.59, 1), (10314, 'S18_3259', 23, 107.90, 3), (10314, 'S18_4027', 29, 145.06, 8), (10314, 'S24_1444', 44, 53.18, 11), (10314, 'S24_2840', 39, 37.13, 15), (10314, 'S24_4048', 38, 105.27, 10), (10314, 'S32_3207', 35, 66.49, 9), (10314, 'S50_1392', 28, 121.54, 12), (10314, 'S50_1514', 38, 61.51, 7), (10314, 'S700_1938', 23, 76.22, 2), (10315, 'S18_4522', 36, 100.06, 7), (10315, 'S24_2011', 35, 120.43, 6), (10315, 'S24_3151', 24, 86.74, 1), (10315, 'S700_1138', 41, 62.00, 2), (10315, 'S700_3505', 31, 86.15, 3), (10315, 'S700_3962', 37, 91.37, 4), (10315, 'S72_3212', 40, 55.69, 5), (10316, 'S10_4757', 33, 125.12, 17), (10316, 'S18_1662', 27, 137.19, 9), (10316, 'S18_3029', 21, 94.62, 15), (10316, 'S18_3856', 47, 86.81, 14), (10316, 'S24_1785', 25, 114.89, 1), (10316, 'S24_2841', 34, 63.71, 10), (10316, 'S24_3420', 47, 76.93, 11), (10316, 'S24_3816', 25, 92.25, 16), (10316, 'S24_3949', 30, 77.79, 8), (10316, 'S32_4289', 24, 59.16, 2), (10316, 'S50_1341', 34, 47.57, 3), (10316, 'S700_1691', 34, 82.21, 4), (10316, 'S700_2047', 45, 93.24, 13), (10316, 'S700_2466', 23, 117.67, 6), (10316, 'S700_2610', 48, 74.45, 18), (10316, 'S700_3167', 48, 75.20, 5), (10316, 'S700_4002', 44, 62.19, 7), (10316, 'S72_1253', 34, 43.70, 12), (10317, 'S24_4278', 35, 83.32, 1), (10318, 'S10_1678', 46, 94.74, 1), (10318, 'S10_2016', 45, 123.70, 4), (10318, 'S10_4698', 37, 207.22, 3), (10318, 'S18_2581', 31, 100.53, 9), (10318, 'S18_2625', 42, 52.70, 5), (10318, 'S24_1578', 48, 134.11, 2), (10318, 'S24_2000', 26, 86.83, 6), (10318, 'S32_1374', 47, 112.88, 7), (10318, 'S700_2834', 50, 142.38, 8), (10319, 'S12_2823', 30, 137.06, 9), (10319, 'S18_3278', 46, 73.98, 1), (10319, 'S18_3782', 44, 59.06, 4), (10319, 'S18_4721', 45, 175.58, 3), (10319, 'S24_2360', 31, 81.73, 7), (10319, 'S24_4620', 43, 85.69, 2), (10319, 'S32_2206', 29, 38.22, 5), (10319, 'S32_4485', 22, 119.40, 8), (10319, 'S50_4713', 45, 77.29, 6), (10320, 'S12_1099', 31, 221.81, 3), (10320, 'S12_3380', 35, 138.58, 1), (10320, 'S12_3990', 38, 73.42, 4), (10320, 'S18_3482', 25, 139.64, 5), (10320, 'S24_3371', 26, 61.23, 2), (10321, 'S12_4675', 24, 124.37, 15), (10321, 'S18_1129', 41, 141.54, 10), (10321, 'S18_1589', 44, 102.04, 6), (10321, 'S18_1889', 37, 78.54, 14), (10321, 'S18_1984', 25, 149.36, 9), (10321, 'S18_2870', 27, 105.60, 7), (10321, 'S18_3232', 33, 172.73, 11), (10321, 'S18_3685', 28, 151.17, 8), (10321, 'S24_1046', 30, 70.55, 3), (10321, 'S24_1628', 48, 42.26, 5), (10321, 'S24_2766', 30, 72.70, 1), (10321, 'S24_2972', 37, 33.23, 12), (10321, 'S24_3191', 39, 84.75, 2), (10321, 'S24_3432', 21, 89.95, 4), (10321, 'S24_3856', 26, 155.88, 13), (10322, 'S10_1949', 40, 150.01, 1), (10322, 'S10_4962', 46, 61.99, 8), (10322, 'S12_1666', 27, 177.19, 9), (10322, 'S18_1097', 22, 102.32, 10), (10322, 'S18_1342', 43, 86.30, 14), (10322, 'S18_1367', 41, 57.68, 5), (10322, 'S18_2325', 50, 250.73, 6), (10322, 'S18_2432', 35, 61.21, 11), (10322, 'S18_2795', 36, 161.04, 2), (10322, 'S18_2949', 33, 106.81, 12), (10322, 'S18_2957', 41, 29.87, 13), (10322, 'S18_3136', 48, 47.04, 7), (10322, 'S24_1937', 20, 131.20, 3), (10322, 'S24_2022', 30, 116.67, 4), (10323, 'S18_3320', 33, 91.27, 2), (10323, 'S18_4600', 47, 131.98, 1), (10324, 'S12_3148', 27, 54.33, 1), (10324, 'S12_4473', 26, 58.38, 7), (10324, 'S18_2238', 47, 153.35, 8), (10324, 'S18_2319', 33, 37.48, 10), (10324, 'S18_3232', 27, 116.87, 12), (10324, 'S18_4027', 49, 109.79, 13), (10324, 'S18_4668', 38, 179.79, 6), (10324, 'S24_1444', 25, 69.16, 14), (10324, 'S24_2300', 31, 123.24, 2), (10324, 'S24_2840', 30, 111.27, 9), (10324, 'S24_4258', 33, 189.93, 3), (10324, 'S32_1268', 20, 98.18, 11), (10324, 'S32_3522', 48, 171.03, 4), (10324, 'S700_2824', 34, 124.95, 5), (10325, 'S10_4757', 47, 64.93, 6), (10325, 'S12_1108', 42, 64.00, 8), (10325, 'S12_3891', 24, 107.65, 1), (10325, 'S18_3140', 24, 69.12, 9), (10325, 'S24_4048', 44, 121.04, 5), (10325, 'S32_2509', 38, 232.74, 3), (10325, 'S32_3207', 28, 192.05, 2), (10325, 'S50_1392', 38, 136.59, 4), (10325, 'S50_1514', 44, 134.84, 7), (10326, 'S18_3259', 32, 118.99, 6), (10326, 'S18_4522', 50, 86.01, 5), (10326, 'S24_2011', 41, 105.69, 4), (10326, 'S24_3151', 41, 85.85, 3), (10326, 'S24_3816', 20, 92.25, 2), (10326, 'S700_1138', 39, 60.00, 1), (10327, 'S18_1662', 25, 112.19, 6), (10327, 'S18_2581', 45, 106.26, 8), (10327, 'S18_3029', 25, 45.86, 5), (10327, 'S700_1938', 20, 173.46, 7), (10327, 'S700_2610', 21, 96.31, 1), (10327, 'S700_3505', 43, 80.00, 2), (10327, 'S700_3962', 37, 86.61, 3), (10327, 'S72_3212', 37, 86.74, 4), (10328, 'S18_3856', 34, 112.22, 6), (10328, 'S24_1785', 47, 87.54, 14), (10328, 'S24_2841', 48, 58.92, 1), (10328, 'S24_3420', 20, 72.98, 2), (10328, 'S24_3949', 35, 76.43, 3), (10328, 'S24_4278', 43, 60.86, 4), (10328, 'S32_4289', 24, 81.17, 5), (10328, 'S50_1341', 34, 51.93, 7), (10328, 'S700_1691', 27, 102.30, 8), (10328, 'S700_2047', 41, 101.38, 9), (10328, 'S700_2466', 37, 108.69, 10), (10328, 'S700_2834', 33, 123.40, 11), (10328, 'S700_3167', 33, 64.00, 13), (10328, 'S700_4002', 39, 85.87, 12), (10329, 'S10_1678', 42, 104.67, 1), (10329, 'S10_2016', 20, 158.80, 2), (10329, 'S10_4698', 26, 225.70, 3), (10329, 'S12_1099', 41, 71.47, 5), (10329, 'S12_2823', 24, 147.61, 6), (10329, 'S12_3380', 46, 83.63, 13), (10329, 'S12_3990', 33, 109.32, 14), (10329, 'S12_4675', 39, 64.74, 15), (10329, 'S18_1889', 29, 101.89, 9), (10329, 'S18_2625', 38, 138.58, 12), (10329, 'S18_3278', 38, 59.10, 10), (10329, 'S24_1578', 30, 87.78, 7), (10329, 'S24_2000', 37, 94.43, 4), (10329, 'S32_1374', 45, 63.91, 11), (10329, 'S72_1253', 44, 86.13, 8), (10330, 'S18_3482', 37, 119.06, 3), (10330, 'S18_3782', 29, 69.63, 2), (10330, 'S18_4721', 50, 122.02, 4), (10330, 'S24_2360', 42, 81.03, 1), (10331, 'S18_1129', 46, 139.87, 6), (10331, 'S18_1589', 44, 110.21, 14), (10331, 'S18_1749', 44, 74.04, 7), (10331, 'S18_1984', 30, 32.47, 8), (10331, 'S18_2870', 26, 64.90, 10), (10331, 'S18_3232', 27, 154.47, 11), (10331, 'S18_3685', 26, 67.91, 12), (10331, 'S24_2972', 27, 42.24, 13), (10331, 'S24_3371', 25, 123.14, 9), (10331, 'S24_3856', 21, 149.33, 1), (10331, 'S24_4620', 41, 139.40, 2), (10331, 'S32_2206', 28, 146.52, 3), (10331, 'S32_4485', 32, 157.08, 4), (10331, 'S50_4713', 20, 182.89, 5), (10332, 'S18_1342', 46, 95.13, 15), (10332, 'S18_1367', 27, 89.89, 16), (10332, 'S18_2248', 38, 84.25, 9), (10332, 'S18_2325', 35, 64.69, 8), (10332, 'S18_2795', 24, 52.67, 1), (10332, 'S18_2957', 26, 114.58, 17), (10332, 'S18_3136', 40, 39.80, 18), (10332, 'S18_4409', 50, 146.20, 2), (10332, 'S18_4933', 21, 165.38, 3), (10332, 'S24_1046', 23, 56.84, 4), (10332, 'S24_1628', 20, 87.96, 5), (10332, 'S24_1937', 45, 81.91, 6), (10332, 'S24_2022', 26, 85.52, 10), (10332, 'S24_2766', 39, 86.72, 7), (10332, 'S24_2887', 44, 42.26, 11), (10332, 'S24_3191', 45, 34.19, 12), (10332, 'S24_3432', 31, 37.18, 13), (10332, 'S24_3969', 41, 77.24, 14), (10333, 'S10_1949', 26, 115.50, 3), (10333, 'S12_1666', 33, 99.21, 6), (10333, 'S18_1097', 29, 40.25, 7), (10333, 'S18_2949', 31, 90.17, 5), (10333, 'S18_3320', 46, 246.45, 2), (10333, 'S18_4668', 24, 79.86, 8), (10333, 'S24_4258', 39, 113.44, 1), (10333, 'S32_3522', 33, 73.69, 4), (10334, 'S10_4962', 26, 122.62, 2), (10334, 'S18_2319', 46, 126.41, 6), (10334, 'S18_2432', 34, 61.38, 1), (10334, 'S18_3232', 20, 143.94, 3), (10334, 'S18_4600', 49, 138.03, 4), (10334, 'S24_2300', 42, 131.62, 5), (10335, 'S24_2840', 33, 37.13, 2), (10335, 'S32_1268', 44, 107.87, 1), (10335, 'S32_2509', 40, 60.60, 3), (10336, 'S12_1108', 33, 57.22, 10), (10336, 'S12_3148', 33, 123.01, 11), (10336, 'S12_3891', 49, 63.38, 1), (10336, 'S12_4473', 38, 167.70, 3), (10336, 'S18_2238', 49, 152.26, 6), (10336, 'S18_3140', 48, 120.38, 12), (10336, 'S18_3259', 21, 106.21, 7), (10336, 'S24_1444', 45, 132.72, 4), (10336, 'S24_4048', 31, 148.99, 5), (10336, 'S32_3207', 31, 84.71, 9), (10336, 'S50_1392', 23, 136.59, 8), (10336, 'S700_2824', 46, 207.80, 2), (10337, 'S10_4757', 25, 48.05, 8), (10337, 'S18_4027', 36, 157.76, 3), (10337, 'S18_4522', 29, 155.11, 2), (10337, 'S24_2011', 29, 71.97, 4), (10337, 'S50_1514', 21, 109.37, 6), (10337, 'S700_1938', 36, 70.30, 9), (10337, 'S700_3505', 31, 89.38, 1), (10337, 'S700_3962', 36, 71.89, 7), (10337, 'S72_3212', 42, 97.16, 5), (10338, 'S18_1662', 41, 137.19, 1), (10338, 'S18_3029', 28, 82.58, 3), (10338, 'S18_3856', 45, 122.81, 2), (10339, 'S10_2016', 40, 68.92, 4), (10339, 'S10_4698', 39, 76.67, 3), (10339, 'S18_2581', 27, 104.10, 2), (10339, 'S18_2625', 30, 62.16, 1), (10339, 'S24_1578', 27, 84.39, 10), (10339, 'S24_1785', 21, 50.65, 7), (10339, 'S24_2841', 55, 112.99, 12), (10339, 'S24_3151', 55, 195.60, 13), (10339, 'S24_3420', 29, 99.69, 14), (10339, 'S24_3816', 42, 59.36, 16), (10339, 'S24_3949', 45, 96.92, 11), (10339, 'S700_1138', 22, 128.02, 5), (10339, 'S700_2047', 55, 71.25, 15), (10339, 'S700_2610', 50, 74.35, 9), (10339, 'S700_4002', 50, 57.86, 8), (10339, 'S72_1253', 27, 76.31, 6), (10340, 'S24_2000', 55, 79.98, 8), (10340, 'S24_4278', 40, 84.77, 1), (10340, 'S32_1374', 55, 117.87, 2), (10340, 'S32_4289', 39, 59.16, 3), (10340, 'S50_1341', 40, 50.62, 4), (10340, 'S700_1691', 30, 88.60, 5), (10340, 'S700_2466', 55, 87.75, 7), (10340, 'S700_2834', 29, 141.19, 6), (10341, 'S10_1678', 41, 188.73, 9), (10341, 'S12_1099', 45, 79.65, 2), (10341, 'S12_2823', 55, 147.61, 8), (10341, 'S12_3380', 44, 95.93, 1), (10341, 'S12_3990', 36, 93.56, 10), (10341, 'S12_4675', 55, 75.20, 7), (10341, 'S24_2360', 32, 103.35, 6), (10341, 'S32_4485', 31, 71.02, 4), (10341, 'S50_4713', 38, 123.22, 3), (10341, 'S700_3167', 34, 107.18, 5), (10342, 'S18_1129', 40, 161.36, 2), (10342, 'S18_1889', 55, 65.45, 1), (10342, 'S18_1984', 22, 143.67, 3), (10342, 'S18_3232', 30, 167.65, 4), (10342, 'S18_3278', 25, 66.74, 5), (10342, 'S18_3482', 55, 119.06, 7), (10342, 'S18_3782', 26, 55.95, 8), (10342, 'S18_4721', 38, 165.17, 11), (10342, 'S24_2972', 39, 40.40, 9), (10342, 'S24_3371', 48, 62.45, 10), (10342, 'S24_3856', 42, 119.37, 6), (10343, 'S18_1589', 36, 162.47, 4), (10343, 'S18_2870', 25, 52.32, 3), (10343, 'S18_3685', 44, 84.88, 2), (10343, 'S24_1628', 27, 36.21, 6), (10343, 'S24_4620', 30, 103.29, 1), (10343, 'S32_2206', 29, 128.04, 5), (10344, 'S18_1749', 45, 170.00, 1), (10344, 'S18_2248', 40, 56.91, 2), (10344, 'S18_2325', 30, 130.94, 3), (10344, 'S18_4409', 21, 104.91, 4), (10344, 'S18_4933', 26, 63.43, 5), (10344, 'S24_1046', 29, 59.53, 7), (10344, 'S24_1937', 20, 35.18, 6), (10345, 'S24_2022', 43, 53.76, 1), (10346, 'S18_1342', 42, 36.11, 3), (10346, 'S24_2766', 25, 115.07, 1), (10346, 'S24_2887', 24, 87.24, 5), (10346, 'S24_3191', 24, 138.58, 2), (10346, 'S24_3432', 26, 95.88, 6), (10346, 'S24_3969', 22, 97.44, 4), (10347, 'S10_1949', 30, 131.49, 1), (10347, 'S10_4962', 27, 164.00, 2), (10347, 'S12_1666', 29, 123.67, 3), (10347, 'S18_1097', 42, 49.60, 5), (10347, 'S18_1367', 21, 58.95, 7), (10347, 'S18_2432', 50, 136.69, 8), (10347, 'S18_2795', 21, 229.30, 6), (10347, 'S18_2949', 48, 100.30, 9), (10347, 'S18_2957', 34, 64.96, 10), (10347, 'S18_3136', 45, 109.96, 11), (10347, 'S18_3320', 26, 102.19, 12), (10347, 'S18_4600', 45, 130.77, 4), (10348, 'S12_1108', 48, 52.36, 8), (10348, 'S12_3148', 47, 102.16, 4), (10348, 'S18_4668', 29, 245.20, 6), (10348, 'S24_2300', 37, 161.66, 1), (10348, 'S24_4258', 39, 50.31, 2), (10348, 'S32_1268', 42, 152.07, 3), (10348, 'S32_3522', 31, 101.29, 5), (10348, 'S700_2824', 32, 82.83, 7), (10349, 'S12_3891', 26, 169.56, 10), (10349, 'S12_4473', 48, 109.02, 9), (10349, 'S18_2238', 38, 176.83, 8), (10349, 'S18_2319', 38, 137.46, 7), (10349, 'S18_3232', 48, 154.10, 6), (10349, 'S18_4027', 34, 129.26, 5), (10349, 'S24_1444', 48, 47.40, 4), (10349, 'S24_2840', 36, 37.13, 3), (10349, 'S24_4048', 23, 138.39, 2), (10349, 'S32_2509', 33, 46.53, 1), (10350, 'S10_4757', 26, 75.47, 5), (10350, 'S18_3029', 43, 64.97, 6), (10350, 'S18_3140', 44, 117.98, 1), (10350, 'S18_3259', 41, 93.04, 2), (10350, 'S18_4522', 30, 100.77, 3), (10350, 'S24_2011', 34, 50.33, 7), (10350, 'S24_3151', 30, 100.70, 9), (10350, 'S24_3816', 25, 60.34, 10), (10350, 'S32_3207', 27, 163.20, 14), (10350, 'S50_1392', 31, 71.40, 8), (10350, 'S50_1514', 44, 147.52, 17), (10350, 'S700_1138', 46, 76.67, 11), (10350, 'S700_1938', 28, 104.44, 4), (10350, 'S700_2610', 29, 75.35, 12), (10350, 'S700_3505', 31, 77.34, 13), (10350, 'S700_3962', 25, 114.19, 16), (10350, 'S72_3212', 20, 112.22, 15), (10351, 'S18_1662', 39, 99.52, 1), (10351, 'S18_3856', 20, 168.73, 2), (10351, 'S24_2841', 25, 74.68, 5), (10351, 'S24_3420', 38, 68.38, 4), (10351, 'S24_3949', 34, 59.37, 3), (10352, 'S700_2047', 23, 102.29, 3), (10352, 'S700_2466', 49, 100.72, 2), (10352, 'S700_4002', 22, 75.51, 1), (10352, 'S72_1253', 49, 52.64, 4), (10353, 'S18_2581', 27, 130.21, 1), (10353, 'S24_1785', 28, 71.73, 2), (10353, 'S24_4278', 35, 89.90, 3), (10353, 'S32_1374', 46, 81.17, 5), (10353, 'S32_4289', 40, 44.51, 7), (10353, 'S50_1341', 40, 82.21, 8), (10353, 'S700_1691', 39, 129.33, 9), (10353, 'S700_2834', 48, 68.80, 4), (10353, 'S700_3167', 43, 81.95, 6), (10354, 'S10_1678', 42, 86.13, 6), (10354, 'S10_2016', 20, 104.67, 2), (10354, 'S10_4698', 42, 213.03, 3), (10354, 'S12_1099', 31, 93.28, 9), (10354, 'S12_2823', 35, 182.90, 4), (10354, 'S12_3380', 29, 73.15, 11), (10354, 'S12_3990', 23, 50.88, 12), (10354, 'S12_4675', 28, 86.84, 13), (10354, 'S18_1889', 21, 110.45, 8), (10354, 'S18_2625', 28, 165.68, 10), (10354, 'S18_3278', 36, 82.26, 7), (10354, 'S24_1578', 21, 113.92, 5), (10354, 'S24_2000', 28, 69.43, 1), (10355, 'S18_3482', 23, 138.17, 7), (10355, 'S18_3782', 31, 53.47, 1), (10355, 'S18_4721', 25, 168.14, 2), (10355, 'S24_2360', 41, 70.65, 3), (10355, 'S24_2972', 36, 38.52, 4), (10355, 'S24_3371', 44, 62.45, 6), (10355, 'S24_3856', 32, 165.71, 8), (10355, 'S24_4620', 28, 95.39, 9), (10355, 'S32_2206', 38, 39.83, 10), (10355, 'S32_4485', 40, 108.17, 5), (10356, 'S18_1129', 43, 97.60, 8), (10356, 'S18_1342', 50, 50.18, 9), (10356, 'S18_1367', 22, 72.41, 6), (10356, 'S18_1984', 27, 64.69, 2), (10356, 'S18_2325', 29, 125.18, 3), (10356, 'S18_2795', 30, 148.74, 1), (10356, 'S24_1937', 48, 202.50, 5), (10356, 'S24_2022', 26, 31.86, 7), (10356, 'S50_4713', 26, 151.45, 4), (10357, 'S10_1949', 32, 177.87, 10), (10357, 'S10_4962', 43, 134.44, 9), (10357, 'S12_1666', 49, 121.64, 8), (10357, 'S18_1097', 39, 98.00, 1), (10357, 'S18_2432', 41, 61.99, 7), (10357, 'S18_2949', 41, 87.13, 6), (10357, 'S18_2957', 49, 70.58, 5), (10357, 'S18_3136', 44, 117.29, 4), (10357, 'S18_3320', 25, 104.17, 3), (10357, 'S18_4600', 28, 127.13, 2), (10358, 'S12_3148', 49, 55.34, 5), (10358, 'S12_4473', 42, 64.16, 9), (10358, 'S18_2238', 20, 121.40, 10), (10358, 'S18_2319', 20, 36.42, 11), (10358, 'S18_3232', 32, 93.49, 12), (10358, 'S18_4027', 25, 101.13, 13), (10358, 'S18_4668', 30, 176.76, 8), (10358, 'S24_1444', 44, 60.76, 14), (10358, 'S24_2300', 41, 138.65, 7), (10358, 'S24_2840', 36, 82.94, 4), (10358, 'S24_4258', 41, 167.00, 6), (10358, 'S32_1268', 41, 108.00, 1), (10358, 'S32_3522', 36, 157.49, 2), (10358, 'S700_2824', 27, 139.31, 3), (10359, 'S10_4757', 48, 54.68, 6), (10359, 'S12_1108', 42, 113.44, 8), (10359, 'S12_3891', 49, 62.09, 5), (10359, 'S24_4048', 22, 118.32, 7), (10359, 'S32_2509', 36, 176.63, 3), (10359, 'S32_3207', 22, 195.51, 1), (10359, 'S50_1392', 46, 106.45, 2), (10359, 'S50_1514', 25, 64.93, 4), (10360, 'S18_1662', 50, 58.67, 12), (10360, 'S18_2581', 41, 87.48, 13), (10360, 'S18_3029', 46, 77.34, 14), (10360, 'S18_3140', 29, 175.04, 8), (10360, 'S18_3259', 29, 101.38, 18), (10360, 'S18_3856', 40, 87.15, 15), (10360, 'S18_4522', 40, 86.02, 1), (10360, 'S24_1785', 22, 115.20, 17), (10360, 'S24_2011', 31, 118.83, 2), (10360, 'S24_2841', 49, 56.78, 16), (10360, 'S24_3151', 36, 113.95, 3), (10360, 'S24_3816', 22, 111.16, 4), (10360, 'S700_1138', 32, 100.94, 5), (10360, 'S700_1938', 26, 97.38, 6), (10360, 'S700_2610', 30, 125.35, 7), (10360, 'S700_3505', 35, 65.77, 9), (10360, 'S700_3962', 31, 103.56, 10), (10360, 'S72_3212', 31, 96.44, 11), (10361, 'S10_1678', 20, 72.55, 13), (10361, 'S10_2016', 26, 51.15, 8), (10361, 'S24_3420', 34, 113.88, 6), (10361, 'S24_3949', 26, 142.73, 7), (10361, 'S24_4278', 25, 62.46, 1), (10361, 'S32_4289', 49, 72.33, 2), (10361, 'S50_1341', 33, 82.59, 3), (10361, 'S700_1691', 20, 60.54, 4), (10361, 'S700_2047', 24, 45.39, 14), (10361, 'S700_2466', 26, 105.95, 9), (10361, 'S700_2834', 44, 72.42, 5), (10361, 'S700_3167', 44, 113.68, 10), (10361, 'S700_4002', 35, 122.21, 11), (10361, 'S72_1253', 23, 95.20, 12), (10362, 'S10_4698', 22, 166.55, 4), (10362, 'S12_2823', 22, 176.23, 1), (10362, 'S18_2625', 23, 49.67, 3), (10362, 'S24_1578', 50, 96.92, 2), (10363, 'S12_1099', 33, 85.39, 3), (10363, 'S12_3380', 34, 96.73, 4), (10363, 'S12_3990', 34, 81.62, 5), (10363, 'S12_4675', 46, 88.45, 6), (10363, 'S18_1889', 22, 167.57, 7), (10363, 'S18_3278', 46, 60.30, 10), (10363, 'S18_3482', 24, 172.61, 11), (10363, 'S18_3782', 32, 89.12, 12), (10363, 'S18_4721', 28, 58.18, 13), (10363, 'S24_2000', 21, 171.22, 8), (10363, 'S24_2360', 43, 61.23, 14), (10363, 'S24_3371', 21, 116.56, 15), (10363, 'S24_3856', 31, 94.58, 1), (10363, 'S24_4620', 43, 119.87, 9), (10363, 'S32_1374', 50, 131.53, 2), (10364, 'S32_2206', 48, 48.28, 1), (10365, 'S18_1129', 30, 87.06, 1), (10365, 'S32_4485', 22, 155.69, 3), (10365, 'S50_4713', 44, 113.28, 2), (10366, 'S18_1984', 34, 123.76, 3), (10366, 'S18_2870', 49, 125.40, 2), (10366, 'S18_3232', 34, 184.58, 1), (10367, 'S18_1589', 49, 56.30, 1), (10367, 'S18_1749', 37, 127.13, 3), (10367, 'S18_2248', 45, 197.44, 4), (10367, 'S18_2325', 27, 155.41, 5), (10367, 'S18_2795', 32, 94.79, 7), (10367, 'S18_3685', 46, 104.53, 6), (10367, 'S18_4409', 43, 62.72, 8), (10367, 'S18_4933', 44, 85.25, 9), (10367, 'S24_1046', 21, 60.37, 10), (10367, 'S24_1628', 38, 38.50, 11), (10367, 'S24_1937', 23, 36.29, 13), (10367, 'S24_2022', 28, 30.59, 12), (10367, 'S24_2972', 36, 139.40, 2), (10368, 'S24_2766', 40, 102.68, 2), (10368, 'S24_2887', 31, 136.23, 5), (10368, 'S24_3191', 46, 79.62, 1), (10368, 'S24_3432', 20, 99.58, 4), (10368, 'S24_3969', 46, 37.34, 3), (10369, 'S10_1949', 41, 110.12, 2), (10369, 'S18_1342', 44, 210.01, 8), (10369, 'S18_1367', 32, 98.63, 7), (10369, 'S18_2949', 42, 109.08, 1), (10369, 'S18_2957', 28, 44.21, 6), (10369, 'S18_3136', 21, 94.22, 5), (10369, 'S18_3320', 45, 73.08, 4), (10369, 'S24_4258', 40, 86.92, 3), (10370, 'S10_4962', 35, 65.63, 4), (10370, 'S12_1666', 49, 172.86, 8), (10370, 'S18_1097', 27, 144.87, 1), (10370, 'S18_2319', 22, 179.50, 5), (10370, 'S18_2432', 22, 96.86, 7), (10370, 'S18_3232', 27, 56.85, 9), (10370, 'S18_4600', 29, 57.53, 6), (10370, 'S18_4668', 20, 136.50, 2), (10370, 'S32_3522', 25, 126.41, 3), (10371, 'S12_1108', 32, 111.27, 6), (10371, 'S12_4473', 49, 35.71, 4), (10371, 'S18_2238', 25, 104.09, 7), (10371, 'S24_1444', 25, 97.27, 12), (10371, 'S24_2300', 20, 172.47, 5), (10371, 'S24_2840', 45, 123.24, 8), (10371, 'S24_4048', 28, 50.32, 9), (10371, 'S32_1268', 26, 155.54, 1), (10371, 'S32_2509', 20, 66.47, 2), (10371, 'S32_3207', 30, 99.55, 11), (10371, 'S50_1392', 48, 56.55, 10), (10371, 'S700_2824', 34, 126.51, 3), (10372, 'S12_3148', 40, 146.55, 4), (10372, 'S12_3891', 34, 174.75, 1), (10372, 'S18_3140', 28, 137.96, 3), (10372, 'S18_3259', 25, 84.71, 5), (10372, 'S18_4027', 48, 146.49, 6), (10372, 'S18_4522', 41, 86.89, 7), (10372, 'S24_2011', 37, 105.69, 8), (10372, 'S50_1514', 24, 58.58, 9), (10372, 'S700_1938', 44, 102.20, 2), (10373, 'S10_4757', 39, 103.75, 3), (10373, 'S18_1662', 28, 57.55, 4), (10373, 'S18_3029', 22, 86.74, 5), (10373, 'S18_3856', 50, 60.49, 6), (10373, 'S24_2841', 38, 70.44, 7), (10373, 'S24_3151', 33, 57.32, 12), (10373, 'S24_3420', 46, 66.00, 11), (10373, 'S24_3816', 23, 104.10, 10), (10373, 'S24_3949', 39, 73.00, 13), (10373, 'S700_1138', 44, 105.18, 14), (10373, 'S700_2047', 32, 84.41, 15), (10373, 'S700_2610', 41, 70.33, 16), (10373, 'S700_3505', 34, 96.34, 2), (10373, 'S700_3962', 37, 108.80, 8), (10373, 'S700_4002', 45, 55.62, 17), (10373, 'S72_1253', 25, 64.97, 9), (10373, 'S72_3212', 29, 137.19, 1), (10374, 'S10_2016', 39, 135.59, 5), (10374, 'S10_4698', 22, 174.29, 1), (10374, 'S18_2581', 42, 69.27, 2), (10374, 'S18_2625', 22, 53.30, 4), (10374, 'S24_1578', 38, 110.45, 6), (10374, 'S24_1785', 46, 94.10, 3), (10375, 'S10_1678', 21, 34.91, 12), (10375, 'S12_1099', 45, 76.00, 7), (10375, 'S12_2823', 49, 78.92, 13), (10375, 'S24_2000', 23, 106.23, 9), (10375, 'S24_2360', 20, 102.30, 14), (10375, 'S24_4278', 43, 233.48, 2), (10375, 'S32_1374', 37, 171.71, 3), (10375, 'S32_4289', 44, 82.26, 4), (10375, 'S32_4485', 41, 114.68, 15), (10375, 'S50_1341', 49, 65.80, 5), (10375, 'S50_4713', 49, 110.34, 8), (10375, 'S700_1691', 37, 81.87, 6), (10375, 'S700_2466', 33, 116.87, 1), (10375, 'S700_2834', 25, 66.73, 10), (10375, 'S700_3167', 44, 118.38, 11), (10376, 'S12_3380', 35, 113.92, 1), (10377, 'S12_3990', 24, 67.83, 5), (10377, 'S12_4675', 50, 103.64, 1), (10377, 'S18_1129', 35, 168.43, 2), (10377, 'S18_1889', 31, 67.76, 4), (10377, 'S18_1984', 36, 120.91, 6), (10377, 'S18_3232', 39, 186.27, 3), (10378, 'S18_1589', 34, 42.64, 5), (10378, 'S18_3278', 22, 112.00, 4), (10378, 'S18_3482', 43, 96.49, 10), (10378, 'S18_3782', 28, 164.63, 9), (10378, 'S18_4721', 49, 67.14, 8), (10378, 'S24_2972', 41, 142.85, 7), (10378, 'S24_3371', 46, 41.54, 6), (10378, 'S24_3856', 33, 53.27, 3), (10378, 'S24_4620', 41, 119.37, 2), (10378, 'S32_2206', 40, 82.46, 1), (10379, 'S18_1749', 39, 138.45, 2), (10379, 'S18_2248', 27, 49.30, 1), (10379, 'S18_2870', 29, 176.80, 5), (10379, 'S18_3685', 32, 70.83, 4), (10379, 'S24_1628', 32, 124.08, 3), (10380, 'S18_1342', 27, 93.16, 13), (10380, 'S18_2325', 40, 123.29, 10), (10380, 'S18_2795', 21, 47.18, 8), (10380, 'S18_4409', 32, 105.52, 1), (10380, 'S18_4933', 24, 189.00, 2), (10380, 'S24_1046', 34, 101.23, 3), (10380, 'S24_1937', 32, 70.56, 4), (10380, 'S24_2022', 27, 68.35, 5), (10380, 'S24_2766', 36, 37.50, 6), (10380, 'S24_2887', 44, 36.29, 7), (10380, 'S24_3191', 44, 79.06, 9), (10380, 'S24_3432', 34, 116.27, 11), (10380, 'S24_3969', 43, 95.03, 12), (10381, 'S10_1949', 36, 229.30, 3), (10381, 'S10_4962', 37, 168.42, 6), (10381, 'S12_1666', 20, 147.60, 1), (10381, 'S18_1097', 48, 98.00, 2), (10381, 'S18_1367', 25, 52.83, 9), (10381, 'S18_2432', 35, 48.62, 7), (10381, 'S18_2949', 41, 105.36, 8), (10381, 'S18_2957', 40, 68.08, 4), (10381, 'S18_3136', 35, 122.52, 5), (10382, 'S12_1108', 34, 112.46, 10), (10382, 'S12_3148', 37, 110.05, 11), (10382, 'S12_3891', 34, 95.35, 12), (10382, 'S12_4473', 32, 66.58, 13), (10382, 'S18_2238', 25, 88.00, 5), (10382, 'S18_3320', 50, 178.71, 7), (10382, 'S18_4600', 39, 125.40, 1), (10382, 'S18_4668', 39, 200.70, 2), (10382, 'S24_2300', 20, 132.72, 3), (10382, 'S24_4258', 33, 139.17, 4), (10382, 'S32_1268', 26, 104.17, 6), (10382, 'S32_3522', 48, 141.66, 8), (10382, 'S700_2824', 34, 54.84, 9), (10383, 'S18_2319', 27, 142.37, 11), (10383, 'S18_3140', 24, 61.52, 9), (10383, 'S18_3232', 47, 146.15, 6), (10383, 'S18_3259', 26, 128.48, 12), (10383, 'S18_4027', 38, 140.55, 1), (10383, 'S18_4522', 28, 58.58, 7), (10383, 'S24_1444', 22, 91.76, 2), (10383, 'S24_2840', 40, 152.24, 3), (10383, 'S24_4048', 21, 93.91, 4), (10383, 'S32_2509', 32, 53.18, 5), (10383, 'S32_3207', 44, 36.07, 8), (10383, 'S50_1392', 29, 106.45, 13), (10383, 'S50_1514', 38, 60.06, 10), (10384, 'S10_4757', 34, 142.55, 4), (10384, 'S24_2011', 28, 80.54, 3), (10384, 'S24_3151', 43, 97.87, 2), (10384, 'S700_1938', 49, 130.56, 1), (10385, 'S24_3816', 37, 85.54, 2), (10385, 'S700_1138', 25, 77.34, 1), (10386, 'S18_1662', 25, 54.57, 7), (10386, 'S18_2581', 21, 74.77, 18), (10386, 'S18_3029', 37, 93.01, 5), (10386, 'S18_3856', 22, 57.55, 6), (10386, 'S24_1785', 33, 41.71, 11), (10386, 'S24_2841', 39, 55.96, 1), (10386, 'S24_3420', 35, 63.76, 9), (10386, 'S24_3949', 41, 73.32, 12), (10386, 'S24_4278', 50, 63.34, 8), (10386, 'S700_2047', 29, 85.76, 13), (10386, 'S700_2466', 37, 83.84, 14), (10386, 'S700_2610', 37, 135.61, 10), (10386, 'S700_3167', 32, 94.34, 17), (10386, 'S700_3505', 45, 92.08, 2), (10386, 'S700_3962', 30, 95.48, 3), (10386, 'S700_4002', 44, 86.40, 15), (10386, 'S72_1253', 50, 87.15, 16), (10386, 'S72_3212', 43, 125.99, 4), (10387, 'S32_1374', 44, 94.90, 1), (10388, 'S10_1678', 42, 76.36, 4), (10388, 'S10_2016', 50, 44.51, 5), (10388, 'S10_4698', 21, 86.77, 7), (10388, 'S12_2823', 44, 135.26, 6), (10388, 'S32_4289', 35, 111.97, 8), (10388, 'S50_1341', 27, 118.94, 1), (10388, 'S700_1691', 46, 218.84, 2), (10388, 'S700_2834', 50, 143.09, 3), (10389, 'S12_1099', 26, 99.04, 4), (10389, 'S12_3380', 25, 72.38, 6), (10389, 'S12_3990', 36, 70.26, 7), (10389, 'S12_4675', 47, 111.57, 8), (10389, 'S18_1889', 49, 79.22, 3), (10389, 'S18_2625', 39, 179.00, 5), (10389, 'S24_1578', 45, 102.17, 1), (10389, 'S24_2000', 49, 81.40, 2), (10390, 'S18_1129', 36, 93.77, 14), (10390, 'S18_1984', 34, 43.05, 15), (10390, 'S18_2325', 31, 98.99, 16), (10390, 'S18_2795', 26, 78.11, 7), (10390, 'S18_3278', 40, 137.29, 9), (10390, 'S18_3482', 50, 147.94, 1), (10390, 'S18_3782', 36, 141.11, 2), (10390, 'S18_4721', 49, 140.06, 3), (10390, 'S24_2360', 35, 65.13, 4), (10390, 'S24_2972', 37, 132.29, 5), (10390, 'S24_3371', 46, 52.84, 6), (10390, 'S24_3856', 45, 150.29, 8), (10390, 'S24_4620', 30, 82.42, 10), (10390, 'S32_2206', 41, 44.56, 11), (10390, 'S32_4485', 45, 48.98, 12), (10390, 'S50_4713', 22, 158.69, 13), (10391, 'S10_1949', 24, 100.69, 4), (10391, 'S10_4962', 37, 46.90, 7), (10391, 'S12_1666', 39, 63.20, 9), (10391, 'S18_1097', 29, 85.10, 10), (10391, 'S18_1342', 35, 158.54, 2), (10391, 'S18_1367', 42, 119.00, 3), (10391, 'S18_2432', 44, 38.50, 5), (10391, 'S18_2949', 32, 45.25, 6), (10391, 'S24_1937', 33, 252.87, 8), (10391, 'S24_2022', 24, 168.42, 1), (10392, 'S18_2957', 37, 59.96, 3), (10392, 'S18_3136', 29, 86.92, 2), (10392, 'S18_3320', 36, 112.11, 1), (10393, 'S12_3148', 35, 109.08, 8), (10393, 'S12_4473', 32, 101.13, 10), (10393, 'S18_2238', 20, 69.81, 11), (10393, 'S18_2319', 38, 100.14, 7), (10393, 'S18_4600', 30, 120.86, 9), (10393, 'S18_4668', 44, 110.21, 1), (10393, 'S24_2300', 33, 176.83, 2), (10393, 'S24_4258', 33, 98.18, 3), (10393, 'S32_1268', 38, 145.30, 4), (10393, 'S32_3522', 31, 57.86, 5), (10393, 'S700_2824', 21, 102.23, 6), (10394, 'S18_3232', 22, 152.41, 5), (10394, 'S18_4027', 37, 172.34, 1), (10394, 'S24_1444', 31, 50.29, 2), (10394, 'S24_2840', 46, 38.90, 6), (10394, 'S24_4048', 37, 140.75, 7), (10394, 'S32_2509', 36, 62.77, 3), (10394, 'S32_3207', 30, 60.28, 4), (10395, 'S10_4757', 32, 105.33, 2), (10395, 'S12_1108', 33, 69.12, 1), (10395, 'S50_1392', 46, 123.76, 4), (10395, 'S50_1514', 45, 199.49, 3), (10396, 'S12_3891', 33, 185.13, 3), (10396, 'S18_3140', 33, 159.81, 2), (10396, 'S18_3259', 24, 89.75, 4), (10396, 'S18_4522', 45, 105.32, 5), (10396, 'S24_2011', 49, 116.75, 6), (10396, 'S24_3151', 27, 83.20, 7), (10396, 'S24_3816', 37, 90.57, 8), (10396, 'S700_1138', 39, 66.67, 1), (10397, 'S700_1938', 32, 80.55, 5), (10397, 'S700_2610', 22, 66.50, 4), (10397, 'S700_3505', 48, 108.18, 3), (10397, 'S700_3962', 36, 105.27, 2), (10397, 'S72_3212', 34, 62.24, 1), (10398, 'S18_1662', 33, 127.73, 11), (10398, 'S18_2581', 34, 76.88, 15), (10398, 'S18_3029', 28, 72.26, 18), (10398, 'S18_3856', 45, 106.93, 17), (10398, 'S24_1785', 43, 129.12, 16), (10398, 'S24_2841', 28, 57.55, 3), (10398, 'S24_3420', 34, 71.67, 13), (10398, 'S24_3949', 41, 68.24, 2), (10398, 'S24_4278', 45, 78.25, 14), (10398, 'S32_4289', 22, 67.41, 4), (10398, 'S50_1341', 49, 36.66, 5), (10398, 'S700_1691', 47, 87.69, 6), (10398, 'S700_2047', 36, 108.62, 7), (10398, 'S700_2466', 22, 86.76, 8), (10398, 'S700_2834', 23, 122.21, 9), (10398, 'S700_3167', 29, 65.60, 10), (10398, 'S700_4002', 36, 87.36, 12), (10398, 'S72_1253', 34, 40.22, 1), (10399, 'S10_1678', 40, 113.88, 8), (10399, 'S10_2016', 51, 123.70, 7), (10399, 'S10_4698', 22, 158.80, 6), (10399, 'S12_2823', 29, 164.18, 5), (10399, 'S18_2625', 30, 68.44, 4), (10399, 'S24_1578', 57, 105.94, 3), (10399, 'S24_2000', 58, 89.12, 2), (10399, 'S32_1374', 32, 99.89, 1), (10400, 'S10_4757', 64, 150.96, 9), (10400, 'S18_1662', 34, 189.23, 1), (10400, 'S18_3029', 30, 74.84, 7), (10400, 'S18_3856', 58, 125.99, 6), (10400, 'S24_2841', 24, 61.66, 2), (10400, 'S24_3420', 38, 57.20, 3), (10400, 'S24_3816', 42, 72.96, 8), (10400, 'S700_2047', 46, 87.80, 5), (10400, 'S72_1253', 20, 56.12, 4), (10401, 'S18_2581', 42, 76.03, 3), (10401, 'S24_1785', 38, 96.29, 5), (10401, 'S24_3949', 64, 60.05, 12), (10401, 'S24_4278', 52, 81.14, 4), (10401, 'S32_1374', 49, 101.89, 1), (10401, 'S32_4289', 62, 77.73, 6), (10401, 'S50_1341', 56, 35.35, 7), (10401, 'S700_1691', 11, 103.21, 8), (10401, 'S700_2466', 85, 88.75, 10), (10401, 'S700_2834', 21, 96.11, 2), (10401, 'S700_3167', 77, 92.00, 9), (10401, 'S700_4002', 28, 72.55, 11), (10402, 'S10_2016', 45, 129.64, 1), (10402, 'S18_2625', 55, 55.72, 2), (10402, 'S24_2000', 59, 87.60, 3), (10403, 'S10_1678', 24, 101.44, 7), (10403, 'S10_4698', 66, 180.10, 9), (10403, 'S12_2823', 66, 131.04, 6), (10403, 'S18_3782', 36, 52.22, 1), (10403, 'S24_1578', 46, 114.95, 8), (10403, 'S24_2360', 27, 79.65, 4), (10403, 'S32_2206', 30, 40.23, 2), (10403, 'S32_4485', 45, 115.32, 5), (10403, 'S50_4713', 31, 68.34, 3), (10404, 'S12_1099', 64, 206.24, 3), (10404, 'S12_3380', 43, 109.22, 1), (10404, 'S12_3990', 77, 74.21, 4), (10404, 'S18_3278', 90, 73.17, 6), (10404, 'S18_3482', 28, 133.76, 5), (10404, 'S18_4721', 48, 144.34, 8), (10404, 'S24_3371', 49, 62.45, 2), (10404, 'S24_4620', 48, 93.77, 7), (10405, 'S12_4675', 97, 93.28, 5), (10405, 'S18_1889', 61, 73.92, 4), (10405, 'S18_3232', 55, 150.71, 1), (10405, 'S24_2972', 47, 44.56, 2), (10405, 'S24_3856', 76, 154.47, 3), (10406, 'S18_1129', 61, 137.29, 3), (10406, 'S18_1984', 48, 149.36, 2), (10406, 'S18_3685', 65, 161.06, 1), (10407, 'S18_1589', 59, 119.46, 11), (10407, 'S18_1749', 76, 185.30, 2), (10407, 'S18_2248', 42, 72.65, 1), (10407, 'S18_2870', 41, 155.76, 12), (10407, 'S18_4409', 6, 90.19, 3), (10407, 'S18_4933', 66, 66.99, 4), (10407, 'S24_1046', 26, 76.43, 8), (10407, 'S24_1628', 64, 40.25, 10), (10407, 'S24_2766', 76, 94.50, 6), (10407, 'S24_2887', 59, 98.65, 5), (10407, 'S24_3191', 13, 81.33, 7), (10407, 'S24_3432', 43, 86.73, 9), (10408, 'S24_3969', 15, 36.93, 1), (10409, 'S18_2325', 6, 130.94, 2), (10409, 'S24_1937', 61, 29.54, 1), (10410, 'S18_1342', 65, 117.12, 7), (10410, 'S18_1367', 44, 58.22, 6), (10410, 'S18_2795', 56, 138.38, 8), (10410, 'S18_2949', 47, 117.52, 1), (10410, 'S18_2957', 53, 58.09, 3), (10410, 'S18_3136', 34, 115.19, 2), (10410, 'S18_3320', 44, 84.33, 5), (10410, 'S24_2022', 31, 45.25, 9), (10410, 'S24_4258', 50, 86.68, 4), (10411, 'S10_1949', 23, 180.01, 9), (10411, 'S10_4962', 27, 163.99, 2), (10411, 'S12_1666', 40, 155.80, 6), (10411, 'S18_1097', 27, 119.00, 8), (10411, 'S18_4600', 46, 113.82, 3), (10411, 'S18_4668', 35, 59.87, 7), (10411, 'S32_1268', 26, 111.72, 1), (10411, 'S32_3522', 27, 69.16, 5), (10411, 'S700_2824', 34, 105.20, 4), (10412, 'S12_4473', 54, 110.21, 5), (10412, 'S18_2238', 41, 163.73, 4), (10412, 'S18_2319', 56, 98.18, 8), (10412, 'S18_2432', 47, 61.99, 11), (10412, 'S18_3232', 60, 198.13, 9), (10412, 'S24_1444', 21, 52.60, 2), (10412, 'S24_2300', 70, 121.40, 10), (10412, 'S24_2840', 30, 36.07, 6), (10412, 'S24_4048', 31, 137.20, 1), (10412, 'S32_2509', 19, 48.70, 7), (10412, 'S50_1392', 26, 133.11, 3), (10413, 'S12_1108', 36, 241.05, 2), (10413, 'S12_3148', 47, 175.25, 3), (10413, 'S12_3891', 22, 153.99, 1), (10413, 'S18_4027', 49, 140.75, 5), (10413, 'S32_3207', 24, 49.71, 6), (10413, 'S50_1514', 51, 63.85, 4), (10414, 'S10_4757', 19, 145.52, 3), (10414, 'S18_3029', 44, 73.98, 1), (10414, 'S18_3140', 41, 118.83, 12), (10414, 'S18_3259', 48, 121.01, 14), (10414, 'S18_4522', 16, 75.48, 11), (10414, 'S24_2011', 23, 145.01, 10), (10414, 'S24_3151', 60, 101.79, 5), (10414, 'S24_3816', 51, 76.31, 2), (10414, 'S700_1138', 37, 71.34, 6), (10414, 'S700_1938', 34, 103.93, 13), (10414, 'S700_2610', 31, 75.89, 4), (10414, 'S700_3505', 28, 108.18, 7), (10414, 'S700_3962', 27, 90.37, 8), (10414, 'S72_3212', 47, 65.52, 9), (10415, 'S18_3856', 51, 121.75, 5), (10415, 'S24_2841', 21, 67.82, 1), (10415, 'S24_3420', 18, 69.70, 2), (10415, 'S700_2047', 32, 95.95, 4), (10415, 'S72_1253', 42, 57.61, 3), (10416, 'S18_1662', 24, 181.34, 14), (10416, 'S18_2581', 15, 98.84, 4), (10416, 'S24_1785', 47, 88.63, 6), (10416, 'S24_2000', 32, 87.60, 1), (10416, 'S24_3949', 18, 75.06, 13), (10416, 'S24_4278', 48, 74.62, 5), (10416, 'S32_1374', 45, 105.88, 2), (10416, 'S32_4289', 26, 61.22, 7), (10416, 'S50_1341', 37, 51.93, 8), (10416, 'S700_1691', 23, 91.34, 9), (10416, 'S700_2466', 22, 111.69, 11), (10416, 'S700_2834', 41, 137.63, 3), (10416, 'S700_3167', 39, 67.20, 10), (10416, 'S700_4002', 43, 62.19, 12), (10417, 'S10_1678', 66, 113.88, 2), (10417, 'S10_2016', 45, 130.83, 5), (10417, 'S10_4698', 56, 164.61, 4), (10417, 'S12_2823', 21, 164.18, 1), (10417, 'S18_2625', 36, 61.18, 6), (10417, 'S24_1578', 35, 101.43, 3), (10418, 'S18_3278', 16, 76.39, 2), (10418, 'S18_3482', 27, 164.63, 1), (10418, 'S18_3782', 33, 52.84, 5), (10418, 'S18_4721', 28, 136.90, 4), (10418, 'S24_2360', 52, 65.80, 8), (10418, 'S24_4620', 10, 87.31, 3), (10418, 'S32_2206', 43, 48.28, 6), (10418, 'S32_4485', 50, 113.28, 9), (10418, 'S50_4713', 40, 72.41, 7), (10419, 'S12_1099', 12, 163.44, 13), (10419, 'S12_3380', 10, 109.22, 11), (10419, 'S12_3990', 34, 90.17, 14), (10419, 'S12_4675', 32, 119.77, 10), (10419, 'S18_1129', 38, 117.48, 5), (10419, 'S18_1589', 37, 140.62, 1), (10419, 'S18_1889', 39, 83.93, 9), (10419, 'S18_1984', 34, 135.14, 4), (10419, 'S18_2870', 55, 139.92, 2), (10419, 'S18_3232', 35, 169.34, 6), (10419, 'S18_3685', 43, 129.98, 3), (10419, 'S24_2972', 15, 42.67, 7), (10419, 'S24_3371', 55, 52.66, 12), (10419, 'S24_3856', 70, 132.00, 8), (10420, 'S18_1749', 37, 142.80, 5), (10420, 'S18_2248', 36, 63.57, 4), (10420, 'S18_2325', 45, 110.60, 2), (10420, 'S18_4409', 66, 92.95, 6), (10420, 'S18_4933', 36, 57.73, 7), (10420, 'S24_1046', 60, 64.67, 11), (10420, 'S24_1628', 37, 60.37, 13), (10420, 'S24_1937', 45, 26.88, 1), (10420, 'S24_2766', 39, 100.87, 9), (10420, 'S24_2887', 55, 96.30, 8), (10420, 'S24_3191', 35, 96.74, 10), (10420, 'S24_3432', 26, 100.66, 12), (10420, 'S24_3969', 15, 43.49, 3), (10421, 'S18_2795', 35, 155.25, 1), (10421, 'S24_2022', 40, 45.70, 2), (10422, 'S18_1342', 51, 95.55, 2), (10422, 'S18_1367', 25, 51.75, 1), (10423, 'S18_2949', 10, 88.14, 1), (10423, 'S18_2957', 31, 53.72, 3), (10423, 'S18_3136', 21, 84.82, 2), (10423, 'S18_3320', 21, 89.29, 5), (10423, 'S24_4258', 28, 78.89, 4), (10424, 'S10_1949', 50, 240.02, 6), (10424, 'S12_1666', 49, 162.64, 3), (10424, 'S18_1097', 54, 133.00, 5), (10424, 'S18_4668', 26, 59.87, 4), (10424, 'S32_3522', 44, 61.41, 2), (10424, 'S700_2824', 46, 80.92, 1), (10425, 'S10_4962', 38, 155.13, 12), (10425, 'S12_4473', 33, 142.20, 4), (10425, 'S18_2238', 28, 189.93, 3), (10425, 'S18_2319', 38, 99.41, 7), (10425, 'S18_2432', 19, 49.22, 10), (10425, 'S18_3232', 28, 135.47, 8), (10425, 'S18_4600', 38, 113.82, 13), (10425, 'S24_1444', 55, 46.82, 1), (10425, 'S24_2300', 49, 112.46, 9), (10425, 'S24_2840', 31, 33.24, 5), (10425, 'S32_1268', 41, 86.68, 11), (10425, 'S32_2509', 11, 43.83, 6), (10425, 'S50_1392', 18, 105.33, 2);
zvorygin/graphql-over-sql
graphql-it/src/main/resources/data/07_order_detail.sql
SQL
mit
116,307
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the LICENSE * file in the root directory of this source tree. * */ /* * THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN * VAIN. * * @generated */ #pragma once #include <array> #include <folly/Range.h> #include <folly/dynamic.h> namespace facebook { namespace memcache { struct MemcacheRouterStatsConfig { static constexpr size_t kNumRequestGroups = 19; static constexpr std::array<folly::StringPiece, 1 * kNumRequestGroups> sumStatNames{{folly::StringPiece("cmd_add_count"), folly::StringPiece("cmd_append_count"), folly::StringPiece("cmd_cas_count"), folly::StringPiece("cmd_decr_count"), folly::StringPiece("cmd_delete_count"), folly::StringPiece("cmd_flushall_count"), folly::StringPiece("cmd_flushre_count"), folly::StringPiece("cmd_gat_count"), folly::StringPiece("cmd_gats_count"), folly::StringPiece("cmd_get_count"), folly::StringPiece("cmd_gets_count"), folly::StringPiece("cmd_incr_count"), folly::StringPiece("cmd_lease_get_count"), folly::StringPiece("cmd_lease_set_count"), folly::StringPiece("cmd_metaget_count"), folly::StringPiece("cmd_prepend_count"), folly::StringPiece("cmd_replace_count"), folly::StringPiece("cmd_set_count"), folly::StringPiece("cmd_touch_count")}}; static constexpr std::array<folly::StringPiece, 3 * kNumRequestGroups> rateStatNames{{folly::StringPiece("cmd_add"), folly::StringPiece("cmd_append"), folly::StringPiece("cmd_cas"), folly::StringPiece("cmd_decr"), folly::StringPiece("cmd_delete"), folly::StringPiece("cmd_flushall"), folly::StringPiece("cmd_flushre"), folly::StringPiece("cmd_gat"), folly::StringPiece("cmd_gats"), folly::StringPiece("cmd_get"), folly::StringPiece("cmd_gets"), folly::StringPiece("cmd_incr"), folly::StringPiece("cmd_lease_get"), folly::StringPiece("cmd_lease_set"), folly::StringPiece("cmd_metaget"), folly::StringPiece("cmd_prepend"), folly::StringPiece("cmd_replace"), folly::StringPiece("cmd_set"), folly::StringPiece("cmd_touch"), folly::StringPiece("cmd_add_out"), folly::StringPiece("cmd_append_out"), folly::StringPiece("cmd_cas_out"), folly::StringPiece("cmd_decr_out"), folly::StringPiece("cmd_delete_out"), folly::StringPiece("cmd_flushall_out"), folly::StringPiece("cmd_flushre_out"), folly::StringPiece("cmd_gat_out"), folly::StringPiece("cmd_gats_out"), folly::StringPiece("cmd_get_out"), folly::StringPiece("cmd_gets_out"), folly::StringPiece("cmd_incr_out"), folly::StringPiece("cmd_lease_get_out"), folly::StringPiece("cmd_lease_set_out"), folly::StringPiece("cmd_metaget_out"), folly::StringPiece("cmd_prepend_out"), folly::StringPiece("cmd_replace_out"), folly::StringPiece("cmd_set_out"), folly::StringPiece("cmd_touch_out"), folly::StringPiece("cmd_add_out_all"), folly::StringPiece("cmd_append_out_all"), folly::StringPiece("cmd_cas_out_all"), folly::StringPiece("cmd_decr_out_all"), folly::StringPiece("cmd_delete_out_all"), folly::StringPiece("cmd_flushall_out_all"), folly::StringPiece("cmd_flushre_out_all"), folly::StringPiece("cmd_gat_out_all"), folly::StringPiece("cmd_gats_out_all"), folly::StringPiece("cmd_get_out_all"), folly::StringPiece("cmd_gets_out_all"), folly::StringPiece("cmd_incr_out_all"), folly::StringPiece("cmd_lease_get_out_all"), folly::StringPiece("cmd_lease_set_out_all"), folly::StringPiece("cmd_metaget_out_all"), folly::StringPiece("cmd_prepend_out_all"), folly::StringPiece("cmd_replace_out_all"), folly::StringPiece("cmd_set_out_all"), folly::StringPiece("cmd_touch_out_all")}}; template <class Request> static constexpr size_t getStatGroup(); }; template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McAddRequest>() { return 0; // stat group 'add' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McAppendRequest>() { return 1; // stat group 'append' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McCasRequest>() { return 2; // stat group 'cas' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McDecrRequest>() { return 3; // stat group 'decr' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McDeleteRequest>() { return 4; // stat group 'delete' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McFlushAllRequest>() { return 5; // stat group 'flushall' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McFlushReRequest>() { return 6; // stat group 'flushre' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McGatRequest>() { return 7; // stat group 'gat' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McGatsRequest>() { return 8; // stat group 'gats' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McGetRequest>() { return 9; // stat group 'get' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McGetsRequest>() { return 10; // stat group 'gets' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McIncrRequest>() { return 11; // stat group 'incr' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McLeaseGetRequest>() { return 12; // stat group 'lease_get' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McLeaseSetRequest>() { return 13; // stat group 'lease_set' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McMetagetRequest>() { return 14; // stat group 'metaget' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McPrependRequest>() { return 15; // stat group 'prepend' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McReplaceRequest>() { return 16; // stat group 'replace' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McSetRequest>() { return 17; // stat group 'set' } template <> inline constexpr size_t MemcacheRouterStatsConfig::getStatGroup<McTouchRequest>() { return 18; // stat group 'touch' } } // namespace memcache } // namespace facebook
facebook/mcrouter
mcrouter/lib/network/gen/MemcacheRouterStats.h
C
mit
7,797
from django.apps import AppConfig class MemosConfig(AppConfig): name = 'memos'
a-kirin/Dockerfiles
sample01/web/sample01/memos/apps.py
Python
mit
85