text
stringlengths 2
100k
| meta
dict |
---|---|
[@effectful/debugger](../README.md) › ["state"](../modules/_state_.md) › [Env](_state_.env.md)
# Interface: Env
Full state of a currently running program
## Hierarchy
* **Env**
↳ [ProtoFrame](_state_.protoframe.md)
↳ [Frame](_state_.frame.md)
## Index
### Properties
* [$](_state_.env.md#)
## Properties
### $
• **$**: *any[]*
Defined in debugger/src/state.ts:9
local variables
| {
"pile_set_name": "Github"
} |
//
// YYFPSLabel.m
// YYKitExample
//
// Created by ibireme on 15/9/3.
// Copyright (c) 2015 ibireme. All rights reserved.
//
#import "YYFPSLabel.h"
//#import "YYKit.h"
#define kSize CGSizeMake(55, 20)
@implementation YYFPSLabel {
CADisplayLink *_link;
NSUInteger _count;
NSTimeInterval _lastTime;
UIFont *_font;
UIFont *_subFont;
NSTimeInterval _llll;
}
- (instancetype)initWithFrame:(CGRect)frame {
if (frame.size.width == 0 && frame.size.height == 0) {
frame.size = kSize;
}
self = [super initWithFrame:frame];
self.layer.cornerRadius = 5;
self.clipsToBounds = YES;
self.textAlignment = NSTextAlignmentCenter;
self.userInteractionEnabled = NO;
self.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.700];
_font = [UIFont fontWithName:@"Menlo" size:14];
if (_font) {
_subFont = [UIFont fontWithName:@"Menlo" size:4];
} else {
_font = [UIFont fontWithName:@"Courier" size:14];
_subFont = [UIFont fontWithName:@"Courier" size:4];
}
_link = [CADisplayLink displayLinkWithTarget:self selector:@selector(tick:)];
[_link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
return self;
}
- (void)dealloc {
[_link invalidate];
}
- (CGSize)sizeThatFits:(CGSize)size {
return kSize;
}
- (void)tick:(CADisplayLink *)link {
if (_lastTime == 0) {
_lastTime = link.timestamp;
return;
}
_count++;
NSTimeInterval delta = link.timestamp - _lastTime;
if (delta < 1) return;
_lastTime = link.timestamp;
float fps = _count / delta;
_count = 0;
CGFloat progress = fps / 60.0;
UIColor *color = [UIColor colorWithHue:0.27 * (progress - 0.2) saturation:1 brightness:0.9 alpha:1];
NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%d FPS",(int)round(fps)]];
// [text setColor:color range:NSMakeRange(0, text.length - 3)];
// [text setColor:[UIColor whiteColor] range:NSMakeRange(text.length - 3, 3)];
// text.font = _font;
// [text setFont:_subFont range:NSMakeRange(text.length - 4, 1)];
self.textColor = color;
self.font = _font;
self.attributedText = text;
}
@end
| {
"pile_set_name": "Github"
} |
// Copyright 2018 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.
// Code generated by generate-types. DO NOT EDIT.
package impl
import (
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoiface"
)
func (m *messageState) Descriptor() protoreflect.MessageDescriptor {
return m.messageInfo().Desc
}
func (m *messageState) Type() protoreflect.MessageType {
return m.messageInfo()
}
func (m *messageState) New() protoreflect.Message {
return m.messageInfo().New()
}
func (m *messageState) Interface() protoreflect.ProtoMessage {
return m.protoUnwrap().(protoreflect.ProtoMessage)
}
func (m *messageState) protoUnwrap() interface{} {
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
}
func (m *messageState) ProtoMethods() *protoiface.Methods {
m.messageInfo().init()
return &m.messageInfo().methods
}
// ProtoMessageInfo is a pseudo-internal API for allowing the v1 code
// to be able to retrieve a v2 MessageInfo struct.
//
// WARNING: This method is exempt from the compatibility promise and
// may be removed in the future without warning.
func (m *messageState) ProtoMessageInfo() *MessageInfo {
return m.messageInfo()
}
func (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
m.messageInfo().init()
for _, ri := range m.messageInfo().rangeInfos {
switch ri := ri.(type) {
case *fieldInfo:
if ri.has(m.pointer()) {
if !f(ri.fieldDesc, ri.get(m.pointer())) {
return
}
}
case *oneofInfo:
if n := ri.which(m.pointer()); n > 0 {
fi := m.messageInfo().fields[n]
if !f(fi.fieldDesc, fi.get(m.pointer())) {
return
}
}
}
}
m.messageInfo().extensionMap(m.pointer()).Range(f)
}
func (m *messageState) Has(fd protoreflect.FieldDescriptor) bool {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.has(m.pointer())
} else {
return m.messageInfo().extensionMap(m.pointer()).Has(xt)
}
}
func (m *messageState) Clear(fd protoreflect.FieldDescriptor) {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
fi.clear(m.pointer())
} else {
m.messageInfo().extensionMap(m.pointer()).Clear(xt)
}
}
func (m *messageState) Get(fd protoreflect.FieldDescriptor) protoreflect.Value {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.get(m.pointer())
} else {
return m.messageInfo().extensionMap(m.pointer()).Get(xt)
}
}
func (m *messageState) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
fi.set(m.pointer(), v)
} else {
m.messageInfo().extensionMap(m.pointer()).Set(xt, v)
}
}
func (m *messageState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.mutable(m.pointer())
} else {
return m.messageInfo().extensionMap(m.pointer()).Mutable(xt)
}
}
func (m *messageState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.newField()
} else {
return xt.New()
}
}
func (m *messageState) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
m.messageInfo().init()
if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od {
return od.Fields().ByNumber(oi.which(m.pointer()))
}
panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName()))
}
func (m *messageState) GetUnknown() protoreflect.RawFields {
m.messageInfo().init()
return m.messageInfo().getUnknown(m.pointer())
}
func (m *messageState) SetUnknown(b protoreflect.RawFields) {
m.messageInfo().init()
m.messageInfo().setUnknown(m.pointer(), b)
}
func (m *messageState) IsValid() bool {
return !m.pointer().IsNil()
}
func (m *messageReflectWrapper) Descriptor() protoreflect.MessageDescriptor {
return m.messageInfo().Desc
}
func (m *messageReflectWrapper) Type() protoreflect.MessageType {
return m.messageInfo()
}
func (m *messageReflectWrapper) New() protoreflect.Message {
return m.messageInfo().New()
}
func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage {
if m, ok := m.protoUnwrap().(protoreflect.ProtoMessage); ok {
return m
}
return (*messageIfaceWrapper)(m)
}
func (m *messageReflectWrapper) protoUnwrap() interface{} {
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
}
func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods {
m.messageInfo().init()
return &m.messageInfo().methods
}
// ProtoMessageInfo is a pseudo-internal API for allowing the v1 code
// to be able to retrieve a v2 MessageInfo struct.
//
// WARNING: This method is exempt from the compatibility promise and
// may be removed in the future without warning.
func (m *messageReflectWrapper) ProtoMessageInfo() *MessageInfo {
return m.messageInfo()
}
func (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
m.messageInfo().init()
for _, ri := range m.messageInfo().rangeInfos {
switch ri := ri.(type) {
case *fieldInfo:
if ri.has(m.pointer()) {
if !f(ri.fieldDesc, ri.get(m.pointer())) {
return
}
}
case *oneofInfo:
if n := ri.which(m.pointer()); n > 0 {
fi := m.messageInfo().fields[n]
if !f(fi.fieldDesc, fi.get(m.pointer())) {
return
}
}
}
}
m.messageInfo().extensionMap(m.pointer()).Range(f)
}
func (m *messageReflectWrapper) Has(fd protoreflect.FieldDescriptor) bool {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.has(m.pointer())
} else {
return m.messageInfo().extensionMap(m.pointer()).Has(xt)
}
}
func (m *messageReflectWrapper) Clear(fd protoreflect.FieldDescriptor) {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
fi.clear(m.pointer())
} else {
m.messageInfo().extensionMap(m.pointer()).Clear(xt)
}
}
func (m *messageReflectWrapper) Get(fd protoreflect.FieldDescriptor) protoreflect.Value {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.get(m.pointer())
} else {
return m.messageInfo().extensionMap(m.pointer()).Get(xt)
}
}
func (m *messageReflectWrapper) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
fi.set(m.pointer(), v)
} else {
m.messageInfo().extensionMap(m.pointer()).Set(xt, v)
}
}
func (m *messageReflectWrapper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.mutable(m.pointer())
} else {
return m.messageInfo().extensionMap(m.pointer()).Mutable(xt)
}
}
func (m *messageReflectWrapper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
m.messageInfo().init()
if fi, xt := m.messageInfo().checkField(fd); fi != nil {
return fi.newField()
} else {
return xt.New()
}
}
func (m *messageReflectWrapper) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
m.messageInfo().init()
if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od {
return od.Fields().ByNumber(oi.which(m.pointer()))
}
panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName()))
}
func (m *messageReflectWrapper) GetUnknown() protoreflect.RawFields {
m.messageInfo().init()
return m.messageInfo().getUnknown(m.pointer())
}
func (m *messageReflectWrapper) SetUnknown(b protoreflect.RawFields) {
m.messageInfo().init()
m.messageInfo().setUnknown(m.pointer(), b)
}
func (m *messageReflectWrapper) IsValid() bool {
return !m.pointer().IsNil()
}
| {
"pile_set_name": "Github"
} |
{
"version": "3.6.1",
"flags": {},
"shapes": [
{
"label": "tail",
"line_color": null,
"fill_color": null,
"points": [
[
35,
107
],
[
28,
108
],
[
20,
110
],
[
15,
113
],
[
10,
113
],
[
6,
115
],
[
6,
125
],
[
7,
134
],
[
21,
143
],
[
38,
159
],
[
50,
170
],
[
69,
187
],
[
86,
198
],
[
97,
210
],
[
114,
225
],
[
124,
238
],
[
130,
258
],
[
131,
268
],
[
146,
270
],
[
161,
272
],
[
173,
268
],
[
176,
261
],
[
191,
243
],
[
213,
233
],
[
233,
229
],
[
252,
223
],
[
290,
213
],
[
308,
213
],
[
332,
213
],
[
355,
214
],
[
372,
214
],
[
384,
213
],
[
395,
207
],
[
397,
198
],
[
394,
194
],
[
382,
191
],
[
374,
191
],
[
362,
189
],
[
353,
184
],
[
345,
182
],
[
334,
179
],
[
325,
177
],
[
307,
175
],
[
290,
172
],
[
276,
174
],
[
263,
172
],
[
248,
174
],
[
242,
172
],
[
235,
174
],
[
226,
173
],
[
209,
173
],
[
197,
174
],
[
187,
177
],
[
183,
168
],
[
176,
165
],
[
157,
155
],
[
150,
153
],
[
135,
148
],
[
125,
143
],
[
110,
135
],
[
101,
131
],
[
90,
127
],
[
82,
125
],
[
73,
122
],
[
61,
119
],
[
50,
115
],
[
45,
113
]
],
"shape_type": "polygon"
}
],
"lineColor": [
0,
255,
0,
128
],
"fillColor": [
255,
0,
0,
128
],
"imagePath": "0172cb96f.jpg",
"imageData": null,
"imageHeight": 400,
"imageWidth": 400
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016, 2020 IBM Corp. and others
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] http://openjdk.java.net/legal/assembly-exception.html
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../TKG/playlist.xsd">
<!-- LIBPATH tests intended for PMR56610 (CMVC 201272) -->
<test>
<testCaseName>cmdLineTester_libpathTestRtf</testCaseName>
<command>$(JAVA_COMMAND) $(JVM_OPTIONS) -DJAVA_EXE=$(JAVA_COMMAND) -DJAVA_HOME=$(Q)$(JAVA_HOME)$(Q) -DJAVATEST_ROOT=$(JAVATEST_ROOT) -DJVM_TEST_ROOT=$(JVM_TEST_ROOT) \
-DTESTSJARPATH=$(Q)$(TEST_RESROOT)$(D)libpathTest.jar$(Q) \
-DRESJAR=$(CMDLINETESTER_RESJAR) -jar $(CMDLINETESTER_JAR) \
-config $(Q)$(TEST_RESROOT)$(D)libpathRtf.xml$(Q) \
-xids all,$(PLATFORM) -xlist $(Q)$(TEST_RESROOT)$(D)exclude.xml$(Q) \
-nonZeroExitWhenError; \
$(TEST_STATUS)</command>
<!-- temporarily disable this test on osx; https://github.com/eclipse/openj9/issues/3787 -->
<platformRequirements>bits.64,vm.cmprssptrs,^os.osx,^os.zos</platformRequirements>
<levels>
<level>sanity</level>
</levels>
<groups>
<group>functional</group>
</groups>
<impls>
<impl>openj9</impl>
<impl>ibm</impl>
</impls>
</test>
<test>
<testCaseName>cmdLineTester_libpathTestRtfChild</testCaseName>
<command>$(JAVA_COMMAND) $(JVM_OPTIONS) -DJAVA_EXE=$(JAVA_COMMAND) -DEXTRA_OPTIONS=$(Q)$(JVM_OPTIONS)$(Q) -DJAVATEST_ROOT=$(JAVATEST_ROOT) -DJVM_TEST_ROOT=$(JVM_TEST_ROOT) \
-DTESTSJARPATH=$(Q)$(TEST_RESROOT)$(D)libpathTest.jar$(Q) \
-DRESJAR=$(CMDLINETESTER_RESJAR) -jar $(CMDLINETESTER_JAR) \
-config $(Q)$(TEST_RESROOT)$(D)libpathRtfChild.xml$(Q) \
-xids all,$(PLATFORM) -xlist $(Q)$(TEST_RESROOT)$(D)exclude_rtfchild.xml$(Q) \
-nonZeroExitWhenError; \
$(TEST_STATUS)</command>
<!-- temporarily disable this test on osx; https://github.com/eclipse/openj9/issues/3787 -->
<platformRequirements>^os.osx</platformRequirements>
<levels>
<level>sanity</level>
</levels>
<groups>
<group>functional</group>
</groups>
</test>
</playlist>
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<!--
~ Copyright (C) 2012-2017 The Android Money Manager Ex Project 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 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 General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="app_name">前金錢經理</string>
<!-- application -->
<string name="application_name">Money Manager Ex</string>
<string name="application_definition">一個簡單易用的管理個人財務、銀行帳戶、家庭預算等的應用程式。</string>
<string name="application_credits">MoneyManagerEx for Android 專案使用 ActionBarSherlock 程式庫</string>
<string name="application_license">開放原始碼授權</string>
<!-- database -->
<string name="db_insert_failed">新增資料失敗</string>
<string name="db_delete_failed">刪除資料失敗</string>
<string name="db_update_failed">更新資料失敗</string>
<!-- menu -->
<!--<string name="menu">Menu</string>-->
<string name="menu_exit">離開</string>
<!--<string name="menu_import_export">Import/Export</string>-->
<!--<string name="menu_sync">Synchronize</string>-->
<!--<string name="menu_import_from_storage">Import from storage</string>-->
<!--<string name="menu_export_to_storage">Export to storage</string>-->
<string name="menu_manage">管理</string>
<!--<string name="menu_sync_dropbox">Dropbox Sync</string>-->
<!--<string name="menu_tools">Tools</string>-->
<!--<string name="menu_use_external_db">Use External Database</string>-->
<!-- import / export database -->
<!--<string name="emptyFolder">Empty folder</string>-->
<!--<string name="upLevel">Up level</string>-->
<!--<string name="import_export">Import / Export</string>-->
<!--<string name="import_export_database_progress">Database import/export in progress</string>-->
<!--<string name="import_export_success">Import / Export completed successfully</string>-->
<!--<string name="import_export_failed">Import / Export failed</string>-->
<!-- preferences -->
<string name="preferences_general">一般</string>
<string name="preferences_perdatabase">每個資料庫</string>
<string name="preferences_dispaly">外觀和感覺</string>
<string name="preferences_behaviour">動作</string>
<string name="base_currency">預設貨幣別</string>
<string name="base_currency_changed">基礎貨幣已更改</string>
<string name="base_currency_change_notification">基礎貨幣已更改。請更新幣種匯率以在新的基礎貨幣中獲取正確的金額。</string>
<string name="view_accounts_opened">顯示已啟用帳戶</string>
<string name="if_not_selected_willShowAllAccounts">未勾選將顯示全部帳戶</string>
<string name="view_accounts_favorites">顯示常用帳戶</string>
<string name="version">版本</string>
<string name="build">建立於</string>
<string name="path">資料庫位置</string>
<string name="database_version">資料庫版本</string>
<string name="title_show_tutorial">顯示教程</string>
<string name="summary_show_tutorial">下次執行時顯示教程?</string>
<string name="preferences_behaviour_focus_filter_title">在選擇列表中顯示搜尋框</string>
<string name="preferences_behaviour_focus_filter_summary">在選擇列表中顯示搜尋框,取消選擇將以瀏覽模式顯示</string>
<string name="auto_sync_via_wifi">僅在 WiFi 自動同步</string>
<string name="auto_sync_via_wifi_summary">僅在 WiFi 連接時自動同步。</string>
<string name="sync_on_app_start">在應用程式啟動時同步。</string>
<string name="sync_on_start">開始時同步</string>
<!-- account -->
<string name="account">帳戶</string>
<string name="account_list">帳戶清單</string>
<string name="account_empty_list">未發現任何帳號,請點擊綠色加號按鈕新增。</string>
<string name="account_balance">結餘</string>
<string name="account_reconciled_balance">已核實</string>
<string name="delete_account">刪除帳戶</string>
<string name="account_name">帳戶名稱</string>
<string name="account_type">帳戶類型</string>
<string name="account_number">帳戶號碼</string>
<string name="account_held_at">商戶名稱</string>
<string name="account_status">帳戶狀態</string>
<string name="favourite_account">常用帳戶</string>
<string name="select_currency">選擇貨幣</string>
<string name="checking">支票/存款/信用卡</string>
<string name="investment">投資</string>
<string name="investment_accounts">投資帳戶</string>
<string name="term">限期</string>
<string name="db_account_insert_failed">新增帳戶失敗</string>
<string name="db_account_update_failed">更新帳戶失敗</string>
<string name="error_currency_not_selected">需要貨幣</string>
<string name="error_saving_default_currency">儲存預設貨幣時出錯</string>
<string name="error_initialbal_empty">需要帳戶初始金額</string>
<string name="error_accountname_empty">需要帳戶名稱</string>
<string name="error_accounttype_empty">需要帳戶類型</string>
<string name="error_status_empty">需要帳戶狀態</string>
<string name="error_amount_must_be_positive">該交易種類要求金額必須是正數。</string>
<!-- payee -->
<string name="payee_name">受帳人名稱</string>
<string name="edit_payeeName">編輯受帳人</string>
<string name="delete_payee">刪除受帳人</string>
<string name="payee">受帳人</string>
<string name="select_payee">選擇受帳人</string>
<string name="payee_empty_list">未發現任何受帳者,請點擊綠色加號按鈕新增。</string>
<string name="from">由</string>
<string name="db_payee_update_failed">更新受帳人失敗</string>
<!-- category / subcategory -->
<string name="category">類型</string>
<string name="subcategory">子類別</string>
<string name="category_empty_list">未發現任何類別,請點擊綠色加號按鈕新增。</string>
<string name="select_category">選擇類型</string>
<string name="add_category">新增類型</string>
<string name="add_subcategory">新增副類型</string>
<string name="edit_categoryName">編輯類別</string>
<string name="delete_category">刪除類型</string>
<!-- currency -->
<string name="currency_name">貨幣名稱</string>
<string name="currency_symbol">貨幣代碼</string>
<string name="delete_currency">刪除貨幣</string>
<string name="unit_name">單位名稱</string>
<string name="cents_name">1/100單位</string>
<string name="prefix_symbol">前綴符號</string>
<string name="suffix_symbol">後綴符號</string>
<string name="decimal_char">小數點文字</string>
<string name="group_char">每3位數分隔文字</string>
<string name="scale">比例</string>
<string name="conversion_to_base_rate">轉換為基本利率</string>
<string name="currency_name_empty">需要貨幣名稱</string>
<string name="new_edit_currency">新增/編輯貨幣</string>
<!-- transaction -->
<string name="amount">金額</string>
<string name="total_amount">金額</string>
<string name="deposit">收入</string>
<string name="status">狀態</string>
<string name="status_reconciled">已核實</string>
<string name="status_void">作廢</string>
<string name="status_follow_up">需要追蹤</string>
<string name="status_duplicate">重複的</string>
<string name="status_none">未核實</string>
<string name="transfer">轉帳</string>
<string name="transfer_amount">轉帳金額</string>
<string name="transaction_type">交易種類</string>
<string name="transaction_status">狀態</string>
<string name="withdrawal">支出</string>
<string name="db_checking_insert_failed">新增交易失敗</string>
<string name="db_checking_update_failed">更新交易失敗</string>
<string name="delete_transaction">刪除交易</string>
<string name="new_transaction">新增交易</string>
<string name="error_payee_not_selected">要需受帳人</string>
<string name="error_toaccount_not_selected">需要轉帳帳戶</string>
<string name="error_category_not_selected">需要類型</string>
<string name="error_totamount_empty">需要總金額</string>
<string name="error_transfer_to_same_account">轉帳的兩個帳戶必須不同</string>
<string name="about">關於</string>
<string name="add">新增</string>
<string name="confirmDelete">您確定要刪除此徽標?</string>
<string name="date">日期</string>
<string name="delete">刪除</string>
<string name="download">下載</string>
<string name="edit">編輯</string>
<string name="home">主頁</string>
<string name="logo">Logo</string>
<string name="new_edit_transaction">新增/編輯交易</string>
<string name="refresh">重新整理</string>
<string name="search">搜尋</string>
<string name="settings">設定</string>
<string name="summary">摘要</string>
<string name="sync">同步</string>
<string name="synchronize">同步</string>
<string name="open">啟用</string>
<string name="user">使用者</string>
<string name="upload">上傳</string>
<string name="username">使用者姓名</string>
<string name="to">至</string>
<string name="website">網站</string>
<string name="contact">聯絡</string>
<string name="access_info">登入資訊</string>
<string name="initial_balance">初始金額</string>
<string name="notes">備註</string>
<string name="closed">關閉</string>
<string name="theme_application">主題</string>
<string name="theme_holo">Material Dark</string>
<string name="theme_light">Material Light</string>
<!-- 20120906 -->
<string name="close_application">離開</string>
<string name="question_close_application">你確定要離開?</string>
<string name="error_intent_pick_file">無檔案管理程式</string>
<string name="attention">注意</string>
<string name="payee_can_not_deleted">受帳人不能被刪除,因為它已被使用</string>
<string name="account_can_not_deleted">帳戶不能被刪除,因為它已被使用</string>
<string name="currency_can_not_deleted">貨幣不能被刪除,因為它已被使用</string>
<string name="category_can_not_deleted">類型不能被刪除,因為它已被使用</string>
<!-- transaction list periods -->
<string name="all_transaction">所有交易紀錄</string>
<string name="today">今日</string>
<string name="last7days">最近7天</string>
<string name="last15days">最近2週</string>
<string name="current_month">本月</string>
<string name="current_year">今年</string>
<string name="future_transactions">未來的交易</string>
<string name="show_transaction">顯示交易紀錄</string>
<string name="changelog">更新日誌</string>
<string name="transaction_number">交易編號</string>
<string name="widget_summary">摘要</string>
<string name="widget_all_accounts">所有帳戶</string>
<string name="widget_add_transaction">新增交易</string>
<!-- Recurring Transactions -->
<string name="none">無</string>
<string name="once">只有一次</string>
<string name="weekly">每週</string>
<string name="bi_weekly">雙週</string>
<string name="monthly">每月</string>
<string name="bi_monthly">雙月</string>
<string name="quaterly">每季</string>
<string name="half_year">每半年</string>
<string name="yearly">每年</string>
<string name="four_months">每四個月</string>
<string name="four_weeks">每四週</string>
<string name="daily">每日</string>
<string name="in_x_days">再 (x) 日</string>
<string name="in_x_months">再 (x) 月</string>
<string name="every_x_days">每 (x) 日</string>
<string name="every_x_months">每 (x) 月</string>
<string name="repeating_empty_transaction">發現任何循環交易,請點擊綠色加號按鈕新增。</string>
<string name="inactive">未啟用</string>
<string name="activates">啟動</string>
<string name="days_overdue">日 - 過期</string>
<string name="days_remaining">日 - 到期</string>
<string name="new_edit_repeating_transaction">新增/編輯定期交易</string>
<string name="due_date">到期日期</string>
<string name="next_occurrence">下次到期日</string>
<string name="payment_date">付款日期</string>
<string name="repeats">重複類型</string>
<string name="occurs">週期</string>
<string name="payments_left">剩餘付款</string>
<string name="payments_left_required">需要付款左值</string>
<string name="due_date_required">到期日期是必填的。</string>
<string name="error_next_occurrence_not_populate">需要下次到期的交易</string>
<string name="enter_next_occurrence">確認下次交易</string>
<string name="skip_next_occurrence">跳過下次交易</string>
<string name="skip_next_occurrence_confirmation">您想要跳過下一事件嗎?</string>
<string name="notification_repeating_transaction_expired">有過期的定期交易</string>
<string name="notification_click_to_check_repeating_transaction">點擊以檢查逾期交易</string>
<string name="num_repeating_transaction_expired">%1$d 定期交易過期</string>
<string name="skip">略過</string>
<string name="enter">輸入</string>
<string name="enter_amount">輸入金額</string>
<!-- 20121121 -->
<string name="send_feedback">傳送建議</string>
<!--<string name="send_us_your_feedback">Send us your feedback</string>-->
<!-- 20121122 -->
<string name="preferences_info_application">關於</string>
<string name="preferences_security">安全</string>
<string name="preferences_active_passcode">啟用密碼</string>
<string name="enter_your_passcode">輸入你的密碼</string>
<string name="reinsert_your_passcode">重新輸入您的新密碼</string>
<string name="passocde_no_macth">密碼不匹配</string>
<string name="preferences_edit_passcode">編輯密碼</string>
<string name="preferences_disable_passcode">取消密碼</string>
<string name="enter_your_previous_passcode">輸入你的前次密碼</string>
<!--<string name="passcode_update">passcode is updated</string>-->
<string name="passcode_not_update">密碼未更新</string>
<!-- 20121217 -->
<string name="lookups_wildcard">搜尋時可用 % 作為萬用字元</string>
<string name="income_vs_expenses_current_month">損益表: 本月</string>
<string name="income">收入</string>
<string name="expenses">支出</string>
<string name="difference">結餘</string>
<string name="no_data">找不到紀錄,請調整可視範圍或點擊綠色加號按鈕新增。 </string>
<string name="no_stock_data">沒有可用於此帳戶的股票資料。</string>
<string name="month">月</string>
<string name="year">年</string>
<string name="menu_reports">報表</string>
<string name="menu_report_income_vs_expenses">損益表</string>
<string name="total">總計</string>
<!--<string name="option">Option</string>-->
<string name="all_time">全部</string>
<string name="last_month">前一個月</string>
<string name="last30days">最近30天</string>
<string name="last_year">前一年</string>
<!-- 20130106 -->
<!--<string name="result">Result</string>-->
<string name="number_transaction_found">交易次數: %1$d</string>
<!-- 20130108 -->
<string name="date_format">日期格式</string>
<string name="financial_year_start_day">會計年度:起日</string>
<string name="financial_year_start_month">會計年度:起月</string>
<!--<string name="release_date">Release Date</string>-->
<!-- 20130121 -->
<string name="menu_move_database_to_external_storage">匯出資料庫</string>
<string name="database_has_been_moved">資料庫已移動: %1$s</string>
<string name="copy_database_on_external_storage_failed">複製資料庫到外部儲存空間失敗</string>
<string name="path_database_using">你的資料庫儲存在: %1$s</string>
<!-- Split Categories -->
<string name="split_transaction">拆分交易</string>
<!--<string name="split_category">Split Category</string>-->
<string name="split">拆分</string>
<string name="error_split_transaction_empty">需要至少一筆拆分交易</string>
<string name="swipe_to_dismiss">滑動要刪除的專案。</string>
<string name="export_data_to_csv">將資料匯出到 CSV 檔</string>
<string name="export_data_in_progress">匯出資料中,請稍候...</string>
<string name="export_file_complete">資料已成功匯出到 %1$s</string>
<string name="export_file_failed">匯出檔案 %1$s 失敗</string>
<!-- 20130220 -->
<string name="donate_header">MoneyManagerEx for Android 是免費軟體。如果您喜歡本程式,您可以捐款支援開發團隊。</string>
<string name="donate_in_app_title">Google Play In-App Billing</string>
<string name="donate_in_app_description">透過 Google Play In-App Billing 捐款</string>
<string name="donate_in_app_spinner_text">選擇捐款金額</string>
<string name="donate_in_app_button">捐款</string>
<string name="donate_thank_you">感謝你的捐款!</string>
<string name="donate">捐款</string>
<string name="no_thanks">不,謝謝</string>
<string name="donate_exlamation">捐款!</string>
<string name="donate_direct">您可以透過我們 APP 網站上的捐款連結捐款,點此開啟於瀏覽器。</string>
<string name="donate_bitcoin">現在,我們也接受比特幣捐贈。</string>
<string name="donate_license">由於 Google 授權限制,我們不允許在 APP 內放置直接捐贈的連結。</string>
<string name="donate_button_text">捐款</string>
<string name="homepage_button">開啟首頁</string>
<!-- 20130225 -->
<string name="android_sqlite_vesion">SQLite 版本</string>
<!-- 20130301 -->
<!--<string name="sort">Sort</string>-->
<string name="ascending">順序</string>
<string name="descending">反序</string>
<string name="sorting_month">月排序</string>
<!-- 20130305 -->
<string name="last_modified">上次異動</string>
<!--<string name="select_dropbox_file">Select Dropbox Remote File</string>-->
<string name="dont_show_again">不要再顯示</string>
<string name="open_database">開啟資料庫</string>
<string name="synchronization_interval">同步時間間隔</string>
<string name="summary_synchronization_interval">同步週期為何?</string>
<!--<string name="tips_title_new_version_dropbox">New version of Dropbox</string>-->
<string name="tips_new_version_dropbox">Money Manager Ex for Android 1.2.0版修改了同步 Dropbox 的機制,已使用同步 Dropbox 的使用者必須重新設定。\nDropbox 與資料庫同步的設定,在設定選單中。\n自 Money Manager Ex for Android 1.2.0版開始能自動和 Dropbox 同步資料庫。</string>
<!-- 20130426 -->
<string name="title_transaction_shown_balance">顯示每筆交易金額</string>
<string name="summary_transaction_shown_balance">顯示每筆交易金額,這會使本程式顯示地非常慢</string>
<string name="menu_open_database">開啟資料庫</string>
<string name="database">資料庫</string>
<string name="tips">提示</string>
<string name="title_application_font">字型</string>
<string name="summary_application_font">選擇字型</string>
<string name="title_application_font_size">字型大小</string>
<string name="summary_application_font_size">選擇字型大小</string>
<string name="micro">微小</string>
<string name="small">小</string>
<string name="Default">預設</string>
<string name="medium">中</string>
<string name="large">大</string>
<!-- 20130606 -->
<string name="menu_report_where_money_goes">支出</string>
<string name="menu_report_where_money_comes_from">收入</string>
<!-- 20130728 -->
<string name="title_check_repeating_transaction">通知</string>
<string name="summary_check_repeating_transaction">何時檢查是否有定期交易逾期?(預設 08:00)</string>
<!-- 20130730 -->
<string name="credits">鳴謝</string>
<string name="libraries">程式庫</string>
<!--<string name="about_thirdsparty_credits_title">Special Thanks and 3rd party libraries used</string>-->
<!-- 20130801 -->
<string name="top_withdrawals_last_30_days">支出最多之類型: 最近30天</string>
<string name="top_payees_last_30_days">交易金額最多之受帳人: 最近30天</string>
<!--<string name="transaction_statistics">Transaction Statistics</string>-->
<string name="upcoming_transactions">即將到來的交易項目</string>
<string name="quantity">次數</string>
<string name="dashboard">統計表板</string>
<!-- 20130808 -->
<!--<string name="dropbox_application_restart_between_seconds">You download a newer version of the database from Dropbox. Between %1$d seconds, the application reload new data</string>-->
<string name="last3months">最近3月</string>
<string name="last6months">最近6月</string>
<!-- 20130816 -->
<string name="empty_category">無類型</string>
<string name="empty_payee">無受帳人</string>
<!-- 20130831 -->
<string name="help">說明</string>
<!-- 20130927 -->
<string name="delete_repeating_transaction">刪除重複的定期交易</string>
<!-- 20131007 -->
<!--<string name="bank_accounts_total">Bank Accounts Total</string>-->
<!--<string name="term_accounts_total">Term Accounts Total</string>-->
<!-- 20131104 -->
<string name="last">最後</string>
<string name="accounts">帳戶</string>
<string name="to_account">到帳戶</string>
<string name="from_account">從帳戶</string>
<string name="default_status">預設狀態</string>
<string name="default_payee">預設受帳人</string>
<string name="edit_transaction">編輯交易</string>
<string name="delete_one_selected_transaction">你確定要刪除所選的交易紀錄?</string>
<string name="delete_others_selected_transaction">你確定要刪除所選的 %d 筆交易紀錄?</string>
<string name="categories">類型</string>
<string name="payees">受帳人</string>
<string name="recurring_transactions">循環交易</string>
<string name="theme_holo_light">Holo Light</string>
<string name="new_account">新增帳戶</string>
<string name="create_new_account">建立新帳戶</string>
<string name="amount_greater_or_equal">金額大於或等於</string>
<string name="amount_from">最小金額</string>
<string name="amount_less_or_equal">金額小於或等於</string>
<string name="amount_to">最大金額</string>
<string name="reset">重設</string>
<string name="result_search">您搜尋的結果</string>
<string name="new_repeating_transaction">新增定期交易</string>
<string name="edit_repeating_transaction">編輯定期交易</string>
<string name="path_database_not_exists">資料庫路徑不存在</string>
<string name="database_can_not_open_write">該資料庫無法開啟以寫入</string>
<string name="time_frame">時間框架</string>
<string name="show_chart">顯示圖表</string>
<string name="add_transaction">新增交易</string>
<string name="welcome_header">歡迎使用 MoneyManagerEx</string>
<string name="welcome_body">MoneyManagerEx 的全部交易均是基於帳戶的。\n\n目前無可視帳戶,請在設定中調整過濾條件以檢視帳戶或在下方選擇1個選項。</string>
<string name="welcome_body_dropbox">如果您已經在 Windows 、 Linux 或 Mac 上使用 MoneyManagerEx,將此程式連結到 Dropbox 可以同步您的資料庫</string>
<string name="configure_sync">配置同步</string>
<!-- 20140115 -->
<string name="search_text_contain_title">由文字內容搜尋,且不是以文字開頭的文件</string>
<string name="search_text_contain_summary">由內容而非起始的文字搜尋受帳人、類型、貨幣等</string>
<string name="rate_application">幫我們評分</string>
<string name="withdrawal_from">由 %1$s 匯出</string>
<string name="deposit_to">匯入到 %1$s</string>
<string name="mmex_website">MoneyManagerEx 網站</string>
<string name="android_website">MMEx Android 版官網</string>
<string name="donate_in_app_already_donate">您已經捐款支持 MoneyManagerEx for android 的開發! \n\n開發團隊感謝您!</string>
<string name="donate_in_app_retrieving_status">正由 Google Play 檢查您的捐贈情形。請稍候…</string>
<string name="donate_in_app_error">無法透過應用程式支付。請檢查是否安裝了最新版本的 Google Play 商店。</string>
<string name="title_notifications_repeating_transaction">定期交易逾期通知</string>
<string name="summary_notifications_repeating_transaction">顯示定期交易逾期通知</string>
<string name="tools">工具</string>
<string name="entities">實體</string>
<string name="loading">正在載入...</string>
<string name="grand_total">總計</string>
<string name="change_status">更改狀態</string>
<string name="duplicate_selected_transactions">複製交易紀錄</string>
<string name="sort">排序</string>
<string name="sort_order">排序規則</string>
<string name="sort_by_name">按名稱排序</string>
<string name="sort_by_usage">按使用方式排序</string>
<string name="choose_sorting">選擇排序</string>
<string name="credit_card">信用卡</string>
<string name="cash_accounts">現金帳戶</string>
<string name="bank_accounts">銀行帳戶</string>
<string name="term_accounts">定期存款帳戶</string>
<string name="credit_card_accounts">信用卡帳戶</string>
<string name="montly_last_days">每月 (最後一天)</string>
<string name="montly_last_bussines_day">每月 (最後一個工作日)</string>
<!-- languages -->
<string name="locale_application">應用程式語言</string>
<string name="locale_ar">阿拉伯文</string>
<string name="transaction_cancel_confirm">你確實要放棄所有修改嗎?</string>
<string name="keep_editing">繼續編輯</string>
<string name="discard">放棄</string>
<string name="invalid_expression">運算式有誤</string>
<string name="send_me_logcat">Logcat</string>
<string name="due_today">今天到期</string>
<string name="issues_tracker">GitHub 問題追蹤區</string>
<string name="action_settings">設定</string>
<string name="close">關閉</string>
<string name="tutorial_accounts_1">多種帳戶類型: 支票、存摺、 信用卡、 資產和投資。</string>
<string name="tutorial_accounts_2">向左滑以繼續......</string>
<string name="financial_overview">財務概況</string>
<string name="tutorial_overview_1">快速概述儀表板,預算及自訂報告。</string>
<string name="global">全域</string>
<string name="tutorial_global_1">多種貨幣與語言。開放原始碼。加入我們的翻譯團隊。</string>
<string name="tutorial_sync_1">支援多種平臺,透過 Dropbox 同步資料。匯入及匯出資料到其他應用程式。</string>
<string name="transactions">交易紀錄</string>
<string name="tutorial_transactions_1">存款、 取款、 轉帳。提醒定期交易。</string>
<string name="split_category">-多類別-</string>
<string name="title_activity_currency_chart">貨幣匯率表</string>
<string name="sort_by_ascending">按年份和月份昇冪排序</string>
<string name="sort_by_desceding">按年份和月份降冪排序</string>
<string name="years">年</string>
<string name="select_the_years_to_be_displayed">選擇要顯示的年</string>
<string name="to_date">終止日</string>
<string name="from_date">啟始日</string>
<string name="custom_dates">自訂日期</string>
<string name="pref_transaction_hide_reconciled_amounts_summary">隱藏各帳戶儀表板上的已確認金額。</string>
<string name="pref_transaction_hide_reconciled_amounts_title">隱藏已確認的金額</string>
<string name="pref_transaction_sort_by_type_summary">按交易類型安排日常交易 (押金、轉帳、提款)</string>
<string name="pref_transaction_sort_by_type_title">按類型對交易記錄排序</string>
<string name="warning">警告</string>
<string name="no_transfer_splits">您已經選擇變更為轉帳,但此交易紀錄有多重類別。要繼續並刪除多重類別嗎?</string>
<string name="qif_export">匯出 Qif</string>
<string name="update_prices">更新價格</string>
<string name="update_price">更新價格</string>
<string name="download_price">下載價格</string>
<string name="edit_price">編輯價格</string>
<string name="price_updated">價格已更新</string>
<string name="all_prices_updated">所有價格都已都更新。</string>
<string name="download_complete">下載完成。</string>
<string name="confirm_price_download">你想要更新線上安全價格嗎?</string>
<string name="starting_price_update">下載價格中,請稍候...</string>
<string name="database_migrate_14_to_20">從 v1.4 搬移資料庫</string>
<string name="database_migrate_14_to_20_explanation">已找到舊資料庫,點擊此處以使用您以前的資料庫。</string>
<string name="database_migrate_14_to_20_failure">資料庫搬移失敗。請聯繫支援。</string>
<string name="database_migrate_14_to_20_success">資料庫搬移成功。</string>
<string name="database_migrate_14_to_20_complete">搬移資料庫已完成,請關閉設定後開始使用這個版本的資料庫</string>
<string name="database_migrate_14_to_20_intro">在舊位置發現資料庫。請點擊下面的按鈕搬移資料庫到 SD 卡上使用。</string>
<string name="clear_recent_files_list">清除最近使用的檔案</string>
<string name="export_prices">匯出價格</string>
<string name="purge_history">清除價格歷史記錄</string>
<string name="purge_history_confirmation">你想要刪除所有帳戶價格歷史記錄嗎?</string>
<string name="purge_history_complete">價格歷史記錄已被清除。</string>
<string name="purge_history_failed">價格歷史記錄不可清除。</string>
<string name="create_db">建立資料庫</string>
<string name="create_db_summary">建立一個新的資料庫檔案</string>
<string name="create_db_hint">請提供檔案名稱</string>
<string name="create_db_dialog_content">資料庫將建立在預設的目錄中,可以忽略副檔名 (.mmb)。</string>
<string name="create_db_success">資料庫建立成功</string>
<string name="create_db_error">無法建立新的資料庫檔案</string>
<string name="create_db_exists">同名的資料庫已存在 !</string>
<string name="db_check_integrity">檢查資料庫完整性</string>
<string name="db_check_integrity_summary">執行資料庫檔案完整性檢查</string>
<string name="db_check_integrity_success">資料庫通過完整性檢查。</string>
<string name="db_check_integrity_error">錯誤: 資料庫檔案已損壞!</string>
<string name="db_check_schema">檢查資料庫schema</string>
<string name="db_check_schema_summary">請檢查全部的資料表都在資料庫中。</string>
<string name="db_check_schema_success">需要的資料表都在資料庫中</string>
<string name="db_check_schema_error">錯誤: 資料庫中找不到資料表 !</string>
<string name="db_fix_duplicates">修正重複紀錄</string>
<string name="split_amount_negative">總金額不能為負的。</string>
<string name="select_all">全選</string>
<string name="choose_type">選擇類型</string>
<string name="default_account">預設帳戶</string>
<string name="default_account_summary">輸入新交易時使用的帳戶。</string>
<string name="default_account_not_set">未設置預設帳戶。</string>
<string name="balance_account">結算帳戶</string>
<string name="balance_adjustment">平衡調整</string>
<string name="cash">現金</string>
<string name="select_account">選擇帳戶</string>
<string name="invalid_transaction_number">無效的交易號碼</string>
<string name="budgets">預算</string>
<string name="budget">預算</string>
<string name="budget_list">預算清單</string>
<string name="actual">實際</string>
<string name="base_currency_not_set">預設貨幣尚未設定</string>
<string name="error">錯誤</string>
<string name="unhandled_crash">發生意外的錯誤,請將 log 寄給我們。</string>
<string name="title_activity_currency_rates_report">貨幣匯率</string>
<string name="frequency">頻率</string>
<string name="update_available">有可用更新</string>
<string name="update_available_online">有一個更新的資料庫檔案線上可用。要更新嗎?</string>
<string name="currency_not_found">無法找到該貨幣</string>
<string name="homepage">我們的網站首頁是 http://android.moneymanagerex.org/</string>
<string name="current_database">當前資料庫</string>
<string name="about_logcat_header">您可點擊下方按鈕將應用程式日誌傳送給我們。</string>
<string name="transaction_type_filter">按交易種類篩選</string>
<string name="status_filter">按狀態過濾</string>
<string name="filter_options_info">篩選選項和資訊</string>
<!-- Password entry activity -->
<string name="title_activity_password">輸入資料庫密碼</string>
<string name="income_expense_period">收入/支出期間</string>
<string name="income_expense_period_summary">在主頁面底部顯示收入/支出概述。</string>
<string name="appwidget_text">範例</string>
<string name="configure">配置</string>
<string name="add_widget">新增小工具</string>
<string name="single_account">單一帳戶</string>
<string name="watchlist">觀察名單</string>
<!-- edit investment transaction -->
<string name="purchase_date">購買日期</string>
<string name="stock_name">股票名稱</string>
<string name="symbol">符號</string>
<string name="number_of_shares">股份數目</string>
<string name="purchase_price">購買價格</string>
<string name="current_price">目前價格</string>
<string name="price_date">價格日期</string>
<string name="commission">手續費</string>
<string name="value">價值</string>
<string name="view_transactions">查看交易紀錄</string>
<string name="error_downloading_symbol">下載價格錯誤</string>
<string name="error_updating_rates">更新費率時出錯</string>
<string name="error_no_price_found_for_symbol">沒有為符號找到價格</string>
<string name="other">其他</string>
<string name="cleared">已清除</string>
<string name="delete_success">已刪除</string>
<!-- asset allocation -->
<string name="asset_allocation">資產分配</string>
<string name="asset_classes_empty">未定義任何資產類別。要創建一個, 點擊綠色加號按鈕。</string>
<string name="title_activity_asset_class_edit">編輯資產類別</string>
<string name="asset_class_name">資產類別名稱</string>
<string name="asset_class">資產類別</string>
<string name="allocation">配置</string>
<string name="current_allocation">當前分配</string>
<string name="move_up">上移</string>
<string name="move_down">下移</string>
<string name="securities">安全</string>
<string name="no_records_found_create">未發現任何紀錄,請點擊綠色加號按鈕新增。</string>
<string name="current_value">目前的值</string>
<string name="current">當前</string>
<string name="parent">上層目錄:</string>
<string name="name">名稱</string>
<string name="stock">股票</string>
<string name="all_accounts">所有帳戶</string>
<string name="records">紀錄</string>
<!-- db password entry -->
<string name="enter_password">輸入密碼</string>
<string name="success">操作成功</string>
<string name="overview">概述</string>
<string name="title_activity_asset_allocation_overview">資產分配概覽</string>
<string name="asset_allocation_diff_threshold">資產分配差異閾值</string>
<string name="asset_allocation_diff_threshold_summary">將觸發差異值著色的閾值。</string>
<string name="error_saving_record">儲存紀錄時出錯</string>
<string name="error_loading_currency">載入貨幣時出錯</string>
<string name="symbol_required">符號是必需的</string>
<string name="recurrence_type_not_set">未設置定期類型</string>
<string name="invalid_recurrence_type">不正確定期類型</string>
<string name="account_not_found">找不到該帳戶</string>
<string name="favourite">最愛</string>
<string name="split_reset_notice">請注意, 此事務中有多個拆分類別。您需要手動刪除它們。</string>
<!-- budgets -->
<string name="add_budget">添加預算</string>
<string name="budget_name">預算名稱</string>
<string name="budget_year">預算年度</string>
<string name="budget_month">預算月份</string>
<string name="copy">複制</string>
<string name="app_restart">應用程式現在將關閉以應用更改。請重新開機。</string>
<string name="print">列印</string>
<string name="min_19">您至少需要 Android 4.4 才能列印文檔。</string>
<string name="save_as_html">儲存 HTML</string>
<string name="no_network">沒有可用的資源。</string>
<!-- Currencies -->
<string name="currencies">貨幣</string>
<string name="currencies_used">使用的貨幣</string>
<string name="open_currencies">開放貨幣</string>
<string name="import_all_currencies">匯入貨幣</string>
<string name="import_currencies_in_progress">匯入貨幣中,請稍候...</string>
<string name="question_import_currencies">你要匯入貨幣嗎?</string>
<string name="start_currency_exchange_rates">更新匯率中,請稍候...</string>
<string name="update_currency_exchange_rates">更新匯率:\n%1$s</string>
<string name="success_currency_exchange_rates">已更新所有的貨幣匯率</string>
<string name="update_menu_currency_exchange_rates">更新匯率</string>
<string name="question_update_currency_exchange_rates">你想要更新匯率嗎?</string>
<string name="error_update_currency_exchange_rate">更新匯率時發生錯誤。</string>
<string name="currencies_empty">未發現任何貨幣,請點擊綠色加號按鈕新增。</string>
<string name="active_currencies">有效貨幣</string>
<string name="inactive_currencies">非活動貨幣</string>
<string name="all_currencies">所有貨幣</string>
<string name="show_only_used">僅顯示所用</string>
<!-- Investment -->
<string name="portfolio">資料夾</string>
<string name="change_provider">更改提供程式</string>
<string name="quote_provider">報價供應商</string>
<string name="exchange_rate_provider">換匯率 / 價格</string>
<!-- deprecated / Dropbox -->
<!--<string name="dropbox">Dropbox</string>-->
<string name="dropbox_database_can_be_updted">Dropbox 裡的資料庫有更新</string>
<string name="dropbox_file_ready_for_use">您的資料庫已被下載</string>
<string name="dropbox_open_database_downloaded">若要使用資料庫下載,點擊開啟資料庫</string>
<string name="click_to_select_file_dropbox">選擇連結至 Dropbox 的檔案</string>
<string name="download_from_drobpox">從 Dropbox 下載</string>
<string name="summary_download_from_drobpox">點擊後從 Dropbox 資料夾手動下載連結的檔</string>
<string name="upload_to_drobpox">上傳到 Dropbox</string>
<string name="summary_upload_to_drobpox">點擊後手動上傳連結的檔案到 Dropbox 資料夾</string>
<string name="dropbox_how_it_works">收存箱如何為理財經理工作?</string>
<string name="dropbox_link">連結至 Dropbox</string>
<string name="dropbox_unlink">斷開 Dropbox 連結</string>
<string name="dropbox_downloadProgress">由 Dropbox 下載檔案中,請稍候…</string>
<string name="dropbox_uploadProgress">上傳檔案至 Dropbox 中,請稍候…</string>
<string name="dropbox_linkedFile">收存箱檔</string>
<string name="dropbox_file_summary_all">檔在收存箱的任何地方</string>
<string name="db_not_dropbox">當前資料庫未同步。請設置收存箱同步。</string>
<!-- Synchronization -->
<string name="synchronization">同步</string>
<string name="sync_enabled">啟用同步</string>
<string name="sync_provider">提供者</string>
<string name="remote_file">遠端檔案</string>
<string name="please_wait">請稍候</string>
<string name="invalid_database">此擴展不被確認為有效的資料庫。</string>
<string name="reset_preferences">重置設定</string>
<string name="preferences_reset">已重置同步首選項。</string>
<string name="cloud_download">從雲存儲下載資料庫檔案。</string>
<string name="cloud_upload">將資料庫檔案上載到雲存儲。</string>
<string name="sync_notification_title">貨幣管理器前同步</string>
<string name="sync_downloading">正在下載資料庫。請稍候。。。</string>
<string name="sync_uploading">正在上載資料庫。請稍候。。。</string>
<string name="syncProgress">正在同步檔。請稍候。。。</string>
<string name="database_is_synchronized">資料庫是最新的</string>
<string name="upload_file_complete">您的資料庫已成功上載</string>
<string name="every_5_minutes">每隔 5 分鐘</string>
<string name="every_10_minutes">每10分鐘</string>
<string name="every_15_minutes">每隔 15 分鐘</string>
<string name="every_30_minutes">每隔 30 分鐘</string>
<string name="every_hour">每小時</string>
<string name="every_2_hours">每隔 2 小時</string>
<string name="every_3_hours">每3小時</string>
<string name="every_6_hours">每隔 6 小時</string>
<string name="every_12_hours">每隔 12 小時</string>
<string name="never">永遠不要</string>
<string name="checking_remote_for_changes">正在檢查遠端存放以進行資料庫修改。</string>
<string name="title_sync_upload_immediate">更改後立即上載資料庫</string>
<string name="summary_sync_upload_immediate">此選項允許在更改資料庫後自動上載</string>
<string name="dropbox_empty_folder">在收存箱/應用程式/金錢經理的資料夾前 Android 是空的。如果已使用 MoneyManagerEx 將資料庫複製到電腦中的此資料夾, 則在進行刷新之後。</string>
<string name="select_remote_file">從雲存儲中選擇一個遠端檔</string>
<string name="confirm_download">要立即下載遠端檔嗎?</string>
<string name="file_exists">檔存在</string>
<string name="file_exists_long">本機存放區中已存在同名檔。是否要改寫此檔?</string>
<string name="synchronization_disabled">同步被禁用。</string>
<string name="filenames_differ">遠端和本地檔案名不同。正在中止同步。</string>
<string name="both_files_modified">本地和遠端資料庫檔都已修改!</string>
<string name="sync_conflict">同步衝突</string>
<string name="no_remote_file">請選擇要用於同步的遠端檔。</string>
<!-- Warnings -->
<string name="no_accounts_available_for_selection">沒有可供選擇的帳戶。請調整帳戶篩選的首選項, 或將某些帳戶標記為 \"收藏\"。</string>
<!-- Errors -->
<string name="error_parsing_value">分析輸入的值時出錯</string>
<string name="remote_file_not_found">找不到遠端檔</string>
<string name="error_checking_remote">檢查遠端更改時出錯。</string>
<string name="no_remote_change_date">在中繼資料中找不到遠端更改日期。</string>
<!-- Select database screen -->
<string name="intro_text">要開始使用貨幣管理器 Ex, 您需要有一個資料庫檔案來存儲您的資料。請選擇下面的可用選項之一。</string>
<string name="intro_create_db">您可以創建一個新檔並設置初始首選項。</string>
<string name="intro_open_db">也可以從設備中選擇現有檔。</string>
<string name="intro_sync">或者, 您可以設置與雲服務的同步, 並從連線存儲中下載資料庫檔案以啟動。</string>
<!-- Create Database screen -->
<string name="select_language">選擇語言</string>
<string name="run">運行錢經理前</string>
<string name="create_db_info_1">預設的資料庫位置為:</string>
<!-- Settings -->
<string name="per_database_settings">每個資料庫</string>
<string name="save">儲存</string>
<string name="title_budget_show_simple_view">顯示簡單預算視圖</string>
<string name="summary_budget_show_simple_view">如果選中的預算使用簡化的視圖</string>
</resources>
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {
CloudError,
ContainerExecRequest,
ContainerExecRequestTerminalSize,
ContainerExecResponse,
Logs
} from "../models/mappers";
| {
"pile_set_name": "Github"
} |
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
slug: MyString
message: MyString
two:
slug: MyString
message: MyString
| {
"pile_set_name": "Github"
} |
alter table ACT_RE_PROCDEF add column ENGINE_VERSION_ varchar(255);
update ACT_RE_PROCDEF set ENGINE_VERSION_ = 'activiti-5';
alter table ACT_RE_DEPLOYMENT add column ENGINE_VERSION_ varchar(255);
update ACT_RE_DEPLOYMENT set ENGINE_VERSION_ = 'activiti-5';
alter table ACT_RU_EXECUTION add column ROOT_PROC_INST_ID_ varchar(64);
create index ACT_IDX_EXEC_ROOT on ACT_RU_EXECUTION(ROOT_PROC_INST_ID_);
alter table ACT_RU_EXECUTION drop foreign key ACT_FK_EXE_PARENT;
alter table ACT_RU_EXECUTION add constraint ACT_FK_EXE_PARENT foreign key (PARENT_ID_) references ACT_RU_EXECUTION (ID_) on delete cascade;
alter table ACT_RU_EXECUTION drop foreign key ACT_FK_EXE_SUPER;
alter table ACT_RU_EXECUTION add constraint ACT_FK_EXE_SUPER foreign key (SUPER_EXEC_) references ACT_RU_EXECUTION (ID_) on delete cascade;
update ACT_GE_PROPERTY set VALUE_ = '6.0.0.0' where NAME_ = 'schema.version';
| {
"pile_set_name": "Github"
} |
\chapter{Visualizing 2D interpolation}
% Authors: Pedro Manuel Herrero Vidal, Doruk Kilitcioglu
% Lecture date: 2/27/2019
We take the data simulated in the 04-spiral\_classification notebook (\href{https://github.com/Atcold/pytorch-Deep-Learning-Minicourse/blob/master/04-spiral\_classification.ipynb} {"Spiral Classification"}),
consisting of 3,000 samples of dimension 2 (Fig. ~\ref{fig:NonLinearlySeparableParametricCurves2}).
The data is generated from the following expression:
\[
X_c(t) = t
\begin{bmatrix}
\sin{\frac{2\pi}{C} (2t+c+1) + \mathcal{N} (0, \sigma^2)} \\
\cos{\frac{2\pi}{C} (2t+c+1) + \mathcal{N} (0, \sigma^2)}
\end{bmatrix}
\]
%\noindent
where $0 \leq t \leq 1$ and classes $c=1, ..., C$.
\begin{figure}[ht]
\centering
\includegraphics[width=0.5\textwidth]{figs/NonLinearlySeparableParametricCurves.png}
\caption{3 non linearly separable curves consisting in 3,000 samples from $X \in {{\rm I\!R}}^2$.}
\label{fig:NonLinearlySeparableParametricCurves2}
\end{figure}
\noindent
To classify the data into the three categories, we are going to use a three layer net with:
\begin{itemize}
\item[(1)] 2 input units (dimensionality of the data).
\item[(2)] A 100-units hidden layer (used to increase the space and extract features).
\item[(3)] Followed by a non-linear ReLU activation function.
\item[(4)] We then go back down to 2D again which is useful for visualization.
\item[(5)] Lastly we can bring it back up to 3D with a final linear transformation to a 3-unit output layer with softmax activation function for classification
(Fig. ~\ref{fig:ArchitectureForClassificationAndVisualizationInTheInputSpace}).
The last linear transformation involves the multiplication of $\matr{A^{(2)}}$ and $\matr{W^{(2)}}$,
where the different rows of $\matr{W^{(2)}}$ are the 2D vectors that will point at the different classes in the 2D space.
In this representation, the different classes are linearly separable.
\end{itemize}
\begin{figure}[!h]
\centering
\includegraphics[width=170mm]{figs/ArchitectureForClassificationAndVisualizationInTheInputSpace.png}
\caption{Neural network architecture for classification and visualization in the input space. (a) Architecture of the neural network, which takes 2D inputs and visualizes in the same dimensional space before classification. (b) Linear transformation that takes $\matr{A^{(2)}}$ and returns $\matr{A^{(3)}}$ via multiplication with $\matr{W^{(2)}}$. Rectangular color boxes in $\matr{W^{(2)}}$ represent the three 2D vectors that will define each class. Calculation of $\matr{A^{(3)}}$ is followed by a softmax activation function for classification. In the bottom half of (b), the transformed data after and the population vectors (plot credit: Alfredo Canziani).}
\label{fig:ArchitectureForClassificationAndVisualizationInTheInputSpace}
\end{figure}
\noindent
In order to visualize each transformation, we do a linear interpolation from the input to the output at the 2D hidden layer using:
\[
(1-\alpha)(x^{(1)}) + \alpha \phi (x^{(i)}) ~~\text{ where } 0 \leq \alpha \leq 1
\]
| {
"pile_set_name": "Github"
} |
/*-
* <<
* Moonbox
* ==
* Copyright (C) 2016 - 2019 EDP
* ==
* 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 moonbox.application.batch.hive
import java.io.PrintStream
import java.util
import moonbox.common.{MbConf, MbLogging}
import org.apache.hadoop.hive.common.io.CachingPrintStream
import org.apache.hadoop.hive.conf.HiveConf
import org.apache.hadoop.hive.ql.Driver
import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse
import org.apache.hadoop.hive.ql.session.SessionState
object Main extends MbLogging {
def main(args: Array[String]) {
val conf = new MbConf()
val keyValues = for (i <- 0 until(args.length, 2)) yield (args(i), args(i+1))
var driverId: String = null
var org: String = null
var username: String = null
var sqls: Seq[String] = null
keyValues.foreach {
case (k ,v) if k.equals("org") =>
org = v
case (k ,v) if k.equals("username") =>
username = v
case (k, v) if k.equals("sqls") =>
sqls = v.split(";")
case (k, v) if k.equals("driverId") =>
driverId = v
case (k, v) =>
conf.set(k, v)
}
new Main(conf, driverId, org, username, sqls).runMain()
}
}
class Main(conf: MbConf, driverId: String, org: String, username: String, sqls: Seq[String]) {
import scala.collection.JavaConversions._
def runMain(): Unit = {
val hiveConf = new HiveConf(classOf[SessionState])
hiveConf.set("fs.defaultFS", "hdfs://master:8020")
hiveConf.set("dfs.nameservices", "moonbox")
hiveConf.set("dfs.ha.namenodes.moonbox", "nn1,nn2")
hiveConf.set("dfs.namenode.rpc-address.moonbox.nn1", "master:8020")
hiveConf.set("dfs.namenode.rpc-address.moonbox.nn2", "slave1:8020")
hiveConf.set("dfs.permissions.enabled", "false")
hiveConf.set("dfs.client.failover.proxy.provider.moonbox", "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider")
hiveConf.set("javax.jdo.option.ConnectionURL", "jdbc:mysql://10.143.131.38:3306/hive_test3")
hiveConf.set("javax.jdo.option.ConnectionDriverName", "com.mysql.jdbc.Driver")
hiveConf.set("javax.jdo.option.ConnectionUserName", "root")
hiveConf.set("javax.jdo.option.ConnectionPassword", "123456")
hiveConf.set("mapred.job.name", driverId)
hiveConf.set("hive.stats.collect.tablekeys", "true")
hiveConf.set("hive.stats.collect.scancols", "true")
// hiveConf.set("hive.exec.mode.local.auto", "false")
hiveConf.set("hive.exec.submit.local.task.via.child", "false")
hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "moonbox.application.hivenative.ExecutionHook")
val ss: SessionState = new SessionState(hiveConf, s"$org@$username")
ss.in = System.in
val out = new MbOutputStream()
ss.out = new PrintStream(out, true, "UTF-8")
ss.info = new PrintStream(out, true, "UTF-8")
ss.err = new CachingPrintStream(System.err, true, "UTF-8")
ss.initTxnMgr(hiveConf)
SessionState.start(ss)
SessionState.setCurrentSessionState(ss)
val driver: Driver = new Driver()
for (sql <- sqls) {
val run: CommandProcessorResponse = driver.run(sql)
if (run.getResponseCode == 0) {
val schema = driver.getSchema
if (schema.getFieldSchemas != null) {
println(schema.getFieldSchemas.map(fs => fs.getName + " " + fs.getType).mkString("\n"))
}
val result = new util.ArrayList[Object]()
driver.getResults(result)
println(result.mkString("\n"))
}
}
/*val ss: CliSessionState = new CliSessionState(hiveConf)
ss.in = System.in
val out = new MbOutputStream()
ss.out = new PrintStream(out, true, "UTF-8");
ss.info = new PrintStream(out, true, "UTF-8");
ss.err = new CachingPrintStream(System.err, true, "UTF-8")
SessionState.start(ss)
/*val oproc: OptionsProcessor = new OptionsProcessor()
val config = oproc.getHiveVariables
config.put("hive.query.name", driverId)*/
val cli: CliDriver = new CliDriver
//cli.setHiveVariables(config)
// use the specified database if specified
cli.processSelectDatabase(ss)
// Execute -i init files (always in silent mode)
cli.processInitFiles(ss)
cli.processLine(sqls.mkString(";"))*/
}
}
| {
"pile_set_name": "Github"
} |
#ifndef _SIMPLEJET_HPP
#define _SIMPLEJET_HPP
#include "Thruster.hpp"
namespace yasim {
// As simple a Thruster subclass as you can find. It makes thrust. Period.
class SimpleJet : public Thruster
{
public:
SimpleJet();
void setThrust(float thrust);
virtual bool isRunning();
virtual bool isCranking();
virtual void getThrust(float* out);
virtual void getTorque(float* out);
virtual void getGyro(float* out);
virtual float getFuelFlow();
virtual void integrate(float dt);
virtual void stabilize();
private:
float _thrust;
};
}; // namespace yasim
#endif // _SIMPLEJET_HPP
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// ignore_for_file: directives_ordering
library js_ast;
import 'precedence.dart';
// ignore: library_prefixes
import 'characters.dart' as charCodes;
part 'nodes.dart';
part 'builder.dart';
part 'printer.dart';
part 'template.dart';
| {
"pile_set_name": "Github"
} |
Python API
==========
HTTPolice can be used as a Python library:
for example, to analyze requests or responses as part of a test suite.
It is **not intended** to be used inside live production processes.
Example
-------
.. literalinclude:: api_example.py
API reference
-------------
.. autoclass:: httpolice.Request
:members: notices, silence
|
.. autoclass:: httpolice.Response
:members: notices, silence
|
.. autoclass:: httpolice.Exchange
:members: silence
.. attribute:: request
The :class:`~httpolice.Request` object passed to the constructor.
.. attribute:: responses
The list of :class:`~httpolice.Response` objects
passed to the constructor.
|
.. autofunction:: httpolice.check_exchange
|
.. autoclass:: httpolice.Complaint
:members: id, severity
|
.. autoclass:: httpolice.Severity
:members:
:undoc-members:
|
.. autofunction:: httpolice.text_report
|
.. autofunction:: httpolice.html_report
Integration helpers
-------------------
.. automodule:: httpolice.helpers
:members:
| {
"pile_set_name": "Github"
} |
package com.lmxdawn.him.common.entity.group;
import lombok.Data;
import java.util.Date;
/**
* table:group_msg
*/
@Data
public class GroupMsg {
/**
* 消息ID
*/
private Long msgId;
/**
* 群ID
*/
private Long groupId;
/**
* 发送消息的用户ID
*/
private Long senderUid;
/**
* 消息类型(0:普通文字消息,1:图片消息,2:文件消息,3:语音消息,4:视频消息)
*/
private Integer msgType;
/**
* 消息内容
*/
private String msgContent;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date modifiedTime;
}
| {
"pile_set_name": "Github"
} |
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1999-2020, The Alibaba Group Holding Ltd.
# This file is distributed under the same license as the mars package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: mars 0.5.0a2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-06-16 16:57+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.7.0\n"
#: ../../source/reference/tensor/generated/mars.tensor.dot.rst:2
msgid "mars.tensor.dot"
msgstr ""
#: mars.tensor.dot:1 of
msgid "Dot product of two arrays. Specifically,"
msgstr ""
#: mars.tensor.dot:3 of
msgid ""
"If both `a` and `b` are 1-D arrays, it is inner product of vectors "
"(without complex conjugation)."
msgstr ""
#: mars.tensor.dot:6 of
msgid ""
"If both `a` and `b` are 2-D arrays, it is matrix multiplication, but "
"using :func:`matmul` or ``a @ b`` is preferred."
msgstr ""
#: mars.tensor.dot:9 of
msgid ""
"If either `a` or `b` is 0-D (scalar), it is equivalent to "
":func:`multiply` and using ``numpy.multiply(a, b)`` or ``a * b`` is "
"preferred."
msgstr ""
#: mars.tensor.dot:12 of
msgid ""
"If `a` is an N-D array and `b` is a 1-D array, it is a sum product over "
"the last axis of `a` and `b`."
msgstr ""
#: mars.tensor.dot:15 of
msgid ""
"If `a` is an N-D array and `b` is an M-D array (where ``M>=2``), it is a "
"sum product over the last axis of `a` and the second-to-last axis of "
"`b`::"
msgstr ""
#: mars.tensor.dot of
msgid "Parameters"
msgstr ""
#: mars.tensor.dot:20 of
msgid "First argument."
msgstr ""
#: mars.tensor.dot:22 of
msgid "Second argument."
msgstr ""
#: mars.tensor.dot:24 of
msgid ""
"Output argument. This must have the exact kind that would be returned if "
"it was not used. In particular, it must have the right type, must be "
"C-contiguous, and its dtype must be the dtype that would be returned for "
"`dot(a,b)`. This is a performance feature. Therefore, if these conditions"
" are not met, an exception is raised, instead of attempting to be "
"flexible."
msgstr ""
#: mars.tensor.dot of
msgid "Returns"
msgstr ""
#: mars.tensor.dot:32 of
msgid ""
"**output** -- Returns the dot product of `a` and `b`. If `a` and `b` are"
" both scalars or both 1-D arrays then a scalar is returned; otherwise a "
"tensor is returned. If `out` is given, then it is returned."
msgstr ""
#: mars.tensor.dot of
msgid "Return type"
msgstr ""
#: mars.tensor.dot of
msgid "Raises"
msgstr ""
#: mars.tensor.dot:38 of
msgid ""
"If the last dimension of `a` is not the same size as the second-to-"
"last dimension of `b`."
msgstr ""
#: mars.tensor.dot:43 of
msgid ":func:`vdot`"
msgstr ""
#: mars.tensor.dot:43 of
msgid "Complex-conjugating dot product."
msgstr ""
#: mars.tensor.dot:46 of
msgid ":func:`tensordot`"
msgstr ""
#: mars.tensor.dot:46 of
msgid "Sum products over arbitrary axes."
msgstr ""
#: mars.tensor.dot:49 of
msgid ":func:`einsum`"
msgstr ""
#: mars.tensor.dot:49 of
msgid "Einstein summation convention."
msgstr ""
#: mars.tensor.dot:51 of
msgid ":func:`matmul`"
msgstr ""
#: mars.tensor.dot:52 of
msgid "'@' operator as method with out parameter."
msgstr ""
#: mars.tensor.dot:55 of
msgid "Examples"
msgstr ""
#: mars.tensor.dot:61 of
msgid "Neither argument is complex-conjugated:"
msgstr ""
#: mars.tensor.dot:66 of
msgid "For 2-D arrays it is the matrix product:"
msgstr ""
| {
"pile_set_name": "Github"
} |
1
00:00:34,051 --> 00:00:37,889
(勝家)
全軍 退け! 兵を退くのじゃ!
2
00:00:37,889 --> 00:00:40,391
(秀吉)お市様の目の前で→
3
00:00:40,391 --> 00:00:43,060
その息の根 止めてくれるわ。
4
00:00:43,060 --> 00:00:47,398
<織田家の実力者 勝家は
秀吉に敗れ→
5
00:00:47,398 --> 00:00:50,735
市と共に 命を散らした>
6
00:00:50,735 --> 00:00:52,887
(市)さらばじゃ。
7
00:00:52,887 --> 00:00:55,723
<この勝利で 秀吉は→
8
00:00:55,723 --> 00:01:01,062
近畿 北陸 東海の一部を
支配下に入れ 山崎城を拠点に→
9
00:01:01,062 --> 00:01:05,716
朝廷への影響力をも
強めていった。→
10
00:01:05,716 --> 00:01:09,387
各地の大名への戦勝報告も
大々的に行い→
11
00:01:09,387 --> 00:01:13,057
自らが
信長の継承者であることを→
12
00:01:13,057 --> 00:01:17,395
強く 印象づけた。→
13
00:01:17,395 --> 00:01:20,047
そして 江たちは→
14
00:01:20,047 --> 00:01:25,403
最大の仇 秀吉に
引き渡されることに。→
15
00:01:25,403 --> 00:01:32,226
最愛の母を失った江たちを
待ち受ける運命とは…>
16
00:01:32,226 --> 00:01:40,885
♪♪~(テーマ音楽)
17
00:01:40,885 --> 00:03:24,388
♪♪~
18
00:03:24,388 --> 00:03:32,063
♪♪~
19
00:03:32,063 --> 00:04:09,363
♪♪~
20
00:04:20,728 --> 00:04:26,428
(兵たちの声)
21
00:04:43,384 --> 00:04:48,389
主がもとに ご案内つかまつる。
22
00:04:48,389 --> 00:04:52,089
(茶々)無礼者! 手を触れるな。
23
00:04:58,883 --> 00:05:01,383
立つのじゃ。
24
00:05:10,895 --> 00:05:13,095
参るぞ。
25
00:05:25,726 --> 00:05:31,048
(秀吉の泣き声)
26
00:05:31,048 --> 00:05:37,555
(泣き声)
27
00:05:37,555 --> 00:05:44,895
お市様を… お市様を
なぜ お救いせなんだ!
28
00:05:44,895 --> 00:05:48,895
この ばかたれが!
大ばかたれが!
29
00:05:51,385 --> 00:05:53,888
(石田)
面目しだいもござりませぬ!
30
00:05:53,888 --> 00:05:58,058
お許し下さりませ!
お許し下さりませ!
31
00:05:58,058 --> 00:06:01,712
(泣き声)
32
00:06:01,712 --> 00:06:04,212
(江)この者のせいではない!
33
00:06:05,883 --> 00:06:12,723
母上は… 御自ら…→
34
00:06:12,723 --> 00:06:15,423
御自ら…!
35
00:06:24,885 --> 00:06:28,556
殿! これを。
36
00:06:28,556 --> 00:06:33,227
何じゃ?
お市の方様からにございます。
37
00:06:33,227 --> 00:06:35,227
え?
38
00:06:46,056 --> 00:06:49,043
お市様…。
39
00:06:49,043 --> 00:06:53,743
読め。 声に出して読むのじゃ!
40
00:06:55,399 --> 00:07:00,054
「娘たちに」…。
41
00:07:00,054 --> 00:07:03,054
もっと大きな声で読め!
42
00:07:09,730 --> 00:07:14,785
「娘たちに
ゆめゆめ 邪心抱かざるよう→
43
00:07:14,785 --> 00:07:19,056
その儀 お約束頂きたい。→
44
00:07:19,056 --> 00:07:25,756
我が一命に懸けて 願い上げ候」。
45
00:07:29,066 --> 00:07:33,366
お市の方様の
ご遺言にございまする!
46
00:07:39,727 --> 00:07:43,727
邪心など 持つはずがなかろうが。
47
00:07:47,051 --> 00:07:51,055
羽柴殿。
あ?
48
00:07:51,055 --> 00:07:58,545
私たち姉妹は
父である浅井長政を殺され→
49
00:07:58,545 --> 00:08:05,386
今 また
2度目の父である柴田勝家と→
50
00:08:05,386 --> 00:08:08,389
母まで失いました。
51
00:08:08,389 --> 00:08:14,061
2度も そなたに
大切な人たちを奪われたのです。
52
00:08:14,061 --> 00:08:20,384
私たち姉妹が そなたを許すことは
生涯ありませぬ。
53
00:08:20,384 --> 00:08:23,220
そうじゃ。 許さぬ!
54
00:08:23,220 --> 00:08:26,390
(初)断じて許さぬぞ!
55
00:08:26,390 --> 00:08:29,893
なんとも気の強い 姫様方じゃ。
56
00:08:29,893 --> 00:08:35,393
お市様の娘御なればこそに
ございましょう。
57
00:08:37,384 --> 00:08:40,387
まことに ご立派なる ご決心。→
58
00:08:40,387 --> 00:08:44,725
そして ご最期にございました。
59
00:08:44,725 --> 00:08:57,721
♪♪~
60
00:08:57,721 --> 00:09:00,721
哀れよのう…。
61
00:09:03,711 --> 00:09:06,411
かわいそうにのう。
62
00:09:11,552 --> 00:09:15,889
猿の分際で
私たちと共に泣くな!
63
00:09:15,889 --> 00:09:19,226
え… あ~?!
64
00:09:19,226 --> 00:09:21,226
何を…。
65
00:09:23,063 --> 00:09:25,263
(信長)猿!
66
00:09:26,884 --> 00:09:29,084
(秀吉)あ…。
67
00:09:31,555 --> 00:09:33,555
え…?
68
00:09:41,615 --> 00:09:49,723
<愛し子たちを残し
私は あの世へ旅立ちました。→
69
00:09:49,723 --> 00:09:53,727
けれど
心が この世を離れようとせず→
70
00:09:53,727 --> 00:09:58,715
天に昇ることは
まだ できません>
71
00:09:58,715 --> 00:10:00,715
茶々。
72
00:10:02,719 --> 00:10:04,719
初。
73
00:10:09,393 --> 00:10:11,693
江。
74
00:10:23,056 --> 00:10:26,059
いかがしたのじゃ?
75
00:10:26,059 --> 00:10:30,547
母上の夢を見ました。
76
00:10:30,547 --> 00:10:33,717
母上のことは申すな。
77
00:10:33,717 --> 00:10:37,221
でも そこに お座りになって…。
78
00:10:37,221 --> 00:10:39,521
よさぬか!
79
00:10:41,225 --> 00:10:44,725
耐えよ 初。
80
00:10:46,547 --> 00:10:49,233
江もじゃ。
81
00:10:49,233 --> 00:10:55,733
我ら姉妹は この世に
3人きりとなったのじゃ。
82
00:11:03,380 --> 00:11:07,384
案ずるでない。
83
00:11:07,384 --> 00:11:11,054
そなたたちは→
84
00:11:11,054 --> 00:11:14,391
この私が 守るゆえな。
85
00:11:14,391 --> 00:11:24,051
♪♪~
86
00:11:24,051 --> 00:11:28,555
<今の私にできることは
ただ 娘たちを→
87
00:11:28,555 --> 00:11:33,060
見守ってゆくことのみに
ございます>
88
00:11:33,060 --> 00:11:43,720
♪♪~
89
00:11:43,720 --> 00:11:51,420
<そして 秀吉の命により 江たちは
安土城へと向かいました>
90
00:11:58,785 --> 00:12:01,221
何じゃ? あれは…。
91
00:12:01,221 --> 00:12:07,060
(ヨシ)本能寺の騒乱の折
天主は焼け崩れてしまったと。
92
00:12:07,060 --> 00:12:13,050
前に 母上と
ここから お城を見ましたね。
93
00:12:13,050 --> 00:12:15,402
ああ。
94
00:12:15,402 --> 00:12:18,555
伯父上…。
95
00:12:18,555 --> 00:12:21,391
母上…。
96
00:12:21,391 --> 00:12:50,091
♪♪~
97
00:12:53,040 --> 00:12:55,225
おね様!
98
00:12:55,225 --> 00:12:57,210
おね様?
99
00:12:57,210 --> 00:13:01,048
猿の… 秀吉殿の ご正室です。
100
00:13:01,048 --> 00:13:03,348
何じゃと?!
101
00:13:06,887 --> 00:13:14,044
(おね)お茶々様 お初様 お江様。
102
00:13:14,044 --> 00:13:20,567
此度は 我が夫 秀吉が…
いえ 此度も また→
103
00:13:20,567 --> 00:13:26,723
まことに まことに
申し訳ないことを致しました。
104
00:13:26,723 --> 00:13:31,712
謝られたところで 母が
戻ってくるわけではありませぬ。
105
00:13:31,712 --> 00:13:34,398
仰せのとおりでございます。
106
00:13:34,398 --> 00:13:38,051
されど どうしても
おわびを申し上げたく→
107
00:13:38,051 --> 00:13:41,751
まかり越しましたしだいに
ございます。
108
00:13:46,727 --> 00:13:49,027
あの…。
109
00:13:50,731 --> 00:13:54,735
よいのです。
今は 何を申し上げても→
110
00:13:54,735 --> 00:13:58,035
お心には届きませんでしょうから。
111
00:14:00,057 --> 00:14:03,727
(京極龍子)
よろしゅうございましょうか?
112
00:14:03,727 --> 00:14:06,027
お入りなさいまし。
113
00:14:25,065 --> 00:14:29,069
(おね)京極龍子殿と仰せです。
114
00:14:29,069 --> 00:14:31,569
龍子… 様?
115
00:14:33,557 --> 00:14:38,061
お母君のこと 聞きました。
さぞや おつらいでしょうが→
116
00:14:38,061 --> 00:14:41,048
どうぞ
お気落ちなさいませんように。
117
00:14:41,048 --> 00:14:43,567
京極といえば…→
118
00:14:43,567 --> 00:14:48,221
もしや 父 浅井長政の姉君
京極マリア様の?
119
00:14:48,221 --> 00:14:51,892
はい。 娘でございます。
120
00:14:51,892 --> 00:14:55,562
あなたたちとは
いとこに あたりまする。
121
00:14:55,562 --> 00:14:57,714
いとこ?
122
00:14:57,714 --> 00:14:59,914
いとこ?
はい。
123
00:15:01,551 --> 00:15:07,724
夫は ご縁者がおいでなら
姫様方のお心も休まろうかと→
124
00:15:07,724 --> 00:15:12,395
この安土の城に
お連れしたのでしょう。
125
00:15:12,395 --> 00:15:17,234
こうして お目にかかれたこと
大変 うれしく思いまする。
126
00:15:17,234 --> 00:15:22,289
親類同士 女同士
仲よくやりましょうね。
127
00:15:22,289 --> 00:15:26,059
はい。
でも なぜ こちらに?
128
00:15:26,059 --> 00:15:30,397
こちらに住めと
秀吉様のお心遣いを賜りまして。
129
00:15:30,397 --> 00:15:33,383
私たちの父 長政が→
130
00:15:33,383 --> 00:15:39,723
羽柴秀吉… 殿に
討たれたことは?
131
00:15:39,723 --> 00:15:42,375
もちろん 存じております。
132
00:15:42,375 --> 00:15:45,712
その父は叔父。 なのに なぜ?
133
00:15:45,712 --> 00:15:51,401
実は 私の夫も
かつて 明智光秀様を お味方し→
134
00:15:51,401 --> 00:15:55,722
山崎での戦の後
命を落としました。
135
00:15:55,722 --> 00:15:59,042
では 秀吉は仇ではないですか。
136
00:15:59,042 --> 00:16:03,713
(龍子)そうなのです。
それなのに なぜ?
137
00:16:03,713 --> 00:16:08,718
私 秀吉様の側室ですの。
138
00:16:08,718 --> 00:16:11,054
(江 初)側室?!
139
00:16:11,054 --> 00:16:13,054
はい。
140
00:16:15,725 --> 00:16:17,894
はい。
141
00:16:17,894 --> 00:16:20,380
…ということは→
142
00:16:20,380 --> 00:16:25,385
亡くされた ご夫君の仇の側室に
なられたということですか?
143
00:16:25,385 --> 00:16:28,054
はい。
144
00:16:28,054 --> 00:16:33,754
申し訳ございませんが
私には とても信じられませぬ。
145
00:16:35,729 --> 00:16:41,051
おね様の前で
それこそ 申し訳ありませぬが→
146
00:16:41,051 --> 00:16:45,889
私も 最初は
嫌で嫌で たまりませんでした。
147
00:16:45,889 --> 00:16:52,729
でも お世話をするうち
秀吉様は なんと面白い お人だと。
148
00:16:52,729 --> 00:16:56,066
面白い?
はい。
149
00:16:56,066 --> 00:17:01,388
憎めないというか
愛きょうがあると申しますか。
150
00:17:01,388 --> 00:17:05,058
私も いつも それに
だまされまする。
151
00:17:05,058 --> 00:17:09,062
さようにございましょうね。
152
00:17:09,062 --> 00:17:11,715
信じられない…。
153
00:17:11,715 --> 00:17:17,053
それに おね様です。
私の境遇をお分かりのうえ→
154
00:17:17,053 --> 00:17:21,725
いつも いたわって下さり
今では 私にとって→
155
00:17:21,725 --> 00:17:24,394
掛けがえのない お方に
ございます。
156
00:17:24,394 --> 00:17:29,716
それは 私とて同じこと。
あら… うれしい。
157
00:17:29,716 --> 00:17:34,721
側室が 掛けがえのない相手?
158
00:17:34,721 --> 00:17:40,060
私には 到底
信じられることではありませぬ。
159
00:17:40,060 --> 00:17:45,065
それで結構でございます。
今の茶々様のように→
160
00:17:45,065 --> 00:17:48,765
何でも
正直に言って頂くのが一番。
161
00:17:51,054 --> 00:17:55,725
お腹立ちのことなどありましたら
私を 夫だと お思いになって→
162
00:17:55,725 --> 00:17:59,045
何なりと お伝え下さいませ。
163
00:17:59,045 --> 00:18:01,398
私にもね。
164
00:18:01,398 --> 00:18:11,458
♪♪~
165
00:18:11,458 --> 00:18:17,547
猿の側室に しかも いとこが!
たまったものではないわ!
166
00:18:17,547 --> 00:18:21,384
でも おね様は すごいですね。
167
00:18:21,384 --> 00:18:25,388
何がじゃ?
だって 龍子様は側室なのでしょ?
168
00:18:25,388 --> 00:18:27,891
いがみ合っても
おかしくないはずなのに。
169
00:18:27,891 --> 00:18:30,710
鈍いだけじゃ。
それを言うなら→
170
00:18:30,710 --> 00:18:34,214
お心が広いと。
そなたは 誰の味方じゃ?!
171
00:18:34,214 --> 00:18:36,514
静まれ。
172
00:18:42,889 --> 00:18:47,944
<続いて導かれた先は…>
173
00:18:47,944 --> 00:18:55,385
お初に お目にかかります。
千 宗易と申します。
174
00:18:55,385 --> 00:18:59,385
茶々にございます。
初にございます。
175
00:19:02,058 --> 00:19:07,058
では ご挨拶代わりに
一服 差し上げまひょ。
176
00:19:18,725 --> 00:19:21,025
(宗易)どうぞ。
177
00:19:27,717 --> 00:19:34,057
時に おね様に
お会いになりましたかな?
178
00:19:34,057 --> 00:19:37,727
はい。
いかがでした?
179
00:19:37,727 --> 00:19:40,227
よく分かりませぬ。
180
00:19:42,065 --> 00:19:44,065
そうですか。
181
00:19:45,735 --> 00:19:48,035
いただきます。
182
00:19:52,726 --> 00:19:59,399
私は 何と言うか 気が知れません。
猿の妻になるなんて。
183
00:19:59,399 --> 00:20:02,385
姉様…。
そやけど→
184
00:20:02,385 --> 00:20:06,723
羽柴様を あれほどの男にしたのは
間違いのう おねさんです。
185
00:20:06,723 --> 00:20:09,392
だったら なおさら嫌いです。
186
00:20:09,392 --> 00:20:12,395
(宗易)ハハハ! はっきりした姫様や。
187
00:20:12,395 --> 00:20:15,048
それだけが取り柄なのです。
何じゃと?!
188
00:20:15,048 --> 00:20:18,885
(笑い声)
189
00:20:18,885 --> 00:20:22,055
茶の味は いかがかな?
190
00:20:22,055 --> 00:20:25,558
大変 おいしゅうございました。
191
00:20:25,558 --> 00:20:28,358
それは ようございました。
192
00:20:34,717 --> 00:20:40,723
お茶というのは
大変なものですね。
193
00:20:40,723 --> 00:20:47,023
ひととき 母を亡くした悲しみを
忘れておりました。
194
00:20:48,715 --> 00:20:55,555
私も 幼き時に母を亡くしました。
195
00:20:55,555 --> 00:20:58,374
さようですか。
196
00:20:58,374 --> 00:21:06,374
でも 早うに 母が逝ってくれて
よかったと思いますわ。
197
00:21:09,052 --> 00:21:16,893
母親の死によってこそ 学べる
教わることもありますさかいな。
198
00:21:16,893 --> 00:21:23,049
でも私たちは 母上に
生きていてほしゅうございました。
199
00:21:23,049 --> 00:21:27,387
ほんまやな。 そら そうや。
200
00:21:27,387 --> 00:21:33,387
そやけど もう おられまへん。
201
00:21:35,061 --> 00:21:41,061
せやったら
それを生かす道を探しなはれ。
202
00:21:42,735 --> 00:21:48,725
それもまた
亡くなられた お母上の教え。
203
00:21:48,725 --> 00:21:52,725
お心に かなうこと
ちゃいますやろか。
204
00:21:55,064 --> 00:21:58,384
ありがたいこっちゃ。
205
00:21:58,384 --> 00:22:11,714
♪♪~
206
00:22:11,714 --> 00:22:17,014
「死んでくれてよかった」だなんて
いくら何でも ひどすぎます。
207
00:22:29,048 --> 00:22:35,555
でも
宗易様の言われたとおりじゃ。
208
00:22:35,555 --> 00:22:40,355
母上は もう おられぬ。
209
00:22:42,896 --> 00:22:46,716
悲しみに暮れていても
それは変わらぬ。
210
00:22:46,716 --> 00:22:49,219
それを私たちに伝えんがため→
211
00:22:49,219 --> 00:22:52,222
ああまで
言うて下さったのであろう。
212
00:22:52,222 --> 00:22:57,227
その お心遣い
私は ありがたいと思う。
213
00:22:57,227 --> 00:22:59,712
ありがたい?
214
00:22:59,712 --> 00:23:03,716
おね様にしても そうです。
215
00:23:03,716 --> 00:23:08,388
私たちに会うのは
心苦しいはずです。
216
00:23:08,388 --> 00:23:11,391
でも わざわざ
会いに来て下さいました。
217
00:23:11,391 --> 00:23:13,726
そうじゃな。
218
00:23:13,726 --> 00:23:17,730
遠ざけていようと思えば
いくらでも できるはず。
219
00:23:17,730 --> 00:23:20,383
ありがたく思わねばならぬな。
220
00:23:20,383 --> 00:23:24,387
あんな… 猿の女房にですか?!
221
00:23:24,387 --> 00:23:29,392
そもそも命を奪われておっても
しかたのない 我らなのじゃ。
222
00:23:29,392 --> 00:23:33,092
そう思えば
ありがたいことではないか?
223
00:23:37,050 --> 00:23:44,057
母上は 御自ら
死を選ばれたのじゃ。
224
00:23:44,057 --> 00:23:50,713
そのこと しかと胸に畳み
生きて参ろう。
225
00:23:50,713 --> 00:23:55,218
宗易様が言われた
母から学ぶというは→
226
00:23:55,218 --> 00:23:59,389
そうすればこそ
見えてくるのやもしれぬ。
227
00:23:59,389 --> 00:24:07,046
♪♪~
228
00:24:07,046 --> 00:24:11,050
皆 下がっておれ。
229
00:24:11,050 --> 00:24:33,389
♪♪~
230
00:24:33,389 --> 00:24:42,048
今日は 我らを許そう。
231
00:24:42,048 --> 00:24:44,400
許す?
232
00:24:44,400 --> 00:24:47,720
母上を思うて泣くことをじゃ。
233
00:24:47,720 --> 00:24:51,420
母上を思うて…。
234
00:24:56,379 --> 00:25:03,720
その前に 私は
江に言いたいことがありまする。
235
00:25:03,720 --> 00:25:06,389
江に?
236
00:25:06,389 --> 00:25:10,059
そなた 母上と別れた時のことを→
237
00:25:10,059 --> 00:25:12,729
覚えておるか?
え?
238
00:25:12,729 --> 00:25:16,382
母上 どうか お心を
回想
変えて下さりませ!
239
00:25:16,382 --> 00:25:20,386
私たちを
置いていかないで下さいませ!
240
00:25:20,386 --> 00:25:24,057
母上…。
江…。
241
00:25:24,057 --> 00:25:32,065
私が死んだら
また 母上に会えまするか?
242
00:25:32,065 --> 00:25:37,053
ああ 一番に会えるぞ。
243
00:25:37,053 --> 00:25:43,876
では その日を
楽しみに致しまする。
244
00:25:43,876 --> 00:25:48,965
(初)あの時 もし そなたが
あのようなことを言わねば→
245
00:25:48,965 --> 00:25:52,719
「死んだら会えるか」だの
「その日を楽しみにする」などと→
246
00:25:52,719 --> 00:25:55,388
ばかなことを言わねば→
247
00:25:55,388 --> 00:26:00,088
もし 母上を止めていたら…。
248
00:26:01,711 --> 00:26:07,411
母上は 思いとどまって
下さったやもしれぬではないか!
249
00:26:10,720 --> 00:26:14,720
それは違うぞ 初。
250
00:26:17,393 --> 00:26:25,051
あの言葉で… 江の言葉で→
251
00:26:25,051 --> 00:26:29,555
母上は 救われたのじゃ。
252
00:26:29,555 --> 00:26:35,711
思い残すことなく
この世を去られたのじゃ。
253
00:26:35,711 --> 00:26:41,911
私は 江に
礼を言いたいと思うておった。
254
00:26:43,719 --> 00:26:46,419
姉上…。
255
00:26:54,397 --> 00:26:58,397
そなたも
つらい思いをしたのじゃな。
256
00:27:03,389 --> 00:27:06,042
江もな。
257
00:27:06,042 --> 00:27:14,342
♪♪~
258
00:27:16,068 --> 00:27:29,065
♪♪~
259
00:27:29,065 --> 00:27:32,385
これは 長政様より賜りし刀じゃ。
260
00:27:32,385 --> 00:27:37,390
父の思いを 浅井の誇りを→
261
00:27:37,390 --> 00:27:41,090
後々まで忘れるでないぞ。
262
00:27:43,396 --> 00:27:49,385
3人の中で 姉も妹も
持っておるのは そなただけじゃ。
263
00:27:49,385 --> 00:27:56,225
2人の間に何かあらば
絆となって つなぎ止めよ。
264
00:27:56,225 --> 00:27:58,711
そなたには これじゃ。
265
00:27:58,711 --> 00:28:02,215
そなたには 織田家の誇りを
守ってもらいたい。
266
00:28:02,215 --> 00:28:05,551
そして そなたは そなたらしく→
267
00:28:05,551 --> 00:28:11,390
思うまま
生きたいように生きるがよい。
268
00:28:11,390 --> 00:28:16,462
母上は お強い お方であった。
269
00:28:16,462 --> 00:28:21,962
(初)そして
お優しゅうございました。
270
00:28:25,388 --> 00:28:43,723
♪♪~
271
00:28:43,723 --> 00:28:45,725
母上…。
272
00:28:45,725 --> 00:28:50,046
江 そなたは希望じゃ。
273
00:28:50,046 --> 00:28:52,565
それを忘れるでないぞ。
274
00:28:52,565 --> 00:29:15,054
♪♪~
275
00:29:15,054 --> 00:29:19,054
悲しみが消えることは
一生ないであろう。
276
00:29:20,710 --> 00:29:28,718
でも 母上を思うて泣くのは→
277
00:29:28,718 --> 00:29:32,018
今日を限りにしたいと思う。
278
00:29:35,391 --> 00:29:38,044
姉上…。
279
00:29:38,044 --> 00:29:41,744
思う存分 泣くがよい。
280
00:29:45,384 --> 00:29:47,384
はい。
281
00:29:52,391 --> 00:29:59,715
私は こうして
姉妹3人 揃うていることに→
282
00:29:59,715 --> 00:30:03,415
感謝致しとう存じます。
283
00:30:08,057 --> 00:30:10,059
何ですか?
284
00:30:10,059 --> 00:30:15,715
そなたらしゅうない言葉ゆえ。
ほんに。
285
00:30:15,715 --> 00:30:18,401
ひどい。
286
00:30:18,401 --> 00:30:23,401
でも 初の言うとおりじゃ。
287
00:30:25,057 --> 00:30:31,757
母上は 私たちに
姉妹を残して下された。
288
00:30:33,382 --> 00:30:40,082
何よりも それに感謝し
強く生きて参ろうぞ。
289
00:30:43,042 --> 00:30:45,394
はい。
290
00:30:45,394 --> 00:30:48,064
はい。
291
00:30:48,064 --> 00:31:05,731
♪♪~
292
00:31:05,731 --> 00:31:12,888
<何とも つろうございます。
けれど それから しばらく後→
293
00:31:12,888 --> 00:31:17,376
娘たちは
少しずつ元気を取り戻し…>
294
00:31:17,376 --> 00:31:21,676
これを お茶々様にと思いまして。
295
00:31:24,717 --> 00:31:27,717
ご迷惑やもしれませぬが。
296
00:31:29,388 --> 00:31:31,688
いえ。
297
00:31:33,726 --> 00:31:38,714
お心遣い 痛み入ります。
298
00:31:38,714 --> 00:31:41,014
いいえ。
299
00:31:44,570 --> 00:31:48,374
(一同)わあ~!
(サキ)お美しい!
300
00:31:48,374 --> 00:31:51,374
お似合いにございまするな。
301
00:31:53,729 --> 00:31:57,900
これは お初様に。
302
00:31:57,900 --> 00:32:00,700
ありがとう存じまする。
303
00:32:02,721 --> 00:32:07,059
それに これを。
304
00:32:07,059 --> 00:32:09,712
わあ~ お菓子!
305
00:32:09,712 --> 00:32:13,048
お好きだと伺いましたので。
306
00:32:13,048 --> 00:32:16,719
ありがとう存じまする。
307
00:32:16,719 --> 00:32:20,389
お江様には これを。
308
00:32:20,389 --> 00:32:23,389
(侍女たち)まあ おきれい!
309
00:32:26,545 --> 00:32:29,545
ありがとう存じます。
310
00:32:33,052 --> 00:32:37,352
<しかし そんな折…>
311
00:32:39,391 --> 00:32:44,446
信孝様が ご切腹? 何故じゃ?
312
00:32:44,446 --> 00:32:50,052
はい。 戦に敗れた今
共に戦った柴田様に倣い→
313
00:32:50,052 --> 00:32:53,389
武士らしく 潔く果ててはどうかと
信雄様が…。
314
00:32:53,389 --> 00:32:57,042
(信雄)信孝!
315
00:32:57,042 --> 00:33:00,379
♪♪~
316
00:33:00,379 --> 00:33:05,050
なぜじゃ! 母が違うとは申せ
ご兄弟ではないか。
317
00:33:05,050 --> 00:33:09,054
(ウメ)後ろで
羽柴様が動かれたのではと…。
318
00:33:09,054 --> 00:33:12,892
猿が?
許せぬ。
319
00:33:12,892 --> 00:33:17,880
また お一人 織田家の方が
亡くなってしまわれましたな。
320
00:33:17,880 --> 00:33:20,566
まさか 秀吉は→
321
00:33:20,566 --> 00:33:24,069
織田家を根絶やしにしようと
しているのではないのか?
322
00:33:24,069 --> 00:33:27,389
さあ それは…。
323
00:33:27,389 --> 00:33:31,389
ならば 信雄様とて
危ないのではありませぬか?
324
00:33:33,729 --> 00:33:37,729
そうなれば 私たちも…。
325
00:33:45,040 --> 00:33:47,726
(家康)そうですか…。
326
00:33:47,726 --> 00:33:51,881
信孝殿を ご切腹にですか。
327
00:33:51,881 --> 00:33:55,718
それは つろうございました。
328
00:33:55,718 --> 00:33:59,388
されど 今 思えば
猿のたくらみに→
329
00:33:59,388 --> 00:34:02,374
まんまと
乗せられてしもうたような。
330
00:34:02,374 --> 00:34:05,394
ご自分のなさったことを
猿殿のせいにするのは→
331
00:34:05,394 --> 00:34:08,397
あまり感心できませんな。
332
00:34:08,397 --> 00:34:12,735
そんな悠長なことを
言うておる場合ではありませぬ!
333
00:34:12,735 --> 00:34:17,056
徳川殿も そろそろ
腰を お上げ下され!
334
00:34:17,056 --> 00:34:24,046
腰を上げるとは 猿殿と戦の
意味にございますかな?
335
00:34:24,046 --> 00:34:26,048
いかにも!
336
00:34:26,048 --> 00:34:28,384
(せきこみ)
337
00:34:28,384 --> 00:34:32,721
いや このところ
ちと 風邪気味でしてな。
338
00:34:32,721 --> 00:34:35,724
今すぐにとは申しておりませぬ!
339
00:34:35,724 --> 00:34:39,728
ただ ここらで
猿めを潰しておかぬと→
340
00:34:39,728 --> 00:34:42,731
取り返しのつかぬことにも
なりかねませんぞ!
341
00:34:42,731 --> 00:34:45,031
そうじゃ。
342
00:34:48,887 --> 00:34:51,724
信雄様には これが よろしかろう。
343
00:34:51,724 --> 00:34:55,394
は?
気の落ち着く薬にござる。
344
00:34:55,394 --> 00:35:02,384
♪♪~
345
00:35:02,384 --> 00:35:05,387
殿。
うむ。
346
00:35:05,387 --> 00:35:10,387
(酒井)我が殿の調合された薬は
よう効きまする。
347
00:35:13,062 --> 00:35:15,062
御免!
348
00:35:19,385 --> 00:35:21,720
うん。
349
00:35:21,720 --> 00:35:32,047
♪♪~
350
00:35:32,047 --> 00:35:35,551
わ… こ… この臭いは…。
351
00:35:35,551 --> 00:35:38,070
ほとんどは薬草にて あとは→
352
00:35:38,070 --> 00:35:40,889
蛇にヤモリに 牛の睾丸でしたか。
353
00:35:40,889 --> 00:35:44,727
うっ… プッ!
(せきこみ)
354
00:35:44,727 --> 00:35:48,063
あ~ もったいない。
355
00:35:48,063 --> 00:35:50,215
わしを からこうておられるのか!
356
00:35:50,215 --> 00:35:52,718
いや とんでもない。
357
00:35:52,718 --> 00:35:57,389
ただ 焦りは禁物だと
申し上げたいだけにて。
358
00:35:57,389 --> 00:36:02,061
猿との戦については
追って ご相談致す!
359
00:36:02,061 --> 00:36:09,061
♪♪~
360
00:36:12,721 --> 00:36:16,709
あの気の短さがのう…。
361
00:36:16,709 --> 00:36:20,546
信雄殿と手を組まれる
おつもりは?
362
00:36:20,546 --> 00:36:23,716
猿は たたいておかねばならぬ。
363
00:36:23,716 --> 00:36:28,721
されど それには大義名分がいる。
364
00:36:28,721 --> 00:36:33,559
(本多)信雄様と結べば
織田家存続のためと→
365
00:36:33,559 --> 00:36:36,879
旗印を掲げることができまするが。
366
00:36:36,879 --> 00:36:38,897
ふむ。
367
00:36:38,897 --> 00:36:45,721
羽柴殿は 次は
何を仕掛けてきましょうか?
368
00:36:45,721 --> 00:36:49,421
ねらいは 一つよ。
369
00:36:52,394 --> 00:36:56,398
殿! その ねらいとは…?
370
00:36:56,398 --> 00:37:02,388
いかん!
これは 腹を緩める薬であった。
371
00:37:02,388 --> 00:37:04,390
また!
372
00:37:04,390 --> 00:37:08,043
秀吉が 天下取りをねろうておる?
373
00:37:08,043 --> 00:37:11,880
はい。 せんだっても
京の大徳寺にて→
374
00:37:11,880 --> 00:37:16,952
信長公一周忌の法要を
盛大に執り行った由にございます。
375
00:37:16,952 --> 00:37:20,055
そのあと大坂に入り
この安土城より→
376
00:37:20,055 --> 00:37:23,058
大きな お城を築くと
仰せになったとか。
377
00:37:23,058 --> 00:37:26,061
伯父上を超えてみせると
言うたようなものではないか。
378
00:37:26,061 --> 00:37:28,063
天下を取る…。
379
00:37:28,063 --> 00:37:30,899
はっ… はっ…。
380
00:37:30,899 --> 00:37:33,719
何じゃ? 騒々しい。
羽柴様が…。
381
00:37:33,719 --> 00:37:37,723
伯父上の法要のことなら聞いた。
お城の一件もじゃ。
羽柴様が→
382
00:37:37,723 --> 00:37:41,723
こちらに お越しになっている
とのことにございます。
383
00:37:45,731 --> 00:37:48,031
姫様! あっ…。
384
00:37:51,720 --> 00:37:54,389
あ~っ!
385
00:37:54,389 --> 00:37:56,708
もう ご勘弁をば…。
386
00:37:56,708 --> 00:38:01,396
三法師様~ ご機嫌麗しゅう
おいででしたかな?
387
00:38:01,396 --> 00:38:03,882
(三法師)猿!
(笑い声)
388
00:38:03,882 --> 00:38:06,552
そこにおったか 猿。
389
00:38:06,552 --> 00:38:08,752
(おね)姫様。
390
00:38:11,056 --> 00:38:14,056
おね様 龍子様。
391
00:38:16,061 --> 00:38:19,398
これは これは 三の姫様。
392
00:38:19,398 --> 00:38:24,386
三法師様。 姫様が お見えですぞ。
393
00:38:24,386 --> 00:38:28,056
江! 江! 江!
394
00:38:28,056 --> 00:38:32,356
(三法師の笑い声)
おお 懐いておいでですな。
395
00:38:36,064 --> 00:38:40,886
おやおや これは…
二の姫様でしたかな?
396
00:38:40,886 --> 00:38:45,057
お元気におなりの ご様子
何よりにございますな。
397
00:38:45,057 --> 00:38:47,757
元気なわけがなかろう!
398
00:38:54,883 --> 00:38:58,220
よろしゅうございましょうか?
399
00:38:58,220 --> 00:39:01,720
どうぞ お入りなさいませ。
400
00:39:07,880 --> 00:39:22,377
♪♪~
401
00:39:22,377 --> 00:39:25,881
あ~…。
402
00:39:25,881 --> 00:39:28,081
かは…。
403
00:39:35,390 --> 00:39:39,090
一つ
お聞きしたきことがござります。
404
00:39:41,563 --> 00:39:44,383
では 私どもは これにて。
405
00:39:44,383 --> 00:39:47,383
いえ。 どうぞ そのままに。
406
00:39:49,071 --> 00:39:55,060
何故 我らが いとこの信孝様を
その実の兄たる信雄様に→
407
00:39:55,060 --> 00:39:57,760
殺させたのでございますか?
408
00:40:03,385 --> 00:40:05,721
羽柴殿!
409
00:40:05,721 --> 00:40:10,542
い… いやいや
あれは信雄様が せめて弟に→
410
00:40:10,542 --> 00:40:13,729
武士としてのけじめを
つけさせてやりたいと仰せ…。
411
00:40:13,729 --> 00:40:17,716
伯父 信長の法要を
勝手に行ったとも聞きましたが。
412
00:40:17,716 --> 00:40:21,219
勝手になど…。 皆の了承は
得たうえのことでござる。
413
00:40:21,219 --> 00:40:23,722
その上 天下を取るおつもりとか。
414
00:40:23,722 --> 00:40:26,058
とんでもないことにござりまする。
415
00:40:26,058 --> 00:40:30,062
某は ただ
御屋形様のご遺志を継ごうと…。
416
00:40:30,062 --> 00:40:32,714
つまりは
天下取りではござりませぬか。
417
00:40:32,714 --> 00:40:36,718
そのようなことは 断じて→
418
00:40:36,718 --> 00:40:41,718
ございま… せん。
419
00:40:44,393 --> 00:40:47,396
では 約束して頂けますね?
420
00:40:47,396 --> 00:40:50,232
致します。 致しておりまする。
421
00:40:50,232 --> 00:40:53,719
お市様との
お約束にござりますれば→
422
00:40:53,719 --> 00:40:56,388
誓って
姫様に手を出すようなまねは→
423
00:40:56,388 --> 00:40:58,890
致しませぬ。 はい。
424
00:40:58,890 --> 00:41:00,892
ぷっ…。
425
00:41:00,892 --> 00:41:04,880
申しておるのは織田家のことです。
(秀吉)は?
426
00:41:04,880 --> 00:41:08,734
織田家を根絶やしに
するようなことはせぬと。
427
00:41:08,734 --> 00:41:11,720
ああ… ああ それは もう。
428
00:41:11,720 --> 00:41:14,056
(笑い声)
429
00:41:14,056 --> 00:41:16,058
(秀吉)オホホ… やかましい。
430
00:41:16,058 --> 00:41:19,044
お約束頂けるのですね?
431
00:41:19,044 --> 00:41:21,063
え… あ… いや それは…。
432
00:41:21,063 --> 00:41:23,715
姉上。
433
00:41:23,715 --> 00:41:26,718
参りましょう。
え?
434
00:41:26,718 --> 00:41:29,418
行くのです! さあ!
435
00:41:32,557 --> 00:41:35,757
待て! 話は終わっておらぬぞ。
436
00:41:37,379 --> 00:41:42,379
お前様 お口が…。
へ?
437
00:41:45,053 --> 00:41:48,053
う~ 痛っ!
(笑い声)
438
00:41:49,725 --> 00:41:53,045
何じゃ さっきから。
439
00:41:53,045 --> 00:41:56,882
茶々様は
なるほど 似ておいでですね。
440
00:41:56,882 --> 00:42:00,382
似ておられる?
お市の方様に。
441
00:42:01,953 --> 00:42:07,709
そうか? そうかのう。
お市様とのう…。
442
00:42:07,709 --> 00:42:13,709
お~ 茶じゃ。 茶。 茶々様がのう。
ウハハハハハ!
443
00:42:15,384 --> 00:42:17,552
何なのじゃ? 江。
444
00:42:17,552 --> 00:42:21,723
姉上は 私たちを守ると
言って下さいました。
445
00:42:21,723 --> 00:42:23,725
それが?
446
00:42:23,725 --> 00:42:29,025
姉上は この私が守ります!
守る?
447
00:42:33,719 --> 00:42:38,790
羽柴秀吉 猿からでございます。
448
00:42:38,790 --> 00:42:50,902
♪♪~
449
00:42:50,902 --> 00:42:57,392
<我が長女 茶々に対する
秀吉の邪心に→
450
00:42:57,392 --> 00:43:01,062
早くも気づいた
江にございました>
451
00:43:01,062 --> 00:43:05,762
守って…
守り抜いてみせまする。
452
00:43:07,719 --> 00:43:11,873
お茶々様にだけは ゆめゆめ
手出しなさいませぬよう。
453
00:43:11,873 --> 00:43:15,727
茶々様ではござりませぬ。
江様にござる。
454
00:43:15,727 --> 00:43:18,063
何で私が?
命じられれば→
455
00:43:18,063 --> 00:43:20,715
そなたは 何でもするのか?
いつか→
456
00:43:20,715 --> 00:43:25,053
母上の仇を討ちまする!
457
00:43:25,053 --> 00:43:27,556
お茶々様は どうされたい?
458
00:43:27,556 --> 00:43:31,356
母の仇を討ちたい。
秀吉を殺してやりたいのです。
459
00:43:34,896 --> 00:43:37,549
<伊勢神宮に程近く→
460
00:43:37,549 --> 00:43:42,053
古くから軍事的要衝としても
栄えた 田丸に→
461
00:43:42,053 --> 00:43:50,045
織田信長の次男 信雄が居城とした
田丸城があります。→
462
00:43:50,045 --> 00:43:55,050
この地を治めていた
北畠氏を取り込むため→
463
00:43:55,050 --> 00:44:01,056
尾張統一を果たした信長は
幼い信雄を養子として送り込み→
464
00:44:01,056 --> 00:44:05,060
家督を継がせたのです。→
465
00:44:05,060 --> 00:44:09,898
信雄は
この地から各地の合戦に出陣。→
466
00:44:09,898 --> 00:44:14,386
しかし
独断で進めた伊賀攻めに大敗し→
467
00:44:14,386 --> 00:44:20,725
信長の激しい叱責を
受けたといいます。→
468
00:44:20,725 --> 00:44:27,732
その後 信雄は 伊勢湾に近い
松ヶ島城に移りますが→
469
00:44:27,732 --> 00:44:34,432
本能寺の変が起こり
偉大なる父を失います>
470
00:44:36,725 --> 00:44:40,562
<思いがけず
織田家の後継者争いに→
471
00:44:40,562 --> 00:44:44,065
加わることになった
信雄の野心が→
472
00:44:44,065 --> 00:44:51,065
江の運命を
大きく変えることになるのです>
| {
"pile_set_name": "Github"
} |
'use strict';
var value = require('../object/valid-value');
module.exports = function (name) {
return function (o) { return value(o)[name]; };
};
| {
"pile_set_name": "Github"
} |
<template>
<div>
<Example :component="ExSimple" :code="ExSimpleCode" vertical/>
<Example :component="ExSizes" :code="ExSizesCode" title="Sizes" vertical/>
<Example :component="ExTypes" :code="ExTypesCode" title="Types" vertical/>
<Example :component="ExRadioButton" :code="ExRadioButtonCode" title="Radio Button">
<p>You have to wrap them on a <router-link to="/documentation/field">Field</router-link>.</p>
</Example>
<ApiView :data="api"/>
<VariablesView :data="variables"/>
</div>
</template>
<script>
import api from './api/radio'
import variables from './variables/radio'
import ExSimple from './examples/ExSimple'
import ExSimpleCode from '!!raw-loader!./examples/ExSimple'
import ExSizes from './examples/ExSizes'
import ExSizesCode from '!!raw-loader!./examples/ExSizes'
import ExTypes from './examples/ExTypes'
import ExTypesCode from '!!raw-loader!./examples/ExTypes'
import ExRadioButton from './examples/ExRadioButton'
import ExRadioButtonCode from '!!raw-loader!./examples/ExRadioButton'
export default {
data() {
return {
api,
variables,
ExSimple,
ExSizes,
ExTypes,
ExRadioButton,
ExSimpleCode,
ExSizesCode,
ExTypesCode,
ExRadioButtonCode
}
}
}
</script>
| {
"pile_set_name": "Github"
} |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace AppUIBasics.ControlPages
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class ButtonPage : Page
{
public ButtonPage()
{
this.InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Button b = sender as Button;
if (b != null)
{
string name = b.Name;
switch (name)
{
case "Button1":
Control1Output.Text = "You clicked: " + name;
break;
case "Button2":
Control2Output.Text = "You clicked: " + name;
break;
case "Button3":
Control3Output.Text = "You clicked: " + name;
break;
case "Button4":
Control4Output.Text = "You clicked: " + name;
break;
}
}
}
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.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="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{87C164B2-7346-C612-4C6B-4927B29EFF9F}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>boringssl_evp_test_lib</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>boringssl_evp_test_lib</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>false</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>false</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>false</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>false</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\third_party\boringssl\crypto\evp\evp_test.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\boringssl_test_util\boringssl_test_util.vcxproj">
<Project>{427037B1-B51B-D6F1-5025-AD12B200266A}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\boringssl\boringssl.vcxproj">
<Project>{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
</Target>
</Project>
| {
"pile_set_name": "Github"
} |
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSObject-Protocol.h"
@protocol IDEEditorMultipleContextDelegate <NSObject>
- (id)editorArea;
- (void)editorMultipleContext:(id)arg1 didSplitEditorContext:(id)arg2 creatingEditorContext:(id)arg3;
@end
| {
"pile_set_name": "Github"
} |
/* Localized versions of Info.plist keys */
| {
"pile_set_name": "Github"
} |
resource "google_compute_global_network_endpoint" "<%= ctx[:primary_resource_id] %>" {
global_network_endpoint_group = google_compute_global_network_endpoint_group.neg.name
fqdn = "www.example.com"
port = 90
ip_address = "8.8.8.8"
}
resource "google_compute_global_network_endpoint_group" "neg" {
name = "<%= ctx[:vars]['neg_name'] %>"
default_port = "90"
network_endpoint_type = "INTERNET_IP_PORT"
}
| {
"pile_set_name": "Github"
} |
#! /bin/sh
: 'This file is in the public domain, so clarified as of'
: '2006-07-17 by Arthur David Olson.'
case $#-$1 in
2-|2-0*|2-*[!0-9]*)
echo "$0: wild year - $1" >&2
exit 1 ;;
esac
case $#-$2 in
2-even)
case $1 in
*[24680]) exit 0 ;;
*) exit 1 ;;
esac ;;
2-nonpres|2-nonuspres)
case $1 in
*[02468][048]|*[13579][26]) exit 1 ;;
*) exit 0 ;;
esac ;;
2-odd)
case $1 in
*[13579]) exit 0 ;;
*) exit 1 ;;
esac ;;
2-uspres)
case $1 in
*[02468][048]|*[13579][26]) exit 0 ;;
*) exit 1 ;;
esac ;;
2-*)
echo "$0: wild type - $2" >&2 ;;
esac
echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
exit 1
| {
"pile_set_name": "Github"
} |
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Test debug events when we listen to all exceptions and
// there is a catch handler for the exception thrown in a Promise.
// We expect a normal Exception debug event to be triggered.
Debug = debug.Debug;
var expected_events = 1;
var log = [];
class P extends Promise {
constructor(...args) {
super(...args);
return new Proxy(this, {
get(target, property, receiver) {
if (property in target) {
return Reflect.get(target, property, receiver);
} else {
return (...args) =>
new Promise((resolve, reject) =>
target.then(v => resolve(v[property](...args)))
.catch(reject)
);
}
}
});
}
}
P.resolve({doStuff(){log.push(1)}}).doStuff()
function listener(event, exec_state, event_data, data) {}
Debug.setBreakOnUncaughtException();
Debug.setListener(listener);
%PerformMicrotaskCheckpoint();
| {
"pile_set_name": "Github"
} |
#include "BigIntegerAlgorithms.hh"
BigUnsigned gcd(BigUnsigned a, BigUnsigned b) {
BigUnsigned trash;
// Neat in-place alternating technique.
for (;;) {
if (b.isZero())
return a;
a.divideWithRemainder(b, trash);
if (a.isZero())
return b;
b.divideWithRemainder(a, trash);
}
}
void extendedEuclidean(BigInteger m, BigInteger n,
BigInteger &g, BigInteger &r, BigInteger &s) {
if (&g == &r || &g == &s || &r == &s)
throw "BigInteger extendedEuclidean: Outputs are aliased";
BigInteger r1(1), s1(0), r2(0), s2(1), q;
/* Invariants:
* r1*m(orig) + s1*n(orig) == m(current)
* r2*m(orig) + s2*n(orig) == n(current) */
for (;;) {
if (n.isZero()) {
r = r1; s = s1; g = m;
return;
}
// Subtract q times the second invariant from the first invariant.
m.divideWithRemainder(n, q);
r1 -= q*r2; s1 -= q*s2;
if (m.isZero()) {
r = r2; s = s2; g = n;
return;
}
// Subtract q times the first invariant from the second invariant.
n.divideWithRemainder(m, q);
r2 -= q*r1; s2 -= q*s1;
}
}
BigUnsigned modinv(const BigInteger &x, const BigUnsigned &n) {
BigInteger g, r, s;
extendedEuclidean(x, n, g, r, s);
if (g == 1)
// r*x + s*n == 1, so r*x === 1 (mod n), so r is the answer.
return (r % n).getMagnitude(); // (r % n) will be nonnegative
else
throw "BigInteger modinv: x and n have a common factor";
}
BigUnsigned modexp(const BigInteger &base, const BigUnsigned &exponent,
const BigUnsigned &modulus) {
BigUnsigned ans = 1, base2 = (base % modulus).getMagnitude();
BigUnsigned::Index i = exponent.bitLength();
// For each bit of the exponent, most to least significant...
while (i > 0) {
i--;
// Square.
ans *= ans;
ans %= modulus;
// And multiply if the bit is a 1.
if (exponent.getBit(i)) {
ans *= base2;
ans %= modulus;
}
}
return ans;
}
| {
"pile_set_name": "Github"
} |
% Optimal doping profile optimization
% Boyd, Kim, Vandenberghe, and Hassibi, "A tutorial on geometric programming"
% Joshi, Boyd, and Dutton, "Optimal doping profiles via geometric programming"
% Written for CVX by Almir Mutapcic 02/08/06
% (a figure is generated)
%
% Determines the optimal doping profile that minimizes base transit
% time in a (homojunction) bipolar junction transistor.
% This problem can be posed as a GP:
%
% minimize tau_B
% s.t. Nmin <= v <= Nmax
% y_(i+1) + v_i^const1 <= y_i
% w_(i+1) + v_i^const2 <= w_i, etc...
%
% where variables are v_i, y_i, and w_i.
% discretization size
M = 50;
% M = 1000; % takes a few minutes to process constraints
% problem constants
g1 = 0.42;
g2 = 0.69;
Nmax = 5*10^18;
Nmin = 5*10^16;
Nref = 10^17;
Dn0 = 20.72;
ni0 = 1.4*(10^10);
WB = 10^(-5);
C = WB^2/((M^2)*(Nref^g1)*Dn0);
% exponent powers
pwi = g2 -1;
pwj = 1+g1-g2;
% optimization variables
cvx_begin gp
variables v(M) y(M) w(M)
% objective function is the base transmit time
tau_B = C*w(1);
minimize( tau_B )
subject to
% problem constraints
v >= Nmin;
v <= Nmax;
for i = 1:M-1
if( mod(i,100) == 0 ), fprintf(1,'progress counter: %d\n',i), end;
y(i+1) + v(i)^pwj <= y(i);
w(i+1) + y(i)*v(i)^pwi <= w(i);
end
y(M) == v(M)^pwj;
w(M) == y(M)*v(M)^pwi;
cvx_end
% plot the basic optimal doping profile
figure, clf
nbw = 0:1/M:1-1/M;
semilogy(nbw,v,'LineWidth',2);
axis([0 1 1e16 1e19]);
xlabel('base');
ylabel('doping');
text(0,Nmin,'Nmin ', 'HorizontalAlignment','right');
text(0,Nmax,'Nmax ', 'HorizontalAlignment','right');
disp('Optimal doping profile is plotted.')
| {
"pile_set_name": "Github"
} |
'use strict';
define('forum/account/edit/password', ['forum/account/header', 'translator', 'zxcvbn'], function (header, translator, zxcvbn) {
var AccountEditPassword = {};
AccountEditPassword.init = function () {
header.init();
handlePasswordChange();
};
function handlePasswordChange() {
var currentPassword = $('#inputCurrentPassword');
var password_notify = $('#password-notify');
var password_confirm_notify = $('#password-confirm-notify');
var password = $('#inputNewPassword');
var password_confirm = $('#inputNewPasswordAgain');
var passwordvalid = false;
var passwordsmatch = false;
function onPasswordChanged() {
var passwordStrength = zxcvbn(password.val());
passwordvalid = false;
if (password.val().length < ajaxify.data.minimumPasswordLength) {
showError(password_notify, '[[reset_password:password_too_short]]');
} else if (password.val().length > 512) {
showError(password_notify, '[[error:password-too-long]]');
} else if (!utils.isPasswordValid(password.val())) {
showError(password_notify, '[[user:change_password_error]]');
} else if (password.val() === ajaxify.data.username) {
showError(password_notify, '[[user:password_same_as_username]]');
} else if (password.val() === ajaxify.data.email) {
showError(password_notify, '[[user:password_same_as_email]]');
} else if (passwordStrength.score < ajaxify.data.minimumPasswordStrength) {
showError(password_notify, '[[user:weak_password]]');
} else {
showSuccess(password_notify);
passwordvalid = true;
}
}
function onPasswordConfirmChanged() {
if (password.val() !== password_confirm.val()) {
showError(password_confirm_notify, '[[user:change_password_error_match]]');
passwordsmatch = false;
} else {
if (password.val()) {
showSuccess(password_confirm_notify);
} else {
password_confirm_notify.parent().removeClass('alert-success alert-danger');
password_confirm_notify.children().show();
password_confirm_notify.find('.msg').html('');
}
passwordsmatch = true;
}
}
password.on('blur', onPasswordChanged);
password_confirm.on('blur', onPasswordConfirmChanged);
$('#changePasswordBtn').on('click', function () {
onPasswordChanged();
onPasswordConfirmChanged();
var btn = $(this);
if (passwordvalid && passwordsmatch) {
btn.addClass('disabled').find('i').removeClass('hide');
socket.emit('user.changePassword', {
currentPassword: currentPassword.val(),
newPassword: password.val(),
uid: ajaxify.data.theirid,
}, function (err) {
btn.removeClass('disabled').find('i').addClass('hide');
currentPassword.val('');
password.val('');
password_confirm.val('');
password_notify.parent().removeClass('show-success show-danger');
password_confirm_notify.parent().removeClass('show-success show-danger');
passwordsmatch = false;
passwordvalid = false;
if (err) {
return app.alertError(err.message);
}
if (parseInt(app.user.uid, 10) === parseInt(ajaxify.data.uid, 10)) {
window.location.href = config.relative_path + '/login';
} else {
ajaxify.go('user/' + ajaxify.data.userslug + '/edit');
}
});
} else {
if (!passwordsmatch) {
app.alertError('[[user:change_password_error_match]]');
}
if (!passwordvalid) {
app.alertError('[[user:change_password_error]]');
}
}
return false;
});
}
function showError(element, msg) {
translator.translate(msg, function (msg) {
element.html(msg);
element.parent()
.removeClass('show-success')
.addClass('show-danger');
});
}
function showSuccess(element) {
element.html('');
element.parent()
.removeClass('show-danger')
.addClass('show-success');
}
return AccountEditPassword;
});
| {
"pile_set_name": "Github"
} |
# 1.2 Vagrant安装配置
实际上Vagrant只是一个让你可以方便设置你想要的虚拟机的便携式工具,它底层支持VirtualBox、VMware甚至AWS作为虚拟机系统,本书中我们将使用VirtualBox来进行说明,所以第一步需要先安裝Vagrant和VirtualBox。
## VirtualBox安装
VirtualBox是Oracle开源的虚拟化系统,它支持多个平台,所以你可以到官方网站:https://www.virtualbox.org/wiki/Downloads/ 下载适合你平台的VirtualBox最新版本并安装,它的安装过程都很傻瓜化,一步一步执行就可以完成安装了。
## Vagrant安装
最新版本的Vagrant已经无法通过`gem`命令来安装,因为依赖库太多了,所以目前无法使用`gem`来安装,目前网络上面很多教程还是类似这样的命令,那些都是错误的。目前唯一安装的办法就是到官方网站下载打包好的安装包:http://www.vagrantup.com/downloads.html 他的安装过程和VirtualBox的安装一样都是傻瓜化安装,一步一步执行就可以完成安装。
>>>尽量下载最新的程序,因为VirtualBox经常升级,升级后有些接口会变化,老的Vagrant可能无法使用。
要想检测安装是否成功,可以打开终端命令行工具,输入`vagrant`,看看程序是不是已经可以运行了。如果不行,请检查一下$PATH里面是否包含`vagrant`所在的路径。
## Vagrant配置
当我们安装好VirtualBox和Vagrant后,我们要开始考虑在VM上使用什么操作系统了,一个打包好的操作系统在Vagrant中称为Box,即Box是一个打包好的操作系统环境,目前网络上什么都有,所以你不用自己去制作操作系统或者制作Box:[vagrantbox.es](http://www.vagrantbox.es/)上面有大家熟知的大多数操作系统,你只需要下载就可以了,下载主要是为了安装的时候快速,当然Vagrant也支持在线安装。
### 建立开发环境目录
我的开发机是Mac,所以我建立了如下的开发环境目录,读者可以根据自己的系统不同建立一个目录就可以:
/Users/astaxie/vagrant
### 下载box
前面讲了box是一个操作系统环境,实际上它是一个zip包,包含了Vagrant的配置信息和VirtualBox的虚拟机镜像文件.我们这一次的实战使用官方提供了一个box:Ubuntu lucid 64 http://files.vagrantup.com/lucid64.box
当然你也可以选一个自己团队在用的系统,例如CentOS、Debian等,我们可以通过上面说的地址下载开源爱好者们制作好的box。当然你自己做一个也行,下一节我会讲述如何自己制作包。
### 添加box
添加box的命令如下:
vagrant box add base 远端的box地址或者本地的box文件名
`vagrant box add` 是添加box的命令
`base`是box的名称,可以是任意的字符串,`base`是默认名称,主要用来标识一下你添加的box,后面的命令都是基于这个标识来操作的。
例子:
vagrant box add base http://files.vagrantup.com/lucid64.box
vagrant box add base https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box
vagrant box add base CentOS-6.3-x86_64-minimal.box
vagrant box add "CentOS 6.3 x86_64 minimal" CentOS-6.3-x86_64-minimal.box
我在开发机上面是这样操作的,首先进入我们的开发环境目录`/Users/astaxie/vagrant`,执行如下的命令
vagrant box add base lucid64.box
安装过程的信息:
Downloading or copying the box...
Extracting box...te: 47.5M/s, Estimated time remaining: --:--:--)
Successfully added box 'base' with provider 'virtualbox'!
box中的镜像文件被放到了:`/Users/astaxie/.vagrant.d/boxes/`,如果在window系统中应该是放到了:
`C:\Users\当前用户名\.vagrant.d\boxes\`目录下。
通过`vagrant box add`这样的方式安装远程的box,可能很慢,所以建议大家先下载box到本地再执行这样的操作。
### 初始化
初始化的命令如下:
vagrant init
如果你添加的box名称不是base,那么需要在初始化的时候指定名称,例如
vagrant init "CentOS 6.3 x86_64 minimal"
初始化过程的信息:
A `Vagrantfile` has been placed in this directory.
You are now ready to `vagrant up` your first virtual environment!
Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.
这样就会在当前目录生成一个 `Vagrantfile`的文件,里面有很多配置信息,后面我们会详细讲解每一项的含义,但是默认的配置就可以开箱即用。
### 启动虚拟机
启动虚拟机的命令如下:
vagrant up
启动过程的信息:
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'base'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- /vagrant
### 连接到虚拟机
上面已经启动了虚拟机,之后我们就可以通过ssh来连接到虚拟机了。比如在我的开发机中可以像这样来连接:
vagrant ssh
连接到虚拟机后的信息如下:
Linux lucid64 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
Ubuntu 10.04.4 LTS
Welcome to the Ubuntu Server!
* Documentation: http://www.ubuntu.com/server/doc
New release 'precise' available.
Run 'do-release-upgrade' to upgrade to it.
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 07:31:39 2012 from 10.0.2.2
这样我们就可以像连接到一台服务器一样进行操作了。
>>>window机器不支持这样的命令,必须使用第三方客户端来进行连接,例如putty、Xshell4等.
>>>putty为例:
>>>主机地址: 127.0.0.1
>>>端口: 2222
>>>用户名: vagrant
>>>密码: vagrant
### 系统信息
进入系统之后我们可以看一下系统的基础信息:
vagrant@lucid64:/vagrant$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/lucid64-root
78G 945M 73G 2% /
none 179M 176K 179M 1% /dev
none 184M 0 184M 0% /dev/shm
none 184M 64K 184M 1% /var/run
none 184M 0 184M 0% /var/lock
none 184M 0 184M 0% /lib/init/rw
none 78G 945M 73G 2% /var/lib/ureadahead/debugfs
/dev/sda1 228M 17M 199M 8% /boot
/vagrant 298G 76G 222G 26% /vagrant
`/vagrant`这个目录是自动映射的,被映射到`/Users/astaxie/vagrant`,这样就方便我们以后在开发机中进行开发,在虚拟机中进行运行效果测试了。
### Vagrantfile配置文件详解
在我们的开发目录下有一个文件`Vagrantfile`,里面包含有大量的配置信息,主要包括三个方面的配置,虚拟机的配置、SSH配置、Vagrant的一些基础配置。Vagrant是使用Ruby开发的,所以它的配置语法也是Ruby的,但是我们没有学过Ruby的人还是可以跟着它的注释知道怎么配置一些基本项的配置。
1. box设置
config.vm.box = "base"
上面这配置展示了Vagrant要去启用那个box作为系统,也就是上面我们输入`vagrant init Box名称`时所指定的box,如果沒有输入box名称的話,那么默认就是`base`,VirtualBox提供了VBoxManage这个命令行工具,可以让我们设定VM,用`modifyvm`这个命令让我们可以设定VM的名称和内存大小等等,这里说的名称指的是在VirtualBox中显示的名称,我们也可以在Vagrantfile中进行设定,在Vagrantfile中加入如下这行就可以设定了:
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--name", "astaxie", "--memory", "512"]
end
这行设置的意思是调用VBoxManage的`modifyvm`的命令,设置VM的名称为`astaxie`,内存为512MB。你可以类似的通过定制其它VM属性来定制你自己的VM。
2. 网络设置
Vagrant有两种方式来进行网络连接,一种是host-only(主机模式),意思是主机和虚拟机之间的网络互访,而不是虚拟机访问internet的技术,也就是只有你一個人自High,其他人访问不到你的虚拟机。另一种是Bridge(桥接模式),该模式下的VM就像是局域网中的一台独立的主机,也就是说需要VM到你的路由器要IP,这样的话局域网里面其他机器就可以访问它了,一般我们设置虚拟机都是自high为主,所以我们的设置一般如下:
config.vm.network :private_network, ip: "11.11.11.11"
这里我们虚拟机设置为hostonly,并且指定了一个IP,IP的话建议最好不要用`192.168..`这个网段,因为很有可能和你局域网里面的其它机器IP冲突,所以最好使用类似`11.11..`这样的IP地址。
3. hostname设置
`hostname`的设置非常简单,Vagrantfile中加入下面这行就可以了:
config.vm.hostname = "go-app"
设置`hostname`非常重要,因为当我们有很多台虚拟服务器的时候,都是依靠`hostname`來做识别的,例如Puppet或是Chef,都是通过`hostname`來做识别的,既然设置那么简单,所以我们就別偷懒,设置一个。
4. 同步目录
我们上面介绍过`/vagrant`目录默认就是当前的开发目录,这是在虚拟机开启的时候默认挂载同步的。我们还可以通过配置来设置额外的同步目录:
config.vm.synced_folder "/Users/astaxie/data", "/vagrant_data"
上面这个设定,第一个参数是主机的目录,第二个参数是虚拟机挂载的目录
5. 端口转发
config.vm.network :forwarded_port, guest: 80, host: 8080
上面这句配置可厉害了,这一行的意思是把对host机器上8080端口的访问请求forward到虚拟机的80端口的服务上,例如你在你的虚拟机上使用nginx跑了一个Go应用,那么你在host机器上的浏览器中打开`http://localhost:8080`时,Vagrant就会把这个请求转发到VM里面跑在80端口的nginx服务上,因此我们可以通过这个设置来帮助我们去设定host和VM之间,或是VM和VM之间的信息交互。
>>>修改完Vagrantfile的配置后,记得要用`vagrant reload`命令来重启VM之后才能使用VM更新后的配置
## links
* [目录](preface.md)
* 上一节: [Vagrant的介绍](01.1.md)
* 下一节: [Vagrant使用入门](01.3.md)
| {
"pile_set_name": "Github"
} |
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
// You may push code into the target .java compilation unit if you wish to edit any member(s).
package nl.bzk.brp.model.data.autaut;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import nl.bzk.brp.model.data.autaut.Toestand;
privileged aspect Toestand_Roo_Jpa_Entity {
declare @type: Toestand: @Entity;
declare @type: Toestand: @Table(schema = "autaut", name = "toestand");
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", columnDefinition = "int2")
private Short Toestand.id;
public Short Toestand.getId() {
return this.id;
}
public void Toestand.setId(Short id) {
this.id = id;
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?><module fritzingVersion="0.7.2b" moduleId="SparkFun-Sensors-SCP1000_D01-SMD">
<!-- generated from Sparkfun Eagle Library 'SparkFun-Sensors' SCP1000_D01 SMD -->
<version>4</version>
<date>2013-02-13</date>
<label>U</label>
<author>www.fritzing.org</author>
<description>Barometric pressure sensor. Schematic elements and footprint production proven. Spark Fun Electronics SKU : COM-08128</description>
<title>SCP1000_D01</title>
<tags>
<tag>SMD</tag>
<tag>SCP1000</tag>
<tag>SCP1000_D01</tag>
</tags>
<properties>
<property name="package">scp1000</property>
<property name="family">sparkfun Barometric pressure sensor</property>
<property name="variant">smd</property>
</properties>
<views>
<breadboardView>
<layers image="breadboard/sparkfun-sensors_scp1000_breadboard.svg">
<layer layerId="breadboard"/>
</layers>
</breadboardView>
<schematicView>
<layers image="schematic/sparkfun-sensors_scp1000_d01_schematic.svg">
<layer layerId="schematic"/>
</layers>
</schematicView>
<pcbView>
<layers image="pcb/sparkfun-sensors_scp1000_pcb.svg">
<layer layerId="copper1"/>
<layer layerId="silkscreen"/>
</layers>
</pcbView>
<iconView>
<layers image="icon/SCP1000.svg">
<layer layerId="icon"/>
</layers>
</iconView>
</views>
<connectors>
<connector id="connector4" name="ATST" type="male">
<description>ATST</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector4pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector4pin" terminalId="connector4terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector4pad"/>
</pcbView>
</views>
</connector>
<connector id="connector5" name="AVDD" type="male">
<description>AVDD</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector5pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector5pin" terminalId="connector5terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector5pad"/>
</pcbView>
</views>
</connector>
<connector id="connector6" name="AVSS" type="male">
<description>AVSS</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector6pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector6pin" terminalId="connector6terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector6pad"/>
</pcbView>
</views>
</connector>
<connector id="connector7" name="CLK" type="male">
<description>CLK</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector7pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector7pin" terminalId="connector7terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector7pad"/>
</pcbView>
</views>
</connector>
<connector id="connector8" name="CSB" type="male">
<description>CSB</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector8pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector8pin" terminalId="connector8terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector8pad"/>
</pcbView>
</views>
</connector>
<connector id="connector9" name="DRDY" type="male">
<description>DRDY</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector9pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector9pin" terminalId="connector9terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector9pad"/>
</pcbView>
</views>
</connector>
<connector id="connector10" name="DVDD" type="male">
<description>DVDD</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector10pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector10pin" terminalId="connector10terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector10pad"/>
</pcbView>
</views>
</connector>
<connector id="connector11" name="DVDDS" type="male">
<description>DVDDS</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector11pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector11pin" terminalId="connector11terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector11pad"/>
</pcbView>
</views>
</connector>
<connector id="connector12" name="DVSS" type="male">
<description>DVSS</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector12pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector12pin" terminalId="connector12terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector12pad"/>
</pcbView>
</views>
</connector>
<connector id="connector13" name="MISO" type="male">
<description>MISO</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector13pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector13pin" terminalId="connector13terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector13pad"/>
</pcbView>
</views>
</connector>
<connector id="connector14" name="MOSI" type="male">
<description>MOSI</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector14pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector14pin" terminalId="connector14terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector14pad"/>
</pcbView>
</views>
</connector>
<connector id="connector15" name="PD" type="male">
<description>PD</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector15pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector15pin" terminalId="connector15terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector15pad"/>
</pcbView>
</views>
</connector>
<connector id="connector16" name="SCK" type="male">
<description>SCK</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector16pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector16pin" terminalId="connector16terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector16pad"/>
</pcbView>
</views>
</connector>
<connector id="connector17" name="TRIG" type="male">
<description>TRIG</description>
<views>
<breadboardView>
<p layer="breadboard" svgId="connector17pin"/>
</breadboardView>
<schematicView>
<p layer="schematic" svgId="connector17pin" terminalId="connector17terminal"/>
</schematicView>
<pcbView>
<p layer="copper1" svgId="connector17pad"/>
</pcbView>
</views>
</connector>
</connectors>
<buses>
</buses>
</module> | {
"pile_set_name": "Github"
} |
(function ($) {
$.Redactor.opts.langs['by'] = {
html: 'Код',
video: 'Відэа',
image: 'Малюнак',
table: 'Табліца',
link: 'Спасылка',
link_insert: 'Уставіць спасылку ...',
link_edit: 'Edit link',
unlink: 'Выдаліць спасылку',
formatting: 'Стылі',
paragraph: 'Звычайны тэкст',
quote: 'Цытата',
code: 'Код',
header1: 'Загаловак 1',
header2: 'Загаловак 2',
header3: 'Загаловак 3',
header4: 'Загаловак 4',
header5: 'Загаловак 5',
bold: 'Паўтлусты',
italic: 'Нахільны',
fontcolor: 'Колер тэксту',
backcolor: 'Заліванне тэксту',
unorderedlist: 'Звычайны спіс',
orderedlist: 'Нумараваны спіс',
outdent: 'Паменьшыць водступ',
indent: 'Павялічыць водступ',
cancel: 'Адмяніць',
insert: 'Уставіць',
save: 'Захаваць',
_delete: 'Выдаліць',
insert_table: 'Уставіць табліцу',
insert_row_above: 'Дадаць радок зверху',
insert_row_below: 'Дадаць радок знізу',
insert_column_left: 'Дадаць слупок злева',
insert_column_right: 'Дадаць слупок справа',
delete_column: 'Выдаліць слупок',
delete_row: 'Выдаліць радок',
delete_table: 'Выдаліць табліцу',
rows: 'Радкі',
columns: 'Стаўбцы',
add_head: 'Дадаць загаловак',
delete_head: 'Выдаліць загаловак',
title: 'Падказка',
image_view: 'Запампаваць малюнак',
image_position: 'Абцяканне тэкстам',
none: 'Няма',
left: 'Злева',
right: 'Справа',
image_web_link: 'Спасылка на малюнак',
text: 'Тэкст',
mailto: 'Эл. пошта ',
web: 'URL',
video_html_code: 'Код відэа роліка',
file: 'Файл',
upload: 'Загрузіць',
download: 'Запампаваць',
choose: 'Выбраць',
or_choose: 'Ці іншае',
drop_file_here: 'Перацягніце файл сюды',
align_left: 'Па левым краі',
align_center: 'Па цэнтры',
align_right: 'Па правым краі',
align_justify: 'Выраўнаваць тэкст па шырыні',
horizontalrule: 'Гарызантальная лінейка',
fullscreen: 'Ва ўвесь экран',
deleted: 'Закрэслены',
anchor: 'Anchor',
link_new_tab: 'Open link in new tab',
underline: 'Underline',
alignment: 'Alignment',
filename: 'Name (optional)',
edit: 'Edit',
center: 'Center'
};
})( jQuery ); | {
"pile_set_name": "Github"
} |
public aspect Logger {
after(): call(* approximate(..)) {
if (CalculatePI.iteration%10000==0)
System.out.println("Approximation is now:"+
(CalculatePI.inCircle/CalculatePI.inSquare)*4.0f);
}
} | {
"pile_set_name": "Github"
} |
<?php
final class PhabricatorFulltextToken extends Phobject {
private $token;
private $isShort;
private $isStopword;
public function setToken(PhutilSearchQueryToken $token) {
$this->token = $token;
return $this;
}
public function getToken() {
return $this->token;
}
public function isQueryable() {
return !$this->getIsShort() && !$this->getIsStopword();
}
public function setIsShort($is_short) {
$this->isShort = $is_short;
return $this;
}
public function getIsShort() {
return $this->isShort;
}
public function setIsStopword($is_stopword) {
$this->isStopword = $is_stopword;
return $this;
}
public function getIsStopword() {
return $this->isStopword;
}
public function newTag() {
$token = $this->getToken();
$tip = null;
$icon = null;
$name = $token->getValue();
$function = $token->getFunction();
if ($function !== null) {
$name = pht('%s: %s', $function, $name);
}
if ($this->getIsShort()) {
$shade = PHUITagView::COLOR_GREY;
$tip = pht('Ignored Short Word');
} else if ($this->getIsStopword()) {
$shade = PHUITagView::COLOR_GREY;
$tip = pht('Ignored Common Word');
} else {
$operator = $token->getOperator();
switch ($operator) {
case PhutilSearchQueryCompiler::OPERATOR_NOT:
$shade = PHUITagView::COLOR_RED;
$icon = 'fa-minus';
break;
case PhutilSearchQueryCompiler::OPERATOR_SUBSTRING:
$tip = pht('Substring Search');
$shade = PHUITagView::COLOR_VIOLET;
break;
case PhutilSearchQueryCompiler::OPERATOR_EXACT:
$tip = pht('Exact Search');
$shade = PHUITagView::COLOR_GREEN;
break;
case PhutilSearchQueryCompiler::OPERATOR_PRESENT:
$name = pht('Field Present: %s', $function);
$shade = PHUITagView::COLOR_GREEN;
break;
case PhutilSearchQueryCompiler::OPERATOR_ABSENT:
$name = pht('Field Absent: %s', $function);
$shade = PHUITagView::COLOR_RED;
break;
default:
$shade = PHUITagView::COLOR_BLUE;
break;
}
}
$tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setColor($shade)
->setName($name);
if ($tip !== null) {
Javelin::initBehavior('phabricator-tooltips');
$tag
->addSigil('has-tooltip')
->setMetadata(
array(
'tip' => $tip,
));
}
if ($icon !== null) {
$tag->setIcon($icon);
}
return $tag;
}
}
| {
"pile_set_name": "Github"
} |
---
title: 使用 DataView 进行筛选 (LINQ to DataSet)
ms.date: 03/30/2017
dev_langs:
- csharp
- vb
ms.assetid: 5632d74a-ff53-4ea7-9fe7-4a148eeb1c68
ms.openlocfilehash: 9b4c8e9730dde7d19df9e6a11052ae4591465ea7
ms.sourcegitcommit: 5b475c1855b32cf78d2d1bbb4295e4c236f39464
ms.translationtype: MT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/24/2020
ms.locfileid: "91177457"
---
# <a name="filtering-with-dataview-linq-to-dataset"></a>使用 DataView 进行筛选 (LINQ to DataSet)
使用特定条件筛选数据,然后通过 UI 控件在客户端中表示该数据的能力是数据绑定的一个重要特征。 <xref:System.Data.DataView> 提供多种方式来筛选数据并返回满足指定筛选条件的数据行子集。 除了基于字符串的筛选功能以外, <xref:System.Data.DataView> 还提供了对筛选条件使用 LINQ 表达式的功能。 LINQ 表达式允许执行比基于字符串的筛选更复杂而功能更强大的筛选操作。
使用 <xref:System.Data.DataView> 筛选数据有两种方式:
- <xref:System.Data.DataView>使用 Where 子句从 LINQ to DataSet 查询创建。
- 使用 <xref:System.Data.DataView> 现有的基于字符串的筛选功能。
## <a name="creating-dataview-from-a-query-with-filtering-information"></a>通过具有筛选信息的查询创建 DataView
<xref:System.Data.DataView>可以通过 LINQ to DataSet 查询来创建对象。 如果该查询包含一个 `Where` 子句,则会使用查询中的筛选信息创建 <xref:System.Data.DataView>。 `Where` 子句中的表达式用于确定哪些数据行将包括在 <xref:System.Data.DataView> 中并作为筛选器的基础。
基于表达式的筛选器具有比基于字符串的简单筛选器更强大、更复杂的筛选功能。 基于字符串的筛选器和基于表达式的筛选器是互相排斥的。 如果在通过查询创建 <xref:System.Data.DataView.RowFilter%2A> 后设置基于字符串的 <xref:System.Data.DataView>,则会清除从查询推断的基于表达式的筛选器。
> [!NOTE]
> 在大多数情况下,用于筛选的表达式不应有副作用且必须是确定的。 另外,表达式不应包含依赖于固定执行次数的任何逻辑,因为筛选操作可能会执行任意次。
### <a name="example"></a>示例
下面的示例查询 SalesOrderDetail 表中数量大于 2 且小于 6 的订单,通过查询创建 <xref:System.Data.DataView>,并将 <xref:System.Data.DataView> 绑定到 <xref:System.Windows.Forms.BindingSource>:
[!code-csharp[DP DataView Samples#LDVFromQueryWhere](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvfromquerywhere)]
[!code-vb[DP DataView Samples#LDVFromQueryWhere](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvfromquerywhere)]
### <a name="example"></a>示例
下面的示例通过查询 2001 年 6 月 6 日以后达成的订单来创建 <xref:System.Data.DataView>:
[!code-csharp[DP DataView Samples#LDVFromQueryWhere3](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvfromquerywhere3)]
[!code-vb[DP DataView Samples#LDVFromQueryWhere3](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvfromquerywhere3)]
### <a name="example"></a>示例
筛选也可以与排序组合使用。 下面的示例通过查询姓氏以“S”开始并按姓氏排序,然后按名字排序的联系人来创建 <xref:System.Data.DataView>:
[!code-csharp[DP DataView Samples#LDVFromQueryWhereOrderByThenBy](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvfromquerywhereorderbythenby)]
[!code-vb[DP DataView Samples#LDVFromQueryWhereOrderByThenBy](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvfromquerywhereorderbythenby)]
### <a name="example"></a>示例
下面的示例使用 SoundEx 算法查找姓氏与“Zhu”相近的联系人。 SoundEx 算法在 SoundEx 方法中实现。
[!code-csharp[DP DataView Samples#LDVSoundExFilter](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvsoundexfilter)]
[!code-vb[DP DataView Samples#LDVSoundExFilter](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvsoundexfilter)]
SoundEx 是一种拼音算法,用于按英语发音来索引姓名,它最初由美国人口调查局开发。 SoundEx 方法返回一个表示姓名的四字符代码,由一个英文字母后跟三个数字构成。 字母是姓名的首字母,数字对姓名中剩余的辅音字母编码。 发音相近的姓名具有相同的 SoundEx 代码。 上一示例的 SoundEx 方法中使用的 SoundEx 实现如下所示:
[!code-csharp[DP DataView Samples#SoundEx](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#soundex)]
[!code-vb[DP DataView Samples#SoundEx](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#soundex)]
## <a name="using-the-rowfilter-property"></a>使用 RowFilter 属性
现有的基于字符串的筛选功能 <xref:System.Data.DataView> 仍适用于 LINQ to DataSet 上下文。 有关基于字符串的筛选的详细信息 <xref:System.Data.DataView.RowFilter%2A> ,请参阅对 [数据进行排序和筛选](./dataset-datatable-dataview/sorting-and-filtering-data.md)。
下面的示例从 Contact 表创建 <xref:System.Data.DataView>,然后设置 <xref:System.Data.DataView.RowFilter%2A> 属性以返回联系人的姓氏为“Zhu”的行:
[!code-csharp[DP DataView Samples#LDVRowFilter](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvrowfilter)]
[!code-vb[DP DataView Samples#LDVRowFilter](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvrowfilter)]
在 <xref:System.Data.DataView> 从 <xref:System.Data.DataTable> 或 LINQ to DataSet 查询创建后,可以使用 <xref:System.Data.DataView.RowFilter%2A> 属性根据行的列值指定行的子集。 基于字符串的筛选器和基于表达式的筛选器是互相排斥的。 设置 <xref:System.Data.DataView.RowFilter%2A> 属性将清除从 LINQ to DataSet 查询推断的筛选表达式,并且不能重置筛选器表达式。
[!code-csharp[DP DataView Samples#LDVFromQueryWhereSetRowFilter](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvfromquerywheresetrowfilter)]
[!code-vb[DP DataView Samples#LDVFromQueryWhereSetRowFilter](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvfromquerywheresetrowfilter)]
如果要返回特定数据查询的结果而不是提供数据子集的动态视图,则可以使用 <xref:System.Data.DataView.Find%2A> 的 <xref:System.Data.DataView.FindRows%2A> 或 <xref:System.Data.DataView> 方法,而不设置 <xref:System.Data.DataView.RowFilter%2A> 属性。 <xref:System.Data.DataView.RowFilter%2A> 属性最适合用于用绑定控件显示筛选结果的数据绑定应用程序。 设置 <xref:System.Data.DataView.RowFilter%2A> 属性会重新生成数据的索引,从而增加应用程序的系统开销并降低性能。 <xref:System.Data.DataView.Find%2A> 和 <xref:System.Data.DataView.FindRows%2A> 方法使用当前索引,而不要求重新生成索引。 如果只想调用 <xref:System.Data.DataView.Find%2A> 或 <xref:System.Data.DataView.FindRows%2A> 一次,则应使用现有的 <xref:System.Data.DataView>。 如果想要调用 <xref:System.Data.DataView.Find%2A> 或 <xref:System.Data.DataView.FindRows%2A> 多次,则应该创建一个新的 <xref:System.Data.DataView> 以便对想要搜索的列重新生成索引,然后调用 <xref:System.Data.DataView.Find%2A> 或 <xref:System.Data.DataView.FindRows%2A> 方法。 有关和方法的详细信息 <xref:System.Data.DataView.Find%2A> , <xref:System.Data.DataView.FindRows%2A> 请参阅 [查找行](./dataset-datatable-dataview/finding-rows.md) 和 [DataView 性能](dataview-performance.md)。
## <a name="clearing-the-filter"></a>清除筛选器
使用 <xref:System.Data.DataView> 属性设置筛选之后,可以清除 <xref:System.Data.DataView.RowFilter%2A> 上的筛选器。 <xref:System.Data.DataView> 上的筛选器可以采用两种不同的方式清除:
- 将 <xref:System.Data.DataView.RowFilter%2A> 属性设置为 `null`。
- 将 <xref:System.Data.DataView.RowFilter%2A> 属性设置为一个空字符串。
### <a name="example"></a>示例
下面的示例通过查询创建 <xref:System.Data.DataView>,然后通过将 <xref:System.Data.DataView.RowFilter%2A> 属性设置为 `null` 来清除该筛选器:
[!code-csharp[DP DataView Samples#LDVClearRowFilter2](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvclearrowfilter2)]
[!code-vb[DP DataView Samples#LDVClearRowFilter2](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvclearrowfilter2)]
### <a name="example"></a>示例
下面的示例从表创建 <xref:System.Data.DataView>,设置 <xref:System.Data.DataView.RowFilter%2A> 属性,然后通过将 <xref:System.Data.DataView.RowFilter%2A> 属性设置为一个空的字符串来清除该筛选器:
[!code-csharp[DP DataView Samples#LDVClearRowFilter](../../../../samples/snippets/csharp/VS_Snippets_ADO.NET/DP DataView Samples/CS/Form1.cs#ldvclearrowfilter)]
[!code-vb[DP DataView Samples#LDVClearRowFilter](../../../../samples/snippets/visualbasic/VS_Snippets_ADO.NET/DP DataView Samples/VB/Form1.vb#ldvclearrowfilter)]
## <a name="see-also"></a>请参阅
- [数据绑定和 LINQ to DataSet](data-binding-and-linq-to-dataset.md)
- [使用 DataView 进行排序](sorting-with-dataview-linq-to-dataset.md)
| {
"pile_set_name": "Github"
} |
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2004-2006 Sage Weil <[email protected]>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
*
*/
#ifndef CEPH_CLOCK_H
#define CEPH_CLOCK_H
#include "include/utime.h"
#include <time.h>
static inline utime_t ceph_clock_now()
{
#if defined(__linux__)
struct timespec tp;
clock_gettime(CLOCK_REALTIME, &tp);
utime_t n(tp);
#else
struct timeval tv;
gettimeofday(&tv, nullptr);
utime_t n(&tv);
#endif
return n;
}
#endif
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp"
#include "code/compiledIC.hpp"
#include "code/icBuffer.hpp"
#include "code/nmethod.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/linkResolver.hpp"
#include "memory/oopFactory.hpp"
#include "oops/methodOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "runtime/icache.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/events.hpp"
// Every time a compiled IC is changed or its type is being accessed,
// either the CompiledIC_lock must be set or we must be at a safe point.
//-----------------------------------------------------------------------------
// Low-level access to an inline cache. Private, since they might not be
// MT-safe to use.
void CompiledIC::set_cached_oop(oop cache) {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
assert (!is_optimized(), "an optimized virtual call does not have a cached oop");
assert (cache == NULL || cache != badOop, "invalid oop");
if (TraceCompiledIC) {
tty->print(" ");
print_compiled_ic();
tty->print_cr(" changing oop to " INTPTR_FORMAT, (address)cache);
}
if (cache == NULL) cache = (oop)Universe::non_oop_word();
*_oop_addr = cache;
// fix up the relocations
RelocIterator iter = _oops;
while (iter.next()) {
if (iter.type() == relocInfo::oop_type) {
oop_Relocation* r = iter.oop_reloc();
if (r->oop_addr() == _oop_addr)
r->fix_oop_relocation();
}
}
return;
}
oop CompiledIC::cached_oop() const {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
assert (!is_optimized(), "an optimized virtual call does not have a cached oop");
if (!is_in_transition_state()) {
oop data = *_oop_addr;
// If we let the oop value here be initialized to zero...
assert(data != NULL || Universe::non_oop_word() == NULL,
"no raw nulls in CompiledIC oops, because of patching races");
return (data == (oop)Universe::non_oop_word()) ? (oop)NULL : data;
} else {
return InlineCacheBuffer::cached_oop_for((CompiledIC *)this);
}
}
void CompiledIC::set_ic_destination(address entry_point) {
assert(entry_point != NULL, "must set legal entry point");
assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
if (TraceCompiledIC) {
tty->print(" ");
print_compiled_ic();
tty->print_cr(" changing destination to " INTPTR_FORMAT, entry_point);
}
MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
#ifdef ASSERT
CodeBlob* cb = CodeCache::find_blob_unsafe(_ic_call);
assert(cb != NULL && cb->is_nmethod(), "must be nmethod");
#endif
_ic_call->set_destination_mt_safe(entry_point);
}
address CompiledIC::ic_destination() const {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
if (!is_in_transition_state()) {
return _ic_call->destination();
} else {
return InlineCacheBuffer::ic_destination_for((CompiledIC *)this);
}
}
bool CompiledIC::is_in_transition_state() const {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
return InlineCacheBuffer::contains(_ic_call->destination());
}
// Returns native address of 'call' instruction in inline-cache. Used by
// the InlineCacheBuffer when it needs to find the stub.
address CompiledIC::stub_address() const {
assert(is_in_transition_state(), "should only be called when we are in a transition state");
return _ic_call->destination();
}
//-----------------------------------------------------------------------------
// High-level access to an inline cache. Guaranteed to be MT-safe.
void CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
methodHandle method = call_info->selected_method();
bool is_invoke_interface = (bytecode == Bytecodes::_invokeinterface && !call_info->has_vtable_index());
assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
assert(method->is_oop(), "cannot be NULL and must be oop");
assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
address entry;
if (is_invoke_interface) {
int index = klassItable::compute_itable_index(call_info->resolved_method()());
entry = VtableStubs::create_stub(false, index, method());
assert(entry != NULL, "entry not computed");
klassOop k = call_info->resolved_method()->method_holder();
assert(Klass::cast(k)->is_interface(), "sanity check");
InlineCacheBuffer::create_transition_stub(this, k, entry);
} else {
// Can be different than method->vtable_index(), due to package-private etc.
int vtable_index = call_info->vtable_index();
entry = VtableStubs::create_stub(true, vtable_index, method());
InlineCacheBuffer::create_transition_stub(this, method(), entry);
}
if (TraceICs) {
ResourceMark rm;
tty->print_cr ("IC@" INTPTR_FORMAT ": to megamorphic %s entry: " INTPTR_FORMAT,
instruction_address(), method->print_value_string(), entry);
}
// We can't check this anymore. With lazy deopt we could have already
// cleaned this IC entry before we even return. This is possible if
// we ran out of space in the inline cache buffer trying to do the
// set_next and we safepointed to free up space. This is a benign
// race because the IC entry was complete when we safepointed so
// cleaning it immediately is harmless.
// assert(is_megamorphic(), "sanity check");
}
// true if destination is megamorphic stub
bool CompiledIC::is_megamorphic() const {
assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
assert(!is_optimized(), "an optimized call cannot be megamorphic");
// Cannot rely on cached_oop. It is either an interface or a method.
return VtableStubs::is_entry_point(ic_destination());
}
bool CompiledIC::is_call_to_compiled() const {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
// Use unsafe, since an inline cache might point to a zombie method. However, the zombie
// method is guaranteed to still exist, since we only remove methods after all inline caches
// has been cleaned up
CodeBlob* cb = CodeCache::find_blob_unsafe(ic_destination());
bool is_monomorphic = (cb != NULL && cb->is_nmethod());
// Check that the cached_oop is a klass for non-optimized monomorphic calls
// This assertion is invalid for compiler1: a call that does not look optimized (no static stub) can be used
// for calling directly to vep without using the inline cache (i.e., cached_oop == NULL)
#ifdef ASSERT
#ifdef TIERED
CodeBlob* caller = CodeCache::find_blob_unsafe(instruction_address());
bool is_c1_method = caller->is_compiled_by_c1();
#else
#ifdef COMPILER1
bool is_c1_method = true;
#else
bool is_c1_method = false;
#endif // COMPILER1
#endif // TIERED
assert( is_c1_method ||
!is_monomorphic ||
is_optimized() ||
(cached_oop() != NULL && cached_oop()->is_klass()), "sanity check");
#endif // ASSERT
return is_monomorphic;
}
bool CompiledIC::is_call_to_interpreted() const {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
// Call to interpreter if destination is either calling to a stub (if it
// is optimized), or calling to an I2C blob
bool is_call_to_interpreted = false;
if (!is_optimized()) {
// must use unsafe because the destination can be a zombie (and we're cleaning)
// and the print_compiled_ic code wants to know if site (in the non-zombie)
// is to the interpreter.
CodeBlob* cb = CodeCache::find_blob_unsafe(ic_destination());
is_call_to_interpreted = (cb != NULL && cb->is_adapter_blob());
assert(!is_call_to_interpreted || (cached_oop() != NULL && cached_oop()->is_compiledICHolder()), "sanity check");
} else {
// Check if we are calling into our own codeblob (i.e., to a stub)
CodeBlob* cb = CodeCache::find_blob(_ic_call->instruction_address());
address dest = ic_destination();
#ifdef ASSERT
{
CodeBlob* db = CodeCache::find_blob_unsafe(dest);
assert(!db->is_adapter_blob(), "must use stub!");
}
#endif /* ASSERT */
is_call_to_interpreted = cb->contains(dest);
}
return is_call_to_interpreted;
}
void CompiledIC::set_to_clean() {
assert(SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->is_locked() , "MT-unsafe call");
if (TraceInlineCacheClearing || TraceICs) {
tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", instruction_address());
print();
}
address entry;
if (is_optimized()) {
entry = SharedRuntime::get_resolve_opt_virtual_call_stub();
} else {
entry = SharedRuntime::get_resolve_virtual_call_stub();
}
// A zombie transition will always be safe, since the oop has already been set to NULL, so
// we only need to patch the destination
bool safe_transition = is_optimized() || SafepointSynchronize::is_at_safepoint();
if (safe_transition) {
if (!is_optimized()) set_cached_oop(NULL);
// Kill any leftover stub we might have too
if (is_in_transition_state()) {
ICStub* old_stub = ICStub_from_destination_address(stub_address());
old_stub->clear();
}
set_ic_destination(entry);
} else {
// Unsafe transition - create stub.
InlineCacheBuffer::create_transition_stub(this, NULL, entry);
}
// We can't check this anymore. With lazy deopt we could have already
// cleaned this IC entry before we even return. This is possible if
// we ran out of space in the inline cache buffer trying to do the
// set_next and we safepointed to free up space. This is a benign
// race because the IC entry was complete when we safepointed so
// cleaning it immediately is harmless.
// assert(is_clean(), "sanity check");
}
bool CompiledIC::is_clean() const {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
bool is_clean = false;
address dest = ic_destination();
is_clean = dest == SharedRuntime::get_resolve_opt_virtual_call_stub() ||
dest == SharedRuntime::get_resolve_virtual_call_stub();
assert(!is_clean || is_optimized() || cached_oop() == NULL, "sanity check");
return is_clean;
}
void CompiledIC::set_to_monomorphic(const CompiledICInfo& info) {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
// Updating a cache to the wrong entry can cause bugs that are very hard
// to track down - if cache entry gets invalid - we just clean it. In
// this way it is always the same code path that is responsible for
// updating and resolving an inline cache
//
// The above is no longer true. SharedRuntime::fixup_callers_callsite will change optimized
// callsites. In addition ic_miss code will update a site to monomorphic if it determines
// that an monomorphic call to the interpreter can now be monomorphic to compiled code.
//
// In both of these cases the only thing being modifed is the jump/call target and these
// transitions are mt_safe
Thread *thread = Thread::current();
if (info._to_interpreter) {
// Call to interpreter
if (info.is_optimized() && is_optimized()) {
assert(is_clean(), "unsafe IC path");
MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
// the call analysis (callee structure) specifies that the call is optimized
// (either because of CHA or the static target is final)
// At code generation time, this call has been emitted as static call
// Call via stub
assert(info.cached_oop().not_null() && info.cached_oop()->is_method(), "sanity check");
CompiledStaticCall* csc = compiledStaticCall_at(instruction_address());
methodHandle method (thread, (methodOop)info.cached_oop()());
csc->set_to_interpreted(method, info.entry());
if (TraceICs) {
ResourceMark rm(thread);
tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to interpreter: %s",
instruction_address(),
method->print_value_string());
}
} else {
// Call via method-klass-holder
assert(info.cached_oop().not_null(), "must be set");
InlineCacheBuffer::create_transition_stub(this, info.cached_oop()(), info.entry());
if (TraceICs) {
ResourceMark rm(thread);
tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to interpreter via mkh", instruction_address());
}
}
} else {
// Call to compiled code
bool static_bound = info.is_optimized() || (info.cached_oop().is_null());
#ifdef ASSERT
CodeBlob* cb = CodeCache::find_blob_unsafe(info.entry());
assert (cb->is_nmethod(), "must be compiled!");
#endif /* ASSERT */
// This is MT safe if we come from a clean-cache and go through a
// non-verified entry point
bool safe = SafepointSynchronize::is_at_safepoint() ||
(!is_in_transition_state() && (info.is_optimized() || static_bound || is_clean()));
if (!safe) {
InlineCacheBuffer::create_transition_stub(this, info.cached_oop()(), info.entry());
} else {
set_ic_destination(info.entry());
if (!is_optimized()) set_cached_oop(info.cached_oop()());
}
if (TraceICs) {
ResourceMark rm(thread);
assert(info.cached_oop() == NULL || info.cached_oop()()->is_klass(), "must be");
tty->print_cr ("IC@" INTPTR_FORMAT ": monomorphic to compiled (rcvr klass) %s: %s",
instruction_address(),
((klassOop)info.cached_oop()())->print_value_string(),
(safe) ? "" : "via stub");
}
}
// We can't check this anymore. With lazy deopt we could have already
// cleaned this IC entry before we even return. This is possible if
// we ran out of space in the inline cache buffer trying to do the
// set_next and we safepointed to free up space. This is a benign
// race because the IC entry was complete when we safepointed so
// cleaning it immediately is harmless.
// assert(is_call_to_compiled() || is_call_to_interpreted(), "sanity check");
}
// is_optimized: Compiler has generated an optimized call (i.e., no inline
// cache) static_bound: The call can be static bound (i.e, no need to use
// inline cache)
void CompiledIC::compute_monomorphic_entry(methodHandle method,
KlassHandle receiver_klass,
bool is_optimized,
bool static_bound,
CompiledICInfo& info,
TRAPS) {
info._is_optimized = is_optimized;
nmethod* method_code = method->code();
address entry = NULL;
if (method_code != NULL) {
// Call to compiled code
if (static_bound || is_optimized) {
entry = method_code->verified_entry_point();
} else {
entry = method_code->entry_point();
}
}
if (entry != NULL) {
// Call to compiled code
info._entry = entry;
if (static_bound || is_optimized) {
info._cached_oop = Handle(THREAD, (oop)NULL);
} else {
info._cached_oop = receiver_klass;
}
info._to_interpreter = false;
} else {
// Note: the following problem exists with Compiler1:
// - at compile time we may or may not know if the destination is final
// - if we know that the destination is final, we will emit an optimized
// virtual call (no inline cache), and need a methodOop to make a call
// to the interpreter
// - if we do not know if the destination is final, we emit a standard
// virtual call, and use CompiledICHolder to call interpreted code
// (no static call stub has been generated)
// However in that case we will now notice it is static_bound
// and convert the call into what looks to be an optimized
// virtual call. This causes problems in verifying the IC because
// it look vanilla but is optimized. Code in is_call_to_interpreted
// is aware of this and weakens its asserts.
info._to_interpreter = true;
// static_bound should imply is_optimized -- otherwise we have a
// performance bug (statically-bindable method is called via
// dynamically-dispatched call note: the reverse implication isn't
// necessarily true -- the call may have been optimized based on compiler
// analysis (static_bound is only based on "final" etc.)
#ifdef COMPILER2
#ifdef TIERED
#if defined(ASSERT)
// can't check the assert because we don't have the CompiledIC with which to
// find the address if the call instruction.
//
// CodeBlob* cb = find_blob_unsafe(instruction_address());
// assert(cb->is_compiled_by_c1() || !static_bound || is_optimized, "static_bound should imply is_optimized");
#endif // ASSERT
#else
assert(!static_bound || is_optimized, "static_bound should imply is_optimized");
#endif // TIERED
#endif // COMPILER2
if (is_optimized) {
// Use stub entry
info._entry = method()->get_c2i_entry();
info._cached_oop = method;
} else {
// Use mkh entry
oop holder = oopFactory::new_compiledICHolder(method, receiver_klass, CHECK);
info._cached_oop = Handle(THREAD, holder);
info._entry = method()->get_c2i_unverified_entry();
}
}
}
inline static RelocIterator parse_ic(nmethod* nm, address ic_call, oop* &_oop_addr, bool *is_optimized) {
address first_oop = NULL;
// Mergers please note: Sun SC5.x CC insists on an lvalue for a reference parameter.
nmethod* tmp_nm = nm;
return virtual_call_Relocation::parse_ic(tmp_nm, ic_call, first_oop, _oop_addr, is_optimized);
}
CompiledIC::CompiledIC(NativeCall* ic_call)
: _ic_call(ic_call),
_oops(parse_ic(NULL, ic_call->instruction_address(), _oop_addr, &_is_optimized))
{
}
CompiledIC::CompiledIC(Relocation* ic_reloc)
: _ic_call(nativeCall_at(ic_reloc->addr())),
_oops(parse_ic(ic_reloc->code(), ic_reloc->addr(), _oop_addr, &_is_optimized))
{
assert(ic_reloc->type() == relocInfo::virtual_call_type ||
ic_reloc->type() == relocInfo::opt_virtual_call_type, "wrong reloc. info");
}
// ----------------------------------------------------------------------------
void CompiledStaticCall::set_to_clean() {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset call site
MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
#ifdef ASSERT
CodeBlob* cb = CodeCache::find_blob_unsafe(this);
assert(cb != NULL && cb->is_nmethod(), "must be nmethod");
#endif
set_destination_mt_safe(SharedRuntime::get_resolve_static_call_stub());
// Do not reset stub here: It is too expensive to call find_stub.
// Instead, rely on caller (nmethod::clear_inline_caches) to clear
// both the call and its stub.
}
bool CompiledStaticCall::is_clean() const {
return destination() == SharedRuntime::get_resolve_static_call_stub();
}
bool CompiledStaticCall::is_call_to_compiled() const {
return CodeCache::contains(destination());
}
bool CompiledStaticCall::is_call_to_interpreted() const {
// It is a call to interpreted, if it calls to a stub. Hence, the destination
// must be in the stub part of the nmethod that contains the call
nmethod* nm = CodeCache::find_nmethod(instruction_address());
return nm->stub_contains(destination());
}
void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) {
address stub=find_stub();
assert(stub!=NULL, "stub not found");
if (TraceICs) {
ResourceMark rm;
tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
instruction_address(),
callee->name_and_sig_as_C_string());
}
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(), "a) MT-unsafe modification of inline cache");
assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry, "b) MT-unsafe modification of inline cache");
// Update stub
method_holder->set_data((intptr_t)callee());
jump->set_jump_destination(entry);
// Update jump to call
set_destination_mt_safe(stub);
}
void CompiledStaticCall::set(const StaticCallInfo& info) {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
// Updating a cache to the wrong entry can cause bugs that are very hard
// to track down - if cache entry gets invalid - we just clean it. In
// this way it is always the same code path that is responsible for
// updating and resolving an inline cache
assert(is_clean(), "do not update a call entry - use clean");
if (info._to_interpreter) {
// Call to interpreted code
set_to_interpreted(info.callee(), info.entry());
} else {
if (TraceICs) {
ResourceMark rm;
tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_compiled " INTPTR_FORMAT,
instruction_address(),
info.entry());
}
// Call to compiled code
assert (CodeCache::contains(info.entry()), "wrong entry point");
set_destination_mt_safe(info.entry());
}
}
// Compute settings for a CompiledStaticCall. Since we might have to set
// the stub when calling to the interpreter, we need to return arguments.
void CompiledStaticCall::compute_entry(methodHandle m, StaticCallInfo& info) {
nmethod* m_code = m->code();
info._callee = m;
if (m_code != NULL) {
info._to_interpreter = false;
info._entry = m_code->verified_entry_point();
} else {
// Callee is interpreted code. In any case entering the interpreter
// puts a converter-frame on the stack to save arguments.
info._to_interpreter = true;
info._entry = m()->get_c2i_entry();
}
}
void CompiledStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub
address stub = static_stub->addr();
assert(stub!=NULL, "stub not found");
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
method_holder->set_data(0);
jump->set_jump_destination((address)-1);
}
address CompiledStaticCall::find_stub() {
// Find reloc. information containing this call-site
RelocIterator iter((nmethod*)NULL, instruction_address());
while (iter.next()) {
if (iter.addr() == instruction_address()) {
switch(iter.type()) {
case relocInfo::static_call_type:
return iter.static_call_reloc()->static_stub();
// We check here for opt_virtual_call_type, since we reuse the code
// from the CompiledIC implementation
case relocInfo::opt_virtual_call_type:
return iter.opt_virtual_call_reloc()->static_stub();
case relocInfo::poll_type:
case relocInfo::poll_return_type: // A safepoint can't overlap a call.
default:
ShouldNotReachHere();
}
}
}
return NULL;
}
//-----------------------------------------------------------------------------
// Non-product mode code
#ifndef PRODUCT
void CompiledIC::verify() {
// make sure code pattern is actually a call imm32 instruction
_ic_call->verify();
if (os::is_MP()) {
_ic_call->verify_alignment();
}
assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted()
|| is_optimized() || is_megamorphic(), "sanity check");
}
void CompiledIC::print() {
print_compiled_ic();
tty->cr();
}
void CompiledIC::print_compiled_ic() {
tty->print("Inline cache at " INTPTR_FORMAT ", calling %s " INTPTR_FORMAT,
instruction_address(), is_call_to_interpreted() ? "interpreted " : "", ic_destination());
}
void CompiledStaticCall::print() {
tty->print("static call at " INTPTR_FORMAT " -> ", instruction_address());
if (is_clean()) {
tty->print("clean");
} else if (is_call_to_compiled()) {
tty->print("compiled");
} else if (is_call_to_interpreted()) {
tty->print("interpreted");
}
tty->cr();
}
void CompiledStaticCall::verify() {
// Verify call
NativeCall::verify();
if (os::is_MP()) {
verify_alignment();
}
// Verify stub
address stub = find_stub();
assert(stub != NULL, "no stub found for static call");
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
// Verify state
assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted(), "sanity check");
}
#endif
| {
"pile_set_name": "Github"
} |
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Folding</string>
<key>scope</key>
<string>source.go</string>
<key>settings</key>
<dict>
<key>foldingIndentedBlockStart</key>
<string>^\s*(case|default)\b</string>
<key>foldingStartMarker</key>
<string>(?x)
/\*\*(?!\*) # opening C-style comment with 2 asterisks but no third later on
| # OR
^ # start of line...
(?! # ...which does NOT contain...
[^{(]*?// # ...a possible bunch of non-opening-braces, followed by a C++ comment
| # OR
[^{(]*?/\*(?!.*?\*/.*?[{(]) # ...a possible bunch of non-opening-braces, followed by a C comment with no ending
)
.*? # ...any characters (or none)...
[{(]\s* # ...followed by an open brace and zero or more whitespace...
( # ...followed by...
$ # ...the end of line...
| # OR
// # ...a C++ comment...
| # OR
/\*(?!.*?\*/.*\S) # ...a C comment, so long as no non-whitespace chars follow it..
)
</string>
<key>foldingStopMarker</key>
<string>(?<!\*)\*\*/|^\s*[})]</string>
</dict>
<key>uuid</key>
<string>21783905-48ED-47DD-9EBA-0DF5FDBA1F4E</string>
</dict>
</plist>
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2008 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.
*/
/**
* Dalvik instruction exerciser.
*/
public class Main {
/*
* Start up.
*/
public static void main(String[] args) {
boolean assertEnabled = false;
assert assertEnabled = true;
if (!assertEnabled) {
System.out.println("FAIL: assert doesn't work (specify '-ea')\n");
throw new RuntimeException();
} else {
System.out.println("(assertions are enabled)");
}
Main main = new Main();
main.run();
/* run through the heap to see if we trashed something */
System.gc();
System.out.println("Done!");
}
public void run() {
InstField instField = new InstField();
instField.run();
StaticField.run();
IntMath.run();
FloatMath.run();
Compare.run();
Monitor.run();
Switch.run();
Array.run();
Classes.run();
Goto.run();
MethodCall.run();
Throw.run();
try {
UnresTest1.run();
} catch (VerifyError ve) {
System.out.println("Caught: " + ve);
}
try {
UnresTest1.run();
} catch (VerifyError ve) {
System.out.println("Caught (retry): " + ve);
}
try {
UnresTest2.run();
} catch (VerifyError ve) {
System.out.println("Caught: " + ve);
} catch (NoClassDefFoundError ncdfe) {
/* UnresClass can cause desktop Java to freak out */
System.out.println("NOTE: UnresTest2 not available");
}
InternedString.run();
}
}
| {
"pile_set_name": "Github"
} |
"This software program is licensed subject to the GNU General Public License
(GPL). Version 2, June 1991, available at
<http:
GNU General Public License
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
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.
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 an idea of what it does.
Copyright (C) yyyy 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., 59
Temple Place - Suite 330, Boston, MA 02111-1307, 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 2007 DFKI GmbH.
* All Rights Reserved. Use is subject to license terms.
*
* This file is part of MARY TTS.
*
* MARY TTS 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, version 3 of the License.
*
* 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/>.
*
*/
package marytts.signalproc.analysis;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import org.apache.commons.io.FileUtils;
/**
* A wrapper class to read fields in Festival UTT files
*
* @author Oytun Türk
*/
public class FestivalUtt extends AlignmentData {
public Labels[] labels;
public String[] keys;
public FestivalUtt() {
this("");
}
public FestivalUtt(String festivalUttFile) {
keys = new String[6];
keys[0] = "==Segment==";
keys[1] = "==Target==";
keys[2] = "==Syllable==";
keys[3] = "==Word==";
keys[4] = "==IntEvent==";
keys[5] = "==Phrase==";
labels = new Labels[keys.length];
if (new File(festivalUttFile).exists()) {
read(festivalUttFile);
}
}
public void read(String festivalUttFile) {
String allText = null;
try {
allText = FileUtils.readFileToString(new File(festivalUttFile), "ASCII");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (allText != null) {
String[] lines = allText.split("\n");
int i, j;
int[] boundInds = new int[keys.length];
Arrays.fill(boundInds, -1);
for (i = 0; i < keys.length; i++) {
for (j = 0; j < lines.length; j++) {
if (lines[j].compareTo(keys[i]) == 0) {
boundInds[i] = j;
break;
}
}
}
for (i = 0; i < keys.length; i++) {
if (boundInds[i] > -1) {
int fromIndex = boundInds[i] + 1;
int toIndex = (i < keys.length - 1 ? boundInds[i + 1] - 1 : lines.length - 1);
labels[i] = createLabels(lines, fromIndex, toIndex);
// Shift all valuesRest by one, and put the f0 into valuesRest[0]
if (keys[i].compareTo("==Target==") == 0) {
for (j = 0; j < labels[i].items.length; j++) {
if (labels[i].items[j].valuesRest != null) {
double[] tmpValues = new double[labels[i].items[j].valuesRest.length];
System.arraycopy(labels[i].items[j].valuesRest, 0, tmpValues, 0,
labels[i].items[j].valuesRest.length);
labels[i].items[j].valuesRest = new double[tmpValues.length + 1];
labels[i].items[j].valuesRest[0] = Double.valueOf(labels[i].items[j].phn);
System.arraycopy(labels[i].items[j].valuesRest, 0, tmpValues, 1,
labels[i].items[j].valuesRest.length);
} else {
labels[i].items[j].valuesRest = new double[1];
labels[i].items[j].valuesRest[0] = Double.valueOf(labels[i].items[j].phn);
}
}
}
//
} else
labels[i] = null;
}
}
}
private Labels createLabels(String[] lines, int fromIndex, int toIndex) {
String[] relevantLines = new String[toIndex - fromIndex + 1];
System.arraycopy(lines, fromIndex, relevantLines, 0, relevantLines.length);
Labels l = new Labels(relevantLines, 2);
return l;
}
public static FestivalUtt readFestivalUttFile(String festivalUttFile) {
FestivalUtt f = new FestivalUtt(festivalUttFile);
return f;
}
}
| {
"pile_set_name": "Github"
} |
package net.anxuiz.tourney.event.mapselect;
import com.google.common.base.Preconditions;
import net.anxuiz.tourney.vote.VetoVote;
import tc.oc.api.docs.Entrant;
import tc.oc.pgm.teams.Team;
public abstract class MapSelectionTeamEvent extends MapSelectionEvent {
private final Team team;
private final Entrant entrant;
public MapSelectionTeamEvent(final VetoVote vote, final Team team, Entrant entrant) {
super(vote);
this.team = Preconditions.checkNotNull(team, "Team");
this.entrant = Preconditions.checkNotNull(entrant, "Entrant");
}
public Team getTeam() {
return this.team;
}
public Entrant getEntrant() {
return this.entrant;
}
}
| {
"pile_set_name": "Github"
} |
## Chrome / Safari
## Chrome manual
⌘ - N 新窗口
⌘ - O 用chrome 打开计算机文件
⌘ - shift t 打开关闭的标签 能记录10个.
⌘ - option 反向键切换左右标签
⌘ - w 关闭当前 标签页
⌘ - shift w 关闭当前窗口
delete 后退 shift delete 前进
⌘ - m 最小化窗口
⌘ - h 隐藏谷歌浏览器
⌘ - option h 隐藏其他所有窗口
⌘ - q 关闭浏览器
功能快捷键
⌘ - shift b 开关书签栏
⌘ - - 打开设置
⌘ - y 历史记录
⌘ - shift j 下载内容
地址栏 快捷键
引擎关键字 空格 搜索关键词 回车 用指定的搜索引擎搜索
网址 ⌘ - enter 在新后台标签打开网站
⌘ - l 突出显示网址
⌘ - p 打印网页
⌘ - f 打开查找栏
⌘ - option i 打开开发者工具
⌘ - option j 打开javascript 控制台
⌘ - option u 网页源码
option 单击 下载链接
⌘ - d 保存书签
⌘ - +/- 缩放网页
空格 下一页
谷歌插件 同文堂 网页繁简转换 ★★★★★
## Chrome Plugines
*1password* 密码插件
*Adblock plus* 广告插件
*Undoclose tab* 恢复关闭标签插件
Search the current site (站内搜索)
*Vimium* 键盘高手
J k 网页上下滚动
Shift j k 标签页 左右移动
D u 向上 向下 滚动半个屏幕
G 连按两下 回到网页顶部
Shift h l 网页里面前进后退
X 关闭当前页面 shift x 恢复关闭的页面
O 相当于 浏览器的地址栏
g+s 查看网页源代码
R 刷新网页
shift+/ 查看vimium的帮助 各种快捷键汇总
某些网页 不想用vim 可以在设置里面 排除这个网站 vim图标变灰色就对了
## Safari plugin
*vimari* = vimium(Chrome)
## safari
1: adblock 去广告插件
2:1password 密码管理插件
3:buttonbar+ 多一行书签栏
4:支付宝插件 下载链接 https://download.alipay.com/sec/cert/alicert.dmg
5:迅雷插件
6:
| {
"pile_set_name": "Github"
} |
#define INIT
#define FINI \
dyn->insts[ninst].x86.addr = addr; \
if(ninst) dyn->insts[ninst-1].x86.size = dyn->insts[ninst].x86.addr - dyn->insts[ninst-1].x86.addr;
#define MESSAGE(A, ...)
#define EMIT(A)
#define READFLAGS(A) dyn->insts[ninst].x86.use_flags = A
#define SETFLAGS(A,B) {dyn->insts[ninst].x86.set_flags = A; dyn->insts[ninst].x86.state_flags = B;}
#define JUMP(A) dyn->insts[ninst].x86.jmp = A
#define BARRIER(A) dyn->insts[ninst].x86.barrier = A
#define BARRIER_NEXT(A) if(ninst+1<dyn->size) dyn->insts[ninst+1].x86.barrier = A
#define NEW_INST \
dyn->insts[ninst].x86.addr = ip; \
if(ninst) dyn->insts[ninst-1].x86.size = dyn->insts[ninst].x86.addr - dyn->insts[ninst-1].x86.addr;
#define INST_EPILOG
#define INST_NAME(name)
| {
"pile_set_name": "Github"
} |
#include <string>
#include <iostream>
class Employee {
public:
typedef int id_type;
Employee() : name(), id(++eid) {}
explicit Employee(const std::string &n) : name(n), id(++eid) {}
const std::string &getName() const { return name; }
id_type getID() const { return id; }
private:
std::string name;
id_type id;
static id_type eid;
};
Employee::id_type Employee::eid = 0;
int main() {
Employee e1;
Employee e2("Zhang San");
std::cout << e1.getName() << " " << e1.getID() << std::endl;
std::cout << e2.getName() << " " << e2.getID() << std::endl;
return 0;
}
| {
"pile_set_name": "Github"
} |
APP_NAME="beer-garden"
GROUP=$APP_NAME
USER=$APP_NAME
APP_HOME="/opt/${APP_NAME}"
PID_HOME="/var/run/${APP_NAME}"
CONFIG_HOME="$APP_HOME/conf"
LOG_HOME="$APP_HOME/log"
BIN_HOME="$APP_HOME/bin"
PLUGIN_LOG_HOME="$LOG_HOME/plugins"
PLUGIN_HOME="$APP_HOME/plugins"
BARTENDER_CONFIG="${CONFIG_HOME}/bartender-config"
BARTENDER_LOG_CONFIG="${CONFIG_HOME}/bartender-logging-config.json"
BARTENDER_LOG_FILE="$LOG_HOME/bartender.log"
BREW_VIEW_CONFIG="${CONFIG_HOME}/brew-view-config"
BREW_VIEW_LOG_CONFIG="${CONFIG_HOME}/brew-view-logging-config.json"
BREW_VIEW_LOG_FILE="$LOG_HOME/brew-view.log"
case "$1" in
1)
# This is an initial install
# Create the beer-garden group/user if they do not exist
/usr/bin/getent group $GROUP > /dev/null || /usr/sbin/groupadd -r $GROUP
/usr/bin/getent passwd $USER > /dev/null || /usr/sbin/useradd -r -d $APP_HOME -s /sbin/nologin -g $GROUP $USER
if [ ! -d "$CONFIG_HOME" ]; then
mkdir -p "$CONFIG_HOME"
fi
if [ ! -d "$LOG_HOME" ]; then
mkdir -p "$LOG_HOME"
fi
if [ ! -d "$PLUGIN_LOG_HOME" ]; then
mkdir -p "$PLUGIN_LOG_HOME"
fi
if [ ! -d "$PLUGIN_HOME" ]; then
mkdir -p "$PLUGIN_HOME"
fi
if [ ! -d "$PID_HOME" ]; then
mkdir -p "$PID_HOME"
fi
# Generate logging configs if they don't exist
if [ ! -f "$BARTENDER_LOG_CONFIG" ]; then
"$APP_HOME/bin/generate_bartender_log_config" \
--log-config-file "$BARTENDER_LOG_CONFIG" \
--log-file "$BARTENDER_LOG_FILE" \
--log-level "WARN"
fi
if [ ! -f "$BREW_VIEW_LOG_CONFIG" ]; then
"$APP_HOME/bin/generate_brew_view_log_config" \
--log-config-file "$BREW_VIEW_LOG_CONFIG" \
--log-file "$BREW_VIEW_LOG_FILE" \
--log-level "WARN"
fi
# Enforce .yaml extension for yaml config files
if [ -f "$BARTENDER_CONFIG.yml" ]; then
mv "$BARTENDER_CONFIG.yml" "$BARTENDER_CONFIG.yaml"
fi
if [ -f "$BREW_VIEW_CONFIG.yml" ]; then
mv "$BREW_VIEW_CONFIG.yml" "$BREW_VIEW_CONFIG.yaml"
fi
# Generate application configs if they don't exist
# Migrate them if they do, converting to yaml if necessary
if [ -f "$BARTENDER_CONFIG.yaml" ]; then
"$APP_HOME/bin/migrate_bartender_config" -c "$BARTENDER_CONFIG.yaml"
elif [ -f "$BARTENDER_CONFIG.json" ]; then
"$APP_HOME/bin/migrate_bartender_config" -c "$BARTENDER_CONFIG.json" -t "yaml"
else
"$APP_HOME/bin/generate_bartender_config" \
-c "$BARTENDER_CONFIG.yaml" -l "$BARTENDER_LOG_CONFIG" \
--plugin-local-directory "$PLUGIN_HOME" \
--plugin-local-log-directory "$PLUGIN_LOG_HOME"
fi
if [ -f "$BREW_VIEW_CONFIG.yaml" ]; then
"$APP_HOME/bin/migrate_brew_view_config" -c "$BREW_VIEW_CONFIG.yaml"
elif [ -f "$BREW_VIEW_CONFIG.json" ]; then
"$APP_HOME/bin/migrate_brew_view_config" -c "$BREW_VIEW_CONFIG.json" -t "yaml"
else
"$APP_HOME/bin/generate_brew_view_config" \
-c "$BREW_VIEW_CONFIG.yaml" -l "$BREW_VIEW_LOG_CONFIG"
fi
;;
2)
# This is an upgrade, nothing to do
;;
esac
chown -hR ${USER}:${GROUP} $APP_HOME
| {
"pile_set_name": "Github"
} |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hermes -O -Wno-direct-eval %s | %FileCheck --match-full-lines %s
"use strict";
var a = 'a';
for (var i = 0; i < 28; ++i) {
a = a + a;
}
var evil = {toString: function() { return a; }};
try {
new Function("hi", evil, evil, evil, evil, evil, evil, evil, evil, evil, evil, evil, evil, evil, evil, evil, evil);
print("Unexpected success");
} catch (e) {
print("caught", e.name);
}
// CHECK: caught RangeError
| {
"pile_set_name": "Github"
} |
{
"tests": [
{
"description": "set-merge: Delete with merge",
"comment": "A Delete sentinel can appear with a merge option.",
"set": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"option": {
"fields": [
{
"field": [
"a"
]
},
{
"field": [
"b",
"c"
]
}
]
},
"jsonData": "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"integerValue": "1"
}
}
},
"updateMask": {
"fieldPaths": [
"a",
"b.c"
]
}
}
]
}
}
}
]
}
| {
"pile_set_name": "Github"
} |
(ns maria.user
(:require [chia.view]))
(defmacro user-macro [& body]
`[~@body])
| {
"pile_set_name": "Github"
} |
/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
* This library 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 2.1 of the License, or
* (at your option) any later version.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* -----------------------------------
* MultipleXYSeriesLabelGenerator.java
* -----------------------------------
* (C) Copyright 2004-2008, by Object Refinery Limited.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): -;
*
* Changes
* -------
* 19-Nov-2004 : Version 1 (DG);
* 18-Apr-2005 : Use StringBuffer (DG);
* 20-Feb-2007 : Fixed for equals() and cloning() (DG);
* 21-Jun-2007 : Removed JCommon dependencies (DG);
* 31-Mar-2008 : Added hashCode() method to appease FindBugs (DG);
*
*/
package org.jfree.chart.labels;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.jfree.chart.util.HashUtilities;
import org.jfree.chart.util.PublicCloneable;
import org.jfree.data.xy.XYDataset;
/**
* A series label generator for plots that use data from
* an {@link org.jfree.data.xy.XYDataset}.
*/
public class MultipleXYSeriesLabelGenerator implements XYSeriesLabelGenerator,
Cloneable, PublicCloneable, Serializable {
/** For serialization. */
private static final long serialVersionUID = 138976236941898560L;
/** The default item label format. */
public static final String DEFAULT_LABEL_FORMAT = "{0}";
/** The format pattern for the initial part of the label. */
private String formatPattern;
/** The format pattern for additional labels. */
private String additionalFormatPattern;
/** Storage for the additional series labels. */
private Map seriesLabelLists;
/**
* Creates an item label generator using default number formatters.
*/
public MultipleXYSeriesLabelGenerator() {
this(DEFAULT_LABEL_FORMAT);
}
/**
* Creates a new series label generator.
*
* @param format the format pattern (<code>null</code> not permitted).
*/
public MultipleXYSeriesLabelGenerator(String format) {
if (format == null) {
throw new IllegalArgumentException("Null 'format' argument.");
}
this.formatPattern = format;
this.additionalFormatPattern = "\n{0}";
this.seriesLabelLists = new HashMap();
}
/**
* Adds an extra label for the specified series.
*
* @param series the series index.
* @param label the label.
*/
public void addSeriesLabel(int series, String label) {
Integer key = new Integer(series);
List labelList = (List) this.seriesLabelLists.get(key);
if (labelList == null) {
labelList = new java.util.ArrayList();
this.seriesLabelLists.put(key, labelList);
}
labelList.add(label);
}
/**
* Clears the extra labels for the specified series.
*
* @param series the series index.
*/
public void clearSeriesLabels(int series) {
Integer key = new Integer(series);
this.seriesLabelLists.put(key, null);
}
/**
* Generates a label for the specified series. This label will be
* used for the chart legend.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param series the series.
*
* @return A series label.
*/
public String generateLabel(XYDataset dataset, int series) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
StringBuffer label = new StringBuffer();
label.append(MessageFormat.format(this.formatPattern,
createItemArray(dataset, series)));
Integer key = new Integer(series);
List extraLabels = (List) this.seriesLabelLists.get(key);
if (extraLabels != null) {
Object[] temp = new Object[1];
for (int i = 0; i < extraLabels.size(); i++) {
temp[0] = extraLabels.get(i);
String labelAddition = MessageFormat.format(
this.additionalFormatPattern, temp);
label.append(labelAddition);
}
}
return label.toString();
}
/**
* Creates the array of items that can be passed to the
* {@link MessageFormat} class for creating labels.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param series the series (zero-based index).
*
* @return The items (never <code>null</code>).
*/
protected Object[] createItemArray(XYDataset dataset, int series) {
Object[] result = new Object[1];
result[0] = dataset.getSeriesKey(series).toString();
return result;
}
/**
* Returns an independent copy of the generator.
*
* @return A clone.
*
* @throws CloneNotSupportedException if cloning is not supported.
*/
public Object clone() throws CloneNotSupportedException {
MultipleXYSeriesLabelGenerator clone
= (MultipleXYSeriesLabelGenerator) super.clone();
clone.seriesLabelLists = new HashMap();
Set keys = this.seriesLabelLists.keySet();
Iterator iterator = keys.iterator();
while (iterator.hasNext()) {
Object key = iterator.next();
Object entry = this.seriesLabelLists.get(key);
Object toAdd = entry;
if (entry instanceof PublicCloneable) {
PublicCloneable pc = (PublicCloneable) entry;
toAdd = pc.clone();
}
clone.seriesLabelLists.put(key, toAdd);
}
return clone;
}
/**
* Tests this object for equality with an arbitrary object.
*
* @param obj the other object (<code>null</code> permitted).
*
* @return A boolean.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof MultipleXYSeriesLabelGenerator)) {
return false;
}
MultipleXYSeriesLabelGenerator that
= (MultipleXYSeriesLabelGenerator) obj;
if (!this.formatPattern.equals(that.formatPattern)) {
return false;
}
if (!this.additionalFormatPattern.equals(
that.additionalFormatPattern)) {
return false;
}
if (!this.seriesLabelLists.equals(that.seriesLabelLists)) {
return false;
}
return true;
}
/**
* Returns a hash code for this instance.
*
* @return A hash code.
*/
public int hashCode() {
int result = 127;
result = HashUtilities.hashCode(result, this.formatPattern);
result = HashUtilities.hashCode(result, this.additionalFormatPattern);
result = HashUtilities.hashCode(result, this.seriesLabelLists);
return result;
}
}
| {
"pile_set_name": "Github"
} |
// SPDX-License-Identifier: GPL-2.0
/*
* This file setups defines to compile arch specific binary from the
* generic one.
*
* The function 'LIBUNWIND__ARCH_REG_ID' name is set according to arch
* name and the defination of this function is included directly from
* 'arch/arm64/util/unwind-libunwind.c', to make sure that this function
* is defined no matter what arch the host is.
*
* Finally, the arch specific unwind methods are exported which will
* be assigned to each arm64 thread.
*/
#define REMOTE_UNWIND_LIBUNWIND
/* Define arch specific functions & regs for libunwind, should be
* defined before including "unwind.h"
*/
#define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__arm64_reg_id(regnum)
#define LIBUNWIND__ARCH_REG_IP PERF_REG_ARM64_PC
#define LIBUNWIND__ARCH_REG_SP PERF_REG_ARM64_SP
#include "unwind.h"
#include "libunwind-aarch64.h"
#include <../../../../arch/arm64/include/uapi/asm/perf_regs.h>
#include "../../arch/arm64/util/unwind-libunwind.c"
/* NO_LIBUNWIND_DEBUG_FRAME is a feature flag for local libunwind,
* assign NO_LIBUNWIND_DEBUG_FRAME_AARCH64 to it for compiling arm64
* unwind methods.
*/
#undef NO_LIBUNWIND_DEBUG_FRAME
#ifdef NO_LIBUNWIND_DEBUG_FRAME_AARCH64
#define NO_LIBUNWIND_DEBUG_FRAME
#endif
#include "util/unwind-libunwind-local.c"
struct unwind_libunwind_ops *
arm64_unwind_libunwind_ops = &_unwind_libunwind_ops;
| {
"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 the main "less.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename Tag1
, typename Tag2
>
struct less_impl
: if_c<
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
)
, aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
, aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
>::type
{
};
/// for Digital Mars C++/compilers with no CTPS/TTP support
template<> struct less_impl< na,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct less_impl< na,Tag >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct less_impl< Tag,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename T > struct less_tag
{
typedef typename T::tag type;
};
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct less
: less_impl<
typename less_tag<N1>::type
, typename less_tag<N2>::type
>::template apply< N1,N2 >::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2))
};
BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
}}
namespace boost { namespace mpl {
template<>
struct less_impl< integral_c_tag,integral_c_tag >
{
template< typename N1, typename N2 > struct apply
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
{
};
};
}}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfDVBTTuning xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- SBS -->
<DVBTTuning>
<Frequency>655500</Frequency>
<BandWidth>7</BandWidth>
<Offset>125</Offset>
</DVBTTuning>
<!-- ABC -->
<DVBTTuning>
<Frequency>662500</Frequency>
<BandWidth>7</BandWidth>
<Offset>125</Offset>
</DVBTTuning>
<!-- TNT -->
<DVBTTuning>
<Frequency>669500</Frequency>
<BandWidth>7</BandWidth>
<Offset>125</Offset>
</DVBTTuning>
<!-- TVT -->
<DVBTTuning>
<Frequency>676500</Frequency>
<BandWidth>7</BandWidth>
<Offset>125</Offset>
</DVBTTuning>
<!-- TDT -->
<DVBTTuning>
<Frequency>683500</Frequency>
<BandWidth>7</BandWidth>
<Offset>125</Offset>
</DVBTTuning>
<!-- UA -->
<DVBTTuning>
<Frequency>690500</Frequency>
<BandWidth>7</BandWidth>
<Offset>125</Offset>
</DVBTTuning>
</ArrayOfDVBTTuning> | {
"pile_set_name": "Github"
} |
[Provides extended options for sound notifications.]
[Sound:]
[Not set]
[Test play]
[Ignore sound for this contact]
[Custom sound for %s (%s)]
[XSound Notify]
[Self status]
[Custom contact sound]
| {
"pile_set_name": "Github"
} |
#!/bin/sh
#(c) Copyright 2006, 2007 Barry Kauler.
#Lesser GPL licence v2 (/usr/share/doc/legal). 2007 www.puppylinux.com
#simple script to burn an iso file to cd, using cdrecord.
#w482 change -pad to padsize=300k, recommended by xorriso developer.
#w482 migrate to using xorriso.
#v431 rerwin: Add wait for drive lights to stop flashing before verifying and log the verify dd messages.
export TEXTDOMAIN=burniso2cd
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8
eval_gettext () {
local myMESSAGE=$(gettext "$1")
eval echo \"$myMESSAGE\"
}
export LANGORG=$LANG
CDRECORD='cdrecord'
if [ "`which xorriso`" != "" ];then
CDRECORD='xorrecord'
export MKISOFS='xorrisofs' #growisofs reads this variable.
fi
MEDIATYPE="`Xdialog --wmclass "mini-cd" --title "Burniso2cd" --stdout --menubox "$(gettext "Welcome to our little CD/DVD burner program!\nPlease choose whether you want to burn to a CD or DVD media.\nNote that DVDs are always burnt 'open' so can be used by Puppy\nas normal or multisession, whereas for CD you will be given\nthe choice further on whether to burn as closed or open.")" 0 0 5 CD "$(gettext 'CD-R or CD-RW (must be blank)')" DVD "$(gettext 'DVD-R or DVD-RW (must be blank)')"`"
[ ! $? -eq 0 ] && exit
SELECTIONS="`probedisk | grep '|optical|' | grep '/dev/' | cut -f 1,3 -d '|' | tr " " '_' | tr -s '_'`" #110205
SELECTIONX="`echo "$SELECTIONS" | tr '|' " " | tr "\n" " "`"
if [ "$(echo $SELECTIONX)" = "" ];then
/usr/lib/gtkdialog/box_ok "$(gettext 'Burn iso')" error "$(gettext 'No CD/DVD drive detected')"
exit
fi
BURNERDRIVE="`Xdialog --wmclass "mini-cd" --title "$(gettext 'Burniso2cd: Choose burner drive')" --stdout --menubox "$(gettext 'Choose the CD/DVD drive to burn to')" 400x200 5 $SELECTIONX 2> /dev/null`"
[ ! $? -eq 0 ] && exit
if [ -x /lib/udev/cdrom_id ] ; then
if [ ! "`/lib/udev/cdrom_id $BURNERDRIVE | grep 'ID_CDROM_.*_R'`" ] ; then
/usr/lib/gtkdialog/box_yesno --yes-label Continue --no-label Cancel "$(gettext 'Burn iso')" Error \
"$(gettext 'The chosen drive does not seem to be a burner drive')"
[ $? -ne 0 ] && exit
fi
fi
ISOFILE="`Xdialog --wmclass "mini-cd" --backtitle "$(gettext 'Please choose the iso file...')" --title "$(gettext 'Burniso2cd: Choose iso file')" --stdout --no-buttons --fselect "*.iso" 0 0`"
if [ ! $? -eq 0 ];then
exit
fi
CDR="$BURNERDRIVE"
CDDESCR="`echo "$SELECTIONS" | grep "$CDR" | cut -f 2 -d '|'`"
while [ ! "`mount | grep "$CDR"`" = "" ];do
/usr/lib/gtkdialog/box_ok "$(gettext 'Burn iso')" error "$(gettext 'The CD/DVD drive is currently mounted.')" "$CDR - $CDDESCR" " " "$(gettext 'Please unmount CD drive (use ie. Pmount), then click OK button...')"
done
if [ "$MEDIATYPE" = "CD" ];then
BURNMSG=""
else
BURNMSG="$(gettext '(blank DVD-R. A DVD+/-RW will be fast-wiped if it has data)')"
fi
RECHECK="yes"
BURNSPEED="10"
while [ 1 ];do #burn-again-loop
BURNSPEED="`Xdialog --wmclass "mini-cd" --title "$(gettext 'Burniso2cd: Burn') $MEDIATYPE" --stdout --spinbox "$(eval_gettext "Please insert blank \\\$MEDIATYPE into \\\$CDR")
$BURNMSG
$(gettext '(which is described as:') ${CDDESCR})
$(gettext 'Then click 'OK' button...')" 0 0 4 32 $BURNSPEED "$(gettext 'Set burn speed')"`"
[ ! $? -eq 0 ] && exit
sync
if [ "$MEDIATYPE" = "CD" ];then
echo "$(gettext 'Now executing:')"
BURNMULTI="-multi -tao padsize=300k"
echo " $CDRECORD $BURNMULTI -data -eject -v speed=$BURNSPEED dev=$CDR $ISOFILE"
rxvt -name burniso2cd -bg orange -geometry 80x10 -e $CDRECORD $BURNMULTI -data -eject -v speed=$BURNSPEED dev=$CDR "$ISOFILE"
else #dvd
echo "$(gettext 'Now executing:')"
echo " growisofs -speed=$BURNSPEED -Z $CDR=$ISOFILE"
rxvt -name burniso2cd -bg orange -geometry 80x10 -e growisofs -speed=$BURNSPEED -Z $CDR="$ISOFILE"
fi
sync
echo "$(gettext '...done')"
#v2.10 kirk contributed this...
# ******Verify burn******
DEVNAME="`echo -n "$CDR" | grep '/dev' | cut -f 3 -d '/'`"
if [ ! "$DEVNAME" = "" -a "$RECHECK" = "yes" ];then
Xdialog --wmclass "mini-cd" --title "$(gettext 'Burniso2cd: Finished')" --stdout --ok-label "$(gettext 'Yes')" --cancel-label "$(gettext 'No')" --yesno "$(gettext 'Would you like to verify that the burn was successful?
This may take a while depending on the size of the iso file.')" 0 0
if [ "$?" = "0" ] ;then
/usr/lib/gtkdialog/box_ok "$(gettext 'Burn verify')" cd_yes "$(gettext 'Make sure the CD/DVD drive is closed, then click OK')"
echo "Waiting 15 seconds to allow drive lights to finish blinking" > /tmp/burniso2cd.log #v431
sleep 15 #v431
if [ "$( md5sum $ISOFILE | cut -f 1 -d " " )" = "$(dd if=$CDR 2>> /tmp/burniso2cd.log | head -c `stat -c %s $ISOFILE` | md5sum | cut -f 1 -d " " )" ] ;then #v431
/usr/lib/gtkdialog/box_ok "$(gettext 'Burn verify')" complete "$(gettext 'The burn has been verified as good')"
else
/usr/lib/gtkdialog/box_ok "$(gettext 'Burn verify')" error "$(gettext 'The burn was not verified. See details in /tmp/burniso2cd.log. You should start over.')"
fi
else
RECHECK="no" #do not check if doing repeat burns.
fi
fi
eject $CDR
Xdialog --wmclass "mini-cd" --title "$(gettext 'Burniso2cd: Finished')" --stdout --ok-label "$(gettext 'FINISHED')" --cancel-label "$(gettext 'REPEAT')" --yesno "$(gettext 'If all went well, you have now burnt iso file')
$ISOFILE
$(gettext 'to a') $MEDIATYPE!
$(gettext 'If you want to burn the iso file to another') $MEDIATYPE,
$(gettext "click 'REPEAT' button...")
$(gettext "Otherwise, click 'FINISHED' to quit...")" 0 0
[ $? -ne 1 ] && break
done #burn-again-loop
###END###
| {
"pile_set_name": "Github"
} |
#import <Foundation/Foundation.h>
#import "GHHasLocationProtocol.h"
@interface GHComment : NSObject <GHHasLocationProtocol>
@property (nonatomic, readonly) GHLocation * location;
@property (nonatomic, readonly) NSString * text;
- (id)initWithLocation:(GHLocation *)theLocation text:(NSString *)theText;
@end | {
"pile_set_name": "Github"
} |
package com.xiaolyuh;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringBootStudentMybatisDruid2ApplicationTests {
@Test
public void contextLoads() {
}
}
| {
"pile_set_name": "Github"
} |
@import XCTest;
@import Quick;
@import Nimble;
#import "QCKSpecRunner.h"
static NSUInteger specBeforeEachExecutedCount = 0;
static NSUInteger sharedExamplesBeforeEachExecutedCount = 0;
QuickConfigurationBegin(FunctionalTests_SharedExamples_BeforeEachTests_SharedExamples_ObjC)
+ (void)configure:(Configuration *)configuration {
sharedExamples(@"a group of three shared examples with a beforeEach in Obj-C",
^(QCKDSLSharedExampleContext context) {
beforeEach(^{ sharedExamplesBeforeEachExecutedCount += 1; });
it(@"passes once", ^{});
it(@"passes twice", ^{});
it(@"passes three times", ^{});
});
}
QuickConfigurationEnd
QuickSpecBegin(FunctionalTests_SharedExamples_BeforeEachSpec_ObjC)
beforeEach(^{ specBeforeEachExecutedCount += 1; });
it(@"executes the spec beforeEach once", ^{});
itBehavesLike(@"a group of three shared examples with a beforeEach in Obj-C",
^NSDictionary*{ return @{}; });
QuickSpecEnd
@interface SharedExamples_BeforeEachTests_ObjC : XCTestCase; @end
@implementation SharedExamples_BeforeEachTests_ObjC
- (void)setUp {
[super setUp];
specBeforeEachExecutedCount = 0;
sharedExamplesBeforeEachExecutedCount = 0;
}
- (void)tearDown {
specBeforeEachExecutedCount = 0;
sharedExamplesBeforeEachExecutedCount = 0;
[super tearDown];
}
- (void)testBeforeEachOutsideOfSharedExamplesExecutedOnceBeforeEachExample {
qck_runSpec([FunctionalTests_SharedExamples_BeforeEachSpec_ObjC class]);
XCTAssertEqual(specBeforeEachExecutedCount, 4);
}
- (void)testBeforeEachInSharedExamplesExecutedOnceBeforeEachSharedExample {
qck_runSpec([FunctionalTests_SharedExamples_BeforeEachSpec_ObjC class]);
XCTAssertEqual(sharedExamplesBeforeEachExecutedCount, 3);
}
@end
| {
"pile_set_name": "Github"
} |
### request
```js
//<request>
{
"channelId": "youlong"
}
``` | {
"pile_set_name": "Github"
} |
/*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* RevisionHandler.java
* Copyright (C) 2008 University of Waikato, Hamilton, New Zealand
*/
package weka.core;
/**
* For classes that should return their source control revision.
*
* @author fracpete (fracpete at waikato dot ac dot nz)
* @version $Revision: 5953 $
* @see weka.core.RevisionUtils
*/
public interface RevisionHandler {
/**
* Returns the revision string.
*
* @return the revision
*/
public String getRevision();
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Generic;
using System.Text;
namespace NetOffice
{
/// <summary>
/// DebugConsole operation mode
/// </summary>
public enum DebugConsoleMode
{
/// <summary>
/// Debug log is disabled
/// </summary>
None = 0,
/// <summary>
/// Debug log is redirected to System.Console
/// </summary>
Console = 1,
/// <summary>
/// Debug log append to a logfile
/// </summary>
LogFile = 2,
/*
MemoryList has been removed in NetOffice 1.7.4
All messages goes automatically to the internal list now, regardless from the mode.
Moreover the message list want contains only 100 items and remove the oldest automatically.
*/
/// <summary>
/// Debug log is redirected to System.Diagnostics.Trace
/// </summary>
Trace = 4
}
} | {
"pile_set_name": "Github"
} |
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
/* $Id: skein.c 254 2011-06-07 19:38:58Z tp $ */
/*
* Skein implementation.
*
* ==========================(LICENSE BEGIN)============================
*
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
*
* 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.
*
* ===========================(LICENSE END)=============================
*
* @author Thomas Pornin <[email protected]>
*/
#include <stddef.h>
#include <string.h>
#include "sph_skein.h"
#ifdef __cplusplus
extern "C"{
#endif
#if SPH_SMALL_FOOTPRINT && !defined SPH_SMALL_FOOTPRINT_SKEIN
#define SPH_SMALL_FOOTPRINT_SKEIN 1
#endif
#ifdef _MSC_VER
#pragma warning (disable: 4146)
#endif
#if SPH_64
#if 0
/* obsolete */
/*
* M5_ ## s ## _ ## i evaluates to s+i mod 5 (0 <= s <= 18, 0 <= i <= 3).
*/
#define M5_0_0 0
#define M5_0_1 1
#define M5_0_2 2
#define M5_0_3 3
#define M5_1_0 1
#define M5_1_1 2
#define M5_1_2 3
#define M5_1_3 4
#define M5_2_0 2
#define M5_2_1 3
#define M5_2_2 4
#define M5_2_3 0
#define M5_3_0 3
#define M5_3_1 4
#define M5_3_2 0
#define M5_3_3 1
#define M5_4_0 4
#define M5_4_1 0
#define M5_4_2 1
#define M5_4_3 2
#define M5_5_0 0
#define M5_5_1 1
#define M5_5_2 2
#define M5_5_3 3
#define M5_6_0 1
#define M5_6_1 2
#define M5_6_2 3
#define M5_6_3 4
#define M5_7_0 2
#define M5_7_1 3
#define M5_7_2 4
#define M5_7_3 0
#define M5_8_0 3
#define M5_8_1 4
#define M5_8_2 0
#define M5_8_3 1
#define M5_9_0 4
#define M5_9_1 0
#define M5_9_2 1
#define M5_9_3 2
#define M5_10_0 0
#define M5_10_1 1
#define M5_10_2 2
#define M5_10_3 3
#define M5_11_0 1
#define M5_11_1 2
#define M5_11_2 3
#define M5_11_3 4
#define M5_12_0 2
#define M5_12_1 3
#define M5_12_2 4
#define M5_12_3 0
#define M5_13_0 3
#define M5_13_1 4
#define M5_13_2 0
#define M5_13_3 1
#define M5_14_0 4
#define M5_14_1 0
#define M5_14_2 1
#define M5_14_3 2
#define M5_15_0 0
#define M5_15_1 1
#define M5_15_2 2
#define M5_15_3 3
#define M5_16_0 1
#define M5_16_1 2
#define M5_16_2 3
#define M5_16_3 4
#define M5_17_0 2
#define M5_17_1 3
#define M5_17_2 4
#define M5_17_3 0
#define M5_18_0 3
#define M5_18_1 4
#define M5_18_2 0
#define M5_18_3 1
#endif
/*
* M9_ ## s ## _ ## i evaluates to s+i mod 9 (0 <= s <= 18, 0 <= i <= 7).
*/
#define M9_0_0 0
#define M9_0_1 1
#define M9_0_2 2
#define M9_0_3 3
#define M9_0_4 4
#define M9_0_5 5
#define M9_0_6 6
#define M9_0_7 7
#define M9_1_0 1
#define M9_1_1 2
#define M9_1_2 3
#define M9_1_3 4
#define M9_1_4 5
#define M9_1_5 6
#define M9_1_6 7
#define M9_1_7 8
#define M9_2_0 2
#define M9_2_1 3
#define M9_2_2 4
#define M9_2_3 5
#define M9_2_4 6
#define M9_2_5 7
#define M9_2_6 8
#define M9_2_7 0
#define M9_3_0 3
#define M9_3_1 4
#define M9_3_2 5
#define M9_3_3 6
#define M9_3_4 7
#define M9_3_5 8
#define M9_3_6 0
#define M9_3_7 1
#define M9_4_0 4
#define M9_4_1 5
#define M9_4_2 6
#define M9_4_3 7
#define M9_4_4 8
#define M9_4_5 0
#define M9_4_6 1
#define M9_4_7 2
#define M9_5_0 5
#define M9_5_1 6
#define M9_5_2 7
#define M9_5_3 8
#define M9_5_4 0
#define M9_5_5 1
#define M9_5_6 2
#define M9_5_7 3
#define M9_6_0 6
#define M9_6_1 7
#define M9_6_2 8
#define M9_6_3 0
#define M9_6_4 1
#define M9_6_5 2
#define M9_6_6 3
#define M9_6_7 4
#define M9_7_0 7
#define M9_7_1 8
#define M9_7_2 0
#define M9_7_3 1
#define M9_7_4 2
#define M9_7_5 3
#define M9_7_6 4
#define M9_7_7 5
#define M9_8_0 8
#define M9_8_1 0
#define M9_8_2 1
#define M9_8_3 2
#define M9_8_4 3
#define M9_8_5 4
#define M9_8_6 5
#define M9_8_7 6
#define M9_9_0 0
#define M9_9_1 1
#define M9_9_2 2
#define M9_9_3 3
#define M9_9_4 4
#define M9_9_5 5
#define M9_9_6 6
#define M9_9_7 7
#define M9_10_0 1
#define M9_10_1 2
#define M9_10_2 3
#define M9_10_3 4
#define M9_10_4 5
#define M9_10_5 6
#define M9_10_6 7
#define M9_10_7 8
#define M9_11_0 2
#define M9_11_1 3
#define M9_11_2 4
#define M9_11_3 5
#define M9_11_4 6
#define M9_11_5 7
#define M9_11_6 8
#define M9_11_7 0
#define M9_12_0 3
#define M9_12_1 4
#define M9_12_2 5
#define M9_12_3 6
#define M9_12_4 7
#define M9_12_5 8
#define M9_12_6 0
#define M9_12_7 1
#define M9_13_0 4
#define M9_13_1 5
#define M9_13_2 6
#define M9_13_3 7
#define M9_13_4 8
#define M9_13_5 0
#define M9_13_6 1
#define M9_13_7 2
#define M9_14_0 5
#define M9_14_1 6
#define M9_14_2 7
#define M9_14_3 8
#define M9_14_4 0
#define M9_14_5 1
#define M9_14_6 2
#define M9_14_7 3
#define M9_15_0 6
#define M9_15_1 7
#define M9_15_2 8
#define M9_15_3 0
#define M9_15_4 1
#define M9_15_5 2
#define M9_15_6 3
#define M9_15_7 4
#define M9_16_0 7
#define M9_16_1 8
#define M9_16_2 0
#define M9_16_3 1
#define M9_16_4 2
#define M9_16_5 3
#define M9_16_6 4
#define M9_16_7 5
#define M9_17_0 8
#define M9_17_1 0
#define M9_17_2 1
#define M9_17_3 2
#define M9_17_4 3
#define M9_17_5 4
#define M9_17_6 5
#define M9_17_7 6
#define M9_18_0 0
#define M9_18_1 1
#define M9_18_2 2
#define M9_18_3 3
#define M9_18_4 4
#define M9_18_5 5
#define M9_18_6 6
#define M9_18_7 7
/*
* M3_ ## s ## _ ## i evaluates to s+i mod 3 (0 <= s <= 18, 0 <= i <= 1).
*/
#define M3_0_0 0
#define M3_0_1 1
#define M3_1_0 1
#define M3_1_1 2
#define M3_2_0 2
#define M3_2_1 0
#define M3_3_0 0
#define M3_3_1 1
#define M3_4_0 1
#define M3_4_1 2
#define M3_5_0 2
#define M3_5_1 0
#define M3_6_0 0
#define M3_6_1 1
#define M3_7_0 1
#define M3_7_1 2
#define M3_8_0 2
#define M3_8_1 0
#define M3_9_0 0
#define M3_9_1 1
#define M3_10_0 1
#define M3_10_1 2
#define M3_11_0 2
#define M3_11_1 0
#define M3_12_0 0
#define M3_12_1 1
#define M3_13_0 1
#define M3_13_1 2
#define M3_14_0 2
#define M3_14_1 0
#define M3_15_0 0
#define M3_15_1 1
#define M3_16_0 1
#define M3_16_1 2
#define M3_17_0 2
#define M3_17_1 0
#define M3_18_0 0
#define M3_18_1 1
#define XCAT(x, y) XCAT_(x, y)
#define XCAT_(x, y) x ## y
#if 0
/* obsolete */
#define SKSI(k, s, i) XCAT(k, XCAT(XCAT(XCAT(M5_, s), _), i))
#define SKST(t, s, v) XCAT(t, XCAT(XCAT(XCAT(M3_, s), _), v))
#endif
#define SKBI(k, s, i) XCAT(k, XCAT(XCAT(XCAT(M9_, s), _), i))
#define SKBT(t, s, v) XCAT(t, XCAT(XCAT(XCAT(M3_, s), _), v))
#if 0
/* obsolete */
#define TFSMALL_KINIT(k0, k1, k2, k3, k4, t0, t1, t2) do { \
k4 = (k0 ^ k1) ^ (k2 ^ k3) ^ SPH_C64(0x1BD11BDAA9FC1A22); \
t2 = t0 ^ t1; \
} while (0)
#endif
#define TFBIG_KINIT(k0, k1, k2, k3, k4, k5, k6, k7, k8, t0, t1, t2) do { \
k8 = ((k0 ^ k1) ^ (k2 ^ k3)) ^ ((k4 ^ k5) ^ (k6 ^ k7)) \
^ SPH_C64(0x1BD11BDAA9FC1A22); \
t2 = t0 ^ t1; \
} while (0)
#if 0
/* obsolete */
#define TFSMALL_ADDKEY(w0, w1, w2, w3, k, t, s) do { \
w0 = SPH_T64(w0 + SKSI(k, s, 0)); \
w1 = SPH_T64(w1 + SKSI(k, s, 1) + SKST(t, s, 0)); \
w2 = SPH_T64(w2 + SKSI(k, s, 2) + SKST(t, s, 1)); \
w3 = SPH_T64(w3 + SKSI(k, s, 3) + (sph_u64)s); \
} while (0)
#endif
#if SPH_SMALL_FOOTPRINT_SKEIN
#define TFBIG_ADDKEY(s, tt0, tt1) do { \
p0 = SPH_T64(p0 + h[s + 0]); \
p1 = SPH_T64(p1 + h[s + 1]); \
p2 = SPH_T64(p2 + h[s + 2]); \
p3 = SPH_T64(p3 + h[s + 3]); \
p4 = SPH_T64(p4 + h[s + 4]); \
p5 = SPH_T64(p5 + h[s + 5] + tt0); \
p6 = SPH_T64(p6 + h[s + 6] + tt1); \
p7 = SPH_T64(p7 + h[s + 7] + (sph_u64)s); \
} while (0)
#else
#define TFBIG_ADDKEY(w0, w1, w2, w3, w4, w5, w6, w7, k, t, s) do { \
w0 = SPH_T64(w0 + SKBI(k, s, 0)); \
w1 = SPH_T64(w1 + SKBI(k, s, 1)); \
w2 = SPH_T64(w2 + SKBI(k, s, 2)); \
w3 = SPH_T64(w3 + SKBI(k, s, 3)); \
w4 = SPH_T64(w4 + SKBI(k, s, 4)); \
w5 = SPH_T64(w5 + SKBI(k, s, 5) + SKBT(t, s, 0)); \
w6 = SPH_T64(w6 + SKBI(k, s, 6) + SKBT(t, s, 1)); \
w7 = SPH_T64(w7 + SKBI(k, s, 7) + (sph_u64)s); \
} while (0)
#endif
#if 0
/* obsolete */
#define TFSMALL_MIX(x0, x1, rc) do { \
x0 = SPH_T64(x0 + x1); \
x1 = SPH_ROTL64(x1, rc) ^ x0; \
} while (0)
#endif
#define TFBIG_MIX(x0, x1, rc) do { \
x0 = SPH_T64(x0 + x1); \
x1 = SPH_ROTL64(x1, rc) ^ x0; \
} while (0)
#if 0
/* obsolete */
#define TFSMALL_MIX4(w0, w1, w2, w3, rc0, rc1) do { \
TFSMALL_MIX(w0, w1, rc0); \
TFSMALL_MIX(w2, w3, rc1); \
} while (0)
#endif
#define TFBIG_MIX8(w0, w1, w2, w3, w4, w5, w6, w7, rc0, rc1, rc2, rc3) do { \
TFBIG_MIX(w0, w1, rc0); \
TFBIG_MIX(w2, w3, rc1); \
TFBIG_MIX(w4, w5, rc2); \
TFBIG_MIX(w6, w7, rc3); \
} while (0)
#if 0
/* obsolete */
#define TFSMALL_4e(s) do { \
TFSMALL_ADDKEY(p0, p1, p2, p3, h, t, s); \
TFSMALL_MIX4(p0, p1, p2, p3, 14, 16); \
TFSMALL_MIX4(p0, p3, p2, p1, 52, 57); \
TFSMALL_MIX4(p0, p1, p2, p3, 23, 40); \
TFSMALL_MIX4(p0, p3, p2, p1, 5, 37); \
} while (0)
#define TFSMALL_4o(s) do { \
TFSMALL_ADDKEY(p0, p1, p2, p3, h, t, s); \
TFSMALL_MIX4(p0, p1, p2, p3, 25, 33); \
TFSMALL_MIX4(p0, p3, p2, p1, 46, 12); \
TFSMALL_MIX4(p0, p1, p2, p3, 58, 22); \
TFSMALL_MIX4(p0, p3, p2, p1, 32, 32); \
} while (0)
#endif
#if SPH_SMALL_FOOTPRINT_SKEIN
#define TFBIG_4e(s) do { \
TFBIG_ADDKEY(s, t0, t1); \
TFBIG_MIX8(p0, p1, p2, p3, p4, p5, p6, p7, 46, 36, 19, 37); \
TFBIG_MIX8(p2, p1, p4, p7, p6, p5, p0, p3, 33, 27, 14, 42); \
TFBIG_MIX8(p4, p1, p6, p3, p0, p5, p2, p7, 17, 49, 36, 39); \
TFBIG_MIX8(p6, p1, p0, p7, p2, p5, p4, p3, 44, 9, 54, 56); \
} while (0)
#define TFBIG_4o(s) do { \
TFBIG_ADDKEY(s, t1, t2); \
TFBIG_MIX8(p0, p1, p2, p3, p4, p5, p6, p7, 39, 30, 34, 24); \
TFBIG_MIX8(p2, p1, p4, p7, p6, p5, p0, p3, 13, 50, 10, 17); \
TFBIG_MIX8(p4, p1, p6, p3, p0, p5, p2, p7, 25, 29, 39, 43); \
TFBIG_MIX8(p6, p1, p0, p7, p2, p5, p4, p3, 8, 35, 56, 22); \
} while (0)
#else
#define TFBIG_4e(s) do { \
TFBIG_ADDKEY(p0, p1, p2, p3, p4, p5, p6, p7, h, t, s); \
TFBIG_MIX8(p0, p1, p2, p3, p4, p5, p6, p7, 46, 36, 19, 37); \
TFBIG_MIX8(p2, p1, p4, p7, p6, p5, p0, p3, 33, 27, 14, 42); \
TFBIG_MIX8(p4, p1, p6, p3, p0, p5, p2, p7, 17, 49, 36, 39); \
TFBIG_MIX8(p6, p1, p0, p7, p2, p5, p4, p3, 44, 9, 54, 56); \
} while (0)
#define TFBIG_4o(s) do { \
TFBIG_ADDKEY(p0, p1, p2, p3, p4, p5, p6, p7, h, t, s); \
TFBIG_MIX8(p0, p1, p2, p3, p4, p5, p6, p7, 39, 30, 34, 24); \
TFBIG_MIX8(p2, p1, p4, p7, p6, p5, p0, p3, 13, 50, 10, 17); \
TFBIG_MIX8(p4, p1, p6, p3, p0, p5, p2, p7, 25, 29, 39, 43); \
TFBIG_MIX8(p6, p1, p0, p7, p2, p5, p4, p3, 8, 35, 56, 22); \
} while (0)
#endif
#if 0
/* obsolete */
#define UBI_SMALL(etype, extra) do { \
sph_u64 h4, t0, t1, t2; \
sph_u64 m0 = sph_dec64le(buf + 0); \
sph_u64 m1 = sph_dec64le(buf + 8); \
sph_u64 m2 = sph_dec64le(buf + 16); \
sph_u64 m3 = sph_dec64le(buf + 24); \
sph_u64 p0 = m0; \
sph_u64 p1 = m1; \
sph_u64 p2 = m2; \
sph_u64 p3 = m3; \
t0 = SPH_T64(bcount << 5) + (sph_u64)(extra); \
t1 = (bcount >> 59) + ((sph_u64)(etype) << 55); \
TFSMALL_KINIT(h0, h1, h2, h3, h4, t0, t1, t2); \
TFSMALL_4e(0); \
TFSMALL_4o(1); \
TFSMALL_4e(2); \
TFSMALL_4o(3); \
TFSMALL_4e(4); \
TFSMALL_4o(5); \
TFSMALL_4e(6); \
TFSMALL_4o(7); \
TFSMALL_4e(8); \
TFSMALL_4o(9); \
TFSMALL_4e(10); \
TFSMALL_4o(11); \
TFSMALL_4e(12); \
TFSMALL_4o(13); \
TFSMALL_4e(14); \
TFSMALL_4o(15); \
TFSMALL_4e(16); \
TFSMALL_4o(17); \
TFSMALL_ADDKEY(p0, p1, p2, p3, h, t, 18); \
h0 = m0 ^ p0; \
h1 = m1 ^ p1; \
h2 = m2 ^ p2; \
h3 = m3 ^ p3; \
} while (0)
#endif
#if SPH_SMALL_FOOTPRINT_SKEIN
#define UBI_BIG(etype, extra) do { \
sph_u64 t0, t1, t2; \
unsigned u; \
sph_u64 m0 = sph_dec64le_aligned(buf + 0); \
sph_u64 m1 = sph_dec64le_aligned(buf + 8); \
sph_u64 m2 = sph_dec64le_aligned(buf + 16); \
sph_u64 m3 = sph_dec64le_aligned(buf + 24); \
sph_u64 m4 = sph_dec64le_aligned(buf + 32); \
sph_u64 m5 = sph_dec64le_aligned(buf + 40); \
sph_u64 m6 = sph_dec64le_aligned(buf + 48); \
sph_u64 m7 = sph_dec64le_aligned(buf + 56); \
sph_u64 p0 = m0; \
sph_u64 p1 = m1; \
sph_u64 p2 = m2; \
sph_u64 p3 = m3; \
sph_u64 p4 = m4; \
sph_u64 p5 = m5; \
sph_u64 p6 = m6; \
sph_u64 p7 = m7; \
t0 = SPH_T64(bcount << 6) + (sph_u64)(extra); \
t1 = (bcount >> 58) + ((sph_u64)(etype) << 55); \
TFBIG_KINIT(h[0], h[1], h[2], h[3], h[4], h[5], \
h[6], h[7], h[8], t0, t1, t2); \
for (u = 0; u <= 15; u += 3) { \
h[u + 9] = h[u + 0]; \
h[u + 10] = h[u + 1]; \
h[u + 11] = h[u + 2]; \
} \
for (u = 0; u < 9; u ++) { \
sph_u64 s = u << 1; \
sph_u64 tmp; \
TFBIG_4e(s); \
TFBIG_4o(s + 1); \
tmp = t2; \
t2 = t1; \
t1 = t0; \
t0 = tmp; \
} \
TFBIG_ADDKEY(18, t0, t1); \
h[0] = m0 ^ p0; \
h[1] = m1 ^ p1; \
h[2] = m2 ^ p2; \
h[3] = m3 ^ p3; \
h[4] = m4 ^ p4; \
h[5] = m5 ^ p5; \
h[6] = m6 ^ p6; \
h[7] = m7 ^ p7; \
} while (0)
#else
#define UBI_BIG(etype, extra) do { \
sph_u64 h8, t0, t1, t2; \
sph_u64 m0 = sph_dec64le_aligned(buf + 0); \
sph_u64 m1 = sph_dec64le_aligned(buf + 8); \
sph_u64 m2 = sph_dec64le_aligned(buf + 16); \
sph_u64 m3 = sph_dec64le_aligned(buf + 24); \
sph_u64 m4 = sph_dec64le_aligned(buf + 32); \
sph_u64 m5 = sph_dec64le_aligned(buf + 40); \
sph_u64 m6 = sph_dec64le_aligned(buf + 48); \
sph_u64 m7 = sph_dec64le_aligned(buf + 56); \
sph_u64 p0 = m0; \
sph_u64 p1 = m1; \
sph_u64 p2 = m2; \
sph_u64 p3 = m3; \
sph_u64 p4 = m4; \
sph_u64 p5 = m5; \
sph_u64 p6 = m6; \
sph_u64 p7 = m7; \
t0 = SPH_T64(bcount << 6) + (sph_u64)(extra); \
t1 = (bcount >> 58) + ((sph_u64)(etype) << 55); \
TFBIG_KINIT(h0, h1, h2, h3, h4, h5, h6, h7, h8, t0, t1, t2); \
TFBIG_4e(0); \
TFBIG_4o(1); \
TFBIG_4e(2); \
TFBIG_4o(3); \
TFBIG_4e(4); \
TFBIG_4o(5); \
TFBIG_4e(6); \
TFBIG_4o(7); \
TFBIG_4e(8); \
TFBIG_4o(9); \
TFBIG_4e(10); \
TFBIG_4o(11); \
TFBIG_4e(12); \
TFBIG_4o(13); \
TFBIG_4e(14); \
TFBIG_4o(15); \
TFBIG_4e(16); \
TFBIG_4o(17); \
TFBIG_ADDKEY(p0, p1, p2, p3, p4, p5, p6, p7, h, t, 18); \
h0 = m0 ^ p0; \
h1 = m1 ^ p1; \
h2 = m2 ^ p2; \
h3 = m3 ^ p3; \
h4 = m4 ^ p4; \
h5 = m5 ^ p5; \
h6 = m6 ^ p6; \
h7 = m7 ^ p7; \
} while (0)
#endif
#if 0
/* obsolete */
#define DECL_STATE_SMALL \
sph_u64 h0, h1, h2, h3; \
sph_u64 bcount;
#define READ_STATE_SMALL(sc) do { \
h0 = (sc)->h0; \
h1 = (sc)->h1; \
h2 = (sc)->h2; \
h3 = (sc)->h3; \
bcount = sc->bcount; \
} while (0)
#define WRITE_STATE_SMALL(sc) do { \
(sc)->h0 = h0; \
(sc)->h1 = h1; \
(sc)->h2 = h2; \
(sc)->h3 = h3; \
sc->bcount = bcount; \
} while (0)
#endif
#if SPH_SMALL_FOOTPRINT_SKEIN
#define DECL_STATE_BIG \
sph_u64 h[27]; \
sph_u64 bcount;
#define READ_STATE_BIG(sc) do { \
h[0] = (sc)->h0; \
h[1] = (sc)->h1; \
h[2] = (sc)->h2; \
h[3] = (sc)->h3; \
h[4] = (sc)->h4; \
h[5] = (sc)->h5; \
h[6] = (sc)->h6; \
h[7] = (sc)->h7; \
bcount = sc->bcount; \
} while (0)
#define WRITE_STATE_BIG(sc) do { \
(sc)->h0 = h[0]; \
(sc)->h1 = h[1]; \
(sc)->h2 = h[2]; \
(sc)->h3 = h[3]; \
(sc)->h4 = h[4]; \
(sc)->h5 = h[5]; \
(sc)->h6 = h[6]; \
(sc)->h7 = h[7]; \
sc->bcount = bcount; \
} while (0)
#else
#define DECL_STATE_BIG \
sph_u64 h0, h1, h2, h3, h4, h5, h6, h7; \
sph_u64 bcount;
#define READ_STATE_BIG(sc) do { \
h0 = (sc)->h0; \
h1 = (sc)->h1; \
h2 = (sc)->h2; \
h3 = (sc)->h3; \
h4 = (sc)->h4; \
h5 = (sc)->h5; \
h6 = (sc)->h6; \
h7 = (sc)->h7; \
bcount = sc->bcount; \
} while (0)
#define WRITE_STATE_BIG(sc) do { \
(sc)->h0 = h0; \
(sc)->h1 = h1; \
(sc)->h2 = h2; \
(sc)->h3 = h3; \
(sc)->h4 = h4; \
(sc)->h5 = h5; \
(sc)->h6 = h6; \
(sc)->h7 = h7; \
sc->bcount = bcount; \
} while (0)
#endif
#if 0
/* obsolete */
static void
skein_small_init(sph_skein_small_context *sc, const sph_u64 *iv)
{
sc->h0 = iv[0];
sc->h1 = iv[1];
sc->h2 = iv[2];
sc->h3 = iv[3];
sc->bcount = 0;
sc->ptr = 0;
}
#endif
static void
skein_big_init(sph_skein_big_context *sc, const sph_u64 *iv)
{
sc->h0 = iv[0];
sc->h1 = iv[1];
sc->h2 = iv[2];
sc->h3 = iv[3];
sc->h4 = iv[4];
sc->h5 = iv[5];
sc->h6 = iv[6];
sc->h7 = iv[7];
sc->bcount = 0;
sc->ptr = 0;
}
#if 0
/* obsolete */
static void
skein_small_core(sph_skein_small_context *sc, const void *data, size_t len)
{
unsigned char *buf;
size_t ptr, clen;
unsigned first;
DECL_STATE_SMALL
buf = sc->buf;
ptr = sc->ptr;
clen = (sizeof sc->buf) - ptr;
if (len <= clen) {
memcpy(buf + ptr, data, len);
sc->ptr = ptr + len;
return;
}
if (clen != 0) {
memcpy(buf + ptr, data, clen);
data = (const unsigned char *)data + clen;
len -= clen;
}
#if SPH_SMALL_FOOTPRINT_SKEIN
READ_STATE_SMALL(sc);
first = (bcount == 0) << 7;
for (;;) {
bcount ++;
UBI_SMALL(96 + first, 0);
if (len <= sizeof sc->buf)
break;
first = 0;
memcpy(buf, data, sizeof sc->buf);
data = (const unsigned char *)data + sizeof sc->buf;
len -= sizeof sc->buf;
}
WRITE_STATE_SMALL(sc);
sc->ptr = len;
memcpy(buf, data, len);
#else
/*
* Unrolling the loop yields a slight performance boost, while
* keeping the code size aorund 24 kB on 32-bit x86.
*/
READ_STATE_SMALL(sc);
first = (bcount == 0) << 7;
for (;;) {
bcount ++;
UBI_SMALL(96 + first, 0);
if (len <= sizeof sc->buf)
break;
buf = (unsigned char *)data;
bcount ++;
UBI_SMALL(96, 0);
if (len <= 2 * sizeof sc->buf) {
data = buf + sizeof sc->buf;
len -= sizeof sc->buf;
break;
}
buf += sizeof sc->buf;
data = buf + sizeof sc->buf;
first = 0;
len -= 2 * sizeof sc->buf;
}
WRITE_STATE_SMALL(sc);
sc->ptr = len;
memcpy(sc->buf, data, len);
#endif
}
#endif
static void
skein_big_core(sph_skein_big_context *sc, const void *data, size_t len)
{
/*
* The Skein "final bit" in the tweak is troublesome here,
* because if the input has a length which is a multiple of the
* block size (512 bits) then that bit must be set for the
* final block, which is full of message bits (padding in
* Skein can be reduced to no extra bit at all). However, this
* function cannot know whether it processes the last chunks of
* the message or not. Hence we may keep a full block of buffered
* data (64 bytes).
*/
unsigned char *buf;
size_t ptr;
unsigned first;
DECL_STATE_BIG
buf = sc->buf;
ptr = sc->ptr;
if (len <= (sizeof sc->buf) - ptr) {
memcpy(buf + ptr, data, len);
ptr += len;
sc->ptr = ptr;
return;
}
READ_STATE_BIG(sc);
first = (bcount == 0) << 7;
do {
size_t clen;
if (ptr == sizeof sc->buf) {
bcount ++;
UBI_BIG(96 + first, 0);
first = 0;
ptr = 0;
}
clen = (sizeof sc->buf) - ptr;
if (clen > len)
clen = len;
memcpy(buf + ptr, data, clen);
ptr += clen;
data = (const unsigned char *)data + clen;
len -= clen;
} while (len > 0);
WRITE_STATE_BIG(sc);
sc->ptr = ptr;
}
#if 0
/* obsolete */
static void
skein_small_close(sph_skein_small_context *sc, unsigned ub, unsigned n,
void *dst, size_t out_len)
{
unsigned char *buf;
size_t ptr;
unsigned et;
int i;
DECL_STATE_SMALL
if (n != 0) {
unsigned z;
unsigned char x;
z = 0x80 >> n;
x = ((ub & -z) | z) & 0xFF;
skein_small_core(sc, &x, 1);
}
buf = sc->buf;
ptr = sc->ptr;
READ_STATE_SMALL(sc);
memset(buf + ptr, 0, (sizeof sc->buf) - ptr);
et = 352 + ((bcount == 0) << 7) + (n != 0);
for (i = 0; i < 2; i ++) {
UBI_SMALL(et, ptr);
if (i == 0) {
memset(buf, 0, sizeof sc->buf);
bcount = 0;
et = 510;
ptr = 8;
}
}
sph_enc64le_aligned(buf + 0, h0);
sph_enc64le_aligned(buf + 8, h1);
sph_enc64le_aligned(buf + 16, h2);
sph_enc64le_aligned(buf + 24, h3);
memcpy(dst, buf, out_len);
}
#endif
static void
skein_big_close(sph_skein_big_context *sc, unsigned ub, unsigned n,
void *dst, size_t out_len)
{
unsigned char *buf;
size_t ptr;
unsigned et;
int i;
#if SPH_SMALL_FOOTPRINT_SKEIN
size_t u;
#endif
DECL_STATE_BIG
/*
* Add bit padding if necessary.
*/
if (n != 0) {
unsigned z;
unsigned char x;
z = 0x80 >> n;
x = ((ub & -z) | z) & 0xFF;
skein_big_core(sc, &x, 1);
}
buf = sc->buf;
ptr = sc->ptr;
/*
* At that point, if ptr == 0, then the message was empty;
* otherwise, there is between 1 and 64 bytes (inclusive) which
* are yet to be processed. Either way, we complete the buffer
* to a full block with zeros (the Skein specification mandates
* that an empty message is padded so that there is at least
* one block to process).
*
* Once this block has been processed, we do it again, with
* a block full of zeros, for the output (that block contains
* the encoding of "0", over 8 bytes, then padded with zeros).
*/
READ_STATE_BIG(sc);
memset(buf + ptr, 0, (sizeof sc->buf) - ptr);
et = 352 + ((bcount == 0) << 7) + (n != 0);
for (i = 0; i < 2; i ++) {
UBI_BIG(et, ptr);
if (i == 0) {
memset(buf, 0, sizeof sc->buf);
bcount = 0;
et = 510;
ptr = 8;
}
}
#if SPH_SMALL_FOOTPRINT_SKEIN
/*
* We use a temporary buffer because we must support the case
* where output size is not a multiple of 64 (namely, a 224-bit
* output).
*/
for (u = 0; u < out_len; u += 8)
sph_enc64le_aligned(buf + u, h[u >> 3]);
memcpy(dst, buf, out_len);
#else
sph_enc64le_aligned(buf + 0, h0);
sph_enc64le_aligned(buf + 8, h1);
sph_enc64le_aligned(buf + 16, h2);
sph_enc64le_aligned(buf + 24, h3);
sph_enc64le_aligned(buf + 32, h4);
sph_enc64le_aligned(buf + 40, h5);
sph_enc64le_aligned(buf + 48, h6);
sph_enc64le_aligned(buf + 56, h7);
memcpy(dst, buf, out_len);
#endif
}
#if 0
/* obsolete */
static const sph_u64 IV224[] = {
SPH_C64(0xC6098A8C9AE5EA0B), SPH_C64(0x876D568608C5191C),
SPH_C64(0x99CB88D7D7F53884), SPH_C64(0x384BDDB1AEDDB5DE)
};
static const sph_u64 IV256[] = {
SPH_C64(0xFC9DA860D048B449), SPH_C64(0x2FCA66479FA7D833),
SPH_C64(0xB33BC3896656840F), SPH_C64(0x6A54E920FDE8DA69)
};
#endif
static const sph_u64 IV224[] = {
SPH_C64(0xCCD0616248677224), SPH_C64(0xCBA65CF3A92339EF),
SPH_C64(0x8CCD69D652FF4B64), SPH_C64(0x398AED7B3AB890B4),
SPH_C64(0x0F59D1B1457D2BD0), SPH_C64(0x6776FE6575D4EB3D),
SPH_C64(0x99FBC70E997413E9), SPH_C64(0x9E2CFCCFE1C41EF7)
};
static const sph_u64 IV256[] = {
SPH_C64(0xCCD044A12FDB3E13), SPH_C64(0xE83590301A79A9EB),
SPH_C64(0x55AEA0614F816E6F), SPH_C64(0x2A2767A4AE9B94DB),
SPH_C64(0xEC06025E74DD7683), SPH_C64(0xE7A436CDC4746251),
SPH_C64(0xC36FBAF9393AD185), SPH_C64(0x3EEDBA1833EDFC13)
};
static const sph_u64 IV384[] = {
SPH_C64(0xA3F6C6BF3A75EF5F), SPH_C64(0xB0FEF9CCFD84FAA4),
SPH_C64(0x9D77DD663D770CFE), SPH_C64(0xD798CBF3B468FDDA),
SPH_C64(0x1BC4A6668A0E4465), SPH_C64(0x7ED7D434E5807407),
SPH_C64(0x548FC1ACD4EC44D6), SPH_C64(0x266E17546AA18FF8)
};
static const sph_u64 IV512[] = {
SPH_C64(0x4903ADFF749C51CE), SPH_C64(0x0D95DE399746DF03),
SPH_C64(0x8FD1934127C79BCE), SPH_C64(0x9A255629FF352CB1),
SPH_C64(0x5DB62599DF6CA7B0), SPH_C64(0xEABE394CA9D5C3F4),
SPH_C64(0x991112C71A75B523), SPH_C64(0xAE18A40B660FCC33)
};
#if 0
/* obsolete */
/* see sph_skein.h */
void
sph_skein224_init(void *cc)
{
skein_small_init(cc, IV224);
}
/* see sph_skein.h */
void
sph_skein224(void *cc, const void *data, size_t len)
{
skein_small_core(cc, data, len);
}
/* see sph_skein.h */
void
sph_skein224_close(void *cc, void *dst)
{
sph_skein224_addbits_and_close(cc, 0, 0, dst);
}
/* see sph_skein.h */
void
sph_skein224_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
{
skein_small_close(cc, ub, n, dst, 28);
sph_skein224_init(cc);
}
/* see sph_skein.h */
void
sph_skein256_init(void *cc)
{
skein_small_init(cc, IV256);
}
/* see sph_skein.h */
void
sph_skein256(void *cc, const void *data, size_t len)
{
skein_small_core(cc, data, len);
}
/* see sph_skein.h */
void
sph_skein256_close(void *cc, void *dst)
{
sph_skein256_addbits_and_close(cc, 0, 0, dst);
}
/* see sph_skein.h */
void
sph_skein256_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
{
skein_small_close(cc, ub, n, dst, 32);
sph_skein256_init(cc);
}
#endif
/* see sph_skein.h */
void
sph_skein224_init(void *cc)
{
skein_big_init(cc, IV224);
}
/* see sph_skein.h */
void
sph_skein224(void *cc, const void *data, size_t len)
{
skein_big_core(cc, data, len);
}
/* see sph_skein.h */
void
sph_skein224_close(void *cc, void *dst)
{
sph_skein224_addbits_and_close(cc, 0, 0, dst);
}
/* see sph_skein.h */
void
sph_skein224_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
{
skein_big_close(cc, ub, n, dst, 28);
sph_skein224_init(cc);
}
/* see sph_skein.h */
void
sph_skein256_init(void *cc)
{
skein_big_init(cc, IV256);
}
/* see sph_skein.h */
void
sph_skein256(void *cc, const void *data, size_t len)
{
skein_big_core(cc, data, len);
}
/* see sph_skein.h */
void
sph_skein256_close(void *cc, void *dst)
{
sph_skein256_addbits_and_close(cc, 0, 0, dst);
}
/* see sph_skein.h */
void
sph_skein256_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
{
skein_big_close(cc, ub, n, dst, 32);
sph_skein256_init(cc);
}
/* see sph_skein.h */
void
sph_skein384_init(void *cc)
{
skein_big_init(cc, IV384);
}
/* see sph_skein.h */
void
sph_skein384(void *cc, const void *data, size_t len)
{
skein_big_core(cc, data, len);
}
/* see sph_skein.h */
void
sph_skein384_close(void *cc, void *dst)
{
sph_skein384_addbits_and_close(cc, 0, 0, dst);
}
/* see sph_skein.h */
void
sph_skein384_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
{
skein_big_close(cc, ub, n, dst, 48);
sph_skein384_init(cc);
}
/* see sph_skein.h */
void
sph_skein512_init(void *cc)
{
skein_big_init(cc, IV512);
}
/* see sph_skein.h */
void
sph_skein512(void *cc, const void *data, size_t len)
{
skein_big_core(cc, data, len);
}
/* see sph_skein.h */
void
sph_skein512_close(void *cc, void *dst)
{
sph_skein512_addbits_and_close(cc, 0, 0, dst);
}
/* see sph_skein.h */
void
sph_skein512_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
{
skein_big_close(cc, ub, n, dst, 64);
sph_skein512_init(cc);
}
#endif
#ifdef __cplusplus
}
#endif
| {
"pile_set_name": "Github"
} |
.enable_invoice() when(@enable-invoice = true) {
//invoice
.invoice-info {
line-height: 24px !important;
color: #444;
vertical-align: bottom;
margin-left: 9px;
margin-right: 9px;
}
.invoice-info-label {
display: inline-block;
max-width: 100px;
text-align: right;
font-size: @font-size-invoice-data;
}
.invoice-box .label-large[class*="arrowed"]{
margin-left: 11px !important;
max-width: 95%;
}
}
.enable_invoice(); | {
"pile_set_name": "Github"
} |
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings> | {
"pile_set_name": "Github"
} |
<?php
//
// ______ ______ __ __ ______
// /\ ___\ /\ ___\ /\_\ /\_\ /\ __ \
// \/\ __\ \/\ \____ \/\_\ \/\_\ \/\ \_\ \
// \/\_____\ \/\_____\ /\_\/\_\ \/\_\ \/\_\ \_\
// \/_____/ \/_____/ \/__\/_/ \/_/ \/_/ /_/
//
// 上海商创网络科技有限公司
//
// ---------------------------------------------------------------------------------
//
// 一、协议的许可和权利
//
// 1. 您可以在完全遵守本协议的基础上,将本软件应用于商业用途;
// 2. 您可以在协议规定的约束和限制范围内修改本产品源代码或界面风格以适应您的要求;
// 3. 您拥有使用本产品中的全部内容资料、商品信息及其他信息的所有权,并独立承担与其内容相关的
// 法律义务;
// 4. 获得商业授权之后,您可以将本软件应用于商业用途,自授权时刻起,在技术支持期限内拥有通过
// 指定的方式获得指定范围内的技术支持服务;
//
// 二、协议的约束和限制
//
// 1. 未获商业授权之前,禁止将本软件用于商业用途(包括但不限于企业法人经营的产品、经营性产品
// 以及以盈利为目的或实现盈利产品);
// 2. 未获商业授权之前,禁止在本产品的整体或在任何部分基础上发展任何派生版本、修改版本或第三
// 方版本用于重新开发;
// 3. 如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回并承担相应法律责任;
//
// 三、有限担保和免责声明
//
// 1. 本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的;
// 2. 用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未获得商业授权之前,我们不承
// 诺提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任;
// 3. 上海商创网络科技有限公司不对使用本产品构建的商城中的内容信息承担责任,但在不侵犯用户隐
// 私信息的前提下,保留以任何方式获取用户信息及商品信息的权利;
//
// 有关本产品最终用户授权协议、商业授权与技术服务的详细内容,均由上海商创网络科技有限公司独家
// 提供。上海商创网络科技有限公司拥有在不事先通知的情况下,修改授权协议的权力,修改后的协议对
// 改变之日起的新授权用户生效。电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和
// 等同的法律效力。您一旦开始修改、安装或使用本产品,即被视为完全理解并接受本协议的各项条款,
// 在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本
// 授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。
//
// ---------------------------------------------------------------------------------
//
defined('IN_ECJIA') or exit('No permission resources.');
/**
* 团购活动
*/
class groupbuy_activity {
/**
* 取得团购活动信息
*
* @param int $group_buy_id
* 团购活动id
* @param int $current_num
* 本次购买数量(计算当前价时要加上的数量)
* @return array status 状态:
*/
public static function group_buy_info($group_buy_id, $current_num = 0) {
/* 取得团购活动信息 */
$group_buy_id = intval ( $group_buy_id );
$db = RC_DB::table('goods_activity');
$group_buy = $db->where('act_id', $group_buy_id)
->where('start_time', '<=', RC_Time::gmtime())
->where('end_time', '>=', RC_Time::gmtime())
->where('act_type', GAT_GROUP_BUY)
->select(RC_DB::raw('*,act_id as group_buy_id, act_desc as group_buy_desc, start_time as start_date, end_time as end_date'))
->first();
/* 如果为空,返回空数组 */
if (empty ( $group_buy )) {
return array ();
}
$ext_info = unserialize ( $group_buy ['ext_info'] );
$group_buy = array_merge ( $group_buy, $ext_info );
/* 格式化时间 */
$group_buy ['formated_start_date'] = RC_Time::local_date('Y/m/d H:i:s', $group_buy ['start_time'] );
$group_buy ['formated_end_date'] = RC_Time::local_date('Y/m/d H:i:s', $group_buy ['end_time'] );
/* 格式化保证金 */
$group_buy ['formated_deposit'] = price_format ( $group_buy ['deposit'], false );
//团购限购时,剩余可团购数
if (!empty($group_buy['restrict_amount'])) {
//获取已团购数量
$has_buyed = RC_DB::table('order_info as oi')
->leftJoin('order_goods as og', RC_DB::raw('og.order_id'), '=', RC_DB::raw('oi.order_id'))
->where(RC_DB::raw('oi.extension_id'), $group_buy_id)
->where(RC_DB::raw('oi.extension_code'), 'group_buy')
->where(RC_DB::raw('oi.order_status'), '<>', OS_INVALID)
->select(RC_DB::raw('SUM(goods_number) as total_buyed'))->first();
if ($group_buy['restrict_amount'] > $has_buyed['total_buyed']) {
$group_buy['left_num'] = $group_buy['restrict_amount'] - $has_buyed['total_buyed'];
} else {
$group_buy['left_num'] = 0;
}
} else {
$group_buy['left_num'] = null;
}
/* 处理价格阶梯 */
$price_ladder = $group_buy ['price_ladder'];
if (! is_array ( $price_ladder ) || empty ( $price_ladder )) {
$price_ladder = array (
array ('amount' => 0, 'price' => 0)
);
} else {
foreach ( $price_ladder as $key => $amount_price ) {
$price_ladder [$key] ['formated_price'] = price_format ( $amount_price ['price'], false );
}
}
$group_buy ['price_ladder'] = $price_ladder;
/* 统计信息 */
$stat = group_buy_stat ( $group_buy_id, $group_buy ['deposit'] );
$group_buy = array_merge ( $group_buy, $stat );
/* 计算当前价 */
$cur_price = $price_ladder [0] ['price']; // 初始化
$cur_amount = $stat ['valid_goods'] + $current_num; // 当前数量
foreach ( $price_ladder as $amount_price ) {
if ($cur_amount >= $amount_price ['amount']) {
$cur_price = $amount_price ['price'];
} else {
break;
}
}
$group_buy ['cur_price'] = $cur_price;
$group_buy ['formated_cur_price'] = price_format ( $cur_price, false );
/* 最终价 */
$group_buy ['trans_price'] = $group_buy ['cur_price'];
$group_buy ['formated_trans_price'] = $group_buy ['formated_cur_price'];
$group_buy ['trans_amount'] = $group_buy ['valid_goods'];
/* 状态 */
$group_buy ['status'] = group_buy_status ( $group_buy );
$gbs_arr = array(
GBS_PRE_START => __('未开始', 'groupbuy'),
GBS_UNDER_WAY => __('进行中', 'groupbuy'),
GBS_FINISHED => __('结束未处理', 'groupbuy'),
GBS_SUCCEED => __('成功结束', 'groupbuy'),
GBS_FAIL => __('失败结束', 'groupbuy'),
GBS_SUCCEED_COMPLETE => __('成功结束', 'groupbuy'),
GBS_FAIL_COMPLETE => __('失败结束', 'groupbuy')
);
if ($gbs_arr[$group_buy['status']]) {
$group_buy ['status_desc'] = $gbs_arr[$group_buy['status']];
}
$group_buy ['start_time'] = $group_buy ['formated_start_date'];
$group_buy ['end_time'] = $group_buy ['formated_end_date'];
return $group_buy;
}
/**
* 判断某个商品是否是团购商品
*/
public static function is_groupbuy_goods($goods_id)
{
$db_goods_activity = RC_DB::table('goods_activity as ga')
->leftJoin('goods as g', RC_DB::raw('ga.goods_id'), '=', RC_DB::raw('g.goods_id'));
$db_goods_activity
->where(RC_DB::raw('ga.act_type'), GAT_GROUP_BUY)
->where(RC_DB::raw('ga.start_time'), '<=', RC_Time::gmtime())
->where(RC_DB::raw('ga.end_time'), '>=', RC_Time::gmtime())
->whereRaw('g.goods_id is not null')
->where(RC_DB::raw('g.review_status'), '>', 2)
->where(RC_DB::raw('g.is_delete'), 0)
->where(RC_DB::raw('g.is_on_sale'), 1)
->where(RC_DB::raw('g.is_alone_sale'), 1);
$info = $db_goods_activity->where(RC_DB::raw('ga.goods_id'), $goods_id)->select(RC_DB::raw('ga.*'))->first();
return $info;
}
}
// end | {
"pile_set_name": "Github"
} |
class Solution:
def bitwiseComplement(self, N: int) -> int:
if N == 0:
return 1
ans = 0
index = 0
while N > 1:
if N % 2 == 0:
ans += 2**index
index += 1
N = N // 2
return ans
| {
"pile_set_name": "Github"
} |
// mkerrors.sh -maix64
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build ppc64,aix
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -maix64 _const.go
package unix
import "syscall"
const (
AF_APPLETALK = 0x10
AF_BYPASS = 0x19
AF_CCITT = 0xa
AF_CHAOS = 0x5
AF_DATAKIT = 0x9
AF_DECnet = 0xc
AF_DLI = 0xd
AF_ECMA = 0x8
AF_HYLINK = 0xf
AF_IMPLINK = 0x3
AF_INET = 0x2
AF_INET6 = 0x18
AF_INTF = 0x14
AF_ISO = 0x7
AF_LAT = 0xe
AF_LINK = 0x12
AF_LOCAL = 0x1
AF_MAX = 0x1e
AF_NDD = 0x17
AF_NETWARE = 0x16
AF_NS = 0x6
AF_OSI = 0x7
AF_PUP = 0x4
AF_RIF = 0x15
AF_ROUTE = 0x11
AF_SNA = 0xb
AF_UNIX = 0x1
AF_UNSPEC = 0x0
ALTWERASE = 0x400000
ARPHRD_802_3 = 0x6
ARPHRD_802_5 = 0x6
ARPHRD_ETHER = 0x1
ARPHRD_FDDI = 0x1
B0 = 0x0
B110 = 0x3
B1200 = 0x9
B134 = 0x4
B150 = 0x5
B1800 = 0xa
B19200 = 0xe
B200 = 0x6
B2400 = 0xb
B300 = 0x7
B38400 = 0xf
B4800 = 0xc
B50 = 0x1
B600 = 0x8
B75 = 0x2
B9600 = 0xd
BRKINT = 0x2
BS0 = 0x0
BS1 = 0x1000
BSDLY = 0x1000
CAP_AACCT = 0x6
CAP_ARM_APPLICATION = 0x5
CAP_BYPASS_RAC_VMM = 0x3
CAP_CLEAR = 0x0
CAP_CREDENTIALS = 0x7
CAP_EFFECTIVE = 0x1
CAP_EWLM_AGENT = 0x4
CAP_INHERITABLE = 0x2
CAP_MAXIMUM = 0x7
CAP_NUMA_ATTACH = 0x2
CAP_PERMITTED = 0x3
CAP_PROPAGATE = 0x1
CAP_PROPOGATE = 0x1
CAP_SET = 0x1
CBAUD = 0xf
CFLUSH = 0xf
CIBAUD = 0xf0000
CLOCAL = 0x800
CLOCK_MONOTONIC = 0xa
CLOCK_PROCESS_CPUTIME_ID = 0xb
CLOCK_REALTIME = 0x9
CLOCK_THREAD_CPUTIME_ID = 0xc
CR0 = 0x0
CR1 = 0x100
CR2 = 0x200
CR3 = 0x300
CRDLY = 0x300
CREAD = 0x80
CS5 = 0x0
CS6 = 0x10
CS7 = 0x20
CS8 = 0x30
CSIOCGIFCONF = -0x3fef96dc
CSIZE = 0x30
CSMAP_DIR = "/usr/lib/nls/csmap/"
CSTART = '\021'
CSTOP = '\023'
CSTOPB = 0x40
CSUSP = 0x1a
ECHO = 0x8
ECHOCTL = 0x20000
ECHOE = 0x10
ECHOK = 0x20
ECHOKE = 0x80000
ECHONL = 0x40
ECHOPRT = 0x40000
ECH_ICMPID = 0x2
ETHERNET_CSMACD = 0x6
EVENP = 0x80
EXCONTINUE = 0x0
EXDLOK = 0x3
EXIO = 0x2
EXPGIO = 0x0
EXRESUME = 0x2
EXRETURN = 0x1
EXSIG = 0x4
EXTA = 0xe
EXTB = 0xf
EXTRAP = 0x1
EYEC_RTENTRYA = 0x257274656e747241
EYEC_RTENTRYF = 0x257274656e747246
E_ACC = 0x0
FD_CLOEXEC = 0x1
FD_SETSIZE = 0xfffe
FF0 = 0x0
FF1 = 0x2000
FFDLY = 0x2000
FLUSHBAND = 0x40
FLUSHLOW = 0x8
FLUSHO = 0x100000
FLUSHR = 0x1
FLUSHRW = 0x3
FLUSHW = 0x2
F_CLOSEM = 0xa
F_DUP2FD = 0xe
F_DUPFD = 0x0
F_GETFD = 0x1
F_GETFL = 0x3
F_GETLK = 0xb
F_GETLK64 = 0xb
F_GETOWN = 0x8
F_LOCK = 0x1
F_OK = 0x0
F_RDLCK = 0x1
F_SETFD = 0x2
F_SETFL = 0x4
F_SETLK = 0xc
F_SETLK64 = 0xc
F_SETLKW = 0xd
F_SETLKW64 = 0xd
F_SETOWN = 0x9
F_TEST = 0x3
F_TLOCK = 0x2
F_TSTLK = 0xf
F_ULOCK = 0x0
F_UNLCK = 0x3
F_WRLCK = 0x2
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
ICMP6_FILTER = 0x26
ICMP6_SEC_SEND_DEL = 0x46
ICMP6_SEC_SEND_GET = 0x47
ICMP6_SEC_SEND_SET = 0x44
ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45
ICRNL = 0x100
IEXTEN = 0x200000
IFA_FIRSTALIAS = 0x2000
IFA_ROUTE = 0x1
IFF_64BIT = 0x4000000
IFF_ALLCAST = 0x20000
IFF_ALLMULTI = 0x200
IFF_BPF = 0x8000000
IFF_BRIDGE = 0x40000
IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x80c52
IFF_CHECKSUM_OFFLOAD = 0x10000000
IFF_D1 = 0x8000
IFF_D2 = 0x4000
IFF_D3 = 0x2000
IFF_D4 = 0x1000
IFF_DEBUG = 0x4
IFF_DEVHEALTH = 0x4000
IFF_DO_HW_LOOPBACK = 0x10000
IFF_GROUP_ROUTING = 0x2000000
IFF_IFBUFMGT = 0x800000
IFF_LINK0 = 0x100000
IFF_LINK1 = 0x200000
IFF_LINK2 = 0x400000
IFF_LOOPBACK = 0x8
IFF_MULTICAST = 0x80000
IFF_NOARP = 0x80
IFF_NOECHO = 0x800
IFF_NOTRAILERS = 0x20
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PROMISC = 0x100
IFF_PSEG = 0x40000000
IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800
IFF_SNAP = 0x8000
IFF_TCP_DISABLE_CKSUM = 0x20000000
IFF_TCP_NOCKSUM = 0x1000000
IFF_UP = 0x1
IFF_VIPA = 0x80000000
IFNAMSIZ = 0x10
IFO_FLUSH = 0x1
IFT_1822 = 0x2
IFT_AAL5 = 0x31
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ATM = 0x25
IFT_CEPT = 0x13
IFT_CLUSTER = 0x3e
IFT_DS3 = 0x1e
IFT_EON = 0x19
IFT_ETHER = 0x6
IFT_FCS = 0x3a
IFT_FDDI = 0xf
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_GIFTUNNEL = 0x3c
IFT_HDH1822 = 0x3
IFT_HF = 0x3d
IFT_HIPPI = 0x2f
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IB = 0xc7
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88026 = 0xa
IFT_LAPB = 0x10
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_NSIP = 0x1b
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PPP = 0x17
IFT_PROPMUX = 0x36
IFT_PROPVIRTUAL = 0x35
IFT_PTPSERIAL = 0x16
IFT_RS232 = 0x21
IFT_SDLC = 0x11
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SN = 0x38
IFT_SONET = 0x27
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SP = 0x39
IFT_STARLAN = 0xb
IFT_T1 = 0x12
IFT_TUNNEL = 0x3b
IFT_ULTRA = 0x1d
IFT_V35 = 0x2d
IFT_VIPA = 0x37
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IGNBRK = 0x1
IGNCR = 0x80
IGNPAR = 0x4
IMAXBEL = 0x10000
INLCR = 0x40
INPCK = 0x10
IN_CLASSA_HOST = 0xffffff
IN_CLASSA_MAX = 0x80
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 0x18
IN_CLASSB_HOST = 0xffff
IN_CLASSB_MAX = 0x10000
IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 0x10
IN_CLASSC_HOST = 0xff
IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 0x8
IN_CLASSD_HOST = 0xfffffff
IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c
IN_LOOPBACKNET = 0x7f
IN_USE = 0x1
IPPROTO_AH = 0x33
IPPROTO_BIP = 0x53
IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8
IPPROTO_EON = 0x50
IPPROTO_ESP = 0x32
IPPROTO_FRAGMENT = 0x2c
IPPROTO_GGP = 0x3
IPPROTO_GIF = 0x8c
IPPROTO_GRE = 0x2f
IPPROTO_HOPOPTS = 0x0
IPPROTO_ICMP = 0x1
IPPROTO_ICMPV6 = 0x3a
IPPROTO_IDP = 0x16
IPPROTO_IGMP = 0x2
IPPROTO_IP = 0x0
IPPROTO_IPIP = 0x4
IPPROTO_IPV6 = 0x29
IPPROTO_LOCAL = 0x3f
IPPROTO_MAX = 0x100
IPPROTO_MH = 0x87
IPPROTO_NONE = 0x3b
IPPROTO_PUP = 0xc
IPPROTO_QOS = 0x2d
IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11
IPV6_ADDRFORM = 0x16
IPV6_ADDR_PREFERENCES = 0x4a
IPV6_ADD_MEMBERSHIP = 0xc
IPV6_AIXRAWSOCKET = 0x39
IPV6_CHECKSUM = 0x27
IPV6_DONTFRAG = 0x2d
IPV6_DROP_MEMBERSHIP = 0xd
IPV6_DSTOPTS = 0x36
IPV6_FLOWINFO_FLOWLABEL = 0xffffff
IPV6_FLOWINFO_PRIFLOW = 0xfffffff
IPV6_FLOWINFO_PRIORITY = 0xf000000
IPV6_FLOWINFO_SRFLAG = 0x10000000
IPV6_FLOWINFO_VERSION = 0xf0000000
IPV6_HOPLIMIT = 0x28
IPV6_HOPOPTS = 0x34
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
IPV6_MIPDSTOPTS = 0x36
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
IPV6_NEXTHOP = 0x30
IPV6_NOPROBE = 0x1c
IPV6_PATHMTU = 0x2e
IPV6_PKTINFO = 0x21
IPV6_PKTOPTIONS = 0x24
IPV6_PRIORITY_10 = 0xa000000
IPV6_PRIORITY_11 = 0xb000000
IPV6_PRIORITY_12 = 0xc000000
IPV6_PRIORITY_13 = 0xd000000
IPV6_PRIORITY_14 = 0xe000000
IPV6_PRIORITY_15 = 0xf000000
IPV6_PRIORITY_8 = 0x8000000
IPV6_PRIORITY_9 = 0x9000000
IPV6_PRIORITY_BULK = 0x4000000
IPV6_PRIORITY_CONTROL = 0x7000000
IPV6_PRIORITY_FILLER = 0x1000000
IPV6_PRIORITY_INTERACTIVE = 0x6000000
IPV6_PRIORITY_RESERVED1 = 0x3000000
IPV6_PRIORITY_RESERVED2 = 0x5000000
IPV6_PRIORITY_UNATTENDED = 0x2000000
IPV6_PRIORITY_UNCHARACTERIZED = 0x0
IPV6_RECVDSTOPTS = 0x38
IPV6_RECVHOPLIMIT = 0x29
IPV6_RECVHOPOPTS = 0x35
IPV6_RECVHOPS = 0x22
IPV6_RECVIF = 0x1e
IPV6_RECVPATHMTU = 0x2f
IPV6_RECVPKTINFO = 0x23
IPV6_RECVRTHDR = 0x33
IPV6_RECVSRCRT = 0x1d
IPV6_RECVTCLASS = 0x2a
IPV6_RTHDR = 0x32
IPV6_RTHDRDSTOPTS = 0x37
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_RTHDR_TYPE_2 = 0x2
IPV6_SENDIF = 0x1f
IPV6_SRFLAG_LOOSE = 0x0
IPV6_SRFLAG_STRICT = 0x10000000
IPV6_TCLASS = 0x2b
IPV6_TOKEN_LENGTH = 0x40
IPV6_UNICAST_HOPS = 0x4
IPV6_USE_MIN_MTU = 0x2c
IPV6_V6ONLY = 0x25
IPV6_VERSION = 0x60000000
IP_ADDRFORM = 0x16
IP_ADD_MEMBERSHIP = 0xc
IP_ADD_SOURCE_MEMBERSHIP = 0x3c
IP_BLOCK_SOURCE = 0x3a
IP_BROADCAST_IF = 0x10
IP_CACHE_LINE_SIZE = 0x80
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
IP_DHCPMODE = 0x11
IP_DONTFRAG = 0x19
IP_DROP_MEMBERSHIP = 0xd
IP_DROP_SOURCE_MEMBERSHIP = 0x3d
IP_FINDPMTU = 0x1a
IP_HDRINCL = 0x2
IP_INC_MEMBERSHIPS = 0x14
IP_INIT_MEMBERSHIP = 0x14
IP_MAXPACKET = 0xffff
IP_MF = 0x2000
IP_MSS = 0x240
IP_MULTICAST_HOPS = 0xa
IP_MULTICAST_IF = 0x9
IP_MULTICAST_LOOP = 0xb
IP_MULTICAST_TTL = 0xa
IP_OPT = 0x1b
IP_OPTIONS = 0x1
IP_PMTUAGE = 0x1b
IP_RECVDSTADDR = 0x7
IP_RECVIF = 0x14
IP_RECVIFINFO = 0xf
IP_RECVINTERFACE = 0x20
IP_RECVMACHDR = 0xe
IP_RECVOPTS = 0x5
IP_RECVRETOPTS = 0x6
IP_RECVTTL = 0x22
IP_RETOPTS = 0x8
IP_SOURCE_FILTER = 0x48
IP_TOS = 0x3
IP_TTL = 0x4
IP_UNBLOCK_SOURCE = 0x3b
IP_UNICAST_HOPS = 0x4
ISIG = 0x1
ISTRIP = 0x20
IUCLC = 0x800
IXANY = 0x1000
IXOFF = 0x400
IXON = 0x200
I_FLUSH = 0x20005305
LNOFLSH = 0x8000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
LOCK_UN = 0x8
MADV_DONTNEED = 0x4
MADV_NORMAL = 0x0
MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2
MADV_SPACEAVAIL = 0x5
MADV_WILLNEED = 0x3
MAP_ANON = 0x10
MAP_ANONYMOUS = 0x10
MAP_FILE = 0x0
MAP_FIXED = 0x100
MAP_PRIVATE = 0x2
MAP_SHARED = 0x1
MAP_TYPE = 0xf0
MAP_VARIABLE = 0x0
MCAST_BLOCK_SOURCE = 0x40
MCAST_EXCLUDE = 0x2
MCAST_INCLUDE = 0x1
MCAST_JOIN_GROUP = 0x3e
MCAST_JOIN_SOURCE_GROUP = 0x42
MCAST_LEAVE_GROUP = 0x3f
MCAST_LEAVE_SOURCE_GROUP = 0x43
MCAST_SOURCE_FILTER = 0x49
MCAST_UNBLOCK_SOURCE = 0x41
MCL_CURRENT = 0x100
MCL_FUTURE = 0x200
MSG_ANY = 0x4
MSG_ARGEXT = 0x400
MSG_BAND = 0x2
MSG_COMPAT = 0x8000
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
MSG_EOR = 0x8
MSG_HIPRI = 0x1
MSG_MAXIOVLEN = 0x10
MSG_MPEG2 = 0x80
MSG_NONBLOCK = 0x4000
MSG_NOSIGNAL = 0x100
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_TRUNC = 0x10
MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x200
MS_ASYNC = 0x10
MS_EINTR = 0x80
MS_INVALIDATE = 0x40
MS_PER_SEC = 0x3e8
MS_SYNC = 0x20
NFDBITS = 0x40
NL0 = 0x0
NL1 = 0x4000
NL2 = 0x8000
NL3 = 0xc000
NLDLY = 0x4000
NOFLSH = 0x80
NOFLUSH = 0x80000000
OCRNL = 0x8
OFDEL = 0x80
OFILL = 0x40
OLCUC = 0x2
ONLCR = 0x4
ONLRET = 0x20
ONOCR = 0x10
ONOEOT = 0x80000
OPOST = 0x1
OXTABS = 0x40000
O_ACCMODE = 0x23
O_APPEND = 0x8
O_CIO = 0x80
O_CIOR = 0x800000000
O_CLOEXEC = 0x800000
O_CREAT = 0x100
O_DEFER = 0x2000
O_DELAY = 0x4000
O_DIRECT = 0x8000000
O_DIRECTORY = 0x80000
O_DSYNC = 0x400000
O_EFSOFF = 0x400000000
O_EFSON = 0x200000000
O_EXCL = 0x400
O_EXEC = 0x20
O_LARGEFILE = 0x4000000
O_NDELAY = 0x8000
O_NOCACHE = 0x100000
O_NOCTTY = 0x800
O_NOFOLLOW = 0x1000000
O_NONBLOCK = 0x4
O_NONE = 0x3
O_NSHARE = 0x10000
O_RAW = 0x100000000
O_RDONLY = 0x0
O_RDWR = 0x2
O_RSHARE = 0x1000
O_RSYNC = 0x200000
O_SEARCH = 0x20
O_SNAPSHOT = 0x40
O_SYNC = 0x10
O_TRUNC = 0x200
O_TTY_INIT = 0x0
O_WRONLY = 0x1
PARENB = 0x100
PAREXT = 0x100000
PARMRK = 0x8
PARODD = 0x200
PENDIN = 0x20000000
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
PRIO_USER = 0x2
PROT_EXEC = 0x4
PROT_NONE = 0x0
PROT_READ = 0x1
PROT_WRITE = 0x2
PR_64BIT = 0x20
PR_ADDR = 0x2
PR_ARGEXT = 0x400
PR_ATOMIC = 0x1
PR_CONNREQUIRED = 0x4
PR_FASTHZ = 0x5
PR_INP = 0x40
PR_INTRLEVEL = 0x8000
PR_MLS = 0x100
PR_MLS_1_LABEL = 0x200
PR_NOEOR = 0x4000
PR_RIGHTS = 0x10
PR_SLOWHZ = 0x2
PR_WANTRCVD = 0x8
RLIMIT_AS = 0x6
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_NOFILE = 0x7
RLIMIT_NPROC = 0x9
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6
RTAX_BRD = 0x7
RTAX_DST = 0x0
RTAX_GATEWAY = 0x1
RTAX_GENMASK = 0x3
RTAX_IFA = 0x5
RTAX_IFP = 0x4
RTAX_MAX = 0x8
RTAX_NETMASK = 0x2
RTA_AUTHOR = 0x40
RTA_BRD = 0x80
RTA_DOWNSTREAM = 0x100
RTA_DST = 0x1
RTA_GATEWAY = 0x2
RTA_GENMASK = 0x8
RTA_IFA = 0x20
RTA_IFP = 0x10
RTA_NETMASK = 0x4
RTC_IA64 = 0x3
RTC_POWER = 0x1
RTC_POWER_PC = 0x2
RTF_ACTIVE_DGD = 0x1000000
RTF_BCE = 0x80000
RTF_BLACKHOLE = 0x1000
RTF_BROADCAST = 0x400000
RTF_BUL = 0x2000
RTF_CLONE = 0x10000
RTF_CLONED = 0x20000
RTF_CLONING = 0x100
RTF_DONE = 0x40
RTF_DYNAMIC = 0x10
RTF_FREE_IN_PROG = 0x4000000
RTF_GATEWAY = 0x2
RTF_HOST = 0x4
RTF_LLINFO = 0x400
RTF_LOCAL = 0x200000
RTF_MASK = 0x80
RTF_MODIFIED = 0x20
RTF_MULTICAST = 0x800000
RTF_PERMANENT6 = 0x8000000
RTF_PINNED = 0x100000
RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000
RTF_PROTO3 = 0x40000
RTF_REJECT = 0x8
RTF_SMALLMTU = 0x40000
RTF_STATIC = 0x800
RTF_STOPSRCH = 0x2000000
RTF_UNREACHABLE = 0x10000000
RTF_UP = 0x1
RTF_XRESOLVE = 0x200
RTM_ADD = 0x1
RTM_CHANGE = 0x3
RTM_DELADDR = 0xd
RTM_DELETE = 0x2
RTM_EXPIRE = 0xf
RTM_GET = 0x4
RTM_GETNEXT = 0x11
RTM_IFINFO = 0xe
RTM_LOCK = 0x8
RTM_LOSING = 0x5
RTM_MISS = 0x7
RTM_NEWADDR = 0xc
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb
RTM_RTLOST = 0x10
RTM_RTTUNIT = 0xf4240
RTM_SAMEADDR = 0x12
RTM_SET = 0x13
RTM_VERSION = 0x2
RTM_VERSION_GR = 0x4
RTM_VERSION_GR_COMPAT = 0x3
RTM_VERSION_POLICY = 0x5
RTM_VERSION_POLICY_EXT = 0x6
RTM_VERSION_POLICY_PRFN = 0x7
RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2
RTV_MTU = 0x1
RTV_RPIPE = 0x8
RTV_RTT = 0x40
RTV_RTTVAR = 0x80
RTV_SPIPE = 0x10
RTV_SSTHRESH = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIGMAX64 = 0xff
SIGQUEUE_MAX = 0x20
SIOCADDIFVIPA = 0x20006942
SIOCADDMTU = -0x7ffb9690
SIOCADDMULTI = -0x7fdf96cf
SIOCADDNETID = -0x7fd796a9
SIOCADDRT = -0x7fc78df6
SIOCAIFADDR = -0x7fbf96e6
SIOCATMARK = 0x40047307
SIOCDARP = -0x7fb396e0
SIOCDELIFVIPA = 0x20006943
SIOCDELMTU = -0x7ffb968f
SIOCDELMULTI = -0x7fdf96ce
SIOCDELPMTU = -0x7fd78ff6
SIOCDELRT = -0x7fc78df5
SIOCDIFADDR = -0x7fd796e7
SIOCDNETOPT = -0x3ffe9680
SIOCDX25XLATE = -0x7fd7969b
SIOCFIFADDR = -0x7fdf966d
SIOCGARP = -0x3fb396da
SIOCGETMTUS = 0x2000696f
SIOCGETSGCNT = -0x3feb8acc
SIOCGETVIFCNT = -0x3feb8acd
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = -0x3fd796df
SIOCGIFADDRS = 0x2000698c
SIOCGIFBAUDRATE = -0x3fdf9669
SIOCGIFBRDADDR = -0x3fd796dd
SIOCGIFCONF = -0x3fef96bb
SIOCGIFCONFGLOB = -0x3fef9670
SIOCGIFDSTADDR = -0x3fd796de
SIOCGIFFLAGS = -0x3fd796ef
SIOCGIFGIDLIST = 0x20006968
SIOCGIFHWADDR = -0x3fab966b
SIOCGIFMETRIC = -0x3fd796e9
SIOCGIFMTU = -0x3fd796aa
SIOCGIFNETMASK = -0x3fd796db
SIOCGIFOPTIONS = -0x3fd796d6
SIOCGISNO = -0x3fd79695
SIOCGLOADF = -0x3ffb967e
SIOCGLOWAT = 0x40047303
SIOCGNETOPT = -0x3ffe96a5
SIOCGNETOPT1 = -0x3fdf967f
SIOCGNMTUS = 0x2000696e
SIOCGPGRP = 0x40047309
SIOCGSIZIFCONF = 0x4004696a
SIOCGSRCFILTER = -0x3fe796cb
SIOCGTUNEPHASE = -0x3ffb9676
SIOCGX25XLATE = -0x3fd7969c
SIOCIFATTACH = -0x7fdf9699
SIOCIFDETACH = -0x7fdf969a
SIOCIFGETPKEY = -0x7fdf969b
SIOCIF_ATM_DARP = -0x7fdf9683
SIOCIF_ATM_DUMPARP = -0x7fdf9685
SIOCIF_ATM_GARP = -0x7fdf9682
SIOCIF_ATM_IDLE = -0x7fdf9686
SIOCIF_ATM_SARP = -0x7fdf9681
SIOCIF_ATM_SNMPARP = -0x7fdf9687
SIOCIF_ATM_SVC = -0x7fdf9684
SIOCIF_ATM_UBR = -0x7fdf9688
SIOCIF_DEVHEALTH = -0x7ffb966c
SIOCIF_IB_ARP_INCOMP = -0x7fdf9677
SIOCIF_IB_ARP_TIMER = -0x7fdf9678
SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f
SIOCIF_IB_DEL_ARP = -0x7fdf967f
SIOCIF_IB_DEL_PINFO = -0x3fdf9670
SIOCIF_IB_DUMP_ARP = -0x7fdf9680
SIOCIF_IB_GET_ARP = -0x7fdf967e
SIOCIF_IB_GET_INFO = -0x3f879675
SIOCIF_IB_GET_STATS = -0x3f879672
SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a
SIOCIF_IB_RESET_STATS = -0x3f879671
SIOCIF_IB_RESIZE_CQ = -0x7fdf9679
SIOCIF_IB_SET_ARP = -0x7fdf967d
SIOCIF_IB_SET_PKEY = -0x7fdf967c
SIOCIF_IB_SET_PORT = -0x7fdf967b
SIOCIF_IB_SET_QKEY = -0x7fdf9676
SIOCIF_IB_SET_QSIZE = -0x7fdf967a
SIOCLISTIFVIPA = 0x20006944
SIOCSARP = -0x7fb396e2
SIOCSHIWAT = 0xffffffff80047300
SIOCSIFADDR = -0x7fd796f4
SIOCSIFADDRORI = -0x7fdb9673
SIOCSIFBRDADDR = -0x7fd796ed
SIOCSIFDSTADDR = -0x7fd796f2
SIOCSIFFLAGS = -0x7fd796f0
SIOCSIFGIDLIST = 0x20006969
SIOCSIFMETRIC = -0x7fd796e8
SIOCSIFMTU = -0x7fd796a8
SIOCSIFNETDUMP = -0x7fd796e4
SIOCSIFNETMASK = -0x7fd796ea
SIOCSIFOPTIONS = -0x7fd796d7
SIOCSIFSUBCHAN = -0x7fd796e5
SIOCSISNO = -0x7fd79694
SIOCSLOADF = -0x3ffb967d
SIOCSLOWAT = 0xffffffff80047302
SIOCSNETOPT = -0x7ffe96a6
SIOCSPGRP = 0xffffffff80047308
SIOCSX25XLATE = -0x7fd7969d
SOCK_CONN_DGRAM = 0x6
SOCK_DGRAM = 0x2
SOCK_RAW = 0x3
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
SOL_SOCKET = 0xffff
SOMAXCONN = 0x400
SO_ACCEPTCONN = 0x2
SO_AUDIT = 0x8000
SO_BROADCAST = 0x20
SO_CKSUMRECV = 0x800
SO_DEBUG = 0x1
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
SO_KERNACCEPT = 0x2000
SO_LINGER = 0x80
SO_NOMULTIPATH = 0x4000
SO_NOREUSEADDR = 0x1000
SO_OOBINLINE = 0x100
SO_PEERID = 0x1009
SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMPNS = 0x100a
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USE_IFBUFS = 0x400
S_BANDURG = 0x400
S_EMODFMT = 0x3c000000
S_ENFMT = 0x400
S_ERROR = 0x100
S_HANGUP = 0x200
S_HIPRI = 0x2
S_ICRYPTO = 0x80000
S_IEXEC = 0x40
S_IFBLK = 0x6000
S_IFCHR = 0x2000
S_IFDIR = 0x4000
S_IFIFO = 0x1000
S_IFJOURNAL = 0x10000
S_IFLNK = 0xa000
S_IFMPX = 0x2200
S_IFMT = 0xf000
S_IFPDIR = 0x4000000
S_IFPSDIR = 0x8000000
S_IFPSSDIR = 0xc000000
S_IFREG = 0x8000
S_IFSOCK = 0xc000
S_IFSYSEA = 0x30000000
S_INPUT = 0x1
S_IREAD = 0x100
S_IRGRP = 0x20
S_IROTH = 0x4
S_IRUSR = 0x100
S_IRWXG = 0x38
S_IRWXO = 0x7
S_IRWXU = 0x1c0
S_ISGID = 0x400
S_ISUID = 0x800
S_ISVTX = 0x200
S_ITCB = 0x1000000
S_ITP = 0x800000
S_IWGRP = 0x10
S_IWOTH = 0x2
S_IWRITE = 0x80
S_IWUSR = 0x80
S_IXACL = 0x2000000
S_IXATTR = 0x40000
S_IXGRP = 0x8
S_IXINTERFACE = 0x100000
S_IXMOD = 0x40000000
S_IXOTH = 0x1
S_IXUSR = 0x40
S_MSG = 0x8
S_OUTPUT = 0x4
S_RDBAND = 0x20
S_RDNORM = 0x10
S_RESERVED1 = 0x20000
S_RESERVED2 = 0x200000
S_RESERVED3 = 0x400000
S_RESERVED4 = 0x80000000
S_RESFMT1 = 0x10000000
S_RESFMT10 = 0x34000000
S_RESFMT11 = 0x38000000
S_RESFMT12 = 0x3c000000
S_RESFMT2 = 0x14000000
S_RESFMT3 = 0x18000000
S_RESFMT4 = 0x1c000000
S_RESFMT5 = 0x20000000
S_RESFMT6 = 0x24000000
S_RESFMT7 = 0x28000000
S_RESFMT8 = 0x2c000000
S_WRBAND = 0x80
S_WRNORM = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0xc00
TABDLY = 0xc00
TCFLSH = 0x540c
TCGETA = 0x5405
TCGETS = 0x5401
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
TCION = 0x3
TCOFLUSH = 0x1
TCOOFF = 0x0
TCOON = 0x1
TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
TCP_ACLADD = 0x23
TCP_ACLBIND = 0x26
TCP_ACLCLEAR = 0x22
TCP_ACLDEL = 0x24
TCP_ACLDENY = 0x8
TCP_ACLFLUSH = 0x21
TCP_ACLGID = 0x1
TCP_ACLLS = 0x25
TCP_ACLSUBNET = 0x4
TCP_ACLUID = 0x2
TCP_CWND_DF = 0x16
TCP_CWND_IF = 0x15
TCP_DELAY_ACK_FIN = 0x2
TCP_DELAY_ACK_SYN = 0x1
TCP_FASTNAME = 0x101080a
TCP_KEEPCNT = 0x13
TCP_KEEPIDLE = 0x11
TCP_KEEPINTVL = 0x12
TCP_LSPRIV = 0x29
TCP_LUID = 0x20
TCP_MAXBURST = 0x8
TCP_MAXDF = 0x64
TCP_MAXIF = 0x64
TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff
TCP_MAXWINDOWSCALE = 0xe
TCP_MAX_SACK = 0x4
TCP_MSS = 0x5b4
TCP_NODELAY = 0x1
TCP_NODELAYACK = 0x14
TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19
TCP_NOREDUCE_CWND_IN_FRXMT = 0x18
TCP_NOTENTER_SSTART = 0x17
TCP_OPT = 0x19
TCP_RFC1323 = 0x4
TCP_SETPRIV = 0x27
TCP_STDURG = 0x10
TCP_TIMESTAMP_OPTLEN = 0xc
TCP_UNSETPRIV = 0x28
TCSAFLUSH = 0x2
TCSBRK = 0x5409
TCSETA = 0x5406
TCSETAF = 0x5408
TCSETAW = 0x5407
TCSETS = 0x5402
TCSETSF = 0x5404
TCSETSW = 0x5403
TCXONC = 0x540b
TIMER_ABSTIME = 0x3e7
TIMER_MAX = 0x20
TIOC = 0x5400
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0xffffffff80047462
TIOCEXCL = 0x2000740d
TIOCFLUSH = 0xffffffff80047410
TIOCGETC = 0x40067412
TIOCGETD = 0x40047400
TIOCGETP = 0x40067408
TIOCGLTC = 0x40067474
TIOCGPGRP = 0x40047477
TIOCGSID = 0x40047448
TIOCGSIZE = 0x40087468
TIOCGWINSZ = 0x40087468
TIOCHPCL = 0x20007402
TIOCLBIC = 0xffffffff8004747e
TIOCLBIS = 0xffffffff8004747f
TIOCLGET = 0x4004747c
TIOCLSET = 0xffffffff8004747d
TIOCMBIC = 0xffffffff8004746b
TIOCMBIS = 0xffffffff8004746c
TIOCMGET = 0x4004746a
TIOCMIWAIT = 0xffffffff80047464
TIOCMODG = 0x40047403
TIOCMODS = 0xffffffff80047404
TIOCMSET = 0xffffffff8004746d
TIOCM_CAR = 0x40
TIOCM_CD = 0x40
TIOCM_CTS = 0x20
TIOCM_DSR = 0x100
TIOCM_DTR = 0x2
TIOCM_LE = 0x1
TIOCM_RI = 0x80
TIOCM_RNG = 0x80
TIOCM_RTS = 0x4
TIOCM_SR = 0x10
TIOCM_ST = 0x8
TIOCNOTTY = 0x20007471
TIOCNXCL = 0x2000740e
TIOCOUTQ = 0x40047473
TIOCPKT = 0xffffffff80047470
TIOCPKT_DATA = 0x0
TIOCPKT_DOSTOP = 0x20
TIOCPKT_FLUSHREAD = 0x1
TIOCPKT_FLUSHWRITE = 0x2
TIOCPKT_NOSTOP = 0x10
TIOCPKT_START = 0x8
TIOCPKT_STOP = 0x4
TIOCREMOTE = 0xffffffff80047469
TIOCSBRK = 0x2000747b
TIOCSDTR = 0x20007479
TIOCSETC = 0xffffffff80067411
TIOCSETD = 0xffffffff80047401
TIOCSETN = 0xffffffff8006740a
TIOCSETP = 0xffffffff80067409
TIOCSLTC = 0xffffffff80067475
TIOCSPGRP = 0xffffffff80047476
TIOCSSIZE = 0xffffffff80087467
TIOCSTART = 0x2000746e
TIOCSTI = 0xffffffff80017472
TIOCSTOP = 0x2000746f
TIOCSWINSZ = 0xffffffff80087467
TIOCUCNTL = 0xffffffff80047466
TOSTOP = 0x10000
UTIME_NOW = -0x2
UTIME_OMIT = -0x3
VDISCRD = 0xc
VDSUSP = 0xa
VEOF = 0x4
VEOL = 0x5
VEOL2 = 0x6
VERASE = 0x2
VINTR = 0x0
VKILL = 0x3
VLNEXT = 0xe
VMIN = 0x4
VQUIT = 0x1
VREPRINT = 0xb
VSTART = 0x7
VSTOP = 0x8
VSTRT = 0x7
VSUSP = 0x9
VT0 = 0x0
VT1 = 0x8000
VTDELAY = 0x2000
VTDLY = 0x8000
VTIME = 0x5
VWERSE = 0xd
WPARSTART = 0x1
WPARSTOP = 0x2
WPARTTYNAME = "Global"
XCASE = 0x4
XTABS = 0xc00
_FDATAFLUSH = 0x2000000000
)
// Errors
const (
E2BIG = syscall.Errno(0x7)
EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x43)
EADDRNOTAVAIL = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x42)
EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x38)
EBADF = syscall.Errno(0x9)
EBADMSG = syscall.Errno(0x78)
EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x75)
ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECLONEME = syscall.Errno(0x52)
ECONNABORTED = syscall.Errno(0x48)
ECONNREFUSED = syscall.Errno(0x4f)
ECONNRESET = syscall.Errno(0x49)
ECORRUPT = syscall.Errno(0x59)
EDEADLK = syscall.Errno(0x2d)
EDESTADDREQ = syscall.Errno(0x3a)
EDESTADDRREQ = syscall.Errno(0x3a)
EDIST = syscall.Errno(0x35)
EDOM = syscall.Errno(0x21)
EDQUOT = syscall.Errno(0x58)
EEXIST = syscall.Errno(0x11)
EFAULT = syscall.Errno(0xe)
EFBIG = syscall.Errno(0x1b)
EFORMAT = syscall.Errno(0x30)
EHOSTDOWN = syscall.Errno(0x50)
EHOSTUNREACH = syscall.Errno(0x51)
EIDRM = syscall.Errno(0x24)
EILSEQ = syscall.Errno(0x74)
EINPROGRESS = syscall.Errno(0x37)
EINTR = syscall.Errno(0x4)
EINVAL = syscall.Errno(0x16)
EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x4b)
EISDIR = syscall.Errno(0x15)
EL2HLT = syscall.Errno(0x2c)
EL2NSYNC = syscall.Errno(0x26)
EL3HLT = syscall.Errno(0x27)
EL3RST = syscall.Errno(0x28)
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x55)
EMEDIA = syscall.Errno(0x6e)
EMFILE = syscall.Errno(0x18)
EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x3b)
EMULTIHOP = syscall.Errno(0x7d)
ENAMETOOLONG = syscall.Errno(0x56)
ENETDOWN = syscall.Errno(0x45)
ENETRESET = syscall.Errno(0x47)
ENETUNREACH = syscall.Errno(0x46)
ENFILE = syscall.Errno(0x17)
ENOATTR = syscall.Errno(0x70)
ENOBUFS = syscall.Errno(0x4a)
ENOCONNECT = syscall.Errno(0x32)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x7a)
ENODEV = syscall.Errno(0x13)
ENOENT = syscall.Errno(0x2)
ENOEXEC = syscall.Errno(0x8)
ENOLCK = syscall.Errno(0x31)
ENOLINK = syscall.Errno(0x7e)
ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENOPROTOOPT = syscall.Errno(0x3d)
ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x76)
ENOSTR = syscall.Errno(0x7b)
ENOSYS = syscall.Errno(0x6d)
ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x4c)
ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x11)
ENOTREADY = syscall.Errno(0x2e)
ENOTRECOVERABLE = syscall.Errno(0x5e)
ENOTRUST = syscall.Errno(0x72)
ENOTSOCK = syscall.Errno(0x39)
ENOTSUP = syscall.Errno(0x7c)
ENOTTY = syscall.Errno(0x19)
ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x40)
EOVERFLOW = syscall.Errno(0x7f)
EOWNERDEAD = syscall.Errno(0x5f)
EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x41)
EPIPE = syscall.Errno(0x20)
EPROCLIM = syscall.Errno(0x53)
EPROTO = syscall.Errno(0x79)
EPROTONOSUPPORT = syscall.Errno(0x3e)
EPROTOTYPE = syscall.Errno(0x3c)
ERANGE = syscall.Errno(0x22)
EREMOTE = syscall.Errno(0x5d)
ERESTART = syscall.Errno(0x52)
EROFS = syscall.Errno(0x1e)
ESAD = syscall.Errno(0x71)
ESHUTDOWN = syscall.Errno(0x4d)
ESOCKTNOSUPPORT = syscall.Errno(0x3f)
ESOFT = syscall.Errno(0x6f)
ESPIPE = syscall.Errno(0x1d)
ESRCH = syscall.Errno(0x3)
ESTALE = syscall.Errno(0x34)
ESYSERROR = syscall.Errno(0x5a)
ETIME = syscall.Errno(0x77)
ETIMEDOUT = syscall.Errno(0x4e)
ETOOMANYREFS = syscall.Errno(0x73)
ETXTBSY = syscall.Errno(0x1a)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x54)
EWOULDBLOCK = syscall.Errno(0xb)
EWRPROTECT = syscall.Errno(0x2f)
EXDEV = syscall.Errno(0x12)
)
// Signals
const (
SIGABRT = syscall.Signal(0x6)
SIGAIO = syscall.Signal(0x17)
SIGALRM = syscall.Signal(0xe)
SIGALRM1 = syscall.Signal(0x26)
SIGBUS = syscall.Signal(0xa)
SIGCAPI = syscall.Signal(0x31)
SIGCHLD = syscall.Signal(0x14)
SIGCLD = syscall.Signal(0x14)
SIGCONT = syscall.Signal(0x13)
SIGCPUFAIL = syscall.Signal(0x3b)
SIGDANGER = syscall.Signal(0x21)
SIGEMT = syscall.Signal(0x7)
SIGFPE = syscall.Signal(0x8)
SIGGRANT = syscall.Signal(0x3c)
SIGHUP = syscall.Signal(0x1)
SIGILL = syscall.Signal(0x4)
SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x17)
SIGIOINT = syscall.Signal(0x10)
SIGIOT = syscall.Signal(0x6)
SIGKAP = syscall.Signal(0x3c)
SIGKILL = syscall.Signal(0x9)
SIGLOST = syscall.Signal(0x6)
SIGMAX = syscall.Signal(0xff)
SIGMAX32 = syscall.Signal(0x3f)
SIGMIGRATE = syscall.Signal(0x23)
SIGMSG = syscall.Signal(0x1b)
SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x17)
SIGPRE = syscall.Signal(0x24)
SIGPROF = syscall.Signal(0x20)
SIGPTY = syscall.Signal(0x17)
SIGPWR = syscall.Signal(0x1d)
SIGQUIT = syscall.Signal(0x3)
SIGRECONFIG = syscall.Signal(0x3a)
SIGRETRACT = syscall.Signal(0x3d)
SIGSAK = syscall.Signal(0x3f)
SIGSEGV = syscall.Signal(0xb)
SIGSOUND = syscall.Signal(0x3e)
SIGSTOP = syscall.Signal(0x11)
SIGSYS = syscall.Signal(0xc)
SIGSYSERROR = syscall.Signal(0x30)
SIGTALRM = syscall.Signal(0x26)
SIGTERM = syscall.Signal(0xf)
SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x12)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
SIGURG = syscall.Signal(0x10)
SIGUSR1 = syscall.Signal(0x1e)
SIGUSR2 = syscall.Signal(0x1f)
SIGVIRT = syscall.Signal(0x25)
SIGVTALRM = syscall.Signal(0x22)
SIGWAITING = syscall.Signal(0x27)
SIGWINCH = syscall.Signal(0x1c)
SIGXCPU = syscall.Signal(0x18)
SIGXFSZ = syscall.Signal(0x19)
)
// Error table
var errorList = [...]struct {
num syscall.Errno
name string
desc string
}{
{1, "EPERM", "not owner"},
{2, "ENOENT", "no such file or directory"},
{3, "ESRCH", "no such process"},
{4, "EINTR", "interrupted system call"},
{5, "EIO", "I/O error"},
{6, "ENXIO", "no such device or address"},
{7, "E2BIG", "arg list too long"},
{8, "ENOEXEC", "exec format error"},
{9, "EBADF", "bad file number"},
{10, "ECHILD", "no child processes"},
{11, "EWOULDBLOCK", "resource temporarily unavailable"},
{12, "ENOMEM", "not enough space"},
{13, "EACCES", "permission denied"},
{14, "EFAULT", "bad address"},
{15, "ENOTBLK", "block device required"},
{16, "EBUSY", "device busy"},
{17, "ENOTEMPTY", "file exists"},
{18, "EXDEV", "cross-device link"},
{19, "ENODEV", "no such device"},
{20, "ENOTDIR", "not a directory"},
{21, "EISDIR", "is a directory"},
{22, "EINVAL", "invalid argument"},
{23, "ENFILE", "file table overflow"},
{24, "EMFILE", "too many open files"},
{25, "ENOTTY", "not a typewriter"},
{26, "ETXTBSY", "text file busy"},
{27, "EFBIG", "file too large"},
{28, "ENOSPC", "no space left on device"},
{29, "ESPIPE", "illegal seek"},
{30, "EROFS", "read-only file system"},
{31, "EMLINK", "too many links"},
{32, "EPIPE", "broken pipe"},
{33, "EDOM", "argument out of domain"},
{34, "ERANGE", "result too large"},
{35, "ENOMSG", "no message of desired type"},
{36, "EIDRM", "identifier removed"},
{37, "ECHRNG", "channel number out of range"},
{38, "EL2NSYNC", "level 2 not synchronized"},
{39, "EL3HLT", "level 3 halted"},
{40, "EL3RST", "level 3 reset"},
{41, "ELNRNG", "link number out of range"},
{42, "EUNATCH", "protocol driver not attached"},
{43, "ENOCSI", "no CSI structure available"},
{44, "EL2HLT", "level 2 halted"},
{45, "EDEADLK", "deadlock condition if locked"},
{46, "ENOTREADY", "device not ready"},
{47, "EWRPROTECT", "write-protected media"},
{48, "EFORMAT", "unformatted or incompatible media"},
{49, "ENOLCK", "no locks available"},
{50, "ENOCONNECT", "cannot Establish Connection"},
{52, "ESTALE", "missing file or filesystem"},
{53, "EDIST", "requests blocked by Administrator"},
{55, "EINPROGRESS", "operation now in progress"},
{56, "EALREADY", "operation already in progress"},
{57, "ENOTSOCK", "socket operation on non-socket"},
{58, "EDESTADDREQ", "destination address required"},
{59, "EMSGSIZE", "message too long"},
{60, "EPROTOTYPE", "protocol wrong type for socket"},
{61, "ENOPROTOOPT", "protocol not available"},
{62, "EPROTONOSUPPORT", "protocol not supported"},
{63, "ESOCKTNOSUPPORT", "socket type not supported"},
{64, "EOPNOTSUPP", "operation not supported on socket"},
{65, "EPFNOSUPPORT", "protocol family not supported"},
{66, "EAFNOSUPPORT", "addr family not supported by protocol"},
{67, "EADDRINUSE", "address already in use"},
{68, "EADDRNOTAVAIL", "can't assign requested address"},
{69, "ENETDOWN", "network is down"},
{70, "ENETUNREACH", "network is unreachable"},
{71, "ENETRESET", "network dropped connection on reset"},
{72, "ECONNABORTED", "software caused connection abort"},
{73, "ECONNRESET", "connection reset by peer"},
{74, "ENOBUFS", "no buffer space available"},
{75, "EISCONN", "socket is already connected"},
{76, "ENOTCONN", "socket is not connected"},
{77, "ESHUTDOWN", "can't send after socket shutdown"},
{78, "ETIMEDOUT", "connection timed out"},
{79, "ECONNREFUSED", "connection refused"},
{80, "EHOSTDOWN", "host is down"},
{81, "EHOSTUNREACH", "no route to host"},
{82, "ERESTART", "restart the system call"},
{83, "EPROCLIM", "too many processes"},
{84, "EUSERS", "too many users"},
{85, "ELOOP", "too many levels of symbolic links"},
{86, "ENAMETOOLONG", "file name too long"},
{88, "EDQUOT", "disk quota exceeded"},
{89, "ECORRUPT", "invalid file system control data detected"},
{90, "ESYSERROR", "for future use "},
{93, "EREMOTE", "item is not local to host"},
{94, "ENOTRECOVERABLE", "state not recoverable "},
{95, "EOWNERDEAD", "previous owner died "},
{109, "ENOSYS", "function not implemented"},
{110, "EMEDIA", "media surface error"},
{111, "ESOFT", "I/O completed, but needs relocation"},
{112, "ENOATTR", "no attribute found"},
{113, "ESAD", "security Authentication Denied"},
{114, "ENOTRUST", "not a Trusted Program"},
{115, "ETOOMANYREFS", "too many references: can't splice"},
{116, "EILSEQ", "invalid wide character"},
{117, "ECANCELED", "asynchronous I/O cancelled"},
{118, "ENOSR", "out of STREAMS resources"},
{119, "ETIME", "system call timed out"},
{120, "EBADMSG", "next message has wrong type"},
{121, "EPROTO", "error in protocol"},
{122, "ENODATA", "no message on stream head read q"},
{123, "ENOSTR", "fd not associated with a stream"},
{124, "ENOTSUP", "unsupported attribute value"},
{125, "EMULTIHOP", "multihop is not allowed"},
{126, "ENOLINK", "the server link has been severed"},
{127, "EOVERFLOW", "value too large to be stored in data type"},
}
// Signal table
var signalList = [...]struct {
num syscall.Signal
name string
desc string
}{
{1, "SIGHUP", "hangup"},
{2, "SIGINT", "interrupt"},
{3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/BPT trap"},
{6, "SIGIOT", "IOT/Abort trap"},
{7, "SIGEMT", "EMT trap"},
{8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"},
{10, "SIGBUS", "bus error"},
{11, "SIGSEGV", "segmentation fault"},
{12, "SIGSYS", "bad system call"},
{13, "SIGPIPE", "broken pipe"},
{14, "SIGALRM", "alarm clock"},
{15, "SIGTERM", "terminated"},
{16, "SIGURG", "urgent I/O condition"},
{17, "SIGSTOP", "stopped (signal)"},
{18, "SIGTSTP", "stopped"},
{19, "SIGCONT", "continued"},
{20, "SIGCHLD", "child exited"},
{21, "SIGTTIN", "stopped (tty input)"},
{22, "SIGTTOU", "stopped (tty output)"},
{23, "SIGIO", "I/O possible/complete"},
{24, "SIGXCPU", "cputime limit exceeded"},
{25, "SIGXFSZ", "filesize limit exceeded"},
{27, "SIGMSG", "input device data"},
{28, "SIGWINCH", "window size changes"},
{29, "SIGPWR", "power-failure"},
{30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"},
{32, "SIGPROF", "profiling timer expired"},
{33, "SIGDANGER", "paging space low"},
{34, "SIGVTALRM", "virtual timer expired"},
{35, "SIGMIGRATE", "signal 35"},
{36, "SIGPRE", "signal 36"},
{37, "SIGVIRT", "signal 37"},
{38, "SIGTALRM", "signal 38"},
{39, "SIGWAITING", "signal 39"},
{48, "SIGSYSERROR", "signal 48"},
{49, "SIGCAPI", "signal 49"},
{58, "SIGRECONFIG", "signal 58"},
{59, "SIGCPUFAIL", "CPU Failure Predicted"},
{60, "SIGGRANT", "monitor mode granted"},
{61, "SIGRETRACT", "monitor mode retracted"},
{62, "SIGSOUND", "sound completed"},
{63, "SIGMAX32", "secure attention"},
{255, "SIGMAX", "signal 255"},
}
| {
"pile_set_name": "Github"
} |
/* Copyright 2013-present MongoDB Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Serializers;
using MongoDB.Driver.Core.Bindings;
using MongoDB.Driver.Core.Connections;
using MongoDB.Driver.Core.Misc;
using MongoDB.Driver.Core.WireProtocol.Messages.Encoders;
namespace MongoDB.Driver.Core.Operations
{
/// <summary>
/// Represents a drop database operation.
/// </summary>
public class DropDatabaseOperation : IWriteOperation<BsonDocument>
{
// fields
private readonly DatabaseNamespace _databaseNamespace;
private readonly MessageEncoderSettings _messageEncoderSettings;
private WriteConcern _writeConcern;
// constructors
/// <summary>
/// Initializes a new instance of the <see cref="DropDatabaseOperation"/> class.
/// </summary>
/// <param name="databaseNamespace">The database namespace.</param>
/// <param name="messageEncoderSettings">The message encoder settings.</param>
public DropDatabaseOperation(
DatabaseNamespace databaseNamespace,
MessageEncoderSettings messageEncoderSettings)
{
_databaseNamespace = Ensure.IsNotNull(databaseNamespace, nameof(databaseNamespace));
_messageEncoderSettings = messageEncoderSettings;
}
// properties
/// <summary>
/// Gets the database namespace.
/// </summary>
/// <value>
/// The database namespace.
/// </value>
public DatabaseNamespace DatabaseNamespace
{
get { return _databaseNamespace; }
}
/// <summary>
/// Gets the message encoder settings.
/// </summary>
/// <value>
/// The message encoder settings.
/// </value>
public MessageEncoderSettings MessageEncoderSettings
{
get { return _messageEncoderSettings; }
}
/// <summary>
/// Gets or sets the write concern.
/// </summary>
/// <value>
/// The write concern.
/// </value>
public WriteConcern WriteConcern
{
get { return _writeConcern; }
set { _writeConcern = value; }
}
// public methods
/// <inheritdoc/>
public BsonDocument Execute(IWriteBinding binding, CancellationToken cancellationToken)
{
Ensure.IsNotNull(binding, nameof(binding));
using (var channelSource = binding.GetWriteChannelSource(cancellationToken))
using (var channel = channelSource.GetChannel(cancellationToken))
using (var channelBinding = new ChannelReadWriteBinding(channelSource.Server, channel, binding.Session.Fork()))
{
var operation = CreateOperation(channelBinding.Session, channel.ConnectionDescription);
return operation.Execute(channelBinding, cancellationToken);
}
}
/// <inheritdoc/>
public async Task<BsonDocument> ExecuteAsync(IWriteBinding binding, CancellationToken cancellationToken)
{
Ensure.IsNotNull(binding, nameof(binding));
using (var channelSource = await binding.GetWriteChannelSourceAsync(cancellationToken).ConfigureAwait(false))
using (var channel = await channelSource.GetChannelAsync(cancellationToken).ConfigureAwait(false))
using (var channelBinding = new ChannelReadWriteBinding(channelSource.Server, channel, binding.Session.Fork()))
{
var operation = CreateOperation(channelBinding.Session, channel.ConnectionDescription);
return await operation.ExecuteAsync(channelBinding, cancellationToken).ConfigureAwait(false);
}
}
// private methods
internal BsonDocument CreateCommand(ICoreSessionHandle session, ConnectionDescription connectionDescription)
{
var writeConcern = WriteConcernHelper.GetWriteConcernForCommandThatWrites(session, _writeConcern, connectionDescription.ServerVersion);
return new BsonDocument
{
{ "dropDatabase", 1 },
{ "writeConcern", writeConcern, writeConcern != null }
};
}
private WriteCommandOperation<BsonDocument> CreateOperation(ICoreSessionHandle session, ConnectionDescription connectionDescription)
{
var command = CreateCommand(session, connectionDescription);
return new WriteCommandOperation<BsonDocument>(_databaseNamespace, command, BsonDocumentSerializer.Instance, _messageEncoderSettings);
}
}
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to 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.
*/
use PHPUnit\Framework\TestCase;
class ExtensionsLoadedTest extends TestCase
{
/**
* @dataProvider extensions
*/
public function testExtensionLoaded($extensionName)
{
$this->assertTrue(extension_loaded($extensionName));
}
public function extensions()
{
return [
['amqp'],
['bitset'],
['couchbase'],
['ds'],
['eio'],
['hprose'],
['igbinary'],
['jsond'],
['krb5'],
['lua'],
['lzf'],
['memprof'],
['opencensus'],
['seaslog'],
['stackdriver_debugger'],
['stomp'],
['sync'],
['tcpwrap'],
['timezonedb'],
['v8js'],
['vips'],
['yaconf'],
['yaf'],
['yaml']
];
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2015 Goldman Sachs.
*
* 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.gs.collections.impl.list.immutable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import com.gs.collections.api.RichIterable;
import com.gs.collections.api.block.function.Function;
import com.gs.collections.api.collection.ImmutableCollection;
import com.gs.collections.api.collection.MutableCollection;
import com.gs.collections.api.collection.primitive.ImmutableBooleanCollection;
import com.gs.collections.api.list.ImmutableList;
import com.gs.collections.api.list.MutableList;
import com.gs.collections.api.map.MutableMap;
import com.gs.collections.api.multimap.Multimap;
import com.gs.collections.api.multimap.MutableMultimap;
import com.gs.collections.api.multimap.list.ImmutableListMultimap;
import com.gs.collections.api.partition.list.PartitionImmutableList;
import com.gs.collections.api.stack.MutableStack;
import com.gs.collections.api.tuple.Pair;
import com.gs.collections.impl.block.factory.Functions;
import com.gs.collections.impl.block.factory.HashingStrategies;
import com.gs.collections.impl.block.factory.IntegerPredicates;
import com.gs.collections.impl.block.factory.ObjectIntProcedures;
import com.gs.collections.impl.block.factory.Predicates;
import com.gs.collections.impl.block.factory.Predicates2;
import com.gs.collections.impl.block.factory.PrimitiveFunctions;
import com.gs.collections.impl.block.factory.Procedures;
import com.gs.collections.impl.block.function.NegativeIntervalFunction;
import com.gs.collections.impl.block.procedure.CollectionAddProcedure;
import com.gs.collections.impl.collection.immutable.AbstractImmutableCollectionTestCase;
import com.gs.collections.impl.factory.Lists;
import com.gs.collections.impl.list.Interval;
import com.gs.collections.impl.list.mutable.FastList;
import com.gs.collections.impl.multimap.list.FastListMultimap;
import com.gs.collections.impl.set.mutable.UnifiedSet;
import com.gs.collections.impl.test.Verify;
import com.gs.collections.impl.utility.Iterate;
import com.gs.collections.impl.utility.ListIterate;
import org.junit.Assert;
import org.junit.Test;
import static com.gs.collections.impl.factory.Iterables.iList;
public abstract class AbstractImmutableListTestCase extends AbstractImmutableCollectionTestCase
{
@Override
protected abstract ImmutableList<Integer> classUnderTest();
@Override
protected <T> MutableList<T> newMutable()
{
return FastList.newList();
}
@Test
public void equalsAndHashCode()
{
ImmutableList<Integer> immutable = this.classUnderTest();
MutableList<Integer> mutable1 = FastList.newList(immutable);
ImmutableList<Integer> immutable1 = mutable1.toImmutable();
List<Integer> mutable2 = new LinkedList<>(mutable1);
List<Integer> mutable3 = new ArrayList<>(mutable1);
Verify.assertEqualsAndHashCode(mutable1, immutable);
Verify.assertEqualsAndHashCode(immutable1, immutable);
Verify.assertEqualsAndHashCode(mutable2, immutable);
Verify.assertEqualsAndHashCode(mutable3, immutable);
Verify.assertPostSerializedEqualsAndHashCode(immutable);
Assert.assertNotEquals(immutable, UnifiedSet.newSet(mutable1));
mutable1.add(null);
mutable2.add(null);
mutable3.add(null);
Assert.assertNotEquals(mutable1, immutable);
Assert.assertNotEquals(mutable2, immutable);
Assert.assertNotEquals(mutable3, immutable);
mutable1.remove(null);
mutable2.remove(null);
mutable3.remove(null);
Verify.assertEqualsAndHashCode(mutable1, immutable);
Verify.assertEqualsAndHashCode(mutable2, immutable);
Verify.assertEqualsAndHashCode(mutable3, immutable);
if (immutable.size() > 2)
{
mutable1.set(2, null);
mutable2.set(2, null);
mutable3.set(2, null);
Assert.assertNotEquals(mutable1, immutable);
Assert.assertNotEquals(mutable2, immutable);
Assert.assertNotEquals(mutable3, immutable);
mutable1.remove(2);
mutable2.remove(2);
mutable3.remove(2);
Assert.assertNotEquals(mutable1, immutable);
Assert.assertNotEquals(mutable2, immutable);
Assert.assertNotEquals(mutable3, immutable);
}
}
@Test
public void contains()
{
ImmutableList<Integer> list = this.classUnderTest();
for (int i = 1; i <= list.size(); i++)
{
Assert.assertTrue(list.contains(i));
}
Assert.assertFalse(list.contains(list.size() + 1));
}
@Test
public void containsAll()
{
Assert.assertTrue(this.classUnderTest().containsAll(this.classUnderTest().toList()));
}
@Test
public void containsAllArray()
{
Assert.assertTrue(this.classUnderTest().containsAllArguments(this.classUnderTest().toArray()));
}
@Test
public void containsAllIterable()
{
Assert.assertTrue(this.classUnderTest().containsAllIterable(this.classUnderTest()));
}
@Test
public void indexOf()
{
Assert.assertEquals(0, this.classUnderTest().indexOf(1));
Assert.assertEquals(-1, this.classUnderTest().indexOf(null));
ImmutableList<Integer> immutableList = this.classUnderTest().newWith(null);
Assert.assertEquals(immutableList.size() - 1, immutableList.indexOf(null));
Assert.assertEquals(-1, this.classUnderTest().indexOf(Integer.MAX_VALUE));
}
@Test
public void lastIndexOf()
{
Assert.assertEquals(0, this.classUnderTest().lastIndexOf(1));
Assert.assertEquals(-1, this.classUnderTest().lastIndexOf(null));
Assert.assertEquals(-1, this.classUnderTest().lastIndexOf(null));
ImmutableList<Integer> immutableList = this.classUnderTest().newWith(null);
Assert.assertEquals(immutableList.size() - 1, immutableList.lastIndexOf(null));
Assert.assertEquals(-1, this.classUnderTest().lastIndexOf(Integer.MAX_VALUE));
}
@Test
public void get()
{
ImmutableList<Integer> list = this.classUnderTest();
Verify.assertThrows(IndexOutOfBoundsException.class, () -> list.get(list.size() + 1));
Verify.assertThrows(IndexOutOfBoundsException.class, () -> list.get(-1));
}
@Test
public void forEach()
{
MutableList<Integer> result = Lists.mutable.of();
ImmutableList<Integer> collection = this.classUnderTest();
collection.forEach(CollectionAddProcedure.on(result));
Assert.assertEquals(collection, result);
}
@Test
public void each()
{
MutableList<Integer> result = Lists.mutable.of();
ImmutableList<Integer> collection = this.classUnderTest();
collection.each(result::add);
Assert.assertEquals(collection, result);
}
@Test
public void reverseForEach()
{
MutableList<Integer> result = Lists.mutable.of();
ImmutableList<Integer> list = this.classUnderTest();
list.reverseForEach(result::add);
Assert.assertEquals(ListIterate.reverseThis(FastList.newList(list)), result);
}
@Test
public void corresponds()
{
ImmutableList<Integer> integers1 = this.classUnderTest();
ImmutableList<Integer> integers2 = this.classUnderTest().newWith(Integer.valueOf(1));
Assert.assertFalse(integers1.corresponds(integers2, Predicates2.alwaysTrue()));
ImmutableList<Integer> integers3 = integers1.collect(integer -> integer + 1);
Assert.assertTrue(integers1.corresponds(integers3, Predicates2.lessThan()));
Assert.assertFalse(integers1.corresponds(integers3, Predicates2.greaterThan()));
}
@Test
public void forEachFromTo()
{
MutableList<Integer> result = Lists.mutable.of();
MutableList<Integer> reverseResult = Lists.mutable.of();
ImmutableList<Integer> list = this.classUnderTest();
list.forEach(0, list.size() - 1, result::add);
Assert.assertEquals(list, result);
list.forEach(list.size() - 1, 0, reverseResult::add);
Assert.assertEquals(ListIterate.reverseThis(FastList.newList(list)), reverseResult);
Verify.assertThrows(IndexOutOfBoundsException.class, () -> list.forEach(-1, 0, result::add));
Verify.assertThrows(IndexOutOfBoundsException.class, () -> list.forEach(0, -1, result::add));
}
@Test
public void forEachWithIndexFromTo()
{
MutableList<Integer> result = Lists.mutable.of();
MutableList<Integer> reverseResult = Lists.mutable.of();
ImmutableList<Integer> list = this.classUnderTest();
list.forEachWithIndex(0, list.size() - 1, ObjectIntProcedures.fromProcedure(result::add));
Assert.assertEquals(list, result);
list.forEachWithIndex(list.size() - 1, 0, ObjectIntProcedures.fromProcedure(reverseResult::add));
Assert.assertEquals(ListIterate.reverseThis(FastList.newList(list)), reverseResult);
Verify.assertThrows(IndexOutOfBoundsException.class, () -> list.forEachWithIndex(-1, 0, result::add));
Verify.assertThrows(IndexOutOfBoundsException.class, () -> list.forEachWithIndex(0, -1, result::add));
}
@Test
public void forEachWith()
{
MutableCollection<Integer> result = Lists.mutable.of();
this.classUnderTest().forEachWith((argument1, argument2) -> result.add(argument1 + argument2), 0);
Assert.assertEquals(this.classUnderTest(), result);
}
@Test
public void forEachWithIndex()
{
ImmutableList<Integer> list = this.classUnderTest();
MutableList<Integer> result = Lists.mutable.of();
list.forEachWithIndex((object, index) -> result.add(object + index));
result.forEachWithIndex((object, index) -> Assert.assertEquals(object, result.set(index, object - index)));
Assert.assertEquals(list, result);
}
@Test
public void detectIndex()
{
Assert.assertEquals(0, this.classUnderTest().detectIndex(integer -> integer == 1));
Assert.assertEquals(-1, this.classUnderTest().detectIndex(integer -> integer == 0));
}
@Test
public void detectLastIndex()
{
Assert.assertEquals(0, this.classUnderTest().detectLastIndex(integer -> integer == 1));
Assert.assertEquals(-1, this.classUnderTest().detectLastIndex(integer -> integer == 0));
}
@Test
public void select_target()
{
ImmutableCollection<Integer> integers = this.classUnderTest();
Assert.assertEquals(integers, integers.select(Predicates.lessThan(integers.size() + 1), FastList.<Integer>newList()));
Verify.assertEmpty(integers.select(Predicates.greaterThan(integers.size()), FastList.<Integer>newList()));
}
@Test
public void reject_target()
{
ImmutableCollection<Integer> integers = this.classUnderTest();
Verify.assertEmpty(integers.reject(Predicates.lessThan(integers.size() + 1), FastList.<Integer>newList()));
Assert.assertEquals(integers, integers.reject(Predicates.greaterThan(integers.size()), FastList.<Integer>newList()));
}
@Test
public void flatCollectWithTarget()
{
MutableCollection<String> actual = this.classUnderTest().flatCollect(integer -> Lists.fixedSize.of(String.valueOf(integer)), FastList.<String>newList());
ImmutableCollection<String> expected = this.classUnderTest().collect(String::valueOf);
Assert.assertEquals(expected, actual);
}
@Test
public void distinct()
{
ImmutableList<Integer> integers = this.classUnderTest();
Assert.assertEquals(integers, integers.newWith(1).distinct());
Assert.assertEquals(this.classUnderTest(), this.classUnderTest().distinct());
}
@Test
public void distinctWithHashingStrategy()
{
FastList<String> strings = FastList.newListWith("A", "b", "a", "c", "B", "D", "e", "D", "e", "E");
ImmutableList<Integer> integers = this.classUnderTest();
ImmutableList<String> letters =
strings.subList(0, integers.size()).toImmutable().distinct(HashingStrategies.fromFunction(String::toLowerCase));
List<String> expectedLetters = strings.subList(0, integers.size()).distinct(HashingStrategies.fromFunction(String::toLowerCase));
Assert.assertEquals(expectedLetters, letters);
}
@Test
public void zip()
{
ImmutableCollection<Integer> immutableCollection = this.classUnderTest();
List<Object> nulls = Collections.nCopies(immutableCollection.size(), null);
List<Object> nullsPlusOne = Collections.nCopies(immutableCollection.size() + 1, null);
List<Object> nullsMinusOne = Collections.nCopies(immutableCollection.size() - 1, null);
ImmutableCollection<Pair<Integer, Object>> pairs = immutableCollection.zip(nulls);
Assert.assertEquals(immutableCollection, pairs.collect((Function<Pair<Integer, ?>, Integer>) Pair::getOne));
Assert.assertEquals(nulls, pairs.collect((Function<Pair<?, Object>, Object>) Pair::getTwo));
ImmutableCollection<Pair<Integer, Object>> pairsPlusOne = immutableCollection.zip(nullsPlusOne);
Assert.assertEquals(immutableCollection, pairsPlusOne.collect((Function<Pair<Integer, ?>, Integer>) Pair::getOne));
Assert.assertEquals(nulls, pairsPlusOne.collect((Function<Pair<?, Object>, Object>) Pair::getTwo));
ImmutableCollection<Pair<Integer, Object>> pairsMinusOne = immutableCollection.zip(nullsMinusOne);
Assert.assertEquals(immutableCollection.size() - 1, pairsMinusOne.size());
Assert.assertTrue(immutableCollection.containsAllIterable(pairsMinusOne.collect((Function<Pair<Integer, ?>, Integer>) Pair::getOne)));
Assert.assertEquals(immutableCollection.zip(nulls), immutableCollection.zip(nulls, FastList.<Pair<Integer, Object>>newList()));
}
@Test
public void zipWithIndex()
{
ImmutableCollection<Integer> immutableCollection = this.classUnderTest();
ImmutableCollection<Pair<Integer, Integer>> pairs = immutableCollection.zipWithIndex();
Assert.assertEquals(immutableCollection, pairs.collect((Function<Pair<Integer, ?>, Integer>) Pair::getOne));
Assert.assertEquals(Interval.zeroTo(immutableCollection.size() - 1), pairs.collect((Function<Pair<?, Integer>, Integer>) Pair::getTwo));
Assert.assertEquals(immutableCollection.zipWithIndex(), immutableCollection.zipWithIndex(FastList.<Pair<Integer, Integer>>newList()));
}
@Test
public void chunk_large_size()
{
Assert.assertEquals(this.classUnderTest(), this.classUnderTest().chunk(10).getFirst());
Verify.assertInstanceOf(ImmutableList.class, this.classUnderTest().chunk(10).getFirst());
}
@Test
public void collectIfWithTarget()
{
ImmutableCollection<Integer> integers = this.classUnderTest();
Assert.assertEquals(integers, integers.collectIf(Integer.class::isInstance, Functions.getIntegerPassThru(), FastList.<Integer>newList()));
}
@Test
public void toList()
{
ImmutableCollection<Integer> integers = this.classUnderTest();
MutableList<Integer> list = integers.toList();
Verify.assertEqualsAndHashCode(integers, list);
Assert.assertNotSame(integers, list);
}
@Test
public void toSortedListBy()
{
MutableList<Integer> mutableList = this.classUnderTest().toList();
mutableList.shuffleThis();
ImmutableList<Integer> immutableList = mutableList.toImmutable();
MutableList<Integer> sortedList = immutableList.toSortedListBy(Functions.getIntegerPassThru());
Assert.assertEquals(this.classUnderTest(), sortedList);
}
@Test
public void removeAtIndex()
{
Verify.assertThrows(UnsupportedOperationException.class, () -> this.classUnderTest().castToList().remove(1));
}
@Test
public void set()
{
Verify.assertThrows(UnsupportedOperationException.class, () -> this.classUnderTest().castToList().set(0, 1));
}
@Test
public void addAtIndex()
{
Verify.assertThrows(UnsupportedOperationException.class, () -> this.classUnderTest().castToList().add(0, 1));
}
@Test
public void addAllAtIndex()
{
Verify.assertThrows(UnsupportedOperationException.class, () -> this.classUnderTest().castToList().addAll(0, Lists.fixedSize.<Integer>of()));
}
@Test
public void subList()
{
Verify.assertListsEqual(Lists.immutable.of(1).castToList(),
this.classUnderTest().castToList().subList(0, 1));
}
@Test(expected = IndexOutOfBoundsException.class)
public void subListFromNegative()
{
this.classUnderTest().castToList().subList(-1, 1);
}
@Test(expected = IllegalArgumentException.class)
public void subListFromGreaterThanTO()
{
this.classUnderTest().castToList().subList(1, 0);
}
@Test(expected = IndexOutOfBoundsException.class)
public void subListToGreaterThanSize()
{
this.classUnderTest().castToList().subList(0, 100);
}
@Test
public void listIterator()
{
ListIterator<Integer> it = this.classUnderTest().listIterator();
Assert.assertFalse(it.hasPrevious());
Verify.assertThrows(NoSuchElementException.class, (Runnable) it::previous);
Assert.assertEquals(-1, it.previousIndex());
Assert.assertEquals(0, it.nextIndex());
it.next();
Assert.assertEquals(1, it.nextIndex());
Verify.assertThrows(UnsupportedOperationException.class, it::remove);
Verify.assertThrows(UnsupportedOperationException.class, () -> it.add(null));
Verify.assertThrows(UnsupportedOperationException.class, () -> it.set(null));
}
@Test(expected = IndexOutOfBoundsException.class)
public void listIterator_throwsNegative()
{
this.classUnderTest().listIterator(-1);
}
@Test(expected = IndexOutOfBoundsException.class)
public void listIterator_throwsGreaterThanSize()
{
this.classUnderTest().listIterator(100);
}
@Test
public void toStack()
{
MutableStack<Integer> stack = this.classUnderTest().toStack();
Assert.assertEquals(stack.toSortedList().toReversed(), stack.toList());
}
@Test
public void take()
{
ImmutableList<Integer> immutableList = this.classUnderTest();
Assert.assertEquals(Lists.immutable.of(), immutableList.take(0));
Assert.assertEquals(iList(1), immutableList.take(1));
Assert.assertEquals(immutableList, immutableList.take(10));
MutableList<Integer> mutableList = Lists.mutable.ofAll(immutableList);
Assert.assertEquals(
mutableList.take(mutableList.size() - 1),
immutableList.take(immutableList.size() - 1));
Assert.assertSame(immutableList, immutableList.take(immutableList.size()));
Assert.assertSame(immutableList, immutableList.take(Integer.MAX_VALUE));
}
@Test(expected = IllegalArgumentException.class)
public void take_throws()
{
this.classUnderTest().take(-1);
}
@Test
public void takeWhile()
{
Assert.assertEquals(
iList(1),
this.classUnderTest().takeWhile(Predicates.lessThan(2)));
}
@Test
public void drop()
{
ImmutableList<Integer> immutableList = this.classUnderTest();
Assert.assertSame(immutableList, immutableList.drop(0));
MutableList<Integer> mutableList = Lists.mutable.ofAll(immutableList);
Assert.assertEquals(mutableList.drop(1), immutableList.drop(1));
if (mutableList.size() > 0)
{
Assert.assertEquals(
mutableList.drop(mutableList.size() - 1),
immutableList.drop(immutableList.size() - 1));
}
Assert.assertEquals(Lists.immutable.of(), immutableList.drop(10));
Assert.assertEquals(Lists.immutable.of(), immutableList.drop(immutableList.size()));
Assert.assertEquals(Lists.immutable.of(), immutableList.drop(Integer.MAX_VALUE));
}
@Test(expected = IllegalArgumentException.class)
public void drop_throws()
{
this.classUnderTest().drop(-1);
}
@Test
public void dropWhile()
{
Assert.assertEquals(
this.classUnderTest(),
this.classUnderTest().dropWhile(Predicates.lessThan(0)));
Assert.assertEquals(
Lists.immutable.of(),
this.classUnderTest().dropWhile(Predicates.greaterThan(0)));
}
@Test
public void partitionWhile()
{
PartitionImmutableList<Integer> partitionAll = this.classUnderTest().partitionWhile(Predicates.greaterThan(0));
Assert.assertEquals(this.classUnderTest(), partitionAll.getSelected());
Assert.assertEquals(Lists.immutable.of(), partitionAll.getRejected());
PartitionImmutableList<Integer> partitionNone = this.classUnderTest().partitionWhile(Predicates.lessThan(0));
Assert.assertEquals(Lists.immutable.of(), partitionNone.getSelected());
Assert.assertEquals(this.classUnderTest(), partitionNone.getRejected());
}
@Override
@Test
public void collectBoolean()
{
ImmutableCollection<Integer> integers = this.classUnderTest();
ImmutableBooleanCollection immutableCollection = integers.collectBoolean(PrimitiveFunctions.integerIsPositive());
Verify.assertSize(integers.size(), immutableCollection);
}
@Test
public void groupBy()
{
ImmutableList<Integer> list = this.classUnderTest();
ImmutableListMultimap<Boolean, Integer> multimap =
list.groupBy(integer -> IntegerPredicates.isOdd().accept(integer));
MutableMap<Boolean, RichIterable<Integer>> actualMap = multimap.toMap();
int halfSize = this.classUnderTest().size() / 2;
boolean odd = this.classUnderTest().size() % 2 != 0;
Assert.assertEquals(halfSize, Iterate.sizeOf(actualMap.getIfAbsent(false, FastList::new)));
Assert.assertEquals(halfSize + (odd ? 1 : 0), Iterate.sizeOf(actualMap.getIfAbsent(true, FastList::new)));
}
@Test
public void groupByEach()
{
ImmutableList<Integer> list = this.classUnderTest();
MutableMultimap<Integer, Integer> expected = FastListMultimap.newMultimap();
list.forEach(Procedures.cast(value -> expected.putAll(-value, Interval.fromTo(value, list.size()))));
Multimap<Integer, Integer> actual = list.groupByEach(new NegativeIntervalFunction());
Assert.assertEquals(expected, actual);
Multimap<Integer, Integer> actualWithTarget =
list.groupByEach(new NegativeIntervalFunction(), FastListMultimap.<Integer, Integer>newMultimap());
Assert.assertEquals(expected, actualWithTarget);
}
@Test
public void asReversed()
{
Verify.assertIterablesEqual(this.classUnderTest().toList().toReversed(), this.classUnderTest().asReversed());
}
@Test
public void toReversed()
{
ImmutableList<Integer> immutableList = this.classUnderTest();
Assert.assertEquals(immutableList.toReversed().toReversed(), immutableList);
if (immutableList.size() <= 1)
{
Assert.assertSame(immutableList.toReversed(), immutableList);
}
else
{
Assert.assertNotEquals(immutableList.toReversed(), immutableList);
}
}
@Test
public void toImmutable()
{
ImmutableList<Integer> integers = this.classUnderTest();
ImmutableList<Integer> actual = integers.toImmutable();
Assert.assertEquals(integers, actual);
Assert.assertSame(integers, actual);
}
}
| {
"pile_set_name": "Github"
} |
// NOTE: This file was copied/ported to TypeScript from the ethereum/remix project at https://github.com/ethereum/remix
// History of modifications made from Remix are not captured in this repository. See https://github.com/seeseplusplus/remix/tree/introduce-sdb for history
// Remix (and therefore this file) is under the MIT License:
/* The MIT License (MIT)
*
* Copyright (c) 2016
*
* 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.
*/
export class AstWalker {
/**
* visit all the AST nodes
*
* @param {Object} ast - AST node
* @param {Object or Function} callback - if (Function) the function will be called for every node.
* - if (Object) callback[<Node Type>] will be called for
* every node of type <Node Type>. callback["*"] will be called fo all other nodes.
* in each case, if the callback returns false it does not descend into children.
* If no callback for the current type, children are visited.
*/
public walk(ast, callback) {
if (callback instanceof Function) {
callback = {'*': callback}
}
if (!('*' in callback)) {
callback['*'] = function () { return true }
}
if (this.manageCallBack(ast, callback) && ast.children && ast.children.length > 0) {
for (const k in ast.children) {
const child = ast.children[k]
this.walk(child, callback)
}
}
}
public walkDetail(ast, parent, depth, callback) {
if (callback instanceof Function) {
callback = {'*': callback}
}
if (!('*' in callback)) {
callback['*'] = function () { return true }
}
if (this.manageCallBackDetail(ast, parent, depth, callback) && ast.children && ast.children.length > 0) {
for (const k in ast.children) {
const child = ast.children[k]
this.walkDetail(child, ast, depth + 1, callback)
}
}
}
/**
* walk the given @astList
*
* @param {Object} sourcesList - sources list (containing root AST node)
* @param {Function} - callback used by AstWalker to compute response
*/
public walkAstList(sourcesList, callback) {
const walker = new AstWalker()
for (const k in sourcesList) {
walker.walk(sourcesList[k].AST, callback)
}
}
private manageCallBack(node, callback) {
if (node.name in callback) {
return callback[node.name](node)
} else {
return callback['*'](node)
}
}
private manageCallBackDetail(node, parent, depth, callback) {
if (node.name in callback) {
return callback[node.name](node, parent, depth)
} else {
return callback['*'](node, parent, depth)
}
}
} | {
"pile_set_name": "Github"
} |
/*
* This file is part of Telegram Server
* Copyright (C) 2015 Aykut Alparslan KOÇ
*
* Telegram Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Telegram Server 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, see <http://www.gnu.org/licenses/>.
*/
package org.telegram.tl.service;
import org.telegram.mtproto.ProtocolBuffer;
import org.telegram.tl.*;
public class future_salt extends TLObject {
public static final int ID = 0x0949d9dc;
public int valid_since;
public int valid_until;
public long salt;
public future_salt() {
}
public future_salt(int valid_since, int valid_until, long salt){
this.valid_since = valid_since;
this.valid_until = valid_until;
this.salt = salt;
}
@Override
public void deserialize(ProtocolBuffer buffer) {
valid_since = buffer.readInt();
valid_until = buffer.readInt();
salt = buffer.readLong();
}
@Override
public ProtocolBuffer serialize() {
ProtocolBuffer buffer = new ProtocolBuffer(32);
serializeTo(buffer);
return buffer;
}
@Override
public void serializeTo(ProtocolBuffer buff) {
buff.writeInt(getConstructor());
buff.writeInt(valid_since);
buff.writeInt(valid_until);
buff.writeLong(salt);
}
public int getConstructor() {
return ID;
}
} | {
"pile_set_name": "Github"
} |
from analyze import plot_certified_accuracy, Line, ApproximateAccuracy
plot_certified_accuracy(
"./github_readme_certified", "CIFAR-10, vary $\sigma$", 1.5, [
Line(ApproximateAccuracy("data/certify/cifar10/finetune_cifar_from_imagenetPGD2steps/PGD_10steps_30epochs_multinoise/2-multitrain/eps_64/cifar10/resnet110/noise_0.12/test/sigma_0.12"), "$\sigma = 0.12$"),
Line(ApproximateAccuracy("data/certify/cifar10/finetune_cifar_from_imagenetPGD2steps/PGD_10steps_30epochs_multinoise/2-multitrain/eps_64/cifar10/resnet110/noise_0.25/test/sigma_0.25"), "$\sigma = 0.25$"),
Line(ApproximateAccuracy("data/certify/cifar10/finetune_cifar_from_imagenetPGD2steps/PGD_10steps_30epochs_multinoise/2-multitrain/eps_64/cifar10/resnet110/noise_0.50/test/sigma_0.50"), "$\sigma = 0.50$"),
Line(ApproximateAccuracy("data/certify/cifar10/finetune_cifar_from_imagenetPGD2steps/PGD_10steps_30epochs_multinoise/2-multitrain/eps_64/cifar10/resnet110/noise_1.00/test/sigma_1.00"), "$\sigma = 1.00$"),
])
| {
"pile_set_name": "Github"
} |
module Rack
module Mime
# Returns String with mime type if found, otherwise use +fallback+.
# +ext+ should be filename extension in the '.ext' format that
# File.extname(file) returns.
# +fallback+ may be any object
#
# Also see the documentation for MIME_TYPES
#
# Usage:
# Rack::Mime.mime_type('.foo')
#
# This is a shortcut for:
# Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream')
def mime_type(ext, fallback='application/octet-stream')
MIME_TYPES.fetch(ext.to_s.downcase, fallback)
end
module_function :mime_type
# List of most common mime-types, selected various sources
# according to their usefulness in a webserving scope for Ruby
# users.
#
# To amend this list with your local mime.types list you can use:
#
# require 'webrick/httputils'
# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types')
# Rack::Mime::MIME_TYPES.merge!(list)
#
# N.B. On Ubuntu the mime.types file does not include the leading period, so
# users may need to modify the data before merging into the hash.
#
# To add the list mongrel provides, use:
#
# require 'mongrel/handlers'
# Rack::Mime::MIME_TYPES.merge!(Mongrel::DirHandler::MIME_TYPES)
MIME_TYPES = {
".123" => "application/vnd.lotus-1-2-3",
".3dml" => "text/vnd.in3d.3dml",
".3g2" => "video/3gpp2",
".3gp" => "video/3gpp",
".a" => "application/octet-stream",
".acc" => "application/vnd.americandynamics.acc",
".ace" => "application/x-ace-compressed",
".acu" => "application/vnd.acucobol",
".aep" => "application/vnd.audiograph",
".afp" => "application/vnd.ibm.modcap",
".ai" => "application/postscript",
".aif" => "audio/x-aiff",
".aiff" => "audio/x-aiff",
".ami" => "application/vnd.amiga.ami",
".appcache" => "text/cache-manifest",
".apr" => "application/vnd.lotus-approach",
".asc" => "application/pgp-signature",
".asf" => "video/x-ms-asf",
".asm" => "text/x-asm",
".aso" => "application/vnd.accpac.simply.aso",
".asx" => "video/x-ms-asf",
".atc" => "application/vnd.acucorp",
".atom" => "application/atom+xml",
".atomcat" => "application/atomcat+xml",
".atomsvc" => "application/atomsvc+xml",
".atx" => "application/vnd.antix.game-component",
".au" => "audio/basic",
".avi" => "video/x-msvideo",
".bat" => "application/x-msdownload",
".bcpio" => "application/x-bcpio",
".bdm" => "application/vnd.syncml.dm+wbxml",
".bh2" => "application/vnd.fujitsu.oasysprs",
".bin" => "application/octet-stream",
".bmi" => "application/vnd.bmi",
".bmp" => "image/bmp",
".box" => "application/vnd.previewsystems.box",
".btif" => "image/prs.btif",
".bz" => "application/x-bzip",
".bz2" => "application/x-bzip2",
".c" => "text/x-c",
".c4g" => "application/vnd.clonk.c4group",
".cab" => "application/vnd.ms-cab-compressed",
".cc" => "text/x-c",
".ccxml" => "application/ccxml+xml",
".cdbcmsg" => "application/vnd.contact.cmsg",
".cdkey" => "application/vnd.mediastation.cdkey",
".cdx" => "chemical/x-cdx",
".cdxml" => "application/vnd.chemdraw+xml",
".cdy" => "application/vnd.cinderella",
".cer" => "application/pkix-cert",
".cgm" => "image/cgm",
".chat" => "application/x-chat",
".chm" => "application/vnd.ms-htmlhelp",
".chrt" => "application/vnd.kde.kchart",
".cif" => "chemical/x-cif",
".cii" => "application/vnd.anser-web-certificate-issue-initiation",
".cil" => "application/vnd.ms-artgalry",
".cla" => "application/vnd.claymore",
".class" => "application/octet-stream",
".clkk" => "application/vnd.crick.clicker.keyboard",
".clkp" => "application/vnd.crick.clicker.palette",
".clkt" => "application/vnd.crick.clicker.template",
".clkw" => "application/vnd.crick.clicker.wordbank",
".clkx" => "application/vnd.crick.clicker",
".clp" => "application/x-msclip",
".cmc" => "application/vnd.cosmocaller",
".cmdf" => "chemical/x-cmdf",
".cml" => "chemical/x-cml",
".cmp" => "application/vnd.yellowriver-custom-menu",
".cmx" => "image/x-cmx",
".com" => "application/x-msdownload",
".conf" => "text/plain",
".cpio" => "application/x-cpio",
".cpp" => "text/x-c",
".cpt" => "application/mac-compactpro",
".crd" => "application/x-mscardfile",
".crl" => "application/pkix-crl",
".crt" => "application/x-x509-ca-cert",
".csh" => "application/x-csh",
".csml" => "chemical/x-csml",
".csp" => "application/vnd.commonspace",
".css" => "text/css",
".csv" => "text/csv",
".curl" => "application/vnd.curl",
".cww" => "application/prs.cww",
".cxx" => "text/x-c",
".daf" => "application/vnd.mobius.daf",
".davmount" => "application/davmount+xml",
".dcr" => "application/x-director",
".dd2" => "application/vnd.oma.dd2+xml",
".ddd" => "application/vnd.fujixerox.ddd",
".deb" => "application/x-debian-package",
".der" => "application/x-x509-ca-cert",
".dfac" => "application/vnd.dreamfactory",
".diff" => "text/x-diff",
".dis" => "application/vnd.mobius.dis",
".djv" => "image/vnd.djvu",
".djvu" => "image/vnd.djvu",
".dll" => "application/x-msdownload",
".dmg" => "application/octet-stream",
".dna" => "application/vnd.dna",
".doc" => "application/msword",
".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
".dot" => "application/msword",
".dp" => "application/vnd.osgi.dp",
".dpg" => "application/vnd.dpgraph",
".dsc" => "text/prs.lines.tag",
".dtd" => "application/xml-dtd",
".dts" => "audio/vnd.dts",
".dtshd" => "audio/vnd.dts.hd",
".dv" => "video/x-dv",
".dvi" => "application/x-dvi",
".dwf" => "model/vnd.dwf",
".dwg" => "image/vnd.dwg",
".dxf" => "image/vnd.dxf",
".dxp" => "application/vnd.spotfire.dxp",
".ear" => "application/java-archive",
".ecelp4800" => "audio/vnd.nuera.ecelp4800",
".ecelp7470" => "audio/vnd.nuera.ecelp7470",
".ecelp9600" => "audio/vnd.nuera.ecelp9600",
".ecma" => "application/ecmascript",
".edm" => "application/vnd.novadigm.edm",
".edx" => "application/vnd.novadigm.edx",
".efif" => "application/vnd.picsel",
".ei6" => "application/vnd.pg.osasli",
".eml" => "message/rfc822",
".eol" => "audio/vnd.digital-winds",
".eot" => "application/vnd.ms-fontobject",
".eps" => "application/postscript",
".es3" => "application/vnd.eszigno3+xml",
".esf" => "application/vnd.epson.esf",
".etx" => "text/x-setext",
".exe" => "application/x-msdownload",
".ext" => "application/vnd.novadigm.ext",
".ez" => "application/andrew-inset",
".ez2" => "application/vnd.ezpix-album",
".ez3" => "application/vnd.ezpix-package",
".f" => "text/x-fortran",
".f77" => "text/x-fortran",
".f90" => "text/x-fortran",
".fbs" => "image/vnd.fastbidsheet",
".fdf" => "application/vnd.fdf",
".fe_launch" => "application/vnd.denovo.fcselayout-link",
".fg5" => "application/vnd.fujitsu.oasysgp",
".fli" => "video/x-fli",
".flo" => "application/vnd.micrografx.flo",
".flv" => "video/x-flv",
".flw" => "application/vnd.kde.kivio",
".flx" => "text/vnd.fmi.flexstor",
".fly" => "text/vnd.fly",
".fm" => "application/vnd.framemaker",
".fnc" => "application/vnd.frogans.fnc",
".for" => "text/x-fortran",
".fpx" => "image/vnd.fpx",
".fsc" => "application/vnd.fsc.weblaunch",
".fst" => "image/vnd.fst",
".ftc" => "application/vnd.fluxtime.clip",
".fti" => "application/vnd.anser-web-funds-transfer-initiation",
".fvt" => "video/vnd.fvt",
".fzs" => "application/vnd.fuzzysheet",
".g3" => "image/g3fax",
".gac" => "application/vnd.groove-account",
".gdl" => "model/vnd.gdl",
".gem" => "application/octet-stream",
".gemspec" => "text/x-script.ruby",
".ghf" => "application/vnd.groove-help",
".gif" => "image/gif",
".gim" => "application/vnd.groove-identity-message",
".gmx" => "application/vnd.gmx",
".gph" => "application/vnd.flographit",
".gqf" => "application/vnd.grafeq",
".gram" => "application/srgs",
".grv" => "application/vnd.groove-injector",
".grxml" => "application/srgs+xml",
".gtar" => "application/x-gtar",
".gtm" => "application/vnd.groove-tool-message",
".gtw" => "model/vnd.gtw",
".gv" => "text/vnd.graphviz",
".gz" => "application/x-gzip",
".h" => "text/x-c",
".h261" => "video/h261",
".h263" => "video/h263",
".h264" => "video/h264",
".hbci" => "application/vnd.hbci",
".hdf" => "application/x-hdf",
".hh" => "text/x-c",
".hlp" => "application/winhlp",
".hpgl" => "application/vnd.hp-hpgl",
".hpid" => "application/vnd.hp-hpid",
".hps" => "application/vnd.hp-hps",
".hqx" => "application/mac-binhex40",
".htc" => "text/x-component",
".htke" => "application/vnd.kenameaapp",
".htm" => "text/html",
".html" => "text/html",
".hvd" => "application/vnd.yamaha.hv-dic",
".hvp" => "application/vnd.yamaha.hv-voice",
".hvs" => "application/vnd.yamaha.hv-script",
".icc" => "application/vnd.iccprofile",
".ice" => "x-conference/x-cooltalk",
".ico" => "image/vnd.microsoft.icon",
".ics" => "text/calendar",
".ief" => "image/ief",
".ifb" => "text/calendar",
".ifm" => "application/vnd.shana.informed.formdata",
".igl" => "application/vnd.igloader",
".igs" => "model/iges",
".igx" => "application/vnd.micrografx.igx",
".iif" => "application/vnd.shana.informed.interchange",
".imp" => "application/vnd.accpac.simply.imp",
".ims" => "application/vnd.ms-ims",
".ipk" => "application/vnd.shana.informed.package",
".irm" => "application/vnd.ibm.rights-management",
".irp" => "application/vnd.irepository.package+xml",
".iso" => "application/octet-stream",
".itp" => "application/vnd.shana.informed.formtemplate",
".ivp" => "application/vnd.immervision-ivp",
".ivu" => "application/vnd.immervision-ivu",
".jad" => "text/vnd.sun.j2me.app-descriptor",
".jam" => "application/vnd.jam",
".jar" => "application/java-archive",
".java" => "text/x-java-source",
".jisp" => "application/vnd.jisp",
".jlt" => "application/vnd.hp-jlyt",
".jnlp" => "application/x-java-jnlp-file",
".joda" => "application/vnd.joost.joda-archive",
".jp2" => "image/jp2",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".jpgv" => "video/jpeg",
".jpm" => "video/jpm",
".js" => "application/javascript",
".json" => "application/json",
".karbon" => "application/vnd.kde.karbon",
".kfo" => "application/vnd.kde.kformula",
".kia" => "application/vnd.kidspiration",
".kml" => "application/vnd.google-earth.kml+xml",
".kmz" => "application/vnd.google-earth.kmz",
".kne" => "application/vnd.kinar",
".kon" => "application/vnd.kde.kontour",
".kpr" => "application/vnd.kde.kpresenter",
".ksp" => "application/vnd.kde.kspread",
".ktz" => "application/vnd.kahootz",
".kwd" => "application/vnd.kde.kword",
".latex" => "application/x-latex",
".lbd" => "application/vnd.llamagraphics.life-balance.desktop",
".lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
".les" => "application/vnd.hhe.lesson-player",
".link66" => "application/vnd.route66.link66+xml",
".log" => "text/plain",
".lostxml" => "application/lost+xml",
".lrm" => "application/vnd.ms-lrm",
".ltf" => "application/vnd.frogans.ltf",
".lvp" => "audio/vnd.lucent.voice",
".lwp" => "application/vnd.lotus-wordpro",
".m3u" => "audio/x-mpegurl",
".m4a" => "audio/mp4a-latm",
".m4v" => "video/mp4",
".ma" => "application/mathematica",
".mag" => "application/vnd.ecowin.chart",
".man" => "text/troff",
".manifest" => "text/cache-manifest",
".mathml" => "application/mathml+xml",
".mbk" => "application/vnd.mobius.mbk",
".mbox" => "application/mbox",
".mc1" => "application/vnd.medcalcdata",
".mcd" => "application/vnd.mcd",
".mdb" => "application/x-msaccess",
".mdi" => "image/vnd.ms-modi",
".mdoc" => "text/troff",
".me" => "text/troff",
".mfm" => "application/vnd.mfmp",
".mgz" => "application/vnd.proteus.magazine",
".mid" => "audio/midi",
".midi" => "audio/midi",
".mif" => "application/vnd.mif",
".mime" => "message/rfc822",
".mj2" => "video/mj2",
".mlp" => "application/vnd.dolby.mlp",
".mmd" => "application/vnd.chipnuts.karaoke-mmd",
".mmf" => "application/vnd.smaf",
".mml" => "application/mathml+xml",
".mmr" => "image/vnd.fujixerox.edmics-mmr",
".mng" => "video/x-mng",
".mny" => "application/x-msmoney",
".mov" => "video/quicktime",
".movie" => "video/x-sgi-movie",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mp4a" => "audio/mp4",
".mp4s" => "application/mp4",
".mp4v" => "video/mp4",
".mpc" => "application/vnd.mophun.certificate",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mpga" => "audio/mpeg",
".mpkg" => "application/vnd.apple.installer+xml",
".mpm" => "application/vnd.blueice.multipass",
".mpn" => "application/vnd.mophun.application",
".mpp" => "application/vnd.ms-project",
".mpy" => "application/vnd.ibm.minipay",
".mqy" => "application/vnd.mobius.mqy",
".mrc" => "application/marc",
".ms" => "text/troff",
".mscml" => "application/mediaservercontrol+xml",
".mseq" => "application/vnd.mseq",
".msf" => "application/vnd.epson.msf",
".msh" => "model/mesh",
".msi" => "application/x-msdownload",
".msl" => "application/vnd.mobius.msl",
".msty" => "application/vnd.muvee.style",
".mts" => "model/vnd.mts",
".mus" => "application/vnd.musician",
".mvb" => "application/x-msmediaview",
".mwf" => "application/vnd.mfer",
".mxf" => "application/mxf",
".mxl" => "application/vnd.recordare.musicxml",
".mxml" => "application/xv+xml",
".mxs" => "application/vnd.triscape.mxs",
".mxu" => "video/vnd.mpegurl",
".n" => "application/vnd.nokia.n-gage.symbian.install",
".nc" => "application/x-netcdf",
".ngdat" => "application/vnd.nokia.n-gage.data",
".nlu" => "application/vnd.neurolanguage.nlu",
".nml" => "application/vnd.enliven",
".nnd" => "application/vnd.noblenet-directory",
".nns" => "application/vnd.noblenet-sealer",
".nnw" => "application/vnd.noblenet-web",
".npx" => "image/vnd.net-fpx",
".nsf" => "application/vnd.lotus-notes",
".oa2" => "application/vnd.fujitsu.oasys2",
".oa3" => "application/vnd.fujitsu.oasys3",
".oas" => "application/vnd.fujitsu.oasys",
".obd" => "application/x-msbinder",
".oda" => "application/oda",
".odc" => "application/vnd.oasis.opendocument.chart",
".odf" => "application/vnd.oasis.opendocument.formula",
".odg" => "application/vnd.oasis.opendocument.graphics",
".odi" => "application/vnd.oasis.opendocument.image",
".odp" => "application/vnd.oasis.opendocument.presentation",
".ods" => "application/vnd.oasis.opendocument.spreadsheet",
".odt" => "application/vnd.oasis.opendocument.text",
".oga" => "audio/ogg",
".ogg" => "application/ogg",
".ogv" => "video/ogg",
".ogx" => "application/ogg",
".org" => "application/vnd.lotus-organizer",
".otc" => "application/vnd.oasis.opendocument.chart-template",
".otf" => "application/vnd.oasis.opendocument.formula-template",
".otg" => "application/vnd.oasis.opendocument.graphics-template",
".oth" => "application/vnd.oasis.opendocument.text-web",
".oti" => "application/vnd.oasis.opendocument.image-template",
".otm" => "application/vnd.oasis.opendocument.text-master",
".ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
".ott" => "application/vnd.oasis.opendocument.text-template",
".oxt" => "application/vnd.openofficeorg.extension",
".p" => "text/x-pascal",
".p10" => "application/pkcs10",
".p12" => "application/x-pkcs12",
".p7b" => "application/x-pkcs7-certificates",
".p7m" => "application/pkcs7-mime",
".p7r" => "application/x-pkcs7-certreqresp",
".p7s" => "application/pkcs7-signature",
".pas" => "text/x-pascal",
".pbd" => "application/vnd.powerbuilder6",
".pbm" => "image/x-portable-bitmap",
".pcl" => "application/vnd.hp-pcl",
".pclxl" => "application/vnd.hp-pclxl",
".pcx" => "image/x-pcx",
".pdb" => "chemical/x-pdb",
".pdf" => "application/pdf",
".pem" => "application/x-x509-ca-cert",
".pfr" => "application/font-tdpfr",
".pgm" => "image/x-portable-graymap",
".pgn" => "application/x-chess-pgn",
".pgp" => "application/pgp-encrypted",
".pic" => "image/x-pict",
".pict" => "image/pict",
".pkg" => "application/octet-stream",
".pki" => "application/pkixcmp",
".pkipath" => "application/pkix-pkipath",
".pl" => "text/x-script.perl",
".plb" => "application/vnd.3gpp.pic-bw-large",
".plc" => "application/vnd.mobius.plc",
".plf" => "application/vnd.pocketlearn",
".pls" => "application/pls+xml",
".pm" => "text/x-script.perl-module",
".pml" => "application/vnd.ctc-posml",
".png" => "image/png",
".pnm" => "image/x-portable-anymap",
".pntg" => "image/x-macpaint",
".portpkg" => "application/vnd.macports.portpkg",
".ppd" => "application/vnd.cups-ppd",
".ppm" => "image/x-portable-pixmap",
".pps" => "application/vnd.ms-powerpoint",
".ppt" => "application/vnd.ms-powerpoint",
".prc" => "application/vnd.palm",
".pre" => "application/vnd.lotus-freelance",
".prf" => "application/pics-rules",
".ps" => "application/postscript",
".psb" => "application/vnd.3gpp.pic-bw-small",
".psd" => "image/vnd.adobe.photoshop",
".ptid" => "application/vnd.pvi.ptid1",
".pub" => "application/x-mspublisher",
".pvb" => "application/vnd.3gpp.pic-bw-var",
".pwn" => "application/vnd.3m.post-it-notes",
".py" => "text/x-script.python",
".pya" => "audio/vnd.ms-playready.media.pya",
".pyv" => "video/vnd.ms-playready.media.pyv",
".qam" => "application/vnd.epson.quickanime",
".qbo" => "application/vnd.intu.qbo",
".qfx" => "application/vnd.intu.qfx",
".qps" => "application/vnd.publishare-delta-tree",
".qt" => "video/quicktime",
".qtif" => "image/x-quicktime",
".qxd" => "application/vnd.quark.quarkxpress",
".ra" => "audio/x-pn-realaudio",
".rake" => "text/x-script.ruby",
".ram" => "audio/x-pn-realaudio",
".rar" => "application/x-rar-compressed",
".ras" => "image/x-cmu-raster",
".rb" => "text/x-script.ruby",
".rcprofile" => "application/vnd.ipunplugged.rcprofile",
".rdf" => "application/rdf+xml",
".rdz" => "application/vnd.data-vision.rdz",
".rep" => "application/vnd.businessobjects",
".rgb" => "image/x-rgb",
".rif" => "application/reginfo+xml",
".rl" => "application/resource-lists+xml",
".rlc" => "image/vnd.fujixerox.edmics-rlc",
".rld" => "application/resource-lists-diff+xml",
".rm" => "application/vnd.rn-realmedia",
".rmp" => "audio/x-pn-realaudio-plugin",
".rms" => "application/vnd.jcp.javame.midlet-rms",
".rnc" => "application/relax-ng-compact-syntax",
".roff" => "text/troff",
".rpm" => "application/x-redhat-package-manager",
".rpss" => "application/vnd.nokia.radio-presets",
".rpst" => "application/vnd.nokia.radio-preset",
".rq" => "application/sparql-query",
".rs" => "application/rls-services+xml",
".rsd" => "application/rsd+xml",
".rss" => "application/rss+xml",
".rtf" => "application/rtf",
".rtx" => "text/richtext",
".ru" => "text/x-script.ruby",
".s" => "text/x-asm",
".saf" => "application/vnd.yamaha.smaf-audio",
".sbml" => "application/sbml+xml",
".sc" => "application/vnd.ibm.secure-container",
".scd" => "application/x-msschedule",
".scm" => "application/vnd.lotus-screencam",
".scq" => "application/scvp-cv-request",
".scs" => "application/scvp-cv-response",
".sdkm" => "application/vnd.solent.sdkm+xml",
".sdp" => "application/sdp",
".see" => "application/vnd.seemail",
".sema" => "application/vnd.sema",
".semd" => "application/vnd.semd",
".semf" => "application/vnd.semf",
".setpay" => "application/set-payment-initiation",
".setreg" => "application/set-registration-initiation",
".sfd" => "application/vnd.hydrostatix.sof-data",
".sfs" => "application/vnd.spotfire.sfs",
".sgm" => "text/sgml",
".sgml" => "text/sgml",
".sh" => "application/x-sh",
".shar" => "application/x-shar",
".shf" => "application/shf+xml",
".sig" => "application/pgp-signature",
".sit" => "application/x-stuffit",
".sitx" => "application/x-stuffitx",
".skp" => "application/vnd.koan",
".slt" => "application/vnd.epson.salt",
".smi" => "application/smil+xml",
".snd" => "audio/basic",
".so" => "application/octet-stream",
".spf" => "application/vnd.yamaha.smaf-phrase",
".spl" => "application/x-futuresplash",
".spot" => "text/vnd.in3d.spot",
".spp" => "application/scvp-vp-response",
".spq" => "application/scvp-vp-request",
".src" => "application/x-wais-source",
".srx" => "application/sparql-results+xml",
".sse" => "application/vnd.kodak-descriptor",
".ssf" => "application/vnd.epson.ssf",
".ssml" => "application/ssml+xml",
".stf" => "application/vnd.wt.stf",
".stk" => "application/hyperstudio",
".str" => "application/vnd.pg.format",
".sus" => "application/vnd.sus-calendar",
".sv4cpio" => "application/x-sv4cpio",
".sv4crc" => "application/x-sv4crc",
".svd" => "application/vnd.svd",
".svg" => "image/svg+xml",
".svgz" => "image/svg+xml",
".swf" => "application/x-shockwave-flash",
".swi" => "application/vnd.arastra.swi",
".t" => "text/troff",
".tao" => "application/vnd.tao.intent-module-archive",
".tar" => "application/x-tar",
".tbz" => "application/x-bzip-compressed-tar",
".tcap" => "application/vnd.3gpp2.tcap",
".tcl" => "application/x-tcl",
".tex" => "application/x-tex",
".texi" => "application/x-texinfo",
".texinfo" => "application/x-texinfo",
".text" => "text/plain",
".tif" => "image/tiff",
".tiff" => "image/tiff",
".tmo" => "application/vnd.tmobile-livetv",
".torrent" => "application/x-bittorrent",
".tpl" => "application/vnd.groove-tool-template",
".tpt" => "application/vnd.trid.tpt",
".tr" => "text/troff",
".tra" => "application/vnd.trueapp",
".trm" => "application/x-msterminal",
".tsv" => "text/tab-separated-values",
".ttf" => "application/octet-stream",
".twd" => "application/vnd.simtech-mindmapper",
".txd" => "application/vnd.genomatix.tuxedo",
".txf" => "application/vnd.mobius.txf",
".txt" => "text/plain",
".ufd" => "application/vnd.ufdl",
".umj" => "application/vnd.umajin",
".unityweb" => "application/vnd.unity",
".uoml" => "application/vnd.uoml+xml",
".uri" => "text/uri-list",
".ustar" => "application/x-ustar",
".utz" => "application/vnd.uiq.theme",
".uu" => "text/x-uuencode",
".vcd" => "application/x-cdlink",
".vcf" => "text/x-vcard",
".vcg" => "application/vnd.groove-vcard",
".vcs" => "text/x-vcalendar",
".vcx" => "application/vnd.vcx",
".vis" => "application/vnd.visionary",
".viv" => "video/vnd.vivo",
".vrml" => "model/vrml",
".vsd" => "application/vnd.visio",
".vsf" => "application/vnd.vsf",
".vtu" => "model/vnd.vtu",
".vxml" => "application/voicexml+xml",
".war" => "application/java-archive",
".wav" => "audio/x-wav",
".wax" => "audio/x-ms-wax",
".wbmp" => "image/vnd.wap.wbmp",
".wbs" => "application/vnd.criticaltools.wbs+xml",
".wbxml" => "application/vnd.wap.wbxml",
".webm" => "video/webm",
".wm" => "video/x-ms-wm",
".wma" => "audio/x-ms-wma",
".wmd" => "application/x-ms-wmd",
".wmf" => "application/x-msmetafile",
".wml" => "text/vnd.wap.wml",
".wmlc" => "application/vnd.wap.wmlc",
".wmls" => "text/vnd.wap.wmlscript",
".wmlsc" => "application/vnd.wap.wmlscriptc",
".wmv" => "video/x-ms-wmv",
".wmx" => "video/x-ms-wmx",
".wmz" => "application/x-ms-wmz",
".woff" => "application/octet-stream",
".wpd" => "application/vnd.wordperfect",
".wpl" => "application/vnd.ms-wpl",
".wps" => "application/vnd.ms-works",
".wqd" => "application/vnd.wqd",
".wri" => "application/x-mswrite",
".wrl" => "model/vrml",
".wsdl" => "application/wsdl+xml",
".wspolicy" => "application/wspolicy+xml",
".wtb" => "application/vnd.webturbo",
".wvx" => "video/x-ms-wvx",
".x3d" => "application/vnd.hzn-3d-crossword",
".xar" => "application/vnd.xara",
".xbd" => "application/vnd.fujixerox.docuworks.binder",
".xbm" => "image/x-xbitmap",
".xdm" => "application/vnd.syncml.dm+xml",
".xdp" => "application/vnd.adobe.xdp+xml",
".xdw" => "application/vnd.fujixerox.docuworks",
".xenc" => "application/xenc+xml",
".xer" => "application/patch-ops-error+xml",
".xfdf" => "application/vnd.adobe.xfdf",
".xfdl" => "application/vnd.xfdl",
".xhtml" => "application/xhtml+xml",
".xif" => "image/vnd.xiff",
".xls" => "application/vnd.ms-excel",
".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
".xml" => "application/xml",
".xo" => "application/vnd.olpc-sugar",
".xop" => "application/xop+xml",
".xpm" => "image/x-xpixmap",
".xpr" => "application/vnd.is-xpr",
".xps" => "application/vnd.ms-xpsdocument",
".xpw" => "application/vnd.intercon.formnet",
".xsl" => "application/xml",
".xslt" => "application/xslt+xml",
".xsm" => "application/vnd.syncml+xml",
".xspf" => "application/xspf+xml",
".xul" => "application/vnd.mozilla.xul+xml",
".xwd" => "image/x-xwindowdump",
".xyz" => "chemical/x-xyz",
".yaml" => "text/yaml",
".yml" => "text/yaml",
".zaz" => "application/vnd.zzazz.deck+xml",
".zip" => "application/zip",
".zmm" => "application/vnd.handheld-entertainment+xml",
}
end
end
| {
"pile_set_name": "Github"
} |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// The pure virtual class for send side loss detection algorithm.
#ifndef NET_QUIC_CONGESTION_CONTROL_LOSS_DETECTION_INTERFACE_H_
#define NET_QUIC_CONGESTION_CONTROL_LOSS_DETECTION_INTERFACE_H_
#include "net/quic/core/congestion_control/send_algorithm_interface.h"
#include "net/quic/core/quic_protocol.h"
#include "net/quic/core/quic_time.h"
namespace net {
class QuicUnackedPacketMap;
class RttStats;
class NET_EXPORT_PRIVATE LossDetectionInterface {
public:
virtual ~LossDetectionInterface() {}
virtual LossDetectionType GetLossDetectionType() const = 0;
// Called when a new ack arrives or the loss alarm fires.
virtual void DetectLosses(
const QuicUnackedPacketMap& unacked_packets,
QuicTime time,
const RttStats& rtt_stats,
QuicPacketNumber largest_newly_acked,
SendAlgorithmInterface::CongestionVector* packets_lost) = 0;
// Get the time the LossDetectionAlgorithm wants to re-evaluate losses.
// Returns QuicTime::Zero if no alarm needs to be set.
virtual QuicTime GetLossTimeout() const = 0;
// Called when a |spurious_retransmission| is detected. The original
// transmission must have been caused by DetectLosses.
virtual void SpuriousRetransmitDetected(
const QuicUnackedPacketMap& unacked_packets,
QuicTime time,
const RttStats& rtt_stats,
QuicPacketNumber spurious_retransmission) = 0;
};
} // namespace net
#endif // NET_QUIC_CONGESTION_CONTROL_LOSS_DETECTION_INTERFACE_H_
| {
"pile_set_name": "Github"
} |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:output method="html" indent="yes"/>
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:key name="files" match="file" use="@name" />
<!-- Checkstyle XML Style Sheet by Stephane Bailliez <[email protected]> -->
<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
<!-- Usage (generates checkstyle_report.html): -->
<!-- <checkstyle failonviolation="false" config="${check.config}"> -->
<!-- <fileset dir="${src.dir}" includes="**/*.java"/> -->
<!-- <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/> -->
<!-- </checkstyle> -->
<!-- <style basedir="${doc.dir}" destdir="${doc.dir}" -->
<!-- includes="checkstyle_report.xml" -->
<!-- style="${doc.dir}/checkstyle-noframes-sorted.xsl"/> -->
<xsl:template match="checkstyle">
<html>
<head>
<style type="text/css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin-left: 10;
margin-right: 10;
font:normal 80% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
font-weight:bold;
background: #ccc;
color: black;
}
table, th, td {
font-size:100%;
border: none
}
table.log tr td, tr th {
}
h2 {
font-weight:bold;
font-size:140%;
margin-bottom: 5;
}
h3 {
font-size:100%;
font-weight:bold;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</style>
</head>
<body>
<a name="top"></a>
<!-- jakarta logo -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bannercell" rowspan="2">
<!--a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a-->
</td>
<td class="text-align:right"><h2>CheckStyle Audit</h2></td>
</tr>
<tr>
<td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
<!-- Summary part -->
<xsl:apply-templates select="." mode="summary"/>
<hr size="1" width="100%" align="left"/>
<!-- Package List part -->
<xsl:apply-templates select="." mode="filelist"/>
<hr size="1" width="100%" align="left"/>
<!-- For each package create its part -->
<xsl:apply-templates select="file[@name and generate-id(.) = generate-id(key('files', @name))]" />
<hr size="1" width="100%" align="left"/>
</body>
</html>
</xsl:template>
<xsl:template match="checkstyle" mode="filelist">
<h3>Files</h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Name</th>
<th>Errors</th>
</tr>
<xsl:for-each select="file[@name and generate-id(.) = generate-id(key('files', @name))]">
<xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error)"/>
<xsl:variable name="errorCount" select="count(error)"/>
<tr>
<xsl:call-template name="alternated-row"/>
<td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="file">
<a name="f-{@name}"></a>
<h3>File <xsl:value-of select="@name"/></h3>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Error Description</th>
<th>Line</th>
</tr>
<xsl:for-each select="key('files', @name)/error">
<xsl:sort data-type="number" order="ascending" select="@line"/>
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="@message"/></td>
<td><xsl:value-of select="@line"/></td>
</tr>
</xsl:for-each>
</table>
<a href="#top">Back to top</a>
</xsl:template>
<xsl:template match="checkstyle" mode="summary">
<h3>Summary</h3>
<xsl:variable name="fileCount" select="count(file[@name and generate-id(.) = generate-id(key('files', @name))])"/>
<xsl:variable name="errorCount" select="count(file/error)"/>
<table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
<tr>
<th>Files</th>
<th>Errors</th>
</tr>
<tr>
<xsl:call-template name="alternated-row"/>
<td><xsl:value-of select="$fileCount"/></td>
<td><xsl:value-of select="$errorCount"/></td>
</tr>
</table>
</xsl:template>
<xsl:template name="alternated-row">
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
| {
"pile_set_name": "Github"
} |
#pragma once
#include "../Common/Platforms.h"
#include "../Common/ConstantBufferMacros.h"
CONSTANT_BUFFER(ezDownscaleDepthConstants, 3)
{
FLOAT2(PixelSize);
BOOL1(LinearizeDepth);
}; | {
"pile_set_name": "Github"
} |
// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
// You may push code into the target .java compilation unit if you wish to edit any member(s).
package nl.bzk.brp.model.web;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import nl.bzk.brp.model.data.kern.Bron;
import nl.bzk.brp.model.data.kern.Doc;
import nl.bzk.brp.model.data.kern.HisDoc;
import nl.bzk.brp.model.data.kern.Partij;
import nl.bzk.brp.model.data.kern.Srtdoc;
import nl.bzk.brp.model.web.DocController;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.util.UriUtils;
import org.springframework.web.util.WebUtils;
privileged aspect DocController_Roo_Controller {
@RequestMapping(method = RequestMethod.POST, produces = "text/html")
public String DocController.create(@Valid Doc doc, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
populateEditForm(uiModel, doc);
return "docs/create";
}
uiModel.asMap().clear();
doc.persist();
return "redirect:/docs/" + encodeUrlPathSegment(doc.getId().toString(), httpServletRequest);
}
@RequestMapping(params = "form", produces = "text/html")
public String DocController.createForm(Model uiModel) {
populateEditForm(uiModel, new Doc());
return "docs/create";
}
@RequestMapping(value = "/{id}", produces = "text/html")
public String DocController.show(@PathVariable("id") Long id, Model uiModel) {
uiModel.addAttribute("doc", Doc.findDoc(id));
uiModel.addAttribute("itemId", id);
return "docs/show";
}
@RequestMapping(produces = "text/html")
public String DocController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
if (page != null || size != null) {
int sizeNo = size == null ? 10 : size.intValue();
final int firstResult = page == null ? 0 : (page.intValue() - 1) * sizeNo;
uiModel.addAttribute("docs", Doc.findDocEntries(firstResult, sizeNo));
float nrOfPages = (float) Doc.countDocs() / sizeNo;
uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
} else {
uiModel.addAttribute("docs", Doc.findAllDocs());
}
return "docs/list";
}
@RequestMapping(method = RequestMethod.PUT, produces = "text/html")
public String DocController.update(@Valid Doc doc, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
populateEditForm(uiModel, doc);
return "docs/update";
}
uiModel.asMap().clear();
doc.merge();
return "redirect:/docs/" + encodeUrlPathSegment(doc.getId().toString(), httpServletRequest);
}
@RequestMapping(value = "/{id}", params = "form", produces = "text/html")
public String DocController.updateForm(@PathVariable("id") Long id, Model uiModel) {
populateEditForm(uiModel, Doc.findDoc(id));
return "docs/update";
}
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "text/html")
public String DocController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
Doc doc = Doc.findDoc(id);
doc.remove();
uiModel.asMap().clear();
uiModel.addAttribute("page", (page == null) ? "1" : page.toString());
uiModel.addAttribute("size", (size == null) ? "10" : size.toString());
return "redirect:/docs";
}
void DocController.populateEditForm(Model uiModel, Doc doc) {
uiModel.addAttribute("doc", doc);
uiModel.addAttribute("brons", Bron.findAllBrons());
uiModel.addAttribute("hisdocs", HisDoc.findAllHisDocs());
uiModel.addAttribute("partijs", Partij.findAllPartijs());
uiModel.addAttribute("srtdocs", Srtdoc.findAllSrtdocs());
}
String DocController.encodeUrlPathSegment(String pathSegment, HttpServletRequest httpServletRequest) {
String enc = httpServletRequest.getCharacterEncoding();
if (enc == null) {
enc = WebUtils.DEFAULT_CHARACTER_ENCODING;
}
try {
pathSegment = UriUtils.encodePathSegment(pathSegment, enc);
} catch (UnsupportedEncodingException uee) {}
return pathSegment;
}
}
| {
"pile_set_name": "Github"
} |
package it.eng.spagobi.api.v2;
import it.eng.spagobi.api.AbstractSpagoBIResource;
import it.eng.spagobi.services.rest.annotations.ManageAuthorization;
import it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.log4j.Logger;
import org.json.JSONObject;
/**
* @author Radmila Selakovic ([email protected]) service that
* authenticate user
*
*/
@Path("/2.0/autenticateUser")
@ManageAuthorization
public class OAuth2Resource extends AbstractSpagoBIResource {
static protected Logger logger = Logger.getLogger(OAuth2Resource.class);
@GET
@Path("/")
@Produces(MediaType.APPLICATION_JSON + "; charset=UTF-8")
public Response authencticateUser() {
try {
return Response.ok((new JSONObject()).toString()).build();
} catch (Exception e) {
String errorString = "User cannot be authenticated";
logger.error(errorString, e);
throw new SpagoBIRuntimeException(errorString, e);
} finally {
logger.debug("OUT");
}
}
}
| {
"pile_set_name": "Github"
} |
24600: Ideograph dào
24601: Idéogramme
24602: Idéogramme
24603: Idéogramme lì
24604:
24605: Idéogramme un très jeune enfant CJK : yá
24606: Idéogramme yá
24607: Ideograph zhān
24608:
24609:
2460A: Idéogramme
2460B: Idéogramme
2460C: Idéogramme qī
2460D:
2460E:
2460F:
24610:
24611:
24612:
24613: Idéogramme
24614: Idéogramme hù
24615:
24616: Idéogramme
24617:
24618: Idéogramme bovins, animaux domestiques CJC : hau2 : kǒu
24619:
2461A:
2461B: Idéogramme
2461C: Idéogramme vous
2461D: Idéogramme fèn
2461E:
2461F: Idéogramme nu
24620: Idéogramme tiàn
24621: Idéogramme jin
24622: Idéogramme
24623: Idéogramme chén
24624: Idéogramme pì
24625:
24626: Idéogramme jiè
24627: Idéogramme guǐ
24628:
24629:
2462A: Idéogramme daan1
2462B:
2462C:
2462D:
2462E:
2462F:
24630:
24631:
24632: Idéogramme zhuang
24633:
24634:
24635: Idéogramme hú
24636: Idéogramme chǒu
24637: Idéogramme shù
24638: Idéogramme tao
24639: Idéogramme
2463A: Idéogramme
2463B: Idéogramme
2463C:
2463D: Idéogramme hou
2463E: Idéogramme pēng
2463F:
24640:
24641:
24642:
24643:
24644:
24645: Idéogramme bài
24646:
24647: Idéogramme xiá
24648:
24649:
2464A:
2464B: Idéogramme qǐn
2464C: Idéogramme n
2464D:
2464E: Idéogramme tao
2464F: Idéogramme qù
24650:
24651:
24652: Idéogramme xié
24653:
24654: Ideograph zhào
24655: Idéogramme
24656: Idéogramme xîn
24657:
24658: Idéogramme shōu
24659:
2465A:
2465B: Idéogramme
2465C:
2465D: Idéogramme
2465E: Idéogramme bì
2465F: Idéogramme chū
24660:
24661: Idéogramme xīng
24662:
24663: Idéogramme xîn
24664: Idéogramme fū
24665: Idéogramme hak1
24666:
24667:
24668:
24669: Idéogramme jiè
2466A:
2466B:
2466C:
2466D: Idéogramme
2466E: Idéogramme
2466F:
24670: Idéogramme
24671: Idéogramme
24672:
24673:
24674: Idéogramme (Cant) gore CJK : caau1 : cho
24675: Idéogramme choui
24676:
24677:
24678:
24679:
2467A:
2467B:
2467C: Idéogramme
2467D: Idéogramme hou
2467E: Idéogramme
2467F:
24680: Idéogramme cǎi
24681:
24682:
24683:
24684:
24685: Idéogramme mú
24686: Idéogramme
24687: Idéogramme
24688:
24689: Idéogramme xū
2468A: Idéogramme dié
2468B:
2468C:
2468D: Idéogramme chǎn
2468E: Idéogramme yú
2468F: Idéogramme zhòng
24690:
24691:
24692:
24693: Idéogramme
24694: Idéogramme shōu
24695:
24696:
24697: Idéogramme syun1
24698:
24699:
2469A: Idéogramme dú
2469B:
2469C: Idéogramme ma
2469D: Idéogramme
2469E:
2469F: Idéogramme
246A0:
246A1: Idéogramme dù
246A2: Idéogramme
246A3: Idéogramme shēng
246A4: Idéogramme
246A5:
246A6: Idéogramme
246A7: Idéogramme
246A8: Idéogramme zhēn
246A9: Idéogramme qín
246AA: Idéogramme pì
246AB: Idéogramme
246AC: Idéogramme
246AD: Idéogramme
246AE:
246AF: Idéogramme xiù
246B0: Idéogramme bas
246B1: Idéogramme
246B2:
246B3:
246B4:
246B5: Idéogramme bù
246B6:
246B7:
246B8:
246B9:
246BA:
246BB:
246BC: Idéogramme
246BD: Idéogramme bó
246BE:
246BF:
246C0:
246C1: Idéogramme wèn
246C2:
246C3:
246C4: Idéogramme jì
246C5:
246C6:
246C7: Idéogramme
246C8:
246C9:
246CA: Idéogramme
246CB:
246CC:
246CD: Idéogramme
246CE: Idéogramme mn
246CF: Idéogramme cǔ
246D0: Idéogramme
246D1: Idéogramme
246D2:
246D3:
246D4: Idéogramme ma6
246D5:
246D6: Idéogramme peut
246D7: Idéogramme kè
246D8: Idéogramme
246D9: Idéogramme
246DA: Idéogramme
246DB: Idéogramme duǒ
246DC: Idéogramme jiāng
246DD: Ideograph sù
246DE: Idéogramme
246DF:
246E0: Idéogramme
246E1:
246E2: Idéogramme
246E3: Idéogramme
246E4:
246E5: Idéogramme
246E6: Idéogramme jué
246E7: Idéogramme xún
246E8:
246E9:
246EA: Idéogramme xiòng
246EB:
246EC: Idéogramme mì
246ED: Idéogramme qún
246EE: Idéogramme
246EF:
246F0:
246F1: Idéogramme zh
246F2: Idéogramme wěi
246F3:
246F4:
246F5:
246F6:
246F7: Idéogramme
246F8:
246F9:
246FA:
246FB: Idéogramme
246FC:
246FD:
246FE:
246FF:
| {
"pile_set_name": "Github"
} |
################################################################################
### Copyright (C) 2014-2017 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
### published by the Free Software Foundation.
###
### 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 St, Fifth Floor, Boston, MA 02110-1301 USA
################################################################################
bin_PROGRAMS = vmware-vgauth-smoketest
vmware_vgauth_smoketest_SOURCES =
vmware_vgauth_smoketest_SOURCES += main.c
vmware_vgauth_smoketest_CPPFLAGS =
vmware_vgauth_smoketest_CPPFLAGS += -DVMTOOLS_USE_GLIB
vmware_vgauth_smoketest_CPPFLAGS += @GLIB2_CPPFLAGS@
vmware_vgauth_smoketest_CPPFLAGS += -I$(top_srcdir)/libvmtools
vmware_vgauth_smoketest_CPPFLAGS += -I$(top_srcdir)/vgauth/public
vmware_vgauth_smoketest_CPPFLAGS += -I$(top_srcdir)/vgauth/common
vmware_vgauth_smoketest_LDADD =
vmware_vgauth_smoketest_LDADD += @VMTOOLS_LIBS@
vmware_vgauth_smoketest_LDADD += @GLIB2_LIBS@
vmware_vgauth_smoketest_LDADD += @GTHREAD_LIBS@
vmware_vgauth_smoketest_LDADD += @SSL_LIBS@
vmware_vgauth_smoketest_LDADD += ../lib/libvgauth.la
if HAVE_ICU
vmware_vgauth_smoketest_LDADD += @ICU_LIBS@
vmware_vgauth_smoketest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXX) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
else
vmware_vgauth_smoketest_LINK = $(LINK)
endif
| {
"pile_set_name": "Github"
} |
<?php
namespace TypiCMS\Modules\Galleries\Repositories;
use TypiCMS\Repositories\RepositoryInterface;
interface GalleryInterface extends RepositoryInterface
{
/**
* Get all items name
*
* @return array with names
*/
public function getNames();
/**
* Delete model and attached files
*
* @return boolean
*/
public function delete($model);
}
| {
"pile_set_name": "Github"
} |
package org.pointstone.cugappplat.baseadapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import org.pointstone.cugappplat.util.LogUtil;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
/**
* 项目名称: TestChat
* 创建人: 陈锦军
* 创建时间: 2017/3/25 14:38
* QQ: 1981367757
*/
public class BaseWrappedViewHolder extends RecyclerView.ViewHolder {
private Set<Integer> mClickableItemIds;
private Set<Integer> mNestIds;
private Set<Integer> mLongClickableItemIds;
private SparseArray<View> views;
public View itemView;
public BaseWrappedViewHolder(View itemView) {
super(itemView);
this.itemView = itemView;
mClickableItemIds = new HashSet<>();
mNestIds = new HashSet<>();
mLongClickableItemIds = new HashSet<>();
views = new SparseArray<>();
}
public Context getContext() {
return itemView.getContext();
}
public Set<Integer> getClickableItemIds() {
return mClickableItemIds;
}
public Set<Integer> getNestIds() {
return mNestIds;
}
public Set<Integer> getLongClickableItemIds() {
return mLongClickableItemIds;
}
public BaseWrappedViewHolder setVisible(int layoutId, boolean isVisible) {
getView(layoutId).setVisibility(isVisible ? View.VISIBLE : View.GONE);
return this;
}
/**
* 这个设置不是直接给view主体设置事件监听,如果是自定义的ViewGroup,请使用
* 针对view主体注册监听事件
*
* @param id id
* @return
*/
public BaseWrappedViewHolder setOnClickListener(int id) {
mClickableItemIds.add(id);
return this;
}
/**
* 直接给view主题设置事件监听
*
* @param id
* @param onClickListener
* @return
*/
public BaseWrappedViewHolder setOnClickListener(int id, View.OnClickListener onClickListener) {
getView(id).setOnClickListener(onClickListener);
return this;
}
public View getView(int id) {
View view = views.get(id);
if (view == null) {
view = itemView.findViewById(id);
views.put(id, view);
}
return view;
}
public BaseWrappedViewHolder setText(int id, CharSequence content) {
((TextView) getView(id)).setText(content);
return this;
}
public BaseWrappedViewHolder setImageUrl(int id, String url) {
if (getView(id) instanceof ImageView) {
Glide.with(itemView.getContext()).load(url).into((ImageView) getView(id));
}
return this;
}
public BaseWrappedViewHolder setImageUrl(int id, File file) {
if (file.exists()) {
Glide.with(itemView.getContext()).load(file).into((ImageView) getView(id));
}
return this;
}
public BaseWrappedViewHolder setImageResource(int id, int resId) {
if (getView(id) instanceof ImageView) {
((ImageView) getView(id)).setImageResource(resId);
}
return this;
}
public BaseWrappedViewHolder setImageBg(final int id, String url) {
if (getView(id) instanceof ImageView) {
Glide.with(itemView.getContext()).load(url).into(new SimpleTarget<GlideDrawable>() {
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> glideAnimation) {
LogUtil.e("设置背景");
getView(id).setBackground(resource);
}
});
}
return this;
}
}
| {
"pile_set_name": "Github"
} |
<template lang="pug">
zi-more(text="show more" text-up="show less")
</template>
<script>
export default {
name: 'ex-more-basic',
}
</script>
| {
"pile_set_name": "Github"
} |
'use strict';
var GetIntrinsic = require('../GetIntrinsic');
var $Date = GetIntrinsic('%Date%');
var $Number = GetIntrinsic('%Number%');
var $abs = GetIntrinsic('%Math.abs%');
var $isFinite = require('../helpers/isFinite');
var ToNumber = require('./ToNumber');
// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.14
module.exports = function TimeClip(time) {
if (!$isFinite(time) || $abs(time) > 8.64e15) {
return NaN;
}
return $Number(new $Date(ToNumber(time)));
};
| {
"pile_set_name": "Github"
} |
//
// Posts.swift
// BattleBuddy
//
// Created by Mike on 7/13/19.
// Copyright © 2019 Veritas. All rights reserved.
//
import UIKit
final class BallisticsPost: PostConfiguration {
var title: String? = Localized("ballistics")
var elements: [PostElement] {
return [
PostElementImage(image: UIImage(named: "card_hero_ballistics")!, height: 200.0),
PostElementHeader(localizedTitle: Localized("ballistics_title"), authorName: "Veritas", publishDate: Date(timeIntervalSince1970: 1563025929)),
PostElementYouTube(videoId: "Gv02lcptroo", height: 260.0),
PostElementBody(body: "ballistics_body_1".local()),
PostElementBody(body: "ballistics_body_2".local()),
PostElementImage(image: UIImage(named: "card_hero_armor")!, height: 200.0),
PostElementBodyTitle(title: "ballistics_body_2_1_title".local()),
PostElementBody(body: "ballistics_body_2_1".local()),
PostElementBodyTitle(title: "ballistics_body_2_2_title".local()),
PostElementBody(body: "ballistics_body_2_2_1".local()),
PostElementYouTube(videoId: "3KbFMHp4NOE", height: 260.0),
PostElementBody(body: "ballistics_body_2_2_2".local()),
PostElementBody(body: "ballistics_body_2_2_3".local()),
PostElementImage(image: UIImage(named: "ballistics_post_1")!, height: 200.0),
PostElementBodyTitle(title: "ballistics_body_2_3_title".local()),
PostElementBody(body: "ballistics_body_2_3".local()),
PostElementBodyTitle(title: "ballistics_body_2_4_title".local()),
PostElementBody(body: "ballistics_body_2_4".local()),
PostElementBodyTitle(title: "ballistics_body_2_5_title".local()),
PostElementBody(body: "ballistics_body_2_5".local()),
PostElementYouTube(videoId: "XDK-aLkGvkA", height: 260.0),
PostElementBodyTitle(title: "ballistics_body_3_title".local()),
PostElementBody(body: "ballistics_body_3".local()),
]
}
}
//enum JsonPostKey: String, CaseIterable {
// case contents = "contents"
// case author = "author"
// case subtitle = "subtitle"
// case timestamp = "timestamp"
// case header = "header"
// case image = "image"
// case body = "body"
//}
//
//struct NewsPost {
// let title: String
// let author: String
// let timestamp: Double
// let body: String
//
//
// init(json: [String: Any]) {
// title = ""
// }
//}
//
//struct NewsElement {
//
//}
//
//final class JsonPost: PostConfiguration {
// var title: String?
// var jsonPostElements : [PostElement] = []
//
// init(newsPosts: [NewsPost]) {
// var postElements: [PostElement] = []
//
// for post in newsPosts {
//
// }
//
// jsonPostElements = postElements
// }
//
// var elements: [PostElement] { return jsonPostElements }
//}
final class BudPost: PostConfiguration {
var title: String? = Localized("bud_points")
var elements: [PostElement] {
return [
PostElementImage(image: UIImage(named: "card_hero_bud_points")!, height: 200.0),
PostElementHeader(localizedTitle: "bud_how_to_title".local(), authorName: "Veritas", publishDate: Date(timeIntervalSince1970: 1570131801)),
PostElementBody(body: "bud_how_to_subtitle".local()),
PostElementBodyTitle(title: "bud_how_to_title_1".local()),
PostElementBody(body: "bud_how_to_body_1".local()),
PostElementImage(image: UIImage(named: "bud_1")!, height: 200.0),
PostElementBodyTitle(title: "bud_how_to_title_2".local()),
PostElementBody(body: "bud_how_to_body_2".local()),
PostElementImage(image: UIImage(named: "bud_2")!, height: 200.0),
// PostElementBodyTitle(title: "bud_how_to_title_3".local()),
// PostElementBody(body: "bud_how_to_body_3".local()),
// PostElementImage(image: UIImage(named: "bud_3")!, height: 200.0),
PostElementBodyTitle(title: "bud_how_to_title_4".local()),
PostElementBody(body: "bud_how_to_body_4".local()),
]
}
}
final class SoundLocalizationPost: PostConfiguration {
var title: String? = "sound_training".local()
var elements: [PostElement] {
return [
PostElementImage(image: UIImage(named: "card_hero_sound_training")!, height: 200.0),
PostElementHeader(localizedTitle: "sound_localization_info_title".local(), authorName: "Veritas", publishDate: Date(timeIntervalSince1970: 1571151087)),
PostElementNote(note: "sound_localization_info_note_1".local()),
PostElementBody(body: "sound_localization_info_body_1".local()),
PostElementYouTube(videoId: "EszSnWldA0I", height: 260.0),
PostElementBodyTitle(title: "sound_localization_info_subtitle_2".local()),
PostElementBody(body: "sound_localization_info_body_2".local()),
PostElementBodyTitle(title: "sound_localization_info_subtitle_3".local()),
PostElementBody(body: "sound_localization_info_body_3".local()),
PostElementImage(image: UIImage(named: "sound_1")!, height: 200.0),
PostElementBody(body: "sound_localization_info_body_4".local()),
]
}
}
final class UpcomingFeaturesPost: PostConfiguration {
var title: String? = "upcoming_features".local()
var elements: [PostElement] {
return [
PostElementImage(image: UIImage(named: "upcoming_hero")!, height: 300.0),
PostElementHeader(localizedTitle: "coming_soon".local(), authorName: "Veritas", publishDate: Date(timeIntervalSince1970: 1566640516)),
PostElementBody(body: "upcoming_body_1".local()),
]
}
}
// TODO: v1.2?
final class TraderPost: PostConfiguration {
var title: String?
var trader: Trader
let fbManager = DependencyManagerImpl.shared.firebaseManager
init(_ trader: Trader) {
self.trader = trader
title = trader.local()
}
var elements: [PostElement] {
return [
PostElementImage(image: trader.heroImage(), height: 300.0),
PostElementSubHeader(localizedTitle: Localized("trader_ll1")),
PostElementSubHeader(localizedTitle: Localized("trader_ll2")),
PostElementSubHeader(localizedTitle: Localized("trader_ll3")),
PostElementSubHeader(localizedTitle: Localized("trader_ll4"))
]
}
}
// TODO: v1.2?
final class HealthAndStatusEffectsPost: PostConfiguration {
var title: String? = Localized("health")
var elements: [PostElement] {
let heroImage = UIImage(named: "card_hero_health")!
let imageElement = PostElementImage(image: heroImage, height: 300.0)
let publishDate = Date(timeIntervalSince1970: 1564606381)
let headerElement = PostElementHeader(localizedTitle: Localized("health_title"), authorName: "Veritas", publishDate: publishDate)
let bodyElement1 = PostElementBody(body: Localized("health_body_1"))
return [imageElement, headerElement, bodyElement1]
}
}
| {
"pile_set_name": "Github"
} |
<h1>
Evolution of the number of products on Open Food Facts -
<country_name>
</h1>
<p>Open Food Facts publicly launched on May 19th 2012 (the site opened for the first beta testers in early 2012). The database contained then 648 products.</p>
<p id="description">This graph shows the evolution of the number of food products listed in the Open Food Facts database and the number of products with complete information (photos and data).</p>
<p>You can help us by adding products (with the <a href="https://apps.apple.com/app/open-food-facts/id588797948">iPhone</a>,
<a href="https://play.google.com/store/apps/details?id=org.openfoodfacts.scanner&hl=en">Android</a>
and <a href="https://www.microsoft.com/p/openfoodfacts/9nblggh0dkqr">Windows Phone</a> apps), but also by completing the
<a href="https://world-en.openfoodfacts.org/state/to-be-completed">product pages to be completed</a> using the photos sent by other contributors.
</p>
<p>Thank you very much!</p>
<!-- Please change cc by your country code -->
[[texts/products_stats_<cc>.html]]
| {
"pile_set_name": "Github"
} |
" Use vim-themis to execute this test
let s:V = vital#vital#new()
let s:F = s:V.import('System.File')
Describe System.Cache
let s:C = s:V.import('System.Cache')
Context .new({name}, ...)
It should return an instance of System.Cache.Dummy if 'dummy' is specified.
let ret = s:C.new('dummy')
Assert Equals(ret.__name__, 'dummy')
End
It should return an instance of System.Cache.Memory if 'memory' is specified.
let ret = s:C.new('memory')
Assert Equals(ret.__name__, 'memory')
End
It should raise an exception if 'cache_dir' option is not specified.
Throw call s:C.new('file'), 'No "cache_dir" option is specified'
End
It should return an instance of System.Cache.File if 'file' and 'cache_dir' option is specified.
let cache_dir = tempname()
let ret = s:C.new('file', { 'cache_dir': cache_dir })
Assert Equals(ret.__name__, 'file')
silent! call s:F.rmdir(cache_dir, 'r')
End
End
End
| {
"pile_set_name": "Github"
} |
<?php
$expected = array('$t',
'$t',
'$t',
);
$expected_not = array('$s',
'$r',
);
?> | {
"pile_set_name": "Github"
} |
# AUTOGENERATED FILE
FROM balenalib/jetson-nano-fedora:28-run
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
RUN dnf install -y \
python3-pip \
python3-dbus \
&& dnf clean all
# install "virtualenv", since the vast majority of users of this image will want it
RUN pip3 install -U --no-cache-dir --ignore-installed pip setuptools \
&& pip3 install --no-cache-dir virtualenv
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'As of January 1st, 2020, Python 2 was end-of-life, we will change the latest tag for Balenalib Python base image to Python 3.x and drop support for Python 2 soon. So after 1st July, 2020, all the balenalib Python latest tag will point to the latest Python 3 version and no changes, or fixes will be made to balenalib Python 2 base image. If you are using Python 2 for your application, please upgrade to Python 3 before 1st July.' > /.balena/messages/python-deprecation-warnin
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/[email protected]" \
&& echo "Running test-stack@python" \
&& chmod +x [email protected] \
&& bash [email protected] \
&& rm -rf [email protected]
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Fedora 28 \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.8.5, Pip v20.1.1, Setuptools v49.1.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info
RUN echo $'#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& cp /bin/sh /bin/sh.real \
&& mv /bin/sh-shim /bin/sh | {
"pile_set_name": "Github"
} |
<?php
/**
* Base include file for SimpleTest
* @package SimpleTest
* @subpackage WebTester
* @version $Id: page.php 1938 2009-08-05 17:16:23Z dgheath $
*/
/**#@+
* include other SimpleTest class files
*/
require_once(dirname(__FILE__) . '/http.php');
require_once(dirname(__FILE__) . '/php_parser.php');
require_once(dirname(__FILE__) . '/tag.php');
require_once(dirname(__FILE__) . '/form.php');
require_once(dirname(__FILE__) . '/selector.php');
/**#@-*/
/**
* A wrapper for a web page.
* @package SimpleTest
* @subpackage WebTester
*/
class SimplePage {
private $links = array();
private $title = false;
private $last_widget;
private $label;
private $forms = array();
private $frames = array();
private $transport_error;
private $raw;
private $text = false;
private $sent;
private $headers;
private $method;
private $url;
private $base = false;
private $request_data;
/**
* Parses a page ready to access it's contents.
* @param SimpleHttpResponse $response Result of HTTP fetch.
* @access public
*/
function __construct($response = false) {
if ($response) {
$this->extractResponse($response);
} else {
$this->noResponse();
}
}
/**
* Extracts all of the response information.
* @param SimpleHttpResponse $response Response being parsed.
* @access private
*/
protected function extractResponse($response) {
$this->transport_error = $response->getError();
$this->raw = $response->getContent();
$this->sent = $response->getSent();
$this->headers = $response->getHeaders();
$this->method = $response->getMethod();
$this->url = $response->getUrl();
$this->request_data = $response->getRequestData();
}
/**
* Sets up a missing response.
* @access private
*/
protected function noResponse() {
$this->transport_error = 'No page fetched yet';
$this->raw = false;
$this->sent = false;
$this->headers = false;
$this->method = 'GET';
$this->url = false;
$this->request_data = false;
}
/**
* Original request as bytes sent down the wire.
* @return mixed Sent content.
* @access public
*/
function getRequest() {
return $this->sent;
}
/**
* Accessor for raw text of page.
* @return string Raw unparsed content.
* @access public
*/
function getRaw() {
return $this->raw;
}
/**
* Accessor for plain text of page as a text browser
* would see it.
* @return string Plain text of page.
* @access public
*/
function getText() {
if (! $this->text) {
$this->text = SimplePage::normalise($this->raw);
}
return $this->text;
}
/**
* Accessor for raw headers of page.
* @return string Header block as text.
* @access public
*/
function getHeaders() {
if ($this->headers) {
return $this->headers->getRaw();
}
return false;
}
/**
* Original request method.
* @return string GET, POST or HEAD.
* @access public
*/
function getMethod() {
return $this->method;
}
/**
* Original resource name.
* @return SimpleUrl Current url.
* @access public
*/
function getUrl() {
return $this->url;
}
/**
* Base URL if set via BASE tag page url otherwise
* @return SimpleUrl Base url.
* @access public
*/
function getBaseUrl() {
return $this->base;
}
/**
* Original request data.
* @return mixed Sent content.
* @access public
*/
function getRequestData() {
return $this->request_data;
}
/**
* Accessor for last error.
* @return string Error from last response.
* @access public
*/
function getTransportError() {
return $this->transport_error;
}
/**
* Accessor for current MIME type.
* @return string MIME type as string; e.g. 'text/html'
* @access public
*/
function getMimeType() {
if ($this->headers) {
return $this->headers->getMimeType();
}
return false;
}
/**
* Accessor for HTTP response code.
* @return integer HTTP response code received.
* @access public
*/
function getResponseCode() {
if ($this->headers) {
return $this->headers->getResponseCode();
}
return false;
}
/**
* Accessor for last Authentication type. Only valid
* straight after a challenge (401).
* @return string Description of challenge type.
* @access public
*/
function getAuthentication() {
if ($this->headers) {
return $this->headers->getAuthentication();
}
return false;
}
/**
* Accessor for last Authentication realm. Only valid
* straight after a challenge (401).
* @return string Name of security realm.
* @access public
*/
function getRealm() {
if ($this->headers) {
return $this->headers->getRealm();
}
return false;
}
/**
* Accessor for current frame focus. Will be
* false as no frames.
* @return array Always empty.
* @access public
*/
function getFrameFocus() {
return array();
}
/**
* Sets the focus by index. The integer index starts from 1.
* @param integer $choice Chosen frame.
* @return boolean Always false.
* @access public
*/
function setFrameFocusByIndex($choice) {
return false;
}
/**
* Sets the focus by name. Always fails for a leaf page.
* @param string $name Chosen frame.
* @return boolean False as no frames.
* @access public
*/
function setFrameFocus($name) {
return false;
}
/**
* Clears the frame focus. Does nothing for a leaf page.
* @access public
*/
function clearFrameFocus() {
}
/**
* TODO: write docs
*/
function setFrames($frames) {
$this->frames = $frames;
}
/**
* Test to see if link is an absolute one.
* @param string $url Url to test.
* @return boolean True if absolute.
* @access protected
*/
protected function linkIsAbsolute($url) {
$parsed = new SimpleUrl($url);
return (boolean)($parsed->getScheme() && $parsed->getHost());
}
/**
* Adds a link to the page.
* @param SimpleAnchorTag $tag Link to accept.
*/
function addLink($tag) {
$this->links[] = $tag;
}
/**
* Set the forms
* @param array $forms An array of SimpleForm objects
*/
function setForms($forms) {
$this->forms = $forms;
}
/**
* Test for the presence of a frameset.
* @return boolean True if frameset.
* @access public
*/
function hasFrames() {
return count($this->frames) > 0;
}
/**
* Accessor for frame name and source URL for every frame that
* will need to be loaded. Immediate children only.
* @return boolean/array False if no frameset or
* otherwise a hash of frame URLs.
* The key is either a numerical
* base one index or the name attribute.
* @access public
*/
function getFrameset() {
if (! $this->hasFrames()) {
return false;
}
$urls = array();
for ($i = 0; $i < count($this->frames); $i++) {
$name = $this->frames[$i]->getAttribute('name');
$url = new SimpleUrl($this->frames[$i]->getAttribute('src'));
$urls[$name ? $name : $i + 1] = $this->expandUrl($url);
}
return $urls;
}
/**
* Fetches a list of loaded frames.
* @return array/string Just the URL for a single page.
* @access public
*/
function getFrames() {
$url = $this->expandUrl($this->getUrl());
return $url->asString();
}
/**
* Accessor for a list of all links.
* @return array List of urls with scheme of
* http or https and hostname.
* @access public
*/
function getUrls() {
$all = array();
foreach ($this->links as $link) {
$url = $this->getUrlFromLink($link);
$all[] = $url->asString();
}
return $all;
}
/**
* Accessor for URLs by the link label. Label will match
* regardess of whitespace issues and case.
* @param string $label Text of link.
* @return array List of links with that label.
* @access public
*/
function getUrlsByLabel($label) {
$matches = array();
foreach ($this->links as $link) {
if ($link->getText() == $label) {
$matches[] = $this->getUrlFromLink($link);
}
}
return $matches;
}
/**
* Accessor for a URL by the id attribute.
* @param string $id Id attribute of link.
* @return SimpleUrl URL with that id of false if none.
* @access public
*/
function getUrlById($id) {
foreach ($this->links as $link) {
if ($link->getAttribute('id') === (string)$id) {
return $this->getUrlFromLink($link);
}
}
return false;
}
/**
* Converts a link tag into a target URL.
* @param SimpleAnchor $link Parsed link.
* @return SimpleUrl URL with frame target if any.
* @access private
*/
protected function getUrlFromLink($link) {
$url = $this->expandUrl($link->getHref());
if ($link->getAttribute('target')) {
$url->setTarget($link->getAttribute('target'));
}
return $url;
}
/**
* Expands expandomatic URLs into fully qualified
* URLs.
* @param SimpleUrl $url Relative URL.
* @return SimpleUrl Absolute URL.
* @access public
*/
function expandUrl($url) {
if (! is_object($url)) {
$url = new SimpleUrl($url);
}
$location = $this->getBaseUrl() ? $this->getBaseUrl() : new SimpleUrl();
return $url->makeAbsolute($location->makeAbsolute($this->getUrl()));
}
/**
* Sets the base url for the page.
* @param string $url Base URL for page.
*/
function setBase($url) {
$this->base = new SimpleUrl($url);
}
/**
* Sets the title tag contents.
* @param SimpleTitleTag $tag Title of page.
*/
function setTitle($tag) {
$this->title = $tag;
}
/**
* Accessor for parsed title.
* @return string Title or false if no title is present.
* @access public
*/
function getTitle() {
if ($this->title) {
return $this->title->getText();
}
return false;
}
/**
* Finds a held form by button label. Will only
* search correctly built forms.
* @param SimpleSelector $selector Button finder.
* @return SimpleForm Form object containing
* the button.
* @access public
*/
function getFormBySubmit($selector) {
for ($i = 0; $i < count($this->forms); $i++) {
if ($this->forms[$i]->hasSubmit($selector)) {
return $this->forms[$i];
}
}
return null;
}
/**
* Finds a held form by image using a selector.
* Will only search correctly built forms.
* @param SimpleSelector $selector Image finder.
* @return SimpleForm Form object containing
* the image.
* @access public
*/
function getFormByImage($selector) {
for ($i = 0; $i < count($this->forms); $i++) {
if ($this->forms[$i]->hasImage($selector)) {
return $this->forms[$i];
}
}
return null;
}
/**
* Finds a held form by the form ID. A way of
* identifying a specific form when we have control
* of the HTML code.
* @param string $id Form label.
* @return SimpleForm Form object containing the matching ID.
* @access public
*/
function getFormById($id) {
for ($i = 0; $i < count($this->forms); $i++) {
if ($this->forms[$i]->getId() == $id) {
return $this->forms[$i];
}
}
return null;
}
/**
* Sets a field on each form in which the field is
* available.
* @param SimpleSelector $selector Field finder.
* @param string $value Value to set field to.
* @return boolean True if value is valid.
* @access public
*/
function setField($selector, $value, $position=false) {
$is_set = false;
for ($i = 0; $i < count($this->forms); $i++) {
if ($this->forms[$i]->setField($selector, $value, $position)) {
$is_set = true;
}
}
return $is_set;
}
/**
* Accessor for a form element value within a page.
* @param SimpleSelector $selector Field finder.
* @return string/boolean A string if the field is
* present, false if unchecked
* and null if missing.
* @access public
*/
function getField($selector) {
for ($i = 0; $i < count($this->forms); $i++) {
$value = $this->forms[$i]->getValue($selector);
if (isset($value)) {
return $value;
}
}
return null;
}
/**
* Turns HTML into text browser visible text. Images
* are converted to their alt text and tags are supressed.
* Entities are converted to their visible representation.
* @param string $html HTML to convert.
* @return string Plain text.
* @access public
*/
static function normalise($html) {
$text = preg_replace('#<!--.*?-->#si', '', $html);
$text = preg_replace('#<(script|option|textarea)[^>]*>.*?</\1>#si', '', $text);
$text = preg_replace('#<img[^>]*alt\s*=\s*("([^"]*)"|\'([^\']*)\'|([a-zA-Z_]+))[^>]*>#', ' \2\3\4 ', $text);
$text = preg_replace('#<[^>]*>#', '', $text);
$text = html_entity_decode($text, ENT_QUOTES);
$text = preg_replace('#\s+#', ' ', $text);
return trim(trim($text), "\xA0"); // TODO: The \xAO is a . Add a test for this.
}
}
?> | {
"pile_set_name": "Github"
} |
#include <clc/clc.h>
#include "relational.h"
//Note: It would be nice to use __builtin_isgreater with vector inputs, but it seems to only take scalar values as
// input, which will produce incorrect output for vector input types.
_CLC_DEFINE_RELATIONAL_BINARY(int, isgreater, __builtin_isgreater, float, float)
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
// The scalar version of isgreater(double, double) returns an int, but the vector versions
// return long.
_CLC_DEF _CLC_OVERLOAD int isgreater(double x, double y){
return __builtin_isgreater(x, y);
}
_CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(long, isgreater, double, double)
#endif
#ifdef cl_khr_fp16
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
// The scalar version of isgreater(half, half) returns an int, but the vector versions
// return short.
_CLC_DEF _CLC_OVERLOAD int isgreater(half x, half y){
return __builtin_isgreater(x, y);
}
_CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(short, isgreater, half, half)
#endif
| {
"pile_set_name": "Github"
} |
import * as React from 'react';
import PropTypes from 'prop-types';
import AppBar from '@material-ui/core/AppBar';
import CssBaseline from '@material-ui/core/CssBaseline';
import Divider from '@material-ui/core/Divider';
import Drawer from '@material-ui/core/Drawer';
import Hidden from '@material-ui/core/Hidden';
import IconButton from '@material-ui/core/IconButton';
import InboxIcon from '@material-ui/icons/MoveToInbox';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
import MailIcon from '@material-ui/icons/Mail';
import MenuIcon from '@material-ui/icons/Menu';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import { makeStyles, useTheme } from '@material-ui/core/styles';
const drawerWidth = 240;
const useStyles = makeStyles((theme) => ({
root: {
display: 'flex',
},
drawer: {
[theme.breakpoints.up('sm')]: {
width: drawerWidth,
flexShrink: 0,
},
},
appBar: {
[theme.breakpoints.up('sm')]: {
width: `calc(100% - ${drawerWidth}px)`,
marginLeft: drawerWidth,
},
},
menuButton: {
marginRight: theme.spacing(2),
[theme.breakpoints.up('sm')]: {
display: 'none',
},
},
// necessary for content to be below app bar
toolbar: theme.mixins.toolbar,
drawerPaper: {
width: drawerWidth,
},
content: {
flexGrow: 1,
padding: theme.spacing(3),
},
}));
function ResponsiveDrawer(props) {
const { window } = props;
const classes = useStyles();
const theme = useTheme();
const [mobileOpen, setMobileOpen] = React.useState(false);
const handleDrawerToggle = () => {
setMobileOpen(!mobileOpen);
};
const drawer = (
<div>
<div className={classes.toolbar} />
<Divider />
<List>
{['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => (
<ListItem button key={text}>
<ListItemIcon>
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
</ListItemIcon>
<ListItemText primary={text} />
</ListItem>
))}
</List>
<Divider />
<List>
{['All mail', 'Trash', 'Spam'].map((text, index) => (
<ListItem button key={text}>
<ListItemIcon>
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
</ListItemIcon>
<ListItemText primary={text} />
</ListItem>
))}
</List>
</div>
);
const container =
window !== undefined ? () => window().document.body : undefined;
return (
<div className={classes.root}>
<CssBaseline />
<AppBar position="fixed" className={classes.appBar}>
<Toolbar>
<IconButton
color="inherit"
aria-label="open drawer"
edge="start"
onClick={handleDrawerToggle}
className={classes.menuButton}
>
<MenuIcon />
</IconButton>
<Typography variant="h6" noWrap>
Responsive drawer
</Typography>
</Toolbar>
</AppBar>
<nav className={classes.drawer} aria-label="mailbox folders">
{/* The implementation can be swapped with js to avoid SEO duplication of links. */}
<Hidden smUp implementation="css">
<Drawer
container={container}
variant="temporary"
anchor={theme.direction === 'rtl' ? 'right' : 'left'}
open={mobileOpen}
onClose={handleDrawerToggle}
classes={{
paper: classes.drawerPaper,
}}
ModalProps={{
keepMounted: true, // Better open performance on mobile.
}}
>
{drawer}
</Drawer>
</Hidden>
<Hidden smDown implementation="css">
<Drawer
classes={{
paper: classes.drawerPaper,
}}
variant="permanent"
open
>
{drawer}
</Drawer>
</Hidden>
</nav>
<main className={classes.content}>
<div className={classes.toolbar} />
<Typography paragraph>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Rhoncus
dolor purus non enim praesent elementum facilisis leo vel. Risus at
ultrices mi tempus imperdiet. Semper risus in hendrerit gravida rutrum
quisque non tellus. Convallis convallis tellus id interdum velit
laoreet id donec ultrices. Odio morbi quis commodo odio aenean sed
adipiscing. Amet nisl suscipit adipiscing bibendum est ultricies
integer quis. Cursus euismod quis viverra nibh cras. Metus vulputate
eu scelerisque felis imperdiet proin fermentum leo. Mauris commodo
quis imperdiet massa tincidunt. Cras tincidunt lobortis feugiat
vivamus at augue. At augue eget arcu dictum varius duis at consectetur
lorem. Velit sed ullamcorper morbi tincidunt. Lorem donec massa sapien
faucibus et molestie ac.
</Typography>
<Typography paragraph>
Consequat mauris nunc congue nisi vitae suscipit. Fringilla est
ullamcorper eget nulla facilisi etiam dignissim diam. Pulvinar
elementum integer enim neque volutpat ac tincidunt. Ornare suspendisse
sed nisi lacus sed viverra tellus. Purus sit amet volutpat consequat
mauris. Elementum eu facilisis sed odio morbi. Euismod lacinia at quis
risus sed vulputate odio. Morbi tincidunt ornare massa eget egestas
purus viverra accumsan in. In hendrerit gravida rutrum quisque non
tellus orci ac. Pellentesque nec nam aliquam sem et tortor. Habitant
morbi tristique senectus et. Adipiscing elit duis tristique
sollicitudin nibh sit. Ornare aenean euismod elementum nisi quis
eleifend. Commodo viverra maecenas accumsan lacus vel facilisis. Nulla
posuere sollicitudin aliquam ultrices sagittis orci a.
</Typography>
</main>
</div>
);
}
ResponsiveDrawer.propTypes = {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
*/
window: PropTypes.func,
};
export default ResponsiveDrawer;
| {
"pile_set_name": "Github"
} |
// Copyright Jamie Iles, 2017
//
// This file is part of s80x86.
//
// s80x86 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// s80x86 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 s80x86. If not, see <http://www.gnu.org/licenses/>.
#define SHIFT1(alu_func, flags) \
.auto_address; \
alu_func ## d0_d1_reg: \
a_sel RA, b_sel IMMEDIATE, immediate 0x1, alu_op alu_func, \
rd_sel_source MODRM_RM_REG, update_flags flags, \
width WAUTO, next_instruction; \
alu_func ## d0_d1_mem: \
segment DS, mem_read, width WAUTO; \
width WAUTO, a_sel MDR, b_sel IMMEDIATE, immediate 0x1, alu_op alu_func, \
mdr_write, update_flags flags, segment DS, jmp write_complete;
// Variable shifts first write the number of shifts into the temporary
// register, then when processing, the ALU will perform a subtraction of the
// count (which is an input to the ALU), and output the decremented value
// along with a single bit-shifted value, stalling until complete. The
// temporary register needs to be written each cycle, as does the result.
#define SHIFTN(alu_func, flags) \
alu_func ## d2_d3: \
ra_modrm_rm_reg, b_sel RB, alu_op SELB, tmp_wr_en, width WAUTO, \
segment DS, jmp_rm_reg_mem alu_func ## d2_d3_reg; \
alu_func ## d2_d3_reg: \
a_sel RA, b_sel RB, alu_op alu_func, rd_sel_source MODRM_RM_REG, \
update_flags flags, width WAUTO, tmp_wr_sel Q_HIGH, \
tmp_wr_en, next_instruction, ra_modrm_rm_reg; \
alu_func ## d2_d3_mem: \
segment DS, mem_read, width WAUTO, rb_cl; \
width WAUTO, a_sel MDR, b_sel RB, alu_op alu_func, mdr_write, \
update_flags flags, segment DS, tmp_wr_sel Q_HIGH, tmp_wr_en, \
jmp write_complete;
#define SHIFTN_IMM8(alu_func, flags) \
alu_func ## c0_reg: \
a_sel RA, b_sel IMMEDIATE, alu_op alu_func, rd_sel_source MODRM_RM_REG, \
update_flags flags, width WAUTO, tmp_wr_sel Q_HIGH, \
tmp_wr_en, next_instruction, ra_modrm_rm_reg; \
alu_func ## c0_mem: \
segment DS, mem_read, width WAUTO; \
width WAUTO, a_sel MDR, b_sel IMMEDIATE, alu_op alu_func, mdr_write, \
update_flags flags, segment DS, tmp_wr_sel Q_HIGH, tmp_wr_en, \
jmp write_complete;
#define SHIFTN_IMM16(alu_func, flags) \
alu_func ## c1: \
tmp_wr_en, alu_op SELB, b_sel IMMEDIATE, ra_modrm_rm_reg, segment DS, \
jmp_rm_reg_mem alu_func ## c0_reg;
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:skin="http://schemas.android.com/android/skin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
skin:enable="true">
<ScrollView
android:id="@+id/scrollView2"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:skin="http://schemas.android.com/android/skin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:paddingTop="20dp"
android:text="@string/corepatch" />
<Switch
android:id="@+id/downgrade"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp"
android:background="@color/switchBtn"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:text="@string/downgr" />
<Switch
android:id="@+id/authcreak"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp"
android:background="@color/switchBtn"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:text="@string/authcreak" />
<Switch
android:id="@+id/zipauthcreak"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="10dp"
android:background="@color/switchBtn"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:text="@string/zipauthcreak" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:paddingTop="20dp"
android:text="设置" />
<Switch
android:id="@+id/hideicon"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp"
android:background="@color/switchBtn"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:text="@string/hideicon" />
<View
android:id="@+id/line5"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="5dp"
android:paddingTop="50dp"
android:paddingBottom="20dp"
android:background="#dc484b4b" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:paddingTop="20dp"
android:text="@string/link" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="all"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:paddingTop="20dp"
android:text="@string/blog" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:paddingTop="20dp"
android:text="@string/donta" />
<android.support.v7.widget.AppCompatImageView
android:id="@+id/alipay"
android:layout_width="150dp"
android:layout_height="118dp"
android:layout_gravity="center"
android:maxHeight="150dp"
android:src="@drawable/alipay" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="all"
android:paddingEnd="30dp"
android:paddingStart="30dp"
android:paddingTop="20dp"
android:text="@string/blog2" />
</LinearLayout>
</ScrollView>
</LinearLayout> | {
"pile_set_name": "Github"
} |
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to 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.
*/
class Google_Service_Compute_TargetVpnGatewaysScopedListWarningData extends Google_Model
{
public $key;
public $value;
public function setKey($key)
{
$this->key = $key;
}
public function getKey()
{
return $this->key;
}
public function setValue($value)
{
$this->value = $value;
}
public function getValue()
{
return $this->value;
}
}
| {
"pile_set_name": "Github"
} |
#ifndef _ASM_SWAB_H
#define _ASM_SWAB_H
#include <linux/types.h>
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __SWAB_64_THRU_32__
#endif
#endif /* _ASM_SWAB_H */
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.