text
stringlengths 2
100k
| meta
dict |
---|---|
/* luatexcallbackids.h
Copyright 2012 Taco Hoekwater <[email protected]>
This file is part of LuaTeX.
LuaTeX is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version.
LuaTeX is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
#ifndef LUATEXCALLBACKIDS_H
#define LUATEXCALLBACKIDS_H
typedef enum {
find_write_file_callback = 1,
find_output_file_callback,
find_image_file_callback,
find_format_file_callback,
find_read_file_callback, open_read_file_callback,
find_vf_file_callback, read_vf_file_callback,
find_data_file_callback, read_data_file_callback,
find_font_file_callback, read_font_file_callback,
find_map_file_callback, read_map_file_callback,
find_enc_file_callback, read_enc_file_callback,
find_type1_file_callback, read_type1_file_callback,
find_truetype_file_callback, read_truetype_file_callback,
find_opentype_file_callback, read_opentype_file_callback,
find_cidmap_file_callback, read_cidmap_file_callback,
find_pk_file_callback, read_pk_file_callback,
show_error_hook_callback,
process_input_buffer_callback, process_output_buffer_callback,
process_jobname_callback,
start_page_number_callback, stop_page_number_callback,
start_run_callback, stop_run_callback,
define_font_callback,
pre_output_filter_callback,
buildpage_filter_callback,
hpack_filter_callback, vpack_filter_callback,
glyph_not_found_callback,
glyph_info_callback,
hyphenate_callback,
ligaturing_callback,
kerning_callback,
pre_linebreak_filter_callback,
linebreak_filter_callback,
post_linebreak_filter_callback,
append_to_vlist_filter_callback,
mlist_to_hlist_callback,
finish_pdffile_callback,
finish_pdfpage_callback,
pre_dump_callback,
start_file_callback, stop_file_callback,
show_error_message_callback, show_lua_error_hook_callback,
show_warning_message_callback,
hpack_quality_callback, vpack_quality_callback,
process_rule_callback,
insert_local_par_callback,
contribute_filter_callback,
call_edit_callback,
build_page_insert_callback,
glyph_stream_provider_callback,
font_descriptor_objnum_provider_callback,
finish_synctex_callback,
wrapup_run_callback,
new_graf_callback,
page_order_index_callback,
make_extensible_callback,
process_pdf_image_content_callback,
total_callbacks,
} callback_callback_types;
/* lcallbacklib.c */
extern int callback_set[];
# define callback_defined(a) callback_set[a]
/* # define callback_defined(a) debug_callback_defined(a) */
extern int lua_active;
extern int debug_callback_defined(int i);
extern int run_callback(int i, const char *values, ...);
extern int run_saved_callback(int i, const char *name, const char *values, ...);
extern int run_and_save_callback(int i, const char *values, ...);
extern void destroy_saved_callback(int i);
extern void get_saved_lua_boolean(int i, const char *name, boolean * target);
extern void get_saved_lua_number(int i, const char *name, int *target);
extern void get_saved_lua_string(int i, const char *name, char **target);
extern void get_lua_boolean(const char *table, const char *name, boolean * target);
extern void get_lua_number(const char *table, const char *name, int *target);
extern void get_lua_string(const char *table, const char *name, char **target);
extern char *get_lua_name(int i);
/* texfileio.c */
extern char *luatex_find_file(const char *s, int callback_index);
extern int readbinfile(FILE * f, unsigned char **b, int *s);
#define filetype_unknown 0
#define filetype_tex 1
#define filetype_map 2
#define filetype_image 3
#define filetype_subset 4
#define filetype_font 5
static const char *const filetypes_left[] = { "?", "(", "{", "<", "<", "<<" } ;
static const char *const filetypes_right[] = { "?", ")", "}", ">", ">", ">>" } ;
#define report_start_file(left,name) do { \
if (tracefilenames) { \
int report_id = callback_defined(start_file_callback); \
if (report_id == 0) { \
if (left == 1) { \
/* we only do this for traditional name reporting, normally name is iname */ \
if (term_offset + strlen(name) > max_print_line - 2) \
print_ln(); \
else if ((term_offset > 0) || (file_offset > 0)) \
print_char(' '); \
tex_printf("%s", filetypes_left[left]); \
tprint_file_name(NULL, (unsigned char *) name, NULL); \
} else { \
tex_printf("%s", filetypes_left[left]); \
tex_printf("%s", (unsigned char *) name); \
} \
} else { \
/* (void) run_callback(report_id, "dS->",left,(unsigned char *) fullnameoffile); */ \
(void) run_callback(report_id, "dS->",left,name); \
} \
} \
} while (0)
#define report_stop_file(right) do { \
if (tracefilenames) { \
int report_id = callback_defined(stop_file_callback); \
if (report_id == 0) { \
tex_printf("%s", filetypes_right[right]); \
} else { \
(void) run_callback(report_id, "d->",right); \
} \
} \
} while (0)
#endif
#define normal_page_filter(A) lua_node_filter_s(buildpage_filter_callback,lua_key_index(A))
#define checked_page_filter(A) if (!output_active) lua_node_filter_s(buildpage_filter_callback,lua_key_index(A))
#define checked_break_filter(A) if (!output_active) lua_node_filter_s(contribute_filter_callback,lua_key_index(A))
| {
"pile_set_name": "Github"
} |
// Package logfmt implements utilities to marshal and unmarshal data in the
// logfmt format. The logfmt format records key/value pairs in a way that
// balances readability for humans and simplicity of computer parsing. It is
// most commonly used as a more human friendly alternative to JSON for
// structured logging.
package logfmt
| {
"pile_set_name": "Github"
} |
<?php
namespace Kunstmaan\RedirectBundle\AdminList;
use Doctrine\ORM\EntityManager;
use Kunstmaan\AdminBundle\Helper\DomainConfigurationInterface;
use Kunstmaan\AdminBundle\Helper\Security\Acl\AclHelper;
use Kunstmaan\AdminListBundle\AdminList\Configurator\AbstractDoctrineORMAdminListConfigurator;
use Kunstmaan\AdminListBundle\AdminList\FilterType\ORM;
use Kunstmaan\RedirectBundle\Form\RedirectAdminType;
class RedirectAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator
{
/**
* @var DomainConfigurationInterface
*/
private $domainConfiguration;
/**
* @param EntityManager $em The entity manager
* @param AclHelper $aclHelper The acl helper
* @param DomainConfigurationInterface $domainConfiguration
*/
public function __construct(EntityManager $em, AclHelper $aclHelper = null, DomainConfigurationInterface $domainConfiguration)
{
parent::__construct($em, $aclHelper);
$this->domainConfiguration = $domainConfiguration;
$this->setAdminType(RedirectAdminType::class);
$this->setAdminTypeOptions(['domainConfiguration' => $domainConfiguration]);
}
/**
* Configure the visible columns
*/
public function buildFields()
{
if ($this->domainConfiguration->isMultiDomainHost()) {
$this->addField('domain', 'redirect.adminlist.header.domain', true);
}
$this->addField('origin', 'redirect.adminlist.header.origin', true);
$this->addField('target', 'redirect.adminlist.header.target', true);
$this->addField('permanent', 'redirect.adminlist.header.permanent', true);
$this->addField('note', 'redirect.adminlist.header.note', true);
}
/**
* Build filters for admin list
*/
public function buildFilters()
{
if ($this->domainConfiguration->isMultiDomainHost()) {
$hosts = $this->domainConfiguration->getHosts();
$domains = array_combine($hosts, $hosts);
$domains = array_merge(array('' => 'redirect.all'), $domains);
$this->addFilter('domain', new ORM\EnumerationFilterType('domain'), 'redirect.adminlist.filter.domain', $domains);
}
$this->addFilter('origin', new ORM\StringFilterType('origin'), 'redirect.adminlist.filter.origin');
$this->addFilter('target', new ORM\StringFilterType('target'), 'redirect.adminlist.filter.target');
$this->addFilter('permanent', new ORM\BooleanFilterType('permanent'), 'redirect.adminlist.filter.permanent');
$this->addFilter('note', new ORM\StringFilterType('note'), 'redirect.adminlist.filter.note');
}
/**
* @param array|object $item The item
* @param string $columnName The column name
*
* @return string
*/
public function getValue($item, $columnName)
{
if ($columnName == 'domain' && !$item->getDomain()) {
return 'All domains';
}
return parent::getValue($item, $columnName);
}
/**
* Get bundle name
*
* @return string
*/
public function getBundleName()
{
return 'KunstmaanRedirectBundle';
}
/**
* Get entity name
*
* @return string
*/
public function getEntityName()
{
return 'Redirect';
}
}
| {
"pile_set_name": "Github"
} |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_AUTODIFF_MODULE
#define EIGEN_AUTODIFF_MODULE
namespace Eigen {
/**
* \defgroup AutoDiff_Module Auto Diff module
*
* This module features forward automatic differentation via a simple
* templated scalar type wrapper AutoDiffScalar.
*
* Warning : this should NOT be confused with numerical differentiation, which
* is a different method and has its own module in Eigen : \ref NumericalDiff_Module.
*
* \code
* #include <unsupported/Eigen/AutoDiff>
* \endcode
*/
//@{
}
#include "src/AutoDiff/AutoDiffScalar.h"
// #include "src/AutoDiff/AutoDiffVector.h"
#include "src/AutoDiff/AutoDiffJacobian.h"
namespace Eigen {
//@}
}
#endif // EIGEN_AUTODIFF_MODULE
| {
"pile_set_name": "Github"
} |
{
"storyOrder": [
"clouds",
"australia_fires_2019_2020",
"dust_storms_overview_2019",
"hurricane_dorian_september_2019",
"fires_overview_2019",
"sunglint",
"tc_idai_march_2019",
"explore_the_earth_at_night",
"pine_island_glacier_icebergb46_nov_2018",
"camp_fire_november_2018",
"hurricane_florence_september_2018",
"california_british_columbia_wildfires_summer_2018",
"swath_gaps",
"sinabung_volcano_eruption_february_2018",
"hurricane_maria_september_2017"
]
}
| {
"pile_set_name": "Github"
} |
/*!
* FullCalendar v2.2.5 Print Stylesheet
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
/*
* Include this stylesheet on your page to get a more printer-friendly calendar.
* When including this stylesheet, use the media='print' attribute of the <link> tag.
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
*/
.fc {
max-width: 100% !important;
}
/* Global Event Restyling
--------------------------------------------------------------------------------------------------*/
.fc-event {
background: #fff !important;
color: #000 !important;
page-break-inside: avoid;
}
.fc-event .fc-resizer {
display: none;
}
/* Table & Day-Row Restyling
--------------------------------------------------------------------------------------------------*/
th,
td,
hr,
thead,
tbody,
.fc-row {
border-color: #ccc !important;
background: #fff !important;
}
/* kill the overlaid, absolutely-positioned common components */
.fc-bg,
.fc-bgevent-skeleton,
.fc-highlight-skeleton,
.fc-helper-skeleton {
display: none;
}
/* don't force a min-height on rows (for DayGrid) */
.fc tbody .fc-row {
height: auto !important; /* undo height that JS set in distributeHeight */
min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
}
.fc tbody .fc-row .fc-content-skeleton {
position: static; /* undo .fc-rigid */
padding-bottom: 0 !important; /* use a more border-friendly method for this... */
}
.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
}
.fc tbody .fc-row .fc-content-skeleton table {
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
height: 1em;
}
/* Undo month-view event limiting. Display all events and hide the "more" links
--------------------------------------------------------------------------------------------------*/
.fc-more-cell,
.fc-more {
display: none !important;
}
.fc tr.fc-limited {
display: table-row !important;
}
.fc td.fc-limited {
display: table-cell !important;
}
.fc-popover {
display: none; /* never display the "more.." popover in print mode */
}
/* TimeGrid Restyling
--------------------------------------------------------------------------------------------------*/
/* undo the min-height 100% trick used to fill the container's height */
.fc-time-grid {
min-height: 0 !important;
}
/* don't display the side axis at all ("all-day" and time cells) */
.fc-agenda-view .fc-axis {
display: none;
}
/* don't display the horizontal lines */
.fc-slats,
.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
display: none !important; /* important overrides inline declaration */
}
/* let the container that holds the events be naturally positioned and create real height */
.fc-time-grid .fc-content-skeleton {
position: static;
}
/* in case there are no events, we still want some height */
.fc-time-grid .fc-content-skeleton table {
height: 4em;
}
/* kill the horizontal spacing made by the event container. event margins will be done below */
.fc-time-grid .fc-event-container {
margin: 0 !important;
}
/* TimeGrid *Event* Restyling
--------------------------------------------------------------------------------------------------*/
/* naturally position events, vertically stacking them */
.fc-time-grid .fc-event {
position: static !important;
margin: 3px 2px !important;
}
/* for events that continue to a future day, give the bottom border back */
.fc-time-grid .fc-event.fc-not-end {
border-bottom-width: 1px !important;
}
/* indicate the event continues via "..." text */
.fc-time-grid .fc-event.fc-not-end:after {
content: "...";
}
/* for events that are continuations from previous days, give the top border back */
.fc-time-grid .fc-event.fc-not-start {
border-top-width: 1px !important;
}
/* indicate the event is a continuation via "..." text */
.fc-time-grid .fc-event.fc-not-start:before {
content: "...";
}
/* time */
/* undo a previous declaration and let the time text span to a second line */
.fc-time-grid .fc-event .fc-time {
white-space: normal !important;
}
/* hide the the time that is normally displayed... */
.fc-time-grid .fc-event .fc-time span {
display: none;
}
/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
.fc-time-grid .fc-event .fc-time:after {
content: attr(data-full);
}
/* Vertical Scroller & Containers
--------------------------------------------------------------------------------------------------*/
/* kill the scrollbars and allow natural height */
.fc-scroller,
.fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */
.fc-time-grid-container { /* */
overflow: visible !important;
height: auto !important;
}
/* kill the horizontal border/padding used to compensate for scrollbars */
.fc-row {
border: 0 !important;
margin: 0 !important;
}
/* Button Controls
--------------------------------------------------------------------------------------------------*/
.fc-button-group,
.fc button {
display: none; /* don't display any button-related controls */
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FE6E76FA-26D4-4011-8301-EDE68862A9F5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Registry</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Registry.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> | {
"pile_set_name": "Github"
} |
Aborted_clients 0
Aborted_connects 0
Binlog_cache_disk_use 0
Binlog_cache_use 0
Binlog_stmt_cache_disk_use 0
Binlog_stmt_cache_use 0
Bytes_received 197237
Bytes_sent 2689375
Com_admin_commands 0
Com_assign_to_keycache 0
Com_alter_db 0
Com_alter_db_upgrade 0
Com_alter_event 0
Com_alter_function 0
Com_alter_procedure 0
Com_alter_server 0
Com_alter_table 0
Com_alter_tablespace 0
Com_analyze 0
Com_begin 0
Com_binlog 0
Com_call_procedure 0
Com_change_db 48
Com_change_master 0
Com_check 0
Com_checksum 0
Com_commit 0
Com_create_db 0
Com_create_event 0
Com_create_function 0
Com_create_index 0
Com_create_procedure 0
Com_create_server 0
Com_create_table 0
Com_create_trigger 0
Com_create_udf 0
Com_create_user 0
Com_create_view 0
Com_dealloc_sql 0
Com_delete 0
Com_delete_multi 0
Com_do 0
Com_drop_db 0
Com_drop_event 0
Com_drop_function 0
Com_drop_index 0
Com_drop_procedure 0
Com_drop_server 0
Com_drop_table 0
Com_drop_trigger 0
Com_drop_user 0
Com_drop_view 0
Com_empty_query 0
Com_execute_sql 0
Com_flush 0
Com_grant 0
Com_ha_close 0
Com_ha_open 0
Com_ha_read 0
Com_help 0
Com_insert 0
Com_insert_select 0
Com_install_plugin 2
Com_kill 0
Com_load 0
Com_lock_tables 0
Com_optimize 0
Com_preload_keys 0
Com_prepare_sql 0
Com_purge 0
Com_purge_before_date 0
Com_release_savepoint 0
Com_rename_table 0
Com_rename_user 0
Com_repair 0
Com_replace 0
Com_replace_select 0
Com_reset 0
Com_resignal 0
Com_revoke 0
Com_revoke_all 0
Com_rollback 0
Com_rollback_to_savepoint 0
Com_savepoint 0
Com_select 730
Com_set_option 1341
Com_signal 0
Com_show_authors 0
Com_show_binlog_events 0
Com_show_binlogs 27
Com_show_charsets 0
Com_show_client_statistics 0
Com_show_collations 0
Com_show_contributors 0
Com_show_create_db 5
Com_show_create_event 0
Com_show_create_func 0
Com_show_create_proc 0
Com_show_create_table 423
Com_show_create_trigger 0
Com_show_databases 32
Com_show_engine_logs 0
Com_show_engine_mutex 0
Com_show_engine_status 27
Com_show_events 0
Com_show_errors 0
Com_show_fields 423
Com_show_function_status 24
Com_show_grants 0
Com_show_index_statistics 0
Com_show_keys 0
Com_show_master_status 27
Com_show_open_tables 0
Com_show_plugins 27
Com_show_privileges 0
Com_show_procedure_status 0
Com_show_processlist 27
Com_show_profile 0
Com_show_profiles 0
Com_show_relaylog_events 0
Com_show_slave_hosts 0
Com_show_slave_status 27
Com_show_slave_status_nolock 0
Com_show_status 55
Com_show_storage_engines 0
Com_show_table_statistics 0
Com_show_table_status 423
Com_show_tables 24
Com_show_temporary_tables 0
Com_show_thread_statistics 0
Com_show_triggers 0
Com_show_user_statistics 0
Com_show_variables 28
Com_show_warnings 0
Com_slave_start 0
Com_slave_stop 0
Com_stmt_close 0
Com_stmt_execute 0
Com_stmt_fetch 0
Com_stmt_prepare 0
Com_stmt_reprepare 0
Com_stmt_reset 0
Com_stmt_send_long_data 0
Com_truncate 0
Com_uninstall_plugin 0
Com_unlock_tables 0
Com_update 0
Com_update_multi 0
Com_xa_commit 0
Com_xa_end 0
Com_xa_prepare 0
Com_xa_recover 0
Com_xa_rollback 0
Com_xa_start 0
Compression OFF
Connections 493
Created_tmp_disk_tables 782
Created_tmp_files 5
Created_tmp_tables 2836
Delayed_errors 0
Delayed_insert_threads 0
Delayed_writes 0
Flashcache_enabled OFF
Flush_commands 1
Handler_commit 0
Handler_delete 0
Handler_discover 0
Handler_prepare 0
Handler_read_first 3
Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 37430
Handler_rollback 0
Handler_savepoint 0
Handler_savepoint_rollback 0
Handler_update 0
Handler_write 36070
Innodb_adaptive_hash_cells 553193
Innodb_adaptive_hash_heap_buffers 0
Innodb_adaptive_hash_hash_searches 0
Innodb_adaptive_hash_non_hash_searches 50
Innodb_background_log_sync 128
Innodb_buffer_pool_pages_data 206
Innodb_buffer_pool_pages_dirty 0
Innodb_buffer_pool_pages_flushed 0
Innodb_buffer_pool_pages_LRU_flushed 0
Innodb_buffer_pool_pages_free 7985
Innodb_buffer_pool_pages_made_not_young 0
Innodb_buffer_pool_pages_made_young 0
Innodb_buffer_pool_pages_misc 0
Innodb_buffer_pool_pages_old 0
Innodb_buffer_pool_pages_total 8191
Innodb_buffer_pool_read_ahead_rnd 0
Innodb_buffer_pool_read_ahead 0
Innodb_buffer_pool_read_ahead_evicted 0
Innodb_buffer_pool_read_requests 1047
Innodb_buffer_pool_reads 207
Innodb_buffer_pool_wait_free 0
Innodb_buffer_pool_write_requests 0
Innodb_checkpoint_age 0
Innodb_checkpoint_max_age 7782360
Innodb_checkpoint_target_age 7539162
Innodb_data_fsyncs 3
Innodb_data_pending_fsyncs 0
Innodb_data_pending_reads 0
Innodb_data_pending_writes 0
Innodb_data_read 5574656
Innodb_data_reads 217
Innodb_data_writes 3
Innodb_data_written 1536
Innodb_dblwr_pages_written 0
Innodb_dblwr_writes 0
Innodb_deadlocks 0
Innodb_dict_tables 8
Innodb_have_atomic_builtins OFF
Innodb_history_list_length 30
Innodb_ibuf_discarded_delete_marks 0
Innodb_ibuf_discarded_deletes 0
Innodb_ibuf_discarded_inserts 0
Innodb_ibuf_free_list 0
Innodb_ibuf_merged_delete_marks 0
Innodb_ibuf_merged_deletes 0
Innodb_ibuf_merged_inserts 0
Innodb_ibuf_merges 0
Innodb_ibuf_segment_size 2
Innodb_ibuf_size 1
Innodb_log_waits 0
Innodb_log_write_requests 0
Innodb_log_writes 1
Innodb_lsn_current 1687931
Innodb_lsn_flushed 1687931
Innodb_lsn_last_checkpoint 1687931
Innodb_master_thread_1_second_loops 1
Innodb_master_thread_10_second_loops 0
Innodb_master_thread_background_loops 1
Innodb_master_thread_main_flush_loops 1
Innodb_master_thread_sleeps 1
Innodb_max_trx_id 4864
Innodb_mem_adaptive_hash 2216932
Innodb_mem_dictionary 577764
Innodb_mem_total 137003008
Innodb_mutex_os_waits 0
Innodb_mutex_spin_rounds 0
Innodb_mutex_spin_waits 0
Innodb_oldest_view_low_limit_trx_id 4864
Innodb_os_log_fsyncs 3
Innodb_os_log_pending_fsyncs 0
Innodb_os_log_pending_writes 0
Innodb_os_log_written 512
Innodb_page_size 16384
Innodb_pages_created 0
Innodb_pages_read 206
Innodb_pages_written 0
Innodb_purge_trx_id 4472
Innodb_purge_undo_no 0
Innodb_row_lock_current_waits 0
Innodb_current_row_locks 0
Innodb_row_lock_time 0
Innodb_row_lock_time_avg 0
Innodb_row_lock_time_max 0
Innodb_row_lock_waits 0
Innodb_rows_deleted 0
Innodb_rows_inserted 0
Innodb_rows_read 0
Innodb_rows_updated 0
Innodb_s_lock_os_waits 2
Innodb_s_lock_spin_rounds 60
Innodb_s_lock_spin_waits 2
Innodb_truncated_status_writes 0
Innodb_x_lock_os_waits 0
Innodb_x_lock_spin_rounds 0
Innodb_x_lock_spin_waits 0
Key_blocks_not_flushed 0
Key_blocks_unused 14497
Key_blocks_used 0
Key_read_requests 0
Key_reads 0
Key_write_requests 0
Key_writes 0
Last_query_cost 0.000000
Max_used_connections 1
Not_flushed_delayed_rows 0
Open_files 46
Open_streams 0
Open_table_definitions 40
Open_tables 40
Opened_files 3708
Opened_table_definitions 40
Opened_tables 47
Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
Performance_schema_locker_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
Prepared_stmt_count 0
Qcache_free_blocks 1
Qcache_free_memory 16768384
Qcache_hits 0
Qcache_inserts 0
Qcache_lowmem_prunes 0
Qcache_not_cached 730
Qcache_queries_in_cache 0
Qcache_total_blocks 1
Queries 4239
Questions 4239
Rpl_status AUTH_MASTER
Select_full_join 0
Select_full_range_join 0
Select_range 0
Select_range_check 0
Select_scan 1141
Slave_heartbeat_period 0.000
Slave_open_temp_tables 0
Slave_received_heartbeats 0
Slave_retried_transactions 0
Slave_running OFF
Slow_launch_threads 0
Slow_queries 0
Sort_merge_passes 0
Sort_range 0
Sort_rows 0
Sort_scan 48
Ssl_accept_renegotiates 0
Ssl_accepts 0
Ssl_callback_cache_hits 0
Ssl_cipher
Ssl_cipher_list
Ssl_client_connects 0
Ssl_connect_renegotiates 0
Ssl_ctx_verify_depth 0
Ssl_ctx_verify_mode 0
Ssl_default_timeout 0
Ssl_finished_accepts 0
Ssl_finished_connects 0
Ssl_session_cache_hits 0
Ssl_session_cache_misses 0
Ssl_session_cache_mode NONE
Ssl_session_cache_overflows 0
Ssl_session_cache_size 0
Ssl_session_cache_timeouts 0
Ssl_sessions_reused 0
Ssl_used_session_cache_entries 0
Ssl_verify_depth 0
Ssl_verify_mode 0
Ssl_version
Table_locks_immediate 92
Table_locks_waited 0
Tc_log_max_pages_used 0
Tc_log_page_size 0
Tc_log_page_waits 0
Threads_cached 0
Threads_connected 1
Threads_created 1
Threads_running 1
Uptime 94521
Uptime_since_flush_status 94521
binlog_commits 0
binlog_group_commits 0
| {
"pile_set_name": "Github"
} |
---
archs: [ armv7, armv7s, arm64 ]
platform: ios
install-name: /usr/lib/IOABPLib.dylib
exports:
- archs: [ armv7, armv7s ]
symbols: [ __ZN10IOABPClass10writeAsyncEPKvmPFvPviS2_ES2_,
__ZN10IOABPClass12readRegisterEmPvPm, __ZN10IOABPClass14sendImageAsyncEPKvmPFvPviS2_S2_ES2_,
__ZN10IOABPClass4readEPvPm, __ZN10IOABPClass5startEPKcP11__CFRunLoopU13block_pointerFvjES5_U13block_pointerFv12abpErrorTypemiE,
__ZN10IOABPClass5writeEPKvm, __ZN10IOABPClass9readAsyncEPvmPFvS0_iS0_ES0_,
__ZN10IOABPClass9sendImageEPKvmPm, __ZN17IOABPControlClass13readLogsAsyncEPvmbPFvS0_iS0_ES0_,
__ZN17IOABPControlClass24getLogInternalBufferSizeEPm ]
- archs: [ arm64 ]
symbols: [ __ZN10IOABPClass10writeAsyncEPKvjPFvPviS2_ES2_,
__ZN10IOABPClass12readRegisterEjPvPj, __ZN10IOABPClass14sendImageAsyncEPKvjPFvPviS2_S2_ES2_,
__ZN10IOABPClass4readEPvPj, __ZN10IOABPClass5startEPKcP11__CFRunLoopU13block_pointerFvjES5_U13block_pointerFv12abpErrorTypejiE,
__ZN10IOABPClass5writeEPKvj, __ZN10IOABPClass9readAsyncEPvjPFvS0_iS0_ES0_,
__ZN10IOABPClass9sendImageEPKvjPj, __ZN17IOABPControlClass13readLogsAsyncEPvjbPFvS0_iS0_ES0_,
__ZN17IOABPControlClass24getLogInternalBufferSizeEPj ]
- archs: [ armv7, armv7s, arm64 ]
symbols: [ __Z21getABPDirectionString12abpDirection, __Z21getABPErrorTypeString12abpErrorType,
__Z21getABPLinkStateString12abpLinkState, __Z24getABPAERErrorTypeString15abpAERErrorType,
__Z24getABPBHIRegistersString15abpBHIRegisters,
__Z24getABPBTIRegistersString15abpBTIRegisters,
__ZN10IOABPClass12setAsyncPortEv, __ZN10IOABPClass14clearIteratorsEv,
__ZN10IOABPClass14interfaceAddedEPvj, __ZN10IOABPClass16interfaceRemovedEPvj,
__ZN10IOABPClass17abortChannelAsyncE12abpDirectionPFvPviES1_,
__ZN10IOABPClass17startChannelAsyncE12abpDirectionPFvPviES1_,
__ZN10IOABPClass19setNotificationPortEv, __ZN10IOABPClass20notificationCallbackEPvjjS0_,
__ZN10IOABPClass20notificationFunctionEjjPv, __ZN10IOABPClass21clearNotificationPortEv,
__ZN10IOABPClass22interfaceAddedInternalERKj, __ZN10IOABPClass24interfaceRemovedInternalERKj,
__ZN10IOABPClass25interfaceAddedInternal_nlERKj,
__ZN10IOABPClass25setUpNotificationCallbackEj, __ZN10IOABPClass27cleanUpNotificationCallbackEv,
__ZN10IOABPClass27interfaceRemovedInternal_nlERKj,
__ZN10IOABPClass4openEj, __ZN10IOABPClass4stopEP16dispatch_group_s,
__ZN10IOABPClass5closeEv, __ZN10IOABPClass7open_nlEj,
__ZN10IOABPClass8close_nlEv, __ZN10IOABPClassC1Ev,
__ZN10IOABPClassC2Ev, __ZN10IOABPClassD1Ev, __ZN10IOABPClassD2Ev,
__ZN17IOABPControlClass12setAsyncPortEv, __ZN17IOABPControlClass19setNotificationPortEv,
__ZN17IOABPControlClass21clearNotificationPortEv,
__ZN17IOABPControlClass21getLastKnownBootStageEv,
__ZN17IOABPControlClass23generalInterestCallbackEPvjjS0_,
__ZN17IOABPControlClass23generalInterestFunctionEjPv,
__ZN17IOABPControlClass24setEventNotificationPortEv,
__ZN17IOABPControlClass25registerEventNotificationEP11__CFRunLoopU13block_pointerFv12abpErrorTypePvS3_E,
__ZN17IOABPControlClass26clearEventNotificationPortEv,
__ZN17IOABPControlClass27deregisterEventNotificationEP16dispatch_group_s,
__ZN17IOABPControlClass30deregisterEventNotification_nlEP16dispatch_group_s,
__ZN17IOABPControlClass4openEP11__CFRunLoop, __ZN17IOABPControlClass4stopEv,
__ZN17IOABPControlClass5closeEv, __ZN17IOABPControlClass5startEv,
__ZN17IOABPControlClass7open_nlEP11__CFRunLoop,
__ZN17IOABPControlClass8close_nlEv, __ZN17IOABPControlClassC1Ev,
__ZN17IOABPControlClassC2Ev, __ZN17IOABPControlClassD1Ev,
__ZN17IOABPControlClassD2Ev ]
...
| {
"pile_set_name": "Github"
} |
Monocle.Controls.Magnifier = function (reader) {
var API = { constructor: Monocle.Controls.Magnifier }
var k = API.constants = API.constructor;
var p = API.properties = {
buttons: [],
magnified: false
}
function initialize() {
p.reader = reader;
}
function createControlElements(holder) {
var btn = holder.dom.make('div', 'controls_magnifier_button');
btn.smallA = btn.dom.append('span', 'controls_magnifier_a', { text: 'A' });
btn.largeA = btn.dom.append('span', 'controls_magnifier_A', { text: 'A' });
p.buttons.push(btn);
Monocle.Events.listenForTap(btn, toggleMagnification);
return btn;
}
function toggleMagnification(evt) {
var opacities;
p.magnified = !p.magnified;
if (p.magnified) {
opacities = [0.3, 1];
p.reader.formatting.setFontScale(k.MAGNIFICATION, true);
} else {
opacities = [1, 0.3];
p.reader.formatting.setFontScale(null, true);
}
for (var i = 0; i < p.buttons.length; i++) {
p.buttons[i].smallA.style.opacity = opacities[0];
p.buttons[i].largeA.style.opacity = opacities[1];
}
}
API.createControlElements = createControlElements;
initialize();
return API;
}
Monocle.Controls.Magnifier.MAGNIFICATION = 1.2;
| {
"pile_set_name": "Github"
} |
import React from "react";
import ReactDOM from "react-dom";
import { createRouter, announce } from "@curi/router";
import { browser } from "@hickory/browser";
import { createRouterComponent } from "@curi/react-dom";
import routes from "./routes";
import App from "./components/App";
let router = createRouter(browser, routes, {
sideEffects: [
announce(({ response }) => {
return `Navigated to ${response.location.pathname}`;
})
]
});
let Router = createRouterComponent(router);
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById("root")
);
| {
"pile_set_name": "Github"
} |
## Private packages and organizations
<div class="subtitle"><time datetime="2017-08-28T00:00:00Z">August 28, 2017</time> · by Eric Meadows-Jönsson</div>
We are announcing the addition of private packages on Hex.pm. With private packages you can publish
packages to Hex.pm that only your organization members can access and download. With your organization
you get a repository namespace on Hex.pm so that your private packages will not conflict with packages
in the global, public repository. Go check out the [private package](/docs/private) documentation to
learn exactly how it works.
This will be a paid feature based on the number of members in your organization. We have sponsorships
from Plataformatec and Fastly to help with some of the hosting and CDN costs, but there are still
associated costs with running Hex.pm that hopefully this can help offset. Furthermore, private packages
provide a different set of features and require a private infrastructure that introduces complexity and
costs more to maintain.
Pushing public packages will of course stay free and if you run an open source project
that needs private packages you can contact us to get free access. The revenue from private
packages will help us increase the quality of both public and private services.
This feature is currently in beta and there are still missing features, most notably billing and documentation
hosting on hexdocs.pm. If you want to try it or help beta test private packages, please fill out the
[sign up form](/dashboard/repo-signup) to request access.
Even though we are introducing paid features everything around Hex will stay open source, the only closed
source part will be the billing service.
| {
"pile_set_name": "Github"
} |
// 20.1.2.1 Number.EPSILON
var $export = require('./_export');
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); | {
"pile_set_name": "Github"
} |
{
"id": "host-name-tester",
"hostname": "/myname",
"containers" : [{
"name": "file-tester",
"image": "hyperhq/busybox:latest",
"workdir": "/",
"command": ["hostname"]
}],
"resource": {
"vcpu": 1,
"memory": 512
},
"volumes": [],
"tty": true
}
| {
"pile_set_name": "Github"
} |
<testcase>
<info>
<keywords>
FTP
RETR
LIST
wildcardmatch
ftplistparser
flaky
</keywords>
</info>
#
# Server-side
<reply>
<data>
</data>
</reply>
# Client-side
<client>
<server>
ftp
</server>
<tool>
lib574
</tool>
<name>
FTP wildcard download - changed fnmatch, 2x perform (DOS LIST response)
</name>
<command>
"ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/*.txt"
</command>
</client>
############################################
# Verify data after the test has been "shot"
<verify>
<errorcode>
0
</errorcode>
# THERE SHOULD NOT BE "SIZE"! and one "USER/PASS"
<protocol>
USER anonymous
PASS [email protected]
PWD
CWD fully_simulated
CWD DOS
EPSV
TYPE A
LIST
EPSV
TYPE I
RETR chmod1
EPSV
RETR chmod2
EPSV
RETR chmod3
EPSV
RETR empty_file.dat
EPSV
RETR file.txt
EPSV
RETR someothertext.txt
CWD /
CWD fully_simulated
CWD DOS
EPSV
TYPE A
LIST
EPSV
TYPE I
RETR chmod1
EPSV
RETR chmod2
EPSV
RETR chmod3
EPSV
RETR empty_file.dat
EPSV
RETR file.txt
EPSV
RETR someothertext.txt
QUIT
</protocol>
<stdout>
This file should have permissions 444
This file should have permissions 666
This file should have permissions 777
This is content of file "file.txt"
Some junk ;-) This file does not really exist.
This file should have permissions 444
This file should have permissions 666
This file should have permissions 777
This is content of file "file.txt"
Some junk ;-) This file does not really exist.
</stdout>
</verify>
</testcase>
| {
"pile_set_name": "Github"
} |
# webViewDemo
网易新闻中新闻详情页UIWebView的实现
在UIWebview中,自己控制图片的下载缓存。而不使用webview自带的下载缓存。
| {
"pile_set_name": "Github"
} |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.9
package context
import "context" // standard library's context, as of Go 1.7
// A Context carries a deadline, a cancelation signal, and other values across
// API boundaries.
//
// Context's methods may be called by multiple goroutines simultaneously.
type Context = context.Context
// A CancelFunc tells an operation to abandon its work.
// A CancelFunc does not wait for the work to stop.
// After the first call, subsequent calls to a CancelFunc do nothing.
type CancelFunc = context.CancelFunc
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. 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.
-->
<artifact name="temperature_level_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.temperature_1.0.0.json</file>
</artifact>
| {
"pile_set_name": "Github"
} |
//
//---------------------------------------------------------------------------
//
// Copyright(C) 2003-2018 Christoph Oelckers
// All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see http://www.gnu.org/licenses/
//
//--------------------------------------------------------------------------
//
/*
**
** Draws the sky. Loosely based on the JDoom sky and the ZDoomGL 0.66.2 sky.
**
** for FSkyVertexBuffer::SkyVertex only:
**---------------------------------------------------------------------------
** Copyright 2003 Tim Stump
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** 1. Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**---------------------------------------------------------------------------
**
*/
#include "filesystem.h"
#include "cmdlib.h"
#include "bitmap.h"
#include "skyboxtexture.h"
#include "hw_material.h"
#include "hw_skydome.h"
#include "hw_renderstate.h"
#include "v_video.h"
#include "hwrenderer/data/buffers.h"
// 57 world units roughly represent one sky texel for the glTranslate call.
enum
{
skyoffsetfactor = 57
};
//-----------------------------------------------------------------------------
//
// Shamelessly lifted from Doomsday (written by Jaakko Keränen)
// also shamelessly lifted from ZDoomGL! ;)
//
//-----------------------------------------------------------------------------
CVAR(Float, skyoffset, 0, 0) // for testing
struct SkyColor
{
FTextureID Texture;
std::pair<PalEntry, PalEntry> Colors;
};
static TArray<SkyColor> SkyColors;
std::pair<PalEntry, PalEntry>& R_GetSkyCapColor(FGameTexture* tex)
{
for (auto& sky : SkyColors)
{
if (sky.Texture == tex->GetID()) return sky.Colors;
}
auto itex = tex->GetTexture();
SkyColor sky;
FBitmap bitmap = itex->GetBgraBitmap(nullptr);
int w = bitmap.GetWidth();
int h = bitmap.GetHeight();
const uint32_t* buffer = (const uint32_t*)bitmap.GetPixels();
if (buffer)
{
sky.Colors.first = averageColor((uint32_t*)buffer, w * MIN(30, h), 0);
if (h > 30)
{
sky.Colors.second = averageColor(((uint32_t*)buffer) + (h - 30) * w, w * 30, 0);
}
else sky.Colors.second = sky.Colors.first;
}
sky.Texture = tex->GetID();
SkyColors.Push(sky);
return SkyColors.Last().Colors;
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
FSkyVertexBuffer::FSkyVertexBuffer()
{
CreateDome();
mVertexBuffer = screen->CreateVertexBuffer();
static const FVertexBufferAttribute format[] = {
{ 0, VATTR_VERTEX, VFmt_Float3, (int)myoffsetof(FSkyVertex, x) },
{ 0, VATTR_TEXCOORD, VFmt_Float2, (int)myoffsetof(FSkyVertex, u) },
{ 0, VATTR_COLOR, VFmt_Byte4, (int)myoffsetof(FSkyVertex, color) }
};
mVertexBuffer->SetFormat(1, 3, sizeof(FSkyVertex), format);
mVertexBuffer->SetData(mVertices.Size() * sizeof(FSkyVertex), &mVertices[0], true);
}
FSkyVertexBuffer::~FSkyVertexBuffer()
{
delete mVertexBuffer;
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::SkyVertex(int r, int c, bool zflip)
{
static const FAngle maxSideAngle = 60.f;
static const float scale = 10000.;
FAngle topAngle = (c / (float)mColumns * 360.f);
FAngle sideAngle = maxSideAngle * float(mRows - r) / float(mRows);
float height = sideAngle.Sin();
float realRadius = scale * sideAngle.Cos();
FVector2 pos = topAngle.ToVector(realRadius);
float z = (!zflip) ? scale * height : -scale * height;
FSkyVertex vert;
vert.color = r == 0 ? 0xffffff : 0xffffffff;
// And the texture coordinates.
if (!zflip) // Flipped Y is for the lower hemisphere.
{
vert.u = (-c / (float)mColumns);
vert.v = (r / (float)mRows);
}
else
{
vert.u = (-c / (float)mColumns);
vert.v = 1.0f + ((mRows - r) / (float)mRows);
}
if (r != 4) z += 300;
// And finally the vertex.
vert.x = -pos.X; // Doom mirrors the sky vertically!
vert.y = z - 1.f;
vert.z = pos.Y;
mVertices.Push(vert);
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::CreateSkyHemisphere(int hemi)
{
int r, c;
bool zflip = !!(hemi & SKYHEMI_LOWER);
mPrimStart.Push(mVertices.Size());
for (c = 0; c < mColumns; c++)
{
SkyVertex(1, c, zflip);
}
// The total number of triangles per hemisphere can be calculated
// as follows: rows * columns * 2 + 2 (for the top cap).
for (r = 0; r < mRows; r++)
{
mPrimStart.Push(mVertices.Size());
for (c = 0; c <= mColumns; c++)
{
SkyVertex(r + zflip, c, zflip);
SkyVertex(r + 1 - zflip, c, zflip);
}
}
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::CreateDome()
{
// the first thing we put into the buffer is the fog layer object which is just 4 triangles around the viewpoint.
mVertices.Reserve(12);
mVertices[0].Set(1.0f, 1.0f, -1.0f);
mVertices[1].Set(1.0f, -1.0f, -1.0f);
mVertices[2].Set(-1.0f, 0.0f, -1.0f);
mVertices[3].Set(1.0f, 1.0f, -1.0f);
mVertices[4].Set(1.0f, -1.0f, -1.0f);
mVertices[5].Set(0.0f, 0.0f, 1.0f);
mVertices[6].Set(-1.0f, 0.0f, -1.0f);
mVertices[7].Set(1.0f, 1.0f, -1.0f);
mVertices[8].Set(0.0f, 0.0f, 1.0f);
mVertices[9].Set(1.0f, -1.0f, -1.0f);
mVertices[10].Set(-1.0f, 0.0f, -1.0f);
mVertices[11].Set(0.0f, 0.0f, 1.0f);
mColumns = 128;
mRows = 4;
CreateSkyHemisphere(SKYHEMI_UPPER);
CreateSkyHemisphere(SKYHEMI_LOWER);
mPrimStart.Push(mVertices.Size());
mSideStart = mVertices.Size();
mFaceStart[0] = mSideStart + 10;
mFaceStart[1] = mFaceStart[0] + 4;
mFaceStart[2] = mFaceStart[1] + 4;
mFaceStart[3] = mFaceStart[2] + 4;
mFaceStart[4] = mFaceStart[3] + 4;
mFaceStart[5] = mFaceStart[4] + 4;
mFaceStart[6] = mFaceStart[5] + 4;
mVertices.Reserve(10 + 7*4);
FSkyVertex *ptr = &mVertices[mSideStart];
// all sides
ptr[0].SetXYZ(128.f, 128.f, -128.f, 0, 0);
ptr[1].SetXYZ(128.f, -128.f, -128.f, 0, 1);
ptr[2].SetXYZ(-128.f, 128.f, -128.f, 0.25f, 0);
ptr[3].SetXYZ(-128.f, -128.f, -128.f, 0.25f, 1);
ptr[4].SetXYZ(-128.f, 128.f, 128.f, 0.5f, 0);
ptr[5].SetXYZ(-128.f, -128.f, 128.f, 0.5f, 1);
ptr[6].SetXYZ(128.f, 128.f, 128.f, 0.75f, 0);
ptr[7].SetXYZ(128.f, -128.f, 128.f, 0.75f, 1);
ptr[8].SetXYZ(128.f, 128.f, -128.f, 1, 0);
ptr[9].SetXYZ(128.f, -128.f, -128.f, 1, 1);
// north face
ptr[10].SetXYZ(128.f, 128.f, -128.f, 0, 0);
ptr[11].SetXYZ(-128.f, 128.f, -128.f, 1, 0);
ptr[12].SetXYZ(128.f, -128.f, -128.f, 0, 1);
ptr[13].SetXYZ(-128.f, -128.f, -128.f, 1, 1);
// east face
ptr[14].SetXYZ(-128.f, 128.f, -128.f, 0, 0);
ptr[15].SetXYZ(-128.f, 128.f, 128.f, 1, 0);
ptr[16].SetXYZ(-128.f, -128.f, -128.f, 0, 1);
ptr[17].SetXYZ(-128.f, -128.f, 128.f, 1, 1);
// south face
ptr[18].SetXYZ(-128.f, 128.f, 128.f, 0, 0);
ptr[19].SetXYZ(128.f, 128.f, 128.f, 1, 0);
ptr[20].SetXYZ(-128.f, -128.f, 128.f, 0, 1);
ptr[21].SetXYZ(128.f, -128.f, 128.f, 1, 1);
// west face
ptr[22].SetXYZ(128.f, 128.f, 128.f, 0, 0);
ptr[23].SetXYZ(128.f, 128.f, -128.f, 1, 0);
ptr[24].SetXYZ(128.f, -128.f, 128.f, 0, 1);
ptr[25].SetXYZ(128.f, -128.f, -128.f, 1, 1);
// bottom face
ptr[26].SetXYZ(128.f, -128.f, -128.f, 0, 0);
ptr[27].SetXYZ(-128.f, -128.f, -128.f, 1, 0);
ptr[28].SetXYZ(128.f, -128.f, 128.f, 0, 1);
ptr[29].SetXYZ(-128.f, -128.f, 128.f, 1, 1);
// top face
ptr[30].SetXYZ(128.f, 128.f, -128.f, 0, 0);
ptr[31].SetXYZ(-128.f, 128.f, -128.f, 1, 0);
ptr[32].SetXYZ(128.f, 128.f, 128.f, 0, 1);
ptr[33].SetXYZ(-128.f, 128.f, 128.f, 1, 1);
// top face flipped
ptr[34].SetXYZ(128.f, 128.f, -128.f, 0, 1);
ptr[35].SetXYZ(-128.f, 128.f, -128.f, 1, 1);
ptr[36].SetXYZ(128.f, 128.f, 128.f, 0, 0);
ptr[37].SetXYZ(-128.f, 128.f, 128.f, 1, 0);
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::SetupMatrices(FGameTexture *tex, float x_offset, float y_offset, bool mirror, int mode, VSMatrix &modelMatrix, VSMatrix &textureMatrix, bool tiled)
{
float texw = tex->GetDisplayWidth();
float texh = tex->GetDisplayHeight();
modelMatrix.loadIdentity();
modelMatrix.rotate(-180.0f + x_offset, 0.f, 1.f, 0.f);
float xscale = texw < 1024.f ? floorf(1024.f / float(texw)) : 1.f;
float yscale = 1.f;
auto texskyoffset = tex->GetSkyOffset() + skyoffset;
if (texh <= 128 && tiled)
{
modelMatrix.translate(0.f, (-40 + texskyoffset)*skyoffsetfactor, 0.f);
modelMatrix.scale(1.f, 1.2f * 1.17f, 1.f);
yscale = 240.f / texh;
}
else if (texh < 128)
{
// smaller sky textures must be tiled. We restrict it to 128 sky pixels, though
modelMatrix.translate(0.f, -1250.f, 0.f);
modelMatrix.scale(1.f, 128 / 230.f, 1.f);
yscale = float(128 / texh); // intentionally left as integer.
}
else if (texh < 200)
{
modelMatrix.translate(0.f, -1250.f, 0.f);
modelMatrix.scale(1.f, texh / 230.f, 1.f);
}
else if (texh <= 240)
{
modelMatrix.translate(0.f, (200 - texh + texskyoffset)*skyoffsetfactor, 0.f);
modelMatrix.scale(1.f, 1.f + ((texh - 200.f) / 200.f) * 1.17f, 1.f);
}
else
{
modelMatrix.translate(0.f, (-40 + texskyoffset)*skyoffsetfactor, 0.f);
modelMatrix.scale(1.f, 1.2f * 1.17f, 1.f);
yscale = 240.f / texh;
}
textureMatrix.loadIdentity();
textureMatrix.scale(mirror ? -xscale : xscale, yscale, 1.f);
textureMatrix.translate(1.f, y_offset / texh, 1.f);
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::RenderRow(FRenderState& state, EDrawType prim, int row, bool apply)
{
state.Draw(prim, mPrimStart[row], mPrimStart[row + 1] - mPrimStart[row]);
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled)
{
if (tex)
{
state.SetMaterial(tex, UF_Texture, 0, CLAMP_NONE, 0, -1);
state.EnableModelMatrix(true);
state.EnableTextureMatrix(true);
SetupMatrices(tex, x_offset, y_offset, mirror, mode, state.mModelMatrix, state.mTextureMatrix, tiled);
}
int rc = mRows + 1;
// The caps only get drawn for the main layer but not for the overlay.
if (mode == FSkyVertexBuffer::SKYMODE_MAINLAYER && tex != NULL)
{
auto& col = R_GetSkyCapColor(tex);
state.SetObjectColor(col.first);
state.EnableTexture(false);
RenderRow(state, DT_TriangleFan, 0);
state.SetObjectColor(col.second);
RenderRow(state, DT_TriangleFan, rc);
state.EnableTexture(true);
}
state.SetObjectColor(0xffffffff);
for (int i = 1; i <= mRows; i++)
{
RenderRow(state, DT_TriangleStrip, i, i == 1);
RenderRow(state, DT_TriangleStrip, rc + i, false);
}
state.EnableTextureMatrix(false);
state.EnableModelMatrix(false);
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
void FSkyVertexBuffer::RenderBox(FRenderState& state, FTextureID texno, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2)
{
int faces;
state.EnableModelMatrix(true);
state.mModelMatrix.loadIdentity();
state.mModelMatrix.scale(1, 1 / stretch, 1); // Undo the map's vertical scaling as skyboxes are true cubes.
if (!sky2)
state.mModelMatrix.rotate(-180.0f + x_offset, skyrotatevector.X, skyrotatevector.Z, skyrotatevector.Y);
else
state.mModelMatrix.rotate(-180.0f + x_offset, skyrotatevector2.X, skyrotatevector2.Z, skyrotatevector2.Y);
if (tex->GetSkyFace(5))
{
faces = 4;
// north
state.SetMaterial(tex->GetSkyFace(0), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(0), 4);
// east
state.SetMaterial(tex->GetSkyFace(1), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(1), 4);
// south
state.SetMaterial(tex->GetSkyFace(2), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(2), 4);
// west
state.SetMaterial(tex->GetSkyFace(3), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(3), 4);
}
else
{
faces = 1;
state.SetMaterial(tex->GetSkyFace(0), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(-1), 10);
}
// top
state.SetMaterial(tex->GetSkyFace(faces), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(tex->GetSkyFlip() ? 6 : 5), 4);
// bottom
state.SetMaterial(tex->GetSkyFace(faces + 1), UF_Texture, 0, CLAMP_XY, 0, -1);
state.Draw(DT_TriangleStrip, FaceStart(4), 4);
state.EnableModelMatrix(false);
}
| {
"pile_set_name": "Github"
} |
import {Formats} from './_Internal'
import {Number} from './Number'
import {IsZero} from './IsZero'
import {Not} from '../Boolean/Not'
import {Pos} from '../Iteration/Pos'
import {IterationOf} from '../Iteration/IterationOf'
import {NumberMap} from '../Iteration/Maps/Number'
import {Map} from '../Iteration/Map'
/**
Change the format of a [[Number]]
@param B to transform
@param fmt (?=`'s'`) output format
@param IMap to operate with another set of numbers
@returns `string | number | boolean`
@example
```ts
import {N} from 'ts-toolbelt'
type test0 = N.Format<'30', 'b'> // True
type test1 = N.Format<'30', 'n'> // 30
```
*/
export type Format<N extends Number, fmt extends Formats, IMap extends Map = NumberMap> = {
'b': Not<IsZero<N, IMap>>
'n': Pos<IterationOf<N, IMap>>
's': N
}[fmt]
| {
"pile_set_name": "Github"
} |
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2020 Guardsquare NV
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package proguard.retrace;
/**
* This class represents the class name, field name, method name, etc.
* possibly found in a stack frame. Values that are not defined are null.
*/
public class FrameInfo
{
private final String className;
private final String sourceFile;
private final int lineNumber;
private final String type;
private final String fieldName;
private final String methodName;
private final String arguments;
/**
* Creates a new FrameInfo with the given information.
* Any undefined values can be null.
*/
public FrameInfo(String className,
String sourceFile,
int lineNumber,
String type,
String fieldName,
String methodName,
String arguments)
{
this.className = className;
this.sourceFile = sourceFile;
this.lineNumber = lineNumber;
this.type = type;
this.fieldName = fieldName;
this.methodName = methodName;
this.arguments = arguments;
}
public String getClassName()
{
return className;
}
public String getSourceFile()
{
return sourceFile;
}
public int getLineNumber()
{
return lineNumber;
}
public String getType()
{
return type;
}
public String getFieldName()
{
return fieldName;
}
public String getMethodName()
{
return methodName;
}
public String getArguments()
{
return arguments;
}
// Implementations for Object.
public String toString()
{
return FrameInfo.class.getName() + "(class=["+className+"], line=["+lineNumber+"], type=["+type+"], field=["+fieldName+"], method=["+methodName+"], arguments=["+arguments+"]";
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<!--
Copyright 2008 The Closure Library Authors. All Rights Reserved.
Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
<!--
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Closure Unit Tests - goog.module.ModuleInfo</title>
<script src="../base.js"></script>
<script>
goog.require('goog.module.BaseModule');
goog.require('goog.module.ModuleInfo');
goog.require('goog.module.ModuleManager');
goog.require('goog.testing.jsunit');
goog.require('goog.testing.MockClock');
</script>
</head>
<body>
<script type="text/javascript">
/**
* Test initial state of module info.
*/
function testNotLoadedAtStart() {
var m = new goog.module.ModuleInfo();
assertFalse('Shouldn\'t be loaded', m.isLoaded());
}
var TestModule = function() {
goog.module.BaseModule.call(this);
};
goog.inherits(TestModule, goog.module.BaseModule);
/**
* Test loaded module info.
*/
function testOnLoad() {
var m = new goog.module.ModuleInfo();
m.setModuleConstructor(TestModule);
m.onLoad(goog.nullFunction);
assertTrue(m.isLoaded());
var module = m.getModule();
assertNotNull(module);
assertTrue(module instanceof TestModule);
m.dispose();
assertTrue(m.isDisposed());
assertTrue('Disposing of ModuleInfo should dispose of its module',
module.isDisposed());
}
/**
* Test callbacks on module load.
*/
function testCallbacks() {
var m = new goog.module.ModuleInfo();
m.setModuleConstructor(TestModule);
var index = 0;
var a = -1, b = -1, c = -1, d = -1;
var ca = m.registerCallback(function() { a = index++; })
var cb = m.registerCallback(function() { b = index++; })
var cc = m.registerCallback(function() { c = index++; })
var cd = m.registerEarlyCallback(function() { d = index++; })
cb.abort();
m.onLoad(goog.nullFunction);
assertTrue('callback A should have fired', a >= 0);
assertFalse('callback B should have been aborted', b >= 0);
assertTrue('callback C should have fired', c >= 0);
assertTrue('early callback d should have fired', d >= 0);
assertEquals('ordering of callbacks was wrong', 0, d);
assertEquals('ordering of callbacks was wrong', 1, a);
assertEquals('ordering of callbacks was wrong', 2, c);
}
/**
* Tests the error callbacks.
*/
function testErrbacks() {
var m = new goog.module.ModuleInfo();
m.setModuleConstructor(TestModule);
var index = 0;
var a = -1, b = -1, c = -1, d = -1;
var ca = m.registerErrback(function() { a = index++; })
var cb = m.registerErrback(function() { b = index++; })
var cc = m.registerErrback(function() { c = index++; })
m.onError('foo');
assertTrue('callback A should have fired', a >= 0);
assertTrue('callback B should have fired', b >= 0);
assertTrue('callback C should have fired', c >= 0);
assertEquals('ordering of callbacks was wrong', 0, a);
assertEquals('ordering of callbacks was wrong', 1, b);
assertEquals('ordering of callbacks was wrong', 2, c);
}
</script>
</body>
</html>
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="testiconv"
ProjectGUID="{D853E04D-DF9C-B644-9F50-B201EAAF5E18}"
RootNamespace="testiconv"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Win32\Debug"
IntermediateDirectory="obj\Debug"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..;..\..\..\..\..\include"
PreprocessorDefinitions="USING_PREMAKE_CONFIG_H;_DEBUG"
MinimalRebuild="true"
ExceptionHandling="0"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\testiconv.pdb"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="USING_PREMAKE_CONFIG_H;_DEBUG"
AdditionalIncludeDirectories="..\..;..\..\..\..\..\include"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\SDL2main\Win32\Debug\SDL2main.lib ..\..\SDL2\Win32\Debug\SDL2.lib"
OutputFile="$(OutDir)\testiconv.exe"
LinkIncremental="2"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
ProgramDataBaseFileName="$(OutDir)\testiconv.pdb"
SubSystem="1"
EntryPointSymbol="mainCRTStartup"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ".\Win32\Debug" ( mkdir ".\Win32\Debug" )
copy ".\..\..\SDL2\Win32\Debug\SDL2.dll" ".\Win32\Debug\SDL2.dll"
copy ".\..\..\..\..\..\test\utf8.txt" ".\Win32\Debug\utf8.txt""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Win32\Release"
IntermediateDirectory="obj\Release"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..;..\..\..\..\..\include"
PreprocessorDefinitions="USING_PREMAKE_CONFIG_H;NDEBUG"
ExceptionHandling="0"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
ProgramDataBaseFileName="$(OutDir)\testiconv.pdb"
DebugInformationFormat="0"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="USING_PREMAKE_CONFIG_H;NDEBUG"
AdditionalIncludeDirectories="..\..;..\..\..\..\..\include"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\SDL2main\Win32\Release\SDL2main.lib ..\..\SDL2\Win32\Release\SDL2.lib"
OutputFile="$(OutDir)\testiconv.exe"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateDebugInformation="false"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
EntryPointSymbol="mainCRTStartup"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="if not exist ".\Win32\Release" ( mkdir ".\Win32\Release" )
copy ".\..\..\SDL2\Win32\Release\SDL2.dll" ".\Win32\Release\SDL2.dll"
copy ".\..\..\..\..\..\test\utf8.txt" ".\Win32\Release\utf8.txt""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="test"
Filter=""
>
<File
RelativePath="..\..\..\..\..\test\testiconv.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
| {
"pile_set_name": "Github"
} |
using Serenity.ComponentModel;
using Serenity.PropertyGrid;
using System.Collections.Generic;
using Xunit;
namespace Serenity.Test.PropertyGrid
{
[Collection("AvoidParallel")]
public partial class GetPropertyItemsForTests
{
private class ClassWithNoProperties
{
}
[Fact]
public void Returns_Empty_Array_For_ClassWithNoProperties()
{
var actual = PropertyItemHelper.GetPropertyItemsFor(typeof(ClassWithNoProperties));
Assert.Equal(new List<PropertyItem>(), actual);
}
private class ClassWithField
{
public string Field;
public ClassWithField()
{
Field = "";
}
}
[Fact]
public void IgnoresFieldDeclarations()
{
var actual = PropertyItemHelper.GetPropertyItemsFor(typeof(ClassWithField));
var expected = new PropertyItem[0];
Assert.Equal(JSON.StringifyIndented(expected), JSON.StringifyIndented(actual));
}
private class ClassWithOneSimpleProperty
{
public string Property { get; set; }
}
[Fact]
public void Returns_One_Element_List_For_ClassWithOneSimpleProperty()
{
var actual = PropertyItemHelper.GetPropertyItemsFor(typeof(ClassWithOneSimpleProperty));
var expected = new PropertyItem[]
{
new PropertyItem { Name = "Property", Title = "Property", Width = 80 }
};
Assert.Equal(JSON.StringifyIndented(expected), JSON.StringifyIndented(actual));
}
private class ClassWithUnorderedProperties
{
public string Property3 { get; set; }
public string Property1 { get; set; }
public string Property2 { get; set; }
}
[Fact]
public void PreservesDeclarationOrderingFor_ClassWithUnorderedProperties()
{
var actual = PropertyItemHelper.GetPropertyItemsFor(typeof(ClassWithUnorderedProperties));
var expected = new PropertyItem[]
{
new PropertyItem { Name = "Property3", Title = "Property3", Width = 80 },
new PropertyItem { Name = "Property1", Title = "Property1", Width = 80 },
new PropertyItem { Name = "Property2", Title = "Property2", Width = 80 }
};
Assert.Equal(JSON.StringifyIndented(expected), JSON.StringifyIndented(actual));
}
}
} | {
"pile_set_name": "Github"
} |
using System;
using Ultraviolet.Input;
using Ultraviolet.Presentation.Input;
namespace Ultraviolet.Presentation.Controls
{
/// <summary>
/// Represents an item in a <see cref="ComboBox"/> control.
/// </summary>
[UvmlKnownType(null, "Ultraviolet.Presentation.Controls.Templates.ComboBoxItem.xml")]
public class ComboBoxItem : ListBoxItem
{
/// <summary>
/// Initializes the <see cref="ComboBoxItem"/> type.
/// </summary>
static ComboBoxItem()
{
KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(ComboBoxItem), new PropertyMetadata<KeyboardNavigationMode>(KeyboardNavigationMode.Once));
KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(ComboBoxItem), new PropertyMetadata<KeyboardNavigationMode>(KeyboardNavigationMode.Local));
}
/// <summary>
/// Initializes a new instance of the <see cref="ComboBoxItem"/> class.
/// </summary>
/// <param name="uv">The Ultraviolet context.</param>
/// <param name="name">The element's identifying name within its namescope.</param>
public ComboBoxItem(UltravioletContext uv, String name)
: base(uv, name)
{
HighlightOnSelect = false;
HighlightOnMouseOver = true;
}
/// <inheritdoc/>
protected override void OnMouseDown(MouseDevice device, MouseButton button, RoutedEventData data)
{
if (button == MouseButton.Left && !data.Handled)
{
Select();
OnSelectedByUser();
data.Handled = true;
}
base.OnMouseDown(device, button, data);
}
/// <inheritdoc/>
protected override void OnTouchTap(TouchDevice device, Int64 id, Double x, Double y, RoutedEventData data)
{
if (!Ultraviolet.GetInput().IsMouseCursorAvailable)
{
if (device.IsFirstTouchInGesture(id) && !data.Handled)
{
Select();
OnSelectedByUser();
data.Handled = true;
}
}
base.OnTouchTap(device, id, x, y, data);
}
/// <inheritdoc/>
protected override void OnContentChanged(Object oldValue, Object newValue)
{
var comboBox = ItemsControl.ItemsControlFromItemContainer(this) as ComboBox;
if (comboBox != null)
{
comboBox.HandleItemChanged(this);
}
base.OnContentChanged(oldValue, newValue);
}
/// <summary>
/// Selects the item.
/// </summary>
private void Select()
{
var comboBox = ItemsControl.ItemsControlFromItemContainer(this) as ComboBox;
if (comboBox != null)
{
comboBox.HandleItemClicked(this);
OnSelected();
}
}
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
style="@style/settingsRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/kp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<SeekBar
android:id="@+id/sbP"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:max="200" />
<TextView
android:id="@+id/tvP"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<LinearLayout
style="@style/settingsRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/ki"
android:textAppearance="?android:attr/textAppearanceLarge" />
<SeekBar
android:id="@+id/sbI"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:max="200" />
<TextView
android:id="@+id/tvI"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<LinearLayout
style="@style/settingsRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/kd"
android:textAppearance="?android:attr/textAppearanceLarge" />
<SeekBar
android:id="@+id/sbD"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"
android:max="200" />
<TextView
android:id="@+id/tvD"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<TextView
style="?android:attr/listSeparatorTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="@string/maxSpeed" />
<LinearLayout
style="@style/settingsRow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<SeekBar
android:id="@+id/sbMaxSpeed"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="7"
android:max="100" />
<TextView
android:id="@+id/tvMaxSpeed"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/bCancel"
style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/cancel" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@android:color/darker_gray" />
<Button
android:id="@+id/bOk"
style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/ok" />
</LinearLayout>
</LinearLayout> | {
"pile_set_name": "Github"
} |
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M5,15L3,15v4c0,1.1 0.9,2 2,2h4v-2L5,19v-4zM5,5h4L9,3L5,3c-1.1,0 -2,0.9 -2,2v4h2L5,5zM19,3h-4v2h4v4h2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19h-4v2h4c1.1,0 2,-0.9 2,-2v-4h-2v4zM12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
</vector>
| {
"pile_set_name": "Github"
} |
// Pagination
@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
.page-link {
padding: $padding-y $padding-x;
@include font-size($font-size);
line-height: $line-height;
}
.page-item {
&:first-child {
.page-link {
@include border-left-radius($border-radius);
}
}
&:last-child {
.page-link {
@include border-right-radius($border-radius);
}
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2019
* Ubiquitous Knowledge Processing (UKP) Lab and FG Language Technology
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.tudarmstadt.ukp.clarin.webanno.telemetry;
import java.util.List;
import java.util.Optional;
import de.tudarmstadt.ukp.clarin.webanno.telemetry.model.TelemetrySettings;
public interface TelemetryService
{
List<TelemetrySupport> getTelemetrySupports();
/**
* Reads the telemetry settings from the DB. If there are no settings yet, this method returns
* a new settings object.
*/
<T> TelemetrySettings readOrCreateSettings(TelemetrySupport<T> aSupport);
<T> Optional<TelemetrySettings> readSettings(TelemetrySupport<T> aSupport);
void writeAllSettings(List<TelemetrySettings> aSettings);
List<TelemetrySettings> listSettings();
Optional<TelemetrySupport> getTelemetrySuppport(String aSupport);
DeploymentMode getDeploymentMode();
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | {
"pile_set_name": "Github"
} |
/*
Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
The Weather Channel (TM) funded Tungsten Graphics to develop the
initial release of the Radeon 8500 driver under the XFree86 license.
This notice must be preserved.
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 (including the
next paragraph) 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 COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS 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.
*/
/*
* Authors:
* Keith Whitwell <[email protected]>
*/
#include "main/glheader.h"
#include "main/imports.h"
#include "main/macros.h"
#include "main/context.h"
#include "main/simple_list.h"
#include "radeon_common.h"
#include "r200_context.h"
#include "r200_ioctl.h"
#include "radeon_reg.h"
/* The state atoms will be emitted in the order they appear in the atom list,
* so this step is important.
*/
#define insert_at_tail_if(atom_list, atom) \
do { \
struct radeon_state_atom* current_atom = (atom); \
if (current_atom->check) \
insert_at_tail((atom_list), current_atom); \
} while(0)
void r200SetUpAtomList( r200ContextPtr rmesa )
{
int i, mtu;
mtu = rmesa->radeon.glCtx.Const.MaxTextureUnits;
make_empty_list(&rmesa->radeon.hw.atomlist);
rmesa->radeon.hw.atomlist.name = "atom-list";
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.ctx );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.set );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.lin );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.msk );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vpt );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vtx );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vap );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vte );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.msc );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.cst );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.zbs );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.tcl );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.msl );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.tcg );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.grd );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.fog );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.tam );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.tf );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.atf );
for (i = 0; i < mtu; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.tex[i] );
for (i = 0; i < mtu; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.cube[i] );
for (i = 0; i < 6; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.pix[i] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.afs[0] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.afs[1] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.stp );
for (i = 0; i < 8; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.lit[i] );
for (i = 0; i < 3 + mtu; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.mat[i] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.eye );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.glt );
for (i = 0; i < 2; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.mtl[i] );
for (i = 0; i < 6; ++i)
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.ucp[i] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.spr );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.ptp );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.prf );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.pvs );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vpp[0] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vpp[1] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vpi[0] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.vpi[1] );
insert_at_tail_if( &rmesa->radeon.hw.atomlist, &rmesa->hw.sci );
}
/* Fire a section of the retained (indexed_verts) buffer as a regular
* primtive.
*/
void r200EmitVbufPrim( r200ContextPtr rmesa,
GLuint primitive,
GLuint vertex_nr )
{
BATCH_LOCALS(&rmesa->radeon);
assert(!(primitive & R200_VF_PRIM_WALK_IND));
radeonEmitState(&rmesa->radeon);
radeon_print(RADEON_RENDER|RADEON_SWRENDER,RADEON_VERBOSE,
"%s cmd_used/4: %d prim %x nr %d\n", __FUNCTION__,
rmesa->store.cmd_used/4, primitive, vertex_nr);
BEGIN_BATCH(3);
OUT_BATCH_PACKET3_CLIP(R200_CP_CMD_3D_DRAW_VBUF_2, 0);
OUT_BATCH(primitive | R200_VF_PRIM_WALK_LIST | R200_VF_COLOR_ORDER_RGBA |
(vertex_nr << R200_VF_VERTEX_NUMBER_SHIFT));
END_BATCH();
}
static void r200FireEB(r200ContextPtr rmesa, int vertex_count, int type)
{
BATCH_LOCALS(&rmesa->radeon);
if (vertex_count > 0) {
BEGIN_BATCH(8+2);
OUT_BATCH_PACKET3_CLIP(R200_CP_CMD_3D_DRAW_INDX_2, 0);
OUT_BATCH(R200_VF_PRIM_WALK_IND |
R200_VF_COLOR_ORDER_RGBA |
((vertex_count + 0) << 16) |
type);
OUT_BATCH_PACKET3(R200_CP_CMD_INDX_BUFFER, 2);
OUT_BATCH((0x80 << 24) | (0 << 16) | 0x810);
OUT_BATCH(rmesa->radeon.tcl.elt_dma_offset);
OUT_BATCH((vertex_count + 1)/2);
radeon_cs_write_reloc(rmesa->radeon.cmdbuf.cs,
rmesa->radeon.tcl.elt_dma_bo,
RADEON_GEM_DOMAIN_GTT, 0, 0);
END_BATCH();
}
}
void r200FlushElts(struct gl_context *ctx)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
int nr, elt_used = rmesa->tcl.elt_used;
radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %x %d\n", __FUNCTION__, rmesa->tcl.hw_primitive, elt_used);
assert( rmesa->radeon.dma.flush == r200FlushElts );
rmesa->radeon.dma.flush = NULL;
nr = elt_used / 2;
radeon_bo_unmap(rmesa->radeon.tcl.elt_dma_bo);
r200FireEB(rmesa, nr, rmesa->tcl.hw_primitive);
radeon_bo_unref(rmesa->radeon.tcl.elt_dma_bo);
rmesa->radeon.tcl.elt_dma_bo = NULL;
if (R200_ELT_BUF_SZ > elt_used)
radeonReturnDmaRegion(&rmesa->radeon, R200_ELT_BUF_SZ - elt_used);
}
GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
GLuint primitive,
GLuint min_nr )
{
GLushort *retval;
radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %d prim %x\n", __FUNCTION__, min_nr, primitive);
assert((primitive & R200_VF_PRIM_WALK_IND));
radeonEmitState(&rmesa->radeon);
radeonAllocDmaRegion(&rmesa->radeon, &rmesa->radeon.tcl.elt_dma_bo,
&rmesa->radeon.tcl.elt_dma_offset, R200_ELT_BUF_SZ, 4);
rmesa->tcl.elt_used = min_nr * 2;
radeon_bo_map(rmesa->radeon.tcl.elt_dma_bo, 1);
retval = rmesa->radeon.tcl.elt_dma_bo->ptr + rmesa->radeon.tcl.elt_dma_offset;
assert(!rmesa->radeon.dma.flush);
rmesa->radeon.glCtx.Driver.NeedFlush |= FLUSH_STORED_VERTICES;
rmesa->radeon.dma.flush = r200FlushElts;
return retval;
}
void r200EmitMaxVtxIndex(r200ContextPtr rmesa, int count)
{
BATCH_LOCALS(&rmesa->radeon);
BEGIN_BATCH(2);
OUT_BATCH(CP_PACKET0(R200_SE_VF_MAX_VTX_INDX, 0));
OUT_BATCH(count);
END_BATCH();
}
void r200EmitVertexAOS( r200ContextPtr rmesa,
GLuint vertex_size,
struct radeon_bo *bo,
GLuint offset )
{
BATCH_LOCALS(&rmesa->radeon);
radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s: vertex_size 0x%x offset 0x%x \n",
__FUNCTION__, vertex_size, offset);
BEGIN_BATCH(7);
OUT_BATCH_PACKET3(R200_CP_CMD_3D_LOAD_VBPNTR, 2);
OUT_BATCH(1);
OUT_BATCH(vertex_size | (vertex_size << 8));
OUT_BATCH_RELOC(offset, bo, offset, RADEON_GEM_DOMAIN_GTT, 0, 0);
END_BATCH();
}
void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset)
{
BATCH_LOCALS(&rmesa->radeon);
uint32_t voffset;
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
radeon_print(RADEON_RENDER, RADEON_VERBOSE,
"%s: nr=%d, ofs=0x%08x\n",
__FUNCTION__, nr, offset);
BEGIN_BATCH(sz+2+ (nr*2));
OUT_BATCH_PACKET3(R200_CP_CMD_3D_LOAD_VBPNTR, sz - 1);
OUT_BATCH(nr);
{
for (i = 0; i + 1 < nr; i += 2) {
OUT_BATCH((rmesa->radeon.tcl.aos[i].components << 0) |
(rmesa->radeon.tcl.aos[i].stride << 8) |
(rmesa->radeon.tcl.aos[i + 1].components << 16) |
(rmesa->radeon.tcl.aos[i + 1].stride << 24));
voffset = rmesa->radeon.tcl.aos[i + 0].offset +
offset * 4 * rmesa->radeon.tcl.aos[i + 0].stride;
OUT_BATCH(voffset);
voffset = rmesa->radeon.tcl.aos[i + 1].offset +
offset * 4 * rmesa->radeon.tcl.aos[i + 1].stride;
OUT_BATCH(voffset);
}
if (nr & 1) {
OUT_BATCH((rmesa->radeon.tcl.aos[nr - 1].components << 0) |
(rmesa->radeon.tcl.aos[nr - 1].stride << 8));
voffset = rmesa->radeon.tcl.aos[nr - 1].offset +
offset * 4 * rmesa->radeon.tcl.aos[nr - 1].stride;
OUT_BATCH(voffset);
}
for (i = 0; i + 1 < nr; i += 2) {
voffset = rmesa->radeon.tcl.aos[i + 0].offset +
offset * 4 * rmesa->radeon.tcl.aos[i + 0].stride;
radeon_cs_write_reloc(rmesa->radeon.cmdbuf.cs,
rmesa->radeon.tcl.aos[i+0].bo,
RADEON_GEM_DOMAIN_GTT,
0, 0);
voffset = rmesa->radeon.tcl.aos[i + 1].offset +
offset * 4 * rmesa->radeon.tcl.aos[i + 1].stride;
radeon_cs_write_reloc(rmesa->radeon.cmdbuf.cs,
rmesa->radeon.tcl.aos[i+1].bo,
RADEON_GEM_DOMAIN_GTT,
0, 0);
}
if (nr & 1) {
voffset = rmesa->radeon.tcl.aos[nr - 1].offset +
offset * 4 * rmesa->radeon.tcl.aos[nr - 1].stride;
radeon_cs_write_reloc(rmesa->radeon.cmdbuf.cs,
rmesa->radeon.tcl.aos[nr-1].bo,
RADEON_GEM_DOMAIN_GTT,
0, 0);
}
}
END_BATCH();
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.utils;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.spy;
import android.content.Context;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import java.time.Duration;
import java.util.regex.Pattern;
@RunWith(RobolectricTestRunner.class)
public class PowerUtilTest {
private static final String TEST_BATTERY_LEVEL_10 = "10%";
private static final long SEVENTEEN_MIN_MILLIS = Duration.ofMinutes(17).toMillis();
private static final long FIVE_MINUTES_MILLIS = Duration.ofMinutes(5).toMillis();
private static final long TEN_MINUTES_MILLIS = Duration.ofMinutes(10).toMillis();
private static final long THREE_DAYS_MILLIS = Duration.ofDays(3).toMillis();
private static final long THIRTY_HOURS_MILLIS = Duration.ofHours(30).toMillis();
private static final String NORMAL_CASE_EXPECTED_PREFIX = "Should last until about";
private static final String ENHANCED_SUFFIX = " based on your usage";
private static final String BATTERY_RUN_OUT_PREFIX = "Battery may run out by";
// matches a time (ex: '1:15 PM', '2 AM', '23:00')
private static final String TIME_OF_DAY_REGEX = " (\\d)+:?(\\d)* ((AM)*)|((PM)*)";
// matches a percentage with parenthesis (ex: '(10%)')
private static final String PERCENTAGE_REGEX = " \\(\\d?\\d%\\)";
private Context mContext;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
}
@Test
public void testGetBatteryRemainingStringFormatted_moreThanFifteenMinutes_withPercentage() {
String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
SEVENTEEN_MIN_MILLIS,
TEST_BATTERY_LEVEL_10,
true /* basedOnUsage */);
String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
SEVENTEEN_MIN_MILLIS,
TEST_BATTERY_LEVEL_10,
false /* basedOnUsage */);
// We only add special mention for the long string
// ex: Will last about 1:15 PM based on your usage (10%)
assertThat(info).containsMatch(Pattern.compile(
NORMAL_CASE_EXPECTED_PREFIX
+ TIME_OF_DAY_REGEX
+ ENHANCED_SUFFIX
+ PERCENTAGE_REGEX));
// shortened string should not have extra text
// ex: Will last about 1:15 PM (10%)
assertThat(info2).containsMatch(Pattern.compile(
NORMAL_CASE_EXPECTED_PREFIX
+ TIME_OF_DAY_REGEX
+ PERCENTAGE_REGEX));
}
@Test
public void testGetBatteryRemainingStringFormatted_moreThanFifteenMinutes_noPercentage() {
String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
SEVENTEEN_MIN_MILLIS,
null /* percentageString */,
true /* basedOnUsage */);
String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
SEVENTEEN_MIN_MILLIS,
null /* percentageString */,
false /* basedOnUsage */);
// We only have % when it is provided
// ex: Will last about 1:15 PM based on your usage
assertThat(info).containsMatch(Pattern.compile(
NORMAL_CASE_EXPECTED_PREFIX
+ TIME_OF_DAY_REGEX
+ ENHANCED_SUFFIX
+ "(" + PERCENTAGE_REGEX + "){0}")); // no percentage
// shortened string should not have extra text
// ex: Will last about 1:15 PM
assertThat(info2).containsMatch(Pattern.compile(
NORMAL_CASE_EXPECTED_PREFIX
+ TIME_OF_DAY_REGEX
+ "(" + PERCENTAGE_REGEX + "){0}")); // no percentage
}
@Test
public void testGetBatteryRemainingStringFormatted_lessThanSevenMinutes_usesCorrectString() {
String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
FIVE_MINUTES_MILLIS,
TEST_BATTERY_LEVEL_10 /* percentageString */,
true /* basedOnUsage */);
String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
FIVE_MINUTES_MILLIS,
null /* percentageString */,
true /* basedOnUsage */);
// additional battery percentage in this string
assertThat(info).isEqualTo("Phone may shut down soon (10%)");
// shortened string should not have percentage
assertThat(info2).isEqualTo("Phone may shut down soon");
}
@Test
public void testGetBatteryRemainingStringFormatted_betweenSevenAndFifteenMinutes_usesCorrectString() {
String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
TEN_MINUTES_MILLIS,
null /* percentageString */,
true /* basedOnUsage */);
String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
TEN_MINUTES_MILLIS,
TEST_BATTERY_LEVEL_10 /* percentageString */,
true /* basedOnUsage */);
// shortened string should not have percentage
assertThat(info).isEqualTo("Less than 15 min left");
// Add percentage to string when provided
assertThat(info2).isEqualTo("Less than 15 min left (10%)");
}
@Test
public void testGetBatteryRemainingStringFormatted_betweenOneAndTwoDays_usesCorrectString() {
String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
THIRTY_HOURS_MILLIS,
null /* percentageString */,
true /* basedOnUsage */);
String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
THIRTY_HOURS_MILLIS,
TEST_BATTERY_LEVEL_10 /* percentageString */,
false /* basedOnUsage */);
// We only add special mention for the long string
assertThat(info).isEqualTo("About 1 day, 6 hr left based on your usage");
// shortened string should not have extra text
assertThat(info2).isEqualTo("About 1 day, 6 hr left (10%)");
}
@Test
public void testGetBatteryRemainingStringFormatted_moreThanTwoDays_usesCorrectString() {
String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
THREE_DAYS_MILLIS,
null /* percentageString */,
true /* basedOnUsage */);
String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
THREE_DAYS_MILLIS,
TEST_BATTERY_LEVEL_10 /* percentageString */,
true /* basedOnUsage */);
// shortened string should not have percentage
assertThat(info).isEqualTo("More than 2 days left");
// Add percentage to string when provided
assertThat(info2).isEqualTo("More than 2 days left (10%)");
}
@Test
public void getBatteryTipStringFormatted_moreThanOneDay_usesCorrectString() {
String info = PowerUtil.getBatteryTipStringFormatted(mContext,
THREE_DAYS_MILLIS);
assertThat(info).isEqualTo("More than 3 days left");
}
@Test
public void getBatteryTipStringFormatted_lessThanOneDay_usesCorrectString() {
String info = PowerUtil.getBatteryTipStringFormatted(mContext,
SEVENTEEN_MIN_MILLIS);
// ex: Battery may run out by 1:15 PM
assertThat(info).containsMatch(Pattern.compile(
BATTERY_RUN_OUT_PREFIX + TIME_OF_DAY_REGEX));
}
@Test
public void testRoundToNearestThreshold_roundsCorrectly() {
// test some pretty normal values
assertThat(PowerUtil.roundTimeToNearestThreshold(1200, 1000)).isEqualTo(1000);
assertThat(PowerUtil.roundTimeToNearestThreshold(800, 1000)).isEqualTo(1000);
assertThat(PowerUtil.roundTimeToNearestThreshold(1000, 1000)).isEqualTo(1000);
// test the weird stuff
assertThat(PowerUtil.roundTimeToNearestThreshold(80, -200)).isEqualTo(0);
assertThat(PowerUtil.roundTimeToNearestThreshold(-150, 100)).isEqualTo(200);
assertThat(PowerUtil.roundTimeToNearestThreshold(-120, 100)).isEqualTo(100);
assertThat(PowerUtil.roundTimeToNearestThreshold(-200, -75)).isEqualTo(225);
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2008-2019 by Emeric Vernat
*
* This file is part of Java Melody.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.bull.javamelody.internal.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import net.bull.javamelody.Parameter;
import net.bull.javamelody.internal.common.LOG;
import org.quartz.CronTrigger;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobKey;
import org.quartz.JobListener;
import org.quartz.ListenerManager;
import org.quartz.Matcher;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SimpleTrigger;
import org.quartz.Trigger;
import org.quartz.impl.StdSchedulerFactory;
import org.quartz.impl.matchers.EverythingMatcher;
import org.quartz.impl.matchers.GroupMatcher;
/**
* Classe ayant la même API, que le QuartzAdapter par défaut des versions avant 2,<br/>
* mais avec une autre implémentation adaptée aux versions 2.0.0, 2.1.2 et suivantes.
*
* @author [email protected]
* @author Emeric Vernat
*/
class Quartz2Adapter extends QuartzAdapter {
protected Quartz2Adapter() {
super();
}
@Override
String getJobName(JobDetail jobDetail) {
return jobDetail.getKey().getName();
}
@Override
String getJobGroup(JobDetail jobDetail) {
return jobDetail.getKey().getGroup();
}
@Override
public String getJobFullName(JobDetail jobDetail) {
return getJobGroup(jobDetail) + '.' + getJobName(jobDetail);
}
// les getters suivants sont identiques à ceux de la classe parente,
// mais ils sont nécessaires ici car les types des objets ont changé de classes à interfaces à partir de Quartz v2
@Override
String getJobDescription(JobDetail jobDetail) {
return jobDetail.getDescription();
}
@Override
Class<?> getJobClass(JobDetail jobDetail) {
return jobDetail.getJobClass();
}
@Override
Date getTriggerPreviousFireTime(Trigger trigger) {
return trigger.getPreviousFireTime();
}
@Override
Date getTriggerNextFireTime(Trigger trigger) {
return trigger.getNextFireTime();
}
@Override
String getCronTriggerExpression(CronTrigger trigger) {
// getCronExpression gives a PMD false+
return trigger.getCronExpression(); // NOPMD
}
@Override
long getSimpleTriggerRepeatInterval(SimpleTrigger trigger) {
return trigger.getRepeatInterval(); // NOPMD
}
@Override
public JobDetail getContextJobDetail(JobExecutionContext context) {
return context.getJobDetail();
}
@Override
Date getContextFireTime(JobExecutionContext context) {
return context.getFireTime();
}
@Override
public void addGlobalJobListener(JobListener jobGlobalListener) throws SchedulerException {
final Scheduler defaultScheduler;
final List<Matcher<JobKey>> allJobs = new ArrayList<Matcher<JobKey>>();
allJobs.add(EverythingMatcher.allJobs());
if (Parameter.QUARTZ_DEFAULT_LISTENER_DISABLED.getValueAsBoolean()) {
defaultScheduler = null;
LOG.debug("Initialization of Quartz default listener has been disabled");
} else {
defaultScheduler = StdSchedulerFactory.getDefaultScheduler();
defaultScheduler.getListenerManager().addJobListener(jobGlobalListener, allJobs);
}
for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
if (scheduler != defaultScheduler) {
scheduler.getListenerManager().addJobListener(jobGlobalListener, allJobs);
}
}
}
@Override
public void removeGlobalJobListener(Class<? extends JobListener> jobListenerClass)
throws SchedulerException {
for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
final ListenerManager listenerManager = scheduler.getListenerManager();
final List<JobListener> globalJobListeners = listenerManager.getJobListeners();
for (final JobListener jobListener : new ArrayList<JobListener>(globalJobListeners)) {
if (jobListenerClass.isInstance(jobListener)) {
listenerManager.removeJobListener(jobListener.getName());
}
}
}
}
@Override
List<JobDetail> getAllJobsOfScheduler(Scheduler scheduler) throws SchedulerException {
final List<JobDetail> result = new ArrayList<JobDetail>();
for (final String jobGroupName : scheduler.getJobGroupNames()) {
final GroupMatcher<JobKey> groupMatcher = GroupMatcher.groupEquals(jobGroupName);
for (final JobKey jobKey : scheduler.getJobKeys(groupMatcher)) {
final JobDetail jobDetail;
try {
jobDetail = scheduler.getJobDetail(jobKey);
// le job peut être terminé et supprimé depuis la ligne ci-dessus
if (jobDetail != null) {
result.add(jobDetail);
}
} catch (final Exception e) {
// si les jobs sont persistés en base de données, il peut y avoir une exception
// dans getJobDetail, par exemple si la classe du job n'existe plus dans l'application
LOG.debug(e.toString(), e);
}
}
}
return result;
}
@Override
@SuppressWarnings("unchecked")
List<Trigger> getTriggersOfJob(JobDetail jobDetail, Scheduler scheduler)
throws SchedulerException {
return (List<Trigger>) scheduler.getTriggersOfJob(jobDetail.getKey());
}
@Override
boolean isTriggerPaused(Trigger trigger, Scheduler scheduler) throws SchedulerException {
return scheduler.getTriggerState(trigger.getKey()) == Trigger.TriggerState.PAUSED;
}
@Override
void pauseJob(JobDetail jobDetail, Scheduler scheduler) throws SchedulerException {
scheduler.pauseJob(jobDetail.getKey());
}
@Override
void resumeJob(JobDetail jobDetail, Scheduler scheduler) throws SchedulerException {
scheduler.resumeJob(jobDetail.getKey());
}
}
| {
"pile_set_name": "Github"
} |
local VolumetricConvolution, parent = torch.class('nn.VolumetricConvolution', 'nn.Module')
function VolumetricConvolution:__init(nInputPlane, nOutputPlane, kT, kW, kH, dT, dW, dH)
parent.__init(self)
dT = dT or 1
dW = dW or 1
dH = dH or 1
self.nInputPlane = nInputPlane
self.nOutputPlane = nOutputPlane
self.kT = kT
self.kW = kW
self.kH = kH
self.dT = dT
self.dW = dW
self.dH = dH
self.weight = torch.Tensor(nOutputPlane, nInputPlane, kT, kH, kW)
self.bias = torch.Tensor(nOutputPlane)
self.gradWeight = torch.Tensor(nOutputPlane, nInputPlane, kT, kH, kW)
self.gradBias = torch.Tensor(nOutputPlane)
self:reset()
end
function VolumetricConvolution:reset(stdv)
if stdv then
stdv = stdv * math.sqrt(3)
else
stdv = 1/math.sqrt(self.kT*self.kW*self.kH*self.nInputPlane)
end
if nn.oldSeed then
self.weight:apply(function()
return torch.uniform(-stdv, stdv)
end)
self.bias:apply(function()
return torch.uniform(-stdv, stdv)
end)
else
self.weight:uniform(-stdv, stdv)
self.bias:uniform(-stdv, stdv)
end
end
function VolumetricConvolution:updateOutput(input)
return input.nn.VolumetricConvolution_updateOutput(self, input)
end
function VolumetricConvolution:updateGradInput(input, gradOutput)
return input.nn.VolumetricConvolution_updateGradInput(self, input, gradOutput)
end
function VolumetricConvolution:accGradParameters(input, gradOutput, scale)
return input.nn.VolumetricConvolution_accGradParameters(self, input, gradOutput, scale)
end
| {
"pile_set_name": "Github"
} |
.adf {
&-form-definition-selector {
width: 100%;
}
}
| {
"pile_set_name": "Github"
} |
//
// Authors:
// Rafael Mizrahi <[email protected]>
// Erez Lotan <[email protected]>
// Vladimir Krasnov <[email protected]>
//
//
// Copyright (c) 2002-2005 Mainsoft Corporation.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace GHTTests.System_Web_dll.System_Web_UI_WebControls
{public class BaseDataList_GridLines
: GHTDataListBase
{
#region Web Form Designer generated code
override protected void OnInit(EventArgs e) {
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private delegate void BuildDataListControl(BaseDataList ctl);
private void Page_Load(object sender, System.EventArgs e)
{
HtmlForm frm = (HtmlForm)FindControl("Form1");
GHTTestBegin(frm);
this.Test(typeof(DataGrid), new BaseDataList_GridLines.BuildDataListControl(this.GHTBuildUnboundSampleDataGrid));
this.Test(typeof(DataList), new BaseDataList_GridLines.BuildDataListControl(this.GHTBuildUnboundSampleDataList));
GHTTestEnd();
}
private void Test(Type CtlType, BaseDataList_GridLines.BuildDataListControl CtlBuilder)
{
BaseDataList list1;
try
{
this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_GridLines1");
list1 = (BaseDataList) this.GHTElementClone(CtlType);
base.GHTActiveSubTest.Controls.Add(list1);
CtlBuilder(list1);
list1.GridLines = GridLines.Both;
list1.DataSource = GHTDataListBase.GHTGetSampleDataSource();
list1.DataBind();
this.GHTSubTestExpectedExceptionNotCaught("argumentOutOfRange");
}
catch (Exception exception9)
{
this.GHTSubTestUnexpectedExceptionCaught(exception9);
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_GridLines2");
list1 = (BaseDataList) this.GHTElementClone(CtlType);
base.GHTActiveSubTest.Controls.Add(list1);
CtlBuilder(list1);
list1.GridLines = GridLines.Horizontal;
list1.DataSource = GHTDataListBase.GHTGetSampleDataSource();
list1.DataBind();
}
catch (Exception exception10)
{
this.GHTSubTestUnexpectedExceptionCaught(exception10);
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_GridLines3");
list1 = (BaseDataList) this.GHTElementClone(CtlType);
base.GHTActiveSubTest.Controls.Add(list1);
CtlBuilder(list1);
list1.GridLines = GridLines.Vertical;
list1.DataSource = GHTDataListBase.GHTGetSampleDataSource();
list1.DataBind();
}
catch (Exception exception11)
{
this.GHTSubTestUnexpectedExceptionCaught(exception11);
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_GridLines4");
list1 = (BaseDataList) this.GHTElementClone(CtlType);
base.GHTActiveSubTest.Controls.Add(list1);
CtlBuilder(list1);
list1.GridLines = GridLines.None;
list1.DataSource = GHTDataListBase.GHTGetSampleDataSource();
list1.DataBind();
}
catch (Exception exception12)
{
this.GHTSubTestUnexpectedExceptionCaught(exception12);
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_GridLines5");
list1 = (BaseDataList) this.GHTElementClone(CtlType);
base.GHTActiveSubTest.Controls.Add(list1);
CtlBuilder(list1);
list1.GridLines = ~GridLines.None;
list1.DataSource = GHTDataListBase.GHTGetSampleDataSource();
list1.DataBind();
}
catch (ArgumentOutOfRangeException exception13)
{
this.GHTSubTestExpectedExceptionCaught(exception13);
}
catch (Exception exception14)
{
this.GHTSubTestUnexpectedExceptionCaught(exception14);
}
this.GHTSubTestEnd();
try
{
this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_GridLines5");
list1 = (BaseDataList) this.GHTElementClone(CtlType);
base.GHTActiveSubTest.Controls.Add(list1);
CtlBuilder(list1);
list1.GridLines = (GridLines) 4;
list1.DataSource = GHTDataListBase.GHTGetSampleDataSource();
list1.DataBind();
}
catch (ArgumentOutOfRangeException exception15)
{
this.GHTSubTestExpectedExceptionCaught(exception15);
}
catch (Exception exception16)
{
this.GHTSubTestUnexpectedExceptionCaught(exception16);
}
this.GHTSubTestEnd();
}
}
}
| {
"pile_set_name": "Github"
} |
### [Overview](/api_docs/index.md)
### [Python API](/api_docs/python/index.md)
python/framework.md
python/constant_op.md
python/state_ops.md
python/array_ops.md
python/math_ops.md
python/control_flow_ops.md
python/image.md
python/sparse_ops.md
python/io_ops.md
python/python_io.md
python/nn.md
python/client.md
python/train.md
python/script_ops.md
python/test.md
python/contrib.layers.md
python/contrib.losses.md
python/contrib.metrics.md
python/contrib.learn.md
python/contrib.framework.md
python/contrib.util.md
>>> [C++ API](/api_docs/cc/index.md)
cc/ClassEnv.md
cc/ClassRandomAccessFile.md
cc/ClassWritableFile.md
cc/ClassEnvWrapper.md
cc/ClassSession.md
cc/StructSessionOptions.md
cc/ClassStatus.md
cc/StructState.md
cc/ClassTensor.md
cc/ClassTensorShape.md
cc/StructTensorShapeDim.md
cc/ClassTensorShapeUtils.md
cc/ClassPartialTensorShape.md
cc/ClassPartialTensorShapeUtils.md
cc/ClassThread.md
cc/StructThreadOptions.md
| {
"pile_set_name": "Github"
} |
<?php
if (! function_exists('app_name')) {
/**
* Helper to grab the application name.
*
* @return mixed
*/
function app_name()
{
return config('app.name');
}
}
if (! function_exists('app_url')) {
/**
* Helper to grab the application url.
*
* @return mixed
*/
function app_url()
{
return config('app.url');
}
}
if (! function_exists('gravatar')) {
/**
* Access the gravatar helper.
*/
function gravatar()
{
return app('gravatar');
}
}
if (! function_exists('home_route')) {
/**
* Return the route to the "home" page depending on authentication/authorization status.
*
* @return string
*/
function home_route()
{
if (auth()->check()) {
if (auth()->user()->can('view backend')) {
return 'admin.dashboard';
}
return 'frontend.user.dashboard';
}
return 'frontend.index';
}
}
| {
"pile_set_name": "Github"
} |
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Modules specific tests cases
# protect against multiple inclusion
if [ $FILE_MODULE ]; then
return 0
else
FILE_MODULE=DONE
fi
source cpu.sh
source cpufreq.sh
source governor.sh
# Check basic insmod/rmmod
# $1: module
test_basic_insmod_rmmod()
{
printf "** Test: Running ${FUNCNAME[0]} **\n\n"
printf "Inserting $1 module\n"
# insert module
insmod $1
if [ $? != 0 ]; then
printf "Insmod $1 failed\n"
exit;
fi
printf "Removing $1 module\n"
# remove module
rmmod $1
if [ $? != 0 ]; then
printf "rmmod $1 failed\n"
exit;
fi
printf "\n"
}
# Insert cpufreq driver module and perform basic tests
# $1: cpufreq-driver module to insert
# $2: If we want to play with CPUs (1) or not (0)
module_driver_test_single()
{
printf "** Test: Running ${FUNCNAME[0]} for driver $1 and cpus_hotplug=$2 **\n\n"
if [ $2 -eq 1 ]; then
# offline all non-boot CPUs
for_each_non_boot_cpu offline_cpu
printf "\n"
fi
# insert module
printf "Inserting $1 module\n\n"
insmod $1
if [ $? != 0 ]; then
printf "Insmod $1 failed\n"
return;
fi
if [ $2 -eq 1 ]; then
# online all non-boot CPUs
for_each_non_boot_cpu online_cpu
printf "\n"
fi
# run basic tests
cpufreq_basic_tests
# remove module
printf "Removing $1 module\n\n"
rmmod $1
if [ $? != 0 ]; then
printf "rmmod $1 failed\n"
return;
fi
# There shouldn't be any cpufreq directories now.
for_each_cpu cpu_should_not_have_cpufreq_directory
printf "\n"
}
# $1: cpufreq-driver module to insert
module_driver_test()
{
printf "** Test: Running ${FUNCNAME[0]} **\n\n"
# check if module is present or not
ls $1 > /dev/null
if [ $? != 0 ]; then
printf "$1: not present in `pwd` folder\n"
return;
fi
# test basic module tests
test_basic_insmod_rmmod $1
# Do simple module test
module_driver_test_single $1 0
# Remove CPUs before inserting module and then bring them back
module_driver_test_single $1 1
printf "\n"
}
# find governor name based on governor module name
# $1: governor module name
find_gov_name()
{
if [ $1 = "cpufreq_ondemand.ko" ]; then
printf "ondemand"
elif [ $1 = "cpufreq_conservative.ko" ]; then
printf "conservative"
elif [ $1 = "cpufreq_userspace.ko" ]; then
printf "userspace"
elif [ $1 = "cpufreq_performance.ko" ]; then
printf "performance"
elif [ $1 = "cpufreq_powersave.ko" ]; then
printf "powersave"
elif [ $1 = "cpufreq_schedutil.ko" ]; then
printf "schedutil"
fi
}
# $1: governor string, $2: governor module, $3: policy
# example: module_governor_test_single "ondemand" "cpufreq_ondemand.ko" 2
module_governor_test_single()
{
printf "** Test: Running ${FUNCNAME[0]} for $3 **\n\n"
backup_governor $3
# switch to new governor
printf "Switch from $CUR_GOV to $1\n"
switch_show_governor $3 $1
# try removing module, it should fail as governor is used
printf "Removing $2 module\n\n"
rmmod $2
if [ $? = 0 ]; then
printf "WARN: rmmod $2 succeeded even if governor is used\n"
insmod $2
else
printf "Pass: unable to remove $2 while it is being used\n\n"
fi
# switch back to old governor
printf "Switchback to $CUR_GOV from $1\n"
restore_governor $3
printf "\n"
}
# Insert cpufreq governor module and perform basic tests
# $1: cpufreq-governor module to insert
module_governor_test()
{
printf "** Test: Running ${FUNCNAME[0]} **\n\n"
# check if module is present or not
ls $1 > /dev/null
if [ $? != 0 ]; then
printf "$1: not present in `pwd` folder\n"
return;
fi
# test basic module tests
test_basic_insmod_rmmod $1
# insert module
printf "Inserting $1 module\n\n"
insmod $1
if [ $? != 0 ]; then
printf "Insmod $1 failed\n"
return;
fi
# switch to new governor for each cpu
for_each_policy module_governor_test_single $(find_gov_name $1) $1
# remove module
printf "Removing $1 module\n\n"
rmmod $1
if [ $? != 0 ]; then
printf "rmmod $1 failed\n"
return;
fi
printf "\n"
}
# test modules: driver and governor
# $1: driver module, $2: governor module
module_test()
{
printf "** Test: Running ${FUNCNAME[0]} **\n\n"
# check if modules are present or not
ls $1 $2 > /dev/null
if [ $? != 0 ]; then
printf "$1 or $2: is not present in `pwd` folder\n"
return;
fi
# TEST1: Insert gov after driver
# insert driver module
printf "Inserting $1 module\n\n"
insmod $1
if [ $? != 0 ]; then
printf "Insmod $1 failed\n"
return;
fi
# run governor tests
module_governor_test $2
# remove driver module
printf "Removing $1 module\n\n"
rmmod $1
if [ $? != 0 ]; then
printf "rmmod $1 failed\n"
return;
fi
# TEST2: Insert driver after governor
# insert governor module
printf "Inserting $2 module\n\n"
insmod $2
if [ $? != 0 ]; then
printf "Insmod $2 failed\n"
return;
fi
# run governor tests
module_driver_test $1
# remove driver module
printf "Removing $2 module\n\n"
rmmod $2
if [ $? != 0 ]; then
printf "rmmod $2 failed\n"
return;
fi
}
| {
"pile_set_name": "Github"
} |
--skip-name-resolve
| {
"pile_set_name": "Github"
} |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <google/protobuf/util/internal/error_listener.h>
namespace google {
namespace protobuf {
namespace util {
namespace converter {
} // namespace converter
} // namespace util
} // namespace protobuf
} // namespace google
| {
"pile_set_name": "Github"
} |
config SOLO6X10
tristate "Softlogic 6x10 MPEG codec cards"
depends on PCI && VIDEO_DEV && SND
select VIDEOBUF_DMA_CONTIG
---help---
This driver supports the Softlogic based MPEG-4 and h.264 codec
codec cards.
| {
"pile_set_name": "Github"
} |
include/master-slave.inc
[connection master]
DROP TABLE IF EXISTS t1;
SET @@BINLOG_FORMAT = ROW;
SELECT @@BINLOG_FORMAT;
@@BINLOG_FORMAT
ROW
**** Partition RANGE testing ****
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
y YEAR, t DATE)
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
PARTITION p2 VALUES LESS THAN (1966),
PARTITION p3 VALUES LESS THAN (1986),
PARTITION p4 VALUES LESS THAN (2005),
PARTITION p5 VALUES LESS THAN MAXVALUE);
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM,
PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM,
PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM,
PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
--- On slave --
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM,
PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM,
PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM,
PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
ALTER TABLE t1 MODIFY vc TEXT;
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM,
PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM,
PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM,
PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM,
PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM,
PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM,
PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
**** Partition LIST testing ****
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
y YEAR, t DATE)
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142),
PARTITION p2 VALUES IN (412));
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM,
PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM,
PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM,
PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM,
PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
ALTER TABLE t1 MODIFY vc TEXT;
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM,
PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM,
PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (id)
(PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM,
PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM,
PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
**** Partition HASH testing ****
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
y YEAR, t DATE)
PARTITION BY HASH( YEAR(t) )
PARTITIONS 4;
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
ALTER TABLE t1 MODIFY vc TEXT;
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( YEAR(t))
PARTITIONS 4 */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
**** Partition by KEY ****
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
y YEAR, t DATE,PRIMARY KEY(id))
PARTITION BY KEY()
PARTITIONS 4;
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
PRIMARY KEY (`id`,`total`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
PRIMARY KEY (`id`,`total`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
ALTER TABLE t1 MODIFY vc TEXT;
--- On master ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
PRIMARY KEY (`id`,`total`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
--- On slave ---
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` mediumint(9) NOT NULL,
`b1` bit(8) DEFAULT NULL,
`vc` text,
`bc` char(255) DEFAULT NULL,
`d` decimal(10,4) DEFAULT '0.0000',
`f` float DEFAULT '0',
`total` bigint(20) unsigned NOT NULL DEFAULT '0',
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
PRIMARY KEY (`id`,`total`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY ()
PARTITIONS 4 */
"--- Insert into t1 --" as "";
--- Select from t1 on master ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
id hex(b1) vc bc d f total y t
2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
--- Update t1 on master --
UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
--- Check the update on master ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
id hex(b1) vc bc d f total y t
412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
--- Remove a record from t1 on master ---
DELETE FROM t1 WHERE id = 42;
--- Show current count on master for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
--- Show current count on slave for t1 ---
SELECT COUNT(*) FROM t1;
COUNT(*)
4
DELETE FROM t1;
DROP TABLE IF EXISTS t1;
include/rpl_end.inc
| {
"pile_set_name": "Github"
} |
aaaaa ICON "fon-flash.ico"
fon_flash_icon ICON "fon-flash.ico"
#include "wx/msw/wx.rc"
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// f32test/group/t_rawext.mmp
//
//
TARGET rawext.fxt
TARGETTYPE fsy
SOURCEPATH ../ext
SOURCE t_rawext.cpp
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
LIBRARY euser.lib efile.lib
UID 0x100039df 0x10000CEE
VENDORID 0x70000001
library emulator.lib
START WINS
WIN32_LIBRARY kernel32.lib
#if defined(VC32)
WIN32_LIBRARY chkstk.obj
#endif
BASEADDRESS 0x65000000
END
#include "../../../userlibandfileserver/fileserver/group/f32caps.mmh" // Capabilities of File Server process
SMPSAFE
| {
"pile_set_name": "Github"
} |
{
"check_exit_status": "yes",
"customize": {
"extra_dir": "",
"git_src_dir": "src",
"install_env": {
"BLAS_TYPE": "mkl",
"BUILD_MATLAB": 0,
"BUILD_PYTHON": 0,
"BUILD_PYTHON_LAYER": 0,
"CAFFE_BUILD_PYTHON": "OFF",
"CMAKE_BUILD_SHARED_LIBS": 0,
"CMAKE_CONFIG": "Release",
"CPU_ONLY": 1,
"PACKAGE_BUILD_TYPE": "cmake",
"PACKAGE_CONFIGURE_FLAGS": "",
"PACKAGE_CONFIGURE_FLAGS_LINUX": "",
"PACKAGE_CONFIGURE_FLAGS_WINDOWS": "",
"PACKAGE_COPY": "NO",
"PACKAGE_GIT": "YES",
"PACKAGE_GIT_CHECKOUT_LINUX": "request_artifact",
"PACKAGE_PATCH": "YES",
"PACKAGE_SKIP_BUILD_ERROR": "YES",
"PACKAGE_SKIP_CLEAN_INSTALL": "NO",
"PACKAGE_SKIP_CLEAN_OBJ": "YES",
"PACKAGE_SKIP_CLEAN_SRC_DIR": "YES",
"PACKAGE_SUB_DIR": "src",
"PACKAGE_SUB_DIR1": "src",
"PACKAGE_URL_LINUX": "https://github.com/intel/caffe",
"PYTHON_EXE": "python",
"RUN_INSTALL": 0,
"RUN_LINT": 0,
"RUN_TESTS": 0,
"USE_LEVELDB": "ON",
"USE_LMDB": "ON",
"USE_OPENMP": 1,
"USE_PREBUILT_DEPENDENCIES": "OFF",
"WITH_NINJA": 0
},
"use_git_revision": "yes",
"version": "request"
},
"deps": {
"cmake": {
"force_target_as_host": "yes",
"local": "yes",
"name": "cmake",
"skip_from_bat": "yes",
"sort": 5,
"tags": "tool,cmake"
},
"compiler": {
"local": "yes",
"name": "C++ compiler",
"sort": 10,
"tags": "compiler,lang-cpp"
},
"lib-boost": {
"local": "yes",
"name": "Boost library",
"skip_default": "yes",
"sort": 25,
"tags": "lib,boost",
"version_from": [
1,
64,
0
]
},
"lib-gflags": {
"force_env_init": "yes",
"local": "yes",
"name": "GFlags library",
"skip_installed": {
"android": "yes",
"win": "yes"
},
"sort": 12,
"tags": "lib,gflags",
"update_tags_by_target_platform2": {
"android": "v2.2.0",
"win": "v2.2.0"
}
},
"lib-glog": {
"local": "yes",
"name": "GLog library",
"skip_installed": {
"android": "yes",
"win": "yes"
},
"sort": 14,
"tags": "lib,glog"
},
"lib-hdf5": {
"local": "yes",
"name": "HDF5 library",
"no_tags": "vstatic",
"only_for_target_os_tags": [
"linux",
"windows"
],
"skip_installed": {
"win": "yes"
},
"sort": 19,
"tags": "lib,hdf5"
},
"lib-lmdb": {
"local": "yes",
"name": "LMDB library",
"only_for_target_os_tags": [
"linux",
"windows"
],
"sort": 18,
"tags": "lib,lmdb",
"update_tags_by_target_platform2": {
"win": "v0.9.21"
}
},
"lib-opencv": {
"local": "yes",
"name": "OpenCV library",
"skip_installed": {
"android": "yes",
"win": "yes"
},
"sort": 20,
"tags": "lib,opencv"
},
"lib-protobuf": {
"local": "yes",
"name": "ProtoBuf library",
"only_for_target_os_tags": [
"android"
],
"skip_installed": {
"android": "yes",
"win": "yes"
},
"sort": 110,
"tags": "lib,protobuf,v3.1.0"
},
"lib-protobuf-host": {
"force_target_as_host": "yes",
"local": "yes",
"name": "ProtoBuf host compiler",
"skip_installed": {
"android": "yes",
"win": "yes"
},
"sort": 115,
"tags": "lib,protobuf-host,v3.1.0"
}
},
"end_full_path": {
"android": "install/lib/libcaffe.so",
"linux": "install/bin/caffe",
"win": "install/bin/caffe.exe"
},
"need_cpu_info": "yes",
"only_for_host_os_tags": [
"linux"
],
"only_for_target_os_tags": [
"linux"
],
"package_extra_name": " (intel, request)",
"process_script": "install",
"soft_uoa": "04ab08137582bd03",
"suggested_path": "lib-caffe-intel-request-cpu",
"tags": [
"lib",
"caffe",
"intel",
"vrequest",
"vcpu"
],
"template": "yes",
"template_type": "Caffe AI framework (rebuild for AWS and Intel)",
"use_preprocess_scripts_from_another_entry": {
"data_uoa": "34479ac968f42cfc",
"module_uoa": "84e27ad9dd12e734"
},
"use_scripts_from_another_entry": {
"data_uoa": "cd9ccc74060b3d18",
"module_uoa": "script"
}
}
| {
"pile_set_name": "Github"
} |
/** @file
This library provides helper functions to prevent integer overflow during
type conversion, addition, subtraction, and multiplication.
Copyright (c) 2017, Microsoft Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**/
#include <Base.h>
#include <Library/SafeIntLib.h>
/**
INT32 -> UINTN conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to UINTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeInt32ToUintn (
IN INT32 Operand,
OUT UINTN *Result
)
{
return SafeInt32ToUint64 (Operand, (UINT64 *) Result);
}
/**
UINT32 -> INTN conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to INTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUint32ToIntn (
IN UINT32 Operand,
OUT INTN *Result
)
{
if (Result == NULL) {
return RETURN_INVALID_PARAMETER;
}
*Result = Operand;
return RETURN_SUCCESS;
}
/**
INTN -> INT32 conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to INT32_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeIntnToInt32 (
IN INTN Operand,
OUT INT32 *Result
)
{
return SafeInt64ToInt32 ((INT64) Operand, Result);
}
/**
INTN -> UINT32 conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to UINT32_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeIntnToUint32 (
IN INTN Operand,
OUT UINT32 *Result
)
{
return SafeInt64ToUint32 ((INT64)Operand, Result);
}
/**
UINTN -> UINT32 conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to UINT32_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUintnToUint32 (
IN UINTN Operand,
OUT UINT32 *Result
)
{
return SafeUint64ToUint32 ((UINT64)Operand, Result);
}
/**
UINTN -> INT64 conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to INT64_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUintnToInt64 (
IN UINTN Operand,
OUT INT64 *Result
)
{
return SafeUint64ToInt64 ((UINT64)Operand, Result);
}
/**
INT64 -> INTN conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to INTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeInt64ToIntn (
IN INT64 Operand,
OUT INTN *Result
)
{
if (Result == NULL) {
return RETURN_INVALID_PARAMETER;
}
*Result = (INTN)Operand;
return RETURN_SUCCESS;
}
/**
INT64 -> UINTN conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to UINTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeInt64ToUintn (
IN INT64 Operand,
OUT UINTN *Result
)
{
return SafeInt64ToUint64 (Operand, (UINT64 *)Result);
}
/**
UINT64 -> UINTN conversion
Converts the value specified by Operand to a value specified by Result type
and stores the converted value into the caller allocated output buffer
specified by Result. The caller must pass in a Result buffer that is at
least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the conversion results in an overflow or an underflow condition, then
Result is set to UINTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Operand Operand to be converted to new type
@param[out] Result Pointer to the result of conversion
@retval RETURN_SUCCESS Successful conversion
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUint64ToUintn (
IN UINT64 Operand,
OUT UINTN *Result
)
{
if (Result == NULL) {
return RETURN_INVALID_PARAMETER;
}
*Result = Operand;
return RETURN_SUCCESS;
}
/**
UINTN addition
Performs the requested operation using the input parameters into a value
specified by Result type and stores the converted value into the caller
allocated output buffer specified by Result. The caller must pass in a
Result buffer that is at least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the requested operation results in an overflow or an underflow condition,
then Result is set to UINTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Augend A number to which addend will be added
@param[in] Addend A number to be added to another
@param[out] Result Pointer to the result of addition
@retval RETURN_SUCCESS Successful addition
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUintnAdd (
IN UINTN Augend,
IN UINTN Addend,
OUT UINTN *Result
)
{
return SafeUint64Add ((UINT64)Augend, (UINT64)Addend, (UINT64 *)Result);
}
/**
UINTN subtraction
Performs the requested operation using the input parameters into a value
specified by Result type and stores the converted value into the caller
allocated output buffer specified by Result. The caller must pass in a
Result buffer that is at least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the requested operation results in an overflow or an underflow condition,
then Result is set to UINTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Minuend A number from which another is to be subtracted.
@param[in] Subtrahend A number to be subtracted from another
@param[out] Result Pointer to the result of subtraction
@retval RETURN_SUCCESS Successful subtraction
@retval RETURN_BUFFER_TOO_SMALL Underflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUintnSub (
IN UINTN Minuend,
IN UINTN Subtrahend,
OUT UINTN *Result
)
{
return SafeUint64Sub ((UINT64)Minuend, (UINT64)Subtrahend, (UINT64 *)Result);
}
/**
UINTN multiplication
Performs the requested operation using the input parameters into a value
specified by Result type and stores the converted value into the caller
allocated output buffer specified by Result. The caller must pass in a
Result buffer that is at least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the requested operation results in an overflow or an underflow condition,
then Result is set to UINTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Multiplicand A number that is to be multiplied by another
@param[in] Multiplier A number by which the multiplicand is to be multiplied
@param[out] Result Pointer to the result of multiplication
@retval RETURN_SUCCESS Successful multiplication
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeUintnMult (
IN UINTN Multiplicand,
IN UINTN Multiplier,
OUT UINTN *Result
)
{
return SafeUint64Mult ((UINT64)Multiplicand, (UINT64)Multiplier, (UINT64 *)Result);
}
/**
INTN Addition
Performs the requested operation using the input parameters into a value
specified by Result type and stores the converted value into the caller
allocated output buffer specified by Result. The caller must pass in a
Result buffer that is at least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the requested operation results in an overflow or an underflow condition,
then Result is set to INTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Augend A number to which addend will be added
@param[in] Addend A number to be added to another
@param[out] Result Pointer to the result of addition
@retval RETURN_SUCCESS Successful addition
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeIntnAdd (
IN INTN Augend,
IN INTN Addend,
OUT INTN *Result
)
{
return SafeInt64Add ((INT64)Augend, (INT64)Addend, (INT64 *)Result);
}
/**
INTN Subtraction
Performs the requested operation using the input parameters into a value
specified by Result type and stores the converted value into the caller
allocated output buffer specified by Result. The caller must pass in a
Result buffer that is at least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the requested operation results in an overflow or an underflow condition,
then Result is set to INTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Minuend A number from which another is to be subtracted.
@param[in] Subtrahend A number to be subtracted from another
@param[out] Result Pointer to the result of subtraction
@retval RETURN_SUCCESS Successful subtraction
@retval RETURN_BUFFER_TOO_SMALL Underflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeIntnSub (
IN INTN Minuend,
IN INTN Subtrahend,
OUT INTN *Result
)
{
return SafeInt64Sub ((INT64)Minuend, (INT64)Subtrahend, (INT64 *)Result);
}
/**
INTN multiplication
Performs the requested operation using the input parameters into a value
specified by Result type and stores the converted value into the caller
allocated output buffer specified by Result. The caller must pass in a
Result buffer that is at least as large as the Result type.
If Result is NULL, RETURN_INVALID_PARAMETER is returned.
If the requested operation results in an overflow or an underflow condition,
then Result is set to INTN_ERROR and RETURN_BUFFER_TOO_SMALL is returned.
@param[in] Multiplicand A number that is to be multiplied by another
@param[in] Multiplier A number by which the multiplicand is to be multiplied
@param[out] Result Pointer to the result of multiplication
@retval RETURN_SUCCESS Successful multiplication
@retval RETURN_BUFFER_TOO_SMALL Overflow
@retval RETURN_INVALID_PARAMETER Result is NULL
**/
RETURN_STATUS
EFIAPI
SafeIntnMult (
IN INTN Multiplicand,
IN INTN Multiplier,
OUT INTN *Result
)
{
return SafeInt64Mult ((INT64)Multiplicand, (INT64)Multiplier, (INT64 *)Result);
}
| {
"pile_set_name": "Github"
} |
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
| {
"pile_set_name": "Github"
} |
{
"dataset_reader": {
"class_name": "paraphraser_reader",
"data_path": "{DOWNLOADS_PATH}/paraphraser_data"
},
"dataset_iterator": {
"class_name": "siamese_iterator",
"seed": 243
},
"chainer": {
"in": ["x"],
"in_y": ["y"],
"pipe": [
{
"id": "preproc",
"class_name": "siamese_preprocessor",
"use_matrix": false,
"max_sequence_length": 28,
"fit_on": ["x"],
"in": ["x"],
"out": ["x_proc"],
"sent_vocab": {
"id": "siam_sent_vocab",
"class_name": "simple_vocab",
"save_path": "{MODELS_PATH}/paraphraser_vocabs/sent.dict",
"load_path": "{MODELS_PATH}/paraphraser_vocabs/sent.dict"
},
"tokenizer": {
"class_name": "nltk_tokenizer"
},
"vocab": {
"id": "siam_vocab",
"class_name": "simple_vocab",
"save_path": "{MODELS_PATH}/paraphraser_vocabs/tok.dict",
"load_path": "{MODELS_PATH}/paraphraser_vocabs/tok.dict"
},
"embedder": {
"id": "siam_embedder",
"class_name": "fasttext",
"load_path": "{DOWNLOADS_PATH}/embeddings/ft_native_300_ru_wiki_lenta_lower_case.bin"
}
},
{
"id": "embeddings",
"class_name": "emb_mat_assembler",
"embedder": "#siam_embedder",
"vocab": "#siam_vocab"
},
{
"id": "model",
"class_name": "mpm_nn",
"len_vocab": "#siam_vocab.len",
"use_matrix": "#preproc.use_matrix",
"attention": true,
"max_sequence_length": "#preproc.max_sequence_length",
"emb_matrix": "#embeddings.emb_mat",
"embedding_dim": "#siam_embedder.dim",
"seed": 243,
"hidden_dim": 200,
"learning_rate": 1e-3,
"triplet_loss": false,
"batch_size": 256,
"save_path": "{MODELS_PATH}/paraphraser_model/model_weights.h5",
"load_path": "{MODELS_PATH}/paraphraser_model/model_weights.h5",
"preprocess": "#preproc.__call__"
},
{
"in": ["x_proc"],
"in_y": ["y"],
"out": ["y_predicted"],
"class_name": "siamese_predictor",
"model": "#model",
"ranking": false,
"attention": true,
"batch_size": "#model.batch_size",
"preproc_func": "#preproc.__call__"
}
],
"out": ["y_predicted"]
},
"train": {
"epochs": 20,
"batch_size": 256,
"pytest_max_batches": 2,
"train_metrics": ["f1", "acc", "log_loss"],
"metrics": ["f1", "acc", "log_loss"],
"validation_patience": 10,
"val_every_n_epochs": 1,
"log_every_n_batches": 12,
"class_name": "nn_trainer",
"evaluation_targets": [
"valid",
"test"
]
},
"metadata": {
"variables": {
"ROOT_PATH": "~/.deeppavlov",
"DOWNLOADS_PATH": "{ROOT_PATH}/downloads",
"MODELS_PATH": "{ROOT_PATH}/models"
},
"requirements": [
"{DEEPPAVLOV_PATH}/requirements/tf.txt",
"{DEEPPAVLOV_PATH}/requirements/fasttext.txt"
],
"download": [
{
"url": "http://files.deeppavlov.ai/deeppavlov_data/paraphrase_ident_paraphraser_tuned.tar.gz",
"subdir": "{MODELS_PATH}/paraphraser_model"
},
{
"url": "http://files.deeppavlov.ai/datasets/paraphraser.zip",
"subdir": "{DOWNLOADS_PATH}/paraphraser_data"
},
{
"url": "http://files.deeppavlov.ai/datasets/paraphraser_gold.zip",
"subdir": "{DOWNLOADS_PATH}/paraphraser_data"
},
{
"url": "http://files.deeppavlov.ai/embeddings/ft_native_300_ru_wiki_lenta_lower_case/ft_native_300_ru_wiki_lenta_lower_case.bin",
"subdir": "{DOWNLOADS_PATH}/embeddings"
}
]
}
} | {
"pile_set_name": "Github"
} |
// Copyright 2010 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: [email protected] (Jonathan Tang)
#include "string_buffer.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "string_piece.h"
#include "util.h"
struct GumboInternalParser;
// Size chosen via statistical analysis of ~60K websites.
// 99% of text nodes and 98% of attribute names/values fit in this initial size.
static const size_t kDefaultStringBufferSize = 5;
static void maybe_resize_string_buffer(struct GumboInternalParser* parser,
size_t additional_chars, GumboStringBuffer* buffer) {
size_t new_length = buffer->length + additional_chars;
size_t new_capacity = buffer->capacity;
while (new_capacity < new_length) {
new_capacity *= 2;
}
if (new_capacity != buffer->capacity) {
char* new_data = gumbo_parser_allocate(parser, new_capacity);
memcpy(new_data, buffer->data, buffer->length);
gumbo_parser_deallocate(parser, buffer->data);
buffer->data = new_data;
buffer->capacity = new_capacity;
}
}
void gumbo_string_buffer_init(
struct GumboInternalParser* parser, GumboStringBuffer* output) {
output->data = gumbo_parser_allocate(parser, kDefaultStringBufferSize);
output->length = 0;
output->capacity = kDefaultStringBufferSize;
}
void gumbo_string_buffer_reserve(struct GumboInternalParser* parser,
size_t min_capacity, GumboStringBuffer* output) {
maybe_resize_string_buffer(parser, min_capacity - output->length, output);
}
void gumbo_string_buffer_append_codepoint(
struct GumboInternalParser* parser, int c, GumboStringBuffer* output) {
// num_bytes is actually the number of continuation bytes, 1 less than the
// total number of bytes. This is done to keep the loop below simple and
// should probably change if we unroll it.
int num_bytes, prefix;
if (c <= 0x7f) {
num_bytes = 0;
prefix = 0;
} else if (c <= 0x7ff) {
num_bytes = 1;
prefix = 0xc0;
} else if (c <= 0xffff) {
num_bytes = 2;
prefix = 0xe0;
} else {
num_bytes = 3;
prefix = 0xf0;
}
maybe_resize_string_buffer(parser, num_bytes + 1, output);
output->data[output->length++] = prefix | (c >> (num_bytes * 6));
for (int i = num_bytes - 1; i >= 0; --i) {
output->data[output->length++] = 0x80 | (0x3f & (c >> (i * 6)));
}
}
void gumbo_string_buffer_append_string(struct GumboInternalParser* parser,
GumboStringPiece* str, GumboStringBuffer* output) {
maybe_resize_string_buffer(parser, str->length, output);
memcpy(output->data + output->length, str->data, str->length);
output->length += str->length;
}
char* gumbo_string_buffer_to_string(
struct GumboInternalParser* parser, GumboStringBuffer* input) {
char* buffer = gumbo_parser_allocate(parser, input->length + 1);
memcpy(buffer, input->data, input->length);
buffer[input->length] = '\0';
return buffer;
}
void gumbo_string_buffer_clear(
struct GumboInternalParser* parser, GumboStringBuffer* input) {
input->length = 0;
}
void gumbo_string_buffer_destroy(
struct GumboInternalParser* parser, GumboStringBuffer* buffer) {
gumbo_parser_deallocate(parser, buffer->data);
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="ie=7"/>
<title> Ecmall Sql 注入 第二弹 | WooYun-2014-65732 | WooYun.org </title>
<meta name="author" content="80sec"/>
<meta name="copyright" content="http://www.wooyun.org/"/>
<meta name="keywords" content="ShopEx漏洞,′雨。,SQL注射漏洞,wooyun,应用安全,web安全,系统安全,网络安全,漏洞公布,漏洞报告,安全资讯。"/>
<meta name="description" content="已打上20140618补丁。再来试试。|WooYun是一个位于厂商和安全研究者之间的漏洞报告平台,注重尊重,进步,与意义"/>
<link rel="icon" href="http://wooyun.org/favicon.ico" sizes="32x32" />
<link href="../css/style.css?v=201501291909" rel="stylesheet" type="text/css"/>
<script src="https://static.wooyun.org/static/js/jquery-1.4.2.min.js" type="text/javascript"></script>
</head>
<body id="bugDetail">
<style>
#myBugListTab { position:relative; display:inline; border:none }
#myBugList { position:absolute; display:none; margin-left:309px; * margin-left:-60px; * margin-top:18px ; border:#c0c0c0 1px solid; padding:2px 7px; background:#FFF }
#myBugList li { text-align:left }
</style>
<script type="text/javascript">
$(document).ready(function(){
if ( $("#__cz_push_d_object_box__") ) {
$("script[src^='http://cip4.czpush.com/']").attr("src"," ").remove();
$("#__cz_push_d_object_box__").empty().remove();
$("a[id^='__czUnion_a']").attr("href","#").remove();
}
if ( $("#ooDiv") ) {
$("#ooDiv").empty().parent("div").remove();
}
$("#myBugListTab").toggle(
function(){
$("#myBugList").css("display","block");
},
function(){
$("#myBugList").css("display","none");
}
);
if ( $(window).scrollTop() > 120 ) {
$("#back-to-top").fadeIn(300);
} else {
$("#back-to-top").fadeOut(300);
}
$(window).scroll(function(){
if ( $(window).scrollTop() > 120 ) {
$("#back-to-top").fadeIn(300);
} else {
$("#back-to-top").fadeOut(300);
}
});
$("#back-to-top a").click(function() {
$('body,html').animate({scrollTop:0},300);
return false;
});
$("#go-to-comment a").click(function() {
var t = $("#replys").offset().top - 52;
$('body,html').animate({scrollTop:t},300);
return false;
});
});
function gofeedback(){
var bugid=$("#fbid").val();
if(bugid){
var url="/feedback.php?bugid="+bugid;
}else{
var url="/feedback.php"
}
window.open(url);
}
</script>
<div class="go-to-wrapper">
<ul class="go-to">
<li id="go-to-comment" title="转到评论"><a href="wooyun-2014-065732#">转到评论</a></li>
<li id="go-to-feedback" title="我要反馈"><a href="javascript:void(0)" onclick="gofeedback()">我要反馈</a></li>
<li id="back-to-top" title="回到顶部"><a href="wooyun-2014-065732#">回到顶部</a></li>
</ul>
</div>
<div class="banner">
<div class="logo">
<h1>WooYun.org</h1>
<div class="weibo"><iframe width="136" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="http://widget.weibo.com/relationship/followbutton.php?language=zh_cn&width=136&height=24&uid=1981622273&style=2&btn=red&dpc=1"></iframe>
</div>
<div class="wxewm">
<a class="ewmthumb" href="javascript:void(0)"><span><img src="https://static.wooyun.org/static/images/ewm.jpg"width="220" border="0"></span><img src="https://static.wooyun.org/static/images/weixin_30.png"width="22" border="0"></a>
</div>
</div>
<div class="login">
<a href="http://wooyun.org/user.php?action=login">登录</a> | <a href="http://wooyun.org/user.php?action=register" class="reg">注册</a>
</div>
</div>
<div class="nav" id="nav_sc">
<ul>
<li><a href="http://wooyun.org/index.php">首页</a></li>
<li><a href="http://wooyun.org/corps/">厂商列表</a></li>
<li><a href="http://wooyun.org/whitehats/">白帽子</a></li>
<li><a href="http://wooyun.org/top/">乌云榜</a></li>
<li><a href="http://wooyun.org/teams/">团队</a></li>
<li><a href="http://wooyun.org/bugs/">漏洞列表</a></li>
<li class="new"><a href="http://wooyun.org/bug/submit">提交漏洞</a></li>
<!--li><a href="/corp_actions">厂商活动</a></li-->
<!--<li><a target='_blank' href="http://security.wooyun.org/">安全中心</a></li>-->
<li><a href="http://summit.wooyun.org" target="_blank" style="color:rgb(246,172,110);font-size:14px;font-weight:blod">乌云峰会</a></li>
<!--li><a href="/job/">企业招聘</a></li-->
<li><a href="http://job.wooyun.org" target="_blank">乌云招聘</a></li>
<li><a href="http://drops.wooyun.org" target="_blank">知识库</a></li>
<li><a href="http://wooyun.org/notice/">公告</a></li>
</ul>
<form action="http://wooyun.org/searchbug.php" method="post" id="searchbox">
<input type="text" name="q" id="search_input" />
<input type="submit" value="搜索" id="search_button" />
</form>
</div>
<div class="bread" style="padding-top: 4px;">
<div style="float:left">当前位置:<a href="http://wooyun.org/index.php">WooYun</a> >> <a href="wooyun-2014-065732#">漏洞信息</a></div>
</div>
<script language="javascript">
var _LANGJS = {"COMMENT_LIKE_SELF":"\u4e0d\u80fd\u81ea\u5df1\u8d5e\u81ea\u5df1\u7684\u8bc4\u8bba","COMMENT_LIKED":"\u5df2\u8d5e\u6b64\u8bc4\u8bba","COMMENT_NOT":"\u6b64\u8bc4\u8bba\u4e0d\u5b58\u5728","COMMENT_FILL":"\u8bf7\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","COMMENT_STAT":"\u8bc4\u8bba\u4e0d\u80fd\u4e3a\u7a7a","COMMENT_LOGIN":"\u767b\u9646\u540e\u624d\u80fd\u8bc4\u8bba","COMMENT_GOOD_DONE":"\u5df2\u8d5e\u8fc7\u6b64\u6761\u8bc4\u8bba","COMMENT_SELF":"\u4e0d\u80fd\u8bc4\u4ef7\u81ea\u5df1\u53d1\u5e03\u7684\u8bc4\u8bba","COMMENT_CLICK_FILL":"\u70b9\u51fb\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","FAIL":"\u64cd\u4f5c\u5931\u8d25","FAIL_MANAGE":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u4e0e\u7ba1\u7406\u5458\u8054\u7cfb","FAIL_NO_WHITEHATS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u767d\u5e3d\u5b50","FAIL_NO_CORPS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u5382\u5546","BUGS_CORPS_SELECT":"\u9009\u62e9\u5382\u5546(\u53ef\u8f93\u5165\u5173\u952e\u5b57\u641c\u7d22)","BUGS_CORPS_OTHER":"Other\/\u5176\u5b83\u5382\u5546","BUGS_CORPS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u7c7b\u578b","BUGS_CORPS_NAME_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u540d\u79f0","BUGS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u7c7b\u578b\uff0c\u4e71\u9009\u6263\u5206","BUGS_TITLE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u6807\u9898","BUGS_HARMLEVEL_STAT":"\u8be5\u6f0f\u6d1e\u7684\u5371\u5bb3\u7b49\u7ea7","BUGS_DESCRIPTION_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\u53ef\u4ee5\u7b80\u5355\u63cf\u8ff0\u6f0f\u6d1e\u7684\u5371\u5bb3\u548c\u6210\u56e0\uff0c\u4e0d\u8981\u900f\u6f0f\u6f0f\u6d1e\u7684\u7ec6\u8282","BUGS_CONTENT_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u8be6\u7ec6\u63cf\u8ff0\uff0c\u8bf7\u5c3d\u91cf\u591a\u7684\u6df1\u5165\u7ec6\u8282\u4ee5\u65b9\u4fbf\u5bf9\u6f0f\u6d1e\u7684\u7406\u89e3\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_POC_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6982\u5ff5\u6027\u8bc1\u660e\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_PATCH_STAT":"\u5efa\u8bae\u7684\u6f0f\u6d1e\u4fee\u590d\u65b9\u6848\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_TEST_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6807\u51c6\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u66f4\u4e3a\u65b9\u4fbf\u7684\u5bf9\u6f0f\u6d1e\u8fdb\u884c\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff0c\u6d4b\u8bd5\u4ee3\u7801\u5bf9\u5916\u9ed8\u8ba4\u4e0d\u663e\u793a\uff0c<br\/>\u5176\u4ed6\u767d\u5e3d\u5b50\u652f\u4ed8\u4e4c\u4e91\u5e01\u67e5\u770b\u540e\u4f60\u5c06\u83b7\u5f97\u989d\u5916\u4e4c\u4e91\u5e01\uff0c<br\/>\u540c\u65f6\u4e5f\u5c06\u5728\u4f60\u7684\u4e2a\u4eba\u9875\u9762\u4f53\u73b0\u4f60\u7684\u6d4b\u8bd5\u4ee3\u7801\u7f16\u5199\u80fd\u529b\u3002","BUGS_QUESTION_SELECT":"\u8bf7\u9009\u62e9\u95ee\u9898\u5382\u5546","BUGS_TITLE_NOTICE":"\u6f0f\u6d1e\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a","BUGS_RANK_NOTICE1":"\u8bf7\u586b\u5199\u81ea\u8bc4Rank","BUGS_RANK_NOTICE2":"\u81ea\u8bc4Rank\u4e3a\u5927\u4e8e0\u7684\u6570\u5b57","BUGS_TYPE_SELECT":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7c7b\u578b","BUGS_TYPE_NOTICE":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u7c7b\u578b","BUGS_HARMLEVEL_SELECT":"\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_NOTICE":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_LOWER":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4f4e \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a1-5","BUGS_HARMLEVEL_MIDDLE":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4e2d \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a5-10","BUGS_HARMLEVEL_HIGH":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u9ad8 \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a10-20","BUGS_AREA_SELECT":"\u8bf7\u9009\u62e9\u5730\u533a\uff01","BUGS_DOMAILS":"\u6f0f\u6d1e\u6240\u5728\u57df\u540d(\u5982qq.com)","BUGS_DOMAIN_FILL":"\u8bf7\u586b\u5199\u57df\u540d\uff01","BUGS_DETAIL_MORE":"\u67e5\u770b\u8be6\u60c5","BUGS_IGNORE_DAYS":"\u8ddd\u6f0f\u6d1e\u5ffd\u7565\u8fd8\u6709","BUGS_CONFIRM_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb","BUGS":"\u6f0f\u6d1e","BUGS_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u5411\u516c\u4f17\u516c\u5f00\u8fd8\u6709","BUGS_IGNORE_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u672a\u786e\u8ba4\u65e0\u5f71\u54cd\u5ffd\u7565\u8fd8\u6709","BUGS_REPAIR_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb\u4fee\u590d\u6f0f\u6d1e","BUGS_HARMLEVEL_REMIND":"\u8bf7\u9009\u62e9\u5371\u5bb3\u7b49\u7ea7","BUGS_RANK_STAT":"rank\u4e3a1-20\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT1":"rank\u4e3a1-5\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT2":"rank\u4e3a5-10\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT3":"rank\u4e3a10-20\u7684\u6b63\u6574\u6570","BUGS_COMPLEMENT_REASON":"\u6dfb\u52a0\u5bf9\u6f0f\u6d1e\u7684\u8865\u5145\u8bf4\u660e\u4ee5\u53ca\u505a\u51fa\u8bc4\u4ef7\u7684\u7406\u7531","BUGS_REPLY_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u56de\u590d","BUGS_IGNORE_CONFIRM":"\u786e\u5b9a\u5ffd\u7565\u6b64\u6f0f\u6d1e\u5417","BUGS_STATUS_NEW_UPDATE":"\u66f4\u6539\u6f0f\u6d1e\u7684\u6700\u65b0\u72b6\u6001","BUGS_STATUS_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u72b6\u6001","BUGS_PUBLIC_ADVANCE":"\u786e\u5b9a\u63d0\u524d\u516c\u5f00\u6b64\u6f0f\u6d1e\u5417","BUGS_COUNT":"\u6f0f\u6d1e\u6570","BUGS_REPLY_HAT":"\u56de\u590d\u6b64\u4eba","BUGS_DELAY_CONFIRM":"\u786e\u5b9a\u8981\u5ef6\u671f\u4e48?","BUGS_DELAY":"\u7533\u8bf7\u5ef6\u671f","BUGS_DELAY_DONE":"\u5df2\u7ecf\u5ef6\u671f","BUGS_RISK_CONFIM":"\u786e\u5b9a\u6b64\u6f0f\u6d1e\u4e3a\u9ad8\u5371\u5417?","BUGS_NULL_EDITE":"\u7559\u7a7a\u8868\u793a\u4e0d\u4fee\u6539","BUGS_DONE_CONFIRM":"\u8be5\u64cd\u4f5c\u6682\u65f6\u4e0d\u53ef\u9006\uff0c\u786e\u5b9a\uff1f","BUGS_UPUBLIC":"\u4f60\u4ece\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_UPUBLIC1":"\u91cc\u53c8\u83b7\u5f97\u4e86","BUGS_PRECHECK":"\u6709\u4eba\u63d0\u524d\u67e5\u770b\u4e86\u4f60\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_PRECHECK_UNPUBLIC":"\u63d0\u524d\u67e5\u770b\u672a\u516c\u5f00\u6f0f\u6d1e","BUGS_NUM":"\u6f0f\u6d1e\u6570\u91cf","RANKAVG":"\u4eba\u5747\u8d21\u732e Rank","CAPTCHA_GET":"\u83b7\u53d6\u9a8c\u8bc1\u7801","CAPTCHA_FILL":"\u8bf7\u8f93\u5165\u56fe\u7247\u4e2d\u7684\u9a8c\u8bc1\u7801","CAPTCHA_NULL":"\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","CAPTCHA_ERROR":"\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef","CAPTCHA_PHONE_ERROR":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e","CAPTCHA_PHONE_SEND":"\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\u5230\u4f60\u7684\u624b\u673a\u4e0a\u8bf7\u6ce8\u610f\u67e5\u6536","CAPTCHA_SEND_AGAIN":"\u540e\u53ef\u91cd\u53d1","CAPTCHA_SEND_OVER":"\u77ed\u4fe1\u5df2\u53d1\u9001\u6210\u529f,\u9a8c\u8bc1\u7801\u533a\u5206\u5927\u5c0f\u5199","CAPTCHA_PHONE_NO":"\u4e0d\u9700\u8981\u77ed\u4fe1\u9a8c\u8bc1\u7801","CAPTCHA_PHONE_NULL":"\u77ed\u4fe1\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PHONE_TYPE_ERROR":"\u7535\u8bdd\u683c\u5f0f\u4e0d\u5bf9","PHONE_NOTING":"\u7535\u8bdd\u4e0d\u80fd\u4e3a\u7a7a","PHONE_FILL":"\u8bf7\u586b\u5199\u624b\u673a\u53f7","PHONE_CAPTCHA_NOTING":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_NOTING":"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_CONFIRM_NOTING":"\u5bc6\u7801\u786e\u8ba4\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_PAY_LESS":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u5c11\u4e8e6\u4f4d","PASSWORD_FILL_DIFFERENT":"\u8f93\u5165\u7684\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u6837","PASSWORD_PAY_LOGIN_SAME":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u540c\u767b\u9646\u5bc6\u7801\u4e00\u6837","PASSWORD_PAY_FILL":"\u8bf7\u586b\u5199\u652f\u4ed8\u5bc6\u7801","PASSWORD_LENGH_LESS":"\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u5c0f\u4e8e6\u4f4d","PASSWORD_SEND_OK":"\u53d1\u9001\u5bc6\u7801\u90ae\u4ef6\u6210\u529f","PASSWORD_OFER_WRROR":"\u60a8\u63d0\u4f9b\u7684\u627e\u56de\u5bc6\u7801\u4fe1\u606f\u4e0d\u6b63\u786e","PASSWORD_OLD_ERROR":"\u539f\u5bc6\u7801\u9519\u8bef","PASSWORD_UPDATE_OK":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","EMAILL_USED":"\u90ae\u7bb1\u5df2\u88ab\u5360\u7528","EMAILL_NULL":"\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01","NOTING":"\u65e0","LEAVEWORDS_NULL":"\u7559\u8a00\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a","LOGIN_FIRST":"\u8bf7\u5148\u767b\u5f55","CONFIRM":"\u786e\u8ba4","YEAR":"\u5e74","DAYS":"\u5929","HOURS":"\u65f6","HOUR":"\u5c0f\u65f6","MINUTE":"\u5206","SECOND":"\u79d2","IS":"\u4e3a","ONE":"\u4e00","TWE":"\u4e8c","TIMES":"\u6b21","COUNTENT_UPDATE_FILL":"\u8bf7\u586b\u5199\u4fee\u6539\u5185\u5bb9","CANCLE":"\u53d6\u6d88","OPERATE_CONFIRM":"\u786e\u5b9a\u6b64\u64cd\u4f5c\u5417\uff1f","USERNAME":"\u59d3\u540d","SUCCESS":"\u64cd\u4f5c\u6210\u529f","FAIL_REPLY":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u586b\u5199\u56de\u590d\u4fe1\u606f","SEND_OK":"\u53d1\u9001\u6210\u529f","PHONE_BIND_DONE":"\u5df2\u7ed1\u5b9a","TAGS_USE":"\u4f7f\u7528\u6b64\u6807\u7b7e","WHITEHATS":"\u767d\u5e3d\u5b50","WHITEHATS_VERTIFY":"\u8ba4\u8bc1\u767d\u5e3d\u5b50","WHITEHATES_NAME":"\u8bf7\u8f93\u5165\u767d\u5e3d\u5b50\u7528\u6237\u540d","USER_ZONE_EDIT":"\u7f16\u8f91\u9886\u57df","WB_TRANSFER":"\u6211\u8981\u8f6c\u8d26","WB_TRANSFER_CANCEL":"\u53d6\u6d88\u8f6c\u8d26","WB_NUM":"\u8bf7\u8f93\u5165\u4e4c\u4e91\u5e01\u6570\u91cf","WB_NUMBER":"\u4e4c\u4e91\u5e01\u6570\u91cf\u4e3a\u6b63\u6574\u6570","WB_NEED_LESS":"\u81f3\u5c11\u9700\u8981","WB_NEED_SUM":"\u4e2a\u4e4c\u4e91\u5e01","WB_TRANSFER_OK":"\u8f6c\u8d26\u6210\u529f","WB_MY":"\u6211\u7684\u4e4c\u4e91\u5e01","WB_CAN_USE":"\u53ef\u7528\u7684\u4e4c\u4e91\u5e01","WB_FROZEN":"\u51bb\u7ed3\u7684\u4e4c\u4e91\u5e01","WB_LACK":"\u4e4c\u4e91\u5e01\u4e0d\u8db3","WB_SET_SCOPE":"\u51fa\u4ef7\u8303\u56f4\u4e3a","WB_BIND_CANCEL_STAT":"(\u70b9\u51fb\u201c\u53d6\u6d88\u7ed1\u5b9a\u201d\u83b7\u53d6\u9a8c\u8bc1\u7801\uff0c\u5411\u4e4c\u4e91\u516c\u4f17\u8d26\u53f7\u53d1\u9001\u9a8c\u8bc1\u7801\u53d6\u6d88\u5fae\u4fe1\u7ed1\u5b9a\uff0c\u7136\u540e\u5237\u65b0\u672c\u9875\u9762)","EMAIL_LOGIN_MEXT":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_UPDATE_LOGIN_MEXT":"\u66f4\u6539\u8bf7\u6c42\u5df2\u53d1\u9001\u5230\u90ae\u7bb1,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_SEND_OK":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff01","CORPS":"\u5382\u5546","TEAM_NAME_NULL":"\u56e2\u961f\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","TEAM_HOMEPAGE_NULL":"\u56e2\u961f\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","TEAM_QQ_NULL":"\u56e2\u961fqq\u4e0d\u80fd\u4e3a\u7a7a","TEAM_BRIEF_NULL":"\u56e2\u961f\u7b80\u4ecb\u4e0d\u80fd\u4e3a\u7a7a","TEAM_EXIST":"\u56e2\u961f\u5df2\u5b58\u5728","TEAM_DISMISS_CONFIRM":"\u786e\u5b9a\u89e3\u6563\u672c\u56e2\u961f\u5417?","TEAM_NAME":"\u56e2\u961f\u540d\u79f0","TEAM_CREATER":"\u521b\u5efa\u4eba","TEAM_DONATER":"\u56e2\u961f\u4e3b\u529b","TEAM_MUMBER":"\u4eba\u6570","TEAM":"\u56e2\u961f","REGISTER_BRIEF":"*\u8bf7\u8f93\u5165\u4e2a\u4eba\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_TYPE":"*\u9009\u62e9\u6ce8\u518c\u7c7b\u578b","REGISTER_CORPS_BRIEF":"*\u8f93\u5165\u5382\u5546\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_EMAIL":"*\u5382\u5546\u90ae\u4ef6\u5fc5\u987b\u4e3a\u4f01\u4e1a\u4f7f\u7528\u7684\u6b63\u5f0f\u90ae\u4ef6","REGISTER_NAME_NULL":"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_HOMEPAGE_NULL":"\u4e2a\u4eba\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_BREIF_NULL":"\u7b80\u8981\u4ecb\u7ecd\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPNAME_NULL":"\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPHOMEPAGE_NULL":"\u5b98\u65b9\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_LAW_AGREE":"\u540c\u610f\u300a\u4fe1\u606f\u5b89\u5168\u76f8\u5173\u4fdd\u62a4\u548c\u58f0\u660e\u300b\u624d\u80fd\u6ce8\u518c","ATTENTION":"\u5173\u6ce8","ATTENTION_SUM":"\u5173\u6ce8\u6570","ATTENTION_DONE":"\u5df2\u5173\u6ce8","ATTENTION_CANCEL":"\u53d6\u6d88\u5173\u6ce8","ATTENTION_BUG_DONE":"\u5df2\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u5173\u6ce8","ATTENTION_BUG":"\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_UNDO":"\u6ca1\u6709\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_HAT_DONE":"\u5df2\u5173\u6ce8\u6b64\u767d\u5e3d\u5b50","ATTENTION_HAT_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u767d\u5e3d\u5b50\u7684\u5173\u6ce8?","COLLECTION":"\u6536\u85cf","COLLECTION_DONE":"\u5df2\u6536\u85cf","COLLECTION_BUG_DONE":"\u5df2\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_UNDO":"\u6ca1\u6709\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u6536\u85cf","SMS_SEND_NAME":"* \u7528\u6237\u6635\u79f0\/\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_TITLE":"* \u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CONTENT":"* \u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CAPTCHA":"* \u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a<br \/>","NUMBER":"\u7684\u6b63\u6574\u6570","RATING_SUCCESS":"\u8bc4\u5206\u6210\u529f","RATING_BUGS_DONE":"\u5df2\u5bf9\u6b64\u6f0f\u6d1e\u8fdb\u884c\u8fc7\u8bc4\u5206","RATING_BUGS_SELF":"\u4e0d\u80fd\u5bf9\u81ea\u5df1\u53d1\u5e03\u7684\u6f0f\u6d1e\u8fdb\u884c\u8bc4\u5206","RATING_SUBMIT_CANCLE":"\u53d6\u6d88\u63d0\u4ea4\u8bc4\u5206","RATING_SUBMIT":"\u63d0\u4ea4\u6211\u7684\u8bc4\u5206","RATING_SUBMIT_CHECK":"\u8bf7\u786e\u5b9a\u6bcf\u4e00\u9879\u90fd\u9009\u62e9\u4e86\u8bc4\u5206","RATING_CONFIRM":"\u786e\u5b9a\u63d0\u4ea4\u5bf9\u6b64\u5382\u5546\u7684\u8bc4\u5206\u5417\uff1f","RATING_LOGIN":"\u53ea\u6709\u767b\u5f55\u7684\u767d\u5e3d\u5b50\u624d\u80fd\u8bc4\u5206","RATING_DONE":"\u5df2\u7ecf\u8bc4\u8fc7\u5206\u4e86","WOOYUN_CORPS":"\u4e4c\u4e91\u5382\u5546","MARST_IMAGE":"\u5bf9\u56fe\u7247\u6253\u7801","FEEDBACK_LINK_NULL":"\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_LINK_ERROR":"\u8bf7\u4e66\u5199\u6b63\u786e\u7684\u94fe\u63a5\u5730\u5740\uff01","FEEDBACK_CONTENT_NULL":"\u95ee\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_ALLOW_LIMIT":"\u534a\u5c0f\u65f6\u53ea\u5141\u8bb8\u53cd\u9988\u4e00\u6b21","TOP_RANK":"\u6392\u540d","TOP_BUG_TITLE":"\u6f0f\u6d1e\u6807\u9898","TOP_RANK_NONE":"\u6682\u65e0\u6392\u540d","TOP_BUGS_GOOD":"\u4f18\u8d28\u6f0f\u6d1e\u6570","NICKNAME":"\u6635\u79f0","LEVEL":"\u7b49\u7ea7","VALUE":"\u503c","EDITOR_INSERT_PIC":"\u63d2\u5165\u56fe\u7247","EDITOR_PIC_ADDR":"\u5730\u5740\uff1a","EDITOR_CONFIRM":"\u786e\u5b9a","EDITOR_PIC_NULL":"\u8bf7\u4e0a\u4f20\u56fe\u7247\u6216\u586b\u5199\u56fe\u7247\u5730\u5740","EDITOR_INSERT_VIDIO":"\u63d2\u5165\u89c6\u9891","EDITOR_VIDIO_ADDR":"\u89c6\u9891\u5730\u5740\uff1a","EDITOR_VIDIO_NULL":"\u8bf7\u586b\u5199\u89c6\u9891\u5730\u5740(.swf)","EDITOR_VIDIO_TYPE":"\u76ee\u524d\u4ec5\u652f\u6301.swf\u683c\u5f0f","PIC_SELECT":"\u8bf7\u9009\u62e9\u5f85\u4e0a\u4f20\u7684\u56fe\u7247","PIC_TYPE_IS":"\u56fe\u7247\u7c7b\u578b\u4e3a","UPLOAD":"\u4e0a\u4f20","RANK_AVG":"\u6f0f\u6d1e\u5e73\u5747"};
$(function(){
function getParamsOfShareWindow(width, height) {
return ['toolbar=0,status=0,resizable=1,width=' + width + ',height=' + height + ',left=',(screen.width-width)/2,',top=',(screen.height-height)/2].join('');
}
});
function errimg(img){
tmp=img.src;
nimg=tmp.replace("http://wooyun.org/","http://www.wooyun.org/");
img.src=nimg;
$(img).parent().attr('href',nimg);
img.onerror=null;
}
function AttendBug(id){
$.get('/ajaxdo.php',{module:'attendbug',id:id,rid:Math.random(),token:$("#token").val()},function(re){
if(re==1){
$("#attention_num").html(parseInt($("#attention_num").html())+1);
$("#attend_action").html('√'+_LANGJS.ATTENTION_DONE+' <a class="btn" href="javascript:void(0)" onclick="AttendCancel('+id+')">'+_LANGJS.ATTENTION_CANCEL+'</a></span>');
}else if(re==2){
alert(_LANGJS.LOGIN_FIRST);
}else if(re==3){
alert(_LANGJS.ATTENTION_BUG_DONE);
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
function AttendCancel(id){
if(confirm(_LANGJS.ATTENTION_BUG_CONFIRM+"?")){
$.get('/ajaxdo.php',{module:'attendcancel',id:id,rid:Math.random(),token:$("#token").val()},function(re){
if(re==1){
$("#attention_num").html(parseInt($("#attention_num").html())-1);
$("#attend_action").html('<a class="btn" href="javascript:void(0)" onclick="AttendBug('+id+')">'+_LANGJS.ATTENTION_BUG+'</a></span>');
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
}
function CollectBug(id,token){
$.get('/ajaxdo.php',{'module':'collect','id':id,'token':token,'rid':Math.random()},function(re){
if(re==1){
$("#collection_num").html(parseInt($("#collection_num").html())+1);
$(".btn-fav").removeClass("fav-add");
$(".btn-fav").addClass("fav-cancel");
$(".btn-fav").unbind();
$(".btn-fav").click(function(){
CollectCancel(id,token);
});
}else if(re==2){
alert(_LANGJS.LOGIN_FIRST);
}else if(re==3){
alert(_LANGJS.COLLECTION_BUG_DONE);
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
function CollectCancel(id,token){
if(confirm(_LANGJS.COLLECTION_BUG_CONFIRM+"?")){
$.get('/ajaxdo.php',{'module':'collectcancel','id':id,'token':token,'rid':Math.random()},function(re){
if(re==1){
$("#collection_num").html(parseInt($("#collection_num").html())-1);
$(".btn-fav").removeClass("fav-cancel");
$(".btn-fav").addClass("fav-add");
$(".btn-fav").unbind();
$(".btn-fav").click(function(){
CollectBug(id,token);
});
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
}
</script>
<div class="content">
<input type="hidden" id="token" style="display:none" value="" />
<h2>漏洞概要
<span style="margin:0 0 0 580px; float:right; position:absolute; font-size:14px; font-weight:normal">关注数(<span id="attention_num">3</span>)
<span id="attend_action">
<a class="btn" href="javascript:void(0)" onclick="AttendBug(65732)">关注此漏洞</a></span>
</span></h2>
<h3>缺陷编号: <a href="wooyun-2014-065732">WooYun-2014-65732</a>
<input id="fbid" type="hidden" value="65732">
</h3>
<h3 class='wybug_title'>漏洞标题: Ecmall Sql 注入 第二弹 <img src="http://wooyun.org/images/m1.png" alt="" class="credit">
</h3>
<h3 class='wybug_corp'>相关厂商: <a href="http://www.wooyun.org/corps/ShopEx">
ShopEx </a>
</h3>
<h3 class='wybug_author'>漏洞作者: <a href="http://www.wooyun.org/whitehats/′雨。">′雨。</a><img height="12" width="12" style="vertical-align:-2px;margin-left:2px;" src="http://wooyun.org/images/v.png" alt="认证白帽子" /></h3>
<h3 class='wybug_date'>提交时间: 2014-06-26 16:41</h3>
<h3 class='wybug_open_date'>公开时间: 2014-09-24 16:42</h3>
<h3 class='wybug_type'>漏洞类型: SQL注射漏洞</h3>
<h3 class='wybug_level'>危害等级: 高</h3>
<h3>自评Rank: 20</h3>
<h3 class='wybug_status'>漏洞状态:
厂商已经确认
</h3>
<h3>漏洞来源: <a href="http://www.wooyun.org">http://www.wooyun.org</a>,如有疑问或需要帮助请联系 [email protected]</h3>
<h3>Tags标签:
无
</h3>
<h3>
<!-- Baidu Button BEGIN -->
<div id="share">
<div style="float:right; margin-right:100px;font-size:12px">
<span class="fav-num"><a id="collection_num">0</a>人收藏</span>
<a style="text-decoration:none; font-size:12px" href="javascript:void(0)" class="fav-add btn-fav">收藏</a>
<script type="text/javascript">
var token="";
var id="65732";
$(".btn-fav").click(function(){ CollectBug(id,token); });
</script>
</div>
<span style="float:left;">分享漏洞:</span>
<div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="http://bdimg.share.baidu.com/static/images/type-button-5.jpg" />
<a class="shareCount"></a>
</div>
</div>
<!-- Baidu Button END -->
</h3>
<hr align="center"/>
<h2>漏洞详情</h2>
<h3 class="detailTitle">披露状态:</h3>
<p class="detail" style="padding-bottom:0">
</p>
<p class="detail wybug_open_status">
2014-06-26: 细节已通知厂商并且等待厂商处理中<br/>
2014-06-26: 厂商已经确认,细节仅向厂商公开<br/>
2014-06-29: 细节向第三方安全合作伙伴开放(<a href="http://www.nsfocus.com.cn/" target="_blank">绿盟科技</a>、<a href="http://tangscan.com/" target="_blank">唐朝安全巡航</a>、<a href="http://www.silence.com.cn" target="_blank">无声信息</a>)<br/>
2014-08-20: 细节向核心白帽子及相关领域专家公开<br/>
2014-08-30: 细节向普通白帽子公开<br/>
2014-09-09: 细节向实习白帽子公开<br/>
2014-09-24: 细节向公众公开<br/>
</p>
<h3 class="detailTitle">简要描述:</h3>
<p class="detail wybug_description">已打上20140618补丁。再来试试。</p>
<h3 class="detailTitle">详细说明:</h3>
<div class='wybug_detail'>
<p class="detail">在app/my_goods.app.php中<br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code 区域</legend><pre><code>function spec_edit()<br />
{<br />
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;<br />
if (!IS_POST)<br />
{<br />
$goods_spec = $this->_goods_mod->findAll(array(<br />
'fields' => "this.goods_name,this.goods_id,this.spec_name_1,this.spec_name_2",<br />
'conditions' => "goods_id = $id",<br />
'include' => array('has_goodsspec' => array('order'=>'spec_id')),<br />
));<br />
<br />
header('Content-Type:text/html;charset=' . CHARSET);<br />
$this->assign('goods', current($goods_spec));<br />
$this->display("spec_edit.html");<br />
}<br />
else<br />
{ <br />
<br />
$data = $this->save_spec($_POST);<br />
<br />
if (empty($data))<br />
{<br />
$this->pop_warning('not_data');<br />
}<br />
$default_spec = array(); // 更新商品中默认规格的信息<br />
foreach ($data as $key => $val)<br />
{ <br />
if (empty($default_spec))<br />
{<br />
$default_spec = array('price' => $val['price']);<br />
}<br />
$this->_spec_mod->edit($key, $val);<br />
}<br />
$this->_goods_mod->edit($id, $default_spec);<br />
$this->pop_warning('ok', 'my_goods_spec_edit');<br />
}<br />
}</code></pre></fieldset><p class='detail'><br />
<br />
<br />
<br />
来看看这个 $data = $this->save_spec($_POST);<br />
<br />
<br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code 区域</legend><pre><code>function save_spec($spec)<br />
{ <br />
$data = array();<br />
<br />
if (empty($spec['price']) || empty($spec['stock']))<br />
{<br />
return $data;<br />
}<br />
foreach ($spec['price'] as $key => $val)<br />
{<br />
$data[$key]['price'] = $this->_filter_price($val);<br />
}<br />
foreach ($spec['stock'] as $key => $val)<br />
{<br />
$data[$key]['stock'] = intval($val);<br />
}<br />
return $data;<br />
}</code></pre></fieldset><p class='detail'><br />
<br />
<br />
<br />
这里return的是data。 在这里 $spec['stock'] 被intval了。<br />
<br />
$data[$key]['price'] = $this->_filter_price($val);<br />
<br />
<br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code 区域</legend><pre><code>function _filter_price($price)<br />
{<br />
return abs(floatval($price));<br />
}<br />
}</code></pre></fieldset><p class='detail'><br />
<br />
<br />
<br />
返回非浮点 。 所以这里data的value 是不可控的 但是 key是可控的 继续看。<br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code 区域</legend><pre><code>foreach ($data as $key => $val)<br />
{ <br />
if (empty($default_spec))<br />
{<br />
$default_spec = array('price' => $val['price']);<br />
}<br />
$this->_spec_mod->edit($key, $val);<br />
}</code></pre></fieldset><p class='detail'><br />
<br />
<br />
<br />
key 带入到了edit中 继续看<br />
<br />
<br />
<br />
</p><fieldset class='fieldset fieldset-code'><legend>code 区域</legend><pre><code>function edit($conditions, $edit_data)<br />
{ <br />
if (empty($edit_data))<br />
{<br />
return false;<br />
}<br />
$edit_data = $this->_valid($edit_data);<br />
if (!$edit_data)<br />
{<br />
return false;<br />
}<br />
$edit_fields = $this->_getSetFields($edit_data);<br />
$conditions = $this->_getConditions($conditions, false);<br />
$this->db->query("UPDATE {$this->table} SET {$edit_fields}{$conditions}");<br />
<br />
return $this->db->affected_rows();</code></pre></fieldset><p class='detail'><br />
<br />
<br />
<br />
拼语句。 直接注入。 <br />
<br />
<br />
<br />
在618补丁中还加入放注入的了。<br />
<br />
<br />
<br />
但是还是勉强能过。 </p>
</div>
<h3 class="detailTitle">漏洞证明:</h3>
<div class='wybug_poc'>
<p class="detail">首先注册一个会员 然后发布一个商品。<br />
<br />
<br />
<br />
</p><p class="detail usemasaic"><a href="../upload/201406/21153703e4b5fcc0aea47ce3ca53afb7a0a6bdd1.jpg" target="_blank"><img src="../upload/201406/21153703e4b5fcc0aea47ce3ca53afb7a0a6bdd1.jpg" alt="e3.jpg" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"> </p>
</div>
<h3 class="detailTitle">修复方案:</h3>
<div class='wybug_patch'>
<p class="detail">限制一下key把。 </p>
</div>
<h3 class="detailTitle">版权声明:转载请注明来源 <a style="font-weight:normal" href="http://www.wooyun.org/whitehats/′雨。" title="′雨。">′雨。</a>@<a style="font-weight:normal" href="http://www.wooyun.org/bugs/wooyun-2010-065732" title="Ecmall Sql 注入 第二弹">乌云</a></h3>
<hr align="center"/>
<h2 id="bugreply">漏洞回应</h2>
<div class='bug_result'>
<h3 class="detailTitle">厂商回应:</h3>
<p class="detail">危害等级:中</p>
<p class="detail">漏洞Rank:5 </p>
<p class="detail">确认时间:2014-06-26 16:54</p>
<h3 class="detailTitle">厂商回复:</h3>
<p class="detail">非常感谢您为shopex信息安全做的贡献<br />
我们将尽快修复<br />
非常感谢</p>
<h3 class="detailTitle">最新状态:</h3>
<p class="detail">暂无</p>
</div>
<hr align="center" />
<script type="text/javascript">
var bugid="65732";
var bugRating="-3";
var myRating="";
var ratingCount="0";
function ShowBugRating(k){
var ratingItems=$(".myrating span");
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<=k){
$(n).addClass("on");
}else{
$(n).removeClass("on");
}
});
$(".myrating span").hover(
function(){
$("#ratingShow").html($(this).attr("data-title"));
},
function(){
$("#ratingShow").html("");
}
);
}
$(document).ready(function(){
if(myRating==""){
var ratingItems=$(".myrating span");
$(".myrating span").hover(
function(){
$(this).addClass("hover");
var k=parseInt($(this).attr("rel"));
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<k) $(n).addClass("on");
if(nk>k) $(n).removeClass("on");
});
$("#ratingShow").html($(this).attr("data-title"));
},
function(){
$(this).removeClass("hover");
if($("#myRating").val()==""){
$.each(ratingItems,function(i,n){
$(n).removeClass("on");
});
}
$("#ratingShow").html("");
}
);
$(".myrating span").click(function(){
var rating=$(this).attr("rel");
var k=parseInt($(this).attr("rel"));
$.post("/ajaxdo.php?module=bugrating",{"id":bugid,"rating":rating,"token":$("#token").val()},function(re){
//消除操作绑定
$(".myrating span").unbind();
re=parseInt(re);
switch(re){
case 1:
$("#ratingShow").html(_LANGJS.RATING_SUCCESS);
$("#ratingSpan").html(parseInt($("#ratingSpan").html())+1);
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<=k){
$(n).addClass("on");
}else{
$(n).removeClass("on");
}
});
ShowBugRating(rating);
break;
case 2:
$("#ratingShow").html(_LANGJS.LOGIN_FIRST);
break;
case 4:
$("#ratingShow").html(_LANGJS.RATING_BUGS_DONE);
break;
case 6:
$("#ratingShow").html(_LANGJS.RATING_BUGS_SELF);
break;
default:break;
}
});
});
}else{
if(ratingCount>2){
ShowBugRating(bugRating);
}else{
ShowBugRating(-3);
}
}
});
</script>
<h3 class="detailTitle">漏洞评价:</h3>
<p class="detail">对本漏洞信息进行评价,以更好的反馈信息的价值,包括信息客观性,内容是否完整以及是否具备学习价值</p>
<h5 class="rating">
<div class="ratingText">漏洞评价<span>(共<span id="ratingSpan">0</span>人评价)</span>:</div>
<div class="myrating">
<span rel="-2" data-title="信息虚假或者没有任何自己的思考"></span>
<span rel="-1" data-title="内容不详并且漏洞信息评级及类型明显错误"></span>
<span rel="0" data-title="还可以,洞主继续努力"></span>
<span rel="1" data-title="信息完整,过程清晰,有截图有代码有视频有真相"></span>
<span rel="2" data-title="角度独特思路新颖值得学习"></span>
<div id="ratingShow">
登陆后才能进行评分 </div>
</div>
</h5>
<input type="hidden" id="myRating" value="" />
<hr align="center" />
<h2>评价</h2>
<div id="replys" class="replys">
<ol class="replylist">
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2014-06-26 16:46</span> |
<a target='_blank' href="http://www.wooyun.org/whitehats/′ 雨。">′ 雨。</a> <img height="12" width="12" style="vertical-align:-2px;" src="http://wooyun.org/images/v.png" alt="认证白帽子" /> <!-- 增加路人判断显示 @zm 2013-12-13 Begin -->
( 普通白帽子 | <!-- 增加路人判断显示 @zm 2013-12-13 End -->
Rank:1332 漏洞数:198 | Only Code Never Lie To Me.)
<div class="likebox">
<span class="likepre" title="赞!" rel="98544"></span>
<span class="liketext liketext_min"><span id="likenum_98544">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> 你们确认的时候注意下吧 你们的20140618补丁中添加的防注入是可以勉强绕过的。
参照图中的 你们可以测试测试。 </p>
</div>
<div class="replylist-act">
<span class="floor">1#</span>
<a title="回复 ′ 雨。" href="javascript:void(0)" class="replyBtn" onclick="Reply('′ 雨。')">回复此人</a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2014-06-26 18:00</span> |
<a target='_blank' href="http://www.wooyun.org/whitehats/HackBraid">HackBraid</a> <img height="12" width="12" style="vertical-align:-2px;" src="http://wooyun.org/images/v.png" alt="认证白帽子" /> <!-- 增加路人判断显示 @zm 2013-12-13 Begin -->
( 普通白帽子 | <!-- 增加路人判断显示 @zm 2013-12-13 End -->
Rank:1854 漏洞数:296 | 风暴网络安全空间:
http://www.heysec.or...)
<div class="likebox">
<span class="likepre" title="赞!" rel="98550"></span>
<span class="liketext liketext_min"><span id="likenum_98550">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p>有时间我也撸一发 </p>
</div>
<div class="replylist-act">
<span class="floor">2#</span>
<a title="回复 HackBraid" href="javascript:void(0)" class="replyBtn" onclick="Reply('HackBraid')">回复此人</a>
</div>
</div><!-- reply-content End -->
</li>
</ol><!-- replylist End -->
</div><!-- replys End -->
<div id="reply" class="reply">
<a name="comment"></a>
<p class="detail">
登录后才能发表评论,请先 <a href="http://wooyun.org/user.php?action=login"><u>登录</u></a> 。
</p>
<script type="text/javascript">
var masaic = '0';
function CommentLike(id){
$.post("/ajaxdo.php?module=commentrating",{"id":id,"token":$("#token").val()},function(re){
re=parseInt(re);
switch(re){
case 1:
$("#likenum_"+id).html(parseInt($("#likenum_"+id).html())+1);
break;
case 4:
alert(_LANGJS.COMMENT_GOOD_DONE);
break;
case 6:
alert(_LANGJS.COMMENT_SELF);
break;
default:break;
}
});
}
$(document).ready(function(){
$(".likebox .likepre").click(function(){
CommentLike($(this).attr("rel"));
});
});
</script>
<div>
</div>
<div id="footer">
<span class="copyright fleft">
Copyright © 2010 - 2015 <a href="wooyun-2014-065732#">wooyun.org</a>, All Rights Reserved
<a href="http://www.miibeian.gov.cn/">京ICP备15041338号-1</a>
<!--a href="http://sae.sina.com.cn" target="_blank"><img src="/images/sae_bottom_logo.png" title="Powered by Sina App Engine"></a-->
</span>
<span class="other fright">
<a href="http://wooyun.org/impression">行业观点</a>
· <a href="http://wooyun.org/lawer">法律顾问</a>
· <a href="http://wooyun.org/contactus">联系我们</a>
· <a href="http://wooyun.org/help">帮助</a>
· <a href="http://wooyun.org/about">关于</a>
</span>
</div>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fc12f88b5c1cd041a732dea597a5ec94c' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" id="bdshare_js" data="type=button" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
if (top.location !== self.location) top.location=self.location;
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
static void bar(char *boom) {
char F = 'b';
*boom = 47; // Frame bar
}
static void foo(char *boom, void (*boomer)(char *)) {
char F = 'f';
boomer(boom); // Frame foo
}
void main(void) {
char F = 'm';
foo(0, bar); // Frame main
}
| {
"pile_set_name": "Github"
} |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms"). Any redistribution of this code must retain the above
/// copyright and this notice and otherwise comply with the Use Terms.
/**
* @path ch11/11.13/11.13.1/11.13.1-4-30-s.js
* @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears as the LeftHandSideExpression (PrimaryExpression) of simple assignment(=) under strict mode
* @onlyStrict
*/
function testcase() {
"use strict";
var blah = eval;
try {
eval("(eval) = 20;");
return false;
} catch (e) {
return e instanceof SyntaxError && blah === eval;
}
}
runTestCase(testcase); | {
"pile_set_name": "Github"
} |
# Copyright JS Foundation and other contributors, http://js.foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required (VERSION 2.8.12)
project (jerry-main C)
# Optional build settings
set(ENABLE_LINK_MAP OFF CACHE BOOL "Enable generating a link map file?")
# Status messages
message(STATUS "ENABLE_LINK_MAP " ${ENABLE_LINK_MAP})
# Generate map file
if(ENABLE_LINK_MAP)
if("${PLATFORM}" STREQUAL "DARWIN")
set(LINKER_FLAGS_COMMON "${LINKER_FLAGS_COMMON} -Xlinker -map -Xlinker jerry.map")
else()
set(LINKER_FLAGS_COMMON "${LINKER_FLAGS_COMMON} -Xlinker -Map -Xlinker jerry.map")
endif()
endif()
# Get version information from git
if(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE JERRY_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(JERRY_COMMIT_HASH " (${JERRY_COMMIT_HASH})")
else()
set(JERRY_COMMIT_HASH "")
endif()
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_COMMIT_HASH="${JERRY_COMMIT_HASH}")
macro(jerry_create_executable JERRY_NAME)
add_executable(${JERRY_NAME} ${ARGN})
set_property(TARGET ${JERRY_NAME}
PROPERTY LINK_FLAGS "${LINKER_FLAGS_COMMON}")
target_compile_definitions(${JERRY_NAME} PRIVATE ${DEFINES_JERRY})
target_link_libraries(${JERRY_NAME} jerry-core)
install(TARGETS ${JERRY_NAME} DESTINATION bin)
endmacro()
if(JERRY_LIBC AND FEATURE_EXTERNAL_CONTEXT)
MESSAGE(FATAL_ERROR "This configuration is not supported for jerry-main. Please build against your system libc to enable the external context.")
endif()
# Jerry standalones
if(JERRY_CMDLINE)
jerry_create_executable("jerry" "main-unix.c" "cli.c")
target_link_libraries("jerry" jerry-ext jerry-port-default)
endif()
if(JERRY_CMDLINE_TEST)
jerry_create_executable("jerry-test" "main-unix-test.c" "benchmarking.c")
target_link_libraries("jerry-test" jerry-port-default-minimal)
endif()
if(JERRY_CMDLINE_SNAPSHOT)
jerry_create_executable("jerry-snapshot" "main-unix-snapshot.c" "cli.c")
target_link_libraries("jerry-snapshot" jerry-port-default)
endif()
| {
"pile_set_name": "Github"
} |
id: dsq-747508974
date: 2004-07-01T04:40:00.0000000-07:00
name: Haacked
avatar: https://github.com/haacked.png?size=120
message: <p>ha ha. true, but if my brother-in-law (who works for Sony) can get me a discount, I'd be happy.</p>
| {
"pile_set_name": "Github"
} |
/**
* Given a phrase, count the occurrences of each word in that phrase.
*
* For example for the input "olly olly in come free"
*
* olly: 2
* in: 1
* come: 1
* free: 1
*/
class Words {
count(str: string) {}
}
export { Words };
| {
"pile_set_name": "Github"
} |
#declare Ash_Inc_Temp=version;
/*
Persistence of Vision Raytracer Version 3.1
Ash wood color_map
*/
#declare M_Ash =
color_map {
[0.000000 rgb <0.298039, 0.188235, 0.125490>]
[0.003922 rgb <0.313726, 0.203922, 0.141176>]
[0.007843 rgb <0.313726, 0.203922, 0.172549>]
[0.011765 rgb <0.329412, 0.188235, 0.109804>]
[0.015686 rgb <0.329412, 0.219608, 0.125490>]
[0.019608 rgb <0.329412, 0.219608, 0.156863>]
[0.023529 rgb <0.329412, 0.235294, 0.172549>]
[0.027451 rgb <0.329412, 0.250980, 0.125490>]
[0.031373 rgb <0.345098, 0.203922, 0.141176>]
[0.035294 rgb <0.345098, 0.219608, 0.109804>]
[0.039216 rgb <0.345098, 0.219608, 0.188235>]
[0.043137 rgb <0.345098, 0.235294, 0.141176>]
[0.047059 rgb <0.360784, 0.203922, 0.109804>]
[0.050980 rgb <0.360784, 0.219608, 0.156863>]
[0.054902 rgb <0.360784, 0.235294, 0.109804>]
[0.058824 rgb <0.360784, 0.235294, 0.203922>]
[0.062745 rgb <0.360784, 0.250980, 0.156863>]
[0.066667 rgb <0.376471, 0.219608, 0.094118>]
[0.070588 rgb <0.376471, 0.219608, 0.125490>]
[0.074510 rgb <0.376471, 0.235294, 0.141176>]
[0.078431 rgb <0.376471, 0.235294, 0.172549>]
[0.082353 rgb <0.376471, 0.250980, 0.125490>]
[0.086275 rgb <0.376471, 0.266667, 0.172549>]
[0.090196 rgb <0.376471, 0.266667, 0.203922>]
[0.094118 rgb <0.392157, 0.203922, 0.109804>]
[0.098039 rgb <0.392157, 0.219608, 0.156863>]
[0.101961 rgb <0.392157, 0.235294, 0.109804>]
[0.105882 rgb <0.392157, 0.250980, 0.156863>]
[0.109804 rgb <0.392157, 0.250980, 0.188235>]
[0.113725 rgb <0.392157, 0.250980, 0.219608>]
[0.117647 rgb <0.392157, 0.266667, 0.141176>]
[0.121569 rgb <0.392157, 0.282353, 0.172549>]
[0.125490 rgb <0.392157, 0.282353, 0.219608>]
[0.129412 rgb <0.392157, 0.298039, 0.188235>]
[0.133333 rgb <0.407843, 0.219608, 0.094118>]
[0.137255 rgb <0.407843, 0.219608, 0.125490>]
[0.141176 rgb <0.407843, 0.235294, 0.172549>]
[0.145098 rgb <0.407843, 0.250980, 0.125490>]
[0.149020 rgb <0.407843, 0.266667, 0.172549>]
[0.152941 rgb <0.407843, 0.266667, 0.203922>]
[0.156863 rgb <0.407843, 0.298039, 0.235294>]
[0.160784 rgb <0.407843, 0.313726, 0.266667>]
[0.164706 rgb <0.423529, 0.235294, 0.109804>]
[0.168627 rgb <0.423529, 0.235294, 0.141176>]
[0.172549 rgb <0.423529, 0.250980, 0.188235>]
[0.176471 rgb <0.423529, 0.266667, 0.109804>]
[0.180392 rgb <0.423529, 0.266667, 0.141176>]
[0.184314 rgb <0.423529, 0.282353, 0.188235>]
[0.188235 rgb <0.423529, 0.282353, 0.219608>]
[0.192157 rgb <0.423529, 0.298039, 0.250980>]
[0.196078 rgb <0.423529, 0.313726, 0.219608>]
[0.200000 rgb <0.423529, 0.313726, 0.282353>]
[0.203922 rgb <0.423529, 0.345098, 0.266667>]
[0.207843 rgb <0.439216, 0.219608, 0.125490>]
[0.211765 rgb <0.439216, 0.250980, 0.094118>]
[0.215686 rgb <0.439216, 0.250980, 0.125490>]
[0.219608 rgb <0.439216, 0.250980, 0.156863>]
[0.223529 rgb <0.439216, 0.266667, 0.203922>]
[0.227451 rgb <0.439216, 0.282353, 0.156863>]
[0.231373 rgb <0.439216, 0.298039, 0.125490>]
[0.235294 rgb <0.439216, 0.298039, 0.203922>]
[0.239216 rgb <0.439216, 0.298039, 0.235294>]
[0.243137 rgb <0.439216, 0.313726, 0.188235>]
[0.247059 rgb <0.439216, 0.313726, 0.266667>]
[0.250980 rgb <0.439216, 0.329412, 0.298039>]
[0.254902 rgb <0.454902, 0.235294, 0.141176>]
[0.258824 rgb <0.454902, 0.266667, 0.109804>]
[0.262745 rgb <0.454902, 0.266667, 0.141176>]
[0.266667 rgb <0.454902, 0.266667, 0.172549>]
[0.270588 rgb <0.454902, 0.282353, 0.219608>]
[0.274510 rgb <0.454902, 0.298039, 0.141176>]
[0.278431 rgb <0.454902, 0.298039, 0.172549>]
[0.282353 rgb <0.454902, 0.298039, 0.250980>]
[0.286275 rgb <0.454902, 0.313726, 0.219608>]
[0.290196 rgb <0.454902, 0.313726, 0.282353>]
[0.294118 rgb <0.454902, 0.329412, 0.250980>]
[0.298039 rgb <0.454902, 0.329412, 0.313726>]
[0.301961 rgb <0.454902, 0.345098, 0.282353>]
[0.305882 rgb <0.454902, 0.360784, 0.329412>]
[0.309804 rgb <0.470588, 0.235294, 0.109804>]
[0.313726 rgb <0.470588, 0.250980, 0.125490>]
[0.317647 rgb <0.470588, 0.282353, 0.125490>]
[0.321569 rgb <0.470588, 0.282353, 0.156863>]
[0.325490 rgb <0.470588, 0.282353, 0.188235>]
[0.329412 rgb <0.470588, 0.298039, 0.235294>]
[0.333333 rgb <0.470588, 0.313726, 0.188235>]
[0.337255 rgb <0.470588, 0.313726, 0.266667>]
[0.341176 rgb <0.470588, 0.329412, 0.298039>]
[0.345098 rgb <0.470588, 0.345098, 0.219608>]
[0.349020 rgb <0.470588, 0.345098, 0.250980>]
[0.352941 rgb <0.470588, 0.345098, 0.313726>]
[0.356863 rgb <0.470588, 0.360784, 0.266667>]
[0.360784 rgb <0.470588, 0.360784, 0.298039>]
[0.364706 rgb <0.486275, 0.250980, 0.156863>]
[0.368627 rgb <0.486275, 0.266667, 0.109804>]
[0.372549 rgb <0.486275, 0.266667, 0.172549>]
[0.376471 rgb <0.486275, 0.298039, 0.141176>]
[0.380392 rgb <0.486275, 0.298039, 0.172549>]
[0.384314 rgb <0.486275, 0.298039, 0.203922>]
[0.388235 rgb <0.486275, 0.329412, 0.172549>]
[0.392157 rgb <0.486275, 0.329412, 0.203922>]
[0.396078 rgb <0.486275, 0.329412, 0.235294>]
[0.400000 rgb <0.486275, 0.329412, 0.266667>]
[0.403922 rgb <0.486275, 0.345098, 0.282353>]
[0.407843 rgb <0.486275, 0.360784, 0.235294>]
[0.411765 rgb <0.486275, 0.376471, 0.282353>]
[0.415686 rgb <0.486275, 0.376471, 0.313726>]
[0.419608 rgb <0.501961, 0.250980, 0.094118>]
[0.423529 rgb <0.501961, 0.266667, 0.141176>]
[0.427451 rgb <0.501961, 0.282353, 0.125490>]
[0.431373 rgb <0.501961, 0.282353, 0.172549>]
[0.435294 rgb <0.501961, 0.313726, 0.156863>]
[0.439216 rgb <0.501961, 0.313726, 0.188235>]
[0.443137 rgb <0.501961, 0.313726, 0.219608>]
[0.447059 rgb <0.501961, 0.313726, 0.250980>]
[0.450980 rgb <0.501961, 0.345098, 0.219608>]
[0.454902 rgb <0.501961, 0.345098, 0.250980>]
[0.458824 rgb <0.501961, 0.360784, 0.266667>]
[0.462745 rgb <0.501961, 0.360784, 0.298039>]
[0.466667 rgb <0.501961, 0.376471, 0.250980>]
[0.470588 rgb <0.501961, 0.392157, 0.329412>]
[0.474510 rgb <0.517647, 0.282353, 0.156863>]
[0.478431 rgb <0.517647, 0.298039, 0.141176>]
[0.482353 rgb <0.517647, 0.298039, 0.203922>]
[0.486275 rgb <0.517647, 0.329412, 0.172549>]
[0.490196 rgb <0.517647, 0.329412, 0.203922>]
[0.494118 rgb <0.517647, 0.329412, 0.235294>]
[0.498039 rgb <0.517647, 0.345098, 0.282353>]
[0.501961 rgb <0.517647, 0.360784, 0.203922>]
[0.505882 rgb <0.517647, 0.360784, 0.235294>]
[0.509804 rgb <0.517647, 0.376471, 0.282353>]
[0.513726 rgb <0.517647, 0.376471, 0.313726>]
[0.517647 rgb <0.517647, 0.407843, 0.313726>]
[0.521569 rgb <0.517647, 0.407843, 0.345098>]
[0.525490 rgb <0.533333, 0.282353, 0.125490>]
[0.529412 rgb <0.533333, 0.298039, 0.172549>]
[0.533333 rgb <0.533333, 0.313726, 0.141176>]
[0.537255 rgb <0.533333, 0.313726, 0.219608>]
[0.541176 rgb <0.533333, 0.345098, 0.156863>]
[0.545098 rgb <0.533333, 0.345098, 0.188235>]
[0.549020 rgb <0.533333, 0.345098, 0.219608>]
[0.552941 rgb <0.533333, 0.345098, 0.250980>]
[0.556863 rgb <0.533333, 0.360784, 0.298039>]
[0.560784 rgb <0.533333, 0.376471, 0.250980>]
[0.564706 rgb <0.533333, 0.392157, 0.298039>]
[0.568627 rgb <0.533333, 0.392157, 0.329412>]
[0.572549 rgb <0.549020, 0.313726, 0.188235>]
[0.576471 rgb <0.549020, 0.329412, 0.235294>]
[0.580392 rgb <0.549020, 0.360784, 0.172549>]
[0.584314 rgb <0.549020, 0.360784, 0.203922>]
[0.588235 rgb <0.549020, 0.360784, 0.235294>]
[0.592157 rgb <0.549020, 0.360784, 0.266667>]
[0.596078 rgb <0.549020, 0.376471, 0.313726>]
[0.600000 rgb <0.549020, 0.392157, 0.235294>]
[0.603922 rgb <0.549020, 0.392157, 0.266667>]
[0.607843 rgb <0.549020, 0.407843, 0.313726>]
[0.611765 rgb <0.549020, 0.407843, 0.345098>]
[0.615686 rgb <0.564706, 0.282353, 0.125490>]
[0.619608 rgb <0.564706, 0.313726, 0.125490>]
[0.623529 rgb <0.564706, 0.313726, 0.156863>]
[0.627451 rgb <0.564706, 0.329412, 0.203922>]
[0.631373 rgb <0.564706, 0.345098, 0.141176>]
[0.635294 rgb <0.564706, 0.345098, 0.250980>]
[0.639216 rgb <0.564706, 0.376471, 0.219608>]
[0.643137 rgb <0.564706, 0.376471, 0.250980>]
[0.647059 rgb <0.564706, 0.376471, 0.282353>]
[0.650980 rgb <0.564706, 0.392157, 0.329412>]
[0.654902 rgb <0.564706, 0.407843, 0.250980>]
[0.658824 rgb <0.564706, 0.407843, 0.282353>]
[0.662745 rgb <0.564706, 0.423529, 0.329412>]
[0.666667 rgb <0.564706, 0.423529, 0.360784>]
[0.670588 rgb <0.580392, 0.329412, 0.172549>]
[0.674510 rgb <0.580392, 0.345098, 0.219608>]
[0.678431 rgb <0.580392, 0.360784, 0.172549>]
[0.682353 rgb <0.580392, 0.360784, 0.266667>]
[0.686275 rgb <0.580392, 0.392157, 0.235294>]
[0.690196 rgb <0.580392, 0.392157, 0.266667>]
[0.694118 rgb <0.580392, 0.392157, 0.298039>]
[0.698039 rgb <0.580392, 0.407843, 0.345098>]
[0.701961 rgb <0.580392, 0.423529, 0.266667>]
[0.705882 rgb <0.580392, 0.423529, 0.298039>]
[0.709804 rgb <0.580392, 0.439216, 0.345098>]
[0.713726 rgb <0.580392, 0.454902, 0.392157>]
[0.717647 rgb <0.596078, 0.345098, 0.156863>]
[0.721569 rgb <0.596078, 0.345098, 0.188235>]
[0.725490 rgb <0.596078, 0.360784, 0.235294>]
[0.729412 rgb <0.596078, 0.376471, 0.188235>]
[0.733333 rgb <0.596078, 0.407843, 0.250980>]
[0.737255 rgb <0.596078, 0.407843, 0.282353>]
[0.741176 rgb <0.596078, 0.407843, 0.313726>]
[0.745098 rgb <0.596078, 0.423529, 0.360784>]
[0.749020 rgb <0.596078, 0.439216, 0.313726>]
[0.752941 rgb <0.596078, 0.454902, 0.360784>]
[0.756863 rgb <0.611765, 0.360784, 0.172549>]
[0.760784 rgb <0.611765, 0.360784, 0.203922>]
[0.764706 rgb <0.611765, 0.376471, 0.250980>]
[0.768627 rgb <0.611765, 0.392157, 0.203922>]
[0.772549 rgb <0.611765, 0.423529, 0.266667>]
[0.776471 rgb <0.611765, 0.423529, 0.298039>]
[0.780392 rgb <0.611765, 0.423529, 0.329412>]
[0.784314 rgb <0.611765, 0.439216, 0.376471>]
[0.788235 rgb <0.611765, 0.454902, 0.298039>]
[0.792157 rgb <0.611765, 0.454902, 0.329412>]
[0.796078 rgb <0.611765, 0.470588, 0.376471>]
[0.800000 rgb <0.627451, 0.376471, 0.188235>]
[0.803922 rgb <0.627451, 0.376471, 0.219608>]
[0.807843 rgb <0.627451, 0.392157, 0.266667>]
[0.811765 rgb <0.627451, 0.407843, 0.219608>]
[0.815686 rgb <0.627451, 0.439216, 0.235294>]
[0.819608 rgb <0.627451, 0.439216, 0.282353>]
[0.823529 rgb <0.627451, 0.439216, 0.313726>]
[0.827451 rgb <0.627451, 0.439216, 0.345098>]
[0.831373 rgb <0.627451, 0.470588, 0.345098>]
[0.835294 rgb <0.627451, 0.486275, 0.392157>]
[0.839216 rgb <0.643137, 0.392157, 0.203922>]
[0.843137 rgb <0.643137, 0.392157, 0.235294>]
[0.847059 rgb <0.643137, 0.407843, 0.282353>]
[0.850980 rgb <0.643137, 0.423529, 0.250980>]
[0.854902 rgb <0.643137, 0.423529, 0.329412>]
[0.858824 rgb <0.643137, 0.454902, 0.298039>]
[0.862745 rgb <0.643137, 0.454902, 0.329412>]
[0.866667 rgb <0.643137, 0.454902, 0.360784>]
[0.870588 rgb <0.643137, 0.486275, 0.360784>]
[0.874510 rgb <0.658824, 0.407843, 0.219608>]
[0.878431 rgb <0.658824, 0.423529, 0.298039>]
[0.882353 rgb <0.658824, 0.439216, 0.266667>]
[0.886275 rgb <0.658824, 0.470588, 0.282353>]
[0.890196 rgb <0.658824, 0.470588, 0.313726>]
[0.894118 rgb <0.658824, 0.470588, 0.345098>]
[0.898039 rgb <0.658824, 0.470588, 0.376471>]
[0.901961 rgb <0.658824, 0.501961, 0.376471>]
[0.905882 rgb <0.674510, 0.423529, 0.235294>]
[0.909804 rgb <0.674510, 0.454902, 0.250980>]
[0.913725 rgb <0.674510, 0.454902, 0.298039>]
[0.917647 rgb <0.674510, 0.454902, 0.329412>]
[0.921569 rgb <0.674510, 0.486275, 0.298039>]
[0.925490 rgb <0.674510, 0.486275, 0.329412>]
[0.929412 rgb <0.674510, 0.486275, 0.360784>]
[0.933333 rgb <0.674510, 0.486275, 0.392157>]
[0.937255 rgb <0.674510, 0.517647, 0.392157>]
[0.941176 rgb <0.690196, 0.439216, 0.266667>]
[0.945098 rgb <0.690196, 0.470588, 0.266667>]
[0.949020 rgb <0.690196, 0.470588, 0.313726>]
[0.952941 rgb <0.690196, 0.470588, 0.345098>]
[0.956863 rgb <0.690196, 0.501961, 0.345098>]
[0.960784 rgb <0.690196, 0.501961, 0.376471>]
[0.964706 rgb <0.690196, 0.533333, 0.407843>]
[0.968627 rgb <0.705882, 0.454902, 0.250980>]
[0.972549 rgb <0.705882, 0.454902, 0.282353>]
[0.976471 rgb <0.705882, 0.486275, 0.329412>]
[0.980392 rgb <0.705882, 0.517647, 0.360784>]
[0.984314 rgb <0.705882, 0.517647, 0.392157>]
[0.988235 rgb <0.721569, 0.486275, 0.282353>]
[0.992157 rgb <0.721569, 0.549020, 0.407843>]
[0.996078 rgb <0.737255, 0.501961, 0.313726>]
}
#version Ash_Inc_Temp;
| {
"pile_set_name": "Github"
} |
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { KeyResultUpdateService } from './keyresult-update.service';
import { KeyResultUpdateController } from './keyresult-update.controller';
import { KeyResultUpdate } from './keyresult-update.entity';
import { CqrsModule } from '@nestjs/cqrs';
import { CommandHandlers } from './commands/handlers';
@Module({
imports: [TypeOrmModule.forFeature([KeyResultUpdate]), CqrsModule],
controllers: [KeyResultUpdateController],
providers: [KeyResultUpdateService, ...CommandHandlers],
exports: [KeyResultUpdateService]
})
export class KeyResultUpdateModule {}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_opt.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>Target 1</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\debug\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>255</CpuCode>
<DllOpt>
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDllName>DCM.DLL</SimDlgDllName>
<SimDlgDllArguments>-pCM4</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments>
<TargetDlgDllName>TCM.DLL</TargetDlgDllName>
<TargetDlgDllArguments>-pCM4</TargetDlgDllArguments>
</DllOpt>
<DebugOpt>
<uSim>1</uSim>
<uTrg>0</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>0</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>-1</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile>.\arm_signal_converge_example.ini</sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon></pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGDARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name>-T0</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>237</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>426</Address>
<ByteObject>0</ByteObject>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename></Filename>
<ExecCommand></ExecCommand>
<Expression>\\arm_cortexM4lf_signal_converge_example\../arm_signal_converge_example_f32.c\237</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>240</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>428</Address>
<ByteObject>0</ByteObject>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename></Filename>
<ExecCommand></ExecCommand>
<Expression>\\arm_cortexM4lf_signal_converge_example\../arm_signal_converge_example_f32.c\240</Expression>
</Bp>
</Breakpoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
</TargetOption>
</Target>
<Group>
<GroupName>Source Group 1</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\arm_signal_converge_data.c</PathWithFileName>
<FilenameWithoutPath>arm_signal_converge_data.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\arm_signal_converge_example_f32.c</PathWithFileName>
<FilenameWithoutPath>arm_signal_converge_example_f32.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Common\Source\math_helper.c</PathWithFileName>
<FilenameWithoutPath>math_helper.c</FilenameWithoutPath>
</File>
</Group>
<Group>
<GroupName>CMSIS DeviceSupport</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\system_ARMCM4.c</PathWithFileName>
<FilenameWithoutPath>system_ARMCM4.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>.\startup_ARMCM4.s</PathWithFileName>
<FilenameWithoutPath>startup_ARMCM4.s</FilenameWithoutPath>
</File>
</Group>
<Group>
<GroupName>CMSIS SW_DSP_Library</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\Lib\ARM\arm_cortexM4lf_math.lib</PathWithFileName>
<FilenameWithoutPath>arm_cortexM4lf_math.lib</FilenameWithoutPath>
</File>
</Group>
<MDIGroups>
<Orientation>1</Orientation>
<ActiveMDIGroup>0</ActiveMDIGroup>
<MDIGroup>
<Size>100</Size>
<ActiveTab>0</ActiveTab>
<Documents>
<Doc>
<Name>..\arm_signal_converge_example_f32.c</Name>
<ColumnNumber>0</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
</Doc>
</Documents>
</MDIGroup>
</MDIGroups>
</ProjectOpt>
| {
"pile_set_name": "Github"
} |
// The MIT License (MIT)
//
// Copyright (c) 2015-2020 Rasmus Mikkelsen
// Copyright (c) 2015-2020 eBay Software Foundation
// https://github.com/eventflow/EventFlow
//
// 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 EventFlow.Configuration;
namespace EventFlow.Core.IoC
{
internal interface IFactory
{
object Create(IResolverContext resolverContext, Type[] genericTypeArguments);
}
} | {
"pile_set_name": "Github"
} |
{
"name": "statuses",
"description": "HTTP status utility",
"version": "1.2.1",
"author": {
"name": "Jonathan Ong",
"email": "[email protected]",
"url": "http://jongleberry.com"
},
"repository": {
"type": "git",
"url": "https://github.com/jshttp/statuses"
},
"license": "MIT",
"keywords": [
"http",
"status",
"code"
],
"files": [
"index.js",
"codes.json",
"LICENSE"
],
"devDependencies": {
"csv-parse": "0.0.6",
"istanbul": "0",
"mocha": "1",
"stream-to-array": "2"
},
"scripts": {
"build": "node scripts/build.js",
"update": "node scripts/update.js",
"test": "mocha --reporter spec --bail --check-leaks",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks"
},
"gitHead": "49e6ac7ae4c63ee8186f56cb52112a7eeda28ed7",
"bugs": {
"url": "https://github.com/jshttp/statuses/issues"
},
"homepage": "https://github.com/jshttp/statuses",
"_id": "[email protected]",
"_shasum": "dded45cc18256d51ed40aec142489d5c61026d28",
"_from": "statuses@1",
"_npmVersion": "1.4.28",
"_npmUser": {
"name": "dougwilson",
"email": "[email protected]"
},
"maintainers": [
{
"name": "jongleberry",
"email": "[email protected]"
},
{
"name": "tjholowaychuk",
"email": "[email protected]"
},
{
"name": "dougwilson",
"email": "[email protected]"
},
{
"name": "shtylman",
"email": "[email protected]"
},
{
"name": "mscdex",
"email": "[email protected]"
},
{
"name": "fishrock123",
"email": "[email protected]"
}
],
"dist": {
"shasum": "dded45cc18256d51ed40aec142489d5c61026d28",
"tarball": "http://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
"readme": "ERROR: No README data found!"
}
| {
"pile_set_name": "Github"
} |
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %}">
<meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
<title>{% if page.homepage == true %} {{site.homepage_title}} {% elsif page.title %}{{ page.title }}{% endif %} | {{ site.site_title }}</title>
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/modern-business.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/customstyles.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/theme-blue.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/printstyles.css" | prepend: site.baseurl }}">
<script>
Prince.addScriptFunc("datestamp", function() {
return "PDF last generated: {{ site.time | date: '%B %d, %Y' }}";
});
</script>
<script>
Prince.addScriptFunc("guideName", function() {
return "{{site.print_title}} User Guide";
});
</script>
| {
"pile_set_name": "Github"
} |
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl { namespace aux {
/// forward declaration
template<
long N
, typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct reverse_fold_impl;
template< long N >
struct reverse_fold_chunk;
template<> struct reverse_fold_chunk<0>
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State fwd_state0;
typedef fwd_state0 bkwd_state0;
typedef bkwd_state0 state;
typedef iter0 iterator;
};
};
template<> struct reverse_fold_chunk<1>
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State fwd_state0;
typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
typedef typename mpl::next<iter0>::type iter1;
typedef fwd_state1 bkwd_state1;
typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
typedef bkwd_state0 state;
typedef iter1 iterator;
};
};
template<> struct reverse_fold_chunk<2>
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State fwd_state0;
typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
typedef typename mpl::next<iter0>::type iter1;
typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
typedef typename mpl::next<iter1>::type iter2;
typedef fwd_state2 bkwd_state2;
typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
typedef bkwd_state0 state;
typedef iter2 iterator;
};
};
template<> struct reverse_fold_chunk<3>
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State fwd_state0;
typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
typedef typename mpl::next<iter0>::type iter1;
typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
typedef typename mpl::next<iter1>::type iter2;
typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
typedef typename mpl::next<iter2>::type iter3;
typedef fwd_state3 bkwd_state3;
typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
typedef bkwd_state0 state;
typedef iter3 iterator;
};
};
template<> struct reverse_fold_chunk<4>
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State fwd_state0;
typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
typedef typename mpl::next<iter0>::type iter1;
typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
typedef typename mpl::next<iter1>::type iter2;
typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
typedef typename mpl::next<iter2>::type iter3;
typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
typedef typename mpl::next<iter3>::type iter4;
typedef fwd_state4 bkwd_state4;
typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
typedef bkwd_state0 state;
typedef iter4 iterator;
};
};
template< long N >
struct reverse_fold_chunk
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef First iter0;
typedef State fwd_state0;
typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
typedef typename mpl::next<iter0>::type iter1;
typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
typedef typename mpl::next<iter1>::type iter2;
typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
typedef typename mpl::next<iter2>::type iter3;
typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
typedef typename mpl::next<iter3>::type iter4;
typedef reverse_fold_impl<
( (N - 4) < 0 ? 0 : N - 4 )
, iter4
, Last
, fwd_state4
, BackwardOp
, ForwardOp
> nested_chunk;
typedef typename nested_chunk::state bkwd_state4;
typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
typedef bkwd_state0 state;
typedef typename nested_chunk::iterator iterator;
};
};
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct reverse_fold_step;
template<
typename Last
, typename State
>
struct reverse_fold_null_step
{
typedef Last iterator;
typedef State state;
};
template<>
struct reverse_fold_chunk< -1 >
{
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct result_
{
typedef typename if_<
typename is_same< First,Last >::type
, reverse_fold_null_step< Last,State >
, reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >
>::type res_;
typedef typename res_::state state;
typedef typename res_::iterator iterator;
};
};
template<
typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct reverse_fold_step
{
typedef reverse_fold_chunk< -1 >::template result_<
typename mpl::next<First>::type
, Last
, typename apply2<ForwardOp,State, typename deref<First>::type>::type
, BackwardOp
, ForwardOp
> nested_step;
typedef typename apply2<
BackwardOp
, typename nested_step::state
, typename deref<First>::type
>::type state;
typedef typename nested_step::iterator iterator;
};
template<
long N
, typename First
, typename Last
, typename State
, typename BackwardOp
, typename ForwardOp
>
struct reverse_fold_impl
: reverse_fold_chunk<N>
::template result_< First,Last,State,BackwardOp,ForwardOp >
{
};
}}}
| {
"pile_set_name": "Github"
} |
# Dog Breed Classification
This repo is designed to be as easy as possible for machine learning hobbyists or professionals to learn how transfer learning works using a hands on example without installing a single piece of software. The students will get to use keras (with TensorFlow backend) along with GPUs on Huawei's ModelArts platform to classify different dog breeds.
### You'll still need these things:
- A web browser preferably chrome
- A Huawei cloud account with sufficient balance
- And an internet connection
### Data
[Kaggle's Dog Breed Datase](https://www.kaggle.com/c/dog-breed-identification/data)
#### Data Description:
- train.zip - the training set, you are provided the breed for these dogs
- test.zip - the test set, you must predict the probability of each breed for each image
- sample_submission.csv - a sample submission file in the correct format
- labels.csv - the breeds for the images in the train set
### We will:
- Preprocess images data for computer vision tasks
- Transfer Learning: build new layers on top of the pre-trained Xception model using Keras and Tensorflow
- Evaluate our model on the test set
- Run the model on new dog images from the web
| {
"pile_set_name": "Github"
} |
GNU GENERAL PUBLIC LICENSE (with font exception)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
| {
"pile_set_name": "Github"
} |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// illumos system calls not present on Solaris.
// +build amd64,illumos
package unix
import "unsafe"
func bytes2iovec(bs [][]byte) []Iovec {
iovecs := make([]Iovec, len(bs))
for i, b := range bs {
iovecs[i].SetLen(len(b))
if len(b) > 0 {
// somehow Iovec.Base on illumos is (*int8), not (*byte)
iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
} else {
iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
}
}
return iovecs
}
//sys readv(fd int, iovs []Iovec) (n int, err error)
func Readv(fd int, iovs [][]byte) (n int, err error) {
iovecs := bytes2iovec(iovs)
n, err = readv(fd, iovecs)
return n, err
}
//sys preadv(fd int, iovs []Iovec, off int64) (n int, err error)
func Preadv(fd int, iovs [][]byte, off int64) (n int, err error) {
iovecs := bytes2iovec(iovs)
n, err = preadv(fd, iovecs, off)
return n, err
}
//sys writev(fd int, iovs []Iovec) (n int, err error)
func Writev(fd int, iovs [][]byte) (n int, err error) {
iovecs := bytes2iovec(iovs)
n, err = writev(fd, iovecs)
return n, err
}
//sys pwritev(fd int, iovs []Iovec, off int64) (n int, err error)
func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {
iovecs := bytes2iovec(iovs)
n, err = pwritev(fd, iovecs, off)
return n, err
}
| {
"pile_set_name": "Github"
} |
import sqlite3
with sqlite3.connect('WordWise.kll.en.en.db') as f:
lemmas = f.execute('SELECT id,lemma FROM lemmas').fetchall()
senses = dict(f.execute('SELECT display_lemma_id,id FROM senses WHERE id>0').fetchall()[::-1])
display_lemma_ids = senses.keys()
csv = []
print('Please wait a moment.')
for id_, word in lemmas:
if id_ in display_lemma_ids:
id = senses[id_]
if ' ' in word or "'" in word:
csv.append('"{0}",{1}'.format(word, id))
else:
csv.append('{0},{1}'.format(word, id))
with open('all.csv', 'wb') as f:
f = f.write('\n'.join(csv).encode('utf-8'))
print('Success!')
| {
"pile_set_name": "Github"
} |
from __future__ import division
import os
import struct
import argparse
import random
import time
import numpy as np
# import dynet as dy
# import dynet_config
# dynet_config.set_gpu()
import dynet as dy
# First, download the MNIST dataset from the official website and decompress it.
# wget -O - http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz | gunzip > train-images.idx3-ubyte
# wget -O - http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz | gunzip > train-labels.idx1-ubyte
# wget -O - http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz | gunzip > t10k-images.idx3-ubyte
# wget -O - http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz | gunzip > t10k-labels.idx1-ubyte
parser = argparse.ArgumentParser(description='DyNet MNIST Example')
parser.add_argument("--path", type=str, default=".",
help="Path to the MNIST data files (unzipped).")
parser.add_argument('--batch-size', type=int, default=64,
help='input batch size for training (default: 64)')
parser.add_argument('--epochs', type=int, default=20,
help='number of epochs to train (default: 20)')
parser.add_argument('--lr', type=float, default=0.01,
help='learning rate (default: 0.01)')
parser.add_argument('--log-interval', type=int, default=10,
help='how many batches to wait before logging training status')
parser.add_argument("--dynet_autobatch", type=int, default=0,
help="Set to 1 to turn on autobatching.")
parser.add_argument("--dynet_gpus", type=int, default=0,
help="Set to 1 to train on GPU.")
HIDDEN_DIM = 1024
DROPOUT_RATE = 0.4
# Adapted from https://gist.github.com/akesling/5358964
def read(dataset, path):
if dataset is "training":
fname_img = os.path.join(path, "train-images.idx3-ubyte")
fname_lbl = os.path.join(path, "train-labels.idx1-ubyte")
elif dataset is "testing":
fname_img = os.path.join(path, "t10k-images.idx3-ubyte")
fname_lbl = os.path.join(path, "t10k-labels.idx1-ubyte")
else:
raise ValueError("dataset must be 'training' or 'testing'")
with open(fname_lbl, 'rb') as flbl:
_, _ = struct.unpack(">II", flbl.read(8))
lbl = np.fromfile(flbl, dtype=np.int8)
with open(fname_img, 'rb') as fimg:
_, _, rows, cols = struct.unpack(">IIII", fimg.read(16))
img = np.multiply(np.fromfile(fimg, dtype=np.uint8).reshape(len(lbl), rows, cols), 1.0/255.0)
get_img = lambda idx: (lbl[idx], img[idx])
for i in range(len(lbl)):
yield get_img(i)
class mnist_network(object):
def __init__(self, m):
self.pConv1 = m.add_parameters((5, 5, 1, 32))
self.pB1 = m.add_parameters((32, ))
self.pConv2 = m.add_parameters((5, 5, 32, 64))
self.pB2 = m.add_parameters((64, ))
self.pW1 = m.add_parameters((HIDDEN_DIM, 7*7*64))
self.pB3 = m.add_parameters((HIDDEN_DIM, ))
self.pW2 = m.add_parameters((10, HIDDEN_DIM))
def __call__(self, inputs, dropout=False):
x = dy.inputTensor(inputs)
conv1 = dy.parameter(self.pConv1)
b1 = dy.parameter(self.pB1)
x = dy.conv2d_bias(x, conv1, b1, [1, 1], is_valid=False)
x = dy.rectify(dy.maxpooling2d(x, [2, 2], [2, 2]))
conv2 = dy.parameter(self.pConv2)
b2 = dy.parameter(self.pB2)
x = dy.conv2d_bias(x, conv2, b2, [1, 1], is_valid=False)
x = dy.rectify(dy.maxpooling2d(x, [2, 2], [2, 2]))
x = dy.reshape(x, (7*7*64, 1))
w1 = dy.parameter(self.pW1)
b3 = dy.parameter(self.pB3)
h = dy.rectify(w1*x+b3)
if dropout:
h = dy.dropout(h, DROPOUT_RATE)
w2 = dy.parameter(self.pW2)
output = w2*h
# output = dy.softmax(w2*h)
return output
def create_network_return_loss(self, inputs, expected_output, dropout=False):
out = self(inputs, dropout)
loss = dy.pickneglogsoftmax(out, expected_output)
# loss = -dy.log(dy.pick(out, expected_output))
return loss
def create_network_return_best(self, inputs, dropout=False):
out = self(inputs, dropout)
out = dy.softmax(out)
return np.argmax(out.npvalue())
# return np.argmax(out.npvalue())
args = parser.parse_args()
train_data = [(lbl, img) for (lbl, img) in read("training", args.path)]
test_data = [(lbl, img) for (lbl, img) in read("testing", args.path)]
m = dy.ParameterCollection()
network = mnist_network(m)
trainer = dy.SimpleSGDTrainer(m, learning_rate=args.lr)
def train(epoch):
random.shuffle(train_data)
i = 0
epoch_start = time.time()
while i < len(train_data):
dy.renew_cg()
losses = []
for lbl, img in train_data[i:i+args.batch_size]:
loss = network.create_network_return_loss(img, lbl, dropout=True)
losses.append(loss)
mbloss = dy.average(losses)
if (int(i/args.batch_size)) % args.log_interval == 0:
print('Train Epoch: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}'.format(
epoch, i, len(train_data),
100. * i/len(train_data), mbloss.value()))
mbloss.backward()
trainer.update()
i += args.batch_size
epoch_end = time.time()
print("{} s per epoch".format(epoch_end-epoch_start))
def test():
correct = 0
dy.renew_cg()
losses = []
for lbl, img in test_data:
losses.append(network.create_network_return_loss(img, lbl, dropout=False))
if lbl == network.create_network_return_best(img, dropout=False):
correct += 1
mbloss = dy.average(losses)
print('\nTest set: Average loss: {:.4f}, Accuracy: {}/{} ({:.0f}%)\n'.format(
mbloss.value(), correct, len(test_data),
100. * correct / len(test_data)))
for epoch in range(1, args.epochs + 1):
train(epoch)
test()
# m.save("/tmp/tmp.model")
| {
"pile_set_name": "Github"
} |
/dts-v1/;
#include "bcm6358.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "Huawei EchoLife HG556a (version C)";
compatible = "huawei,hg556a-c", "brcm,bcm6358";
chosen {
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
stdout-path = "serial0:115200n8";
};
keys {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
help {
label = "help";
gpios = <&pinctrl 36 1>;
linux,code = <KEY_HELP>;
debounce-interval = <60>;
};
wlan {
label = "wlan";
gpios = <&pinctrl 9 1>;
linux,code = <KEY_WLAN>;
debounce-interval = <60>;
};
restart {
label = "restart";
gpios = <&pinctrl 10 1>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
};
reset {
label = "reset";
gpios = <&pinctrl 11 1>;
linux,code = <KEY_CONFIG>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
lan1_green {
label = "HW556:green:lan1";
gpios = <&pinctrl 0 1>;
};
lan2_green {
label = "HW556:green:lan2";
gpios = <&pinctrl 1 1>;
};
dsl_red {
label = "HW556:red:dsl";
gpios = <&pinctrl 2 1>;
};
power_red {
label = "HW556:red:power";
gpios = <&pinctrl 3 1>;
default-state = "on";
};
message_red {
label = "HW556:red:message";
gpios = <&pinctrl 12 1>;
};
lan1_red {
label = "HW556:red:lan1";
gpios = <&pinctrl 13 1>;
};
hspa_red {
label = "HW556:red:hspa";
gpios = <&pinctrl 15 1>;
};
lan2_red {
label = "HW556:red:lan2";
gpios = <&pinctrl 22 1>;
};
lan3_green {
label = "HW556:green:lan3";
gpios = <&pinctrl 23 1>;
};
lan3_red {
label = "HW556:red:lan3";
gpios = <&pinctrl 26 1>;
};
lan4_green {
label = "HW556:green:lan4";
gpios = <&pinctrl 27 1>;
};
lan4_red {
label = "HW556:red:lan4";
gpios = <&pinctrl 28 1>;
};
};
};
&pflash {
status = "ok";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
cfe@0 {
label = "CFE";
reg = <0x000000 0x020000>;
read-only;
};
linux@20000 {
label = "linux";
reg = <0x020000 0xec0000>;
compatible = "brcm,bcm963xx-imagetag";
};
cal_data@ee0000 {
label = "cal_data";
reg = <0xee0000 0x100000>;
read-only;
};
nvram@fe0000 {
label = "nvram";
reg = <0xfe0000 0x020000>;
};
};
};
&uart0 {
status = "ok";
};
| {
"pile_set_name": "Github"
} |
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See docs/COPYRIGHT.rdoc for more details.
#++
FactoryBot.define do
factory :document_category do
project
sequence(:name) { |n| "I am Category No. #{n}" }
end
end
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API Document [zTree -- jQuery tree plug-ins.]</title>
<link rel="stylesheet" href="apiCss/common.css" type="text/css">
<link rel='stylesheet' href='apiCss/zTreeStyleForApi.css' type='text/css'>
<script type="text/javascript">
var ie = (function(){
var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : undef;
}()), ie6 = (ie === 6),
path = window.location.pathname.replace(/.*\/([^\/\.]*)\..*/g,"$1"),
langLib = [];
ie = ie<9;
if(ie) {
document.write('<link rel="stylesheet" href="apiCss/common_ie6.css" type="text/css">');
}
var lang = "en",
ajaxMsg = "If you use chrome browser, please copy the API files to local webserver. \n\n( because chrome browser can't allow AJAX access to 'file://' )";
</script>
</head>
<body>
<div id="header_wrap" class="header_wrap" style="padding-top: 30px;">
<div id="header" class="header round">
<div class="light-bulb" alt=""></div>
<div class="ieSuggest">If you use the Chrome / FireFox / Opera / IE9 browser will be even more dazzling effect!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.15 API Document</em></h1><p></p>
<p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p>
</div>
<ul class="shortcuts language" style="top:0;">
<li><a href="API_cn.html" onclick="window.location.href='API_cn.html'"><button class="ico cn" title="Chinese" type="button"></button><span class=""></span></a></li>
</ul>
</div>
</div>
<div id="content_wrap" class="content_wrap">
<div id="content" class="content">
<div class="nav_section">
<ul>
<li class="first">Notes: </li>
<li><button class="ico16 z_core" onfocus="this.blur();"></button><span>core package</span></li>
<li><button class="ico16 z_check" onfocus="this.blur();"></button><span>excheck pack</span></li>
<li><button class="ico16 z_edit" onfocus="this.blur();"></button><span>exedit pack</span></li>
<li><button class="ico16 z_hide" onfocus="this.blur();"></button><span>exhide pack</span></li>
<li class="noline">
<button class="ico16 z_search" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
<input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
<button class="ico16 searchPrev disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
</li>
</ul>
</div>
<div id="contentBox" class="contentBox round clearfix">
<div id="apiContent" class="apiContent">
<div id="api_setting" class="api_setting left">
<ul class="api_content_title"><li>setting details</li></ul>
<ul id="settingTree" class="ztree"></ul>
</div>
<div id="api_function" class="api_function right">
<ul class="api_content_title"><li>zTree method details</li></ul>
<ul id="functionTree" class="ztree"></ul>
<ul class="api_content_title"><li>treeNode data details</li></ul>
<ul id="treenodeTree" class="ztree"></ul>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!-- overlayed -->
<div id="overlayDiv" class="baby_overlay">
<div id="overlayContent" class="content round clearfix">
<div class="overlaySearch">
<button class="ico16 z_search" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
<input type="text" class="searchKey search empty" value=""><input type="text" class="searchResult search" value="">
<button class="ico16 searchPrev disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button><button class="ico16 searchNext disabled" onfocus="this.blur();" title="'Enter', 'left' and 'right' key can locate the search results quickly."></button>
</div>
<a id="overlayDivCloseBtn" class="close"></a>
<div id="overlayDetailDiv" class="details"></div>
</div>
<div id="overlayDivArrow" class="baby_overlay_arrow"></div>
</div>
<script type="text/javascript" src="apiCss/jquery-1.6.2.min.js"></script>
<script type='text/javascript' src='apiCss/jquery.ztree.core-3.5.js'></script>
<script type='text/javascript' src='apiCss/api.js'></script>
<script type="text/javascript">
$(document).ready(function(){
apiContent._init();
});
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
{
"keyboard_name": "Murciélago",
"url": "",
"maintainer": "elagil",
"width": 15,
"height": 5.75,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"0,0", "x":0, "y":0.425},
{"label":"0,1", "x":1, "y":0.25},
{"label":"0,2", "x":2, "y":0.125},
{"label":"0,3", "x":3, "y":0.0},
{"label":"0,4", "x":4, "y":0.125},
{"label":"0,5", "x":5, "y":0.25},
{"label":"6,0", "x":9, "y":0.25},
{"label":"6,1", "x":10, "y":0.125},
{"label":"6,2", "x":11, "y":0.0},
{"label":"6,3", "x":12, "y":0.125},
{"label":"6,4", "x":13, "y":0.25},
{"label":"6,5", "x":14, "y":0.425},
{"label":"1,0", "x":0, "y":1.425},
{"label":"1,1", "x":1, "y":1.25},
{"label":"1,2", "x":2, "y":1.125},
{"label":"1,3", "x":3, "y":1.0},
{"label":"1,4", "x":4, "y":1.125},
{"label":"1,5", "x":5, "y":1.25},
{"label":"7,0", "x":9, "y":1.25},
{"label":"7,1", "x":10, "y":1.125},
{"label":"7,2", "x":11, "y":1.0},
{"label":"7,3", "x":12, "y":1.125},
{"label":"7,4", "x":13, "y":1.25},
{"label":"7,5", "x":14, "y":1.425},
{"label":"2,0", "x":0, "y":2.425},
{"label":"2,1", "x":1, "y":2.25},
{"label":"2,2", "x":2, "y":2.125},
{"label":"2,3", "x":3, "y":2.0},
{"label":"2,4", "x":4, "y":2.125},
{"label":"2,5", "x":5, "y":2.25},
{"label":"8,0", "x":9, "y":2.25},
{"label":"8,1", "x":10, "y":2.125},
{"label":"8,2", "x":11, "y":2.0},
{"label":"8,3", "x":12, "y":2.125},
{"label":"8,4", "x":13, "y":2.25},
{"label":"8,5", "x":14, "y":2.425},
{"label":"3,0", "x":0, "y":3.425},
{"label":"3,1", "x":1, "y":3.25},
{"label":"3,2", "x":2, "y":3.125},
{"label":"3,3", "x":3, "y":3.0},
{"label":"3,4", "x":4, "y":3.125},
{"label":"3,5", "x":5, "y":3.25},
{"label":"5,5", "x":6, "y":3.25},
{"label":"11,0", "x":8, "y":3.25},
{"label":"9,0", "x":9, "y":3.25},
{"label":"9,1", "x":10, "y":3.125},
{"label":"9,2", "x":11, "y":3.0},
{"label":"9,3", "x":12, "y":3.125},
{"label":"9,4", "x":13, "y":3.25},
{"label":"9,5", "x":14, "y":3.425},
{"label":"4,1", "x":1.7, "y":4.25},
{"label":"4,2", "x":2.7, "y":4.05},
{"label":"4,3", "x":3.7, "y":4.15},
{"label":"4,4", "x":4.7, "y":4.35},
{"label":"4,5", "x":5.8, "y":4.25, "h":1.5},
{"label":"10,0", "x":8.2, "y":4.25, "h":1.5},
{"label":"10,1", "x":9.3, "y":4.35},
{"label":"10,2", "x":10.3, "y":4.15},
{"label":"10,3", "x":11.3, "y":4.05},
{"label":"10,4", "x":12.3, "y":4.25}
]
}
}
}
| {
"pile_set_name": "Github"
} |
// Generated by CoffeeScript 1.12.7
/*
ExternalEditor
Kevin Gravier <[email protected]>
MIT
*/
(function() {
var LaunchEditorError,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
LaunchEditorError = (function(superClass) {
extend(LaunchEditorError, superClass);
LaunchEditorError.prototype.message = 'Failed launch editor';
function LaunchEditorError(original_error) {
this.original_error = original_error;
}
return LaunchEditorError;
})(Error);
module.exports = LaunchEditorError;
}).call(this);
| {
"pile_set_name": "Github"
} |
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
from torch.autograd import Variable
from functools import reduce
import operator
count_ops = 0
count_params = 0
module_number = 0
modules_flops = []
modules_params = []
to_print = False
def get_num_gen(gen):
return sum(1 for x in gen)
def is_pruned(layer):
try:
layer.mask
return True
except AttributeError:
return False
def is_leaf(model):
return get_num_gen(model.children()) == 0
def get_layer_info(layer):
layer_str = str(layer)
type_name = layer_str[:layer_str.find('(')].strip()
return type_name
def get_layer_param(model):
return sum([reduce(operator.mul, i.size(), 1) for i in model.parameters()])
### The input batch size should be 1 to call this function
def measure_layer(layer, x):
global count_ops, count_params, module_number, modules_flops
global modules_params, to_print
delta_ops = 0
delta_params = 0
multi_add = 1
if to_print:
print("")
type_name = get_layer_info(layer)
### ops_conv
if type_name in ['Conv2d']:
out_h = int((x.size()[2] + 2 * layer.padding[0] - layer.kernel_size[0]) /
layer.stride[0] + 1)
out_w = int((x.size()[3] + 2 * layer.padding[1] - layer.kernel_size[1]) /
layer.stride[1] + 1)
delta_ops = layer.in_channels * layer.out_channels * layer.kernel_size[0] * \
layer.kernel_size[1] * out_h * out_w / layer.groups * multi_add
delta_params = get_layer_param(layer)
if hasattr(layer, 'shared'):
delta_params = delta_params / int(layer.shared)
module_number += 1
modules_flops.append(delta_ops)
modules_params.append(delta_params)
if to_print:
print(layer)
print("Module number: ", module_number)
print("FLOPS:", delta_ops)
print("Parameter:", delta_params)
### ops_nonlinearity
elif type_name in ['ReLU']:
delta_ops = x.numel()
delta_params = get_layer_param(layer)
# module_number += 1
# modules_flops.append(delta_ops)
# to_print:
# print(layer)
# print("Module number: ", module_number)
# print("FLOPS:", delta_ops)
### ops_pooling
elif type_name in ['AvgPool2d']:
in_w = x.size()[2]
kernel_ops = layer.kernel_size * layer.kernel_size
out_w = int((in_w + 2 * layer.padding - layer.kernel_size) / layer.stride + 1)
out_h = int((in_w + 2 * layer.padding - layer.kernel_size) / layer.stride + 1)
delta_ops = x.size()[0] * x.size()[1] * out_w * out_h * kernel_ops
delta_params = get_layer_param(layer)
elif type_name in ['AdaptiveAvgPool2d']:
delta_ops = x.size()[0] * x.size()[1] * x.size()[2] * x.size()[3]
delta_params = get_layer_param(layer)
### ops_linear
elif type_name in ['Linear']:
weight_ops = layer.weight.numel() * multi_add
bias_ops = layer.bias.numel()
delta_ops = x.size()[0] * (weight_ops + bias_ops)
delta_params = get_layer_param(layer)
# module_number += 1
# modules_flops.append(delta_ops)
# if to_print:
# print("Module number: ", module_number)
# print("FLOPS:", delta_ops)
# print("##Current params: ", count_params)
### ops_nothing
elif type_name in ['BatchNorm2d', 'Dropout2d', 'DropChannel', 'Dropout']:
delta_params = get_layer_param(layer)
### unknown layer type
else:
raise TypeError('unknown layer type: %s' % type_name)
count_ops += delta_ops
count_params += delta_params
layer.flops = delta_ops
layer.params = delta_params
return
def measure_model(model, H, W, debug=False):
global count_ops, count_params, module_number, modules_flops
global modules_params, to_print
count_ops = 0
count_params = 0
module_number = 0
modules_flops = []
modules_params = []
to_print = debug
data = Variable(torch.zeros(1, 3, H, W))
def should_measure(x):
return is_leaf(x) or is_pruned(x)
def modify_forward(model):
for child in model.children():
if should_measure(child):
def new_forward(m):
def lambda_forward(x):
measure_layer(m, x)
return m.old_forward(x)
return lambda_forward
child.old_forward = child.forward
child.forward = new_forward(child)
else:
modify_forward(child)
def restore_forward(model):
for child in model.children():
# leaf node
if is_leaf(child) and hasattr(child, 'old_forward'):
child.forward = child.old_forward
child.old_forward = None
else:
restore_forward(child)
modify_forward(model)
model.forward(data)
restore_forward(model)
if to_print:
print("modules flops sum: ", sum(modules_flops[0:2]))
return count_ops, count_params
| {
"pile_set_name": "Github"
} |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// <map>
// Check that std::map and its iterators can be instantiated with an incomplete
// type.
#include <map>
#include "test_macros.h"
struct A {
typedef std::map<A, A> Map;
int data;
Map m;
Map::iterator it;
Map::const_iterator cit;
};
inline bool operator==(A const& L, A const& R) { return &L == &R; }
inline bool operator<(A const& L, A const& R) { return L.data < R.data; }
int main(int, char**) {
A a;
return 0;
}
| {
"pile_set_name": "Github"
} |
/**
* Copyright (c) Codice Foundation
*
* <p>This is free software: you can redistribute it and/or modify it under the terms of the GNU
* Lesser General Public License as published by the Free Software Foundation, either version 3 of
* the License, or any later version.
*
* <p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public
* License is distributed along with this program and can be found at
* <http://www.gnu.org/licenses/lgpl.html>.
*/
package ddf.catalog.transform;
import ddf.catalog.data.BinaryContent;
import ddf.catalog.data.Metacard;
import java.io.Serializable;
import java.util.Map;
/**
* The MetacardTransfomer is used to transform a {@link Metacard} to a provided {@link
* BinaryContent}. The purpose of a {@code MetacardTransformer} is to change the format of the
* {@link Metacard}. For example if the {@link Metacard} content is in an XML format, then a {@code
* MetacardTransformer} implementation can be used to transform the {@link Metacard} content into an
* HTML format.
*
* <p><b>Implementations of this interface <em>must</em>:</b>
*
* <ul>
* <li/>Register with the OSGi Service Registry using the {@code MetacardTransformer} interface.
* <li/>Include a Service property with name "id" ({@link ddf.catalog.Constants#SERVICE_ID}) and a
* {@link String} value uniquely identifying the particular implementation
* </ul>
*/
public interface MetacardTransformer {
/**
* Transforms the provided {@link Metacard} into a {@link BinaryContent}
*
* @param metacard the {@link Metacard} to be transformed
* @param arguments any arguments to be used in the transformation. Keys are specific to each
* {@link MetacardTransformer} implementation
* @return {@link BinaryContent} the result of the {@link Metacard} transformation
* @throws CatalogTransformerException if the {@link Metacard} can not be transformed
*/
public BinaryContent transform(Metacard metacard, Map<String, Serializable> arguments)
throws CatalogTransformerException;
}
| {
"pile_set_name": "Github"
} |
#posts img {
max-width: 100%;
}
#content * {
font-size: 16px;
}
#content h1 {
font-size: 30px;
}
#content h2 {
font-size: 24px;
}
#content h3 {
font-size: 18px;
}
#content h4 {
font-size: 14px;
}
@-webkit-keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@-moz-keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@-ms-keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@keyframes dropdown {
0% {
margin-top: -25px;
opacity: 0;
}
90% {
margin-top: 2px;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@-webkit-keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
@-moz-keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
@-ms-keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
@keyframes pulldown {
0% {
top: 0;
opacity: 0;
}
90% {
top: 90%;
}
100% {
top: 100%;
opacity: 1;
}
}
a,
.btn {
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.btn:focus {
outline: none;
}
ul.dropdown-menu {
box-shadow: rgba(0, 0, 0, 0.172549) 0px 6px 12px 0px;
}
ul.dropdown-menu:before {
content: "";
width: 20px;
height: 12px;
position: absolute;
top: -12px;
right: 20px;
background-image: url("images/triangle_2x.png");
background-size: 20px 12px;
}
ul.dropdown-menu {
display: block;
visibility: hidden;
opacity: 0;
}
.open ul.dropdown-menu {
-webkit-animation: pulldown .2s;
animation: pulldown .2s;
visibility: visible;
opacity: 1;
}
.created-time .fa {
color: #666;
}
#blogNav {
display: none;
background-color: #fff;
opacity: 0.7;
position: fixed;
z-index: 10;
padding: 3px;
border-radius: 3px;
}
#blogNavContent {
overflow-y: auto;
max-height: 250px;
display: none;
-webkit-overflow-scrolling: touch !important;
}
#blogNavNav {
cursor: pointer;
}
#blogNav a {
color: #666;
}
#blogNav:hover {
opacity: 0.9;
}
#blogNav a:hover {
color: #0fb264;
}
#blogNav ul {
padding-left: 20px;
}
#blogNav ul .nav-h2 {
margin-left: 20px;
}
#blogNav ul .nav-h3 {
margin-left: 30px;
}
#blogNav ul .nav-h4 {
margin-left: 40px;
}
#blogNav ul .nav-h5 {
margin-left: 50px;
}
.mobile-created-time {
display: none;
}
#footer {
padding-bottom: 10px;
}
.footer-leanote {
text-align: center;
padding: 3px 0;
color: #ccc;
}
.navbar-brand {
display: none;
}
#themeList label {
text-align: center;
margin-bottom: 5px;
}
#themeList .preview {
display: block;
width: 400px;
background: #fff;
border: 1px solid #ccc;
padding: 5px;
border-radius: 5px;
}
/*"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue", Helvetica, "Microsoft Yahei", Verdana, Simsun, "Segoe UI", "Segoe UI Web Regular", "Segoe UI Symbol", "BBAlpha Sans", "S60 Sans", Arial, sans-serif;*/
::selection {
background: #000000;
color: #ffffff;
}
::-moz-selection {
background: #000000;
color: #ffffff;
}
::-webkit-selection {
background: #000000;
color: #ffffff;
}
*,
body {
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
font-weight: 300;
font-size: 14px;
}
h1,
h2,
h3 {
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
font-weight: 300 !important;
}
a {
cursor: pointer;
}
a:hover {
text-decoration: none !important;
}
#headerAndNav {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 200px;
border-right: 1px solid #ebeff2;
text-align: right;
overflow: scroll;
}
#headerContainer {
width: 190px;
}
#headerContainer {
background-color: #fff;
}
#postsContainer {
margin-left: 211px;
}
#postsContainer {
padding-bottom: 5px;
}
#postsContainer .container,
#footerContainer .container {
width: 800px;
}
#postsContainer .container {
margin-left: 12px;
}
/* header */
#header {
color: #000000;
padding: 0 0 20px 0;
margin-top: 15px;
}
#header h1 {
margin: 0;
font-size: 32px;
}
#header h1 a {
color: #000000;
font-size: 32px;
}
#header h1 a img {
height: 40px;
}
#header #blogDesc {
margin-top: 10px;
padding-bottom: 10px;
border-bottom: 1px dashed #ebeff2;
font-size: 16px;
}
#logo {
word-wrap: break-word;
overflow: hidden;
}
.navbar {
margin-bottom: 0;
border-radius: 0;
border: none;
}
.navbar .container {
width: 200px;
}
.navbar-default {
background: none;
border-color: #e7e7e7;
}
.navbar-collapse {
padding-left: 0;
padding-right: 0;
}
.navbar-form {
padding: 0;
}
.navbar-nav {
float: none;
}
.navbar-nav > li {
float: none;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
font-weight: bold;
background: none;
}
.navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
font-size: 16px;
}
/* posts */
#posts {
width: 800px;
}
#posts .each-post {
border-bottom: 1px solid #ebeff2;
margin-bottom: 10px;
padding: 30px;
padding-top: 10px;
}
#posts .each-post .title {
font-size: 32px;
color: #0fb264;
padding: 0 0 15px 0;
}
#posts .each-post .title a {
font-size: 32px;
color: #0fb264;
padding: 0 0 15px 0;
}
#posts .each-post .created-time {
border-bottom: 1px dashed #eee;
padding-bottom: 3px;
margin-bottom: 5px;
}
#posts .each-post .more {
background: #0fb264;
padding: 9px 10px;
border-radius: 2px;
line-height: 1;
font-size: 13px;
display: inline-block;
text-transform: uppercase;
margin-top: 15px;
margin-bottom: 15px;
color: #fff;
}
#disqus_thread {
border-top: 1px solid #eee;
padding: 5px 0 0 0;
}
#search {
width: 170px;
padding-right: 15px;
}
#footerContainer {
background-color: #ffffff;
color: #666666;
}
#footerContainer #footer a {
color: #666666;
}
#footerContainer #footer ul {
list-style: none;
margin: 0;
padding-left: 20px;
}
.tab-content {
padding-bottom: 10px;
border-bottom: 1px solid #ebeff2;
}
.mce-btn {
background: none !important;
}
@media screen and (max-width: 600px) {
html,
body {
overflow-x: hidden;
background-color: #fbfcf7;
}
* {
font-size: 16px;
}
#headerContainer,
#footerContainer {
background-color: #fbfcf7;
margin: 10px 0;
}
#posts .each-post,
#postsContainer {
background-color: #fbfcf7 !important;
}
img {
max-width: 100%;
}
#posts .each-post {
padding: 10px;
}
#posts .each-post .title {
font-size: 24px;
border-left: 5px solid #65bd77;
font-weight: bold;
padding: 5px 0;
padding-left: 10px;
margin-bottom: 10px;
}
.container {
padding-right: 10px;
padding-left: 10px;
}
.created-time {
display: none;
}
.mobile-created-time {
display: block;
}
.mobile-created-time #userLogo {
display: inline-block;
max-height: 40px;
width: 40px;
border-radius: 50%;
}
#content {
margin-top: 10px;
}
.right-section .dropdown,
.right-section .btn {
display: none !important;
}
#blogNav {
left: initial !important;
right: 10px !important;
}
#postsContainer .container,
#footerContainer .container {
max-width: 100%;
}
#postsContainer {
margin: 0 !important;
max-width: 100%;
padding-top: 10px;
background: #f5f5f5 url("images/noise.png");
}
#posts {
max-width: 100% !important;
}
#footerContainer #footer a {
padding: 3px;
}
#footerContainer #footer a:hover,
#footerContainer #footer a:focus {
color: #65bd77;
}
#headerAndNav {
position: initial;
text-align: left;
width: 100%;
border-bottom: 2px dashed #ebeff2;
}
#headerAndNav #headerContainer {
width: 100%;
height: auto;
padding-top: 30px;
}
#headerAndNav #header {
margin: 0;
padding: 0;
}
#headerAndNav #header h1 {
display: none;
}
#headerAndNav .navbar-collapse {
overflow-x: hidden;
}
#headerAndNav #blogDesc {
border: none;
margin-top: 20px;
font-size: 24px;
}
#headerAndNav .navbar-brand {
display: inline-block;
line-height: 50px;
padding: 0;
padding-left: 10px;
}
#headerAndNav .navbar-brand img {
height: 40px;
}
#headerAndNav .navbar .container {
width: auto;
padding: 0 15px;
}
#headerAndNav .navbar {
position: fixed;
top: 0;
right: 0;
left: 0;
background: #fbfcf7;
z-index: 1000;
border-bottom: 1px solid #DEDDDF;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff;
background-color: #FDFFF5;
}
#headerAndNav .navbar-nav {
margin: 0 10px;
}
#headerAndNav .navbar-nav a {
padding-left: 10px;
border-radius: 5px;
}
#headerAndNav #search {
width: 100%;
margin: 10px;
}
#headerAndNav .navbar-form {
border: none;
}
#myTab,
.tab-content {
padding: 0 10px;
}
}
table {
margin-bottom: 16px;
}
table th, table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
font-weight: bold;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
border: 1px solid #ddd;
border-collapse: collapse;
padding: 6px 13px;
}
.desc *, #content * {
word-wrap: break-word;
}
| {
"pile_set_name": "Github"
} |
$bc-describe: "It";
$bc-describe-depth: 0;
$bc-passing: null;
$bc-skipping: false;
$bc-errors: ();
| {
"pile_set_name": "Github"
} |
package org.emdev.ui.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class BaseViewHolder {
private View view;
public void init(final View view) {
this.view = view;
view.setTag(this);
}
public final View getView() {
return view;
}
@SuppressWarnings("unchecked")
public static <T extends BaseViewHolder> T getOrCreateViewHolder(final Class<T> clazz, final int resID,
final View view, final ViewGroup parent) {
if (view == null) {
final Context context = parent.getContext();
try {
final T holder = clazz.newInstance();
holder.init(LayoutInflater.from(context).inflate(resID, parent, false));
return holder;
} catch (final Throwable ex) {
throw new RuntimeException("ViewHolder creation failed", ex);
}
}
return (T) view.getTag();
}
}
| {
"pile_set_name": "Github"
} |
{
"header" :
{
"platform" : "prologue",
"module" : "delfx",
"api" : "1.1-0",
"dev_id" : 0,
"prg_id" : 0,
"version" : "0.1-0",
"name" : "test",
"num_param" : 0
}
}
| {
"pile_set_name": "Github"
} |
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package factory
import (
"fmt"
"k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage/storagebackend"
)
// DestroyFunc is to destroy any resources used by the storage returned in Create() together.
type DestroyFunc func()
// Create creates a storage backend based on given config.
func Create(c storagebackend.Config) (storage.Interface, DestroyFunc, error) {
switch c.Type {
case storagebackend.StorageTypeETCD2:
return newETCD2Storage(c)
case storagebackend.StorageTypeUnset, storagebackend.StorageTypeETCD3:
// TODO: We have the following features to implement:
// - Support secure connection by using key, cert, and CA files.
// - Honor "https" scheme to support secure connection in gRPC.
// - Support non-quorum read.
return newETCD3Storage(c)
default:
return nil, nil, fmt.Errorf("unknown storage type: %s", c.Type)
}
}
| {
"pile_set_name": "Github"
} |
package rocks.inspectit.ui.rcp.editor.table.input;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import rocks.inspectit.shared.all.cmr.service.ICachedDataService;
import rocks.inspectit.shared.all.communication.data.AggregatedExceptionSensorData;
import rocks.inspectit.shared.all.communication.data.ExceptionSensorData;
import rocks.inspectit.shared.cs.cmr.service.IExceptionDataAccessService;
import rocks.inspectit.shared.cs.communication.comparator.AggregatedExceptionSensorDataComparatorEnum;
import rocks.inspectit.shared.cs.communication.comparator.ExceptionSensorDataComparatorEnum;
import rocks.inspectit.shared.cs.communication.comparator.IDataComparator;
import rocks.inspectit.shared.cs.communication.comparator.InvocationAwareDataComparatorEnum;
import rocks.inspectit.shared.cs.communication.comparator.ResultComparator;
import rocks.inspectit.ui.rcp.InspectIT;
import rocks.inspectit.ui.rcp.InspectITImages;
import rocks.inspectit.ui.rcp.editor.inputdefinition.InputDefinition;
import rocks.inspectit.ui.rcp.editor.inputdefinition.extra.InputDefinitionExtrasMarkerFactory;
import rocks.inspectit.ui.rcp.editor.preferences.IPreferenceGroup;
import rocks.inspectit.ui.rcp.editor.preferences.PreferenceEventCallback.PreferenceEvent;
import rocks.inspectit.ui.rcp.editor.preferences.PreferenceId;
import rocks.inspectit.ui.rcp.editor.root.IRootEditor;
import rocks.inspectit.ui.rcp.editor.table.TableViewerComparator;
import rocks.inspectit.ui.rcp.editor.viewers.StyledCellIndexLabelProvider;
import rocks.inspectit.ui.rcp.formatter.TextFormatter;
import rocks.inspectit.ui.rcp.repository.CmrRepositoryDefinition;
/**
*
* @author Eduard Tudenhoefner
*
*/
public class GroupedExceptionOverviewInputController extends AbstractTableInputController {
/**
* The ID of this subview / controller.
*/
public static final String ID = "inspectit.subview.table.groupedexceptionoverview";
/**
* The private inner enumeration used to define the used IDs which are mapped into the columns.
* The order in this enumeration represents the order of the columns. If it is reordered,
* nothing else has to be changed.
*
* @author Eduard Tudenhoefner
*
*/
private static enum Column {
/** The class column. */
FQN("Fully-Qualified Name", 450, InspectITImages.IMG_CLASS, ExceptionSensorDataComparatorEnum.FQN),
/** Invocation Affiliation. */
INVOCATION_AFFILLIATION("In Invocations", 120, InspectITImages.IMG_INVOCATION, InvocationAwareDataComparatorEnum.INVOCATION_AFFILIATION),
/** The CREATED column. */
CREATED("Created", 70, null, AggregatedExceptionSensorDataComparatorEnum.CREATED),
/** The RETHROWN column. */
RETHROWN("Rethrown", 70, null, AggregatedExceptionSensorDataComparatorEnum.RETHROWN),
/** The HANDLED column. */
HANDLED("Handled", 70, null, AggregatedExceptionSensorDataComparatorEnum.HANDLED);
/** The name. */
private String name;
/** The width of the column. */
private int width;
/** The image descriptor. Can be <code>null</code> */
private Image image;
/** Comparator for the column. */
private IDataComparator<? super AggregatedExceptionSensorData> dataComparator;
/**
* Default constructor which creates a column enumeration object.
*
* @param name
* The name of the column.
* @param width
* The width of the column.
* @param imageName
* The name of the image. Names are defined in {@link InspectITImages}.
* @param dataComparator
* Comparator for the column.
*/
private Column(String name, int width, String imageName, IDataComparator<? super AggregatedExceptionSensorData> dataComparator) {
this.name = name;
this.width = width;
this.image = InspectIT.getDefault().getImage(imageName);
this.dataComparator = dataComparator;
}
/**
* Converts an ordinal into a column.
*
* @param i
* The ordinal.
* @return The appropriate column.
*/
public static Column fromOrd(int i) {
if ((i < 0) || (i >= Column.values().length)) {
throw new IndexOutOfBoundsException("Invalid ordinal");
}
return Column.values()[i];
}
}
/**
* The template object which is send to the server.
*/
private ExceptionSensorData template;
/**
* Indicates from which point in time data should be shown.
*/
private Date fromDate;
/**
* Indicates until which point in time data should be shown.
*/
private Date toDate;
/**
* The list of {@link ExceptionSensorData} objects which is displayed.
*/
private List<AggregatedExceptionSensorData> exceptionSensorDataList = new ArrayList<>();
/**
* This map holds all objects that are needed to be represented in this view. It uses the fqn of
* an exception as the key. It contains as value the objects that are belonging to a specific
* exception class.
*/
private Map<String, List<AggregatedExceptionSensorData>> overviewMap;
/**
* The data access service to access the data on the CMR.
*/
private IExceptionDataAccessService dataAccessService;
/**
* {@inheritDoc}
*/
@Override
public void setInputDefinition(InputDefinition inputDefinition) {
super.setInputDefinition(inputDefinition);
template = new ExceptionSensorData();
template.setPlatformIdent(inputDefinition.getIdDefinition().getPlatformId());
template.setSensorTypeIdent(inputDefinition.getIdDefinition().getSensorTypeId());
template.setMethodIdent(inputDefinition.getIdDefinition().getMethodId());
if (inputDefinition.hasInputDefinitionExtra(InputDefinitionExtrasMarkerFactory.EXCEPTION_TYPE_EXTRAS_MARKER)) {
String throwableType = inputDefinition.getInputDefinitionExtra(InputDefinitionExtrasMarkerFactory.EXCEPTION_TYPE_EXTRAS_MARKER).getThrowableType();
template.setThrowableType(throwableType);
}
dataAccessService = inputDefinition.getRepositoryDefinition().getExceptionDataAccessService();
}
/**
* {@inheritDoc}
*/
@Override
public void createColumns(TableViewer tableViewer) {
for (Column column : Column.values()) {
TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
viewerColumn.getColumn().setMoveable(true);
viewerColumn.getColumn().setResizable(true);
viewerColumn.getColumn().setText(column.name);
viewerColumn.getColumn().setWidth(column.width);
if (null != column.image) {
viewerColumn.getColumn().setImage(column.image);
}
mapTableViewerColumn(column, viewerColumn);
}
}
/**
* {@inheritDoc}
*/
@Override
public Object getTableInput() {
// this list will be filled with data
return exceptionSensorDataList;
}
/**
* {@inheritDoc}
*/
@Override
public IContentProvider getContentProvider() {
return new GroupedExceptionOverviewContentProvider();
}
/**
* {@inheritDoc}
*/
@Override
public IBaseLabelProvider getLabelProvider() {
return new GroupedExceptionOverviewLabelProvider();
}
/**
* {@inheritDoc}
*/
@Override
public ViewerComparator getComparator() {
ICachedDataService cachedDataService = getInputDefinition().getRepositoryDefinition().getCachedDataService();
TableViewerComparator<AggregatedExceptionSensorData> exceptionOverviewViewerComparator = new TableViewerComparator<>();
for (Column column : Column.values()) {
ResultComparator<AggregatedExceptionSensorData> resultComparator = new ResultComparator<>(column.dataComparator, cachedDataService);
exceptionOverviewViewerComparator.addColumn(getMappedTableViewerColumn(column).getColumn(), resultComparator);
}
return exceptionOverviewViewerComparator;
}
/**
* {@inheritDoc}
*/
@Override
public Set<PreferenceId> getPreferenceIds() {
Set<PreferenceId> preferences = EnumSet.noneOf(PreferenceId.class);
if (getInputDefinition().getRepositoryDefinition() instanceof CmrRepositoryDefinition) {
preferences.add(PreferenceId.CLEAR_BUFFER);
preferences.add(PreferenceId.LIVEMODE);
}
preferences.add(PreferenceId.UPDATE);
preferences.add(PreferenceId.TIMELINE);
return preferences;
}
/**
* {@inheritDoc}
*/
@Override
public boolean canOpenInput(List<? extends Object> data) {
if (data.isEmpty()) {
return true;
}
return false;
}
/**
* {@inheritDoc}
*/
@Override
public void preferenceEventFired(PreferenceEvent preferenceEvent) {
switch (preferenceEvent.getPreferenceId()) {
case TIMELINE:
Map<IPreferenceGroup, Object> preferenceMap = preferenceEvent.getPreferenceMap();
if (preferenceMap.containsKey(PreferenceId.TimeLine.FROM_DATE_ID)) {
fromDate = (Date) preferenceMap.get(PreferenceId.TimeLine.FROM_DATE_ID);
}
if (preferenceMap.containsKey(PreferenceId.TimeLine.TO_DATE_ID)) {
toDate = (Date) preferenceMap.get(PreferenceId.TimeLine.TO_DATE_ID);
}
break;
default:
break;
}
}
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("unchecked")
public void doRefresh(IProgressMonitor monitor, IRootEditor rootEditor) {
monitor.beginTask("Updating Grouped Exception Overview", IProgressMonitor.UNKNOWN);
monitor.subTask("Retrieving the Grouped Exception Overview");
List<AggregatedExceptionSensorData> ungroupedList = null;
// if fromDate and toDate are set, then we retrieve only the data for
// this time interval
if ((null != fromDate) && (null != toDate)) {
ungroupedList = dataAccessService.getDataForGroupedExceptionOverview(template, fromDate, toDate);
} else {
ungroupedList = dataAccessService.getDataForGroupedExceptionOverview(template);
}
List<AggregatedExceptionSensorData> groupedOverviewList = new ArrayList<>();
overviewMap = new HashMap<>();
for (AggregatedExceptionSensorData ungroupedObject : ungroupedList) {
List<AggregatedExceptionSensorData> groupedObjects = Collections.EMPTY_LIST;
if (!overviewMap.containsKey(ungroupedObject.getThrowableType())) {
// map doesn't contain the actual exception class, so we create
// and add a new list for exception classes of the same type
groupedObjects = new ArrayList<>();
groupedObjects.add(ungroupedObject);
overviewMap.put(ungroupedObject.getThrowableType(), groupedObjects);
} else {
// map contains the actual exception class, so we get the list
// and search for the object within the list where the counter
// values must be updated
groupedObjects = overviewMap.get(ungroupedObject.getThrowableType());
groupedObjects.add(ungroupedObject);
}
}
// we are creating the list that contains all object to be shown in the
// overview
for (Map.Entry<String, List<AggregatedExceptionSensorData>> entry : overviewMap.entrySet()) {
String throwableType = entry.getKey();
AggregatedExceptionSensorData data = createObjectForOverview(throwableType, entry.getValue());
groupedOverviewList.add(data);
}
if (null != groupedOverviewList) {
exceptionSensorDataList.clear();
monitor.subTask("Displaying the Exception Overview");
exceptionSensorDataList.addAll(groupedOverviewList);
}
monitor.done();
}
/**
* Creates the {@link AggregatedExceptionSensorData} object for the table input from the list of
* same type aggregated objects.
*
* @param throwableType
* Throwable type.
* @param dataList
* List of {@link AggregatedExceptionSensorData}
* @return Aggregated data for the table.
*/
private AggregatedExceptionSensorData createObjectForOverview(String throwableType, List<AggregatedExceptionSensorData> dataList) {
AggregatedExceptionSensorData data = new AggregatedExceptionSensorData();
data.setThrowableType(throwableType);
for (AggregatedExceptionSensorData object : dataList) {
if (data.getPlatformIdent() == 0) {
data.setPlatformIdent(object.getPlatformIdent());
}
data.aggregateExceptionData(object);
}
return data;
}
/**
* {@inheritDoc}
*/
@Override
public void doubleClick(DoubleClickEvent event) {
final StructuredSelection selection = (StructuredSelection) event.getSelection();
if (!selection.isEmpty()) {
try {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor monitor) {
monitor.beginTask("Retrieving Exception Messages", IProgressMonitor.UNKNOWN);
AggregatedExceptionSensorData data = (AggregatedExceptionSensorData) selection.getFirstElement();
final List<AggregatedExceptionSensorData> dataList = overviewMap.get(data.getThrowableType());
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
IRootEditor rootEditor = (IRootEditor) page.getActiveEditor();
rootEditor.setDataInput(dataList);
}
});
monitor.done();
}
});
} catch (InvocationTargetException e) {
MessageDialog.openError(Display.getDefault().getActiveShell().getShell(), "Error", e.getCause().toString());
} catch (InterruptedException e) {
MessageDialog.openInformation(Display.getDefault().getActiveShell().getShell(), "Cancelled", e.getCause().toString());
}
}
}
/**
* The label provider for this view.
*
* @author Eduard Tudenhoefner
*
*/
private final class GroupedExceptionOverviewLabelProvider extends StyledCellIndexLabelProvider {
/**
* {@inheritDoc}
*/
@Override
protected StyledString getStyledText(Object element, int index) {
AggregatedExceptionSensorData data = (AggregatedExceptionSensorData) element;
Column enumId = Column.fromOrd(index);
return getStyledTextForColumn(data, enumId);
}
}
/**
* The content provider for this view.
*
* @author Eduard Tudenhoefner
*
*/
private static final class GroupedExceptionOverviewContentProvider implements IStructuredContentProvider {
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("unchecked")
public Object[] getElements(Object inputElement) {
List<AggregatedExceptionSensorData> exceptionSensorData = (List<AggregatedExceptionSensorData>) inputElement;
return exceptionSensorData.toArray();
}
/**
* {@inheritDoc}
*/
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
/**
* {@inheritDoc}
*/
@Override
public void dispose() {
}
}
/**
* Returns the styled text for a specific column.
*
* @param data
* The data object to extract the information from.
* @param enumId
* The enumeration ID.
* @return The styled string containing the information from the data object.
*/
private StyledString getStyledTextForColumn(AggregatedExceptionSensorData data, Column enumId) {
switch (enumId) {
case FQN:
return new StyledString(data.getThrowableType());
case INVOCATION_AFFILLIATION:
int percentage = (int) (data.getInvocationAffiliationPercentage() * 100);
int invocations = 0;
if (null != data.getInvocationParentsIdSet()) {
invocations = data.getInvocationParentsIdSet().size();
}
return TextFormatter.getInvocationAffilliationPercentageString(percentage, invocations);
case CREATED:
return new StyledString(String.valueOf(data.getCreated()));
case RETHROWN:
return new StyledString(String.valueOf(data.getPassed()));
case HANDLED:
return new StyledString(String.valueOf(data.getHandled()));
default:
return new StyledString("error");
}
}
/**
* {@inheritDoc}
*/
@Override
public String getReadableString(Object object) {
if (object instanceof AggregatedExceptionSensorData) {
AggregatedExceptionSensorData data = (AggregatedExceptionSensorData) object;
StringBuilder sb = new StringBuilder();
for (Column column : Column.values()) {
sb.append(getStyledTextForColumn(data, column).toString());
sb.append('\t');
}
return sb.toString();
}
throw new RuntimeException("Could not create the human readable string!");
}
/**
* {@inheritDoc}
*/
@Override
public List<String> getColumnValues(Object object) {
if (object instanceof AggregatedExceptionSensorData) {
AggregatedExceptionSensorData data = (AggregatedExceptionSensorData) object;
List<String> values = new ArrayList<>();
for (Column column : Column.values()) {
values.add(getStyledTextForColumn(data, column).toString());
}
return values;
}
throw new RuntimeException("Could not create the column values!");
}
}
| {
"pile_set_name": "Github"
} |
##DESCRIPTION
##
##ENDDESCRIPTION
##KEYWORDS('calculus', '', '')
## DBsubject('Calculus - single variable')
## DBchapter('')
## DBsection('')
## Date('6/15/2019')
## Author('K. Andrew Parker')
## Institution('CityTech')
########################################################################
DOCUMENT();
loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGML.pl",
"AppletObjects.pl",
"PGgraphmacros.pl"
);
# Print problem number and point value (weight) for the problem
TEXT(beginproblem());
# Show which answers are correct and which ones are incorrect
$showPartialCorrectAnswers = 1;
##############################################################
#
# Setup
#
#
Context("Numeric");
$a = random(2,9,1);
do { $fa = non_zero_random(-15,15,1); } until ($a != abs($fa));
##############################################################
#
# Text
#
#
BEGIN_PGML
[`f(x)`] is an unspecified function, but you are told that [`f([$a])=[$fa]`].
1. If you also know that [`f`] is an even function, then what would [`f(-[$a])`] be? [_____]{Real($fa)}
1. If, instead, you know that [`f`] is an odd function, then what would [`f(-[$a])`] be? [_____]{Real(-$fa)}
END_PGML
##############################################################
#
# Answers
#
#
BEGIN_PGML_HINT
END_PGML_HINT
BEGIN_PGML_SOLUTION
END_PGML_SOLUTION
ENDDOCUMENT();
| {
"pile_set_name": "Github"
} |
@import "~scss/variables";
$sw-customer-list-color-error: $color-crimson;
$sw-customer-list-color-success: $color-emerald;
.sw-customer-list {
.sw-customer-list__content {
width: 100%;
height: 100%;
position: absolute;
}
.is--inactive {
color: $sw-customer-list-color-error;
}
.is--active {
color: $sw-customer-list-color-success;
}
.sw-customer-list__metadata-customer-guest-label {
margin: 0 0 0 12px;
text-align: center;
}
.sw-label.sw-customer-list__requested-group-label {
background: $color-module-orange-500;
color: $color-white;
font-weight: 600;
}
}
.sw-customer-list__sidebar {
.sw-sidebar-item__scrollable-container {
padding: 0 25px;
}
}
| {
"pile_set_name": "Github"
} |
/*
* Ample SDK - JavaScript GUI Framework
*
* Copyright (c) 2012 Sergey Ilinsky
* Dual licensed under the MIT and GPL licenses.
* See: http://www.amplesdk.com/about/licensing/
*
*/
var cXULElement_tooltip_pane = function(){};
cXULElement_tooltip_pane.prototype = new cXULPopupElement("tooltip-pane");
// Public Methods
cXULElement_tooltip_pane.prototype.setText = function(sValue) {
this.$getContainer("gateway").innerHTML = ample.$encodeXMLCharacters(sValue);
};
// Render
cXULElement_tooltip_pane.prototype.$getTagOpen = function() {
return '<div class="xul-tooltip-pane" style="position:absolute;display:none;">\
<div class="xul-menupopup--shadow-right" style="position:absolute;"></div>\
<div class="xul-menupopup--shadow-bottom" style="position:absolute;"></div>\
<div class="xul-tooltip-pane--gateway">';
};
cXULElement_tooltip_pane.prototype.$getTagClose = function() {
return ' </div>\
</div>';
};
// Register Element
ample.extend(cXULElement_tooltip_pane);
| {
"pile_set_name": "Github"
} |
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="catalog_product_entity_media_gallery_value_video" resource="default" engine="innodb"
comment="Catalog Product Video Table">
<column xsi:type="int" name="value_id" unsigned="true" nullable="false" identity="false"
comment="Media Entity ID"/>
<column xsi:type="smallint" name="store_id" unsigned="true" nullable="false" identity="false"
default="0" comment="Store ID"/>
<column xsi:type="varchar" name="provider" nullable="true" length="32" comment="Video provider ID"/>
<column xsi:type="text" name="url" nullable="true" comment="Video URL"/>
<column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
<column xsi:type="text" name="description" nullable="true" comment="Page Meta Description"/>
<column xsi:type="text" name="metadata" nullable="true" comment="Video meta data"/>
<constraint xsi:type="foreign" referenceId="FK_6FDF205946906B0E653E60AA769899F8"
table="catalog_product_entity_media_gallery_value_video" column="value_id"
referenceTable="catalog_product_entity_media_gallery" referenceColumn="value_id"
onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_STORE_ID_STORE_STORE_ID"
table="catalog_product_entity_media_gallery_value_video" column="store_id" referenceTable="store"
referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_VAL_ID_STORE_ID">
<column name="value_id"/>
<column name="store_id"/>
</constraint>
</table>
</schema>
| {
"pile_set_name": "Github"
} |
# native compiler darwin 386
#GOROOT=/usr/local/go
#GOBIN=
GOARCH=386
GOOS=freebsd
CGO_ENABLED=1
PATH=$GOROOT/bin:$PATH:/usr/local/bin
LITEIDE_GDB=/usr/local/bin/gdb
LITEIDE_MAKE=make
LITEIDE_TERM=/usr/bin/open
LITEIDE_TERMARGS=-a Terminal
LITEIDE_EXEC=/usr/X11R6/bin/xterm
LITEIDE_EXECOPT=-e
| {
"pile_set_name": "Github"
} |
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
| {
"pile_set_name": "Github"
} |
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Preprocessed version of "boost/mpl/bind_fwd.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename F, typename T1 = na, typename T2 = na, typename T3 = na
, typename T4 = na, typename T5 = na
>
struct bind;
template<
typename F
>
struct bind0;
template<
typename F, typename T1
>
struct bind1;
template<
typename F, typename T1, typename T2
>
struct bind2;
template<
typename F, typename T1, typename T2, typename T3
>
struct bind3;
template<
typename F, typename T1, typename T2, typename T3, typename T4
>
struct bind4;
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
>
struct bind5;
}}
| {
"pile_set_name": "Github"
} |
Afrikaans (af)
Afrikaans (Namibia) (af_NA)
Afrikaans (South Africa) (af_ZA)
Akan (ak)
Akan (Ghana) (ak_GH)
Albanian (sq)
Albanian (Albania) (sq_AL)
Albanian (Kosovo) (sq_XK)
Albanian (Macedonia) (sq_MK)
Amharic (am)
Amharic (Ethiopia) (am_ET)
Arabic (ar)
Arabic (Algeria) (ar_DZ)
Arabic (Bahrain) (ar_BH)
Arabic (Chad) (ar_TD)
Arabic (Comoros) (ar_KM)
Arabic (Djibouti) (ar_DJ)
Arabic (Egypt) (ar_EG)
Arabic (Eritrea) (ar_ER)
Arabic (Iraq) (ar_IQ)
Arabic (Israel) (ar_IL)
Arabic (Jordan) (ar_JO)
Arabic (Kuwait) (ar_KW)
Arabic (Lebanon) (ar_LB)
Arabic (Libya) (ar_LY)
Arabic (Mauritania) (ar_MR)
Arabic (Morocco) (ar_MA)
Arabic (Oman) (ar_OM)
Arabic (Palestinian Territories) (ar_PS)
Arabic (Qatar) (ar_QA)
Arabic (Saudi Arabia) (ar_SA)
Arabic (Somalia) (ar_SO)
Arabic (South Sudan) (ar_SS)
Arabic (Sudan) (ar_SD)
Arabic (Syria) (ar_SY)
Arabic (Tunisia) (ar_TN)
Arabic (United Arab Emirates) (ar_AE)
Arabic (Western Sahara) (ar_EH)
Arabic (Yemen) (ar_YE)
Armenian (hy)
Armenian (Armenia) (hy_AM)
Assamese (as)
Assamese (India) (as_IN)
Azerbaijani (az)
Azerbaijani (Azerbaijan) (az_AZ)
Azerbaijani (Cyrillic, Azerbaijan) (az_Cyrl_AZ)
Azerbaijani (Cyrillic) (az_Cyrl)
Azerbaijani (Latin, Azerbaijan) (az_Latn_AZ)
Azerbaijani (Latin) (az_Latn)
Bambara (bm)
Bambara (Latin, Mali) (bm_Latn_ML)
Bambara (Latin) (bm_Latn)
Basque (eu)
Basque (Spain) (eu_ES)
Belarusian (be)
Belarusian (Belarus) (be_BY)
Bengali (bn)
Bengali (Bangladesh) (bn_BD)
Bengali (India) (bn_IN)
Bosnian (bs)
Bosnian (Bosnia & Herzegovina) (bs_BA)
Bosnian (Cyrillic, Bosnia & Herzegovina) (bs_Cyrl_BA)
Bosnian (Cyrillic) (bs_Cyrl)
Bosnian (Latin, Bosnia & Herzegovina) (bs_Latn_BA)
Bosnian (Latin) (bs_Latn)
Breton (br)
Breton (France) (br_FR)
Bulgarian (bg)
Bulgarian (Bulgaria) (bg_BG)
Burmese (my)
Burmese (Myanmar (Burma)) (my_MM)
Catalan (ca)
Catalan (Andorra) (ca_AD)
Catalan (France) (ca_FR)
Catalan (Italy) (ca_IT)
Catalan (Spain) (ca_ES)
Chinese (zh)
Chinese (China) (zh_CN)
Chinese (Hong Kong SAR China) (zh_HK)
Chinese (Macau SAR China) (zh_MO)
Chinese (Simplified, China) (zh_Hans_CN)
Chinese (Simplified, Hong Kong SAR China) (zh_Hans_HK)
Chinese (Simplified, Macau SAR China) (zh_Hans_MO)
Chinese (Simplified, Singapore) (zh_Hans_SG)
Chinese (Simplified) (zh_Hans)
Chinese (Singapore) (zh_SG)
Chinese (Taiwan) (zh_TW)
Chinese (Traditional, Hong Kong SAR China) (zh_Hant_HK)
Chinese (Traditional, Macau SAR China) (zh_Hant_MO)
Chinese (Traditional, Taiwan) (zh_Hant_TW)
Chinese (Traditional) (zh_Hant)
Cornish (kw)
Cornish (United Kingdom) (kw_GB)
Croatian (hr)
Croatian (Bosnia & Herzegovina) (hr_BA)
Croatian (Croatia) (hr_HR)
Czech (cs)
Czech (Czech Republic) (cs_CZ)
Danish (da)
Danish (Denmark) (da_DK)
Danish (Greenland) (da_GL)
Dutch (nl)
Dutch (Aruba) (nl_AW)
Dutch (Belgium) (nl_BE)
Dutch (Caribbean Netherlands) (nl_BQ)
Dutch (Curaçao) (nl_CW)
Dutch (Netherlands) (nl_NL)
Dutch (Sint Maarten) (nl_SX)
Dutch (Suriname) (nl_SR)
Dzongkha (dz)
Dzongkha (Bhutan) (dz_BT)
English (en)
English (American Samoa) (en_AS)
English (Anguilla) (en_AI)
English (Antigua & Barbuda) (en_AG)
English (Australia) (en_AU)
English (Bahamas) (en_BS)
English (Barbados) (en_BB)
English (Belgium) (en_BE)
English (Belize) (en_BZ)
English (Bermuda) (en_BM)
English (Botswana) (en_BW)
English (British Indian Ocean Territory) (en_IO)
English (British Virgin Islands) (en_VG)
English (Cameroon) (en_CM)
English (Canada) (en_CA)
English (Cayman Islands) (en_KY)
English (Christmas Island) (en_CX)
English (Cocos (Keeling) Islands) (en_CC)
English (Cook Islands) (en_CK)
English (Diego Garcia) (en_DG)
English (Dominica) (en_DM)
English (Eritrea) (en_ER)
English (Falkland Islands) (en_FK)
English (Fiji) (en_FJ)
English (Gambia) (en_GM)
English (Ghana) (en_GH)
English (Gibraltar) (en_GI)
English (Grenada) (en_GD)
English (Guam) (en_GU)
English (Guernsey) (en_GG)
English (Guyana) (en_GY)
English (Hong Kong SAR China) (en_HK)
English (India) (en_IN)
English (Ireland) (en_IE)
English (Isle of Man) (en_IM)
English (Jamaica) (en_JM)
English (Jersey) (en_JE)
English (Kenya) (en_KE)
English (Kiribati) (en_KI)
English (Lesotho) (en_LS)
English (Liberia) (en_LR)
English (Macau SAR China) (en_MO)
English (Madagascar) (en_MG)
English (Malawi) (en_MW)
English (Malaysia) (en_MY)
English (Malta) (en_MT)
English (Marshall Islands) (en_MH)
English (Mauritius) (en_MU)
English (Micronesia) (en_FM)
English (Montserrat) (en_MS)
English (Namibia) (en_NA)
English (Nauru) (en_NR)
English (New Zealand) (en_NZ)
English (Nigeria) (en_NG)
English (Niue) (en_NU)
English (Norfolk Island) (en_NF)
English (Northern Mariana Islands) (en_MP)
English (Pakistan) (en_PK)
English (Palau) (en_PW)
English (Papua New Guinea) (en_PG)
English (Philippines) (en_PH)
English (Pitcairn Islands) (en_PN)
English (Puerto Rico) (en_PR)
English (Rwanda) (en_RW)
English (Samoa) (en_WS)
English (Seychelles) (en_SC)
English (Sierra Leone) (en_SL)
English (Singapore) (en_SG)
English (Sint Maarten) (en_SX)
English (Solomon Islands) (en_SB)
English (South Africa) (en_ZA)
English (South Sudan) (en_SS)
English (St. Helena) (en_SH)
English (St. Kitts & Nevis) (en_KN)
English (St. Lucia) (en_LC)
English (St. Vincent & Grenadines) (en_VC)
English (Sudan) (en_SD)
English (Swaziland) (en_SZ)
English (Tanzania) (en_TZ)
English (Tokelau) (en_TK)
English (Tonga) (en_TO)
English (Trinidad & Tobago) (en_TT)
English (Turks & Caicos Islands) (en_TC)
English (Tuvalu) (en_TV)
English (U.S. Outlying Islands) (en_UM)
English (U.S. Virgin Islands) (en_VI)
English (Uganda) (en_UG)
English (United Kingdom) (en_GB)
English (United States) (en_US)
English (Vanuatu) (en_VU)
English (Zambia) (en_ZM)
English (Zimbabwe) (en_ZW)
Esperanto (eo)
Estonian (et)
Estonian (Estonia) (et_EE)
Ewe (ee)
Ewe (Ghana) (ee_GH)
Ewe (Togo) (ee_TG)
Faroese (fo)
Faroese (Faroe Islands) (fo_FO)
Finnish (fi)
Finnish (Finland) (fi_FI)
French (fr)
French (Algeria) (fr_DZ)
French (Belgium) (fr_BE)
French (Benin) (fr_BJ)
French (Burkina Faso) (fr_BF)
French (Burundi) (fr_BI)
French (Cameroon) (fr_CM)
French (Canada) (fr_CA)
French (Central African Republic) (fr_CF)
French (Chad) (fr_TD)
French (Comoros) (fr_KM)
French (Congo - Brazzaville) (fr_CG)
French (Congo - Kinshasa) (fr_CD)
French (Côte d’Ivoire) (fr_CI)
French (Djibouti) (fr_DJ)
French (Equatorial Guinea) (fr_GQ)
French (France) (fr_FR)
French (French Guiana) (fr_GF)
French (French Polynesia) (fr_PF)
French (Gabon) (fr_GA)
French (Guadeloupe) (fr_GP)
French (Guinea) (fr_GN)
French (Haiti) (fr_HT)
French (Luxembourg) (fr_LU)
French (Madagascar) (fr_MG)
French (Mali) (fr_ML)
French (Martinique) (fr_MQ)
French (Mauritania) (fr_MR)
French (Mauritius) (fr_MU)
French (Mayotte) (fr_YT)
French (Monaco) (fr_MC)
French (Morocco) (fr_MA)
French (New Caledonia) (fr_NC)
French (Niger) (fr_NE)
French (Réunion) (fr_RE)
French (Rwanda) (fr_RW)
French (Senegal) (fr_SN)
French (Seychelles) (fr_SC)
French (St. Barthélemy) (fr_BL)
French (St. Martin) (fr_MF)
French (St. Pierre & Miquelon) (fr_PM)
French (Switzerland) (fr_CH)
French (Syria) (fr_SY)
French (Togo) (fr_TG)
French (Tunisia) (fr_TN)
French (Vanuatu) (fr_VU)
French (Wallis & Futuna) (fr_WF)
Fulah (ff)
Fulah (Cameroon) (ff_CM)
Fulah (Guinea) (ff_GN)
Fulah (Mauritania) (ff_MR)
Fulah (Senegal) (ff_SN)
Galician (gl)
Galician (Spain) (gl_ES)
Ganda (lg)
Ganda (Uganda) (lg_UG)
Georgian (ka)
Georgian (Georgia) (ka_GE)
German (de)
German (Austria) (de_AT)
German (Belgium) (de_BE)
German (Germany) (de_DE)
German (Liechtenstein) (de_LI)
German (Luxembourg) (de_LU)
German (Switzerland) (de_CH)
Greek (el)
Greek (Cyprus) (el_CY)
Greek (Greece) (el_GR)
Gujarati (gu)
Gujarati (India) (gu_IN)
Hausa (ha)
Hausa (Ghana) (ha_GH)
Hausa (Latin, Ghana) (ha_Latn_GH)
Hausa (Latin, Niger) (ha_Latn_NE)
Hausa (Latin, Nigeria) (ha_Latn_NG)
Hausa (Latin) (ha_Latn)
Hausa (Niger) (ha_NE)
Hausa (Nigeria) (ha_NG)
Hebrew (he)
Hebrew (Israel) (he_IL)
Hindi (hi)
Hindi (India) (hi_IN)
Hungarian (hu)
Hungarian (Hungary) (hu_HU)
Icelandic (is)
Icelandic (Iceland) (is_IS)
Igbo (ig)
Igbo (Nigeria) (ig_NG)
Indonesian (id)
Indonesian (Indonesia) (id_ID)
Irish (ga)
Irish (Ireland) (ga_IE)
Italian (it)
Italian (Italy) (it_IT)
Italian (San Marino) (it_SM)
Italian (Switzerland) (it_CH)
Japanese (ja)
Japanese (Japan) (ja_JP)
Kalaallisut (kl)
Kalaallisut (Greenland) (kl_GL)
Kannada (kn)
Kannada (India) (kn_IN)
Kashmiri (ks)
Kashmiri (Arabic, India) (ks_Arab_IN)
Kashmiri (Arabic) (ks_Arab)
Kashmiri (India) (ks_IN)
Kazakh (kk)
Kazakh (Cyrillic, Kazakhstan) (kk_Cyrl_KZ)
Kazakh (Cyrillic) (kk_Cyrl)
Kazakh (Kazakhstan) (kk_KZ)
Khmer (km)
Khmer (Cambodia) (km_KH)
Kikuyu (ki)
Kikuyu (Kenya) (ki_KE)
Kinyarwanda (rw)
Kinyarwanda (Rwanda) (rw_RW)
Korean (ko)
Korean (North Korea) (ko_KP)
Korean (South Korea) (ko_KR)
Kyrgyz (ky)
Kyrgyz (Cyrillic, Kyrgyzstan) (ky_Cyrl_KG)
Kyrgyz (Cyrillic) (ky_Cyrl)
Kyrgyz (Kyrgyzstan) (ky_KG)
Lao (lo)
Lao (Laos) (lo_LA)
Latvian (lv)
Latvian (Latvia) (lv_LV)
Lingala (ln)
Lingala (Angola) (ln_AO)
Lingala (Central African Republic) (ln_CF)
Lingala (Congo - Brazzaville) (ln_CG)
Lingala (Congo - Kinshasa) (ln_CD)
Lithuanian (lt)
Lithuanian (Lithuania) (lt_LT)
Luba-Katanga (lu)
Luba-Katanga (Congo - Kinshasa) (lu_CD)
Luxembourgish (lb)
Luxembourgish (Luxembourg) (lb_LU)
Macedonian (mk)
Macedonian (Macedonia) (mk_MK)
Malagasy (mg)
Malagasy (Madagascar) (mg_MG)
Malay (ms)
Malay (Brunei) (ms_BN)
Malay (Latin, Brunei) (ms_Latn_BN)
Malay (Latin, Malaysia) (ms_Latn_MY)
Malay (Latin, Singapore) (ms_Latn_SG)
Malay (Latin) (ms_Latn)
Malay (Malaysia) (ms_MY)
Malay (Singapore) (ms_SG)
Malayalam (ml)
Malayalam (India) (ml_IN)
Maltese (mt)
Maltese (Malta) (mt_MT)
Manx (gv)
Manx (Isle of Man) (gv_IM)
Marathi (mr)
Marathi (India) (mr_IN)
Mongolian (mn)
Mongolian (Cyrillic, Mongolia) (mn_Cyrl_MN)
Mongolian (Cyrillic) (mn_Cyrl)
Mongolian (Mongolia) (mn_MN)
Nepali (ne)
Nepali (India) (ne_IN)
Nepali (Nepal) (ne_NP)
North Ndebele (nd)
North Ndebele (Zimbabwe) (nd_ZW)
Northern Sami (se)
Northern Sami (Finland) (se_FI)
Northern Sami (Norway) (se_NO)
Northern Sami (Sweden) (se_SE)
Norwegian (no)
Norwegian (Norway) (no_NO)
Norwegian Bokmål (nb)
Norwegian Bokmål (Norway) (nb_NO)
Norwegian Bokmål (Svalbard & Jan Mayen) (nb_SJ)
Norwegian Nynorsk (nn)
Norwegian Nynorsk (Norway) (nn_NO)
Oriya (or)
Oriya (India) (or_IN)
Oromo (om)
Oromo (Ethiopia) (om_ET)
Oromo (Kenya) (om_KE)
Ossetic (os)
Ossetic (Georgia) (os_GE)
Ossetic (Russia) (os_RU)
Pashto (ps)
Pashto (Afghanistan) (ps_AF)
Persian (fa)
Persian (Afghanistan) (fa_AF)
Persian (Iran) (fa_IR)
Polish (pl)
Polish (Poland) (pl_PL)
Portuguese (pt)
Portuguese (Angola) (pt_AO)
Portuguese (Brazil) (pt_BR)
Portuguese (Cape Verde) (pt_CV)
Portuguese (Guinea-Bissau) (pt_GW)
Portuguese (Macau SAR China) (pt_MO)
Portuguese (Mozambique) (pt_MZ)
Portuguese (Portugal) (pt_PT)
Portuguese (São Tomé & Príncipe) (pt_ST)
Portuguese (Timor-Leste) (pt_TL)
Punjabi (pa)
Punjabi (Arabic, Pakistan) (pa_Arab_PK)
Punjabi (Arabic) (pa_Arab)
Punjabi (Gurmukhi, India) (pa_Guru_IN)
Punjabi (Gurmukhi) (pa_Guru)
Punjabi (India) (pa_IN)
Punjabi (Pakistan) (pa_PK)
Quechua (qu)
Quechua (Bolivia) (qu_BO)
Quechua (Ecuador) (qu_EC)
Quechua (Peru) (qu_PE)
Romanian (ro)
Romanian (Moldova) (ro_MD)
Romanian (Romania) (ro_RO)
Romansh (rm)
Romansh (Switzerland) (rm_CH)
Rundi (rn)
Rundi (Burundi) (rn_BI)
Russian (ru)
Russian (Belarus) (ru_BY)
Russian (Kazakhstan) (ru_KZ)
Russian (Kyrgyzstan) (ru_KG)
Russian (Moldova) (ru_MD)
Russian (Russia) (ru_RU)
Russian (Ukraine) (ru_UA)
Sango (sg)
Sango (Central African Republic) (sg_CF)
Scottish Gaelic (gd)
Scottish Gaelic (United Kingdom) (gd_GB)
Serbian (sr)
Serbian (Bosnia & Herzegovina) (sr_BA)
Serbian (Cyrillic, Bosnia & Herzegovina) (sr_Cyrl_BA)
Serbian (Cyrillic, Kosovo) (sr_Cyrl_XK)
Serbian (Cyrillic, Montenegro) (sr_Cyrl_ME)
Serbian (Cyrillic, Serbia) (sr_Cyrl_RS)
Serbian (Cyrillic) (sr_Cyrl)
Serbian (Kosovo) (sr_XK)
Serbian (Latin, Bosnia & Herzegovina) (sr_Latn_BA)
Serbian (Latin, Kosovo) (sr_Latn_XK)
Serbian (Latin, Montenegro) (sr_Latn_ME)
Serbian (Latin, Serbia) (sr_Latn_RS)
Serbian (Latin) (sr_Latn)
Serbian (Montenegro) (sr_ME)
Serbian (Serbia) (sr_RS)
Serbo-Croatian (sh)
Serbo-Croatian (Bosnia & Herzegovina) (sh_BA)
Shona (sn)
Shona (Zimbabwe) (sn_ZW)
Sichuan Yi (ii)
Sichuan Yi (China) (ii_CN)
Sinhala (si)
Sinhala (Sri Lanka) (si_LK)
Slovak (sk)
Slovak (Slovakia) (sk_SK)
Slovenian (sl)
Slovenian (Slovenia) (sl_SI)
Somali (so)
Somali (Djibouti) (so_DJ)
Somali (Ethiopia) (so_ET)
Somali (Kenya) (so_KE)
Somali (Somalia) (so_SO)
Spanish (es)
Spanish (Argentina) (es_AR)
Spanish (Bolivia) (es_BO)
Spanish (Canary Islands) (es_IC)
Spanish (Ceuta & Melilla) (es_EA)
Spanish (Chile) (es_CL)
Spanish (Colombia) (es_CO)
Spanish (Costa Rica) (es_CR)
Spanish (Cuba) (es_CU)
Spanish (Dominican Republic) (es_DO)
Spanish (Ecuador) (es_EC)
Spanish (El Salvador) (es_SV)
Spanish (Equatorial Guinea) (es_GQ)
Spanish (Guatemala) (es_GT)
Spanish (Honduras) (es_HN)
Spanish (Mexico) (es_MX)
Spanish (Nicaragua) (es_NI)
Spanish (Panama) (es_PA)
Spanish (Paraguay) (es_PY)
Spanish (Peru) (es_PE)
Spanish (Philippines) (es_PH)
Spanish (Puerto Rico) (es_PR)
Spanish (Spain) (es_ES)
Spanish (United States) (es_US)
Spanish (Uruguay) (es_UY)
Spanish (Venezuela) (es_VE)
Swahili (sw)
Swahili (Kenya) (sw_KE)
Swahili (Tanzania) (sw_TZ)
Swahili (Uganda) (sw_UG)
Swedish (sv)
Swedish (Åland Islands) (sv_AX)
Swedish (Finland) (sv_FI)
Swedish (Sweden) (sv_SE)
Tagalog (tl)
Tagalog (Philippines) (tl_PH)
Tamil (ta)
Tamil (India) (ta_IN)
Tamil (Malaysia) (ta_MY)
Tamil (Singapore) (ta_SG)
Tamil (Sri Lanka) (ta_LK)
Telugu (te)
Telugu (India) (te_IN)
Thai (th)
Thai (Thailand) (th_TH)
Tibetan (bo)
Tibetan (China) (bo_CN)
Tibetan (India) (bo_IN)
Tigrinya (ti)
Tigrinya (Eritrea) (ti_ER)
Tigrinya (Ethiopia) (ti_ET)
Tongan (to)
Tongan (Tonga) (to_TO)
Turkish (tr)
Turkish (Cyprus) (tr_CY)
Turkish (Turkey) (tr_TR)
Ukrainian (uk)
Ukrainian (Ukraine) (uk_UA)
Urdu (ur)
Urdu (India) (ur_IN)
Urdu (Pakistan) (ur_PK)
Uyghur (ug)
Uyghur (Arabic, China) (ug_Arab_CN)
Uyghur (Arabic) (ug_Arab)
Uyghur (China) (ug_CN)
Uzbek (uz)
Uzbek (Afghanistan) (uz_AF)
Uzbek (Arabic, Afghanistan) (uz_Arab_AF)
Uzbek (Arabic) (uz_Arab)
Uzbek (Cyrillic, Uzbekistan) (uz_Cyrl_UZ)
Uzbek (Cyrillic) (uz_Cyrl)
Uzbek (Latin, Uzbekistan) (uz_Latn_UZ)
Uzbek (Latin) (uz_Latn)
Uzbek (Uzbekistan) (uz_UZ)
Vietnamese (vi)
Vietnamese (Vietnam) (vi_VN)
Welsh (cy)
Welsh (United Kingdom) (cy_GB)
Western Frisian (fy)
Western Frisian (Netherlands) (fy_NL)
Yiddish (yi)
Yoruba (yo)
Yoruba (Benin) (yo_BJ)
Yoruba (Nigeria) (yo_NG)
Zulu (zu)
Zulu (South Africa) (zu_ZA)
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<animated-rotate android:drawable="@drawable/spinner_white_16" android:pivotX="50.0%" android:pivotY="50.0%" android:frameDuration="100" android:framesCount="12"
xmlns:android="http://schemas.android.com/apk/res/android" />
| {
"pile_set_name": "Github"
} |
# This file is generated by mkstringprep.py. DO NOT EDIT.
"""Library that exposes various tables found in the StringPrep RFC 3454.
There are two kinds of tables: sets, for which a member test is provided,
and mappings, for which a mapping function is provided.
"""
from unicodedata import ucd_3_2_0 as unicodedata
assert unicodedata.unidata_version == '3.2.0'
def in_table_a1(code):
if unicodedata.category(code) != 'Cn': return False
c = ord(code)
if 0xFDD0 <= c < 0xFDF0: return False
return (c & 0xFFFF) not in (0xFFFE, 0xFFFF)
b1_set = set([173, 847, 6150, 6155, 6156, 6157, 8203, 8204, 8205, 8288, 65279] + range(65024,65040))
def in_table_b1(code):
return ord(code) in b1_set
b3_exceptions = {
0xb5:u'\u03bc', 0xdf:u'ss', 0x130:u'i\u0307', 0x149:u'\u02bcn',
0x17f:u's', 0x1f0:u'j\u030c', 0x345:u'\u03b9', 0x37a:u' \u03b9',
0x390:u'\u03b9\u0308\u0301', 0x3b0:u'\u03c5\u0308\u0301', 0x3c2:u'\u03c3', 0x3d0:u'\u03b2',
0x3d1:u'\u03b8', 0x3d2:u'\u03c5', 0x3d3:u'\u03cd', 0x3d4:u'\u03cb',
0x3d5:u'\u03c6', 0x3d6:u'\u03c0', 0x3f0:u'\u03ba', 0x3f1:u'\u03c1',
0x3f2:u'\u03c3', 0x3f5:u'\u03b5', 0x587:u'\u0565\u0582', 0x1e96:u'h\u0331',
0x1e97:u't\u0308', 0x1e98:u'w\u030a', 0x1e99:u'y\u030a', 0x1e9a:u'a\u02be',
0x1e9b:u'\u1e61', 0x1f50:u'\u03c5\u0313', 0x1f52:u'\u03c5\u0313\u0300', 0x1f54:u'\u03c5\u0313\u0301',
0x1f56:u'\u03c5\u0313\u0342', 0x1f80:u'\u1f00\u03b9', 0x1f81:u'\u1f01\u03b9', 0x1f82:u'\u1f02\u03b9',
0x1f83:u'\u1f03\u03b9', 0x1f84:u'\u1f04\u03b9', 0x1f85:u'\u1f05\u03b9', 0x1f86:u'\u1f06\u03b9',
0x1f87:u'\u1f07\u03b9', 0x1f88:u'\u1f00\u03b9', 0x1f89:u'\u1f01\u03b9', 0x1f8a:u'\u1f02\u03b9',
0x1f8b:u'\u1f03\u03b9', 0x1f8c:u'\u1f04\u03b9', 0x1f8d:u'\u1f05\u03b9', 0x1f8e:u'\u1f06\u03b9',
0x1f8f:u'\u1f07\u03b9', 0x1f90:u'\u1f20\u03b9', 0x1f91:u'\u1f21\u03b9', 0x1f92:u'\u1f22\u03b9',
0x1f93:u'\u1f23\u03b9', 0x1f94:u'\u1f24\u03b9', 0x1f95:u'\u1f25\u03b9', 0x1f96:u'\u1f26\u03b9',
0x1f97:u'\u1f27\u03b9', 0x1f98:u'\u1f20\u03b9', 0x1f99:u'\u1f21\u03b9', 0x1f9a:u'\u1f22\u03b9',
0x1f9b:u'\u1f23\u03b9', 0x1f9c:u'\u1f24\u03b9', 0x1f9d:u'\u1f25\u03b9', 0x1f9e:u'\u1f26\u03b9',
0x1f9f:u'\u1f27\u03b9', 0x1fa0:u'\u1f60\u03b9', 0x1fa1:u'\u1f61\u03b9', 0x1fa2:u'\u1f62\u03b9',
0x1fa3:u'\u1f63\u03b9', 0x1fa4:u'\u1f64\u03b9', 0x1fa5:u'\u1f65\u03b9', 0x1fa6:u'\u1f66\u03b9',
0x1fa7:u'\u1f67\u03b9', 0x1fa8:u'\u1f60\u03b9', 0x1fa9:u'\u1f61\u03b9', 0x1faa:u'\u1f62\u03b9',
0x1fab:u'\u1f63\u03b9', 0x1fac:u'\u1f64\u03b9', 0x1fad:u'\u1f65\u03b9', 0x1fae:u'\u1f66\u03b9',
0x1faf:u'\u1f67\u03b9', 0x1fb2:u'\u1f70\u03b9', 0x1fb3:u'\u03b1\u03b9', 0x1fb4:u'\u03ac\u03b9',
0x1fb6:u'\u03b1\u0342', 0x1fb7:u'\u03b1\u0342\u03b9', 0x1fbc:u'\u03b1\u03b9', 0x1fbe:u'\u03b9',
0x1fc2:u'\u1f74\u03b9', 0x1fc3:u'\u03b7\u03b9', 0x1fc4:u'\u03ae\u03b9', 0x1fc6:u'\u03b7\u0342',
0x1fc7:u'\u03b7\u0342\u03b9', 0x1fcc:u'\u03b7\u03b9', 0x1fd2:u'\u03b9\u0308\u0300', 0x1fd3:u'\u03b9\u0308\u0301',
0x1fd6:u'\u03b9\u0342', 0x1fd7:u'\u03b9\u0308\u0342', 0x1fe2:u'\u03c5\u0308\u0300', 0x1fe3:u'\u03c5\u0308\u0301',
0x1fe4:u'\u03c1\u0313', 0x1fe6:u'\u03c5\u0342', 0x1fe7:u'\u03c5\u0308\u0342', 0x1ff2:u'\u1f7c\u03b9',
0x1ff3:u'\u03c9\u03b9', 0x1ff4:u'\u03ce\u03b9', 0x1ff6:u'\u03c9\u0342', 0x1ff7:u'\u03c9\u0342\u03b9',
0x1ffc:u'\u03c9\u03b9', 0x20a8:u'rs', 0x2102:u'c', 0x2103:u'\xb0c',
0x2107:u'\u025b', 0x2109:u'\xb0f', 0x210b:u'h', 0x210c:u'h',
0x210d:u'h', 0x2110:u'i', 0x2111:u'i', 0x2112:u'l',
0x2115:u'n', 0x2116:u'no', 0x2119:u'p', 0x211a:u'q',
0x211b:u'r', 0x211c:u'r', 0x211d:u'r', 0x2120:u'sm',
0x2121:u'tel', 0x2122:u'tm', 0x2124:u'z', 0x2128:u'z',
0x212c:u'b', 0x212d:u'c', 0x2130:u'e', 0x2131:u'f',
0x2133:u'm', 0x213e:u'\u03b3', 0x213f:u'\u03c0', 0x2145:u'd',
0x3371:u'hpa', 0x3373:u'au', 0x3375:u'ov', 0x3380:u'pa',
0x3381:u'na', 0x3382:u'\u03bca', 0x3383:u'ma', 0x3384:u'ka',
0x3385:u'kb', 0x3386:u'mb', 0x3387:u'gb', 0x338a:u'pf',
0x338b:u'nf', 0x338c:u'\u03bcf', 0x3390:u'hz', 0x3391:u'khz',
0x3392:u'mhz', 0x3393:u'ghz', 0x3394:u'thz', 0x33a9:u'pa',
0x33aa:u'kpa', 0x33ab:u'mpa', 0x33ac:u'gpa', 0x33b4:u'pv',
0x33b5:u'nv', 0x33b6:u'\u03bcv', 0x33b7:u'mv', 0x33b8:u'kv',
0x33b9:u'mv', 0x33ba:u'pw', 0x33bb:u'nw', 0x33bc:u'\u03bcw',
0x33bd:u'mw', 0x33be:u'kw', 0x33bf:u'mw', 0x33c0:u'k\u03c9',
0x33c1:u'm\u03c9', 0x33c3:u'bq', 0x33c6:u'c\u2215kg', 0x33c7:u'co.',
0x33c8:u'db', 0x33c9:u'gy', 0x33cb:u'hp', 0x33cd:u'kk',
0x33ce:u'km', 0x33d7:u'ph', 0x33d9:u'ppm', 0x33da:u'pr',
0x33dc:u'sv', 0x33dd:u'wb', 0xfb00:u'ff', 0xfb01:u'fi',
0xfb02:u'fl', 0xfb03:u'ffi', 0xfb04:u'ffl', 0xfb05:u'st',
0xfb06:u'st', 0xfb13:u'\u0574\u0576', 0xfb14:u'\u0574\u0565', 0xfb15:u'\u0574\u056b',
0xfb16:u'\u057e\u0576', 0xfb17:u'\u0574\u056d', 0x1d400:u'a', 0x1d401:u'b',
0x1d402:u'c', 0x1d403:u'd', 0x1d404:u'e', 0x1d405:u'f',
0x1d406:u'g', 0x1d407:u'h', 0x1d408:u'i', 0x1d409:u'j',
0x1d40a:u'k', 0x1d40b:u'l', 0x1d40c:u'm', 0x1d40d:u'n',
0x1d40e:u'o', 0x1d40f:u'p', 0x1d410:u'q', 0x1d411:u'r',
0x1d412:u's', 0x1d413:u't', 0x1d414:u'u', 0x1d415:u'v',
0x1d416:u'w', 0x1d417:u'x', 0x1d418:u'y', 0x1d419:u'z',
0x1d434:u'a', 0x1d435:u'b', 0x1d436:u'c', 0x1d437:u'd',
0x1d438:u'e', 0x1d439:u'f', 0x1d43a:u'g', 0x1d43b:u'h',
0x1d43c:u'i', 0x1d43d:u'j', 0x1d43e:u'k', 0x1d43f:u'l',
0x1d440:u'm', 0x1d441:u'n', 0x1d442:u'o', 0x1d443:u'p',
0x1d444:u'q', 0x1d445:u'r', 0x1d446:u's', 0x1d447:u't',
0x1d448:u'u', 0x1d449:u'v', 0x1d44a:u'w', 0x1d44b:u'x',
0x1d44c:u'y', 0x1d44d:u'z', 0x1d468:u'a', 0x1d469:u'b',
0x1d46a:u'c', 0x1d46b:u'd', 0x1d46c:u'e', 0x1d46d:u'f',
0x1d46e:u'g', 0x1d46f:u'h', 0x1d470:u'i', 0x1d471:u'j',
0x1d472:u'k', 0x1d473:u'l', 0x1d474:u'm', 0x1d475:u'n',
0x1d476:u'o', 0x1d477:u'p', 0x1d478:u'q', 0x1d479:u'r',
0x1d47a:u's', 0x1d47b:u't', 0x1d47c:u'u', 0x1d47d:u'v',
0x1d47e:u'w', 0x1d47f:u'x', 0x1d480:u'y', 0x1d481:u'z',
0x1d49c:u'a', 0x1d49e:u'c', 0x1d49f:u'd', 0x1d4a2:u'g',
0x1d4a5:u'j', 0x1d4a6:u'k', 0x1d4a9:u'n', 0x1d4aa:u'o',
0x1d4ab:u'p', 0x1d4ac:u'q', 0x1d4ae:u's', 0x1d4af:u't',
0x1d4b0:u'u', 0x1d4b1:u'v', 0x1d4b2:u'w', 0x1d4b3:u'x',
0x1d4b4:u'y', 0x1d4b5:u'z', 0x1d4d0:u'a', 0x1d4d1:u'b',
0x1d4d2:u'c', 0x1d4d3:u'd', 0x1d4d4:u'e', 0x1d4d5:u'f',
0x1d4d6:u'g', 0x1d4d7:u'h', 0x1d4d8:u'i', 0x1d4d9:u'j',
0x1d4da:u'k', 0x1d4db:u'l', 0x1d4dc:u'm', 0x1d4dd:u'n',
0x1d4de:u'o', 0x1d4df:u'p', 0x1d4e0:u'q', 0x1d4e1:u'r',
0x1d4e2:u's', 0x1d4e3:u't', 0x1d4e4:u'u', 0x1d4e5:u'v',
0x1d4e6:u'w', 0x1d4e7:u'x', 0x1d4e8:u'y', 0x1d4e9:u'z',
0x1d504:u'a', 0x1d505:u'b', 0x1d507:u'd', 0x1d508:u'e',
0x1d509:u'f', 0x1d50a:u'g', 0x1d50d:u'j', 0x1d50e:u'k',
0x1d50f:u'l', 0x1d510:u'm', 0x1d511:u'n', 0x1d512:u'o',
0x1d513:u'p', 0x1d514:u'q', 0x1d516:u's', 0x1d517:u't',
0x1d518:u'u', 0x1d519:u'v', 0x1d51a:u'w', 0x1d51b:u'x',
0x1d51c:u'y', 0x1d538:u'a', 0x1d539:u'b', 0x1d53b:u'd',
0x1d53c:u'e', 0x1d53d:u'f', 0x1d53e:u'g', 0x1d540:u'i',
0x1d541:u'j', 0x1d542:u'k', 0x1d543:u'l', 0x1d544:u'm',
0x1d546:u'o', 0x1d54a:u's', 0x1d54b:u't', 0x1d54c:u'u',
0x1d54d:u'v', 0x1d54e:u'w', 0x1d54f:u'x', 0x1d550:u'y',
0x1d56c:u'a', 0x1d56d:u'b', 0x1d56e:u'c', 0x1d56f:u'd',
0x1d570:u'e', 0x1d571:u'f', 0x1d572:u'g', 0x1d573:u'h',
0x1d574:u'i', 0x1d575:u'j', 0x1d576:u'k', 0x1d577:u'l',
0x1d578:u'm', 0x1d579:u'n', 0x1d57a:u'o', 0x1d57b:u'p',
0x1d57c:u'q', 0x1d57d:u'r', 0x1d57e:u's', 0x1d57f:u't',
0x1d580:u'u', 0x1d581:u'v', 0x1d582:u'w', 0x1d583:u'x',
0x1d584:u'y', 0x1d585:u'z', 0x1d5a0:u'a', 0x1d5a1:u'b',
0x1d5a2:u'c', 0x1d5a3:u'd', 0x1d5a4:u'e', 0x1d5a5:u'f',
0x1d5a6:u'g', 0x1d5a7:u'h', 0x1d5a8:u'i', 0x1d5a9:u'j',
0x1d5aa:u'k', 0x1d5ab:u'l', 0x1d5ac:u'm', 0x1d5ad:u'n',
0x1d5ae:u'o', 0x1d5af:u'p', 0x1d5b0:u'q', 0x1d5b1:u'r',
0x1d5b2:u's', 0x1d5b3:u't', 0x1d5b4:u'u', 0x1d5b5:u'v',
0x1d5b6:u'w', 0x1d5b7:u'x', 0x1d5b8:u'y', 0x1d5b9:u'z',
0x1d5d4:u'a', 0x1d5d5:u'b', 0x1d5d6:u'c', 0x1d5d7:u'd',
0x1d5d8:u'e', 0x1d5d9:u'f', 0x1d5da:u'g', 0x1d5db:u'h',
0x1d5dc:u'i', 0x1d5dd:u'j', 0x1d5de:u'k', 0x1d5df:u'l',
0x1d5e0:u'm', 0x1d5e1:u'n', 0x1d5e2:u'o', 0x1d5e3:u'p',
0x1d5e4:u'q', 0x1d5e5:u'r', 0x1d5e6:u's', 0x1d5e7:u't',
0x1d5e8:u'u', 0x1d5e9:u'v', 0x1d5ea:u'w', 0x1d5eb:u'x',
0x1d5ec:u'y', 0x1d5ed:u'z', 0x1d608:u'a', 0x1d609:u'b',
0x1d60a:u'c', 0x1d60b:u'd', 0x1d60c:u'e', 0x1d60d:u'f',
0x1d60e:u'g', 0x1d60f:u'h', 0x1d610:u'i', 0x1d611:u'j',
0x1d612:u'k', 0x1d613:u'l', 0x1d614:u'm', 0x1d615:u'n',
0x1d616:u'o', 0x1d617:u'p', 0x1d618:u'q', 0x1d619:u'r',
0x1d61a:u's', 0x1d61b:u't', 0x1d61c:u'u', 0x1d61d:u'v',
0x1d61e:u'w', 0x1d61f:u'x', 0x1d620:u'y', 0x1d621:u'z',
0x1d63c:u'a', 0x1d63d:u'b', 0x1d63e:u'c', 0x1d63f:u'd',
0x1d640:u'e', 0x1d641:u'f', 0x1d642:u'g', 0x1d643:u'h',
0x1d644:u'i', 0x1d645:u'j', 0x1d646:u'k', 0x1d647:u'l',
0x1d648:u'm', 0x1d649:u'n', 0x1d64a:u'o', 0x1d64b:u'p',
0x1d64c:u'q', 0x1d64d:u'r', 0x1d64e:u's', 0x1d64f:u't',
0x1d650:u'u', 0x1d651:u'v', 0x1d652:u'w', 0x1d653:u'x',
0x1d654:u'y', 0x1d655:u'z', 0x1d670:u'a', 0x1d671:u'b',
0x1d672:u'c', 0x1d673:u'd', 0x1d674:u'e', 0x1d675:u'f',
0x1d676:u'g', 0x1d677:u'h', 0x1d678:u'i', 0x1d679:u'j',
0x1d67a:u'k', 0x1d67b:u'l', 0x1d67c:u'm', 0x1d67d:u'n',
0x1d67e:u'o', 0x1d67f:u'p', 0x1d680:u'q', 0x1d681:u'r',
0x1d682:u's', 0x1d683:u't', 0x1d684:u'u', 0x1d685:u'v',
0x1d686:u'w', 0x1d687:u'x', 0x1d688:u'y', 0x1d689:u'z',
0x1d6a8:u'\u03b1', 0x1d6a9:u'\u03b2', 0x1d6aa:u'\u03b3', 0x1d6ab:u'\u03b4',
0x1d6ac:u'\u03b5', 0x1d6ad:u'\u03b6', 0x1d6ae:u'\u03b7', 0x1d6af:u'\u03b8',
0x1d6b0:u'\u03b9', 0x1d6b1:u'\u03ba', 0x1d6b2:u'\u03bb', 0x1d6b3:u'\u03bc',
0x1d6b4:u'\u03bd', 0x1d6b5:u'\u03be', 0x1d6b6:u'\u03bf', 0x1d6b7:u'\u03c0',
0x1d6b8:u'\u03c1', 0x1d6b9:u'\u03b8', 0x1d6ba:u'\u03c3', 0x1d6bb:u'\u03c4',
0x1d6bc:u'\u03c5', 0x1d6bd:u'\u03c6', 0x1d6be:u'\u03c7', 0x1d6bf:u'\u03c8',
0x1d6c0:u'\u03c9', 0x1d6d3:u'\u03c3', 0x1d6e2:u'\u03b1', 0x1d6e3:u'\u03b2',
0x1d6e4:u'\u03b3', 0x1d6e5:u'\u03b4', 0x1d6e6:u'\u03b5', 0x1d6e7:u'\u03b6',
0x1d6e8:u'\u03b7', 0x1d6e9:u'\u03b8', 0x1d6ea:u'\u03b9', 0x1d6eb:u'\u03ba',
0x1d6ec:u'\u03bb', 0x1d6ed:u'\u03bc', 0x1d6ee:u'\u03bd', 0x1d6ef:u'\u03be',
0x1d6f0:u'\u03bf', 0x1d6f1:u'\u03c0', 0x1d6f2:u'\u03c1', 0x1d6f3:u'\u03b8',
0x1d6f4:u'\u03c3', 0x1d6f5:u'\u03c4', 0x1d6f6:u'\u03c5', 0x1d6f7:u'\u03c6',
0x1d6f8:u'\u03c7', 0x1d6f9:u'\u03c8', 0x1d6fa:u'\u03c9', 0x1d70d:u'\u03c3',
0x1d71c:u'\u03b1', 0x1d71d:u'\u03b2', 0x1d71e:u'\u03b3', 0x1d71f:u'\u03b4',
0x1d720:u'\u03b5', 0x1d721:u'\u03b6', 0x1d722:u'\u03b7', 0x1d723:u'\u03b8',
0x1d724:u'\u03b9', 0x1d725:u'\u03ba', 0x1d726:u'\u03bb', 0x1d727:u'\u03bc',
0x1d728:u'\u03bd', 0x1d729:u'\u03be', 0x1d72a:u'\u03bf', 0x1d72b:u'\u03c0',
0x1d72c:u'\u03c1', 0x1d72d:u'\u03b8', 0x1d72e:u'\u03c3', 0x1d72f:u'\u03c4',
0x1d730:u'\u03c5', 0x1d731:u'\u03c6', 0x1d732:u'\u03c7', 0x1d733:u'\u03c8',
0x1d734:u'\u03c9', 0x1d747:u'\u03c3', 0x1d756:u'\u03b1', 0x1d757:u'\u03b2',
0x1d758:u'\u03b3', 0x1d759:u'\u03b4', 0x1d75a:u'\u03b5', 0x1d75b:u'\u03b6',
0x1d75c:u'\u03b7', 0x1d75d:u'\u03b8', 0x1d75e:u'\u03b9', 0x1d75f:u'\u03ba',
0x1d760:u'\u03bb', 0x1d761:u'\u03bc', 0x1d762:u'\u03bd', 0x1d763:u'\u03be',
0x1d764:u'\u03bf', 0x1d765:u'\u03c0', 0x1d766:u'\u03c1', 0x1d767:u'\u03b8',
0x1d768:u'\u03c3', 0x1d769:u'\u03c4', 0x1d76a:u'\u03c5', 0x1d76b:u'\u03c6',
0x1d76c:u'\u03c7', 0x1d76d:u'\u03c8', 0x1d76e:u'\u03c9', 0x1d781:u'\u03c3',
0x1d790:u'\u03b1', 0x1d791:u'\u03b2', 0x1d792:u'\u03b3', 0x1d793:u'\u03b4',
0x1d794:u'\u03b5', 0x1d795:u'\u03b6', 0x1d796:u'\u03b7', 0x1d797:u'\u03b8',
0x1d798:u'\u03b9', 0x1d799:u'\u03ba', 0x1d79a:u'\u03bb', 0x1d79b:u'\u03bc',
0x1d79c:u'\u03bd', 0x1d79d:u'\u03be', 0x1d79e:u'\u03bf', 0x1d79f:u'\u03c0',
0x1d7a0:u'\u03c1', 0x1d7a1:u'\u03b8', 0x1d7a2:u'\u03c3', 0x1d7a3:u'\u03c4',
0x1d7a4:u'\u03c5', 0x1d7a5:u'\u03c6', 0x1d7a6:u'\u03c7', 0x1d7a7:u'\u03c8',
0x1d7a8:u'\u03c9', 0x1d7bb:u'\u03c3', }
def map_table_b3(code):
r = b3_exceptions.get(ord(code))
if r is not None: return r
return code.lower()
def map_table_b2(a):
al = map_table_b3(a)
b = unicodedata.normalize("NFKC", al)
bl = u"".join([map_table_b3(ch) for ch in b])
c = unicodedata.normalize("NFKC", bl)
if b != c:
return c
else:
return al
def in_table_c11(code):
return code == u" "
def in_table_c12(code):
return unicodedata.category(code) == "Zs" and code != u" "
def in_table_c11_c12(code):
return unicodedata.category(code) == "Zs"
def in_table_c21(code):
return ord(code) < 128 and unicodedata.category(code) == "Cc"
c22_specials = set([1757, 1807, 6158, 8204, 8205, 8232, 8233, 65279] + range(8288,8292) + range(8298,8304) + range(65529,65533) + range(119155,119163))
def in_table_c22(code):
c = ord(code)
if c < 128: return False
if unicodedata.category(code) == "Cc": return True
return c in c22_specials
def in_table_c21_c22(code):
return unicodedata.category(code) == "Cc" or \
ord(code) in c22_specials
def in_table_c3(code):
return unicodedata.category(code) == "Co"
def in_table_c4(code):
c = ord(code)
if c < 0xFDD0: return False
if c < 0xFDF0: return True
return (ord(code) & 0xFFFF) in (0xFFFE, 0xFFFF)
def in_table_c5(code):
return unicodedata.category(code) == "Cs"
c6_set = set(range(65529,65534))
def in_table_c6(code):
return ord(code) in c6_set
c7_set = set(range(12272,12284))
def in_table_c7(code):
return ord(code) in c7_set
c8_set = set([832, 833, 8206, 8207] + range(8234,8239) + range(8298,8304))
def in_table_c8(code):
return ord(code) in c8_set
c9_set = set([917505] + range(917536,917632))
def in_table_c9(code):
return ord(code) in c9_set
def in_table_d1(code):
return unicodedata.bidirectional(code) in ("R","AL")
def in_table_d2(code):
return unicodedata.bidirectional(code) == "L"
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2012 David Chisnall. All rights reserved.
*
* 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.
*/
#ifndef __CXXABI_H_
#define __CXXABI_H_
#include <stddef.h>
#include <stdint.h>
#include "unwind.h"
namespace std
{
class type_info;
}
/*
* The cxxabi.h header provides a set of public definitions for types and
* functions defined by the Itanium C++ ABI specification. For reference, see
* the ABI specification here:
*
* http://sourcery.mentor.com/public/cxx-abi/abi.html
*
* All deviations from this specification, unless otherwise noted, are
* accidental.
*/
#ifdef __cplusplus
namespace __cxxabiv1 {
extern "C" {
#endif
/**
* Function type to call when an unexpected exception is encountered.
*/
typedef void (*unexpected_handler)();
/**
* Function type to call when an unrecoverable condition is encountered.
*/
typedef void (*terminate_handler)();
/**
* Structure used as a header on thrown exceptions. This is the same layout as
* defined by the Itanium ABI spec, so should be interoperable with any other
* implementation of this spec, such as GNU libsupc++.
*
* This structure is allocated when an exception is thrown. Unwinding happens
* in two phases, the first looks for a handler and the second installs the
* context. This structure stores a cache of the handler location between
* phase 1 and phase 2. Unfortunately, cleanup information is not cached, so
* must be looked up in both phases. This happens for two reasons. The first
* is that we don't know how many frames containing cleanups there will be, and
* we should avoid dynamic allocation during unwinding (the exception may be
* reporting that we've run out of memory). The second is that finding
* cleanups is much cheaper than finding handlers, because we don't have to
* look at the type table at all.
*
* Note: Several fields of this structure have not-very-informative names.
* These are taken from the ABI spec and have not been changed to make it
* easier for people referring to to the spec while reading this code.
*/
struct __cxa_exception
{
#if __LP64__
/**
* Reference count. Used to support the C++11 exception_ptr class. This
* is prepended to the structure in 64-bit mode and squeezed in to the
* padding left before the 64-bit aligned _Unwind_Exception at the end in
* 32-bit mode.
*
* Note that it is safe to extend this structure at the beginning, rather
* than the end, because the public API for creating it returns the address
* of the end (where the exception object can be stored).
*/
uintptr_t referenceCount;
#endif
/** Type info for the thrown object. */
std::type_info *exceptionType;
/** Destructor for the object, if one exists. */
void (*exceptionDestructor) (void *);
/** Handler called when an exception specification is violated. */
unexpected_handler unexpectedHandler;
/** Hander called to terminate. */
terminate_handler terminateHandler;
/**
* Next exception in the list. If an exception is thrown inside a catch
* block and caught in a nested catch, this points to the exception that
* will be handled after the inner catch block completes.
*/
__cxa_exception *nextException;
/**
* The number of handlers that currently have references to this
* exception. The top (non-sign) bit of this is used as a flag to indicate
* that the exception is being rethrown, so should not be deleted when its
* handler count reaches 0 (which it doesn't with the top bit set).
*/
int handlerCount;
#if defined(__arm__) && !defined(__ARM_DWARF_EH__)
/**
* The ARM EH ABI requires the unwind library to keep track of exceptions
* during cleanups. These support nesting, so we need to keep a list of
* them.
*/
_Unwind_Exception *nextCleanup;
/**
* The number of cleanups that are currently being run on this exception.
*/
int cleanupCount;
#endif
/**
* The selector value to be returned when installing the catch handler.
* Used at the call site to determine which catch() block should execute.
* This is found in phase 1 of unwinding then installed in phase 2.
*/
int handlerSwitchValue;
/**
* The action record for the catch. This is cached during phase 1
* unwinding.
*/
const char *actionRecord;
/**
* Pointer to the language-specific data area (LSDA) for the handler
* frame. This is unused in this implementation, but set for ABI
* compatibility in case we want to mix code in very weird ways.
*/
const char *languageSpecificData;
/** The cached landing pad for the catch handler.*/
void *catchTemp;
/**
* The pointer that will be returned as the pointer to the object. When
* throwing a class and catching a virtual superclass (for example), we
* need to adjust the thrown pointer to make it all work correctly.
*/
void *adjustedPtr;
#if !__LP64__
/**
* Reference count. Used to support the C++11 exception_ptr class. This
* is prepended to the structure in 64-bit mode and squeezed in to the
* padding left before the 64-bit aligned _Unwind_Exception at the end in
* 32-bit mode.
*
* Note that it is safe to extend this structure at the beginning, rather
* than the end, because the public API for creating it returns the address
* of the end (where the exception object can be stored)
*/
uintptr_t referenceCount;
#endif
/** The language-agnostic part of the exception header. */
_Unwind_Exception unwindHeader;
};
/**
* ABI-specified globals structure. Returned by the __cxa_get_globals()
* function and its fast variant. This is a per-thread structure - every
* thread will have one lazily allocated.
*
* This structure is defined by the ABI, so may be used outside of this
* library.
*/
struct __cxa_eh_globals
{
/**
* A linked list of exceptions that are currently caught. There may be
* several of these in nested catch() blocks.
*/
__cxa_exception *caughtExceptions;
/**
* The number of uncaught exceptions.
*/
unsigned int uncaughtExceptions;
};
/**
* ABI function returning the __cxa_eh_globals structure.
*/
__cxa_eh_globals *__cxa_get_globals(void);
/**
* Version of __cxa_get_globals() assuming that __cxa_get_globals() has already
* been called at least once by this thread.
*/
__cxa_eh_globals *__cxa_get_globals_fast(void);
std::type_info * __cxa_current_exception_type();
/**
* Throws an exception returned by __cxa_current_primary_exception(). This
* exception may have been caught in another thread.
*/
void __cxa_rethrow_primary_exception(void* thrown_exception);
/**
* Returns the current exception in a form that can be stored in an
* exception_ptr object and then rethrown by a call to
* __cxa_rethrow_primary_exception().
*/
void *__cxa_current_primary_exception(void);
/**
* Increments the reference count of an exception. Called when an
* exception_ptr is copied.
*/
void __cxa_increment_exception_refcount(void* thrown_exception);
/**
* Decrements the reference count of an exception. Called when an
* exception_ptr is deleted.
*/
void __cxa_decrement_exception_refcount(void* thrown_exception);
/**
* Demangles a C++ symbol or type name. The buffer, if non-NULL, must be
* allocated with malloc() and must be *n bytes or more long. This function
* may call realloc() on the value pointed to by buf, and will return the
* length of the string via *n.
*
* The value pointed to by status is set to one of the following:
*
* 0: success
* -1: memory allocation failure
* -2: invalid mangled name
* -3: invalid arguments
*/
char* __cxa_demangle(const char* mangled_name,
char* buf,
size_t* n,
int* status);
#ifdef __cplusplus
} // extern "C"
} // namespace
namespace abi = __cxxabiv1;
#endif /* __cplusplus */
#endif /* __CXXABI_H_ */
| {
"pile_set_name": "Github"
} |
package de.vogella.rcp.activities.handler;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
import org.eclipse.ui.handlers.HandlerUtil;
public class DeActivate extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchActivitySupport activitySupport = HandlerUtil
.getActiveWorkbenchWindow(event).getWorkbench()
.getActivitySupport();
Set<String> enabledActivities = new HashSet<String>();
activitySupport.setEnabledActivityIds(enabledActivities);
// Now I have to reset the perspective to update also the views
HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().resetPerspective();
return null;
}
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python
import sys
if sys.version_info[0] >= 3:
import PySimpleGUI as sg
else:
import PySimpleGUI27 as sg
import os
import mido
import time
import sys
PLAYER_COMMAND_NONE = 0
PLAYER_COMMAND_EXIT = 1
PLAYER_COMMAND_PAUSE = 2
PLAYER_COMMAND_NEXT = 3
PLAYER_COMMAND_RESTART_SONG = 4
# ---------------------------------------------------------------------- #
# PlayerGUI CLASS #
# ---------------------------------------------------------------------- #
class PlayerGUI():
'''
Class implementing GUI for both initial screen but the player itself
'''
def __init__(self):
self.Window = None
self.TextElem = None
self.PortList = mido.get_output_names() # use to get the list of midi ports
self.PortList = self.PortList[::-1] # reverse the list so the last one is first
# ---------------------------------------------------------------------- #
# PlayerChooseSongGUI #
# Show a GUI get to the file to playback #
# ---------------------------------------------------------------------- #
def PlayerChooseSongGUI(self):
# ---------------------- DEFINION OF CHOOSE WHAT TO PLAY GUI ----------------------------
layout = [[sg.Text('MIDI File Player', font=("Helvetica", 15), size=(20, 1), text_color='green')],
[sg.Text('File Selection', font=("Helvetica", 15), size=(20, 1))],
[sg.Text('Single File Playback', justification='right'), sg.InputText(size=(65, 1), key='midifile'), sg.FileBrowse(size=(10, 1), file_types=(("MIDI files", "*.mid"),))],
[sg.Text('Or Batch Play From This Folder', auto_size_text=False, justification='right'), sg.InputText(size=(65, 1), key='folder'), sg.FolderBrowse(size=(10, 1))],
[sg.Text('_' * 250, auto_size_text=False, size=(100, 1))],
[sg.Text('Choose MIDI Output Device', size=(22, 1)),
sg.Listbox(values=self.PortList, size=(30, len(self.PortList) + 1), key='device')],
[sg.Text('_' * 250, auto_size_text=False, size=(100, 1))],
[sg.SimpleButton('PLAY', size=(12, 2), button_color=('red', 'white'), font=("Helvetica", 15), bind_return_key=True), sg.Text(' ' * 2, size=(4, 1)), sg.Cancel(size=(8, 2), font=("Helvetica", 15))]]
window = sg.Window('MIDI File Player', auto_size_text=False, default_element_size=(30, 1), font=("Helvetica", 12)).Layout(layout)
self.Window = window
return window.Read()
def PlayerPlaybackGUIStart(self, NumFiles=1):
# ------- Make a new FlexForm ------- #
image_pause = './ButtonGraphics/Pause.png'
image_restart = './ButtonGraphics/Restart.png'
image_next = './ButtonGraphics/Next.png'
image_exit = './ButtonGraphics/Exit.png'
self.TextElem = sg.T('Song loading....', size=(70, 5 + NumFiles), font=("Helvetica", 14), auto_size_text=False)
self.SliderElem = sg.Slider(range=(1, 100), size=(50, 8), orientation='h', text_color='#f0f0f0')
layout = [
[sg.T('MIDI File Player', size=(30, 1), font=("Helvetica", 25))],
[self.TextElem],
[self.SliderElem],
[sg.Button('', button_color=sg.TRANSPARENT_BUTTON,
image_filename=image_pause, image_size=(50,50), image_subsample=2, border_width=0, key='PAUSE'), sg.T(' '),
sg.Button('', button_color=sg.TRANSPARENT_BUTTON,
image_filename=image_next, image_size=(50,50), image_subsample=2, border_width=0, key='NEXT'), sg.T(' '),
sg.Button('', button_color=sg.TRANSPARENT_BUTTON,
image_filename=image_restart, image_size=(50,50), image_subsample=2, border_width=0, key='Restart Song'), sg.T(' '),
sg.Button('', button_color=sg.TRANSPARENT_BUTTON,
image_filename=image_exit, image_size=(50,50), image_subsample=2, border_width=0,key='EXIT')]
]
window = sg.Window('MIDI File Player', default_element_size=(30, 1), font=("Helvetica", 25)).Layout(layout).Finalize()
self.Window = window
# ------------------------------------------------------------------------- #
# PlayerPlaybackGUIUpdate #
# Refresh the GUI for the main playback interface (must call periodically #
# ------------------------------------------------------------------------- #
def PlayerPlaybackGUIUpdate(self, DisplayString):
window = self.Window
if 'window' not in locals() or window is None: # if the widnow has been destoyed don't mess with it
return PLAYER_COMMAND_EXIT
self.TextElem.Update(DisplayString)
event, (values) = window.Read(timeout=0)
if event is None:
return PLAYER_COMMAND_EXIT
if event == 'PAUSE':
return PLAYER_COMMAND_PAUSE
elif event == 'EXIT':
return PLAYER_COMMAND_EXIT
elif event == 'NEXT':
return PLAYER_COMMAND_NEXT
elif event == 'Restart Song':
return PLAYER_COMMAND_RESTART_SONG
return PLAYER_COMMAND_NONE
# ---------------------------------------------------------------------- #
# MAIN - our main program... this is it #
# Runs the GUI to get the file / path to play #
# Decodes the MIDI-Video into a MID file #
# Plays the decoded MIDI file #
# ---------------------------------------------------------------------- #
def main():
def GetCurrentTime():
'''
Get the current system time in milliseconds
:return: milliseconds
'''
return int(round(time.time() * 1000))
pback = PlayerGUI()
button, values = pback.PlayerChooseSongGUI()
if button != 'PLAY':
sg.PopupCancel('Cancelled...\nAutoclose in 2 sec...', auto_close=True, auto_close_duration=2)
sys.exit(69)
if values['device']:
midi_port = values['device'][0]
else:
sg.PopupCancel('No devices found\nAutoclose in 2 sec...', auto_close=True, auto_close_duration=2)
batch_folder = values['folder']
midi_filename = values['midifile']
# ------ Build list of files to play --------------------------------------------------------- #
if batch_folder:
filelist = os.listdir(batch_folder)
filelist = [batch_folder+'/'+f for f in filelist if f.endswith(('.mid', '.MID'))]
filetitles = [os.path.basename(f) for f in filelist]
elif midi_filename: # an individual filename
filelist = [midi_filename,]
filetitles = [os.path.basename(midi_filename),]
else:
sg.PopupError('*** Error - No MIDI files specified ***')
sys.exit(666)
# ------ LOOP THROUGH MULTIPLE FILES --------------------------------------------------------- #
pback.PlayerPlaybackGUIStart(NumFiles=len(filelist) if len(filelist) <=10 else 10)
port = None
# Loop through the files in the filelist
for now_playing_number, current_midi_filename in enumerate(filelist):
display_string = 'Playing Local File...\n{} of {}\n{}'.format(now_playing_number+1, len(filelist), current_midi_filename)
midi_title = filetitles[now_playing_number]
# --------------------------------- REFRESH THE GUI ----------------------------------------- #
pback.PlayerPlaybackGUIUpdate(display_string)
# ---===--- Output Filename is .MID --- #
midi_filename = current_midi_filename
# --------------------------------- MIDI - STARTS HERE ----------------------------------------- #
if not port: # if the midi output port not opened yet, then open it
port = mido.open_output(midi_port if midi_port else None)
try:
mid = mido.MidiFile(filename=midi_filename)
except:
print('****** Exception trying to play MidiFile filename = {}***************'.format(midi_filename))
sg.PopupError('Exception trying to play MIDI file:', midi_filename, 'Skipping file')
continue
# Build list of data contained in MIDI File using only track 0
midi_length_in_seconds = mid.length
display_file_list = '>> ' + '\n'.join([f for i, f in enumerate(filetitles[now_playing_number:]) if i < 10])
paused = cancelled = next_file = False
######################### Loop through MIDI Messages ###########################
while(True):
start_playback_time = GetCurrentTime()
port.reset()
for midi_msg_number, msg in enumerate(mid.play()):
#################### GUI - read values ##################
if not midi_msg_number % 4: # update the GUI every 4 MIDI messages
t = (GetCurrentTime() - start_playback_time)//1000
display_midi_len = '{:02d}:{:02d}'.format(*divmod(int(midi_length_in_seconds),60))
display_string = 'Now Playing {} of {}\n{}\n {:02d}:{:02d} of {}\nPlaylist:'.\
format(now_playing_number+1, len(filelist), midi_title, *divmod(t, 60), display_midi_len)
# display list of next 10 files to be played.
pback.SliderElem.Update(t, range=(1,midi_length_in_seconds))
rc = pback.PlayerPlaybackGUIUpdate(display_string + '\n' + display_file_list)
else: # fake rest of code as if GUI did nothing
rc = PLAYER_COMMAND_NONE
if paused:
rc = PLAYER_COMMAND_NONE
while rc == PLAYER_COMMAND_NONE: # TIGHT-ASS loop waiting on a GUI command
rc = pback.PlayerPlaybackGUIUpdate(display_string)
time.sleep(.25)
####################################### MIDI send data ##################################
port.send(msg)
# ------- Execute GUI Commands after sending MIDI data ------- #
if rc == PLAYER_COMMAND_EXIT:
cancelled = True
break
elif rc == PLAYER_COMMAND_PAUSE:
paused = not paused
port.reset()
elif rc == PLAYER_COMMAND_NEXT:
next_file = True
break
elif rc == PLAYER_COMMAND_RESTART_SONG:
break
if cancelled or next_file:
break
#------- DONE playing the song ------- #
port.reset() # reset the midi port when done with the song
if cancelled:
break
# ---------------------------------------------------------------------- #
# LAUNCH POINT -- program starts and ends here #
# ---------------------------------------------------------------------- #
if __name__ == '__main__':
main()
| {
"pile_set_name": "Github"
} |
<view>
注意打开调试工具,查看console 和 network来测试
<button type="primary" class="btn" onTap="handleRequestByGet">
普通get请求
</button>
<button type="primary" class="btn" onTap="handleRequestByPOST">
普通POST请求
</button>
<button type="primary" class="btn" onTap="handleRequestByGetParams">
get请求带参数
</button>
<button type="primary" class="btn" onTap="handleRequestByPOSTParams">
普通POST请求带参数
</button>
<button type="primary" class="btn" onTap="handleRequestByHeaders">
自定义请求头参数
</button>
<button type="primary" class="btn" onTap="handleRequestByContentType">
content-type 修改
</button>
</view>
| {
"pile_set_name": "Github"
} |
from corehq.apps.app_manager.management.commands.helpers import (
AppMigrationCommandBase,
)
from corehq.apps.app_manager.models import Application
class Command(AppMigrationCommandBase):
help = "Migrate single parent index to CaseIndex list in advanced form actions."
include_builds = False # AdvancedAction lazy-migrates reverted builds
def migrate_app(self, app_doc):
modules = [m for m in app_doc['modules'] if m.get('module_type', '') == 'advanced']
should_save = False
for module in modules:
for form in module['forms']:
for action_name in form.get('actions', {}):
if action_name == 'load_update_cases':
for action in form['actions'][action_name]:
if 'parent_tag' in action:
if action['parent_tag']:
action['case_index'] = {
'tag': action['parent_tag'],
'reference_id': action.get('parent_reference_id', 'parent'),
'relationship': action.get('relationship', 'child'),
}
del action['parent_tag']
action.pop('parent_reference_id', None)
action.pop('relationship', None)
should_save = True
elif action_name == 'open_cases':
for action in form['actions'][action_name]:
if 'parent_tag' in action:
if action['parent_tag']:
case_index = {
'tag': action['parent_tag'],
'reference_id': action.get('parent_reference_id', 'parent'),
'relationship': action.get('relationship', 'child'),
}
if hasattr(action.get('case_indices'), 'append'):
action['case_indices'].append(case_index)
else:
action['case_indices'] = [case_index]
del action['parent_tag']
action.pop('parent_reference_id', None)
action.pop('relationship', None)
should_save = True
return Application.wrap(app_doc) if should_save else None
| {
"pile_set_name": "Github"
} |
package com.hellokoding.jpa.book;
import org.springframework.data.jpa.repository.JpaRepository;
public interface BookRepository extends JpaRepository<Book, Integer>{
}
| {
"pile_set_name": "Github"
} |
#ifndef BOOST_NEW_ITERATOR_TESTS_HPP
# define BOOST_NEW_ITERATOR_TESTS_HPP
//
// Copyright (c) David Abrahams 2001.
// Copyright (c) Jeremy Siek 2001-2003.
// Copyright (c) Thomas Witt 2002.
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// This is meant to be the beginnings of a comprehensive, generic
// test suite for STL concepts such as iterators and containers.
//
// Revision History:
// 28 Oct 2002 Started update for new iterator categories
// (Jeremy Siek)
// 28 Apr 2002 Fixed input iterator requirements.
// For a == b a++ == b++ is no longer required.
// See 24.1.1/3 for details.
// (Thomas Witt)
// 08 Feb 2001 Fixed bidirectional iterator test so that
// --i is no longer a precondition.
// (Jeremy Siek)
// 04 Feb 2001 Added lvalue test, corrected preconditions
// (David Abrahams)
# include <iterator>
# include <boost/type_traits.hpp>
# include <boost/static_assert.hpp>
# include <boost/concept_archetype.hpp> // for detail::dummy_constructor
# include <boost/detail/iterator.hpp>
# include <boost/pending/iterator_tests.hpp>
# include <boost/iterator/is_readable_iterator.hpp>
# include <boost/iterator/is_lvalue_iterator.hpp>
# include <boost/iterator/detail/config_def.hpp>
# include <boost/detail/is_incrementable.hpp>
# include <boost/detail/lightweight_test.hpp>
namespace boost {
// Do separate tests for *i++ so we can treat, e.g., smart pointers,
// as readable and/or writable iterators.
template <class Iterator, class T>
void readable_iterator_traversal_test(Iterator i1, T v, mpl::true_)
{
T v2(*i1++);
BOOST_TEST(v == v2);
}
template <class Iterator, class T>
void readable_iterator_traversal_test(const Iterator i1, T v, mpl::false_)
{}
template <class Iterator, class T>
void writable_iterator_traversal_test(Iterator i1, T v, mpl::true_)
{
++i1; // we just wrote into that position
*i1++ = v;
Iterator x(i1++);
(void)x;
}
template <class Iterator, class T>
void writable_iterator_traversal_test(const Iterator i1, T v, mpl::false_)
{}
// Preconditions: *i == v
template <class Iterator, class T>
void readable_iterator_test(const Iterator i1, T v)
{
Iterator i2(i1); // Copy Constructible
typedef typename detail::iterator_traits<Iterator>::reference ref_t;
ref_t r1 = *i1;
ref_t r2 = *i2;
T v1 = r1;
T v2 = r2;
BOOST_TEST(v1 == v);
BOOST_TEST(v2 == v);
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
readable_iterator_traversal_test(i1, v, detail::is_postfix_incrementable<Iterator>());
// I think we don't really need this as it checks the same things as
// the above code.
BOOST_STATIC_ASSERT(is_readable_iterator<Iterator>::value);
# endif
}
template <class Iterator, class T>
void writable_iterator_test(Iterator i, T v, T v2)
{
Iterator i2(i); // Copy Constructible
*i2 = v;
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
writable_iterator_traversal_test(
i, v2, mpl::and_<
detail::is_incrementable<Iterator>
, detail::is_postfix_incrementable<Iterator>
>());
# endif
}
template <class Iterator>
void swappable_iterator_test(Iterator i, Iterator j)
{
Iterator i2(i), j2(j);
typename detail::iterator_traits<Iterator>::value_type bi = *i, bj = *j;
iter_swap(i2, j2);
typename detail::iterator_traits<Iterator>::value_type ai = *i, aj = *j;
BOOST_TEST(bi == aj && bj == ai);
}
template <class Iterator, class T>
void constant_lvalue_iterator_test(Iterator i, T v1)
{
Iterator i2(i);
typedef typename detail::iterator_traits<Iterator>::value_type value_type;
typedef typename detail::iterator_traits<Iterator>::reference reference;
BOOST_STATIC_ASSERT((is_same<const value_type&, reference>::value));
const T& v2 = *i2;
BOOST_TEST(v1 == v2);
# ifndef BOOST_NO_LVALUE_RETURN_DETECTION
BOOST_STATIC_ASSERT(is_lvalue_iterator<Iterator>::value);
BOOST_STATIC_ASSERT(!is_non_const_lvalue_iterator<Iterator>::value);
# endif
}
template <class Iterator, class T>
void non_const_lvalue_iterator_test(Iterator i, T v1, T v2)
{
Iterator i2(i);
typedef typename detail::iterator_traits<Iterator>::value_type value_type;
typedef typename detail::iterator_traits<Iterator>::reference reference;
BOOST_STATIC_ASSERT((is_same<value_type&, reference>::value));
T& v3 = *i2;
BOOST_TEST(v1 == v3);
// A non-const lvalue iterator is not neccessarily writable, but we
// are assuming the value_type is assignable here
*i = v2;
T& v4 = *i2;
BOOST_TEST(v2 == v4);
# ifndef BOOST_NO_LVALUE_RETURN_DETECTION
BOOST_STATIC_ASSERT(is_lvalue_iterator<Iterator>::value);
BOOST_STATIC_ASSERT(is_non_const_lvalue_iterator<Iterator>::value);
# endif
}
template <class Iterator, class T>
void forward_readable_iterator_test(Iterator i, Iterator j, T val1, T val2)
{
Iterator i2;
Iterator i3(i);
i2 = i;
BOOST_TEST(i2 == i3);
BOOST_TEST(i != j);
BOOST_TEST(i2 != j);
readable_iterator_test(i, val1);
readable_iterator_test(i2, val1);
readable_iterator_test(i3, val1);
BOOST_TEST(i == i2++);
BOOST_TEST(i != ++i3);
readable_iterator_test(i2, val2);
readable_iterator_test(i3, val2);
readable_iterator_test(i, val1);
}
template <class Iterator, class T>
void forward_swappable_iterator_test(Iterator i, Iterator j, T val1, T val2)
{
forward_readable_iterator_test(i, j, val1, val2);
Iterator i2 = i;
++i2;
swappable_iterator_test(i, i2);
}
// bidirectional
// Preconditions: *i == v1, *++i == v2
template <class Iterator, class T>
void bidirectional_readable_iterator_test(Iterator i, T v1, T v2)
{
Iterator j(i);
++j;
forward_readable_iterator_test(i, j, v1, v2);
++i;
Iterator i1 = i, i2 = i;
BOOST_TEST(i == i1--);
BOOST_TEST(i != --i2);
readable_iterator_test(i, v2);
readable_iterator_test(i1, v1);
readable_iterator_test(i2, v1);
--i;
BOOST_TEST(i == i1);
BOOST_TEST(i == i2);
++i1;
++i2;
readable_iterator_test(i, v1);
readable_iterator_test(i1, v2);
readable_iterator_test(i2, v2);
}
// random access
// Preconditions: [i,i+N) is a valid range
template <class Iterator, class TrueVals>
void random_access_readable_iterator_test(Iterator i, int N, TrueVals vals)
{
bidirectional_readable_iterator_test(i, vals[0], vals[1]);
const Iterator j = i;
int c;
for (c = 0; c < N-1; ++c)
{
BOOST_TEST(i == j + c);
BOOST_TEST(*i == vals[c]);
typename detail::iterator_traits<Iterator>::value_type x = j[c];
BOOST_TEST(*i == x);
BOOST_TEST(*i == *(j + c));
BOOST_TEST(*i == *(c + j));
++i;
BOOST_TEST(i > j);
BOOST_TEST(i >= j);
BOOST_TEST(j <= i);
BOOST_TEST(j < i);
}
Iterator k = j + N - 1;
for (c = 0; c < N-1; ++c)
{
BOOST_TEST(i == k - c);
BOOST_TEST(*i == vals[N - 1 - c]);
typename detail::iterator_traits<Iterator>::value_type x = j[N - 1 - c];
BOOST_TEST(*i == x);
Iterator q = k - c;
BOOST_TEST(*i == *q);
BOOST_TEST(i > j);
BOOST_TEST(i >= j);
BOOST_TEST(j <= i);
BOOST_TEST(j < i);
--i;
}
}
} // namespace boost
# include <boost/iterator/detail/config_undef.hpp>
#endif // BOOST_NEW_ITERATOR_TESTS_HPP
| {
"pile_set_name": "Github"
} |
SHA256 (Math-Financial-0.76.tar.gz) = 7cae1677382f12bc96326420758dd3f9a86d1f426cfe9efdb8b6268f0bd24b2a
SIZE (Math-Financial-0.76.tar.gz) = 6467
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.