text
stringlengths 2
100k
| meta
dict |
---|---|
<resources>
<string name="app_name">Animation</string>
<string name="action_settings">Settings</string>
</resources>
| {
"pile_set_name": "Github"
} |
/**
* Copyright The Apache Software Foundation
*
* 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.
*/
package org.apache.hadoop.hbase.zookeeper;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Map;
import org.apache.hadoop.hbase.master.AssignmentManager;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.zookeeper.ZKTable;
import org.apache.hadoop.hbase.zookeeper.ZKTable.TableState;
import org.apache.zookeeper.KeeperException;
/**
* Non-instantiable class that provides helper functions for
* clients other than {@link AssignmentManager} for reading the
* state of a table in ZK.
*
* <p>Does not cache state like {@link ZKTable}, actually reads from ZK each call.
*/
public class ZKTableReadOnly {
private ZKTableReadOnly() {}
/**
* Go to zookeeper and see if state of table is {@link TableState#DISABLED}.
* This method does not use cache as {@link #isDisabledTable(String)} does.
* This method is for clients other than {@link AssignmentManager}
* @param zkw
* @param tableName
* @return True if table is enabled.
* @throws KeeperException
*/
public static boolean isDisabledTable(final ZooKeeperWatcher zkw,
final String tableName)
throws KeeperException {
TableState state = getTableState(zkw, tableName);
return isTableState(TableState.DISABLED, state);
}
/**
* Go to zookeeper and see if state of table is {@link TableState#ENABLED}.
* @param zkw
* @param tableName
* @return True if table is enabled.
* @throws KeeperException
*/
public static boolean isEnabledTable(final ZooKeeperWatcher zkw,
final String tableName) throws KeeperException {
TableState state = getTableState(zkw, tableName);
// If a table is ENABLED then we are removing table state znode in 0.92
// but in 0.94 we keep it in ENABLED state.
return state == null || state == TableState.ENABLED;
}
/**
* Go to zookeeper and see if state of table is {@link TableState#DISABLING}
* of {@link TableState#DISABLED}.
* @param zkw
* @param tableName
* @return True if table is enabled.
* @throws KeeperException
*/
public static boolean isDisablingOrDisabledTable(final ZooKeeperWatcher zkw,
final String tableName) throws KeeperException {
TableState state = getTableState(zkw, tableName);
return isTableState(TableState.DISABLING, state) ||
isTableState(TableState.DISABLED, state);
}
/**
* Gets a list of all the tables set as disabled in zookeeper.
* @return Set of disabled tables, empty Set if none
* @throws KeeperException
*/
public static Set<String> getDisabledTables(ZooKeeperWatcher zkw)
throws KeeperException {
Set<String> disabledTables = new HashSet<String>();
List<String> children =
ZKUtil.listChildrenNoWatch(zkw, zkw.clientTableZNode);
for (String child: children) {
TableState state = getTableState(zkw, child);
if (state == TableState.DISABLED) disabledTables.add(child);
}
return disabledTables;
}
/**
* Gets a list of all the tables set as disabled in zookeeper.
* @return Map of disabled tables, empty MAP if none
* @throws KeeperException
*/
public static Map<TableState, Set<String>> getDisabledOrDisablingTables(ZooKeeperWatcher zkw)
throws KeeperException {
Map<TableState, Set<String>> disabledTables = new HashMap<TableState, Set<String>>();
List<String> children = ZKUtil.listChildrenNoWatch(zkw, zkw.clientTableZNode);
for (String child : children) {
TableState state = getTableState(zkw, child);
if (state == TableState.DISABLED) {
Set<String> tables = disabledTables.get(state);
if (tables == null) {
tables = new HashSet<String>();
disabledTables.put(TableState.DISABLED, tables);
}
tables.add(child);
continue;
}
if (state == TableState.DISABLING) {
Set<String> tables = disabledTables.get(state);
if (tables == null) {
tables = new HashSet<String>();
disabledTables.put(TableState.DISABLING, tables);
}
tables.add(child);
continue;
}
}
return disabledTables;
}
/**
* Gets a list of all the tables set as enabled or enabling in zookeeper.
* @return Map of enabled tables, empty map if none
* @throws KeeperException
*/
public static Map<TableState, Set<String>> getEnabledOrEnablingTables(ZooKeeperWatcher zkw)
throws KeeperException {
Map<TableState, Set<String>> enabledTables = new HashMap<TableState, Set<String>>();
List<String> children = ZKUtil.listChildrenNoWatch(zkw, zkw.clientTableZNode);
for (String child : children) {
TableState state = getTableState(zkw, child);
if (state == TableState.ENABLED) {
Set<String> tables = enabledTables.get(state);
if (tables == null) {
tables = new HashSet<String>();
enabledTables.put(TableState.ENABLED, tables);
}
tables.add(child);
continue;
}
if (state == TableState.ENABLING) {
Set<String> tables = enabledTables.get(state);
if (tables == null) {
tables = new HashSet<String>();
enabledTables.put(TableState.ENABLING, tables);
}
tables.add(child);
continue;
}
}
return enabledTables;
}
static boolean isTableState(final TableState expectedState,
final TableState currentState) {
return currentState != null && currentState.equals(expectedState);
}
/**
* Read the TableState from ZooKeeper
* @throws KeeperException
*/
static TableState getTableState(final ZooKeeperWatcher zkw,
final String child) throws KeeperException {
return getTableState(zkw, zkw.clientTableZNode, child);
}
/**
* @deprecated Only for 0.92/0.94 compatibility. Use getTableState(zkw, child) instead.
*/
static TableState getTableState(final ZooKeeperWatcher zkw,
final String parent, final String child) throws KeeperException {
String znode = ZKUtil.joinZNode(parent, child);
byte [] data = ZKUtil.getData(zkw, znode);
if (data == null || data.length <= 0) {
return null;
}
String str = Bytes.toString(data);
try {
return TableState.valueOf(str);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(str);
}
}
}
| {
"pile_set_name": "Github"
} |
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
protocol a{protocol A:b}enum S{struct Q{struct Q{enum A{protocol A:d{class A
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2017
*
* 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 org.acra.data;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.text.TextUtils;
import org.acra.ACRAConstants;
import org.acra.ReportField;
import org.acra.collections.ImmutableSet;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONStringer;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Represents possible report formats
*
* @author F43nd1r
* @since 14.11.2017
*/
public enum StringFormat {
JSON("application/json") {
@NonNull
@Override
public String toFormattedString(@NonNull CrashReportData data, @NonNull ImmutableSet<ReportField> order, @NonNull String mainJoiner, @NonNull String subJoiner, boolean urlEncode) throws JSONException {
final Map<String, Object> map = data.toMap();
final JSONStringer stringer = new JSONStringer().object();
for (ReportField field : order) {
stringer.key(field.toString()).value(map.remove(field.toString()));
}
for (Map.Entry<String, Object> entry : map.entrySet()) {
stringer.key(entry.getKey()).value(entry.getValue());
}
return stringer.endObject().toString();
}
},
KEY_VALUE_LIST("application/x-www-form-urlencoded") {
@NonNull
@Override
public String toFormattedString(@NonNull CrashReportData data, @NonNull ImmutableSet<ReportField> order, @NonNull String mainJoiner, @NonNull String subJoiner, boolean urlEncode) throws UnsupportedEncodingException {
final Map<String, String> map = toStringMap(data.toMap(), subJoiner);
final StringBuilder builder = new StringBuilder();
for (ReportField field : order) {
append(builder, field.toString(), map.remove(field.toString()), mainJoiner, urlEncode);
}
for (Map.Entry<String, String> entry : map.entrySet()) {
append(builder, entry.getKey(), entry.getValue(), mainJoiner, urlEncode);
}
return builder.toString();
}
private void append(@NonNull StringBuilder builder, @Nullable String key, @Nullable String value, @Nullable String joiner, boolean urlEncode) throws UnsupportedEncodingException {
if (builder.length() > 0) {
builder.append(joiner);
}
if (urlEncode) {
key = key != null ? URLEncoder.encode(key, ACRAConstants.UTF8) : null;
value = value != null ? URLEncoder.encode(value, ACRAConstants.UTF8) : null;
}
builder.append(key).append('=').append(value);
}
@NonNull
private Map<String, String> toStringMap(@NonNull Map<String, Object> map, @NonNull String joiner) {
final Map<String, String> stringMap = new HashMap<>(map.size());
for (final Map.Entry<String, Object> entry : map.entrySet()) {
stringMap.put(entry.getKey(), valueToString(joiner, entry.getValue()));
}
return stringMap;
}
private String valueToString(@NonNull String joiner, @Nullable Object value) {
if (value instanceof JSONObject) {
return TextUtils.join(joiner, flatten((JSONObject) value));
} else {
return String.valueOf(value);
}
}
@NonNull
private List<String> flatten(@NonNull JSONObject json) {
final List<String> result = new ArrayList<>();
for (final Iterator<String> iterator = json.keys(); iterator.hasNext(); ) {
final String key = iterator.next();
Object value;
try {
value = json.get(key);
} catch (JSONException e) {
value = null;
}
if (value instanceof JSONObject) {
for (String s : flatten((JSONObject) value)) {
result.add(key + "." + s);
}
} else {
result.add(key + "=" + value);
}
}
return result;
}
};
private final String contentType;
StringFormat(@NonNull String contentType) {
this.contentType = contentType;
}
@NonNull
public abstract String toFormattedString(@NonNull CrashReportData data, @NonNull ImmutableSet<ReportField> order, @NonNull String mainJoiner, @NonNull String subJoiner, boolean urlEncode) throws Exception;
@NonNull
public String getMatchingHttpContentType() {
return contentType;
}
}
| {
"pile_set_name": "Github"
} |
// CodeContracts
//
// Copyright (c) Microsoft Corporation
//
// All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define CONTRACTS_FULL
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Research.ClousotRegression;
using System.Diagnostics.Contracts;
namespace IteratorAnalysis {
class ClousotRegressionTestAttribute : Attribute {
}
class LinkedList {
public string Value=null;
public LinkedList Next=null;
public int Random =0;
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=206,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=169,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=103,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=213,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=112,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=117,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=141,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=146,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=151,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=158,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=178,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=183,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=188,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=195,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=52,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=60,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=65,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=72,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=77,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=82,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=89,MethodILOffset=0)]
IEnumerable<string> AllValues1() {
LinkedList cursor = this;
yield return cursor.Value;
while (cursor != null) {
if (cursor.Value == "")
yield return cursor.Value;
else
yield return cursor.Value;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=135,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=142,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=147,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=152,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=159,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.Top,Message="Possibly accessing a field on a null reference 'cursor'",PrimaryILOffset=164,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=169,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=176,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=187,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=97,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=194,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=107,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=112,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=117,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=124,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=49,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=57,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=62,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=69,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=74,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=79,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=86,MethodILOffset=0)]
IEnumerable<string> AllValues2() {
LinkedList cursor = this;
yield return cursor.Value;
while (cursor != null) {
yield return cursor.Value;
cursor = cursor.Next;
yield return cursor.Value;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=126,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=133,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=138,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.Top,Message="Possibly accessing a field on a null reference 'cursor.Next'",PrimaryILOffset=143,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=148,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=88,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=155,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=98,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=103,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=108,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=115,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=40,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=48,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=53,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=60,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=65,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=70,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=77,MethodILOffset=0)]
IEnumerable<string> AllValues3() {
LinkedList cursor = this;
yield return cursor.Value;
while (cursor != null) {
yield return cursor.Value;
cursor = cursor.Next.Next;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=135,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=142,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=147,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=152,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=159,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=170,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=97,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=177,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=107,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=112,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=117,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=124,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=49,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=57,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=62,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=69,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=74,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=79,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=86,MethodILOffset=0)]
IEnumerable<string> AllValues4() {
LinkedList cursor = this;
yield return cursor.Value;
while (cursor != null) {
yield return cursor.Value;
yield return cursor.Value;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=123,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=85,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=130,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=95,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=100,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=105,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=112,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=37,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=45,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=50,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=57,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=62,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=67,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=74,MethodILOffset=0)]
IEnumerable<string> AllValues5() {
LinkedList cursor = this;
yield return cursor.Value;
while (cursor != null) {
yield return cursor.Value;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=104,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=31,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=39,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=44,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=111,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=54,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=59,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.Top,Message="Possibly accessing a field on a null reference 'cursor.Next'",PrimaryILOffset=64,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=69,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=76,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.Top,Message="Possibly accessing a field on a null reference 'cursor'",PrimaryILOffset=81,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=86,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=93,MethodILOffset=0)]
IEnumerable<string> AllValues6() {
LinkedList cursor = this;
while (cursor != null) {
cursor = cursor.Next.Next;
yield return cursor.Value;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=99,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=31,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=39,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=44,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=106,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=54,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=59,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=64,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=71,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=81,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=88,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome = ProofOutcome.Top, Message = @"Possibly accessing a field on a null reference 'cursor'", PrimaryILOffset = 76, MethodILOffset = 0)]
IEnumerable<string> AllValues7() {
LinkedList cursor = this;
while (cursor != null) {
cursor = cursor.Next;
yield return cursor.Value;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=82,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=89,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=94,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=99,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=105,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=31,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=39,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=44,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=54,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=59,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=64,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=71,MethodILOffset=0)]
IEnumerable<string> AllValues8() {
LinkedList cursor = this;
while (true) {
yield return cursor.Value;
cursor = cursor.Next;
if (cursor == null) break;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=82,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=89,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=94,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=99,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=31,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=39,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=44,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=106,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=54,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=59,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=64,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=71,MethodILOffset=0)]
IEnumerable<string> AllValues9() {
LinkedList cursor = this;
while (cursor != null) {
yield return cursor.Value;
cursor = cursor.Next;
}
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=1,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=10,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=88,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=95,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=100,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=105,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=112,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=123,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=37,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=45,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=50,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=130,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=60,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=65,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=70,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as field receiver)",PrimaryILOffset=77,MethodILOffset=0)]
IEnumerable<string> AllValues10() {
LinkedList cursor = this;
while (cursor != null) {
yield return cursor.Value;
yield return cursor.Value;
}
}
}
class Test2 {
public IEnumerable<string> Test1a(string s) {
Contract.Requires(s != null);
//if (s.Length < 0) throw new Exception("");
Contract.Ensures(Contract.Result<IEnumerable<string>>() != null);
Contract.Ensures(Contract.ForAll(Contract.Result<IEnumerable<string>>(), (string s1) => s1 != null));
int[] x = { 1, 2 };
x.First(((int y) => y > 0));
yield return s;
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as receiver)",PrimaryILOffset=20,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as receiver)",PrimaryILOffset=28,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="requires is valid",PrimaryILOffset=55,MethodILOffset=20)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="requires is valid",PrimaryILOffset=55,MethodILOffset=28)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="assert is valid",PrimaryILOffset=41,MethodILOffset=0)]
[RegressionOutcome(Outcome = ProofOutcome.False, Message = @"requires is false: s != null", PrimaryILOffset = 55, MethodILOffset = 49)]
public string Test2a(string s) {
Contract.Requires(s != null);
// Contract.Ensures(Contract.Result<string>() != null);
var strs = Test1a("hello");
strs = Test1a(s);
Contract.Assert(strs != null);
strs = Test1a(null);
return s;
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome = ProofOutcome.False, Message = @"requires is false: s != null", PrimaryILOffset = 63, MethodILOffset = 3)]
public void Test2b(string s) {
Test1b(null);
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome = ProofOutcome.False, Message = @"requires is false: s != null", PrimaryILOffset = 22, MethodILOffset = 3)]
public void Test2c(string s) {
Test1c(null);
}
[ClousotRegressionTestAttribute]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="valid non-null reference (as receiver)",PrimaryILOffset=16,MethodILOffset=0)]
[RegressionOutcome(Outcome=ProofOutcome.True,Message="requires is valid",PrimaryILOffset=59,MethodILOffset=16)]
#if NETFRAMEWORK_4_0
[RegressionOutcome(Outcome=ProofOutcome.True,Message="requires is valid",PrimaryILOffset=39,MethodILOffset=54)]
#else
[RegressionOutcome(Outcome=ProofOutcome.True,Message="requires is valid",PrimaryILOffset=44,MethodILOffset=54)]
#endif
[RegressionOutcome(Outcome = ProofOutcome.Top, Message = @"assert unproven", PrimaryILOffset = 59, MethodILOffset = 0)]
[RegressionOutcome(Outcome = ProofOutcome.False, Message = @"requires is false: input != null", PrimaryILOffset = 59, MethodILOffset = 70)]
#if !NETFRAMEWORK_4_0
[RegressionOutcome(Outcome=ProofOutcome.Top,Message="requires unproven",PrimaryILOffset=22,MethodILOffset=54)]
#else
[RegressionOutcome(Outcome=ProofOutcome.Top,Message="requires unproven: collection != null (collection)",PrimaryILOffset=17,MethodILOffset=54)]
#endif
public void Test2d(IEnumerable<string> s) {
Contract.Requires(s != null);
IEnumerable<string> resultEnum = Test1d(s);
Contract.Assert(Contract.ForAll(resultEnum, (string s1) => s1 != null));
s = null;
Test1d(s);
}
public IEnumerable<string> Test1b(string s) {
if (s == null) throw new Exception("");
Contract.EndContractBlock();
yield return s;
}
public void Test1c(string s) {
if (s == null) throw new Exception("");
Contract.EndContractBlock();
}
//public string s1;
//[ContractInvariantMethod]
//protected void ObjectInvariant() {
// Contract.Invariant(s1 != null);
//}
// iteartor methods with type parameters
public IEnumerable<T> Test1d<T>(IEnumerable<T> input) {
Contract.Requires(input != null);
Contract.Ensures(Contract.ForAll(Contract.Result<IEnumerable<T>>(), (T s1) => s1 != null));
foreach (T t in input)
yield return t;
}
public void Test1e<T>(IEnumerable<T> input) {
Contract.Requires(Contract.ForAll(input, (T s) => s != null));
}
}
}
| {
"pile_set_name": "Github"
} |
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">{{::event.title}}</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li ng-click="setIndex(0)" ng-class="(index==0) ? 'active' : ''">
<a ui-sref="shome">{{event.menu[0].name}}</a>
</li>
<li ng-click="setIndex(1)" ng-class="(index==1) ? 'active' : ''">
<a ui-sref="contact">{{event.menu[1].name}}</a>
</li>
<li><a href="#"> {{event.title}}</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav> | {
"pile_set_name": "Github"
} |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GOOGLE_PROTOBUF_UTIL_CONVERTER_OBJECT_SOURCE_H__
#define GOOGLE_PROTOBUF_UTIL_CONVERTER_OBJECT_SOURCE_H__
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/stringpiece.h>
#include <google/protobuf/stubs/status.h>
namespace google {
namespace protobuf {
namespace util {
namespace converter {
class ObjectWriter;
// An ObjectSource is anything that can write to an ObjectWriter.
// Implementation of this interface typically provide constructors or
// factory methods to create an instance based on some source data, for
// example, a character stream, or protobuf.
//
// Derived classes could be thread-unsafe.
class LIBPROTOBUF_EXPORT ObjectSource {
public:
virtual ~ObjectSource() {}
// Writes to the ObjectWriter
virtual util::Status WriteTo(ObjectWriter* ow) const {
return NamedWriteTo("", ow);
}
// Writes to the ObjectWriter with a custom name for the message.
// This is useful when you chain ObjectSource together by embedding one
// within another.
virtual util::Status NamedWriteTo(StringPiece name,
ObjectWriter* ow) const = 0;
protected:
ObjectSource() {}
private:
// Do not add any data members to this class.
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ObjectSource);
};
} // namespace converter
} // namespace util
} // namespace protobuf
} // namespace google
#endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_OBJECT_SOURCE_H__
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2017 KeePassXC Team <[email protected]>
*
* 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 or (at your option)
* 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 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/>.
*/
#include "AesKdf.h"
#include <QtConcurrent>
#include "format/KeePass2.h"
#include "crypto/CryptoHash.h"
AesKdf::AesKdf()
: Kdf::Kdf(KeePass2::KDF_AES_KDBX4)
{
}
/**
* @param legacyKdbx3 initialize as legacy KDBX3 KDF
*/
AesKdf::AesKdf(bool legacyKdbx3)
: Kdf::Kdf(legacyKdbx3 ? KeePass2::KDF_AES_KDBX3 : KeePass2::KDF_AES_KDBX4)
{
}
bool AesKdf::processParameters(const QVariantMap &p)
{
bool ok;
int rounds = p.value(KeePass2::KDFPARAM_AES_ROUNDS).toInt(&ok);
if (!ok || !setRounds(rounds)) {
return false;
}
QByteArray seed = p.value(KeePass2::KDFPARAM_AES_SEED).toByteArray();
return setSeed(seed);
}
QVariantMap AesKdf::writeParameters()
{
QVariantMap p;
// always write old KDBX3 AES-KDF UUID for compatibility with other applications
p.insert(KeePass2::KDFPARAM_UUID, KeePass2::KDF_AES_KDBX3.toByteArray());
p.insert(KeePass2::KDFPARAM_AES_ROUNDS, static_cast<quint64>(rounds()));
p.insert(KeePass2::KDFPARAM_AES_SEED, seed());
return p;
}
bool AesKdf::transform(const QByteArray& raw, QByteArray& result) const
{
QByteArray resultLeft;
QByteArray resultRight;
QFuture<bool> future = QtConcurrent::run(transformKeyRaw, raw.left(16), m_seed, m_rounds, &resultLeft);
bool rightResult = transformKeyRaw(raw.right(16), m_seed, m_rounds, &resultRight);
bool leftResult = future.result();
if (!rightResult || !leftResult) {
return false;
}
QByteArray transformed;
transformed.append(resultLeft);
transformed.append(resultRight);
result = CryptoHash::hash(transformed, CryptoHash::Sha256);
return true;
}
bool AesKdf::transformKeyRaw(const QByteArray& key, const QByteArray& seed, int rounds, QByteArray* result)
{
QByteArray iv(16, 0);
SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Ecb,
SymmetricCipher::Encrypt);
if (!cipher.init(seed, iv)) {
qWarning("AesKdf::transformKeyRaw: error in SymmetricCipher::init: %s", cipher.errorString().toUtf8().data());
return false;
}
*result = key;
if (!cipher.processInPlace(*result, rounds)) {
qWarning("AesKdf::transformKeyRaw: error in SymmetricCipher::processInPlace: %s",
cipher.errorString().toUtf8().data());
return false;
}
return true;
}
QSharedPointer<Kdf> AesKdf::clone() const
{
return QSharedPointer<AesKdf>::create(*this);
}
int AesKdf::benchmarkImpl(int msec) const
{
QByteArray key = QByteArray(16, '\x7E');
QByteArray seed = QByteArray(32, '\x4B');
QByteArray iv(16, 0);
SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Ecb, SymmetricCipher::Encrypt);
cipher.init(seed, iv);
quint64 rounds = 1000000;
QElapsedTimer timer;
timer.start();
if (!cipher.processInPlace(key, rounds)) {
return -1;
}
return static_cast<int>(rounds * (static_cast<float>(msec) / timer.elapsed()));
}
| {
"pile_set_name": "Github"
} |
within Buildings.ThermalZones.Detailed.Validation.BESTEST.Cases6xx;
model Case630 "Case 620, but with added overhang and sidefins"
extends Buildings.ThermalZones.Detailed.Validation.BESTEST.Cases6xx.Case620(
roo(
datConExtWin(
ove(
each wR=0.0,
each wL=0.0,
each dep=1.0,
each gap=0.5),
sidFin(
each h=0.5,
each dep=1.0,
each gap=0.0))),
staRes(
annualHea(Min=5.050*3.6e9, Max=6.469*3.6e9, Mean=5.783*3.6e9),
annualCoo(Min=-2.129*3.6e9, Max=-3.701*3.6e9, Mean=-2.832*3.6e9),
peakHea(Min=3.592*1000, Max=4.280*1000, Mean=4.006*1000),
peakCoo(Min=-3.072*1000, Max=-4.116*1000, Mean=-3.626*1000)));
annotation (__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/ThermalZones/Detailed/Validation/BESTEST/Cases6xx/Case630.mos"
"Simulate and plot"),
experiment(
StopTime=3.1536e+07,
Interval=3600,
Tolerance=1e-06),
Documentation(info="<html>
<p>
This model is case 630 of the BESTEST validation suite.
Case 630 differs from case 620 in that the
windows on the west and east walls have an overhang and side fins.
</p>
</html>",
revisions="<html>
<ul>
<li>
July 7, 2012, by Kaustubh Phalak:<br/>
Extended from case 620 for side fins and overhang.
</li>
</ul>
</html>"));
end Case630;
| {
"pile_set_name": "Github"
} |
/*
* /MathJax/jax/input/MathML/config.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* 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.
*/
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"2.7.5",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");
| {
"pile_set_name": "Github"
} |
import os
testsetNames = [ "ap", "battig", "esslli" ]
testsetCatNums = [ 13, 10, 6 ]
algNames = [ "PSDVec", "word2vec", "CCA" ]
CLmethods = [ "rbr", "direct", "graph" ]
vclusterPath = "D:\\cluto-2.1.2\\MSWIN-x86_64-openmp\\vcluster.exe"
testsetDir = "./concept categorization"
for CLmethod in CLmethods:
for i, testsetName in enumerate(testsetNames):
for algName in algNames:
vecFilename = testsetDir + "/" + testsetName + "-" + algName + ".vec"
labelFilename = testsetDir + "/" + testsetName + "-" + algName + ".label"
catNum = testsetCatNums[i]
print "%s on %s using %s:" %( algName, testsetName, CLmethod )
stream = os.popen( '%s -rclassfile="%s" -clmethod=%s "%s" %d' %( vclusterPath,
labelFilename, CLmethod, vecFilename, catNum ) )
output = stream.read()
lines = output.split("\n")
for line in lines:
if line.find("way clustering") >= 0:
print line
print
| {
"pile_set_name": "Github"
} |
---
title: NativePtr.toNativeInt<'T> Function (F#)
description: NativePtr.toNativeInt<'T> Function (F#)
keywords: visual f#, f#, functional programming
author: dend
manager: danielfe
ms.date: 05/16/2016
ms.topic: language-reference
ms.prod: visual-studio-dev14
ms.technology: devlang-fsharp
ms.assetid: c00cede6-ae1f-4408-afe8-721cb724c8bb
---
# NativePtr.toNativeInt<'T> Function (F#)
Returns a machine address for a given typed native pointer.
**Namespace/Module Path:** Microsoft.FSharp.NativeInterop.NativePtr
**Assembly:** FSharp.Core (in FSharp.Core.dll)
## Syntax
```fsharp
// Signature:
NativePtr.toNativeInt : nativeptr<'T> -> nativeint (requires unmanaged)
// Usage:
NativePtr.toNativeInt address
```
#### Parameters
*address*
Type: [nativeptr](https://msdn.microsoft.com/library/6e74c8e5-f2ff-4e56-ab05-c337b0618d73)**<'T>**
The input pointer.
## Return Value
The machine address.
## Remarks
This function is named `ToNativeIntInlined` in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.
## Platforms
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
## Version Information
**F# Core Library Versions**
Supported in: 2.0, 4.0, Portable
## See Also
[NativeInterop.NativePtr Module (F#)](NativeInterop.NativePtr-Module-%5BFSharp%5D.md)
[Microsoft.FSharp.NativeInterop Namespace (F#)](Microsoft.FSharp.NativeInterop-Namespace-%5BFSharp%5D.md)
| {
"pile_set_name": "Github"
} |
describe('#targetType', function() {
beforeEach(function() {
$.fn.raty.defaults.path = '../lib/images';
this.el = Helper.create('#el');
this.target = Helper.target('#target');
});
afterEach(function() {
Helper.clear();
});
context('target missing', function() {
it ('throws error', function() {
// given
var that = this;
// when
var lambda = function() { that.el.raty({ target: '#missing' }); };
// then
expect(lambda).toThrow(new Error('Target selector invalid or missing!'));
});
});
context('as *hint', function() {
it ('receives the hint', function() {
// given
this.el.raty({ target: '#' + this.target[0].id, targetType: 'hint' });
var star = this.el.children('img:last');
// when
star.trigger('mouseover');
// then
expect(this.target).toHaveHtml('gorgeous');
});
context('with :cancel', function() {
it ('receives the :cancelHint', function() {
// given
this.el.raty({ cancel: true, target: '#' + this.target[0].id, targetType: 'hint' });
var cancel = this.el.children('.raty-cancel');
// when
cancel.trigger('mouseover');
// then
expect(this.target).toHaveHtml('Cancel this rating!');
});
});
});
context('as *score', function() {
it ('receives the score', function() {
// given
this.el.raty({ target: '#' + this.target[0].id, targetType: 'score' });
var star = this.el.children('img:last');
// when
star.trigger('mouseover');
// then
expect(this.target).toHaveHtml(5);
});
context('with :cancel', function() {
it ('receives the :cancelHint', function() {
// given
this.el.raty({ cancel: true, target: '#' + this.target[0].id, targetType: 'score' });
var cancel = this.el.children('.raty-cancel');
// when
cancel.trigger('mouseover');
// then
expect(this.target).toHaveHtml('Cancel this rating!');
});
});
});
});
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"idiom" : "tv",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
<chapter id="commands">
<title>Bitlbee commands</title>
<command-list/>
<bitlbee-command name="account">
<short-description>IM-account list maintenance</short-description>
<syntax>account [<account id>] <action> [<arguments>]</syntax>
<description>
<para>
Available actions: add, del, list, on, off and set. See <emphasis>help account <action></emphasis> for more information.
</para>
</description>
<bitlbee-command name="add">
<syntax>account add <protocol> <username> [<password>]</syntax>
<description>
<para>
Adds an account on the given server with the specified protocol, username and password to the account list. For a list of supported protocols, use the <emphasis>plugins</emphasis> command. For more information about adding an account, see <emphasis>help account add <protocol></emphasis>.
</para>
<para>
You can omit the password and enter it separately using the IRC /OPER command. This lets you enter your password without your IRC client echoing it on screen or recording it in logs.
</para>
</description>
<bitlbee-command name="jabber">
<syntax>account add jabber <[email protected]> [<password>]</syntax>
<description>
<para>
The handle should be a full handle, including the domain name. You can specify a servername if necessary. Normally BitlBee doesn't need this though, since it's able to find out the server by doing DNS SRV lookups.
</para>
<para>
In previous versions it was also possible to specify port numbers and/or SSL in the server tag. This is deprecated and should now be done using the <emphasis>account set</emphasis> command. This also applies to specifying a resource in the handle (like <emphasis>[email protected]/work</emphasis>).
</para>
</description>
</bitlbee-command>
<bitlbee-command name="twitter">
<syntax>account add twitter <handle></syntax>
<description>
<para>
This module gives you simple access to Twitter and Twitter API compatible services.
</para>
<para>
By default all your Twitter contacts will appear in a new channel called #twitter_yourusername. You can change this behaviour using the <emphasis>mode</emphasis> setting (see <emphasis>help set mode</emphasis>).
</para>
<para>
To send tweets yourself, send them to the twitter_(yourusername) contact, or just write in the groupchat channel if you enabled that option.
</para>
<para>
Since Twitter now requires OAuth authentication, you should not enter your Twitter password into BitlBee. Just type a bogus password. The first time you log in, BitlBee will start OAuth authentication. (See <emphasis>help set oauth</emphasis>.)
</para>
<para>
To use a non-Twitter service, change the <emphasis>base_url</emphasis> setting. For identi.ca, you can simply use <emphasis>account add identica</emphasis>.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="identica">
<syntax>account add identica <handle></syntax>
<description>
<para>
Same protocol as <emphasis>twitter</emphasis>, but defaults to a <emphasis>base_url</emphasis> pointing at identi.ca. It also works with OAuth (so don't specify your password).
</para>
</description>
</bitlbee-command>
</bitlbee-command>
<bitlbee-command name="del">
<syntax>account <account id> del</syntax>
<description>
<para>
This command deletes an account from your account list. You should signoff the account before deleting it.
</para>
<para>
The account ID can be a number/tag (see <emphasis>account list</emphasis>), the protocol name or (part of) the screenname, as long as it matches only one connection.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="on">
<syntax>account [<account id>] on</syntax>
<description>
<para>
This command will try to log into the specified account. If no account is specified, BitlBee will log into all the accounts that have the auto_connect flag set.
</para>
<para>
The account ID can be a number/tag (see <emphasis>account list</emphasis>), the protocol name or (part of) the screenname, as long as it matches only one connection.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="off">
<syntax>account [<account id>] off</syntax>
<description>
<para>
This command disconnects the connection for the specified account. If no account is specified, BitlBee will deactivate all active accounts and cancel all pending reconnects.
</para>
<para>
The account ID can be a number/tag (see <emphasis>account list</emphasis>), the protocol name or (part of) the screenname, as long as it matches only one connection.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="list">
<syntax>account list</syntax>
<description>
<para>
This command gives you a list of all the accounts known by BitlBee.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="set">
<syntax>account <account id> set</syntax>
<syntax>account <account id> set <setting></syntax>
<syntax>account <account id> set <setting> <value></syntax>
<syntax>account <account id> set -del <setting></syntax>
<description>
<para>
This command can be used to change various settings for IM accounts. For all protocols, this command can be used to change the handle or the password BitlBee uses to log in and if it should be logged in automatically. Some protocols have additional settings. You can see the settings available for a connection by typing <emphasis>account <account id> set</emphasis>.
</para>
<para>
For more information about a setting, see <emphasis>help set <setting></emphasis>.
</para>
<para>
The account ID can be a number/tag (see <emphasis>account list</emphasis>), the protocol name or (part of) the screenname, as long as it matches only one connection.
</para>
</description>
</bitlbee-command>
</bitlbee-command>
<bitlbee-command name="channel">
<short-description>Channel list maintenance</short-description>
<syntax>channel [<channel id>] <action> [<arguments>]</syntax>
<description>
<para>
Available actions: del, list, set. See <emphasis>help channel <action></emphasis> for more information.
</para>
<para>
There is no <emphasis>channel add</emphasis> command. To create a new channel, just use the IRC <emphasis>/join</emphasis> command. See also <emphasis>help channels</emphasis> and <emphasis>help groupchats</emphasis>.
</para>
</description>
<bitlbee-command name="del">
<syntax>channel <channel id> del</syntax>
<description>
<para>
Remove a channel and forget all its settings. You can only remove channels you're not currently in, and can't remove the main control channel. (You can, however, leave it.)
</para>
</description>
</bitlbee-command>
<bitlbee-command name="list">
<syntax>channel list</syntax>
<description>
<para>
This command gives you a list of all the channels you configured.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="set">
<syntax>channel [<channel id>] set</syntax>
<syntax>channel [<channel id>] set <setting></syntax>
<syntax>channel [<channel id>] set <setting> <value></syntax>
<syntax>channel [<channel id>] set -del <setting></syntax>
<description>
<para>
This command can be used to change various settings for channels. Different channel types support different settings. You can see the settings available for a channel by typing <emphasis>channel <channel id> set</emphasis>.
</para>
<para>
For more information about a setting, see <emphasis>help set <setting></emphasis>.
</para>
<para>
The channel ID can be a number (see <emphasis>channel list</emphasis>), or (part of) its name, as long as it matches only one channel. If you want to change settings of the current channel, you can omit the channel ID.
</para>
</description>
</bitlbee-command>
</bitlbee-command>
<bitlbee-command name="chat">
<short-description>Chatroom list maintenance</short-description>
<syntax>chat <action> [<arguments>]</syntax>
<description>
<para>
Available actions: add, with, list. See <emphasis>help chat <action></emphasis> for more information.
</para>
</description>
<bitlbee-command name="add">
<syntax>chat add <account id> <room|!index> [<channel>]</syntax>
<description>
<para>
Add a chatroom to the list of chatrooms you're interested in. BitlBee needs this list to map room names to a proper IRC channel name.
</para>
<para>
After adding a room to your list, you can simply use the IRC /join command to enter the room. Also, you can tell BitlBee to automatically join the room when you log in. (<emphasis>channel <channel> set auto_join true</emphasis>)
</para>
<para>
Password-protected rooms work exactly like on IRC, by passing the password as an extra argument to /join.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="list">
<syntax>chat list <account id> [<server>]</syntax>
<description>
<para>
List existing named chatrooms provided by an account. Chats from this list can be referenced from <emphasis>chat add</emphasis> by using the number in the index column after a "!" as a shortcut.
</para>
<para>
The server parameter is optional and currently only used by jabber.
</para>
</description>
<ircexample>
<ircline nick="dx">chat list facebook</ircline>
<ircline pre="1" nick="root">Index Title Topic</ircline>
<ircline pre="1" nick="root"> 1 869891016470949 cool kids club</ircline>
<ircline pre="1" nick="root"> 2 457892181062459 uncool kids club</ircline>
<ircline nick="root">2 facebook chatrooms</ircline>
<ircline nick="dx">chat add facebook !1 #cool-kids-club</ircline>
</ircexample>
</bitlbee-command>
<bitlbee-command name="with">
<syntax>chat with <nickname></syntax>
<description>
<para>
While most <emphasis>chat</emphasis> subcommands are about named chatrooms, this command can be used to open an unnamed groupchat with one or more persons. This command is what <emphasis>/join #nickname</emphasis> used to do in older BitlBee versions.
</para>
<para>
Another way to do this is to join to a new, empty channel with <emphasis>/join #newchannel</emphasis> and invite the first person with <emphasis>/invite nickname</emphasis>
</para>
</description>
</bitlbee-command>
</bitlbee-command>
<bitlbee-command name="add">
<short-description>Add a buddy to your contact list</short-description>
<syntax>add <account id> <handle> [<nick>]</syntax>
<syntax>add -tmp <account id> <handle> [<nick>]</syntax>
<description>
<para>
Adds the given buddy at the specified connection to your buddy list. The account ID can be a number (see <emphasis>account list</emphasis>), the protocol name or (part of) the screenname, as long as it matches only one connection.
</para>
<para>
If you want, you can also tell BitlBee what nick to give the new contact. The -tmp option adds the buddy to the internal BitlBee structures only, not to the real contact list (like done by <emphasis>set handle_unknown add</emphasis>). This allows you to talk to people who are not in your contact list. This normally won't show you any presence notifications.
</para>
<para>
If you use this command in a control channel containing people from only one group, the new contact will be added to that group automatically.
</para>
</description>
<ircexample>
<ircline nick="ctrlsoft">add 3 [email protected] grijp</ircline>
<ircaction nick="grijp" hostmask="[email protected]">has joined <emphasis>&bitlbee</emphasis></ircaction>
</ircexample>
</bitlbee-command>
<bitlbee-command name="info">
<short-description>Request user information</short-description>
<syntax>info <connection> <handle></syntax>
<syntax>info <nick></syntax>
<description>
<para>
Requests IM-network-specific information about the specified user. The amount of information you'll get differs per protocol. For some protocols it'll give you an URL which you can visit with a normal web browser to get the information.
</para>
</description>
<ircexample>
<ircline nick="ctrlsoft">info 0 72696705</ircline>
<ircline nick="root">User info - UIN: 72696705 Nick: Lintux First/Last name: Wilmer van der Gaast E-mail: [email protected]</ircline>
</ircexample>
</bitlbee-command>
<bitlbee-command name="remove">
<short-description>Remove a buddy from your contact list</short-description>
<syntax>remove <nick></syntax>
<description>
<para>
Removes the specified nick from your buddy list.
</para>
</description>
<ircexample>
<ircline nick="ctrlsoft">remove gryp</ircline>
<ircaction nick="gryp" hostmask="[email protected]">has quit <emphasis>[Leaving...]</emphasis></ircaction>
</ircexample>
</bitlbee-command>
<bitlbee-command name="block">
<short-description>Block someone</short-description>
<syntax>block <nick></syntax>
<syntax>block <connection> <handle></syntax>
<syntax>block <connection></syntax>
<description>
<para>
Puts the specified user on your ignore list. Either specify the user's nick when you have him/her in your contact list or a connection number and a user handle.
</para>
<para>
When called with only a connection specification as an argument, the command displays the current block list for that connection.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="allow">
<short-description>Unblock someone</short-description>
<syntax>allow <nick></syntax>
<syntax>allow <connection> <handle></syntax>
<description>
<para>
Reverse of block. Unignores the specified user or user handle on specified connection.
</para>
<para>
When called with only a connection specification as an argument, the command displays the current allow list for that connection.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="otr">
<short-description>Off-the-Record encryption control</short-description>
<syntax>otr <subcommand> [<arguments>]</syntax>
<description>
<para>
Available subcommands: connect, disconnect, reconnect, smp, smpq, trust, info, keygen, and forget. See <emphasis>help otr <subcommand></emphasis> for more information.
</para>
</description>
<bitlbee-command name="connect">
<syntax>otr connect <nick></syntax>
<description>
<para>
Attempts to establish an encrypted connection with the specified user by sending a magic string.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="disconnect">
<syntax>otr disconnect <nick></syntax>
<syntax>otr disconnect *</syntax>
<description>
<para>
Resets the connection with the specified user/all users to cleartext.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="reconnect">
<syntax>otr reconnect <nick></syntax>
<description>
<para>
Breaks and re-establishes the encrypted connection with the specified user. Useful if something got desynced.
</para>
<para>
Equivalent to <emphasis>otr disconnect</emphasis> followed by <emphasis>otr connect</emphasis>.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="smp">
<syntax>otr smp <nick> <secret></syntax>
<description>
<para>
Attempts to authenticate the given user's active fingerprint via the Socialist Millionaires' Protocol.
</para>
<para>
If an SMP challenge has been received from the given user, responds with the specified secret/answer. Otherwise, sends a challenge for the given secret.
</para>
<para>
Note that there are two flavors of SMP challenges: "shared-secret" and "question & answer". This command is used to respond to both of them, or to initiate a shared-secret style exchange. Use the <emphasis>otr smpq</emphasis> command to initiate a "Q&A" session.
</para>
<para>
When responding to a "Q&A" challenge, the local trust value is not altered. Only the <emphasis>asking party</emphasis> sets trust in the case of success. Use <emphasis>otr smpq</emphasis> to pose your challenge. In a shared-secret exchange, both parties set their trust according to the outcome.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="smpq">
<syntax>otr smpq <nick> <question> <answer></syntax>
<description>
<para>
Attempts to authenticate the given user's active fingerprint via the Socialist Millionaires' Protocol, Q&A style.
</para>
<para>
Initiates an SMP session in "question & answer" style. The question is transmitted with the initial SMP packet and used to prompt the other party. You must be confident that only they know the answer. If the protocol succeeds (i.e. they answer correctly), the fingerprint will be trusted. Note that the answer must be entered exactly, case and punctuation count!
</para>
<para>
Note that this style of SMP only affects the trust setting on your side. Expect your opponent to send you their own challenge. Alternatively, if you and the other party have a shared secret, use the <emphasis>otr smp</emphasis> command.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="trust">
<syntax>otr trust <nick> <fp1> <fp2> <fp3> <fp4> <fp5></syntax>
<description>
<para>
Manually affirms trust in the specified fingerprint, given as five blocks of precisely eight (hexadecimal) digits each.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="info">
<syntax>otr info</syntax>
<syntax>otr info <nick></syntax>
<description>
<para>
Shows information about the OTR state. The first form lists our private keys and current OTR contexts. The second form displays information about the connection with a given user, including the list of their known fingerprints.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="keygen">
<syntax>otr keygen <account-no></syntax>
<description>
<para>
Generates a new OTR private key for the given account.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="forget">
<syntax>otr forget <thing> <arguments></syntax>
<description>
<para>
Forgets some part of our OTR userstate. Available things: fingerprint, context, and key. See <emphasis>help otr forget <thing></emphasis> for more information.
</para>
</description>
<bitlbee-command name="fingerprint">
<syntax>otr forget fingerprint <nick> <fingerprint></syntax>
<description>
<para>
Drops the specified fingerprint from the given user's OTR connection context. It is allowed to specify only a (unique) prefix of the desired fingerprint.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="context">
<syntax>otr forget context <nick></syntax>
<description>
<para>
Forgets the entire OTR context associated with the given user. This includes current message and protocol states, as well as any fingerprints for that user.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="key">
<syntax>otr forget key <fingerprint></syntax>
<description>
<para>
Forgets an OTR private key matching the specified fingerprint. It is allowed to specify only a (unique) prefix of the fingerprint.
</para>
</description>
</bitlbee-command>
</bitlbee-command>
</bitlbee-command>
<bitlbee-command name="set">
<short-description>Miscellaneous settings</short-description>
<syntax>set</syntax>
<syntax>set <variable></syntax>
<syntax>set <variable> <value></syntax>
<syntax>set -del <variable></syntax>
<description>
<para>
Without any arguments, this command lists all the set variables. You can also specify a single argument, a variable name, to get that variable's value. To change this value, specify the new value as the second argument. With <emphasis>-del</emphasis> you can reset a setting to its default value.
</para>
<para>
To get more help information about a setting, try:
</para>
</description>
<ircexample>
<ircline nick="ctrlsoft">help set private</ircline>
</ircexample>
</bitlbee-command>
<bitlbee-command name="help">
<short-description>BitlBee help system</short-description>
<syntax>help [subject]</syntax>
<description>
<para>
This command gives you the help information you're reading right now. If you don't give any arguments, it'll give a short help index.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="save">
<short-description>Save your account data</short-description>
<syntax>save</syntax>
<description>
<para>
This command saves all your nicks and accounts immediately. Handy if you have the autosave functionality disabled, or if you don't trust the program's stability... ;-)
</para>
</description>
</bitlbee-command>
<bitlbee-setting name="account" type="string" scope="channel">
<description>
<para>
For control channels with <emphasis>fill_by</emphasis> set to <emphasis>account</emphasis>: Set this setting to the account id (numeric, or part of the username) of the account containing the contacts you want to see in this channel.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="allow_takeover" type="boolean" scope="global">
<default>true</default>
<description>
<para>
When you're already connected to a BitlBee server and you connect (and identify) again, BitlBee will offer to migrate your existing session to the new connection. If for whatever reason you don't want this, you can disable this setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="always_use_nicks" type="boolean" scope="channel">
<default>false</default>
<description>
<para>
Jabber groupchat specific. This setting ensures that the nicks defined by the other members of a groupchat are used, instead of the username part of their JID. This only applies to groupchats where their real JID is known (either "non-anonymous" ones, or "semi-anonymous" from the point of view of the channel moderators)
</para>
<para>
Enabling this may have the side effect of changing the nick of existing contacts, either in your buddy list or in other groupchats. If a contact is in multiple groupchats with different nicks, enabling this setting for all those would result in multiple nick changes when joining, and the order of those changes may vary.
</para>
<para>
Note that manual nick changes done through the <emphasis>rename</emphasis> command always take priority
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="auto_connect" type="boolean" scope="account,global">
<default>true</default>
<description>
<para>
With this option enabled, when you identify BitlBee will automatically connect to your accounts, with this disabled it will not do this.
</para>
<para>
This setting can also be changed for specific accounts using the <emphasis>account set</emphasis> command. (However, these values will be ignored if the global <emphasis>auto_connect</emphasis> setting is disabled!)
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="auto_join" type="boolean" scope="channel">
<default>false</default>
<description>
<para>
With this option enabled, BitlBee will automatically join this channel when you log in.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="auto_reconnect" type="boolean" scope="account,global">
<default>true</default>
<description>
<para>
If an IM-connections breaks, you're supposed to bring it back up yourself. Having BitlBee do this automatically might not always be a good idea, for several reasons. If you want the connections to be restored automatically, you can enable this setting.
</para>
<para>
See also the <emphasis>auto_reconnect_delay</emphasis> setting.
</para>
<para>
This setting can also be changed for specific accounts using the <emphasis>account set</emphasis> command. (However, these values will be ignored if the global <emphasis>auto_reconnect</emphasis> setting is disabled!)
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="auto_reconnect_delay" type="string" scope="global">
<default>5*3<900</default>
<description>
<para>
Tell BitlBee after how many seconds it should attempt to bring a broken IM-connection back up.
</para>
<para>
This can be one integer, for a constant delay. One can also set it to something like "10*10", which means wait for ten seconds on the first reconnect, multiply it by ten on every failure. Once successfully connected, this delay is re-set to the initial value. With < you can give a maximum delay.
</para>
<para>
See also the <emphasis>auto_reconnect</emphasis> setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="auto_reply_timeout" type="integer" scope="account">
<default>10800</default>
<description>
<para>
For Twitter accounts: If you respond to Tweets IRC-style (like "nickname: reply"), this will automatically be converted to the usual Twitter format ("@screenname reply").
</para>
<para>
By default, BitlBee will then also add a reference to that person's most recent Tweet, unless that message is older than the value of this setting in seconds.
</para>
<para>
If you want to disable this feature, just set this to 0. Alternatively, if you want to write a message once that is <emphasis>not</emphasis> a reply, use the Twitter reply syntax (@screenname).
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="away" type="string" scope="account,global">
<description>
<para>
To mark yourself as away, it is recommended to just use <emphasis>/away</emphasis>, like on normal IRC networks. If you want to mark yourself as away on only one IM network, you can use this per-account setting.
</para>
<para>
You can set it to any value and BitlBee will try to map it to the most appropriate away state for every open IM connection, or set it as a free-form away message where possible.
</para>
<para>
Any per-account away setting will override globally set away states. To un-set the setting, use <emphasis>set -del away</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="away_devoice" type="boolean" scope="global">
<default>true</default>
<description>
<para>
With this option enabled, the root user devoices people when they go away (just away, not offline) and gives the voice back when they come back. You might dislike the voice-floods you'll get if your contact list is huge, so this option can be disabled.
</para>
<para>
Replaced with the <emphasis>show_users</emphasis> setting. See <emphasis>help show_users</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="away_reply_timeout" type="integer" scope="global">
<default>3600</default>
<description>
<para>
Most IRC servers send a user's away message every time s/he gets a private message, to inform the sender that they may not get a response immediately. With this setting set to 0, BitlBee will also behave like this.
</para>
<para>
Since not all IRC clients do an excellent job at suppressing these messages, this setting lets BitlBee do it instead. BitlBee will wait this many seconds (or until the away state/message changes) before re-informing you that the person's away.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="base_url" type="string" scope="account">
<default>http://api.twitter.com/1</default>
<description>
<para>
There are more services that understand the Twitter API than just Twitter.com. BitlBee can connect to all Twitter API implementations.
</para>
<para>
For example, set this setting to <emphasis>http://identi.ca/api</emphasis> to use Identi.ca.
</para>
<para>
Keep two things in mind: When not using Twitter, you <emphasis>must</emphasis> also disable the <emphasis>oauth</emphasis> setting as it currently only works with Twitter. If you're still having issues, make sure there is <emphasis>no</emphasis> slash at the end of the URL you enter here.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="carbons" type="boolean" scope="account">
<default>true</default>
<description>
<para>
Jabber specific. "Message carbons" (XEP-0280) is a server feature to get copies of outgoing messages sent from other clients connected to the same account. It's not widely supported by most public XMPP servers (easier if you host your own), but this will probably change in the next few years.
</para>
<para>
This defaults to true, which will enable it if the server supports it, or fail silently if it's not. This setting only exists to allow disabling the feature if anyone considers it undesirable.
</para>
<para>
See also the <emphasis>self_messages</emphasis> setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="charset" type="string" scope="global">
<default>utf-8</default>
<possible-values>you can get a list of all possible values by doing 'iconv -l' in a shell</possible-values>
<description>
<para>
This setting tells BitlBee what your IRC client sends and expects. It should be equal to the charset setting of your IRC client if you want to be able to send and receive non-ASCII text properly.
</para>
<para>
Most systems use UTF-8 these days. On older systems, an iso8859 charset may work better. For example, iso8859-1 is the best choice for most Western countries. You can try to find what works best for you on http://www.unicodecharacter.com/charsets/iso8859.html
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="color_encrypted" type="boolean" scope="global">
<default>true</default>
<description>
<para>
If set to true, BitlBee will color incoming encrypted messages according to their fingerprint trust level: untrusted=red, trusted=green.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="chat_type" type="string" scope="channel">
<default>groupchat</default>
<possible-values>groupchat, room</possible-values>
<description>
<para>
There are two kinds of chat channels: simple groupchats (basically normal IM chats with more than two participants) and names chatrooms, more similar to IRC channels.
</para>
<para>
BitlBee supports both types. With this setting set to <emphasis>groupchat</emphasis> (the default), you can just invite people into the room and start talking.
</para>
<para>
For setting up named chatrooms, it's currently easier to just use the <emphasis>chat add</emphasis> command.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="commands" type="boolean" scope="account">
<default>true</default>
<possible-values>true, false, strict</possible-values>
<description>
<para>
With this setting enabled, you can use some commands in your Twitter channel/query. See <emphasis>help twitter</emphasis> for the list of extra commands available.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="debug" type="boolean" scope="global">
<default>false</default>
<description>
<para>
Some debugging messages can be logged if you wish. They're probably not really useful for you, unless you're doing some development on BitlBee.
</para>
<para>
This feature is not currently used for anything so don't expect this to generate any output.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="default_target" type="string" scope="global">
<default>root</default>
<possible-values>root, last</possible-values>
<description>
<para>
With this value set to <emphasis>root</emphasis>, lines written in a control channel without any nickname in front of them will be interpreted as commands. If you want BitlBee to send those lines to the last person you addressed in that control channel, set this to <emphasis>last</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="display_name" type="string" scope="account">
<description>
<para>
Currently only available for jabber groupchats.
</para>
<para>
For jabber groupchats: this sets the default value of 'nick' for newly created groupchats. There is no way to set an account-wide nick.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="display_namechanges" type="boolean" scope="global">
<default>false</default>
<description>
<para>
With this option enabled, root will inform you when someone in your buddy list changes his/her "friendly name".
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="display_timestamps" type="boolean" scope="global">
<default>true</default>
<description>
<para>
When incoming messages are old (i.e. offline messages and channel backlogs), BitlBee will prepend them with a timestamp. If you find them ugly or useless, you can use this setting to hide them.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="fill_by" type="string" scope="channel">
<default>all</default>
<possible-values>all, group, account, protocol</possible-values>
<description>
<para>
For control channels only: This setting determines which contacts the channel gets populated with.
</para>
<para>
By default, control channels will contain all your contacts. You instead select contacts by buddy group, IM account or IM protocol.
</para>
<para>
Change this setting and the corresponding <emphasis>account</emphasis>/<emphasis>group</emphasis>/<emphasis>protocol</emphasis> setting to set up this selection.
</para>
<para>
With a ! prefix an inverted channel can be created, for example with this setting set to <emphasis>!group</emphasis> you can create a channel with all users <emphasis>not</emphasis> in that group.
</para>
<para>
Note that, when creating a new channel, BitlBee will try to preconfigure the channel for you, based on the channel name. See <emphasis>help channels</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="group" type="string" scope="channel">
<description>
<para>
For control channels with <emphasis>fill_by</emphasis> set to <emphasis>group</emphasis>: Set this setting to the name of the group containing the contacts you want to see in this channel.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="handle_unknown" type="string" scope="account,global">
<default>add_channel</default>
<possible-values>add_private, add_channel, ignore</possible-values>
<description>
<para>
By default, messages from people who aren't in your contact list are shown in a control channel (add_channel) instead of as a private message (add_private)
</para>
<para>
If you prefer to ignore messages from people you don't know, you can set this one to "ignore". "add_private" and "add_channel" are like add, but you can use them to make messages from unknown buddies appear in the channel instead of a query window.
</para>
<para>
This can be set to individual accounts, which is useful to only ignore accounts that are targeted by spammers, without missing messages from legitimate unknown contacts in others. Note that incoming add requests are visible regardless of this setting.
</para>
<note>
<para>
Although these users will appear in your control channel, they aren't added to your real contact list. When you restart BitlBee, these auto-added users will be gone. If you want to keep someone in your list, you have to fixate the add using the <emphasis>add</emphasis> command.
</para>
</note>
</description>
</bitlbee-setting>
<bitlbee-setting name="ignore_auth_requests" type="boolean" scope="account">
<default>false</default>
<description>
<para>
Only supported by OSCAR so far, you can use this setting to ignore ICQ authorization requests, which are hardly used for legitimate (i.e. non-spam) reasons anymore.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="mail_notifications" type="boolean" scope="account">
<default>false</default>
<description>
<para>
Some protocols can notify via IM about new e-mail. If you want these notifications, you can enable this setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="mail_notifications_handle" type="string" scope="account">
<default>empty</default>
<description>
<para>
This setting is available for protocols with e-mail notification functionality. If set to empty all e-mail notifications will go to control channel, if set to some string - this will be the name of a contact who will PRIVMSG you on every new notification.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="message_length" type="integer" scope="account">
<default>280</default>
<description>
<para>
Since Twitter rejects messages longer than 280 characters, BitlBee can count message length and emit a warning instead of waiting for Twitter to reject it.
</para>
<para>
You can change this limit here but this won't disable length checks on Twitter's side. You can also set it to 0 to disable the check in case you believe BitlBee doesn't count the characters correctly.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="stream" type="boolean" scope="account">
<default>true</default>
<description>
<para>
For Twitter accounts, this setting enables use of the Streaming API. This automatically gives you incoming DMs as well.
</para>
<para>
For other Twitter-like services, this setting is not supported.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="target_url_length" type="integer" scope="account">
<default>20</default>
<description>
<para>
Twitter replaces every URL with fixed-length t.co URLs. BitlBee is able to take t.co urls into account when calculating <emphasis>message_length</emphasis> replacing the actual URL length with target_url_length. Setting target_url_length to 0 disables this feature.
</para>
<para>
This setting is disabled for identica accounts by default and will not affect anything other than message safety checks (i.e. Twitter will still replace your URLs with t.co links, even if that makes them longer).
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="mode" type="string" scope="account">
<possible-values>one, many, chat</possible-values>
<default>chat</default>
<description>
<para>
By default, BitlBee will create a separate channel (called #twitter_yourusername) for all your Twitter contacts/messages.
</para>
<para>
If you don't want an extra channel, you can set this setting to "one" (everything will come from one nick, twitter_yourusername), or to "many" (individual nicks for everyone).
</para>
<para>
With modes "chat" and "many", you can send direct messages by /msg'ing your contacts directly. Incoming DMs are only fetched if the "stream" setting is on (default).
</para>
<para>
With modes "many" and "one", you can post tweets by /msg'ing the twitter_yourusername contact. In mode "chat", messages posted in the Twitter channel will also be posted as tweets.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="mobile_is_away" type="boolean" scope="global">
<default>false</default>
<description>
<para>
Most IM networks have a mobile version of their client. People who use these may not be paying that much attention to messages coming in. By enabling this setting, people using mobile clients will always be shown as away.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="nick" type="string" scope="chat">
<description>
<para>
You can use this option to set your nickname in a chatroom. You won't see this nickname yourself, but other people in the room will. By default, BitlBee will use your username as the chatroom nickname.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="nick_format" type="string" scope="account,global">
<default>%-@nick</default>
<description>
<para>
By default, BitlBee tries to derive sensible nicknames for all your contacts from their IM handles. In some cases, IM modules (ICQ for example) will provide a nickname suggestion, which will then be used instead. This setting lets you change this behaviour.
</para>
<para>
Whenever this setting is set for an account, it will be used for all its contacts. If it's not set, the global value will be used.
</para>
<para>
It's easier to describe this setting using a few examples:
</para>
<para>
FB-%full_name will make all nicknames start with "FB-", followed by the person's full name. For example you can set this format for your Facebook account so all Facebook contacts are clearly marked.
</para>
<para>
[%group]%-@nick will make all nicknames start with the group the contact is in between square brackets, followed by the nickname suggestions from the IM module if available, or otherwise the handle. Because of the "-@" part, everything from the first @ will be stripped.
</para>
<para>
See <emphasis>help nick_format</emphasis> for more information.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="nick_source" type="string" scope="account">
<default>handle</default>
<possible-values>handle, full_name, first_name</possible-values>
<description>
<para>
By default, BitlBee generates a nickname for every contact by taking its handle and chopping off everything after the @. In some cases, this gives very inconvenient nicknames. Some servers use internal identifiers, which are often just numbers.
</para>
<para>
With this setting set to <emphasis>full_name</emphasis>, the person's full name is used to generate a nickname. Or if you don't like long nicknames, set this setting to <emphasis>first_name</emphasis> instead and only the first word will be used. Note that the full name can be full of non-ASCII characters which will be stripped off.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="nick_lowercase" type="boolean" scope="global">
<default>true</default>
<description>
<para>
If enabled, all nicknames are turned into lower case.
</para>
<para>
See also the <emphasis>nick_underscores</emphasis> setting. This setting was previously known as <emphasis>lcnicks</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="nick_underscores" type="boolean" scope="global">
<default>true</default>
<description>
<para>
If enabled, spaces in nicknames are turned into underscores instead of being stripped.
</para>
<para>
See also the <emphasis>nick_lowercase</emphasis> setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="oauth" type="boolean" scope="account">
<default>true</default>
<description>
<para>
This enables OAuth authentication for an IM account; right now the Twitter (working for Twitter only) and Jabber (for Google Talk only) module support it.
</para>
<para>
With OAuth enabled, you shouldn't tell BitlBee your account password. Just add your account with a bogus password and type <emphasis>account on</emphasis>. BitlBee will then give you a URL to authenticate with the service. If this succeeds, you will get a PIN code which you can give back to BitlBee to finish the process.
</para>
<para>
The resulting access token will be saved permanently, so you have to do this only once. If for any reason you want to/have to reauthenticate, you can use <emphasis>account set</emphasis> to reset the account password to something random.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="anonymous" type="boolean" scope="account">
<default>false</default>
<description>
<para>
This enables SASL ANONYMOUS login for jabber accounts, as specified by XEP-0175.
</para>
<para>
With this setting enabled, if the server allows this method, a password isn't required and the username part of the JID is ignored (you can use [email protected]). Servers will usually assign you a random numeric username instead.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="ops" type="string" scope="global">
<default>both</default>
<possible-values>both, root, user, none</possible-values>
<description>
<para>
Some people prefer themself and root to have operator status in &bitlbee, other people don't. You can change these states using this setting.
</para>
<para>
The value "both" means both user and root get ops. "root" means, well, just root. "user" means just the user. "none" means nobody will get operator status.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="otr_policy" type="string" scope="global">
<default>opportunistic</default>
<possible-values>never, opportunistic, manual, always</possible-values>
<description>
<para>
This setting controls the policy for establishing Off-the-Record connections.
</para>
<para>
A value of "never" effectively disables the OTR subsystem. In "opportunistic" mode, a magic whitespace pattern will be appended to the first message sent to any user. If the peer is also running opportunistic OTR, an encrypted connection will be set up automatically. On "manual", on the other hand, OTR connections must be established explicitly using <emphasis>otr connect</emphasis>. Finally, the setting "always" enforces encrypted communication by causing BitlBee to refuse to send any cleartext messages at all.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="password" type="string" scope="account,global">
<description>
<para>
Use this global setting to change your "NickServ" password.
</para>
<para>
This setting is also available for all IM accounts to change the password BitlBee uses to connect to the service.
</para>
<para>
Note that BitlBee will always say this setting is empty. This doesn't mean there is no password, it just means that, for security reasons, BitlBee stores passwords somewhere else so they can't just be retrieved in plain text.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="paste_buffer" type="boolean" scope="global">
<default>false</default>
<description>
<para>
By default, when you send a message to someone, BitlBee forwards this message to the user immediately. When you paste a large number of lines, the lines will be sent in separate messages, which might not be very nice to read. If you enable this setting, BitlBee will buffer your messages and wait for more data.
</para>
<para>
Using the <emphasis>paste_buffer_delay</emphasis> setting you can specify the number of seconds BitlBee should wait for more data before the complete message is sent.
</para>
<para>
Please note that if you remove a buddy from your list (or if the connection to that user drops) and there's still data in the buffer, this data will be lost. BitlBee will not try to send the message to the user in those cases.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="paste_buffer_delay" type="integer" scope="global">
<default>200</default>
<description>
<para>
Tell BitlBee after how many (mili)seconds a buffered message should be sent. Values greater than 5 will be interpreted as miliseconds, 5 and lower as seconds.
</para>
<para>
See also the <emphasis>paste_buffer</emphasis> setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="port" type="integer" scope="account">
<description>
<para>
Currently only available for Jabber connections. Specifies the port number to connect to. Usually this should be set to 5222, or 5223 for SSL-connections.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="priority" type="integer" scope="account">
<default>0</default>
<description>
<para>
Can be set for Jabber connections. When connecting to one account from multiple places, this priority value will help the server to determine where to deliver incoming messages (that aren't addressed to a specific resource already).
</para>
<para>
According to RFC 3921 servers will always deliver messages to the server with the highest priority value. Mmessages will not be delivered to resources with a negative priority setting (and should be saved as an off-line message if all available resources have a negative priority value).
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="private" type="boolean" scope="global">
<default>true</default>
<description>
<para>
If value is true, messages from users will appear in separate query windows. If false, messages from users will appear in a control channel.
</para>
<para>
This setting is remembered (during one session) per-user, this setting only changes the default state. This option takes effect as soon as you reconnect.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="protocol" type="string" scope="channel">
<description>
<para>
For control channels with <emphasis>fill_by</emphasis> set to <emphasis>protocol</emphasis>: Set this setting to the name of the IM protocol of all contacts you want to see in this channel.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="proxy" type="string" scope="account">
<default><local><auto></default>
<description>
<para>
A list of <emphasis>file transfer proxies</emphasis> for jabber. This isn't the connection proxy. Sorry, look in bitlbee.conf for those.
</para>
<para>
It's a semicolon-separated list of items that can be either <emphasis>JID,HOST,PORT</emphasis> or two special values, <emphasis><local></emphasis> (to try a direct connection first) and <emphasis><auto></emphasis> (to try to discover a proxy). For example, "<local>;proxy.somewhere.org,123.123.123.123,7777".
</para>
<para>
The address should point to a SOCKS5 bytestreams server, usually provided by jabber servers. This is only used for sending files. Note that the host address might not match what DNS tells you, and the port isn't always the same.
</para>
<para>
The correct way to get a socks proxy host/port is a mystery, and the file transfer might fail anyway. Maybe just try using dropbox instead.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="query_order" type="string" scope="global">
<default>lifo</default>
<possible-values>lifo, fifo</possible-values>
<description>
<para>
This changes the order in which the questions from root (usually authorization requests from buddies) should be answered. When set to <emphasis>lifo</emphasis>, BitlBee immediately displays all new questions and they should be answered in reverse order. When this is set to <emphasis>fifo</emphasis>, BitlBee displays the first question which comes in and caches all the others until you answer the first one.
</para>
<para>
Although the <emphasis>fifo</emphasis> setting might sound more logical (and used to be the default behaviour in older BitlBee versions), it turned out not to be very convenient for many users when they missed the first question (and never received the next ones).
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="resource" type="string" scope="account">
<default>BitlBee</default>
<description>
<para>
Can be set for Jabber connections. You can use this to connect to your Jabber account from multiple clients at once, with every client using a different resource string.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="resource_select" type="string" scope="account">
<default>activity</default>
<possible-values>priority, activity</possible-values>
<description>
<para>
Because the IRC interface makes it pretty hard to specify the resource to talk to (when a buddy is online through different resources), this setting was added.
</para>
<para>
Normally it's set to <emphasis>priority</emphasis> which means messages will always be delivered to the buddy's resource with the highest priority. If the setting is set to <emphasis>activity</emphasis>, messages will be delivered to the resource that was last used to send you a message (or the resource that most recently connected).
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="root_nick" type="string" scope="global">
<default>root</default>
<description>
<para>
Normally the "bot" that takes all your BitlBee commands is called "root". If you don't like this name, you can rename it to anything else using the <emphasis>rename</emphasis> command, or by changing this setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="save_on_quit" type="boolean" scope="global">
<default>true</default>
<description>
<para>
If enabled causes BitlBee to save all current settings and account details when user disconnects. This is enabled by default, and these days there's not really a reason to have it disabled anymore.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="self_messages" type="string" scope="global">
<default>true</default>
<possible-values>true, false, prefix, prefix_notice</possible-values>
<description>
<para>
Change this setting to customize how (or whether) to show self-messages, which are messages sent by yourself from other locations (for example, mobile clients), for IM protocols that support it.
</para>
<para>
When this is set to "true", it will send those messages in the "standard" way, which is a PRIVMSG with source and target fields swapped.
</para>
<para>
Since this isn't very well supported by some clients (the messages might appear in the wrong window), you can set it to "prefix" to show them as a normal message prefixed with "-> ", or use "prefix_notice" which is the same thing but with a NOTICE instead.
</para>
<para>
You can also set it to "false" to disable these messages completely.
</para>
<para>
This setting only applies to private messages. Self messages in groupchats are always shown, since they haven't caused issues in any clients so far.
</para>
<para>
More information: <emphasis>https://wiki.bitlbee.org/SelfMessages</emphasis>
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="server" type="string" scope="account">
<description>
<para>
Can be set for Jabber- and OSCAR-connections. For Jabber, you might have to set this if the servername isn't equal to the part after the @ in the Jabber handle. For OSCAR this shouldn't be necessary anymore in recent BitlBee versions.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="show_ids" type="boolean" scope="account">
<default>true</default>
<description>
<para>
Enable this setting on a Twitter account to have BitlBee include a two-digit "id" in front of every message. This id can then be used for replies and retweets.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="show_offline" type="boolean" scope="global">
<default>false</default>
<description>
<para>
If enabled causes BitlBee to also show offline users in Channel. Online-users will get op, away-users voice and offline users none of both. This option takes effect as soon as you reconnect.
</para>
<para>
Replaced with the <emphasis>show_users</emphasis> setting. See <emphasis>help show_users</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="show_users" type="string" scope="channel">
<default>online+,special%,away</default>
<description>
<para>
Comma-separated list of statuses of users you want in the channel,
and any modes they should have. The following statuses are currently
recognised: <emphasis>online</emphasis> (i.e. available, not
away), <emphasis>special</emphasis> (specific to the protocol),
<emphasis>away</emphasis>, and <emphasis>offline</emphasis>.
</para>
<para>
If a status is followed by a valid channel mode character
(@, % or +), it will be given to users with that status.
For example, <emphasis>online@,special%,away+,offline</emphasis>
will show all users in the channel. Online people will
have +o, people who are online but away will have +v,
and others will have no special modes.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="simulate_netsplit" type="boolean" scope="global">
<default>true</default>
<description>
<para>
Some IRC clients parse quit messages sent by the IRC server to see if someone really left or just disappeared because of a netsplit. By default, BitlBee tries to simulate netsplit-like quit messages to keep the control channels window clean. If you don't like this (or if your IRC client doesn't support this) you can disable this setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="ssl" type="boolean" scope="account">
<default>false</default>
<description>
<para>
Currently only available for Jabber connections. Set this to true if you want to connect to the server on an SSL-enabled port (usually 5223).
</para>
<para>
Please note that this method of establishing a secure connection to the server has long been deprecated. You are encouraged to look at the <emphasis>tls</emphasis> setting instead.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="status" type="string" scope="account,global">
<description>
<para>
Most IM protocols support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy.
</para>
<para>
This setting can be used to set such a message. It will be available as a per-account setting for protocols that support it, and also as a global setting (which will then automatically be used for all protocols that support it).
</para>
<para>
Away states set using <emphasis>/away</emphasis> or the <emphasis>away</emphasis> setting will override this setting. To clear the setting, use <emphasis>set -del status</emphasis>.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="strip_html" type="boolean" scope="global">
<default>true</default>
<description>
<para>
Determines what BitlBee should do with HTML in messages. Normally this is turned on and HTML will be stripped from messages, if BitlBee thinks there is HTML.
</para>
<para>
If BitlBee fails to detect this sometimes (most likely in AIM messages over an ICQ connection), you can set this setting to <emphasis>always</emphasis>, but this might sometimes accidentally strip non-HTML things too.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="strip_newlines" type="boolean" scope="account">
<default>false</default>
<description>
<para>
Turn on this flag to prevent tweets from spanning over multiple lines.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="show_old_mentions" type="integer" scope="account">
<default>20</default>
<description>
<para>
This setting specifies the number of old mentions to fetch on connection. Must be less or equal to 200. Setting it to 0 disables this feature.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="tag" type="string" scope="account">
<description>
<para>
For every account you have, you can set a tag you can use to uniquely identify that account. This tag can be used instead of the account number (or protocol name, or part of the screenname) when using commands like <emphasis>account</emphasis>, <emphasis>add</emphasis>, etc. You can't have two accounts with one and the same account tag.
</para>
<para>
By default, it will be set to the name of the IM protocol. Once you add a second account on an IM network, a numeric suffix will be added, starting with 2.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="timezone" type="string" scope="global">
<default>local</default>
<possible-values>local, utc, gmt, timezone-spec</possible-values>
<description>
<para>
If message timestamps are available for offline messages or chatroom backlogs, BitlBee will display them as part of the message. By default it will use the local timezone. If you're not in the same timezone as the BitlBee server, you can adjust the timestamps using this setting.
</para>
<para>
Values local/utc/gmt should be self-explanatory. timezone-spec is a time offset in hours:minutes, for example: -8 for Pacific Standard Time, +2 for Central European Summer Time, +5:30 for Indian Standard Time.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="tls" type="boolean" scope="account">
<default>true</default>
<description>
<para>
By default (with this setting enabled), BitlBee will require Jabber servers to offer encryption via StartTLS and refuse to connect if they don't.
</para>
<para>
If you set this to "try", BitlBee will use StartTLS only if it's offered. With the setting disabled, StartTLS support will be ignored and avoided entirely.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="tls_verify" type="boolean" scope="account">
<default>true</default>
<description>
<para>
Currently only available for Jabber connections in combination with the <emphasis>tls</emphasis> setting. Set this to <emphasis>true</emphasis> if you want BitlBee to strictly verify the server's certificate against a list of trusted certificate authorities.
</para>
<para>
The hostname used in the certificate verification is the value of the <emphasis>server</emphasis> setting if the latter is nonempty and the domain of the username else. If you get a hostname related error when connecting to Google Talk with a username from the gmail.com or googlemail.com domain, please try to empty the <emphasis>server</emphasis> setting.
</para>
<para>
Please note that no certificate verification is performed when the <emphasis>ssl</emphasis> setting is used, or when the <emphasis>CAfile</emphasis> setting in <emphasis>bitlbee.conf</emphasis> is not set.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="to_char" type="string" scope="global">
<default>": "</default>
<description>
<para>
It's customary that messages meant for one specific person on an IRC channel are prepended by his/her alias followed by a colon ':'. BitlBee does this by default. If you prefer a different character, you can set it using <emphasis>set to_char</emphasis>.
</para>
<para>
Please note that this setting is only used for incoming messages. For outgoing messages you can use ':' (colon) or ',' to separate the destination nick from the message, and this is not configurable.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="translate_to_nicks" type="boolean" scope="channel">
<default>true</default>
<description>
<para>
IRC's nickname namespace is quite limited compared to most IM protocols. Not any non-ASCII characters are allowed, in fact nicknames have to be mostly alpha-numeric. Also, BitlBee has to add underscores sometimes to avoid nickname collisions.
</para>
<para>
While normally the BitlBee user is the only one seeing these names, they may be exposed to other chatroom participants for example when addressing someone in the channel (with or without tab completion). By default BitlBee will translate these stripped nicknames back to the original nick. If you don't want this, disable this setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="type" type="string" scope="channel">
<default>control</default>
<possible-values>control, chat</possible-values>
<description>
<para>
BitlBee supports two kinds of channels: control channels (usually with a name starting with a &) and chatroom channels (name usually starts with a #).
</para>
<para>
See <emphasis>help channels</emphasis> for a full description of channel types in BitlBee.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="typing_notice" type="boolean" scope="global">
<default>false</default>
<description>
<para>
Sends you a /notice when a user starts typing a message (if supported by the IM protocol and the user's client). To use this, you most likely want to use a script in your IRC client to show this information in a more sensible way.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="user_agent" type="string" scope="account">
<default>BitlBee</default>
<description>
<para>
Some Jabber servers are configured to only allow a few (or even just one) kinds of XMPP clients to connect to them.
</para>
<para>
You can change this setting to make BitlBee present itself as a different client, so that you can still connect to these servers.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="utf8_nicks" type="boolean" scope="global">
<default>false</default>
<description>
<para>
Officially, IRC nicknames are restricted to ASCII. Recently some clients and servers started supporting Unicode nicknames though. To enable UTF-8 nickname support (contacts only) in BitlBee, enable this setting.
</para>
<para>
To avoid confusing old clients, this setting is disabled by default. Be careful when you try it, and be prepared to be locked out of your BitlBee in case your client interacts poorly with UTF-8 nicknames.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="web_aware" type="string" scope="account">
<default>false</default>
<description>
<para>
ICQ allows people to see if you're on-line via a CGI-script. (http://status.icq.com/online.gif?icq=UIN) This can be nice to put on your website, but it seems that spammers also use it to see if you're online without having to add you to their contact list. So to prevent ICQ spamming, recent versions of BitlBee disable this feature by default.
</para>
<para>
Unless you really intend to use this feature somewhere (on forums or maybe a website), it's probably better to keep this setting disabled.
</para>
</description>
</bitlbee-setting>
<bitlbee-setting name="xmlconsole" type="boolean" scope="account">
<default>false</default>
<description>
<para>
The Jabber module allows you to add a buddy <emphasis>xmlconsole</emphasis> to your contact list, which will then show you the raw XMPP stream between you and the server. You can also send XMPP packets to this buddy, which will then be sent to the server.
</para>
<para>
If you want to enable this XML console permanently (and at login time already), you can set this setting.
</para>
</description>
</bitlbee-setting>
<bitlbee-command name="rename">
<short-description>Rename (renick) a buddy</short-description>
<syntax>rename <oldnick> <newnick></syntax>
<syntax>rename -del <nick></syntax>
<description>
<para>
Renick a user in your buddy list. Very useful, in fact just very important, if you got a lot of people with stupid account names (or hard ICQ numbers).
</para>
<para>
<emphasis>rename -del</emphasis> can be used to erase your manually set nickname for a contact and reset it to what was automatically generated.
</para>
</description>
<ircexample>
<ircline nick="itsme">rename itsme_ you</ircline>
<ircaction nick="itsme_">is now known as <emphasis>you</emphasis></ircaction>
</ircexample>
</bitlbee-command>
<bitlbee-command name="yes">
<short-description>Accept a request</short-description>
<syntax>yes [<number>]</syntax>
<description>
<para>
Sometimes an IM-module might want to ask you a question. (Accept this user as your buddy or not?) To accept a question, use the <emphasis>yes</emphasis> command.
</para>
<para>
By default, this answers the first unanswered question. You can also specify a different question as an argument. You can use the <emphasis>qlist</emphasis> command for a list of questions.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="no">
<short-description>Deny a request</short-description>
<syntax>no [<number>]</syntax>
<description>
<para>
Sometimes an IM-module might want to ask you a question. (Accept this user as your buddy or not?) To reject a question, use the <emphasis>no</emphasis> command.
</para>
<para>
By default, this answers the first unanswered question. You can also specify a different question as an argument. You can use the <emphasis>qlist</emphasis> command for a list of questions.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="plugins">
<short-description>List all the external plugins and protocols</short-description>
<syntax>plugins [info <name>]</syntax>
<description>
<para>
This gives you a list of all the external plugins and protocols.
</para>
<para>
Use the <emphasis>info</emphasis> subcommand to get more details about a plugin.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="qlist">
<short-description>List all the unanswered questions root asked</short-description>
<syntax>qlist</syntax>
<description>
<para>
This gives you a list of all the unanswered questions from root.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="register">
<short-description>Register yourself</short-description>
<syntax>register [<password>]</syntax>
<description>
<para>
BitlBee can save your settings so you won't have to enter all your IM passwords every time you log in. If you want the Bee to save your settings, use the <emphasis>register</emphasis> command.
</para>
<para>
Please do pick a secure password, don't just use your nick as your password. Please note that IRC is not an encrypted protocol, so the passwords still go over the network in plaintext. Evil people with evil sniffers will read it all. (So don't use your root password.. ;-)
</para>
<para>
To identify yourself in later sessions, you can use the <emphasis>identify</emphasis> command. To change your password later, you can use the <emphasis>set password</emphasis> command.
</para>
<para>
You can omit the password and enter it separately using the IRC /OPER command. This lets you enter your password without your IRC client echoing it on screen or recording it in logs.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="identify">
<syntax>identify [-noload|-force] [<password>]</syntax>
<short-description>Identify yourself with your password</short-description>
<description>
<para>
BitlBee saves all your settings (contacts, accounts, passwords) on-server. To prevent other users from just logging in as you and getting this information, you'll have to identify yourself with your password. You can register this password using the <emphasis>register</emphasis> command.
</para>
<para>
Once you're registered, you can change your password using <emphasis>set password <password></emphasis>.
</para>
<para>
The <emphasis>-noload</emphasis> and <emphasis>-force</emphasis> flags can be used to identify when you're logged into some IM accounts already. <emphasis>-force</emphasis> will let you identify yourself and load all saved accounts (and keep the accounts you're logged into already).
</para>
<para>
<emphasis>-noload</emphasis> will log you in but not load any accounts and settings saved under your current nickname. These will be overwritten once you save your settings (i.e. when you disconnect).
</para>
<para>
You can omit the password and enter it separately using the IRC /OPER command. This lets you enter your password without your IRC client echoing it on screen or recording it in logs.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="drop">
<syntax>drop <password></syntax>
<short-description>Drop your account</short-description>
<description>
<para>
Drop your BitlBee registration. Your account files will be removed and your password will be forgotten. For obvious security reasons, you have to specify your NickServ password to make this command work.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="blist">
<syntax>blist [all|online|offline|away] [<pattern>]</syntax>
<short-description>List all the buddies in the current channel</short-description>
<description>
<para>
You can get a more readable buddy list using the <emphasis>blist</emphasis> command. If you want a complete list (including the offline users) you can use the <emphasis>all</emphasis> argument.
</para>
<para>
A perl-compatible regular expression can be supplied as <emphasis>pattern</emphasis> to filter the results (case-insensitive).
</para>
</description>
</bitlbee-command>
<bitlbee-command name="group">
<short-description>Contact group management</short-description>
<syntax>group [ list | info <group> ]</syntax>
<description>
<para>
The <emphasis>group list</emphasis> command shows a list of all groups defined so far.
</para>
<para>
The <emphasis>group info</emphasis> command shows a list of all members of a the group <group>.
</para>
<para>
If you want to move contacts between groups, you can use the IRC <emphasis>/invite</emphasis> command. Also, if you use the <emphasis>add</emphasis> command in a control channel configured to show just one group, the new contact will automatically be added to that group.
</para>
</description>
</bitlbee-command>
<bitlbee-command name="transfer">
<short-description>Monitor, cancel, or reject file transfers</short-description>
<syntax>transfer [<cancel> id | <reject>]</syntax>
<description>
<para>
Without parameters the currently pending file transfers and their status will be listed. Available actions are <emphasis>cancel</emphasis> and <emphasis>reject</emphasis>. See <emphasis>help transfer <action></emphasis> for more information.
</para>
<ircexample>
<ircline nick="ulim">transfer</ircline>
</ircexample>
</description>
<bitlbee-command name="cancel">
<short-description>Cancels the file transfer with the given id</short-description>
<syntax>transfer <cancel> id</syntax>
<description>
<para>Cancels the file transfer with the given id</para>
</description>
<ircexample>
<ircline nick="ulim">transfer cancel 1</ircline>
<ircline nick="root">Canceling file transfer for test</ircline>
</ircexample>
</bitlbee-command>
<bitlbee-command name="reject">
<short-description>Rejects all incoming transfers</short-description>
<syntax>transfer <reject></syntax>
<description>
<para>Rejects all incoming (not already transferring) file transfers. Since you probably have only one incoming transfer at a time, no id is necessary. Or is it?</para>
</description>
<ircexample>
<ircline nick="ulim">transfer reject</ircline>
</ircexample>
</bitlbee-command>
</bitlbee-command>
</chapter>
| {
"pile_set_name": "Github"
} |
#ifndef COIN_SBBOX_H
#define COIN_SBBOX_H
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#if defined(COIN_INTERNAL)
#error Do not include Inventor/SbVec.h internally.
#endif // COIN_INTERNAL
#include <Inventor/SbVec2b.h>
#include <Inventor/SbVec2ub.h>
#include <Inventor/SbVec2s.h>
#include <Inventor/SbVec2us.h>
#include <Inventor/SbVec2i32.h>
#include <Inventor/SbVec2ui32.h>
#include <Inventor/SbVec2f.h>
#include <Inventor/SbVec2d.h>
#include <Inventor/SbVec3b.h>
#include <Inventor/SbVec3ub.h>
#include <Inventor/SbVec3s.h>
#include <Inventor/SbVec3us.h>
#include <Inventor/SbVec3i32.h>
#include <Inventor/SbVec3ui32.h>
#include <Inventor/SbVec3f.h>
#include <Inventor/SbVec3d.h>
#include <Inventor/SbVec4b.h>
#include <Inventor/SbVec4ub.h>
#include <Inventor/SbVec4s.h>
#include <Inventor/SbVec4us.h>
#include <Inventor/SbVec4i32.h>
#include <Inventor/SbVec4ui32.h>
#include <Inventor/SbVec4f.h>
#include <Inventor/SbVec4d.h>
#endif // !COIN_SBBOX_H
| {
"pile_set_name": "Github"
} |
/*
* FindBugs - Find Bugs in Java programs
* Copyright (C) 2006, University of Maryland
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package edu.umd.cs.findbugs.classfile;
/**
* Interface for a registrar class that registers analysis engines with an
* analysis cache.
*
* @author David Hovemeyer
*/
public interface IAnalysisEngineRegistrar {
/**
* Register analysis engines with given analysis cache.
*
* @param analysisCache
* the analysis cache
*/
public void registerAnalysisEngines(IAnalysisCache analysisCache);
}
| {
"pile_set_name": "Github"
} |
#!/bin/bash
exec scala "$0" "$@"
!#
// Propagates changes in README.md (table of contents) to all other files in docs/
// Usage: cd docs; ./make_TOC.scala
import java.io.File
import java.io.FileWriter
import scala.io.Source.stdin
import scala.io.Source.fromFile
val toc : String = fromFile("README.md").mkString("")
for { file <- new File(".").listFiles
if file.getName != "README.md"
if file.getName.matches(".*[.]md") } {
val lines = fromFile(file).mkString("")
val contents = lines.split("\n---*\n").drop(1).mkString("\n---\n")
val writer = new FileWriter(file)
for (line <- toc.split("\n")) {
if (line.contains(file.getName)) {
writer.write(line.replaceAllLiterally("[","[**").replaceAllLiterally("]","**]")+"\n")
} else {
writer.write(line+"\n")
}
}
writer.write("\n---\n" + contents)
writer.close
}
| {
"pile_set_name": "Github"
} |
// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package gin
import (
"encoding/json"
"errors"
"testing"
"github.com/stretchr/testify/assert"
)
func TestError(t *testing.T) {
baseError := errors.New("test error")
err := &Error{
Err: baseError,
Type: ErrorTypePrivate,
}
assert.Equal(t, err.Error(), baseError.Error())
assert.Equal(t, err.JSON(), H{"error": baseError.Error()})
assert.Equal(t, err.SetType(ErrorTypePublic), err)
assert.Equal(t, err.Type, ErrorTypePublic)
assert.Equal(t, err.SetMeta("some data"), err)
assert.Equal(t, err.Meta, "some data")
assert.Equal(t, err.JSON(), H{
"error": baseError.Error(),
"meta": "some data",
})
jsonBytes, _ := json.Marshal(err)
assert.Equal(t, string(jsonBytes), "{\"error\":\"test error\",\"meta\":\"some data\"}")
err.SetMeta(H{
"status": "200",
"data": "some data",
})
assert.Equal(t, err.JSON(), H{
"error": baseError.Error(),
"status": "200",
"data": "some data",
})
err.SetMeta(H{
"error": "custom error",
"status": "200",
"data": "some data",
})
assert.Equal(t, err.JSON(), H{
"error": "custom error",
"status": "200",
"data": "some data",
})
}
func TestErrorSlice(t *testing.T) {
errs := errorMsgs{
{Err: errors.New("first"), Type: ErrorTypePrivate},
{Err: errors.New("second"), Type: ErrorTypePrivate, Meta: "some data"},
{Err: errors.New("third"), Type: ErrorTypePublic, Meta: H{"status": "400"}},
}
assert.Equal(t, errs, errs.ByType(ErrorTypeAny))
assert.Equal(t, errs.Last().Error(), "third")
assert.Equal(t, errs.Errors(), []string{"first", "second", "third"})
assert.Equal(t, errs.ByType(ErrorTypePublic).Errors(), []string{"third"})
assert.Equal(t, errs.ByType(ErrorTypePrivate).Errors(), []string{"first", "second"})
assert.Equal(t, errs.ByType(ErrorTypePublic|ErrorTypePrivate).Errors(), []string{"first", "second", "third"})
assert.Empty(t, errs.ByType(ErrorTypeBind))
assert.Empty(t, errs.ByType(ErrorTypeBind).String())
assert.Equal(t, errs.String(), `Error #01: first
Error #02: second
Meta: some data
Error #03: third
Meta: map[status:400]
`)
assert.Equal(t, errs.JSON(), []interface{}{
H{"error": "first"},
H{"error": "second", "meta": "some data"},
H{"error": "third", "status": "400"},
})
jsonBytes, _ := json.Marshal(errs)
assert.Equal(t, string(jsonBytes), "[{\"error\":\"first\"},{\"error\":\"second\",\"meta\":\"some data\"},{\"error\":\"third\",\"status\":\"400\"}]")
errs = errorMsgs{
{Err: errors.New("first"), Type: ErrorTypePrivate},
}
assert.Equal(t, errs.JSON(), H{"error": "first"})
jsonBytes, _ = json.Marshal(errs)
assert.Equal(t, string(jsonBytes), "{\"error\":\"first\"}")
errs = errorMsgs{}
assert.Nil(t, errs.Last())
assert.Nil(t, errs.JSON())
assert.Empty(t, errs.String())
}
| {
"pile_set_name": "Github"
} |
gcr.io/google_containers/kube-controller-manager-ppc64le:v1.13.9-beta.0
| {
"pile_set_name": "Github"
} |
package identity
import (
"github.com/skygeario/skygear-server/pkg/core/authn"
"github.com/skygeario/skygear-server/pkg/core/config"
)
type Candidate map[string]interface{}
const (
CandidateKeyType = "type"
CandidateKeyEmail = "email"
CandidateKeyProviderType = "provider_type"
CandidateKeyProviderAlias = "provider_alias"
CandidateKeyProviderSubjectID = "provider_subject_id"
CandidateKeyLoginIDType = "login_id_type"
CandidateKeyLoginIDKey = "login_id_key"
CandidateKeyLoginIDValue = "login_id_value"
)
func NewOAuthCandidate(c *config.OAuthProviderConfiguration) Candidate {
return Candidate{
CandidateKeyType: string(authn.IdentityTypeOAuth),
CandidateKeyEmail: "",
CandidateKeyProviderType: string(c.Type),
CandidateKeyProviderAlias: string(c.ID),
CandidateKeyProviderSubjectID: "",
}
}
func NewLoginIDCandidate(c *config.LoginIDKeyConfiguration) Candidate {
return Candidate{
CandidateKeyType: string(authn.IdentityTypeLoginID),
CandidateKeyEmail: "",
CandidateKeyLoginIDType: string(c.Type),
CandidateKeyLoginIDKey: string(c.Key),
CandidateKeyLoginIDValue: "",
}
}
| {
"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>SchemeUserState</key>
<dict>
<key>HUPhotoBrowser.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>HUPhotoPicker-HUPhotoPicker.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>HUPhotoPicker.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Pods-HUPhotoBrowser Demo.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>Pods-HUPhotoBrowser DemoTests.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>SDWebImage.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>SVProgressHUD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict/>
</dict>
</plist>
| {
"pile_set_name": "Github"
} |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 Gael Guennebaud <[email protected]>
// Copyright (C) 2008 Benoit Jacob <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_HYPERPLANE_H
#define EIGEN_HYPERPLANE_H
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
* \class Hyperplane
*
* \brief A hyperplane
*
* A hyperplane is an affine subspace of dimension n-1 in a space of dimension n.
* For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.
*
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
* \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
* Notice that the dimension of the hyperplane is _AmbientDim-1.
*
* This class represents an hyperplane as the zero set of the implicit equation
* \f$ n \cdot x + d = 0 \f$ where \f$ n \f$ is a unit normal vector of the plane (linear part)
* and \f$ d \f$ is the distance (offset) to the origin.
*/
template <typename _Scalar, int _AmbientDim, int _Options>
class Hyperplane
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
enum {
AmbientDimAtCompileTime = _AmbientDim,
Options = _Options
};
typedef _Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> VectorType;
typedef Matrix<Scalar,Index(AmbientDimAtCompileTime)==Dynamic
? Dynamic
: Index(AmbientDimAtCompileTime)+1,1,Options> Coefficients;
typedef Block<Coefficients,AmbientDimAtCompileTime,1> NormalReturnType;
typedef const Block<const Coefficients,AmbientDimAtCompileTime,1> ConstNormalReturnType;
/** Default constructor without initialization */
EIGEN_DEVICE_FUNC inline Hyperplane() {}
template<int OtherOptions>
EIGEN_DEVICE_FUNC Hyperplane(const Hyperplane<Scalar,AmbientDimAtCompileTime,OtherOptions>& other)
: m_coeffs(other.coeffs())
{}
/** Constructs a dynamic-size hyperplane with \a _dim the dimension
* of the ambient space */
EIGEN_DEVICE_FUNC inline explicit Hyperplane(Index _dim) : m_coeffs(_dim+1) {}
/** Construct a plane from its normal \a n and a point \a e onto the plane.
* \warning the vector normal is assumed to be normalized.
*/
EIGEN_DEVICE_FUNC inline Hyperplane(const VectorType& n, const VectorType& e)
: m_coeffs(n.size()+1)
{
normal() = n;
offset() = -n.dot(e);
}
/** Constructs a plane from its normal \a n and distance to the origin \a d
* such that the algebraic equation of the plane is \f$ n \cdot x + d = 0 \f$.
* \warning the vector normal is assumed to be normalized.
*/
EIGEN_DEVICE_FUNC inline Hyperplane(const VectorType& n, const Scalar& d)
: m_coeffs(n.size()+1)
{
normal() = n;
offset() = d;
}
/** Constructs a hyperplane passing through the two points. If the dimension of the ambient space
* is greater than 2, then there isn't uniqueness, so an arbitrary choice is made.
*/
EIGEN_DEVICE_FUNC static inline Hyperplane Through(const VectorType& p0, const VectorType& p1)
{
Hyperplane result(p0.size());
result.normal() = (p1 - p0).unitOrthogonal();
result.offset() = -p0.dot(result.normal());
return result;
}
/** Constructs a hyperplane passing through the three points. The dimension of the ambient space
* is required to be exactly 3.
*/
EIGEN_DEVICE_FUNC static inline Hyperplane Through(const VectorType& p0, const VectorType& p1, const VectorType& p2)
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 3)
Hyperplane result(p0.size());
VectorType v0(p2 - p0), v1(p1 - p0);
result.normal() = v0.cross(v1);
RealScalar norm = result.normal().norm();
if(norm <= v0.norm() * v1.norm() * NumTraits<RealScalar>::epsilon())
{
Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose();
JacobiSVD<Matrix<Scalar,2,3> > svd(m, ComputeFullV);
result.normal() = svd.matrixV().col(2);
}
else
result.normal() /= norm;
result.offset() = -p0.dot(result.normal());
return result;
}
/** Constructs a hyperplane passing through the parametrized line \a parametrized.
* If the dimension of the ambient space is greater than 2, then there isn't uniqueness,
* so an arbitrary choice is made.
*/
// FIXME to be consitent with the rest this could be implemented as a static Through function ??
EIGEN_DEVICE_FUNC explicit Hyperplane(const ParametrizedLine<Scalar, AmbientDimAtCompileTime>& parametrized)
{
normal() = parametrized.direction().unitOrthogonal();
offset() = -parametrized.origin().dot(normal());
}
EIGEN_DEVICE_FUNC ~Hyperplane() {}
/** \returns the dimension in which the plane holds */
EIGEN_DEVICE_FUNC inline Index dim() const { return AmbientDimAtCompileTime==Dynamic ? m_coeffs.size()-1 : Index(AmbientDimAtCompileTime); }
/** normalizes \c *this */
EIGEN_DEVICE_FUNC void normalize(void)
{
m_coeffs /= normal().norm();
}
/** \returns the signed distance between the plane \c *this and a point \a p.
* \sa absDistance()
*/
EIGEN_DEVICE_FUNC inline Scalar signedDistance(const VectorType& p) const { return normal().dot(p) + offset(); }
/** \returns the absolute distance between the plane \c *this and a point \a p.
* \sa signedDistance()
*/
EIGEN_DEVICE_FUNC inline Scalar absDistance(const VectorType& p) const { return numext::abs(signedDistance(p)); }
/** \returns the projection of a point \a p onto the plane \c *this.
*/
EIGEN_DEVICE_FUNC inline VectorType projection(const VectorType& p) const { return p - signedDistance(p) * normal(); }
/** \returns a constant reference to the unit normal vector of the plane, which corresponds
* to the linear part of the implicit equation.
*/
EIGEN_DEVICE_FUNC inline ConstNormalReturnType normal() const { return ConstNormalReturnType(m_coeffs,0,0,dim(),1); }
/** \returns a non-constant reference to the unit normal vector of the plane, which corresponds
* to the linear part of the implicit equation.
*/
EIGEN_DEVICE_FUNC inline NormalReturnType normal() { return NormalReturnType(m_coeffs,0,0,dim(),1); }
/** \returns the distance to the origin, which is also the "constant term" of the implicit equation
* \warning the vector normal is assumed to be normalized.
*/
EIGEN_DEVICE_FUNC inline const Scalar& offset() const { return m_coeffs.coeff(dim()); }
/** \returns a non-constant reference to the distance to the origin, which is also the constant part
* of the implicit equation */
EIGEN_DEVICE_FUNC inline Scalar& offset() { return m_coeffs(dim()); }
/** \returns a constant reference to the coefficients c_i of the plane equation:
* \f$ c_0*x_0 + ... + c_{d-1}*x_{d-1} + c_d = 0 \f$
*/
EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs; }
/** \returns a non-constant reference to the coefficients c_i of the plane equation:
* \f$ c_0*x_0 + ... + c_{d-1}*x_{d-1} + c_d = 0 \f$
*/
EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs; }
/** \returns the intersection of *this with \a other.
*
* \warning The ambient space must be a plane, i.e. have dimension 2, so that \c *this and \a other are lines.
*
* \note If \a other is approximately parallel to *this, this method will return any point on *this.
*/
EIGEN_DEVICE_FUNC VectorType intersection(const Hyperplane& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2)
Scalar det = coeffs().coeff(0) * other.coeffs().coeff(1) - coeffs().coeff(1) * other.coeffs().coeff(0);
// since the line equations ax+by=c are normalized with a^2+b^2=1, the following tests
// whether the two lines are approximately parallel.
if(internal::isMuchSmallerThan(det, Scalar(1)))
{ // special case where the two lines are approximately parallel. Pick any point on the first line.
if(numext::abs(coeffs().coeff(1))>numext::abs(coeffs().coeff(0)))
return VectorType(coeffs().coeff(1), -coeffs().coeff(2)/coeffs().coeff(1)-coeffs().coeff(0));
else
return VectorType(-coeffs().coeff(2)/coeffs().coeff(0)-coeffs().coeff(1), coeffs().coeff(0));
}
else
{ // general case
Scalar invdet = Scalar(1) / det;
return VectorType(invdet*(coeffs().coeff(1)*other.coeffs().coeff(2)-other.coeffs().coeff(1)*coeffs().coeff(2)),
invdet*(other.coeffs().coeff(0)*coeffs().coeff(2)-coeffs().coeff(0)*other.coeffs().coeff(2)));
}
}
/** Applies the transformation matrix \a mat to \c *this and returns a reference to \c *this.
*
* \param mat the Dim x Dim transformation matrix
* \param traits specifies whether the matrix \a mat represents an #Isometry
* or a more generic #Affine transformation. The default is #Affine.
*/
template<typename XprType>
EIGEN_DEVICE_FUNC inline Hyperplane& transform(const MatrixBase<XprType>& mat, TransformTraits traits = Affine)
{
if (traits==Affine)
{
normal() = mat.inverse().transpose() * normal();
m_coeffs /= normal().norm();
}
else if (traits==Isometry)
normal() = mat * normal();
else
{
eigen_assert(0 && "invalid traits value in Hyperplane::transform()");
}
return *this;
}
/** Applies the transformation \a t to \c *this and returns a reference to \c *this.
*
* \param t the transformation of dimension Dim
* \param traits specifies whether the transformation \a t represents an #Isometry
* or a more generic #Affine transformation. The default is #Affine.
* Other kind of transformations are not supported.
*/
template<int TrOptions>
EIGEN_DEVICE_FUNC inline Hyperplane& transform(const Transform<Scalar,AmbientDimAtCompileTime,Affine,TrOptions>& t,
TransformTraits traits = Affine)
{
transform(t.linear(), traits);
offset() -= normal().dot(t.translation());
return *this;
}
/** \returns \c *this with scalar type casted to \a NewScalarType
*
* Note that if \a NewScalarType is equal to the current scalar type of \c *this
* then this function smartly returns a const reference to \c *this.
*/
template<typename NewScalarType>
EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Hyperplane,
Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type cast() const
{
return typename internal::cast_return_type<Hyperplane,
Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type(*this);
}
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType,int OtherOptions>
EIGEN_DEVICE_FUNC inline explicit Hyperplane(const Hyperplane<OtherScalarType,AmbientDimAtCompileTime,OtherOptions>& other)
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.
*
* \sa MatrixBase::isApprox() */
template<int OtherOptions>
EIGEN_DEVICE_FUNC bool isApprox(const Hyperplane<Scalar,AmbientDimAtCompileTime,OtherOptions>& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
{ return m_coeffs.isApprox(other.m_coeffs, prec); }
protected:
Coefficients m_coeffs;
};
} // end namespace Eigen
#endif // EIGEN_HYPERPLANE_H
| {
"pile_set_name": "Github"
} |
<?php
declare(strict_types=1);
namespace MsgPhp\User\Credential;
use MsgPhp\User\Event\Domain\ChangeCredential;
/**
* @author Roland Franssen <[email protected]>
*/
final class EmailPassword implements UsernameCredential, PasswordProtectedCredential
{
use EmailAsUsername;
use PasswordProtection;
public function __construct(string $email, string $password)
{
$this->email = $email;
$this->password = $password;
}
public function __invoke(ChangeCredential $event): bool
{
[
'email' => $this->email,
'password' => $this->password,
] = $event->fields + $vars = get_object_vars($this);
return $vars !== get_object_vars($this);
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="donations__button_close">Sulge</string>
<string name="donations__flattr">Flattr</string>
<string name="donations__google_android_market">Google Play pood</string>
<string name="donations__google_android_market_not_supported">Annetused rakenduse sees ei ole toetatud. Kas Google Play pood on korrektselt paigaldatud?</string>
<string name="donations__google_android_market_donate_button">Anneta!</string>
<string name="donations__google_android_market_text">Kui palju?</string>
<string name="donations__paypal">PayPal</string>
<string name="donations__paypal_description">Sellel nupul klikates saad valida kui palju soovid annetada!</string>
<string name="donations__thanks_dialog_title">Tänan!</string>
</resources>
| {
"pile_set_name": "Github"
} |
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2011 1&1 Internet AG, Germany, http://www.1und1.de
License:
MIT: https://opensource.org/licenses/MIT
See the LICENSE file in the project's top-level directory for details.
Authors:
* Tino Butz (tbtz)
************************************************************************ */
qx.Class.define("qx.test.mobile.MobileTestCase",
{
extend : qx.dev.unit.TestCase,
include : [qx.dev.unit.MRequirements],
statics :
{
_root : null,
_oldApplicationFunction : null
},
members :
{
setUp : function()
{
if (qx.core.Environment.get("browser.name") == "ie" && qx.core.Environment.get("browser.documentmode") < 10) {
throw new qx.dev.unit.RequirementError("Mobile tests require Webkit, Gecko or IE10+");
}
qx.test.mobile.MobileTestCase._oldApplicationFunction = qx.core.Init.getApplication;
var self = this;
qx.core.Init.getApplication = function()
{
return {
getRoot : function() {
return self.getRoot();
},
addListener: function() {
return self.addListener.apply(self,arguments);
},
removeListener: function() {
return self.removeListener.apply(self,arguments);
},
removeListenerById: function() {
return self.removeListenerById.apply(self,arguments);
},
fireEvent: function() {
return self.fireEvent.apply(self,arguments);
},
fireDataEvent: function() {
return self.fireDataEvent.apply(self,arguments);
},
close : function() {},
terminate : function() {}
};
};
},
tearDown : function()
{
this.getRoot().removeAll();
qx.core.Init.getApplication = qx.test.mobile.MobileTestCase._oldApplicationFunction;
if (qx.core.Environment.get("qx.debug.dispose"))
{
if (qx.test.mobile.MobileTestCase._root)
{
qx.test.mobile.MobileTestCase._root.destroy();
qx.test.mobile.MobileTestCase._root = null;
}
}
},
getRoot : function()
{
var clazz = qx.test.mobile.MobileTestCase;
if (!clazz._root)
{
clazz._root = new qx.ui.mobile.core.Root();
}
return clazz._root;
},
assertQxMobileWidget : function(obj)
{
this.assertInstance(obj, qx.ui.mobile.core.Widget);
}
}
});
| {
"pile_set_name": "Github"
} |
#Statistics:
#XOR count: 29
#AND count: 348
#MUX count: 19
#Inputs Alice (Server)
S 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#Inputs Bob (Client)
C
#constant zero
0 -2
#constant one
1 -3
#Gates
X 10 -3 16
X 1 -3 17
X 9 -3 18
X 14 -3 19
X 5 -3 20
X 15 -3 21
X 8 -3 22
A 8 9 23
A 4 5 24
A 11 10 25
X 11 -3 26
X 11 12 27
X 12 -3 28
X 13 -3 29
X 4 -3 30
X 2 -3 31
X 6 -3 32
A 12 13 33
X 7 -3 34
X 0 -3 35
X 3 -3 36
A 8 30 37
X 18 8 38
A 21 19 39
A 22 16 40
A 5 22 41
X 23 -3 42
X 16 9 43
X 24 -3 44
A 8 36 45
A 8 35 46
A 2 18 47
X 25 -3 48
A 8 31 49
A 8 17 50
A 16 21 51
A 28 16 52
X 29 12 53
A 26 28 54
A 9 34 55
X 33 -3 56
A 8 32 57
A 29 19 58
A 8 34 59
A 16 18 60
A 26 28 61
A 20 8 62
A 29 19 63
X 26 10 64
A 3 22 65
A 28 26 66
A 9 20 67
A 46 17 68
X 38 -3 69
X 40 -3 70
A 60 61 71
X 41 -3 72
A 67 8 73
X 42 43 74
X 64 -3 75
X 65 -3 76
X 39 -3 77
A 51 54 78
X 37 -3 79
X 45 -3 80
A 49 18 81
A 37 20 82
A 39 29 83
X 52 -3 84
X 53 -3 85
A 49 36 86
X 49 -3 87
X 57 -3 88
X 55 -3 89
A 9 45 90
X 46 -3 91
X 63 -3 92
X 59 -3 93
A 63 21 94
X 62 -3 95
A 37 18 96
X 68 -3 97
X 18 87 98
X 38 87 99
A 66 83 100
A 83 93 101
X 74 -3 102
X 83 -3 103
A 58 89 104
A 95 18 105
X 80 9 106
X 82 -3 107
A 77 13 108
A 37 69 109
A 1 91 110
A 9 75 111
A 27 70 112
A 11 84 113
X 86 -3 114
A 3 87 115
A 69 72 116
A 72 44 117
A 78 88 118
A 80 18 119
X 90 -3 120
A 38 79 121
A 9 70 122
X 73 -3 123
A 9 79 124
A 83 28 125
A 83 28 126
A 100 16 127
A 97 18 128
X 110 -3 129
A 101 71 130
X 122 64 131
A 3 99 132
A 3 98 133
X 115 -3 134
A 16 100 135
X 108 -3 136
A 118 104 137
X 105 -3 138
A 112 111 139
X 113 -3 140
A 44 116 141
A 97 38 142
A 125 16 143
A 117 9 144
A 111 70 145
X 119 -3 146
A 78 104 147
X 109 -3 148
X 121 -3 149
A 107 102 150
X 127 -3 151
X 128 -3 152
A 147 8 153
X 131 -3 154
X 130 -3 155
X 139 -3 156
A 134 69 157
A 135 22 158
A 9 134 159
X 137 -3 160
X 144 -3 161
X 142 -3 162
X 141 -3 163
X 145 -3 164
A 150 148 165
X 165 -3 166
A 162 129 167
A 164 48 168
A 161 107 169
A 140 156 170
X 157 -3 171
A 129 152 172
A 158 18 173
X 159 -3 174
A 7 160 175
X 153 -3 176
A 155 100 177
A 74 167 178
A 174 114 179
A 6 176 180
X 53 170 181
A 177 175 182
X 27 168 183
X 169 -3 184
X 170 -3 185
A 114 171 186
X 175 -3 187
X 167 -3 188
X 172 -3 189
A 155 175 190
A 143 169 191
A 105 180 192
X 178 -3 193
X 181 -3 194
A 186 102 195
X 186 -3 196
A 10 184 197
A 102 188 198
X 183 -3 199
A 16 182 200
X 180 -3 201
A 85 185 202
X 184 10 203
X 182 -3 204
A 154 187 205
A 11 187 206
X 179 -3 207
A 180 163 208
A 138 201 209
X 208 -3 210
A 194 183 211
X 195 -3 212
X 197 -3 213
X 198 -3 214
X 200 -3 215
X 202 -3 216
X 203 180 217
A 204 151 218
A 74 196 219
X 196 74 220
X 205 -3 221
X 206 -3 222
A 166 210 223
A 94 216 224
A 8 221 225
X 218 -3 226
A 222 191 227
A 216 56 228
X 219 -3 229
A 210 166 230
X 209 -3 231
A 213 180 232
A 126 222 233
X 223 -3 234
X 230 -3 235
A 211 224 236
A 231 123 237
X 227 -3 238
A 232 233 239
X 228 -3 240
A 237 226 241
A 236 221 242
A 225 234 243
A 240 92 244
X 240 63 245
X 239 -3 246
A 238 204 247
A 247 246 248
X 241 -3 249
X 244 -3 250
A 242 235 251
A 236 243 252
X 245 -3 253
A 8 249 254
X 248 -3 255
A 215 249 256
X 252 -3 257
X 251 -3 258
A 39 250 259
A 254 255 260
A 4 257 261
A 217 256 262
M 149 124 256 263
A 248 258 264
A 190 256 265
X 256 -3 266
X 260 -3 267
A 258 266 268
A 265 264 269
A 8 266 270
A 37 266 271
X 264 -3 272
X 269 -3 273
X 268 -3 274
A 37 272 275
A 269 194 276
A 269 28 277
A 261 267 278
A 269 103 279
A 269 29 280
X 271 -3 281
A 272 274 282
A 273 181 283
A 276 224 284
A 275 274 285
X 278 -3 286
A 12 273 287
A 277 83 288
A 13 273 289
X 280 -3 290
X 282 -3 291
X 283 -3 292
X 285 -3 293
X 287 -3 294
M 192 262 282 295
X 288 -3 296
M 270 96 282 297
X 289 -3 298
X 284 -3 299
A 39 298 300
A 292 224 301
A 286 293 302
A 180 291 303
A 281 291 304
A 83 294 305
X 295 -3 306
A 224 292 307
X 297 -3 308
X 106 302 309
X 302 -3 310
A 303 256 311
A 307 183 312
X 220 302 313
X 304 -3 314
A 146 302 315
A 212 302 316
X 313 -3 317
A 310 26 318
A 310 16 319
A 263 314 320
X 315 -3 321
A 309 26 322
X 316 -3 323
X 311 -3 324
X 310 10 325
A 321 120 326
X 207 325 327
X 320 -3 328
A 26 317 329
A 306 324 330
X 319 -3 331
A 323 229 332
X 325 -3 333
A 199 330 334
A 308 328 335
X 330 -3 336
A 26 327 337
A 179 333 338
X 334 -3 339
X 20 335 340
X 336 11 341
A 336 28 342
X 336 12 343
A 336 26 344
A 312 336 345
X 338 -3 346
A 340 26 347
X 343 -3 348
A 331 346 349
X 340 11 350
A 340 16 351
A 340 131 352
A 305 344 353
A 301 339 354
X 341 -3 355
X 340 10 356
X 342 -3 357
X 340 131 358
X 345 -3 359
A 348 347 360
A 357 290 361
X 356 -3 362
A 332 358 363
X 352 -3 364
X 347 -3 365
A 300 348 366
A 355 294 367
X 350 349 368
X 353 -3 369
X 358 332 370
X 351 -3 371
A 299 359 372
X 349 -3 373
X 350 -3 374
X 360 -3 375
X 361 -3 376
X 326 362 377
X 363 -3 378
A 367 83 379
A 365 343 380
A 374 373 381
A 362 326 382
A 369 296 383
X 381 -3 384
A 300 376 385
A 381 348 386
A 364 378 387
A 361 375 388
X 382 -3 389
X 385 -3 390
X 386 -3 391
A 371 389 392
A 380 384 393
A 365 384 394
X 387 -3 395
X 392 -3 396
X 393 -3 397
A 354 395 398
A 391 336 399
X 394 -3 400
A 388 399 401
A 372 396 402
X 398 -3 403
A 397 376 404
A 366 400 405
A 379 396 406
A 372 403 407
X 405 -3 408
A 402 403 409
M 336 404 300 410
X 401 -3 411
X 406 -3 412
A 408 390 413
A 45 407 414
A 383 412 415
M 132 76 407 416
M 317 309 407 417
X 410 -3 418
M 317 327 415 419
A 413 340 420
M 309 310 415 421
A 415 327 422
A 415 310 423
A 368 415 424
A 415 29 425
X 415 -3 426
X 413 -3 427
M 99 98 415 428
M 133 36 413 429
A 418 411 430
A 337 415 431
A 318 415 432
X 420 -3 433
M 424 340 413 434
A 424 427 435
A 329 426 436
A 322 426 437
X 430 -3 438
A 414 426 439
X 428 -3 440
A 415 427 441
M 416 429 415 442
A 417 426 443
A 377 426 444
A 341 426 445
X 434 -3 446
X 441 -3 447
A 12 433 448
X 435 -3 449
X 443 -3 450
A 445 409 451
X 439 -3 452
A 425 438 453
A 440 36 454
A 415 438 455
X 442 -3 456
M 370 444 407 457
A 447 407 458
X 457 -3 459
X 455 -3 460
A 448 449 461
A 451 29 462
A 11 452 463
A 10 452 464
X 454 -3 465
A 11 450 466
X 451 -3 467
X 453 -3 468
M 81 47 458 469
M 419 421 458 470
A 446 459 471
A 467 460 472
A 458 279 473
M 436 437 458 474
M 431 432 458 475
A 456 465 476
M 422 423 458 477
X 462 -3 478
A 14 460 479
X 458 -3 480
A 460 13 481
A 461 459 482
X 471 -3 483
X 472 -3 484
A 470 28 485
A 473 19 486
X 474 -3 487
X 475 -3 488
A 13 471 489
A 49 480 490
X 473 -3 491
A 471 181 492
A 468 478 493
X 469 -3 494
X 477 -3 495
X 481 -3 496
X 479 -3 497
X 476 -3 498
A 253 472 499
A 8 480 500
A 473 21 501
A 259 473 502
A 473 39 503
A 452 498 504
A 491 77 505
A 484 19 506
A 466 495 507
X 502 -3 508
A 488 487 509
X 503 -3 510
A 464 498 511
A 482 493 512
A 495 450 513
X 490 -3 514
X 486 -3 515
X 492 -3 516
A 194 483 517
A 498 463 518
A 28 483 519
A 29 483 520
A 14 491 521
A 245 484 522
X 485 -3 523
X 489 -3 524
X 499 -3 525
A 50 494 526
X 501 -3 527
X 500 -3 528
X 522 -3 529
X 517 -3 530
A 504 154 531
X 505 -3 532
X 504 -3 533
X 512 -3 534
X 521 -3 535
X 526 -3 536
X 511 -3 537
A 497 524 538
A 509 493 539
X 507 -3 540
A 513 199 541
A 10 514 542
X 513 -3 543
A 513 12 544
A 244 510 545
A 514 9 546
X 520 -3 547
X 518 -3 548
A 528 2 549
X 519 -3 550
A 16 533 551
X 531 -3 552
A 131 533 553
A 529 530 554
X 549 -3 555
X 545 -3 556
A 537 540 557
A 547 523 558
A 532 21 559
A 535 496 560
A 532 497 561
A 48 537 562
A 51 533 563
X 544 -3 564
A 543 516 565
A 550 515 566
A 552 193 567
A 548 564 568
X 553 -3 569
A 555 514 570
A 554 492 571
A 539 566 572
A 565 183 573
A 560 534 574
A 559 136 575
A 541 554 576
A 561 506 577
X 551 -3 578
A 546 555 579
X 563 -3 580
A 542 555 581
X 572 -3 582
X 579 -3 583
A 570 504 584
X 573 -3 585
X 567 -3 586
A 557 574 587
A 11 570 588
X 574 -3 589
A 575 525 590
X 571 -3 591
X 577 -3 592
X 576 -3 593
X 581 -3 594
A 214 570 595
A 554 569 596
X 588 -3 597
A 593 591 598
A 189 594 599
A 583 536 600
A 554 585 601
A 586 569 602
A 527 592 603
X 584 -3 604
A 515 589 605
A 595 585 606
X 605 -3 607
X 603 -3 608
A 598 556 609
A 596 606 610
X 600 -3 611
A 599 568 612
A 568 597 613
A 602 601 614
A 562 604 615
A 578 611 616
X 614 -3 617
X 610 -3 618
X 612 -3 619
A 582 607 620
A 580 611 621
A 613 615 622
X 616 -3 623
A 619 558 624
X 622 -3 625
A 590 618 626
A 620 21 627
A 609 617 628
X 621 -3 629
X 620 -3 630
X 627 -3 631
A 629 21 632
A 587 623 633
A 626 628 634
A 624 625 635
A 538 631 636
A 587 632 637
X 633 -3 638
A 608 631 639
X 634 -3 640
X 635 -3 641
X 637 -3 642
M 638 473 15 643
A 630 638 644
A 640 508 645
A 643 641 646
X 644 -3 647
A 639 642 648
X 648 -3 649
A 646 636 650
A 647 21 651
X 650 -3 652
A 649 652 653
A 645 653 654
X 654 -3 655
DFFs:
#Outputs
O 655 651 480 426 282 266 137 130 173
| {
"pile_set_name": "Github"
} |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Hunspell, based on MySpell.
*
* The Initial Developers of the Original Code are
* Kevin Hendricks (MySpell) and Németh László (Hunspell).
* Portions created by the Initial Developers are Copyright (C) 2002-2005
* the Initial Developers. All Rights Reserved.
*
* Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno,
* Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád,
* Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter,
* Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls,
* Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include "dictmgr.hxx"
#include "csutil.hxx"
DictMgr::DictMgr(const char* dictpath, const char* etype) : numdict(0) {
// load list of etype entries
pdentry = (dictentry*)malloc(MAXDICTIONARIES * sizeof(struct dictentry));
if (pdentry) {
if (parse_file(dictpath, etype)) {
numdict = 0;
// no dictionary.lst found is okay
}
}
}
DictMgr::~DictMgr() {
dictentry* pdict = NULL;
if (pdentry) {
pdict = pdentry;
for (int i = 0; i < numdict; i++) {
if (pdict->lang) {
free(pdict->lang);
pdict->lang = NULL;
}
if (pdict->region) {
free(pdict->region);
pdict->region = NULL;
}
if (pdict->filename) {
free(pdict->filename);
pdict->filename = NULL;
}
pdict++;
}
free(pdentry);
pdentry = NULL;
pdict = NULL;
}
numdict = 0;
}
// read in list of etype entries and build up structure to describe them
int DictMgr::parse_file(const char* dictpath, const char* etype) {
int i;
char line[MAXDICTENTRYLEN + 1];
dictentry* pdict = pdentry;
// open the dictionary list file
FILE* dictlst;
dictlst = myfopen(dictpath, "r");
if (!dictlst) {
return 1;
}
// step one is to parse the dictionary list building up the
// descriptive structures
// read in each line ignoring any that dont start with etype
while (fgets(line, MAXDICTENTRYLEN, dictlst)) {
mychomp(line);
/* parse in a dictionary entry */
if (strncmp(line, etype, 4) == 0) {
if (numdict < MAXDICTIONARIES) {
char* tp = line;
char* piece;
i = 0;
while ((piece = mystrsep(&tp, ' '))) {
if (*piece != '\0') {
switch (i) {
case 0:
break;
case 1:
pdict->lang = mystrdup(piece);
break;
case 2:
if (strcmp(piece, "ANY") == 0)
pdict->region = mystrdup("");
else
pdict->region = mystrdup(piece);
break;
case 3:
pdict->filename = mystrdup(piece);
break;
default:
break;
}
i++;
}
free(piece);
}
if (i == 4) {
numdict++;
pdict++;
} else {
switch (i) {
case 3:
free(pdict->region);
pdict->region = NULL;
/* FALLTHROUGH */
case 2:
free(pdict->lang);
pdict->lang = NULL;
default:
break;
}
fprintf(stderr, "dictionary list corruption in line \"%s\"\n", line);
fflush(stderr);
}
}
}
}
fclose(dictlst);
return 0;
}
// return text encoding of dictionary
int DictMgr::get_list(dictentry** ppentry) {
*ppentry = pdentry;
return numdict;
}
// strip strings into token based on single char delimiter
// acts like strsep() but only uses a delim char and not
// a delim string
char* DictMgr::mystrsep(char** stringp, const char delim) {
char* rv = NULL;
char* mp = *stringp;
size_t n = strlen(mp);
if (n > 0) {
char* dp = (char*)memchr(mp, (int)((unsigned char)delim), n);
if (dp) {
*stringp = dp + 1;
size_t nc = dp - mp;
rv = (char*)malloc(nc + 1);
if (rv) {
memcpy(rv, mp, nc);
*(rv + nc) = '\0';
}
} else {
rv = (char*)malloc(n + 1);
if (rv) {
memcpy(rv, mp, n);
*(rv + n) = '\0';
*stringp = mp + n;
}
}
}
return rv;
}
// replaces strdup with ansi version
char* DictMgr::mystrdup(const char* s) {
char* d = NULL;
if (s) {
int sl = strlen(s) + 1;
d = (char*)malloc(sl);
if (d)
memcpy(d, s, sl);
}
return d;
}
// remove cross-platform text line end characters
void DictMgr::mychomp(char* s) {
int k = strlen(s);
if ((k > 0) && ((*(s + k - 1) == '\r') || (*(s + k - 1) == '\n')))
*(s + k - 1) = '\0';
if ((k > 1) && (*(s + k - 2) == '\r'))
*(s + k - 2) = '\0';
}
| {
"pile_set_name": "Github"
} |
/*
Copyright (C) 2014, The University of Texas at Austin
This file is part of libflame and is available under the 3-Clause
BSD license, which can be found in the LICENSE file at the top-level
directory, or at http://opensource.org/licenses/BSD-3-Clause
*/
#include "FLAME.h"
#ifdef FLA_ENABLE_NON_CRITICAL_CODE
FLA_Error FLA_Symm_ru_blk_var5( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t* cntl )
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
FLA_Obj BL, BR, B0, B1, B2;
FLA_Obj CL, CR, C0, C1, C2;
dim_t b;
FLA_Scal_internal( beta, C,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_BR );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
FLA_Part_1x2( C, &CL, &CR, 0, FLA_RIGHT );
while ( FLA_Obj_length( ABR ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( ATL, FLA_TL, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, &A01, /**/ &A02,
&A10, &A11, /**/ &A12,
/* ************* */ /* ******************** */
ABL, /**/ ABR, &A20, &A21, /**/ &A22,
b, b, FLA_TL );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &B1, /**/ &B2,
b, FLA_LEFT );
FLA_Repart_1x2_to_1x3( CL, /**/ CR, &C0, &C1, /**/ &C2,
b, FLA_LEFT );
/*------------------------------------------------------------*/
/* C1 = C1 + B1 * A11 */
FLA_Symm_internal( FLA_RIGHT, FLA_UPPER_TRIANGULAR,
alpha, A11, B1, FLA_ONE, C1,
FLA_Cntl_sub_symm( cntl ) );
/* C1 = C1 + B2 * A12' */
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_TRANSPOSE,
alpha, B2, A12, FLA_ONE, C1,
FLA_Cntl_sub_gemm1( cntl ) );
/* C2 = C2 + B1 * A12 */
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, B1, A12, FLA_ONE, C2,
FLA_Cntl_sub_gemm2( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, /**/ A01, A02,
/* ************** */ /* ****************** */
A10, /**/ A11, A12,
&ABL, /**/ &ABR, A20, /**/ A21, A22,
FLA_BR );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ B1, B2,
FLA_RIGHT );
FLA_Cont_with_1x3_to_1x2( &CL, /**/ &CR, C0, /**/ C1, C2,
FLA_RIGHT );
}
return FLA_SUCCESS;
}
#endif
| {
"pile_set_name": "Github"
} |
# -*- cython -*-
#
# Tempita-templated Cython file
#
"""
Fast snippets for LIL matrices.
"""
{{py:
IDX_TYPES = {
"int32": "cnp.npy_int32",
"int64": "cnp.npy_int64",
}
VALUE_TYPES = {
"bool_": "cnp.npy_bool",
"int8": "cnp.npy_int8",
"uint8": "cnp.npy_uint8",
"int16": "cnp.npy_int16",
"uint16": "cnp.npy_uint16",
"int32": "cnp.npy_int32",
"uint32": "cnp.npy_uint32",
"int64": "cnp.npy_int64",
"uint64": "cnp.npy_uint64",
"float32": "cnp.npy_float32",
"float64": "cnp.npy_float64",
"longdouble": "long double",
"complex64": "float complex",
"complex128": "double complex",
"clongdouble": "long double complex",
}
def get_dispatch(types):
for pyname, cyname in types.items():
yield pyname, cyname
def get_dispatch2(types, types2):
for pyname, cyname in types.items():
for pyname2, cyname2 in types2.items():
yield pyname, pyname2, cyname, cyname2
def define_dispatch_map(map_name, prefix, types):
result = ["cdef dict %s = {\n" % map_name]
for pyname, cyname in types.items():
a = "np.dtype(np.%s)" % (pyname,)
b = prefix + "_" + pyname
result.append('%s: %s,' % (a, b))
result.append("}\n\n")
return "\n".join(result)
def define_dispatch_map2(map_name, prefix, types, types2):
result = ["cdef dict %s = {\n" % map_name]
for pyname, cyname in types.items():
for pyname2, cyname2 in types2.items():
a = "(np.dtype(np.%s), np.dtype(np.%s))" % (pyname, pyname2)
b = prefix + "_" + pyname + "_" + pyname2
result.append('%s: %s,' % (a, b))
result.append("}\n\n")
return "\n".join(result)
}}
cimport cython
cimport numpy as cnp
import numpy as np
cnp.import_array()
@cython.wraparound(False)
cpdef lil_get1(cnp.npy_intp M, cnp.npy_intp N, object[:] rows, object[:] datas,
cnp.npy_intp i, cnp.npy_intp j):
"""
Get a single item from LIL matrix.
Doesn't do output type conversion. Checks for bounds errors.
Parameters
----------
M, N, rows, datas
Shape and data arrays for a LIL matrix
i, j : int
Indices at which to get
Returns
-------
x
Value at indices.
"""
cdef list row, data
if i < -M or i >= M:
raise IndexError('row index (%d) out of bounds' % (i,))
if i < 0:
i += M
if j < -N or j >= N:
raise IndexError('column index (%d) out of bounds' % (j,))
if j < 0:
j += N
row = rows[i]
data = datas[i]
cdef cnp.npy_intp pos = bisect_left(row, j)
if pos != len(data) and row[pos] == j:
return data[pos]
else:
return 0
@cython.wraparound(False)
cpdef int lil_insert(cnp.npy_intp M, cnp.npy_intp N, object[:] rows,
object[:] datas, cnp.npy_intp i, cnp.npy_intp j,
object x) except -1:
"""
Insert a single item to LIL matrix.
Checks for bounds errors and deletes item if x is zero.
Parameters
----------
M, N, rows, datas
Shape and data arrays for a LIL matrix
i, j : int
Indices at which to get
x
Value to insert.
"""
cdef list row, data
if i < -M or i >= M:
raise IndexError('row index (%d) out of bounds' % (i,))
if i < 0:
i += M
if j < -N or j >= N:
raise IndexError('column index (%d) out of bounds' % (j,))
if j < 0:
j += N
row = rows[i]
data = datas[i]
cdef cnp.npy_intp pos = bisect_left(row, j)
if x == 0:
if pos < len(row) and row[pos] == j:
del row[pos]
del data[pos]
else:
if pos == len(row):
row.append(j)
data.append(x)
elif row[pos] != j:
row.insert(pos, j)
data.insert(pos, x)
else:
data[pos] = x
def lil_fancy_get(cnp.npy_intp M, cnp.npy_intp N,
object[:] rows,
object[:] datas,
object[:] new_rows,
object[:] new_datas,
cnp.ndarray i_idx,
cnp.ndarray j_idx):
"""
Get multiple items at given indices in LIL matrix and store to
another LIL.
Parameters
----------
M, N, rows, data
LIL matrix data, initially empty
new_rows, new_idx
Data for LIL matrix to insert to.
Must be preallocated to shape `i_idx.shape`!
i_idx, j_idx
Indices of elements to insert to the new LIL matrix.
"""
return _LIL_FANCY_GET_DISPATCH[i_idx.dtype](M, N, rows, datas, new_rows, new_datas, i_idx, j_idx)
{{for NAME, IDX_T in get_dispatch(IDX_TYPES)}}
def _lil_fancy_get_{{NAME}}(cnp.npy_intp M, cnp.npy_intp N,
object[:] rows,
object[:] datas,
object[:] new_rows,
object[:] new_datas,
{{IDX_T}}[:,:] i_idx,
{{IDX_T}}[:,:] j_idx):
cdef cnp.npy_intp x, y
cdef cnp.npy_intp i, j
cdef object value
cdef list new_row
cdef list new_data
for x in range(i_idx.shape[0]):
new_row = []
new_data = []
for y in range(i_idx.shape[1]):
i = i_idx[x,y]
j = j_idx[x,y]
value = lil_get1(M, N, rows, datas, i, j)
if value is not 0:
# Object identity as shortcut
new_row.append(y)
new_data.append(value)
new_rows[x] = new_row
new_datas[x] = new_data
{{endfor}}
{{define_dispatch_map('_LIL_FANCY_GET_DISPATCH', '_lil_fancy_get', IDX_TYPES)}}
def lil_fancy_set(cnp.npy_intp M, cnp.npy_intp N,
object[:] rows,
object[:] data,
cnp.ndarray i_idx,
cnp.ndarray j_idx,
cnp.ndarray values):
"""
Set multiple items to a LIL matrix.
Checks for zero elements and deletes them.
Parameters
----------
M, N, rows, data
LIL matrix data
i_idx, j_idx
Indices of elements to insert to the new LIL matrix.
values
Values of items to set.
"""
if values.dtype == np.bool_:
# Cython doesn't support np.bool_ as a memoryview type
values = values.view(dtype=np.uint8)
assert i_idx.shape[0] == j_idx.shape[0] and i_idx.shape[1] == j_idx.shape[1]
return _LIL_FANCY_SET_DISPATCH[i_idx.dtype, values.dtype](M, N, rows, data, i_idx, j_idx, values)
{{for PYIDX, PYVALUE, IDX_T, VALUE_T in get_dispatch2(IDX_TYPES, VALUE_TYPES)}}
@cython.boundscheck(False)
@cython.wraparound(False)
def _lil_fancy_set_{{PYIDX}}_{{PYVALUE}}(cnp.npy_intp M, cnp.npy_intp N,
object[:] rows,
object[:] data,
{{IDX_T}}[:,:] i_idx,
{{IDX_T}}[:,:] j_idx,
{{VALUE_T}}[:,:] values):
cdef cnp.npy_intp x, y
cdef cnp.npy_intp i, j
for x in range(i_idx.shape[0]):
for y in range(i_idx.shape[1]):
i = i_idx[x,y]
j = j_idx[x,y]
lil_insert(M, N, rows, data, i, j, values[x, y])
{{endfor}}
{{define_dispatch_map2('_LIL_FANCY_SET_DISPATCH', '_lil_fancy_set', IDX_TYPES, VALUE_TYPES)}}
def lil_get_row_ranges(cnp.npy_intp M, cnp.npy_intp N,
object[:] rows, object[:] datas,
object[:] new_rows, object[:] new_datas,
object irows,
cnp.npy_intp j_start,
cnp.npy_intp j_stop,
cnp.npy_intp j_stride,
cnp.npy_intp nj):
"""
Column-slicing fast path for LIL matrices.
Extracts values from rows/datas and inserts in to
new_rows/new_datas.
Parameters
----------
M, N
Shape of input array
rows, datas
LIL data for input array, shape (M, N)
new_rows, new_datas
LIL data for output array, shape (len(irows), nj)
irows : iterator
Iterator yielding row indices
j_start, j_stop, j_stride
Column range(j_start, j_stop, j_stride) to get
nj : int
Number of columns corresponding to j_* variables.
"""
cdef cnp.npy_intp nk, k, j, a, b, m, r, p
cdef list cur_row, cur_data, new_row, new_data
if j_stride == 0:
raise ValueError("cannot index with zero stride")
for nk, k in enumerate(irows):
if k >= M or k < -M:
raise ValueError("row index %d out of bounds" % (k,))
if k < 0:
k += M
if j_stride == 1 and nj == N:
# full row slice
new_rows[nk] = list(rows[k])
new_datas[nk] = list(datas[k])
else:
# partial row slice
cur_row = rows[k]
cur_data = datas[k]
new_row = new_rows[nk]
new_data = new_datas[nk]
if j_stride > 0:
a = bisect_left(cur_row, j_start)
for m in range(a, len(cur_row)):
j = cur_row[m]
if j >= j_stop:
break
r = (j - j_start) % j_stride
if r != 0:
continue
p = (j - j_start) // j_stride
new_row.append(p)
new_data.append(cur_data[m])
else:
a = bisect_right(cur_row, j_stop)
for m in range(a, len(cur_row)):
j = cur_row[m]
if j > j_start:
break
r = (j - j_start) % j_stride
if r != 0:
continue
p = (j - j_start) // j_stride
new_row.insert(0, p)
new_data.insert(0, cur_data[m])
@cython.cdivision(True)
@cython.boundscheck(False)
@cython.wraparound(False)
cdef inline cnp.npy_intp bisect_left(list a, cnp.npy_intp x) except -1:
"""
Bisection search in a sorted list.
List is assumed to contain objects castable to integers.
Parameters
----------
a
List to search in
x
Value to search for
Returns
-------
j : int
Index at value (if present), or at the point to which
it can be inserted maintaining order.
"""
cdef Py_ssize_t hi = len(a)
cdef Py_ssize_t lo = 0
cdef Py_ssize_t mid, v
while lo < hi:
mid = lo + (hi - lo) // 2
v = a[mid]
if v < x:
lo = mid + 1
else:
hi = mid
return lo
@cython.cdivision(True)
@cython.boundscheck(False)
@cython.wraparound(False)
cdef inline cnp.npy_intp bisect_right(list a, cnp.npy_intp x) except -1:
"""
Bisection search in a sorted list.
List is assumed to contain objects castable to integers.
Parameters
----------
a
List to search in
x
Value to search for
Returns
-------
j : int
Index immediately at the right of the value (if present), or at
the point to which it can be inserted maintaining order.
"""
cdef cnp.npy_intp hi = len(a)
cdef cnp.npy_intp lo = 0
cdef cnp.npy_intp mid, v
while lo < hi:
mid = (lo + hi) // 2
v = a[mid]
if x < v:
hi = mid
else:
lo = mid + 1
return lo
cdef _fill_dtype_map(map, chars):
"""
Fill in Numpy dtype chars for problematic types, working around
Numpy < 1.6 bugs.
"""
for c in chars:
if c in "SUVO":
continue
dt = np.dtype(c)
if dt not in map:
for k, v in map.items():
if k.kind == dt.kind and k.itemsize == dt.itemsize:
map[dt] = v
break
cdef _fill_dtype_map2(map):
"""
Fill in Numpy dtype chars for problematic types, working around
Numpy < 1.6 bugs.
"""
for c1 in np.typecodes['Integer']:
for c2 in np.typecodes['All']:
if c2 in "SUVO":
continue
dt1 = np.dtype(c1)
dt2 = np.dtype(c2)
if (dt1, dt2) not in map:
for k, v in map.items():
if (k[0].kind == dt1.kind and k[0].itemsize == dt1.itemsize and
k[1].kind == dt2.kind and k[1].itemsize == dt2.itemsize):
map[(dt1, dt2)] = v
break
_fill_dtype_map(_LIL_FANCY_GET_DISPATCH, np.typecodes['Integer'])
_fill_dtype_map2(_LIL_FANCY_SET_DISPATCH)
| {
"pile_set_name": "Github"
} |
import sys
sys.path.append("static2/")
import static2
def test():
static = static2.Static('qira_tests/bin/loop', debug=1)
static.process()
| {
"pile_set_name": "Github"
} |
using System;
using Server.Items;
namespace Server.Items
{
public class AncientWildStaff : WildStaff
{
public override int LabelNumber{ get{ return 1073550; } } // ancient wild staff
[Constructable]
public AncientWildStaff()
{
WeaponAttributes.ResistPoisonBonus = 5;
}
public AncientWildStaff( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}
| {
"pile_set_name": "Github"
} |
/**
* * Copyright © 2015-2020 <a href="https://gitee.com/JeeHuangBingGui/jeeSpringCloud">JeeSpringCloud</a> All rights reserved..
*/
package com.jeespring.modules.test.service.one;
import com.jeespring.common.persistence.InterfaceBaseService;
import com.jeespring.modules.server.entity.SysServer;
import com.jeespring.modules.test.entity.one.FormLeave;
/**
* I请假Service
* @author JeeSpring
* @version 2018-10-12
*/
public interface IFormLeaveService extends InterfaceBaseService<FormLeave> {
} | {
"pile_set_name": "Github"
} |
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_INTEL_TH) += intel_th.o
intel_th-y := core.o
intel_th-$(CONFIG_INTEL_TH_DEBUG) += debug.o
obj-$(CONFIG_INTEL_TH_PCI) += intel_th_pci.o
intel_th_pci-y := pci.o
obj-$(CONFIG_INTEL_TH_GTH) += intel_th_gth.o
intel_th_gth-y := gth.o
obj-$(CONFIG_INTEL_TH_STH) += intel_th_sth.o
intel_th_sth-y := sth.o
obj-$(CONFIG_INTEL_TH_MSU) += intel_th_msu.o
intel_th_msu-y := msu.o
obj-$(CONFIG_INTEL_TH_PTI) += intel_th_pti.o
intel_th_pti-y := pti.o
| {
"pile_set_name": "Github"
} |
op {
name: "QuantizeAndDequantizeV3"
input_arg {
name: "input"
type_attr: "T"
}
input_arg {
name: "input_min"
type_attr: "T"
}
input_arg {
name: "input_max"
type_attr: "T"
}
input_arg {
name: "num_bits"
type: DT_INT32
}
output_arg {
name: "output"
type_attr: "T"
}
attr {
name: "signed_input"
type: "bool"
default_value {
b: true
}
}
attr {
name: "range_given"
type: "bool"
default_value {
b: true
}
}
attr {
name: "T"
type: "type"
allowed_values {
list {
type: DT_FLOAT
type: DT_DOUBLE
}
}
}
}
op {
name: "QuantizeAndDequantizeV3"
input_arg {
name: "input"
type_attr: "T"
}
input_arg {
name: "input_min"
type_attr: "T"
}
input_arg {
name: "input_max"
type_attr: "T"
}
input_arg {
name: "num_bits"
type: DT_INT32
}
output_arg {
name: "output"
type_attr: "T"
}
attr {
name: "signed_input"
type: "bool"
default_value {
b: true
}
}
attr {
name: "range_given"
type: "bool"
default_value {
b: true
}
}
attr {
name: "T"
type: "type"
allowed_values {
list {
type: DT_BFLOAT16
type: DT_FLOAT
type: DT_DOUBLE
}
}
}
}
op {
name: "QuantizeAndDequantizeV3"
input_arg {
name: "input"
type_attr: "T"
}
input_arg {
name: "input_min"
type_attr: "T"
}
input_arg {
name: "input_max"
type_attr: "T"
}
input_arg {
name: "num_bits"
type: DT_INT32
}
output_arg {
name: "output"
type_attr: "T"
}
attr {
name: "signed_input"
type: "bool"
default_value {
b: true
}
}
attr {
name: "range_given"
type: "bool"
default_value {
b: true
}
}
attr {
name: "T"
type: "type"
allowed_values {
list {
type: DT_BFLOAT16
type: DT_HALF
type: DT_FLOAT
type: DT_DOUBLE
}
}
}
}
op {
name: "QuantizeAndDequantizeV3"
input_arg {
name: "input"
type_attr: "T"
}
input_arg {
name: "input_min"
type_attr: "T"
}
input_arg {
name: "input_max"
type_attr: "T"
}
input_arg {
name: "num_bits"
type: DT_INT32
}
output_arg {
name: "output"
type_attr: "T"
}
attr {
name: "signed_input"
type: "bool"
default_value {
b: true
}
}
attr {
name: "range_given"
type: "bool"
default_value {
b: true
}
}
attr {
name: "T"
type: "type"
allowed_values {
list {
type: DT_BFLOAT16
type: DT_HALF
type: DT_FLOAT
type: DT_DOUBLE
}
}
}
attr {
name: "narrow_range"
type: "bool"
default_value {
b: false
}
}
attr {
name: "axis"
type: "int"
default_value {
i: -1
}
}
}
| {
"pile_set_name": "Github"
} |
/*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADAMax.
Portions of the code are:
Copyright (c) 2005-2007 Feeling Software Inc.
Copyright (c) 2005-2007 Sony Computer Entertainment America
Based on the 3dsMax COLLADASW Tools:
Copyright (c) 2005-2006 Autodesk Media Entertainment
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
http://www.opensource.org/licenses/mit-license.php
*/
#include "COLLADAMaxStableHeaders.h"
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2013 Red Hat Inc.
*
* 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: Ben Skeggs <[email protected]>
*/
#include "nv50.h"
static const struct nvkm_clk_func
g84_clk = {
.read = nv50_clk_read,
.calc = nv50_clk_calc,
.prog = nv50_clk_prog,
.tidy = nv50_clk_tidy,
.domains = {
{ nv_clk_src_crystal, 0xff },
{ nv_clk_src_href , 0xff },
{ nv_clk_src_core , 0xff, 0, "core", 1000 },
{ nv_clk_src_shader , 0xff, 0, "shader", 1000 },
{ nv_clk_src_mem , 0xff, 0, "memory", 1000 },
{ nv_clk_src_vdec , 0xff },
{ nv_clk_src_max }
}
};
int
g84_clk_new(struct nvkm_device *device, int index, struct nvkm_clk **pclk)
{
return nv50_clk_new_(&g84_clk, device, index,
(device->chipset >= 0x94), pclk);
}
| {
"pile_set_name": "Github"
} |
prog: ../../memcheck/tests/wrap5
cleanup: rm cachegrind.out.*
| {
"pile_set_name": "Github"
} |
//
// SINDiscoveryViewController.h
// PLMMPRJK
//
// Created by HuXuPeng on 2017/5/11.
// Copyright © 2017年 GoMePrjk. All rights reserved.
//
#import "LMJBaseViewController.h"
#import "SIN.h"
@interface SINDiscoveryViewController : LMJBaseViewController
@end
| {
"pile_set_name": "Github"
} |
// Copyright (c) 2001-2011 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.lslboost.org/LICENSE_1_0.txt)
#if !defined(BOOST_SPIRIT_LEXER_MAR_22_2007_1008PM)
#define BOOST_SPIRIT_LEXER_MAR_22_2007_1008PM
#if defined(_MSC_VER)
#pragma once
#endif
#include <lslboost/spirit/home/lex/lexer/terminals.hpp>
#include <lslboost/spirit/home/lex/lexer/token_def.hpp>
#include <lslboost/spirit/home/lex/lexer/char_token_def.hpp>
#include <lslboost/spirit/home/lex/lexer/string_token_def.hpp>
#include <lslboost/spirit/home/lex/lexer/sequence.hpp>
#include <lslboost/spirit/home/lex/lexer/action.hpp>
#include <lslboost/spirit/home/lex/lexer/lexer.hpp>
#endif
| {
"pile_set_name": "Github"
} |
let rec join = function
| [] -> ""
| [x] -> x
| [x;y] -> x ^ " and " ^ y
| x::xs -> x ^ ", " ^ join xs
| {
"pile_set_name": "Github"
} |
class Calculator{
*--* Number;
0..1--* Controller;
generic test checkifLogged(*--* association){
Calculator c1 ( 4, 5) ;
String valueToCheck = p1.get<<association>>();
Number temp<<association.toSingular()>> = <<association>>;
}
}
class Number {
}
class Controller {
}
| {
"pile_set_name": "Github"
} |
/**
* 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.
*/
package org.apache.distributedlog.benchmark;
import static com.google.common.base.Preconditions.checkArgument;
import org.apache.distributedlog.api.AsyncLogWriter;
import org.apache.distributedlog.DLSN;
import org.apache.distributedlog.DistributedLogConfiguration;
import org.apache.distributedlog.api.DistributedLogManager;
import org.apache.distributedlog.LogRecord;
import org.apache.distributedlog.api.namespace.Namespace;
import org.apache.distributedlog.benchmark.utils.ShiftableRateLimiter;
import org.apache.distributedlog.api.namespace.NamespaceBuilder;
import org.apache.distributedlog.common.concurrent.FutureEventListener;
import org.apache.distributedlog.common.concurrent.FutureUtils;
import org.apache.distributedlog.common.util.SchedulerUtils;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.bookkeeper.stats.OpStatsLogger;
import org.apache.bookkeeper.stats.StatsLogger;
import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The benchmark for core library writer.
*/
public class DLWriterWorker implements Worker {
private static final Logger LOG = LoggerFactory.getLogger(DLWriterWorker.class);
static final int BACKOFF_MS = 200;
final String streamPrefix;
final int startStreamId;
final int endStreamId;
final int writeConcurrency;
final int messageSizeBytes;
final ExecutorService executorService;
final ScheduledExecutorService rescueService;
final ShiftableRateLimiter rateLimiter;
final Random random;
final Namespace namespace;
final List<DistributedLogManager> dlms;
final List<AsyncLogWriter> streamWriters;
final int numStreams;
volatile boolean running = true;
final StatsLogger statsLogger;
final OpStatsLogger requestStat;
public DLWriterWorker(DistributedLogConfiguration conf,
URI uri,
String streamPrefix,
int startStreamId,
int endStreamId,
ShiftableRateLimiter rateLimiter,
int writeConcurrency,
int messageSizeBytes,
StatsLogger statsLogger) throws IOException {
checkArgument(startStreamId <= endStreamId);
this.streamPrefix = streamPrefix;
this.startStreamId = startStreamId;
this.endStreamId = endStreamId;
this.rateLimiter = rateLimiter;
this.writeConcurrency = writeConcurrency;
this.messageSizeBytes = messageSizeBytes;
this.statsLogger = statsLogger;
this.requestStat = this.statsLogger.getOpStatsLogger("requests");
this.executorService = Executors.newCachedThreadPool();
this.rescueService = Executors.newSingleThreadScheduledExecutor();
this.random = new Random(System.currentTimeMillis());
this.namespace = NamespaceBuilder.newBuilder()
.conf(conf)
.uri(uri)
.statsLogger(statsLogger.scope("dl"))
.build();
this.numStreams = endStreamId - startStreamId;
dlms = new ArrayList<DistributedLogManager>(numStreams);
streamWriters = new ArrayList<AsyncLogWriter>(numStreams);
final ConcurrentMap<String, AsyncLogWriter> writers = new ConcurrentHashMap<String, AsyncLogWriter>();
final CountDownLatch latch = new CountDownLatch(this.numStreams);
for (int i = startStreamId; i < endStreamId; i++) {
final String streamName = String.format("%s_%d", streamPrefix, i);
final DistributedLogManager dlm = namespace.openLog(streamName);
executorService.submit(new Runnable() {
@Override
public void run() {
try {
AsyncLogWriter writer = dlm.startAsyncLogSegmentNonPartitioned();
if (null != writers.putIfAbsent(streamName, writer)) {
FutureUtils.result(writer.asyncClose());
}
latch.countDown();
} catch (Exception e) {
LOG.error("Failed to intialize writer for stream : {}", streamName, e);
}
}
});
dlms.add(dlm);
}
try {
latch.await();
} catch (InterruptedException e) {
throw new IOException("Interrupted on initializing writers for streams.", e);
}
for (int i = startStreamId; i < endStreamId; i++) {
final String streamName = String.format("%s_%d", streamPrefix, i);
AsyncLogWriter writer = writers.get(streamName);
if (null == writer) {
throw new IOException("Writer for " + streamName + " never initialized.");
}
streamWriters.add(writer);
}
LOG.info("Writing to {} streams.", numStreams);
}
void rescueWriter(int idx, AsyncLogWriter writer) {
if (streamWriters.get(idx) == writer) {
try {
FutureUtils.result(writer.asyncClose());
} catch (Exception e) {
LOG.error("Failed to close writer for stream {}.", idx);
}
AsyncLogWriter newWriter = null;
try {
newWriter = dlms.get(idx).startAsyncLogSegmentNonPartitioned();
} catch (IOException e) {
LOG.error("Failed to create new writer for stream {}, backoff for {} ms.",
idx, BACKOFF_MS);
scheduleRescue(idx, writer, BACKOFF_MS);
}
streamWriters.set(idx, newWriter);
} else {
LOG.warn("AsyncLogWriter for stream {} was already rescued.", idx);
}
}
void scheduleRescue(final int idx, final AsyncLogWriter writer, int delayMs) {
Runnable r = new Runnable() {
@Override
public void run() {
rescueWriter(idx, writer);
}
};
if (delayMs > 0) {
rescueService.schedule(r, delayMs, TimeUnit.MILLISECONDS);
} else {
rescueService.submit(r);
}
}
@Override
public void close() throws IOException {
this.running = false;
SchedulerUtils.shutdownScheduler(this.executorService, 2, TimeUnit.MINUTES);
SchedulerUtils.shutdownScheduler(this.rescueService, 2, TimeUnit.MINUTES);
for (AsyncLogWriter writer : streamWriters) {
org.apache.distributedlog.util.Utils.ioResult(writer.asyncClose());
}
for (DistributedLogManager dlm : dlms) {
dlm.close();
}
namespace.close();
}
@Override
public void run() {
LOG.info("Starting dlwriter (concurrency = {}, prefix = {}, numStreams = {})",
new Object[] { writeConcurrency, streamPrefix, numStreams });
for (int i = 0; i < writeConcurrency; i++) {
executorService.submit(new Writer(i));
}
}
class Writer implements Runnable {
final int idx;
Writer(int idx) {
this.idx = idx;
}
@Override
public void run() {
LOG.info("Started writer {}.", idx);
while (running) {
final int streamIdx = random.nextInt(numStreams);
final AsyncLogWriter writer = streamWriters.get(streamIdx);
rateLimiter.getLimiter().acquire();
final long requestMillis = System.currentTimeMillis();
final byte[] data;
try {
data = Utils.generateMessage(requestMillis, messageSizeBytes);
} catch (TException e) {
LOG.error("Error on generating message : ", e);
break;
}
writer.write(new LogRecord(requestMillis, data)).whenComplete(new FutureEventListener<DLSN>() {
@Override
public void onSuccess(DLSN value) {
requestStat.registerSuccessfulEvent(
System.currentTimeMillis() - requestMillis, TimeUnit.MILLISECONDS);
}
@Override
public void onFailure(Throwable cause) {
requestStat.registerFailedEvent(
System.currentTimeMillis() - requestMillis, TimeUnit.MILLISECONDS);
LOG.error("Failed to publish, rescue it : ", cause);
scheduleRescue(streamIdx, writer, 0);
}
});
}
}
}
}
| {
"pile_set_name": "Github"
} |
DCM4CHE.elementName.addDictionary({
"privateCreator":"SIEMENS RA GEN",
"0011xx20":"?",
"0011xx25":"?",
"0011xx26":"?",
"0011xx30":"?",
"0011xx35":"?",
"0011xx40":"?",
"0019xx15":"?",
"0019xx1F":"?",
"0019xx20":"?",
"0019xx22":"?",
"0019xx24":"?",
"0019xx26":"?",
"0019xx28":"?",
"0019xx2C":"?",
"0019xx2A":"?",
"0019xx2E":"?",
"0019xx30":"?",
"0019xx34":"?",
"0019xx36":"?",
"0019xx38":"?",
"0019xx3A":"?",
"0019xx3C":"?",
"0019xx3E":"?",
"0019xx32":"?",
"0019xx40":"?",
"0019xx42":"?",
"0019xx44":"?",
"0019xx46":"?",
"0019xx48":"?",
"0019xx4A":"?",
"0019xx4C":"?",
"0019xx50":"?",
"0019xx52":"?",
"0019xx54":"?",
"0019xx56":"?",
"0019xx58":"?",
"0019xx5A":"?",
"0019xx5C":"?",
"0019xx5E":"?",
"0019xx60":"?",
"0019xx62":"?",
"0019xx64":"?",
"0019xx66":"?",
"0019xx68":"?",
"0019xx6A":"?",
"0019xx70":"?",
"0019xx72":"?",
"0019xx74":"?",
"0019xx76":"?",
"0019xx78":"?",
"0019xx7A":"?",
"0019xx7C":"?",
"0019xx7E":"?",
"0019xx80":"?",
"0019xx82":"?",
"0019xx84":"?",
"0019xx86":"?",
"0019xx88":"?",
"0019xx8A":"?",
"0019xx8C":"?",
"0019xx8E":"?",
"0019xx92":"?",
"0019xx96":"?",
"0019xx98":"?",
"0019xx9A":"?",
"0019xx9C":"?",
"0019xx9E":"?",
"0019xx94":"?",
"0019xxA2":"?",
"0019xxA4":"?",
"0019xxA5":"?",
"0019xxA6":"?",
"0019xxA7":"?",
"0019xxA8":"?",
"0019xxA9":"?",
"0019xxAA":"?",
"0019xxAB":"?",
"0019xxAC":"?",
"0019xxAD":"?",
"0019xxFF":"?",
"0021xx15":"?",
"0021xx20":"?",
"0021xx25":"?",
"0021xx27":"?",
"0021xx28":"?",
"0021xx30":"?",
"0021xx40":"?"
});
| {
"pile_set_name": "Github"
} |
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"expansion_generated.go",
"job.go",
"job_expansion.go",
],
importpath = "k8s.io/client-go/listers/batch/v1",
deps = [
"//vendor/k8s.io/api/batch/v1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2004, 2020, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* 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.
*/
package sun.net.util;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
import java.security.PrivilegedActionException;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
public class IPAddressUtil {
private static final int INADDR4SZ = 4;
private static final int INADDR16SZ = 16;
private static final int INT16SZ = 2;
/*
* Converts IPv4 address in its textual presentation form
* into its numeric binary form.
*
* @param src a String representing an IPv4 address in standard format
* @return a byte array representing the IPv4 numeric address
*/
@SuppressWarnings("fallthrough")
public static byte[] textToNumericFormatV4(String src)
{
byte[] res = new byte[INADDR4SZ];
long tmpValue = 0;
int currByte = 0;
boolean newOctet = true;
int len = src.length();
if (len == 0 || len > 15) {
return null;
}
/*
* When only one part is given, the value is stored directly in
* the network address without any byte rearrangement.
*
* When a two part address is supplied, the last part is
* interpreted as a 24-bit quantity and placed in the right
* most three bytes of the network address. This makes the
* two part address format convenient for specifying Class A
* network addresses as net.host.
*
* When a three part address is specified, the last part is
* interpreted as a 16-bit quantity and placed in the right
* most two bytes of the network address. This makes the
* three part address format convenient for specifying
* Class B net- work addresses as 128.net.host.
*
* When four parts are specified, each is interpreted as a
* byte of data and assigned, from left to right, to the
* four bytes of an IPv4 address.
*
* We determine and parse the leading parts, if any, as single
* byte values in one pass directly into the resulting byte[],
* then the remainder is treated as a 8-to-32-bit entity and
* translated into the remaining bytes in the array.
*/
for (int i = 0; i < len; i++) {
char c = src.charAt(i);
if (c == '.') {
if (newOctet || tmpValue < 0 || tmpValue > 0xff || currByte == 3) {
return null;
}
res[currByte++] = (byte) (tmpValue & 0xff);
tmpValue = 0;
newOctet = true;
} else {
int digit = Character.digit(c, 10);
if (digit < 0) {
return null;
}
tmpValue *= 10;
tmpValue += digit;
newOctet = false;
}
}
if (newOctet || tmpValue < 0 || tmpValue >= (1L << ((4 - currByte) * 8))) {
return null;
}
switch (currByte) {
case 0:
res[0] = (byte) ((tmpValue >> 24) & 0xff);
case 1:
res[1] = (byte) ((tmpValue >> 16) & 0xff);
case 2:
res[2] = (byte) ((tmpValue >> 8) & 0xff);
case 3:
res[3] = (byte) ((tmpValue >> 0) & 0xff);
}
return res;
}
/*
* Convert IPv6 presentation level address to network order binary form.
* credit:
* Converted from C code from Solaris 8 (inet_pton)
*
* Any component of the string following a per-cent % is ignored.
*
* @param src a String representing an IPv6 address in textual format
* @return a byte array representing the IPv6 numeric address
*/
public static byte[] textToNumericFormatV6(String src)
{
// Shortest valid string is "::", hence at least 2 chars
if (src.length() < 2) {
return null;
}
int colonp;
char ch;
boolean saw_xdigit;
int val;
char[] srcb = src.toCharArray();
byte[] dst = new byte[INADDR16SZ];
int srcb_length = srcb.length;
int pc = src.indexOf ('%');
if (pc == srcb_length -1) {
return null;
}
if (pc != -1) {
srcb_length = pc;
}
colonp = -1;
int i = 0, j = 0;
/* Leading :: requires some special handling. */
if (srcb[i] == ':')
if (srcb[++i] != ':')
return null;
int curtok = i;
saw_xdigit = false;
val = 0;
while (i < srcb_length) {
ch = srcb[i++];
int chval = Character.digit(ch, 16);
if (chval != -1) {
val <<= 4;
val |= chval;
if (val > 0xffff)
return null;
saw_xdigit = true;
continue;
}
if (ch == ':') {
curtok = i;
if (!saw_xdigit) {
if (colonp != -1)
return null;
colonp = j;
continue;
} else if (i == srcb_length) {
return null;
}
if (j + INT16SZ > INADDR16SZ)
return null;
dst[j++] = (byte) ((val >> 8) & 0xff);
dst[j++] = (byte) (val & 0xff);
saw_xdigit = false;
val = 0;
continue;
}
if (ch == '.' && ((j + INADDR4SZ) <= INADDR16SZ)) {
String ia4 = src.substring(curtok, srcb_length);
/* check this IPv4 address has 3 dots, i.e. A.B.C.D */
int dot_count = 0, index=0;
while ((index = ia4.indexOf ('.', index)) != -1) {
dot_count ++;
index ++;
}
if (dot_count != 3) {
return null;
}
byte[] v4addr = textToNumericFormatV4(ia4);
if (v4addr == null) {
return null;
}
for (int k = 0; k < INADDR4SZ; k++) {
dst[j++] = v4addr[k];
}
saw_xdigit = false;
break; /* '\0' was seen by inet_pton4(). */
}
return null;
}
if (saw_xdigit) {
if (j + INT16SZ > INADDR16SZ)
return null;
dst[j++] = (byte) ((val >> 8) & 0xff);
dst[j++] = (byte) (val & 0xff);
}
if (colonp != -1) {
int n = j - colonp;
if (j == INADDR16SZ)
return null;
for (i = 1; i <= n; i++) {
dst[INADDR16SZ - i] = dst[colonp + n - i];
dst[colonp + n - i] = 0;
}
j = INADDR16SZ;
}
if (j != INADDR16SZ)
return null;
byte[] newdst = convertFromIPv4MappedAddress(dst);
if (newdst != null) {
return newdst;
} else {
return dst;
}
}
/**
* @param src a String representing an IPv4 address in textual format
* @return a boolean indicating whether src is an IPv4 literal address
*/
public static boolean isIPv4LiteralAddress(String src) {
return textToNumericFormatV4(src) != null;
}
/**
* @param src a String representing an IPv6 address in textual format
* @return a boolean indicating whether src is an IPv6 literal address
*/
public static boolean isIPv6LiteralAddress(String src) {
return textToNumericFormatV6(src) != null;
}
/*
* Convert IPv4-Mapped address to IPv4 address. Both input and
* returned value are in network order binary form.
*
* @param src a String representing an IPv4-Mapped address in textual format
* @return a byte array representing the IPv4 numeric address
*/
public static byte[] convertFromIPv4MappedAddress(byte[] addr) {
if (isIPv4MappedAddress(addr)) {
byte[] newAddr = new byte[INADDR4SZ];
System.arraycopy(addr, 12, newAddr, 0, INADDR4SZ);
return newAddr;
}
return null;
}
/**
* Utility routine to check if the InetAddress is an
* IPv4 mapped IPv6 address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* an IPv4 mapped IPv6 address; or false if address is IPv4 address.
*/
private static boolean isIPv4MappedAddress(byte[] addr) {
if (addr.length < INADDR16SZ) {
return false;
}
if ((addr[0] == 0x00) && (addr[1] == 0x00) &&
(addr[2] == 0x00) && (addr[3] == 0x00) &&
(addr[4] == 0x00) && (addr[5] == 0x00) &&
(addr[6] == 0x00) && (addr[7] == 0x00) &&
(addr[8] == 0x00) && (addr[9] == 0x00) &&
(addr[10] == (byte)0xff) &&
(addr[11] == (byte)0xff)) {
return true;
}
return false;
}
/**
* Mapping from unscoped local Inet(6)Address to the same address
* including the correct scope-id, determined from NetworkInterface.
*/
private final static ConcurrentHashMap<InetAddress,InetAddress>
cache = new ConcurrentHashMap<>();
/**
* Returns a scoped version of the supplied local, link-local ipv6 address
* if that scope-id can be determined from local NetworkInterfaces.
* If the address already has a scope-id or if the address is not local, ipv6
* or link local, then the original address is returned.
*
* @param address
* @exception SocketException if the given ipv6 link local address is found
* on more than one local interface
* @return
*/
public static InetAddress toScopedAddress(InetAddress address)
throws SocketException {
if (address instanceof Inet6Address && address.isLinkLocalAddress()
&& ((Inet6Address) address).getScopeId() == 0) {
InetAddress cached = null;
try {
cached = cache.computeIfAbsent(address, k -> findScopedAddress(k));
} catch (UncheckedIOException e) {
throw (SocketException)e.getCause();
}
return cached != null ? cached : address;
} else {
return address;
}
}
/**
* Same as above for InetSocketAddress
*/
public static InetSocketAddress toScopedAddress(InetSocketAddress address)
throws SocketException {
InetAddress addr;
InetAddress orig = address.getAddress();
if ((addr = toScopedAddress(orig)) == orig) {
return address;
} else {
return new InetSocketAddress(addr, address.getPort());
}
}
private static InetAddress findScopedAddress(InetAddress address) {
PrivilegedExceptionAction<List<InetAddress>> pa = () -> NetworkInterface.networkInterfaces()
.flatMap(NetworkInterface::inetAddresses)
.filter(a -> (a instanceof Inet6Address)
&& address.equals(a)
&& ((Inet6Address) a).getScopeId() != 0)
.collect(Collectors.toList());
List<InetAddress> result;
try {
result = AccessController.doPrivileged(pa);
var sz = result.size();
if (sz == 0)
return null;
if (sz > 1)
throw new UncheckedIOException(new SocketException(
"Duplicate link local addresses: must specify scope-id"));
return result.get(0);
} catch (PrivilegedActionException pae) {
return null;
}
}
// See java.net.URI for more details on how to generate these
// masks.
//
// square brackets
private static final long L_IPV6_DELIMS = 0x0L; // "[]"
private static final long H_IPV6_DELIMS = 0x28000000L; // "[]"
// RFC 3986 gen-delims
private static final long L_GEN_DELIMS = 0x8400800800000000L; // ":/?#[]@"
private static final long H_GEN_DELIMS = 0x28000001L; // ":/?#[]@"
// These gen-delims can appear in authority
private static final long L_AUTH_DELIMS = 0x400000000000000L; // "@[]:"
private static final long H_AUTH_DELIMS = 0x28000001L; // "@[]:"
// colon is allowed in userinfo
private static final long L_COLON = 0x400000000000000L; // ":"
private static final long H_COLON = 0x0L; // ":"
// slash should be encoded in authority
private static final long L_SLASH = 0x800000000000L; // "/"
private static final long H_SLASH = 0x0L; // "/"
// backslash should always be encoded
private static final long L_BACKSLASH = 0x0L; // "\"
private static final long H_BACKSLASH = 0x10000000L; // "\"
// ASCII chars 0-31 + 127 - various controls + CRLF + TAB
private static final long L_NON_PRINTABLE = 0xffffffffL;
private static final long H_NON_PRINTABLE = 0x8000000000000000L;
// All of the above
private static final long L_EXCLUDE = 0x84008008ffffffffL;
private static final long H_EXCLUDE = 0x8000000038000001L;
private static final char[] OTHERS = {
8263,8264,8265,8448,8449,8453,8454,10868,
65109,65110,65119,65131,65283,65295,65306,65311,65312
};
// Tell whether the given character is found by the given mask pair
public static boolean match(char c, long lowMask, long highMask) {
if (c < 64)
return ((1L << c) & lowMask) != 0;
if (c < 128)
return ((1L << (c - 64)) & highMask) != 0;
return false; // other non ASCII characters are not filtered
}
// returns -1 if the string doesn't contain any characters
// from the mask, the index of the first such character found
// otherwise.
public static int scan(String s, long lowMask, long highMask) {
int i = -1, len;
if (s == null || (len = s.length()) == 0) return -1;
boolean match = false;
while (++i < len && !(match = match(s.charAt(i), lowMask, highMask)));
if (match) return i;
return -1;
}
public static int scan(String s, long lowMask, long highMask, char[] others) {
int i = -1, len;
if (s == null || (len = s.length()) == 0) return -1;
boolean match = false;
char c, c0 = others[0];
while (++i < len && !(match = match((c=s.charAt(i)), lowMask, highMask))) {
if (c >= c0 && (Arrays.binarySearch(others, c) > -1)) {
match = true; break;
}
}
if (match) return i;
return -1;
}
private static String describeChar(char c) {
if (c < 32 || c == 127) {
if (c == '\n') return "LF";
if (c == '\r') return "CR";
return "control char (code=" + (int)c + ")";
}
if (c == '\\') return "'\\'";
return "'" + c + "'";
}
private static String checkUserInfo(String str) {
// colon is permitted in user info
int index = scan(str, L_EXCLUDE & ~L_COLON,
H_EXCLUDE & ~H_COLON);
if (index >= 0) {
return "Illegal character found in user-info: "
+ describeChar(str.charAt(index));
}
return null;
}
private static String checkHost(String str) {
int index;
if (str.startsWith("[") && str.endsWith("]")) {
str = str.substring(1, str.length() - 1);
if (isIPv6LiteralAddress(str)) {
index = str.indexOf('%');
if (index >= 0) {
index = scan(str = str.substring(index),
L_NON_PRINTABLE | L_IPV6_DELIMS,
H_NON_PRINTABLE | H_IPV6_DELIMS);
if (index >= 0) {
return "Illegal character found in IPv6 scoped address: "
+ describeChar(str.charAt(index));
}
}
return null;
}
return "Unrecognized IPv6 address format";
} else {
index = scan(str, L_EXCLUDE, H_EXCLUDE);
if (index >= 0) {
return "Illegal character found in host: "
+ describeChar(str.charAt(index));
}
}
return null;
}
private static String checkAuth(String str) {
int index = scan(str,
L_EXCLUDE & ~L_AUTH_DELIMS,
H_EXCLUDE & ~H_AUTH_DELIMS);
if (index >= 0) {
return "Illegal character found in authority: "
+ describeChar(str.charAt(index));
}
return null;
}
// check authority of hierarchical URL. Appropriate for
// HTTP-like protocol handlers
public static String checkAuthority(URL url) {
String s, u, h;
if (url == null) return null;
if ((s = checkUserInfo(u = url.getUserInfo())) != null) {
return s;
}
if ((s = checkHost(h = url.getHost())) != null) {
return s;
}
if (h == null && u == null) {
return checkAuth(url.getAuthority());
}
return null;
}
// minimal syntax checks - deeper check may be performed
// by the appropriate protocol handler
public static String checkExternalForm(URL url) {
String s;
if (url == null) return null;
int index = scan(s = url.getUserInfo(),
L_NON_PRINTABLE | L_SLASH,
H_NON_PRINTABLE | H_SLASH);
if (index >= 0) {
return "Illegal character found in authority: "
+ describeChar(s.charAt(index));
}
if ((s = checkHostString(url.getHost())) != null) {
return s;
}
return null;
}
public static String checkHostString(String host) {
if (host == null) return null;
int index = scan(host,
L_NON_PRINTABLE | L_SLASH,
H_NON_PRINTABLE | H_SLASH,
OTHERS);
if (index >= 0) {
return "Illegal character found in host: "
+ describeChar(host.charAt(index));
}
return null;
}
}
| {
"pile_set_name": "Github"
} |
bert-serving-server
bert-serving-client
pymilvus==0.2.14
pymysql
tensorflow==1.14.0
fastapi
uvicorn
| {
"pile_set_name": "Github"
} |
// Card
// This represents a self-contained, replicable entity
// Variables
$picnic-card-shadow: 0 !default;
$picnic-card-border: $picnic-border !default;
$picnic-card-radius: $picnic-radius !default;
// Styles
// http://8gramgorilla.com/mastering-sass-extends-and-placeholders/
%card {
position: relative;
box-shadow: $picnic-card-shadow;
border-radius: $picnic-card-radius;
border: $picnic-card-border;
overflow: hidden;
text-align: left;
background: $picnic-white;
margin-bottom: $picnic-separation;
padding: 0;
transition: all .3s ease;
&.hidden,
:checked + & {
font-size: 0;
padding: 0;
margin: 0;
border: 0;
}
// Make sure that nothing overflows
> * {
max-width: 100%;
display: block;
&:last-child {
margin-bottom: 0;
}
}
// The first part from the card
header,
section,
> p {
padding: .6em .8em;
}
section {
padding: .6em .8em 0;
}
hr {
border: none;
height: 1px;
background-color: #eee;
}
header {
font-weight: bold;
position: relative;
border-bottom: 1px solid #eee;
h1,
h2,
h3,
h4,
h5,
h6 {
padding: 0;
margin: 0 2em 0 0;
line-height: 1;
display: inline-block;
vertical-align: text-bottom;
}
&:last-child {
border-bottom: 0;
}
}
footer {
padding: .8em;
}
p {
margin: $picnic-separation / 2 0;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
> p {
margin: 0;
padding-right: 2.5em;
}
.close {
position: absolute;
top: .4em;
right: .3em;
font-size: 1.2em;
padding: 0 .5em;
cursor: pointer;
width: auto;
&:hover {
color: $picnic-error;
}
}
h1 + .close {
margin: .2em;
}
h2 + .close {
margin: .1em;
}
.dangerous {
background: $picnic-error;
float: right;
}
} | {
"pile_set_name": "Github"
} |
// High Contrast color overrides
// When color definition differs for dark and light variant
// it gets @if ed depending on $variant
$fg_color: if($variant == 'light', darken($fg_color, 3%), lighten($fg_color, 2%));
$bg_color: if($variant == 'light', lighten($bg_color, 3%), darken($bg_color, 2%));
$selected_bg_color: darken($selected_bg_color,10%);
$selected_borders_color: darken($selected_borders_color, 10%);
$borders_color: if($variant == 'light', darken($borders_color, 30%), lighten($borders_color, 30%));
$alt_borders_color: if($variant == 'light', darken($alt_borders_color, 33%), lighten($alt_borders_color, 28%));
$menu_color: $base_color;
$menu_selected_color: darken($bg_color,10%);
//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
$insensitive_borders_color: mix($borders_color, $bg_color, 80%);
//focus rings
$focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.2), transparentize(white, 0.4));
$alt_focus_border_color: if($variant == 'light', white, transparentize(white,0.4));
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.asr.v20190614.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class SentenceRecognitionRequest extends AbstractModel{
/**
* 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
*/
@SerializedName("ProjectId")
@Expose
private Long ProjectId;
/**
* 子服务类型。2: 一句话识别。
*/
@SerializedName("SubServiceType")
@Expose
private Long SubServiceType;
/**
* 引擎模型类型。
电话场景:
• 8k_en:电话 8k 英语;
• 8k_zh:电话 8k 中文普通话通用;
非电话场景:
• 16k_zh:16k 中文普通话通用;
• 16k_en:16k 英语;
• 16k_ca:16k 粤语;
• 16k_ja:16k 日语;
•16k_wuu-SH:16k 上海话方言。
*/
@SerializedName("EngSerViceType")
@Expose
private String EngSerViceType;
/**
* 语音数据来源。0:语音 URL;1:语音数据(post body)。
*/
@SerializedName("SourceType")
@Expose
private Long SourceType;
/**
* 识别音频的音频格式。mp3、wav。
*/
@SerializedName("VoiceFormat")
@Expose
private String VoiceFormat;
/**
* 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
*/
@SerializedName("UsrAudioKey")
@Expose
private String UsrAudioKey;
/**
* 语音 URL,公网可下载。当 SourceType 值为 0(语音 URL上传) 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时间长度要小于60s。
*/
@SerializedName("Url")
@Expose
private String Url;
/**
* 语音数据,当SourceType 值为1(本地语音数据上传)时必须填写,当SourceType 值为0(语音 URL上传)可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。数据长度要小于3MB(Base64后)。
*/
@SerializedName("Data")
@Expose
private String Data;
/**
* 数据长度,单位为字节。当 SourceType 值为1(本地语音数据上传)时必须填写,当 SourceType 值为0(语音 URL上传)可不写(此数据长度为数据未进行base64编码时的数据长度)。
*/
@SerializedName("DataLen")
@Expose
private Long DataLen;
/**
* 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
*/
@SerializedName("HotwordId")
@Expose
private String HotwordId;
/**
* 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。
*/
@SerializedName("FilterDirty")
@Expose
private Long FilterDirty;
/**
* 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。
*/
@SerializedName("FilterModal")
@Expose
private Long FilterModal;
/**
* 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认为0。
*/
@SerializedName("FilterPunc")
@Expose
private Long FilterPunc;
/**
* 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1
*/
@SerializedName("ConvertNumMode")
@Expose
private Long ConvertNumMode;
/**
* 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。支持引擎8k_zh,16k_zh,16k_en,16k_ca,16k_ja,16k_wuu-SH
*/
@SerializedName("WordInfo")
@Expose
private Long WordInfo;
/**
* Get 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
* @return ProjectId 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
*/
public Long getProjectId() {
return this.ProjectId;
}
/**
* Set 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
* @param ProjectId 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
*/
public void setProjectId(Long ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get 子服务类型。2: 一句话识别。
* @return SubServiceType 子服务类型。2: 一句话识别。
*/
public Long getSubServiceType() {
return this.SubServiceType;
}
/**
* Set 子服务类型。2: 一句话识别。
* @param SubServiceType 子服务类型。2: 一句话识别。
*/
public void setSubServiceType(Long SubServiceType) {
this.SubServiceType = SubServiceType;
}
/**
* Get 引擎模型类型。
电话场景:
• 8k_en:电话 8k 英语;
• 8k_zh:电话 8k 中文普通话通用;
非电话场景:
• 16k_zh:16k 中文普通话通用;
• 16k_en:16k 英语;
• 16k_ca:16k 粤语;
• 16k_ja:16k 日语;
•16k_wuu-SH:16k 上海话方言。
* @return EngSerViceType 引擎模型类型。
电话场景:
• 8k_en:电话 8k 英语;
• 8k_zh:电话 8k 中文普通话通用;
非电话场景:
• 16k_zh:16k 中文普通话通用;
• 16k_en:16k 英语;
• 16k_ca:16k 粤语;
• 16k_ja:16k 日语;
•16k_wuu-SH:16k 上海话方言。
*/
public String getEngSerViceType() {
return this.EngSerViceType;
}
/**
* Set 引擎模型类型。
电话场景:
• 8k_en:电话 8k 英语;
• 8k_zh:电话 8k 中文普通话通用;
非电话场景:
• 16k_zh:16k 中文普通话通用;
• 16k_en:16k 英语;
• 16k_ca:16k 粤语;
• 16k_ja:16k 日语;
•16k_wuu-SH:16k 上海话方言。
* @param EngSerViceType 引擎模型类型。
电话场景:
• 8k_en:电话 8k 英语;
• 8k_zh:电话 8k 中文普通话通用;
非电话场景:
• 16k_zh:16k 中文普通话通用;
• 16k_en:16k 英语;
• 16k_ca:16k 粤语;
• 16k_ja:16k 日语;
•16k_wuu-SH:16k 上海话方言。
*/
public void setEngSerViceType(String EngSerViceType) {
this.EngSerViceType = EngSerViceType;
}
/**
* Get 语音数据来源。0:语音 URL;1:语音数据(post body)。
* @return SourceType 语音数据来源。0:语音 URL;1:语音数据(post body)。
*/
public Long getSourceType() {
return this.SourceType;
}
/**
* Set 语音数据来源。0:语音 URL;1:语音数据(post body)。
* @param SourceType 语音数据来源。0:语音 URL;1:语音数据(post body)。
*/
public void setSourceType(Long SourceType) {
this.SourceType = SourceType;
}
/**
* Get 识别音频的音频格式。mp3、wav。
* @return VoiceFormat 识别音频的音频格式。mp3、wav。
*/
public String getVoiceFormat() {
return this.VoiceFormat;
}
/**
* Set 识别音频的音频格式。mp3、wav。
* @param VoiceFormat 识别音频的音频格式。mp3、wav。
*/
public void setVoiceFormat(String VoiceFormat) {
this.VoiceFormat = VoiceFormat;
}
/**
* Get 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
* @return UsrAudioKey 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
*/
public String getUsrAudioKey() {
return this.UsrAudioKey;
}
/**
* Set 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
* @param UsrAudioKey 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
*/
public void setUsrAudioKey(String UsrAudioKey) {
this.UsrAudioKey = UsrAudioKey;
}
/**
* Get 语音 URL,公网可下载。当 SourceType 值为 0(语音 URL上传) 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时间长度要小于60s。
* @return Url 语音 URL,公网可下载。当 SourceType 值为 0(语音 URL上传) 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时间长度要小于60s。
*/
public String getUrl() {
return this.Url;
}
/**
* Set 语音 URL,公网可下载。当 SourceType 值为 0(语音 URL上传) 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时间长度要小于60s。
* @param Url 语音 URL,公网可下载。当 SourceType 值为 0(语音 URL上传) 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时间长度要小于60s。
*/
public void setUrl(String Url) {
this.Url = Url;
}
/**
* Get 语音数据,当SourceType 值为1(本地语音数据上传)时必须填写,当SourceType 值为0(语音 URL上传)可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。数据长度要小于3MB(Base64后)。
* @return Data 语音数据,当SourceType 值为1(本地语音数据上传)时必须填写,当SourceType 值为0(语音 URL上传)可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。数据长度要小于3MB(Base64后)。
*/
public String getData() {
return this.Data;
}
/**
* Set 语音数据,当SourceType 值为1(本地语音数据上传)时必须填写,当SourceType 值为0(语音 URL上传)可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。数据长度要小于3MB(Base64后)。
* @param Data 语音数据,当SourceType 值为1(本地语音数据上传)时必须填写,当SourceType 值为0(语音 URL上传)可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。数据长度要小于3MB(Base64后)。
*/
public void setData(String Data) {
this.Data = Data;
}
/**
* Get 数据长度,单位为字节。当 SourceType 值为1(本地语音数据上传)时必须填写,当 SourceType 值为0(语音 URL上传)可不写(此数据长度为数据未进行base64编码时的数据长度)。
* @return DataLen 数据长度,单位为字节。当 SourceType 值为1(本地语音数据上传)时必须填写,当 SourceType 值为0(语音 URL上传)可不写(此数据长度为数据未进行base64编码时的数据长度)。
*/
public Long getDataLen() {
return this.DataLen;
}
/**
* Set 数据长度,单位为字节。当 SourceType 值为1(本地语音数据上传)时必须填写,当 SourceType 值为0(语音 URL上传)可不写(此数据长度为数据未进行base64编码时的数据长度)。
* @param DataLen 数据长度,单位为字节。当 SourceType 值为1(本地语音数据上传)时必须填写,当 SourceType 值为0(语音 URL上传)可不写(此数据长度为数据未进行base64编码时的数据长度)。
*/
public void setDataLen(Long DataLen) {
this.DataLen = DataLen;
}
/**
* Get 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
* @return HotwordId 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
*/
public String getHotwordId() {
return this.HotwordId;
}
/**
* Set 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
* @param HotwordId 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
*/
public void setHotwordId(String HotwordId) {
this.HotwordId = HotwordId;
}
/**
* Get 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。
* @return FilterDirty 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。
*/
public Long getFilterDirty() {
return this.FilterDirty;
}
/**
* Set 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。
* @param FilterDirty 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。
*/
public void setFilterDirty(Long FilterDirty) {
this.FilterDirty = FilterDirty;
}
/**
* Get 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。
* @return FilterModal 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。
*/
public Long getFilterModal() {
return this.FilterModal;
}
/**
* Set 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。
* @param FilterModal 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。
*/
public void setFilterModal(Long FilterModal) {
this.FilterModal = FilterModal;
}
/**
* Get 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认为0。
* @return FilterPunc 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认为0。
*/
public Long getFilterPunc() {
return this.FilterPunc;
}
/**
* Set 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认为0。
* @param FilterPunc 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认为0。
*/
public void setFilterPunc(Long FilterPunc) {
this.FilterPunc = FilterPunc;
}
/**
* Get 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1
* @return ConvertNumMode 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1
*/
public Long getConvertNumMode() {
return this.ConvertNumMode;
}
/**
* Set 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1
* @param ConvertNumMode 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1
*/
public void setConvertNumMode(Long ConvertNumMode) {
this.ConvertNumMode = ConvertNumMode;
}
/**
* Get 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。支持引擎8k_zh,16k_zh,16k_en,16k_ca,16k_ja,16k_wuu-SH
* @return WordInfo 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。支持引擎8k_zh,16k_zh,16k_en,16k_ca,16k_ja,16k_wuu-SH
*/
public Long getWordInfo() {
return this.WordInfo;
}
/**
* Set 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。支持引擎8k_zh,16k_zh,16k_en,16k_ca,16k_ja,16k_wuu-SH
* @param WordInfo 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。支持引擎8k_zh,16k_zh,16k_en,16k_ca,16k_ja,16k_wuu-SH
*/
public void setWordInfo(Long WordInfo) {
this.WordInfo = WordInfo;
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamSimple(map, prefix + "SubServiceType", this.SubServiceType);
this.setParamSimple(map, prefix + "EngSerViceType", this.EngSerViceType);
this.setParamSimple(map, prefix + "SourceType", this.SourceType);
this.setParamSimple(map, prefix + "VoiceFormat", this.VoiceFormat);
this.setParamSimple(map, prefix + "UsrAudioKey", this.UsrAudioKey);
this.setParamSimple(map, prefix + "Url", this.Url);
this.setParamSimple(map, prefix + "Data", this.Data);
this.setParamSimple(map, prefix + "DataLen", this.DataLen);
this.setParamSimple(map, prefix + "HotwordId", this.HotwordId);
this.setParamSimple(map, prefix + "FilterDirty", this.FilterDirty);
this.setParamSimple(map, prefix + "FilterModal", this.FilterModal);
this.setParamSimple(map, prefix + "FilterPunc", this.FilterPunc);
this.setParamSimple(map, prefix + "ConvertNumMode", this.ConvertNumMode);
this.setParamSimple(map, prefix + "WordInfo", this.WordInfo);
}
}
| {
"pile_set_name": "Github"
} |
//
// QMShareCollectionViewCell.m
// QMShareExtension
//
// Created by Injoit on 10/9/17.
// Copyright © 2017 QuickBlox. All rights reserved.
//
#import "QMShareCollectionViewCell.h"
#import <QuartzCore/QuartzCore.h>
#import "QMImageView.h"
#import "QMConstants.h"
static UIImage *selectedCheckImage() {
static UIImage *image = nil;
if (image == nil) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
image = [UIImage imageNamed:@"checkmark_selected"];
});
}
return image;
}
static UIImage *deselectedCheckImage() {
static UIImage *image = nil;
if (image == nil) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
image = [UIImage imageNamed:@"checkmark_deselected"];
});
}
return image;
}
@interface QMShareCollectionViewCell() <QMImageViewDelegate>
@property (weak, nonatomic) IBOutlet UIImageView *checkmarkImageView;
@property (weak, nonatomic) IBOutlet QMImageView *avatarImage;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@end
@implementation QMShareCollectionViewCell
@synthesize checked = _checked;
- (void)awakeFromNib {
[super awakeFromNib];
self.avatarImage.delegate = self;
self.avatarImage.imageViewType = QMImageViewTypeCircle;
self.checkmarkImageView.image = deselectedCheckImage();
self.checkmarkImageView.hidden = YES;
}
- (void)setChecked:(BOOL)checked {
if (_checked != checked) {
_checked = checked;
self.checkmarkImageView.hidden = !checked;
self.checkmarkImageView.image = checked ? selectedCheckImage() : deselectedCheckImage();
}
}
- (void)setTitle:(NSString *)title
avatarUrl:(NSString *)avatarUrl {
self.titleLabel.text = title;
NSURL *url = [NSURL URLWithString:avatarUrl];
[self.avatarImage setImageWithURL:url
title:title
completedBlock:nil];
}
- (void)imageViewDidTap:(QMImageView *)imageView {
if (self.tapBlock) {
self.tapBlock(self);
}
}
- (void)setChecked:(BOOL)checked animated:(BOOL)animated {
if (_checked != checked) {
self.checked = checked;
self.checkmarkImageView.hidden = !checked;
if (animated) {
CATransition *transition = [CATransition animation];
transition.duration = kQMBaseAnimationDuration;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFade;
[self.checkmarkImageView.layer addAnimation:transition forKey:nil];
}
}
}
+ (NSString *)cellIdentifier {
return NSStringFromClass([self class]);
}
+ (void)registerForReuseInView:(UIView *)viewForReuse {
NSString *nibName = NSStringFromClass([self class]);
UINib *nib = [UINib nibWithNibName:nibName bundle:[NSBundle mainBundle]];
NSParameterAssert(nib);
NSString *cellIdentifier = [self cellIdentifier];
NSParameterAssert(cellIdentifier);
NSParameterAssert([viewForReuse isKindOfClass:UICollectionView.class]);
UICollectionView *collectionView = (UICollectionView *)viewForReuse;
[collectionView registerNib:nib
forCellWithReuseIdentifier:cellIdentifier];
}
@end
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2009-2020 Lightbend Inc. <https://www.lightbend.com>
*/
package typed.tutorial_5
import scala.concurrent.duration._
import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import org.scalatest.wordspec.AnyWordSpecLike
import typed.tutorial_5.Device.Command
import typed.tutorial_5.DeviceGroupQuery.WrappedRespondTemperature
import typed.tutorial_5.DeviceManager.DeviceNotAvailable
import typed.tutorial_5.DeviceManager.DeviceTimedOut
import typed.tutorial_5.DeviceManager.RespondAllTemperatures
import typed.tutorial_5.DeviceManager.Temperature
import typed.tutorial_5.DeviceManager.TemperatureNotAvailable
class DeviceGroupQuerySpec extends ScalaTestWithActorTestKit with AnyWordSpecLike {
"DeviceGroupQuery" must {
//#query-test-normal
"return temperature value for working devices" in {
val requester = createTestProbe[RespondAllTemperatures]()
val device1 = createTestProbe[Command]()
val device2 = createTestProbe[Command]()
val deviceIdToActor = Map("device1" -> device1.ref, "device2" -> device2.ref)
val queryActor =
spawn(DeviceGroupQuery(deviceIdToActor, requestId = 1, requester = requester.ref, timeout = 3.seconds))
device1.expectMessageType[Device.ReadTemperature]
device2.expectMessageType[Device.ReadTemperature]
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device1", Some(1.0)))
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device2", Some(2.0)))
requester.expectMessage(
RespondAllTemperatures(
requestId = 1,
temperatures = Map("device1" -> Temperature(1.0), "device2" -> Temperature(2.0))))
}
//#query-test-normal
//#query-test-no-reading
"return TemperatureNotAvailable for devices with no readings" in {
val requester = createTestProbe[RespondAllTemperatures]()
val device1 = createTestProbe[Command]()
val device2 = createTestProbe[Command]()
val deviceIdToActor = Map("device1" -> device1.ref, "device2" -> device2.ref)
val queryActor =
spawn(DeviceGroupQuery(deviceIdToActor, requestId = 1, requester = requester.ref, timeout = 3.seconds))
device1.expectMessageType[Device.ReadTemperature]
device2.expectMessageType[Device.ReadTemperature]
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device1", None))
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device2", Some(2.0)))
requester.expectMessage(
RespondAllTemperatures(
requestId = 1,
temperatures = Map("device1" -> TemperatureNotAvailable, "device2" -> Temperature(2.0))))
}
//#query-test-no-reading
//#query-test-stopped
"return DeviceNotAvailable if device stops before answering" in {
val requester = createTestProbe[RespondAllTemperatures]()
val device1 = createTestProbe[Command]()
val device2 = createTestProbe[Command]()
val deviceIdToActor = Map("device1" -> device1.ref, "device2" -> device2.ref)
val queryActor =
spawn(DeviceGroupQuery(deviceIdToActor, requestId = 1, requester = requester.ref, timeout = 3.seconds))
device1.expectMessageType[Device.ReadTemperature]
device2.expectMessageType[Device.ReadTemperature]
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device1", Some(2.0)))
device2.stop()
requester.expectMessage(
RespondAllTemperatures(
requestId = 1,
temperatures = Map("device1" -> Temperature(2.0), "device2" -> DeviceNotAvailable)))
}
//#query-test-stopped
//#query-test-stopped-later
"return temperature reading even if device stops after answering" in {
val requester = createTestProbe[RespondAllTemperatures]()
val device1 = createTestProbe[Command]()
val device2 = createTestProbe[Command]()
val deviceIdToActor = Map("device1" -> device1.ref, "device2" -> device2.ref)
val queryActor =
spawn(DeviceGroupQuery(deviceIdToActor, requestId = 1, requester = requester.ref, timeout = 3.seconds))
device1.expectMessageType[Device.ReadTemperature]
device2.expectMessageType[Device.ReadTemperature]
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device1", Some(1.0)))
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device2", Some(2.0)))
device2.stop()
requester.expectMessage(
RespondAllTemperatures(
requestId = 1,
temperatures = Map("device1" -> Temperature(1.0), "device2" -> Temperature(2.0))))
}
//#query-test-stopped-later
//#query-test-timeout
"return DeviceTimedOut if device does not answer in time" in {
val requester = createTestProbe[RespondAllTemperatures]()
val device1 = createTestProbe[Command]()
val device2 = createTestProbe[Command]()
val deviceIdToActor = Map("device1" -> device1.ref, "device2" -> device2.ref)
val queryActor =
spawn(DeviceGroupQuery(deviceIdToActor, requestId = 1, requester = requester.ref, timeout = 200.millis))
device1.expectMessageType[Device.ReadTemperature]
device2.expectMessageType[Device.ReadTemperature]
queryActor ! WrappedRespondTemperature(Device.RespondTemperature(requestId = 0, "device1", Some(1.0)))
// no reply from device2
requester.expectMessage(
RespondAllTemperatures(
requestId = 1,
temperatures = Map("device1" -> Temperature(1.0), "device2" -> DeviceTimedOut)))
}
//#query-test-timeout
}
}
| {
"pile_set_name": "Github"
} |
<html lang="en">
<head>
<title>Control Flow - The Iterate Manual and Paper</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The Iterate Manual and Paper">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Clauses.html#Clauses" title="Clauses">
<link rel="prev" href="Gathering-Clauses.html#Gathering-Clauses" title="Gathering Clauses">
<link rel="next" href="Predicates.html#Predicates" title="Predicates">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1989 Jonathan Amsterdam <jba at ai.mit.edu>
The present manual is a conversion of Jonathan Amsterdam's ``The
Iterate Manual'', MIT AI Memo No. 1236. Said memo mentioned the
following contract information:
_This report describes research done at the Artificial
Intelligence Laboratory of the Massachusetts Institute of
Technology. Support for the laboratory's artificial intelligence
research is provided in part by the Advanced Research Projects
Agency of the Department of Defense under Office of Naval Research
contract N00014-85-K-0124._
The appendix includes Jonathan Amsterdam's Working Paper 324, MIT
AI Lab entitled ``Don't Loop, Iterate.''
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
body {font-family: century schoolbook, serif;
line-height: 1.3;
padding-left: 5em; padding-right: 1em;
padding-bottom: 1em; max-width: 60em;}
table {border-collapse: collapse}
span.roman { font-family: century schoolbook, serif; font-weight: normal; }
h1, h2, h3, h4, h5, h6 {font-family: Helvetica, sans-serif}
/*h4 {padding-top: 0.75em;}*/
dfn {font-family: inherit; font-variant: italic; font-weight: bolder }
kbd {font-family: monospace; text-decoration: underline}
/*var {font-family: Helvetica, sans-serif; font-variant: slanted}*/
var {font-variant: slanted;}
td {padding-right: 1em; padding-left: 1em}
sub {font-size: smaller}
.node {padding: 0; margin: 0}
.lisp { font-family: monospace;
background-color: #F4F4F4; border: 1px solid #AAA;
padding-top: 0.5em; padding-bottom: 0.5em; }
/* coloring */
.lisp-bg { background-color: #F4F4F4 ; color: black; }
.lisp-bg:hover { background-color: #F4F4F4 ; color: black; }
.symbol { font-weight: bold; color: #770055; background-color : transparent; border: 0px; margin: 0px;}
a.symbol:link { font-weight: bold; color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:active { font-weight: bold; color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:visited { font-weight: bold; color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:hover { font-weight: bold; color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; }
.special { font-weight: bold; color: #FF5000; background-color: inherit; }
.keyword { font-weight: bold; color: #770000; background-color: inherit; }
.comment { font-weight: normal; color: #007777; background-color: inherit; }
.string { font-weight: bold; color: #777777; background-color: inherit; }
.character { font-weight: bold; color: #0055AA; background-color: inherit; }
.syntaxerror { font-weight: bold; color: #FF0000; background-color: inherit; }
span.paren1 { font-weight: bold; color: #777777; }
span.paren1:hover { color: #777777; background-color: #BAFFFF; }
span.paren2 { color: #777777; }
span.paren2:hover { color: #777777; background-color: #FFCACA; }
span.paren3 { color: #777777; }
span.paren3:hover { color: #777777; background-color: #FFFFBA; }
span.paren4 { color: #777777; }
span.paren4:hover { color: #777777; background-color: #CACAFF; }
span.paren5 { color: #777777; }
span.paren5:hover { color: #777777; background-color: #CAFFCA; }
span.paren6 { color: #777777; }
span.paren6:hover { color: #777777; background-color: #FFBAFF; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Control-Flow"></a>
Next: <a rel="next" accesskey="n" href="Predicates.html#Predicates">Predicates</a>,
Previous: <a rel="previous" accesskey="p" href="Gathering-Clauses.html#Gathering-Clauses">Gathering Clauses</a>,
Up: <a rel="up" accesskey="u" href="Clauses.html#Clauses">Clauses</a>
<hr>
</div>
<h3 class="section">2.4 Control Flow</h3>
<p>Several clauses can be used to alter the usual flow of control in a
loop.
<blockquote>
<b>Note:</b> The clauses of this and subsequent sections don't adhere to
<code>iterate</code>'s usual syntax, but instead use standard Common Lisp syntax.
Hence the format for describing syntax subsequently is like the
standard format used in the Common Lisp manual, not like the
descriptions of clauses above.
</blockquote>
<p><a name="index-finish-85"></a>
<div class="defun">
— Clause: <b>finish</b><var><a name="index-finish-86"></a></var><br>
<blockquote>
<p>Stops the loop and runs the epilogue code.
</p></blockquote></div>
<!-- for example: -->
<!-- @lisp -->
<!-- (iter (with answer = nil) -->
<!-- (initially (make-a-mess)) -->
<!-- (for i from 1 to 10) -->
<!-- (when (correct? i) -->
<!-- (setq answer i) -->
<!-- (finish)) -->
<!-- (finally (cleanup))) -->
<!-- @end lisp -->
<!-- this code will execute |cleanup| whether or not the test |(correct? -->
<!-- i)| ever succeeds. -->
<!-- the (more elegant) formulation, -->
<!-- @lisp -->
<!-- (iter (initially (make-a-mess)) -->
<!-- (for i from 1 to 10) -->
<!-- (finding i such-that (correct? i)) -->
<!-- (finally (cleanup))) -->
<!-- @end lisp -->
<!-- would not execute |cleanup| if |(correct? i)| succeeded; it -->
<!-- would do an immediate return. -->
<p><a name="index-leave-87"></a>
<div class="defun">
— Clause: <b>leave</b> <code>&optional</code><var> value<a name="index-leave-88"></a></var><br>
<blockquote>
<p>Immediately returns <var>value</var> (default <code>nil</code>) from the current
<code>iterate</code> form, skipping the epilogue code. Equivalent to using
<code>return-from</code>.
</p></blockquote></div>
<p><a name="index-next_002diteration-89"></a>
<div class="defun">
— Clause: <b>next-iteration</b><var><a name="index-next_002diteration-90"></a></var><br>
<blockquote>
<p>Skips the remainder of the loop body and begins the next iteration of
the loop.
</p></blockquote></div>
<p><a name="index-while-91"></a>
<div class="defun">
— Clause: <b>while</b><var> expr<a name="index-while-92"></a></var><br>
<blockquote>
<p>If <var>expr</var> ever evaluates to <code>nil</code>, the loop is terminated and
the epilogue code executed. Equivalent to <code>(if (not </code><var>expr</var><code>)
(finish))</code>.
</p></blockquote></div>
<p><a name="index-until-93"></a>
<div class="defun">
— Clause: <b>until</b><var> expr<a name="index-until-94"></a></var><br>
<blockquote>
<p>Equivalent to <code>(if </code><var>expr</var><code> (finish))</code>.
</p></blockquote></div>
<p><a name="index-if_002dfirst_002dtime-95"></a>
<div class="defun">
— Clause: <b>if-first-time</b><var> then </var><code>&optional</code><var> else<a name="index-if_002dfirst_002dtime-96"></a></var><br>
<blockquote>
<p>If this clause is being executed for the first time in this invocation
of the <code>iterate</code> form, then the <var>then</var> code is evaluated; otherwise
the <var>else</var> code is evaluated.
<p><code>(for </code><var>var</var><code> first </code><var>expr1</var><code> then </code><var>expr2</var><code>)</code> is almost
equivalent to
<pre class="lisp"> (if-first-time (dsetq <var>var</var> <var>expr1</var>)
(dsetq <var>var</var> <var>expr2</var>))
</pre>
<p>The only difference is that the <code>for</code> version makes <var>var</var>
available for use with <code>for... previous</code>.
</p></blockquote></div>
<!-- =================================================================== -->
</body></html>
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef lint
static char sccsid[] = "@(#)check.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
#include "back.h"
getmove () {
register int i, c;
c = 0;
for (;;) {
i = checkmove(c);
switch (i) {
case -1:
if (movokay(mvlim)) {
if (tflag)
curmove (20,0);
else
writec ('\n');
for (i = 0; i < mvlim; i++)
if (h[i])
wrhit(g[i]);
nexturn();
if (*offopp == 15)
cturn *= -2;
if (tflag && pnum)
bflag = pnum;
return;
}
case -4:
case 0:
if (tflag)
refresh();
if (i != 0 && i != -4)
break;
if (tflag)
curmove (20,0);
else
writec ('\n');
writel (*Colorptr);
if (i == -4)
writel (" must make ");
else
writel (" can only make ");
writec (mvlim+'0');
writel (" move");
if (mvlim > 1)
writec ('s');
writec ('.');
writec ('\n');
break;
case -3:
if (quit())
return;
}
if (! tflag)
proll ();
else {
curmove (cturn == -1? 18: 19,39);
cline ();
c = -1;
}
}
}
movokay (mv)
register int mv;
{
register int i, m;
if (d0)
swap;
for (i = 0; i < mv; i++) {
if (p[i] == g[i]) {
moverr (i);
curmove (20,0);
writel ("Attempt to move to same location.\n");
return (0);
}
if (cturn*(g[i]-p[i]) < 0) {
moverr (i);
curmove (20,0);
writel ("Backwards move.\n");
return (0);
}
if (abs(board[bar]) && p[i] != bar) {
moverr (i);
curmove (20,0);
writel ("Men still on bar.\n");
return (0);
}
if ( (m = makmove(i)) ) {
moverr (i);
switch (m) {
case 1:
writel ("Move not rolled.\n");
break;
case 2:
writel ("Bad starting position.\n");
break;
case 3:
writel ("Destination occupied.\n");
break;
case 4:
writel ("Can't remove men yet.\n");
}
return (0);
}
}
return (1);
}
| {
"pile_set_name": "Github"
} |
/* ====================================================================
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.
==================================================================== */
package org.apache.poi.ss.format;
import java.text.AttributedCharacterIterator;
import java.text.CharacterIterator;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Formatter;
import java.util.Locale;
import java.util.regex.Matcher;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.util.StringUtil;
/**
* Formats a date value.
*/
public class CellDateFormatter extends CellFormatter {
private boolean amPmUpper;
private boolean showM;
private boolean showAmPm;
private final DateFormat dateFmt;
private String sFmt;
private final Calendar EXCEL_EPOCH_CAL =
LocaleUtil.getLocaleCalendar(1904, 0, 1);
private static /* final */ CellDateFormatter SIMPLE_DATE;
private class DatePartHandler implements CellFormatPart.PartHandler {
private int mStart = -1;
private int mLen;
private int hStart = -1;
private int hLen;
@Override
public String handlePart(Matcher m, String part, CellFormatType type,
StringBuffer desc) {
int pos = desc.length();
char firstCh = part.charAt(0);
switch (firstCh) {
case 's':
case 'S':
if (mStart >= 0) {
for (int i = 0; i < mLen; i++)
desc.setCharAt(mStart + i, 'm');
mStart = -1;
}
return part.toLowerCase(Locale.ROOT);
case 'h':
case 'H':
mStart = -1;
hStart = pos;
hLen = part.length();
return part.toLowerCase(Locale.ROOT);
case 'd':
case 'D':
mStart = -1;
if (part.length() <= 2)
return part.toLowerCase(Locale.ROOT);
else
return part.toLowerCase(Locale.ROOT).replace('d', 'E');
case 'm':
case 'M':
mStart = pos;
mLen = part.length();
// For 'm' after 'h', output minutes ('m') not month ('M')
if (hStart >= 0)
return part.toLowerCase(Locale.ROOT);
else
return part.toUpperCase(Locale.ROOT);
case 'y':
case 'Y':
mStart = -1;
if (part.length() == 3)
part = "yyyy";
return part.toLowerCase(Locale.ROOT);
case '0':
mStart = -1;
int sLen = part.length();
sFmt = "%0" + (sLen + 2) + "." + sLen + "f";
return part.replace('0', 'S');
case 'a':
case 'A':
case 'p':
case 'P':
if (part.length() > 1) {
// am/pm marker
mStart = -1;
showAmPm = true;
showM = StringUtil.toLowerCase(part.charAt(1)).equals("m");
// For some reason "am/pm" becomes AM or PM, but "a/p" becomes a or p
amPmUpper = showM || StringUtil.isUpperCase(part.charAt(0));
return "a";
}
//noinspection fallthrough
default:
return null;
}
}
public void finish(StringBuffer toAppendTo) {
if (hStart >= 0 && !showAmPm) {
for (int i = 0; i < hLen; i++) {
toAppendTo.setCharAt(hStart + i, 'H');
}
}
}
}
/**
* Creates a new date formatter with the given specification.
*
* @param format The format.
*/
public CellDateFormatter(String format) {
this(LocaleUtil.getUserLocale(), format);
}
/**
* Creates a new date formatter with the given specification.
*
* @param locale The locale.
* @param format The format.
*/
public CellDateFormatter(Locale locale, String format) {
super(format);
DatePartHandler partHandler = new DatePartHandler();
StringBuffer descBuf = CellFormatPart.parseFormat(format,
CellFormatType.DATE, partHandler);
partHandler.finish(descBuf);
// tweak the format pattern to pass tests on JDK 1.7,
// See https://issues.apache.org/bugzilla/show_bug.cgi?id=53369
String ptrn = descBuf.toString().replaceAll("((y)(?!y))(?<!yy)", "yy");
dateFmt = new SimpleDateFormat(ptrn, locale);
dateFmt.setTimeZone(LocaleUtil.getUserTimeZone());
}
/** {@inheritDoc} */
public synchronized void formatValue(StringBuffer toAppendTo, Object value) {
if (value == null)
value = 0.0;
if (value instanceof Number) {
Number num = (Number) value;
long v = num.longValue();
if (v == 0L) {
value = EXCEL_EPOCH_CAL.getTime();
} else {
Calendar c = (Calendar)EXCEL_EPOCH_CAL.clone();
c.add(Calendar.SECOND, (int)(v / 1000));
c.add(Calendar.MILLISECOND, (int)(v % 1000));
value = c.getTime();
}
}
AttributedCharacterIterator it = dateFmt.formatToCharacterIterator(value);
boolean doneAm = false;
boolean doneMillis = false;
for (char ch = it.first();
ch != CharacterIterator.DONE;
ch = it.next()) {
if (it.getAttribute(DateFormat.Field.MILLISECOND) != null) {
if (!doneMillis) {
Date dateObj = (Date) value;
int pos = toAppendTo.length();
try (Formatter formatter = new Formatter(toAppendTo, Locale.ROOT)) {
long msecs = dateObj.getTime() % 1000;
formatter.format(locale, sFmt, msecs / 1000.0);
}
toAppendTo.delete(pos, pos + 2);
doneMillis = true;
}
} else if (it.getAttribute(DateFormat.Field.AM_PM) != null) {
if (!doneAm) {
if (showAmPm) {
if (amPmUpper) {
toAppendTo.append(StringUtil.toUpperCase(ch));
if (showM)
toAppendTo.append('M');
} else {
toAppendTo.append(StringUtil.toLowerCase(ch));
if (showM)
toAppendTo.append('m');
}
}
doneAm = true;
}
} else {
toAppendTo.append(ch);
}
}
}
/**
* {@inheritDoc}
* <p>
* For a date, this is <tt>"mm/d/y"</tt>.
*/
public void simpleValue(StringBuffer toAppendTo, Object value) {
synchronized (CellDateFormatter.class) {
if (SIMPLE_DATE == null || !SIMPLE_DATE.EXCEL_EPOCH_CAL.equals(EXCEL_EPOCH_CAL)) {
SIMPLE_DATE = new CellDateFormatter("mm/d/y");
}
}
SIMPLE_DATE.formatValue(toAppendTo, value);
}
}
| {
"pile_set_name": "Github"
} |
/*******************************************************************************
* @license
* Copyright (c) 2009, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
* License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors: IBM Corporation - initial API and implementation
******************************************************************************/
/*eslint-env browser, amd*/
/*globals confirm */
define(['i18n!profile/nls/messages', 'require', 'orion/i18nUtil', 'orion/bootstrap', 'orion/status', 'orion/progress', 'orion/operationsClient',
'orion/commandRegistry', 'orion/commands', 'orion/selection',
'orion/searchClient', 'orion/fileClient', 'orion/globalCommands', 'orion/profile/UsersList',
'orion/profile/dialogs/NewUserDialog', 'orion/profile/dialogs/ResetPasswordDialog', 'orion/urlModifier'],
function(messages, require, i18nUtil, mBootstrap, mStatus, mProgress, mOperationsClient, mCommandRegistry, mCommands, mSelection, mSearchClient, mFileClient, mGlobalCommands, mUsersList, NewUserDialog, ResetPasswordDialog, urlModifier) {
mBootstrap.startup().then(function(core) {
var serviceRegistry = core.serviceRegistry;
var preferences = core.preferences;
var fileClient = new mFileClient.FileClient(serviceRegistry);
var selection = new mSelection.Selection(serviceRegistry);
var commandRegistry = new mCommandRegistry.CommandRegistry({selection: selection });
var searcher = new mSearchClient.Searcher({serviceRegistry: serviceRegistry, commandService: commandRegistry, fileService: fileClient});
var operationsClient = new mOperationsClient.OperationsClient(serviceRegistry);
new mStatus.StatusReportingService(serviceRegistry, operationsClient, "statusPane", "notifications", "notificationArea"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
new mProgress.ProgressService(serviceRegistry, operationsClient, commandRegistry);
var usersList = new mUsersList.UsersList(serviceRegistry, commandRegistry, selection, searcher, "usersList", "pageActions", "pageNavigationActions", "selectionTools", "userCommands"); //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
mGlobalCommands.generateBanner("orion-userList", serviceRegistry, commandRegistry, preferences, searcher, usersList); //$NON-NLS-0$
var previousPage = new mCommands.Command({
name : messages["< Previous Page"],
tooltip: messages["Show previous page of Users names"],
id : "orion.userlist.prevPage", //$NON-NLS-0$
hrefCallback : function() {
var start = usersList.queryObject.start - usersList.queryObject.rows;
if (start < 0) {
start = 0;
}
return window.location.pathname + "#?start=" + start + "&rows=" + usersList.queryObject.rows; //$NON-NLS-1$ //$NON-NLS-0$
},
visibleWhen : function(item) {
return usersList.queryObject.start > 0;
}
});
commandRegistry.addCommand(previousPage);
var nextPage = new mCommands.Command({
name : messages["Next Page >"],
tooltip: messages["Show next page of User names"],
id : "orion.userlist.nextPage", //$NON-NLS-0$
hrefCallback : function() {
return window.location.pathname + "#?start=" + (usersList.queryObject.start + usersList.queryObject.rows) + "&rows=" + usersList.queryObject.rows; //$NON-NLS-1$ //$NON-NLS-0$
},
visibleWhen : function(item) {
return usersList.queryObject.length === 0 ? true : (usersList.queryObject.start + usersList.queryObject.rows) < usersList.queryObject.length;
}
});
commandRegistry.addCommand(nextPage);
var createUserCommand = new mCommands.Command({
name: messages["Create User"],
id: "eclipse.createUser", //$NON-NLS-0$
callback: function() {
var dialog = new NewUserDialog.NewUserDialog({
func : function() {
usersList.loadUsers();
},
registry : serviceRegistry
});
dialog.show();
},
visibleWhen: function(item) {
return true;
}
});
commandRegistry.addCommand(createUserCommand);
var findUserCommand = new mCommands.Command({
name: messages["Find User"],
id: "eclipse.findUser", //$NON-NLS-0$
parameters: new mCommandRegistry.ParametersDescription([new mCommandRegistry.CommandParameter('name', 'text', messages["User Name:"])]), //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
callback: function(data) {
var name = data.parameters && data.parameters.valueFor('name'); //$NON-NLS-0$
var findFunction = function(name) {
var href = require.toUrl("profile/user-profile.html") +"#/users/" + name;
window.location.href = urlModifier(href);
};
if (name) {
findFunction(name);
}
},
visibleWhen: function(item) {
return true;
}
});
commandRegistry.addCommand(findUserCommand);
var deleteCommand = new mCommands.Command({
name: messages["Delete User"],
image: require.toUrl("images/delete.png"), //$NON-NLS-0$
id: "eclipse.deleteUser", //$NON-NLS-0$
visibleWhen: function(item) {
var items = Array.isArray(item) ? item : [item];
if (items.length === 0) {
return false;
}
for (var i=0; i < items.length; i++) {
if (!items[i].Location) {
return false;
}
}
return true;
},
callback: function(data) {
var item = data.items;
var userService = serviceRegistry.getService("orion.core.user"); //$NON-NLS-0$
if(Array.isArray(item) && item.length > 1){
if(confirm(i18nUtil.formatMessage(messages["ConfirmDeleteUsers"], item.length))){
var usersProcessed = 0;
for(var i=0; i<item.length; i++){
userService.deleteUser(item[i].Location).then(function(jsonData) {
usersProcessed++;
if(usersProcessed===item.length) {
usersList.loadUsers();
}
});
}
}
}else{
item = Array.isArray(item) ? item[0] : item;
if (confirm(i18nUtil.formatMessage(messages["ConfirmDeleteUser"], item.login))) {
userService.deleteUser(item.Location).then(function(jsonData) {
usersList.loadUsers();
});
}
}
}
});
commandRegistry.addCommand(deleteCommand);
var changePasswordCommand = new mCommands.Command({
name: messages["Change Password"],
id: "eclipse.changePassword", //$NON-NLS-0$
callback: function(data) {
var item = data.items;
var dialog = new ResetPasswordDialog.ResetPasswordDialog({
user: item,
registry : serviceRegistry
});
dialog.show();
},
visibleWhen: function(item){
return true;
}
});
commandRegistry.addCommand(changePasswordCommand);
// define the command contributions - where things appear, first the groups
commandRegistry.addCommandGroup("pageActions", "eclipse.usersGroup", 100); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.addCommandGroup("selectionTools", "eclipse.selectionGroup", 500, messages["More"]); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageNavigationActions", "orion.userlist.prevPage", 1); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageNavigationActions", "orion.userlist.nextPage", 2); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageActions", "eclipse.createUser", 1, "eclipse.usersGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("pageActions", "eclipse.findUser", 2, "eclipse.usersGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("userCommands", "eclipse.deleteUser", 1); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("userCommands", "eclipse.changePassword", 2); //$NON-NLS-1$ //$NON-NLS-0$
commandRegistry.registerCommandContribution("selectionTools", "eclipse.deleteUser", 1, "eclipse.selectionGroup"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
//every time the user manually changes the hash, we need to load the user list again
window.addEventListener("hashchange", function() { //$NON-NLS-0$
usersList.loadUsers();
}, false);
usersList.loadUsers();
});
}); | {
"pile_set_name": "Github"
} |
1 0. :reference station number and x-coord.
200. 0. :station spacing and receiver depth
31 33 34 80 66. 0. :shot 1 - r1 r2 r3 r4 s sdepth
| {
"pile_set_name": "Github"
} |
import logging
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list(
"ALLOWED_HOSTS", default=["[email protected] trybootcamp.vitorfs.com"]
)
# DATABASES
# ------------------------------------------------------------------------------
DATABASES["default"] = env.db("DATABASE_URL") # noqa F405
DATABASES["default"]["ATOMIC_REQUESTS"] = True # noqa F405
DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) # noqa F405
# CACHES
# ------------------------------------------------------------------------------
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": REDIS_URL,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
# Mimicing memcache behavior.
# http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior
"IGNORE_EXCEPTIONS": True,
},
}
}
# SECURITY
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect
SECURE_SSL_REDIRECT = env.bool("SECURE_SSL_REDIRECT", default=True)
# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure
SESSION_COOKIE_SECURE = True
# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-httponly
SESSION_COOKIE_HTTPONLY = True
# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure
CSRF_COOKIE_SECURE = True
# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-httponly
CSRF_COOKIE_HTTPONLY = True
# https://docs.djangoproject.com/en/dev/topics/security/#ssl-https
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds
# TODO: set this to 60 seconds first and then to 518400 once you prove the former works
SECURE_HSTS_SECONDS = 60
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-include-subdomains
SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool(
"SECURE_HSTS_INCLUDE_SUBDOMAINS", default=True
)
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-preload
SECURE_HSTS_PRELOAD = env.bool("SECURE_HSTS_PRELOAD", default=True)
# https://docs.djangoproject.com/en/dev/ref/middleware/#x-content-type-options-nosniff
SECURE_CONTENT_TYPE_NOSNIFF = env.bool("SECURE_CONTENT_TYPE_NOSNIFF", default=True)
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-browser-xss-filter
SECURE_BROWSER_XSS_FILTER = True
# https://docs.djangoproject.com/en/dev/ref/settings/#x-frame-options
X_FRAME_OPTIONS = "DENY"
# STORAGES
# ------------------------------------------------------------------------------
# https://django-storages.readthedocs.io/en/latest/#installation
INSTALLED_APPS += ["storages"] # noqa F405
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_ACCESS_KEY_ID = env("AWS_ACCESS_KEY_ID")
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_SECRET_ACCESS_KEY = env("AWS_SECRET_ACCESS_KEY")
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_STORAGE_BUCKET_NAME = env("AWS_STORAGE_BUCKET_NAME")
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_AUTO_CREATE_BUCKET = True
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_QUERYSTRING_AUTH = False
# DO NOT change these unless you know what you're doing.
_AWS_EXPIRY = 60 * 60 * 24 * 7
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_S3_OBJECT_PARAMETERS = {
"CacheControl": f"max-age={_AWS_EXPIRY}, s-maxage={_AWS_EXPIRY}, must-revalidate"
}
# STATIC
# ------------------------
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
# MEDIA
# ------------------------------------------------------------------------------
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
MEDIA_URL = f"https://s3.amazonaws.com/{AWS_STORAGE_BUCKET_NAME}/"
# TEMPLATES
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#templates
TEMPLATES[0]["OPTIONS"]["loaders"] = [ # noqa F405
(
"django.template.loaders.cached.Loader",
[
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
],
)
]
# EMAIL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
DEFAULT_FROM_EMAIL = env(
"DEFAULT_FROM_EMAIL",
default="Bootcamp <noreply@[email protected] trybootcamp.vitorfs.com>",
)
# https://docs.djangoproject.com/en/dev/ref/settings/#server-email
SERVER_EMAIL = env("SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
# https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
EMAIL_SUBJECT_PREFIX = env("EMAIL_SUBJECT_PREFIX", default="[Bootcamp]")
# ADMIN
# ------------------------------------------------------------------------------
# Django Admin URL regex.
ADMIN_URL = env("ADMIN_URL")
# Anymail (Mailgun)
# ------------------------------------------------------------------------------
# https://anymail.readthedocs.io/en/stable/installation/#installing-anymail
INSTALLED_APPS += ["anymail"] # noqa F405
EMAIL_BACKEND = "anymail.backends.mailgun.EmailBackend"
# https://anymail.readthedocs.io/en/stable/installation/#anymail-settings-reference
ANYMAIL = {
"MAILGUN_API_KEY": env("MAILGUN_API_KEY"),
"MAILGUN_SENDER_DOMAIN": env("MAILGUN_SENDER_DOMAIN"),
}
# WhiteNoise
# ------------------------------------------------------------------------------
# http://whitenoise.evans.io/en/latest/django.html#enable-whitenoise
MIDDLEWARE = ["whitenoise.middleware.WhiteNoiseMiddleware"] + MIDDLEWARE # noqa F405
# raven
# ------------------------------------------------------------------------------
# https://docs.sentry.io/clients/python/integrations/django/
INSTALLED_APPS += ["raven.contrib.django.raven_compat"] # noqa F405
MIDDLEWARE = [
"raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware"
] + MIDDLEWARE
# Sentry
# ------------------------------------------------------------------------------
SENTRY_DSN = env("SENTRY_DSN")
SENTRY_CLIENT = env(
"SENTRY_CLIENT", default="raven.contrib.django.raven_compat.DjangoClient"
)
LOGGING = {
"version": 1,
"disable_existing_loggers": True,
"root": {"level": "WARNING", "handlers": ["sentry"]},
"formatters": {
"verbose": {
"format": "%(levelname)s %(asctime)s %(module)s "
"%(process)d %(thread)d %(message)s"
}
},
"handlers": {
"sentry": {
"level": "ERROR",
"class": "raven.contrib.django.raven_compat.handlers.SentryHandler",
},
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
"formatter": "verbose",
},
},
"loggers": {
"django.db.backends": {
"level": "ERROR",
"handlers": ["console"],
"propagate": False,
},
"raven": {"level": "DEBUG", "handlers": ["console"], "propagate": False},
"sentry.errors": {
"level": "DEBUG",
"handlers": ["console"],
"propagate": False,
},
"django.security.DisallowedHost": {
"level": "ERROR",
"handlers": ["console", "sentry"],
"propagate": False,
},
},
}
SENTRY_CELERY_LOGLEVEL = env.int("SENTRY_LOG_LEVEL", logging.INFO)
RAVEN_CONFIG = {
"CELERY_LOGLEVEL": env.int("SENTRY_LOG_LEVEL", logging.INFO),
"DSN": SENTRY_DSN,
}
# Your stuff...
# ------------------------------------------------------------------------------
| {
"pile_set_name": "Github"
} |
Oro\Bundle\PricingBundle\Entity\ProductPrice:
priceUsd2:
product: '@product1'
priceList: '@defaultPriceList'
currency: 'USD'
quantity: 1
unit: '@each'
value: 23
priceEur2:
product: '@product1'
priceList: '@defaultPriceList'
currency: 'EUR'
quantity: 1
unit: '@each'
value: 20
Oro\Bundle\PricingBundle\Entity\CombinedProductPrice:
combinedPriceRelationUsd2:
product: '@product1'
priceList: '@combinedPriceList'
currency: 'USD'
quantity: 1
unit: '@each'
value: 23
combinedPriceRelationEur2:
product: '@product1'
priceList: '@combinedPriceList'
currency: 'EUR'
quantity: 1
unit: '@each'
value: 20
| {
"pile_set_name": "Github"
} |
//test for single select without any DMLOps
io/snappydata/hydra/snapshotIsolation/testSnapshotWithoutDMLOPsJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=4
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=4
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testSnapshotWithoutDMLOPsJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=4
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=4
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testSnapshotWithoutDMLOPsJDBCClient_ColumnTables.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=4
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=4
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testSnapshotWithoutDMLOPsJDBCClient_ColocatedTables.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=4
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=4
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
//test for single select with inserts
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_ColumnTable.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_ColocatedTables.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
//test for selects executing at same time, with inserts happening in parallel.
io/snappydata/hydra/snapshotIsolation/testInsertWithMultipleSelectJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithMultipleSelectJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithMultipleSelectJDBCClient_ColumnTable.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithMultipleSelectJDBCClient_ColocatedTables.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
//test for selects executing at same time, with update/insert happening in parallel.
io/snappydata/hydra/snapshotIsolation/testUpdateWithSelectJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testUpdateWithSelectJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
//test for selects executing at same time, with delete/insert happening in parallel.
io/snappydata/hydra/snapshotIsolation/testDeleteWithSelectJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testDeleteWithSelectJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
//test for selects executing at same time, with DML happening in parallel.
io/snappydata/hydra/snapshotIsolation/testDMLWithSelectJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testDMLWithSelectJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
//test for selects executing at same time, with insert happening in parallel.
io/snappydata/hydra/snapshotIsolation/testMultipleSnapshotJDBCClient_ReplicatedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testMultipleSnapshotJDBCClient_PartitionedRow.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testMultipleSnapshotJDBCClient_ColumnTable.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testMultipleSnapshotJDBCClient_ColocatedTables.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=3
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_ReplicatedRowServerHA.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
numVMsToStop=1
persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_PartitionedRowServerHA.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
numVMsToStop=1
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_ColumnTableServerHA.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
numVMsToStop=1
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_ColocatedTablesServerHA.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
numVMsToStop=1
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby"
io/snappydata/hydra/snapshotIsolation/testInsertWithSelectJDBCClient_PartitionedRowWithEviction.conf
A=snappyStore snappyStoreHosts=3 snappyStoreVMsPerHost=1 snappyStoreThreadsPerVM=2
B=lead leadHosts=1 leadVMsPerHost=1 leadThreadsPerVM=2
C=locator locatorHosts=1 locatorVMsPerHost=1 locatorThreadsPerVM=1
D=worker workerHosts=1 workerVMsPerHost=1 workerThreadsPerVM=1
redundantCopies=1 persistenceMode="sync"
derbyDataLocation="$GEMFIRE/../../../tests/common/src/main/resources/northwind_derby" | {
"pile_set_name": "Github"
} |
/* ----------------------------------------------------------------------
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.
*
* $Date: 19. March 2015
* $Revision: V.1.4.5
*
* Project: CMSIS DSP Library
* Title: arm_mat_sub_f32.c
*
* Description: Floating-point matrix subtraction.
*
* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of ARM LIMITED nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* -------------------------------------------------------------------- */
#include "arm_math.h"
/**
* @ingroup groupMatrix
*/
/**
* @defgroup MatrixSub Matrix Subtraction
*
* Subtract two matrices.
* \image html MatrixSubtraction.gif "Subraction of two 3 x 3 matrices"
*
* The functions check to make sure that
* <code>pSrcA</code>, <code>pSrcB</code>, and <code>pDst</code> have the same
* number of rows and columns.
*/
/**
* @addtogroup MatrixSub
* @{
*/
/**
* @brief Floating-point matrix subtraction
* @param[in] *pSrcA points to the first input matrix structure
* @param[in] *pSrcB points to the second input matrix structure
* @param[out] *pDst points to output matrix structure
* @return The function returns either
* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
*/
arm_status arm_mat_sub_f32(
const arm_matrix_instance_f32 * pSrcA,
const arm_matrix_instance_f32 * pSrcB,
arm_matrix_instance_f32 * pDst)
{
float32_t *pIn1 = pSrcA->pData; /* input data matrix pointer A */
float32_t *pIn2 = pSrcB->pData; /* input data matrix pointer B */
float32_t *pOut = pDst->pData; /* output data matrix pointer */
#ifndef ARM_MATH_CM0_FAMILY
float32_t inA1, inA2, inB1, inB2, out1, out2; /* temporary variables */
#endif // #ifndef ARM_MATH_CM0_FAMILY
uint32_t numSamples; /* total number of elements in the matrix */
uint32_t blkCnt; /* loop counters */
arm_status status; /* status of matrix subtraction */
#ifdef ARM_MATH_MATRIX_CHECK
/* Check for matrix mismatch condition */
if((pSrcA->numRows != pSrcB->numRows) ||
(pSrcA->numCols != pSrcB->numCols) ||
(pSrcA->numRows != pDst->numRows) || (pSrcA->numCols != pDst->numCols))
{
/* Set status as ARM_MATH_SIZE_MISMATCH */
status = ARM_MATH_SIZE_MISMATCH;
}
else
#endif /* #ifdef ARM_MATH_MATRIX_CHECK */
{
/* Total number of samples in the input matrix */
numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
#ifndef ARM_MATH_CM0_FAMILY
/* Run the below code for Cortex-M4 and Cortex-M3 */
/* Loop Unrolling */
blkCnt = numSamples >> 2u;
/* First part of the processing with loop unrolling. Compute 4 outputs at a time.
** a second loop below computes the remaining 1 to 3 samples. */
while(blkCnt > 0u)
{
/* C(m,n) = A(m,n) - B(m,n) */
/* Subtract and then store the results in the destination buffer. */
/* Read values from source A */
inA1 = pIn1[0];
/* Read values from source B */
inB1 = pIn2[0];
/* Read values from source A */
inA2 = pIn1[1];
/* out = sourceA - sourceB */
out1 = inA1 - inB1;
/* Read values from source B */
inB2 = pIn2[1];
/* Read values from source A */
inA1 = pIn1[2];
/* out = sourceA - sourceB */
out2 = inA2 - inB2;
/* Read values from source B */
inB1 = pIn2[2];
/* Store result in destination */
pOut[0] = out1;
pOut[1] = out2;
/* Read values from source A */
inA2 = pIn1[3];
/* Read values from source B */
inB2 = pIn2[3];
/* out = sourceA - sourceB */
out1 = inA1 - inB1;
/* out = sourceA - sourceB */
out2 = inA2 - inB2;
/* Store result in destination */
pOut[2] = out1;
/* Store result in destination */
pOut[3] = out2;
/* update pointers to process next sampels */
pIn1 += 4u;
pIn2 += 4u;
pOut += 4u;
/* Decrement the loop counter */
blkCnt--;
}
/* If the numSamples is not a multiple of 4, compute any remaining output samples here.
** No loop unrolling is used. */
blkCnt = numSamples % 0x4u;
#else
/* Run the below code for Cortex-M0 */
/* Initialize blkCnt with number of samples */
blkCnt = numSamples;
#endif /* #ifndef ARM_MATH_CM0_FAMILY */
while(blkCnt > 0u)
{
/* C(m,n) = A(m,n) - B(m,n) */
/* Subtract and then store the results in the destination buffer. */
*pOut++ = (*pIn1++) - (*pIn2++);
/* Decrement the loop counter */
blkCnt--;
}
/* Set status as ARM_MATH_SUCCESS */
status = ARM_MATH_SUCCESS;
}
/* Return to application */
return (status);
}
/**
* @} end of MatrixSub group
*/
| {
"pile_set_name": "Github"
} |
using CSM.Commands.Data.Districts;
using CSM.Helpers;
namespace CSM.Commands.Handler.Districts
{
public class DistrictPolicyUnsetHandler : CommandHandler<DistrictPolicyUnsetCommand>
{
protected override void Handle(DistrictPolicyUnsetCommand command)
{
IgnoreHelper.StartIgnore();
DistrictManager.instance.UnsetDistrictPolicy(command.Policy, command.DistrictId);
IgnoreHelper.EndIgnore();
}
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ポートスキャンタブ</title>
</head>
<body bgcolor="#ffffff">
<h1>ポートスキャンタブ</h1>
The Port Scan tab allows you to perform a basic port scan on any of the sites that have
been accessed.
<br>
<br> Sites can be selected via the toolbar or the Sites tab.
<br> Any sites that have have been are are currently being scanned are marked in
bold in the toolbar Sites pulldown control.
<br> The toolbar provides a set of buttons which allow you to start, stop, pause and
resume the scan.
<br> A progress bar shows how far the scan of the selected site has progressed.
<br> The 'Current scans' value shows how many scans are currently active - hovering
over this value will show a list of the sites being scanned in a popup.
<h2>右クリック メニュー</h2>
Right clicking on a node will bring up a menu which will allow you to:
<h3>コピー</h3>
This will copy the selected port details to the clipboard.
<h2>関連情報</h2>
<table>
<tr>
<td> </td>
<td><a href="options.html">オプション ポート スキャン画面</a></td>
<td>for details of the port scan configuration</td>
</tr>
</table>
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*
* 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.
*/
package org.apache.syncope.client.console.resources;
import org.apache.syncope.client.console.pages.SAML2SPBeforeLogout;
import org.apache.syncope.client.ui.commons.SAML2SP4UIConstants;
import org.apache.syncope.client.ui.commons.annotations.Resource;
import org.apache.syncope.client.ui.commons.resources.saml2sp4ui.LogoutResource;
import org.apache.wicket.markup.html.WebPage;
@Resource(
key = SAML2SP4UIConstants.URL_CONTEXT + ".logout",
path = "/" + SAML2SP4UIConstants.URL_CONTEXT + "/logout")
public class ConsoleLogoutResource extends LogoutResource {
private static final long serialVersionUID = -6515754535808725264L;
@Override
protected Class<? extends WebPage> getLogoutPageClass() {
return SAML2SPBeforeLogout.class;
}
}
| {
"pile_set_name": "Github"
} |
---
name: "H. Poteat"
link: https://twitter.com/NSQE
organization: "GitHub"
occupation_title: "Privacy Superhero"
---
| {
"pile_set_name": "Github"
} |
OBC
| {
"pile_set_name": "Github"
} |
/*-
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _IXGBE_BYPASS_DEFINES_H_
#define _IXGBE_BYPASS_DEFINES_H_
#ifdef RTE_NIC_BYPASS
#define msleep(x) rte_delay_us(x*1000)
#define usleep_range(min, max) rte_delay_us(min)
#define BYPASS_PAGE_CTL0 0x00000000
#define BYPASS_PAGE_CTL1 0x40000000
#define BYPASS_PAGE_CTL2 0x80000000
#define BYPASS_PAGE_M 0xc0000000
#define BYPASS_WE 0x20000000
#define BYPASS_AUTO 0x0
#define BYPASS_NOP 0x0
#define BYPASS_NORM 0x1
#define BYPASS_BYPASS 0x2
#define BYPASS_ISOLATE 0x3
#define BYPASS_EVENT_MAIN_ON 0x1
#define BYPASS_EVENT_AUX_ON 0x2
#define BYPASS_EVENT_MAIN_OFF 0x3
#define BYPASS_EVENT_AUX_OFF 0x4
#define BYPASS_EVENT_WDT_TO 0x5
#define BYPASS_EVENT_USR 0x6
#define BYPASS_MODE_OFF_M 0x00000003
#define BYPASS_STATUS_OFF_M 0x0000000c
#define BYPASS_AUX_ON_M 0x00000030
#define BYPASS_MAIN_ON_M 0x000000c0
#define BYPASS_MAIN_OFF_M 0x00000300
#define BYPASS_AUX_OFF_M 0x00000c00
#define BYPASS_WDTIMEOUT_M 0x00003000
#define BYPASS_WDT_ENABLE_M 0x00004000
#define BYPASS_WDT_VALUE_M 0x00070000
#define BYPASS_MODE_OFF_SHIFT 0
#define BYPASS_STATUS_OFF_SHIFT 2
#define BYPASS_AUX_ON_SHIFT 4
#define BYPASS_MAIN_ON_SHIFT 6
#define BYPASS_MAIN_OFF_SHIFT 8
#define BYPASS_AUX_OFF_SHIFT 10
#define BYPASS_WDTIMEOUT_SHIFT 12
#define BYPASS_WDT_ENABLE_SHIFT 14
#define BYPASS_WDT_TIME_SHIFT 16
#define BYPASS_WDT_1 0x0
#define BYPASS_WDT_1_5 0x1
#define BYPASS_WDT_2 0x2
#define BYPASS_WDT_3 0x3
#define BYPASS_WDT_4 0x4
#define BYPASS_WDT_8 0x5
#define BYPASS_WDT_16 0x6
#define BYPASS_WDT_32 0x7
#define BYPASS_WDT_OFF 0xffff
#define BYPASS_WDT_MASK 0x7
#define BYPASS_CTL1_TIME_M 0x01ffffff
#define BYPASS_CTL1_VALID_M 0x02000000
#define BYPASS_CTL1_OFFTRST_M 0x04000000
#define BYPASS_CTL1_WDT_PET_M 0x08000000
#define BYPASS_CTL1_VALID 0x02000000
#define BYPASS_CTL1_OFFTRST 0x04000000
#define BYPASS_CTL1_WDT_PET 0x08000000
#define BYPASS_CTL2_DATA_M 0x000000ff
#define BYPASS_CTL2_OFFSET_M 0x0000ff00
#define BYPASS_CTL2_RW_M 0x00010000
#define BYPASS_CTL2_HEAD_M 0x0ff00000
#define BYPASS_CTL2_OFFSET_SHIFT 8
#define BYPASS_CTL2_HEAD_SHIFT 20
#define BYPASS_CTL2_RW 0x00010000
enum ixgbe_state_t {
__IXGBE_TESTING,
__IXGBE_RESETTING,
__IXGBE_DOWN,
__IXGBE_SERVICE_SCHED,
__IXGBE_IN_SFP_INIT,
__IXGBE_IN_BYPASS_LOW,
__IXGBE_IN_BYPASS_HIGH,
__IXGBE_IN_BYPASS_LOG,
};
#define BYPASS_MAX_LOGS 43
#define BYPASS_LOG_SIZE 5
#define BYPASS_LOG_LINE_SIZE 37
#define BYPASS_EEPROM_VER_ADD 0x02
#define BYPASS_LOG_TIME_M 0x01ffffff
#define BYPASS_LOG_TIME_VALID_M 0x02000000
#define BYPASS_LOG_HEAD_M 0x04000000
#define BYPASS_LOG_CLEAR_M 0x08000000
#define BYPASS_LOG_EVENT_M 0xf0000000
#define BYPASS_LOG_ACTION_M 0x03
#define BYPASS_LOG_EVENT_SHIFT 28
#define BYPASS_LOG_CLEAR_SHIFT 24 /* bit offset */
#define IXGBE_DEV_TO_ADPATER(dev) \
((struct ixgbe_adapter*)(dev->data->dev_private))
/* extractions from ixgbe_phy.h */
#define IXGBE_I2C_EEPROM_DEV_ADDR2 0xA2
#define IXGBE_SFF_SFF_8472_SWAP 0x5C
#define IXGBE_SFF_SFF_8472_COMP 0x5E
#define IXGBE_SFF_SFF_8472_OSCB 0x6E
#define IXGBE_SFF_SFF_8472_ESCB 0x76
#define IXGBE_SFF_SOFT_RS_SELECT_MASK 0x8
#define IXGBE_SFF_SOFT_RS_SELECT_10G 0x8
#define IXGBE_SFF_SOFT_RS_SELECT_1G 0x0
/* extractions from ixgbe_type.h */
#define IXGBE_DEV_ID_82599_BYPASS 0x155D
#define IXGBE_BYPASS_FW_WRITE_FAILURE -35
#endif /* RTE_NIC_BYPASS */
#endif /* _IXGBE_BYPASS_DEFINES_H_ */
| {
"pile_set_name": "Github"
} |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2010 Gael Guennebaud <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_SELECT_H
#define EIGEN_SELECT_H
namespace Eigen {
/** \class Select
* \ingroup Core_Module
*
* \brief Expression of a coefficient wise version of the C++ ternary operator ?:
*
* \param ConditionMatrixType the type of the \em condition expression which must be a boolean matrix
* \param ThenMatrixType the type of the \em then expression
* \param ElseMatrixType the type of the \em else expression
*
* This class represents an expression of a coefficient wise version of the C++ ternary operator ?:.
* It is the return type of DenseBase::select() and most of the time this is the only way it is used.
*
* \sa DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const
*/
namespace internal {
template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>
struct traits<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >
: traits<ThenMatrixType>
{
typedef typename traits<ThenMatrixType>::Scalar Scalar;
typedef Dense StorageKind;
typedef typename traits<ThenMatrixType>::XprKind XprKind;
typedef typename ConditionMatrixType::Nested ConditionMatrixNested;
typedef typename ThenMatrixType::Nested ThenMatrixNested;
typedef typename ElseMatrixType::Nested ElseMatrixNested;
enum {
RowsAtCompileTime = ConditionMatrixType::RowsAtCompileTime,
ColsAtCompileTime = ConditionMatrixType::ColsAtCompileTime,
MaxRowsAtCompileTime = ConditionMatrixType::MaxRowsAtCompileTime,
MaxColsAtCompileTime = ConditionMatrixType::MaxColsAtCompileTime,
Flags = (unsigned int)ThenMatrixType::Flags & ElseMatrixType::Flags & HereditaryBits,
CoeffReadCost = traits<typename remove_all<ConditionMatrixNested>::type>::CoeffReadCost
+ EIGEN_SIZE_MAX(traits<typename remove_all<ThenMatrixNested>::type>::CoeffReadCost,
traits<typename remove_all<ElseMatrixNested>::type>::CoeffReadCost)
};
};
}
template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>
class Select : internal::no_assignment_operator,
public internal::dense_xpr_base< Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >::type
{
public:
typedef typename internal::dense_xpr_base<Select>::type Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Select)
Select(const ConditionMatrixType& conditionMatrix,
const ThenMatrixType& thenMatrix,
const ElseMatrixType& elseMatrix)
: m_condition(conditionMatrix), m_then(thenMatrix), m_else(elseMatrix)
{
eigen_assert(m_condition.rows() == m_then.rows() && m_condition.rows() == m_else.rows());
eigen_assert(m_condition.cols() == m_then.cols() && m_condition.cols() == m_else.cols());
}
Index rows() const { return m_condition.rows(); }
Index cols() const { return m_condition.cols(); }
const Scalar coeff(Index i, Index j) const
{
if (m_condition.coeff(i,j))
return m_then.coeff(i,j);
else
return m_else.coeff(i,j);
}
const Scalar coeff(Index i) const
{
if (m_condition.coeff(i))
return m_then.coeff(i);
else
return m_else.coeff(i);
}
const ConditionMatrixType& conditionMatrix() const
{
return m_condition;
}
const ThenMatrixType& thenMatrix() const
{
return m_then;
}
const ElseMatrixType& elseMatrix() const
{
return m_else;
}
protected:
typename ConditionMatrixType::Nested m_condition;
typename ThenMatrixType::Nested m_then;
typename ElseMatrixType::Nested m_else;
};
/** \returns a matrix where each coefficient (i,j) is equal to \a thenMatrix(i,j)
* if \c *this(i,j), and \a elseMatrix(i,j) otherwise.
*
* Example: \include MatrixBase_select.cpp
* Output: \verbinclude MatrixBase_select.out
*
* \sa class Select
*/
template<typename Derived>
template<typename ThenDerived,typename ElseDerived>
inline const Select<Derived,ThenDerived,ElseDerived>
DenseBase<Derived>::select(const DenseBase<ThenDerived>& thenMatrix,
const DenseBase<ElseDerived>& elseMatrix) const
{
return Select<Derived,ThenDerived,ElseDerived>(derived(), thenMatrix.derived(), elseMatrix.derived());
}
/** Version of DenseBase::select(const DenseBase&, const DenseBase&) with
* the \em else expression being a scalar value.
*
* \sa DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const, class Select
*/
template<typename Derived>
template<typename ThenDerived>
inline const Select<Derived,ThenDerived, typename ThenDerived::ConstantReturnType>
DenseBase<Derived>::select(const DenseBase<ThenDerived>& thenMatrix,
typename ThenDerived::Scalar elseScalar) const
{
return Select<Derived,ThenDerived,typename ThenDerived::ConstantReturnType>(
derived(), thenMatrix.derived(), ThenDerived::Constant(rows(),cols(),elseScalar));
}
/** Version of DenseBase::select(const DenseBase&, const DenseBase&) with
* the \em then expression being a scalar value.
*
* \sa DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const, class Select
*/
template<typename Derived>
template<typename ElseDerived>
inline const Select<Derived, typename ElseDerived::ConstantReturnType, ElseDerived >
DenseBase<Derived>::select(typename ElseDerived::Scalar thenScalar,
const DenseBase<ElseDerived>& elseMatrix) const
{
return Select<Derived,typename ElseDerived::ConstantReturnType,ElseDerived>(
derived(), ElseDerived::Constant(rows(),cols(),thenScalar), elseMatrix.derived());
}
} // end namespace Eigen
#endif // EIGEN_SELECT_H
| {
"pile_set_name": "Github"
} |
{
"thousand_postfix": "k",
"@thousand_postfix": {
"description": "For eg. communty has 3k members",
"type": "text",
"placeholders": {}
},
"million_postfix": "m",
"@million_postfix": {
"description": "For eg. user has 3m followers",
"type": "text",
"placeholders": {}
},
"billion_postfix": "b",
"@billion_postfix": {
"description": "For eg. World circle has 7.5b people",
"type": "text",
"placeholders": {}
},
"translate_see_translation": "See translation",
"@translate_see_translation": {
"type": "text",
"placeholders": {}
},
"translate_show_original": "Show original",
"@translate_show_original": {
"type": "text",
"placeholders": {}
},
"follows_lists_account": "1 Account",
"@follows_lists_account": {
"type": "text",
"placeholders": {}
},
"follows_lists_accounts": "{prettyUsersCount} Accounts",
"@follows_lists_accounts": {
"description": "prettyUsersCount will be 3m, 50k etc.. so we endup with final string 3k Accounts",
"type": "text",
"placeholders": {
"prettyUsersCount": {}
}
},
"edit_profile_user_name_taken": "Username @{username} is taken",
"@edit_profile_user_name_taken": {
"type": "text",
"placeholders": {
"username": {}
}
},
"profile_action_deny_connection": "Deny connection request",
"@profile_action_deny_connection": {
"type": "text",
"placeholders": {}
},
"profile_action_user_blocked": "User blocked",
"@profile_action_user_blocked": {
"type": "text",
"placeholders": {}
},
"profile_action_user_unblocked": "User unblocked",
"@profile_action_user_unblocked": {
"type": "text",
"placeholders": {}
},
"profile_action_user_post_notifications_enabled": "New post notifications enabled",
"@profile_action_user_post_notifications_enabled": {
"type": "text",
"placeholders": {}
},
"profile_action_user_post_notifications_disabled": "New post notifications disabled",
"@profile_action_user_post_notifications_disabled": {
"type": "text",
"placeholders": {}
},
"profile_in_circles": "In circles",
"@profile_in_circles": {
"type": "text",
"placeholders": {}
},
"profile_action_cancel_connection": "Cancel connection request",
"@profile_action_cancel_connection": {
"type": "text",
"placeholders": {}
},
"profile_url_invalid_error": "Please provide a valid url.",
"@profile_url_invalid_error": {
"type": "text",
"placeholders": {}
},
"profile_location_length_error": "Location can't be longer than {maxLength} characters.",
"@profile_location_length_error": {
"type": "text",
"placeholders": {
"maxLength": {}
}
},
"profile_bio_length_error": "Bio can't be longer than {maxLength} characters.",
"@profile_bio_length_error": {
"type": "text",
"placeholders": {
"maxLength": {}
}
},
"profile_okuna_age_toast": "On Okuna since {age}",
"@profile_okuna_age_toast": {
"type": "text",
"placeholders": {
"age": {}
}
},
"follow_button_follow_text": "Follow",
"@follow_button_follow_text": {
"type": "text",
"placeholders": {}
},
"follow_button_follow_back_text": "Follow back",
"@follow_button_follow_back_text": {
"type": "text",
"placeholders": {}
},
"follow_button_following_text": "Following",
"@follow_button_following_text": {
"type": "text",
"placeholders": {}
},
"follow_button_unfollow_text": "Unfollow",
"@follow_button_unfollow_text": {
"type": "text",
"placeholders": {}
},
"edit_profile_username": "Username",
"@edit_profile_username": {
"type": "text",
"placeholders": {}
},
"add_account_update_account_lists": "Update account lists",
"@add_account_update_account_lists": {
"type": "text",
"placeholders": {}
},
"add_account_to_lists": "Add account to list",
"@add_account_to_lists": {
"type": "text",
"placeholders": {}
},
"add_account_update_lists": "Update lists",
"@add_account_update_lists": {
"type": "text",
"placeholders": {}
},
"add_account_save": "Save",
"@add_account_save": {
"type": "text",
"placeholders": {}
},
"add_account_done": "Done",
"@add_account_done": {
"type": "text",
"placeholders": {}
},
"add_account_success": "Success",
"@add_account_success": {
"type": "text",
"placeholders": {}
},
"emoji_field_none_selected": "No emoji selected",
"@emoji_field_none_selected": {
"type": "text",
"placeholders": {}
},
"emoji_search_none_found": "No emoji found matching '{searchQuery}'.",
"@emoji_search_none_found": {
"type": "text",
"placeholders": {
"searchQuery": {}
}
},
"follow_lists_title": "My lists",
"@follow_lists_title": {
"type": "text",
"placeholders": {}
},
"follow_lists_search_for": "Search for a list...",
"@follow_lists_search_for": {
"type": "text",
"placeholders": {}
},
"follow_lists_no_list_found": "No lists found.",
"@follow_lists_no_list_found": {
"type": "text",
"placeholders": {}
},
"follow_lists_no_list_found_for": "No list found for '{searchQuery}'",
"@follow_lists_no_list_found_for": {
"type": "text",
"placeholders": {
"searchQuery": {}
}
},
"list_name_empty_error": "List name cannot be empty.",
"@list_name_empty_error": {
"type": "text",
"placeholders": {}
},
"list_name_range_error": "List name must be no longer than {maxLength} characters.",
"@list_name_range_error": {
"type": "text",
"placeholders": {
"maxLength": {}
}
},
"circle_name_empty_error": "Circle name cannot be empty.",
"@circle_name_empty_error": {
"type": "text",
"placeholders": {}
},
"circle_name_range_error": "Circle name must be no longer than {maxLength} characters.",
"@circle_name_range_error": {
"type": "text",
"placeholders": {
"maxLength": {}
}
},
"save_follows_list_name": "Name",
"@save_follows_list_name": {
"type": "text",
"placeholders": {}
},
"save_follows_list_hint_text": "e.g. Travel, Photography",
"@save_follows_list_hint_text": {
"type": "text",
"placeholders": {}
},
"save_follows_list_name_taken": "List name '{listName}' is taken",
"@save_follows_list_name_taken": {
"type": "text",
"placeholders": {
"listName": {}
}
},
"save_follows_list_emoji": "Emoji",
"@save_follows_list_emoji": {
"type": "text",
"placeholders": {}
},
"save_follows_list_users": "Users",
"@save_follows_list_users": {
"type": "text",
"placeholders": {}
},
"save_follows_list_edit": "Edit list",
"@save_follows_list_edit": {
"type": "text",
"placeholders": {}
},
"save_follows_list_create": "Create list",
"@save_follows_list_create": {
"type": "text",
"placeholders": {}
},
"save_follows_list_save": "Save",
"@save_follows_list_save": {
"type": "text",
"placeholders": {}
},
"save_follows_list_emoji_required_error": "Emoji is required",
"@save_follows_list_emoji_required_error": {
"type": "text",
"placeholders": {}
},
"follows_list_edit": "Edit",
"@follows_list_edit": {
"type": "text",
"placeholders": {}
},
"follows_list_header_title": "Users",
"@follows_list_header_title": {
"type": "text",
"placeholders": {}
},
"edit_profile_name": "Name",
"@edit_profile_name": {
"type": "text",
"placeholders": {}
},
"edit_profile_url": "Url",
"@edit_profile_url": {
"type": "text",
"placeholders": {}
},
"edit_profile_location": "Location",
"@edit_profile_location": {
"type": "text",
"placeholders": {}
},
"edit_profile_bio": "Bio",
"@edit_profile_bio": {
"type": "text",
"placeholders": {}
},
"manage_profile_followers_count_toggle": "Followers count",
"@manage_profile_followers_count_toggle": {
"type": "text",
"placeholders": {}
},
"manage_profile_followers_count_toggle__descr": "Display the number of people that follow you, on your profile.",
"@manage_profile_followers_count_toggle__descr": {
"type": "text",
"placeholders": {}
},
"manage_profile_community_posts_toggle": "Community posts",
"@manage_profile_community_posts_toggle": {
"type": "text",
"placeholders": {}
},
"manage_profile_community_posts_toggle__descr": "Display posts you share with public communities, on your profile.",
"@manage_profile_community_posts_toggle__descr": {
"type": "text",
"placeholders": {}
},
"edit_profile_community_posts": "Communities",
"@edit_profile_community_posts": {
"type": "text",
"placeholders": {}
},
"edit_profile_community_posts_descr": "Display in profile",
"@edit_profile_community_posts_descr": {
"type": "text",
"placeholders": {}
},
"manage": "Manage",
"@manage": {
"type": "text",
"placeholders": {}
},
"manage_profile_title": "Manage profile",
"@manage_profile_title": {
"type": "text",
"placeholders": {}
},
"manage_profile_details_title": "Details",
"@manage_profile_details_title": {
"type": "text",
"placeholders": {}
},
"manage_profile_details_title_desc": "Change your username, name, url, location, avatar or cover photo.",
"@manage_profile_details_title_desc": {
"type": "text",
"placeholders": {}
},
"profile_posts_excluded_communities": "Hidden communities",
"@profile_posts_excluded_communities": {
"type": "text",
"placeholders": {}
},
"profile_posts_exclude_communities": "Exclude communities",
"@profile_posts_exclude_communities": {
"type": "text",
"placeholders": {}
},
"profile_posts_excluded_communities_desc": "See, add and remove hidden communities from your profile.",
"@profile_posts_excluded_communities_desc": {
"type": "text",
"placeholders": {}
},
"edit_profile_save_text": "Save",
"@edit_profile_save_text": {
"type": "text",
"placeholders": {}
},
"edit_profile_pick_image": "Pick image",
"@edit_profile_pick_image": {
"type": "text",
"placeholders": {}
},
"edit_profile_delete": "Delete",
"@edit_profile_delete": {
"type": "text",
"placeholders": {}
},
"edit_profile_pick_image_error_too_large": "Image too large (limit: {limit} MB)",
"@edit_profile_pick_image_error_too_large": {
"type": "text",
"placeholders": {
"limit": {}
}
},
"tile_following": " · Following",
"@tile_following": {
"type": "text",
"placeholders": {}
},
"following_text": "Following",
"@following_text": {
"type": "text",
"placeholders": {}
},
"following_resource_name": "followed users",
"@following_resource_name": {
"description": "Eg: Search followed users.., No followed users found. etc ",
"type": "text",
"placeholders": {}
},
"tile_delete": "Delete",
"@tile_delete": {
"type": "text",
"placeholders": {}
},
"invite": "Invite",
"@invite": {
"type": "text",
"placeholders": {}
},
"uninvite": "Uninvite",
"@uninvite": {
"type": "text",
"placeholders": {}
},
"invite_member": "Member",
"@invite_member": {
"type": "text",
"placeholders": {}
},
"invite_someone_message": "Hey, I'd like to invite you to Okuna.\n\nFor Apple, first, download the TestFlight app on iTunes ({testFlightLink}) and then download the Okuna app ({iosLink})\n\nFor Android, download it from the Play store ({androidLink}).\n\nSecond, paste this personalised invite link in the 'Sign up' form in the Okuna App: {inviteLink}",
"@invite_someone_message": {
"type": "text",
"placeholders": {
"iosLink": {},
"testFlightLink": {},
"androidLink": {},
"inviteLink": {}
}
},
"connections_header_circle_desc": "The circle all of your connections get added to.",
"@connections_header_circle_desc": {
"type": "text",
"placeholders": {}
},
"connections_header_users": "Users",
"@connections_header_users": {
"type": "text",
"placeholders": {}
},
"connection_pending": "Pending",
"@connection_pending": {
"type": "text",
"placeholders": {}
},
"connection_circle_edit": "Edit",
"@connection_circle_edit": {
"type": "text",
"placeholders": {}
},
"connections_circle_delete": "Delete",
"@connections_circle_delete": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_name": "Name",
"@save_connection_circle_name": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_hint": "e.g. Friends, Family, Work.",
"@save_connection_circle_hint": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_color_name": "Color",
"@save_connection_circle_color_name": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_color_hint": "(Tap to change)",
"@save_connection_circle_color_hint": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_users": "Users",
"@save_connection_circle_users": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_edit": "Edit circle",
"@save_connection_circle_edit": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_create": "Create circle",
"@save_connection_circle_create": {
"type": "text",
"placeholders": {}
},
"save_connection_circle_save": "Save",
"@save_connection_circle_save": {
"type": "text",
"placeholders": {}
},
"update_connection_circle_save": "Save",
"@update_connection_circle_save": {
"type": "text",
"placeholders": {}
},
"update_connection_circle_updated": "Connection updated",
"@update_connection_circle_updated": {
"type": "text",
"placeholders": {}
},
"update_connection_circles_title": "Update connection circles",
"@update_connection_circles_title": {
"type": "text",
"placeholders": {}
},
"confirm_connection_with": "Confirm connection with {userName}",
"@confirm_connection_with": {
"type": "text",
"placeholders": {
"userName": {}
}
},
"confirm_connection_add_connection": "Add connection to circle",
"@confirm_connection_add_connection": {
"type": "text",
"placeholders": {}
},
"confirm_connection_connection_confirmed": "Connection confirmed",
"@confirm_connection_connection_confirmed": {
"type": "text",
"placeholders": {}
},
"confirm_connection_confirm_text": "Confirm",
"@confirm_connection_confirm_text": {
"type": "text",
"placeholders": {}
},
"connect_to_user_connect_with_username": "Connect with {userName}",
"@connect_to_user_connect_with_username": {
"type": "text",
"placeholders": {
"userName": {}
}
},
"connect_to_user_add_connection": "Add connection to circle",
"@connect_to_user_add_connection": {
"type": "text",
"placeholders": {}
},
"connect_to_user_done": "Done",
"@connect_to_user_done": {
"type": "text",
"placeholders": {}
},
"connect_to_user_request_sent": "Connection request sent",
"@connect_to_user_request_sent": {
"type": "text",
"placeholders": {}
},
"remove_account_from_list": "Remove account from lists",
"@remove_account_from_list": {
"type": "text",
"placeholders": {}
},
"remove_account_from_list_success": "Success",
"@remove_account_from_list_success": {
"type": "text",
"placeholders": {}
},
"confirm_block_user_title": "Confirmation",
"@confirm_block_user_title": {
"type": "text",
"placeholders": {}
},
"confirm_block_user_info": "You won't see each other posts nor be able to interact in any way.",
"@confirm_block_user_info": {
"type": "text",
"placeholders": {}
},
"confirm_block_user_yes": "Yes",
"@confirm_block_user_yes": {
"type": "text",
"placeholders": {}
},
"confirm_block_user_no": "No",
"@confirm_block_user_no": {
"type": "text",
"placeholders": {}
},
"confirm_block_user_blocked": "User blocked.",
"@confirm_block_user_blocked": {
"type": "text",
"placeholders": {}
},
"confirm_block_user_question": "Are you sure you want to block @{username}?",
"@confirm_block_user_question": {
"type": "text",
"placeholders": {
"username": {}
}
},
"save_connection_circle_name_taken": "Circle name '{takenConnectionsCircleName}' is taken",
"@save_connection_circle_name_taken": {
"type": "text",
"placeholders": {
"takenConnectionsCircleName": {}
}
},
"timeline_filters_title": "Timeline filters",
"@timeline_filters_title": {
"type": "text",
"placeholders": {}
},
"timeline_filters_search_desc": "Search for circles and lists...",
"@timeline_filters_search_desc": {
"type": "text",
"placeholders": {}
},
"timeline_filters_clear_all": "Clear all",
"@timeline_filters_clear_all": {
"type": "text",
"placeholders": {}
},
"timeline_filters_apply_all": "Apply filters",
"@timeline_filters_apply_all": {
"type": "text",
"placeholders": {}
},
"timeline_filters_circles": "Circles",
"@timeline_filters_circles": {
"type": "text",
"placeholders": {}
},
"timeline_filters_lists": "Lists",
"@timeline_filters_lists": {
"type": "text",
"placeholders": {}
},
"followers_title": "Followers",
"@followers_title": {
"type": "text",
"placeholders": {}
},
"follower_singular": "follower",
"@follower_singular": {
"type": "text",
"placeholders": {}
},
"follower_plural": "followers",
"@follower_plural": {
"type": "text",
"placeholders": {}
},
"delete_account_title": "Delete account",
"@delete_account_title": {
"type": "text",
"placeholders": {}
},
"delete_account_current_pwd": "Current Password",
"@delete_account_current_pwd": {
"type": "text",
"placeholders": {}
},
"delete_account_current_pwd_hint": "Enter your current password",
"@delete_account_current_pwd_hint": {
"type": "text",
"placeholders": {}
},
"delete_account_next": "Next",
"@delete_account_next": {
"type": "text",
"placeholders": {}
},
"delete_account_confirmation_title": "Confirmation",
"@delete_account_confirmation_title": {
"type": "text",
"placeholders": {}
},
"delete_account_confirmation_desc": "Are you sure you want to delete your account?",
"@delete_account_confirmation_desc": {
"type": "text",
"placeholders": {}
},
"delete_account_confirmation_desc_info": "This is a permanent action and can't be undone.",
"@delete_account_confirmation_desc_info": {
"type": "text",
"placeholders": {}
},
"delete_account_confirmation_no": "No",
"@delete_account_confirmation_no": {
"type": "text",
"placeholders": {}
},
"delete_account_confirmation_yes": "Yes",
"@delete_account_confirmation_yes": {
"type": "text",
"placeholders": {}
},
"delete_account_confirmation_goodbye": "Goodbye 😢",
"@delete_account_confirmation_goodbye": {
"type": "text",
"placeholders": {}
},
"invites_create_create_title": "Create invite",
"@invites_create_create_title": {
"type": "text",
"placeholders": {}
},
"invites_create_edit_title": "Edit invite",
"@invites_create_edit_title": {
"type": "text",
"placeholders": {}
},
"invites_create_save": "Save",
"@invites_create_save": {
"type": "text",
"placeholders": {}
},
"invites_create_create": "Create",
"@invites_create_create": {
"type": "text",
"placeholders": {}
},
"invites_create_name_title": "Nickname",
"@invites_create_name_title": {
"type": "text",
"placeholders": {}
},
"invites_create_name_hint": "e.g. Jane Doe",
"@invites_create_name_hint": {
"type": "text",
"placeholders": {}
},
"invites_pending": "Pending",
"@invites_pending": {
"type": "text",
"placeholders": {}
},
"invites_delete": "Delete",
"@invites_delete": {
"type": "text",
"placeholders": {}
},
"invites_invite_text": "Invite",
"@invites_invite_text": {
"type": "text",
"placeholders": {}
},
"invites_share_yourself": "Share invite yourself",
"@invites_share_yourself": {
"type": "text",
"placeholders": {}
},
"invites_share_yourself_desc": "Choose from messaging apps, etc.",
"@invites_share_yourself_desc": {
"type": "text",
"placeholders": {}
},
"invites_share_email": "Share invite by email",
"@invites_share_email": {
"type": "text",
"placeholders": {}
},
"invites_email_text": "Email",
"@invites_email_text": {
"type": "text",
"placeholders": {}
},
"invites_email_hint": "e.g. [email protected]",
"@invites_email_hint": {
"type": "text",
"placeholders": {}
},
"invites_email_invite_text": "Email invite",
"@invites_email_invite_text": {
"type": "text",
"placeholders": {}
},
"invites_email_send_text": "Send",
"@invites_email_send_text": {
"type": "text",
"placeholders": {}
},
"invites_email_sent_text": "Invite email sent",
"@invites_email_sent_text": {
"type": "text",
"placeholders": {}
},
"invites_share_email_desc": "We will send an invitation email with instructions on your behalf",
"@invites_share_email_desc": {
"type": "text",
"placeholders": {}
},
"invites_edit_text": "Edit",
"@invites_edit_text": {
"type": "text",
"placeholders": {}
},
"invites_title": "My invites",
"@invites_title": {
"type": "text",
"placeholders": {}
},
"invites_accepted_title": "Accepted",
"@invites_accepted_title": {
"type": "text",
"placeholders": {}
},
"invites_accepted_group_name": "accepted invites",
"@invites_accepted_group_name": {
"description": "Egs where this will end up: Accepted invites (capitalised title), Search accepted invites, See all accepted invites ",
"type": "text",
"placeholders": {}
},
"invites_accepted_group_item_name": "accepted invite",
"@invites_accepted_group_item_name": {
"type": "text",
"placeholders": {}
},
"invites_pending_group_name": "pending invites",
"@invites_pending_group_name": {
"type": "text",
"placeholders": {}
},
"invites_pending_group_item_name": "pending invite",
"@invites_pending_group_item_name": {
"type": "text",
"placeholders": {}
},
"invites_none_used": "Looks like you haven't used any invite.",
"@invites_none_used": {
"type": "text",
"placeholders": {}
},
"invites_none_left": "You have no invites available.",
"@invites_none_left": {
"type": "text",
"placeholders": {}
},
"invites_invite_a_friend": "Invite a friend",
"@invites_invite_a_friend": {
"type": "text",
"placeholders": {}
},
"invites_refresh": "Refresh",
"@invites_refresh": {
"type": "text",
"placeholders": {}
},
"language_settings_title": "Language settings",
"@language_settings_title": {
"type": "text",
"placeholders": {}
},
"language_settings_save": "Save",
"@language_settings_save": {
"type": "text",
"placeholders": {}
},
"language_settings_saved_success": "Language changed successfully",
"@language_settings_saved_success": {
"type": "text",
"placeholders": {}
},
"groups_see_all": "See all {groupName}",
"@groups_see_all": {
"description": "Can be, See all joined communities, See all pending invites, See all moderated communities etc. ",
"type": "text",
"placeholders": {
"groupName": {}
}
},
"invites_joined_with": "Joined with username @{username}",
"@invites_joined_with": {
"type": "text",
"placeholders": {
"username": {}
}
},
"invites_pending_email": "Pending, invite email sent to {email}",
"@invites_pending_email": {
"type": "text",
"placeholders": {
"email": {}
}
},
"timeline_filters_no_match": "No match for '{searchQuery}'.",
"@timeline_filters_no_match": {
"type": "text",
"placeholders": {
"searchQuery": {}
}
},
"clear_application_cache_text": "Clear cache",
"@clear_application_cache_text": {
"type": "text",
"placeholders": {}
},
"clear_application_cache_desc": "Clear cached posts, accounts, images & more.",
"@clear_application_cache_desc": {
"type": "text",
"placeholders": {}
},
"clear_application_cache_success": "Cleared cache successfully",
"@clear_application_cache_success": {
"type": "text",
"placeholders": {}
},
"clear_application_cache_failure": "Could not clear cache",
"@clear_application_cache_failure": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_title": "Guidelines Rejection",
"@confirm_guidelines_reject_title": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_info": "You can't use Okuna until you accept the guidelines.",
"@confirm_guidelines_reject_info": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_chat_with_team": "Chat with the team.",
"@confirm_guidelines_reject_chat_with_team": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_chat_immediately": "Start a chat immediately.",
"@confirm_guidelines_reject_chat_immediately": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_chat_community": "Chat with the community.",
"@confirm_guidelines_reject_chat_community": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_join_slack": "Join the Slack channel.",
"@confirm_guidelines_reject_join_slack": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_go_back": "Go back",
"@confirm_guidelines_reject_go_back": {
"type": "text",
"placeholders": {}
},
"confirm_guidelines_reject_delete_account": "Delete account",
"@confirm_guidelines_reject_delete_account": {
"type": "text",
"placeholders": {}
},
"guidelines_desc": "Please take a moment to read and accept our guidelines.",
"@guidelines_desc": {
"type": "text",
"placeholders": {}
},
"guidelines_accept": "Accept",
"@guidelines_accept": {
"type": "text",
"placeholders": {}
},
"guidelines_reject": "Reject",
"@guidelines_reject": {
"type": "text",
"placeholders": {}
},
"change_email_title": "Change Email",
"@change_email_title": {
"type": "text",
"placeholders": {}
},
"change_email_email_text": "Email",
"@change_email_email_text": {
"type": "text",
"placeholders": {}
},
"change_email_current_email_text": "Current email",
"@change_email_current_email_text": {
"type": "text",
"placeholders": {}
},
"change_email_hint_text": "Enter your new email",
"@change_email_hint_text": {
"type": "text",
"placeholders": {}
},
"change_email_error": "Email is already registered",
"@change_email_error": {
"type": "text",
"placeholders": {}
},
"change_email_save": "Save",
"@change_email_save": {
"type": "text",
"placeholders": {}
},
"change_email_success_info": "We've sent a confirmation link to your new email address, click it to verify your new email",
"@change_email_success_info": {
"type": "text",
"placeholders": {}
},
"clear_app_preferences_title": "Clear preferences",
"@clear_app_preferences_title": {
"type": "text",
"placeholders": {}
},
"clear_app_preferences_desc": "Clear the application preferences. Currently this is only the preferred order of comments.",
"@clear_app_preferences_desc": {
"type": "text",
"placeholders": {}
},
"clear_app_preferences_cleared_successfully": "Cleared preferences successfully",
"@clear_app_preferences_cleared_successfully": {
"type": "text",
"placeholders": {}
},
"email_verification_successful": "Awesome! Your email is now verified",
"@email_verification_successful": {
"type": "text",
"placeholders": {}
},
"email_verification_error": "Oops! Your token was not valid or expired, please try again",
"@email_verification_error": {
"type": "text",
"placeholders": {}
},
"clear_app_preferences_error": "Could not clear preferences",
"@clear_app_preferences_error": {
"type": "text",
"placeholders": {}
},
"disconnect_from_user_success": "Disconnected successfully",
"@disconnect_from_user_success": {
"type": "text",
"placeholders": {}
},
"block_user": "Block user",
"@block_user": {
"type": "text",
"placeholders": {}
},
"block_description": "You will both dissapear from each other's social network experience, with the exception of communities which the person is a staff member of.",
"@block_description": {
"type": "text",
"placeholders": {}
},
"unblock_description": "You will both be able to follow, connect or explore each other's content again.",
"@unblock_description": {
"type": "text",
"placeholders": {}
},
"unblock_user": "Unblock user",
"@unblock_user": {
"type": "text",
"placeholders": {}
},
"enable_new_post_notifications": "Enable new post notifications",
"@enable_new_post_notifications": {
"type": "text",
"placeholders": {}
},
"disable_new_post_notifications": "Disable new post notifications",
"@disable_new_post_notifications": {
"type": "text",
"placeholders": {}
},
"disconnect_from_user": "Disconnect from {userName}",
"@disconnect_from_user": {
"type": "text",
"placeholders": {
"userName": {}
}
},
"circle_peoples_count": "{prettyUsersCount} people",
"@circle_peoples_count": {
"type": "text",
"placeholders": {
"prettyUsersCount": {}
}
},
"follows_list_accounts_count": "{prettyUsersCount} accounts",
"@follows_list_accounts_count": {
"type": "text",
"placeholders": {
"prettyUsersCount": {}
}
}
} | {
"pile_set_name": "Github"
} |
--- dd/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff.orig 2018-09-12 18:18:51.851536374 -0700
+++ dd/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff 2018-09-12 18:19:01.116475099 -0700
@@ -1190,14 +1190,3 @@
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
-diff --git a/version.h b/version.h
-index f1bbf00..21a70c2 100644
---- a/version.h
-+++ b/version.h
-@@ -3,4 +3,5 @@
- #define SSH_VERSION "OpenSSH_7.8"
-
- #define SSH_PORTABLE "p1"
--#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
-+#define SSH_RELEASE SSH_VERSION SSH_PORTABLE SSH_HPN
-+
| {
"pile_set_name": "Github"
} |
/*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, [email protected].
*
* SPDX-License-Identifier: GPL-2.0+
*/
/*
* linux/lib/ctype.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/ctype.h>
const unsigned char _ctype[] = {
_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */
_C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */
_C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */
_C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */
_S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */
_P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */
_D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */
_D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */
_P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */
_U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */
_U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */
_U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */
_P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */
_L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */
_L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */
_L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */
_S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 160-175 */
_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 176-191 */
_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U, /* 192-207 */
_U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */
_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */
_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */
| {
"pile_set_name": "Github"
} |
# new实例对象的过程
* 创建新对象
```
var person = {};
```
* 将新对象的__proto__指针指向构造函数的原型对象
```
person.__proto__ = Person.prototype;
```
* 将构造函数的作用域复制给新对象(绑定this)
```
Person.call(person);
```
* 执行构造函数内部的代码,将属性添加给新对象
* 返回这个新对象 | {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2015-2018 Alibaba Group Holding Limited
*/
#ifndef __AWSS_APLIST__
#define __AWSS_APLIST__
#include <stdint.h>
#include "os.h"
#include "zconfig_protocol.h"
#if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */
extern "C"
{
#endif
#ifdef AWSS_SUPPORT_APLIST
struct ap_info {
uint8_t auth;
uint8_t channel;
uint8_t encry[2];
uint8_t mac[ETH_ALEN];
char ssid[ZC_MAX_SSID_LEN];
signed char rssi;
};
void aws_try_adjust_chan(void);
int awss_clear_aplist(void);
int awss_is_ready_clr_aplist(void);
int awss_open_aplist_monitor(void);
int awss_close_aplist_monitor(void);
int awss_init_ieee80211_aplist(void);
int awss_deinit_ieee80211_aplist(void);
int awss_get_auth_info(uint8_t *ssid, uint8_t *bssid, uint8_t *auth,
uint8_t *encry, uint8_t *channel);
int awss_ieee80211_aplist_process(uint8_t *mgmt_header, int len, int link_type,
struct parser_res *res, signed char rssi);
int awss_save_apinfo(uint8_t *ssid, uint8_t* bssid, uint8_t channel, uint8_t auth,
uint8_t pairwise_cipher, uint8_t group_cipher, signed char rssi);
/* storage to store apinfo */
extern struct ap_info *zconfig_aplist;
/* aplist num, less than MAX_APLIST_NUM */
extern uint8_t zconfig_aplist_num;
#endif
#if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */
}
#endif
#endif
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>NSMutableDictionary(WeakReferences) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.2 (build 961)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">KoboldKitExternal </a></h1>
<a id="developerHome" href="../index.html">Kobold Tech</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">NSMutableDictionary(WeakReferences) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To…</option>
<option value="tasks">Tasks</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/mutableDictionaryUsingWeakReferences"> + mutableDictionaryUsingWeakReferences</option>
<option value="//api/name/mutableDictionaryUsingWeakReferencesWithCapacity:"> + mutableDictionaryUsingWeakReferencesWithCapacity:</option>
<option value="//api/name/newMutableDictionaryUsingWeakReferences"> + newMutableDictionaryUsingWeakReferences</option>
<option value="//api/name/newMutableDictionaryUsingWeakReferencesWithCapacity:"> + newMutableDictionaryUsingWeakReferencesWithCapacity:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mutableDictionaryUsingWeakReferences">mutableDictionaryUsingWeakReferences</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mutableDictionaryUsingWeakReferencesWithCapacity:">mutableDictionaryUsingWeakReferencesWithCapacity:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/newMutableDictionaryUsingWeakReferences">newMutableDictionaryUsingWeakReferences</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/newMutableDictionaryUsingWeakReferencesWithCapacity:">newMutableDictionaryUsingWeakReferencesWithCapacity:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="NSMutableDictionary(WeakReferences) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">NSMutableDictionary(WeakReferences) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">NSMutableDictionary+WeakReferences.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/mutableDictionaryUsingWeakReferences">+ mutableDictionaryUsingWeakReferences</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/mutableDictionaryUsingWeakReferencesWithCapacity:">+ mutableDictionaryUsingWeakReferencesWithCapacity:</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/newMutableDictionaryUsingWeakReferences">+ newMutableDictionaryUsingWeakReferences</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/newMutableDictionaryUsingWeakReferencesWithCapacity:">+ newMutableDictionaryUsingWeakReferencesWithCapacity:</a></code>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/mutableDictionaryUsingWeakReferences" title="mutableDictionaryUsingWeakReferences"></a>
<h3 class="subsubtitle method-title">mutableDictionaryUsingWeakReferences</h3>
<div class="method-subsection brief-description">
<p>Create an NSMutableDictionary that uses weak references.</p>
</div>
<div class="method-subsection method-declaration"><code>+ (NSMutableDictionary *)mutableDictionaryUsingWeakReferences</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">NSMutableDictionary+WeakReferences.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/mutableDictionaryUsingWeakReferencesWithCapacity:" title="mutableDictionaryUsingWeakReferencesWithCapacity:"></a>
<h3 class="subsubtitle method-title">mutableDictionaryUsingWeakReferencesWithCapacity:</h3>
<div class="method-subsection brief-description">
<p>Create an NSMutableDictionary that uses weak references.</p>
</div>
<div class="method-subsection method-declaration"><code>+ (NSMutableDictionary *)mutableDictionaryUsingWeakReferencesWithCapacity:(NSUInteger)<em>capacity</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>capacity</em></dt>
<dd><p>The initial capacity of the dictionary.</p></dd>
</dl>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">NSMutableDictionary+WeakReferences.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/newMutableDictionaryUsingWeakReferences" title="newMutableDictionaryUsingWeakReferences"></a>
<h3 class="subsubtitle method-title">newMutableDictionaryUsingWeakReferences</h3>
<div class="method-subsection brief-description">
<p>Create an NSMutableDictionary that uses weak references (no pending autorelease).</p>
</div>
<div class="method-subsection method-declaration"><code>+ (NSMutableDictionary *)newMutableDictionaryUsingWeakReferences</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">NSMutableDictionary+WeakReferences.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/newMutableDictionaryUsingWeakReferencesWithCapacity:" title="newMutableDictionaryUsingWeakReferencesWithCapacity:"></a>
<h3 class="subsubtitle method-title">newMutableDictionaryUsingWeakReferencesWithCapacity:</h3>
<div class="method-subsection brief-description">
<p>Create an NSMutableDictionary that uses weak references (no pending autorelease).</p>
</div>
<div class="method-subsection method-declaration"><code>+ (NSMutableDictionary *)newMutableDictionaryUsingWeakReferencesWithCapacity:(NSUInteger)<em>capacity</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>capacity</em></dt>
<dd><p>The initial capacity of the dictionary.</p></dd>
</dl>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">NSMutableDictionary+WeakReferences.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">© 2014 Kobold Tech. All rights reserved. (Last updated: 2014-03-23)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
{
"Turnip Calculator": "大頭菜計數機",
"ACNH Turnip Calculator": "動物森友會大頭菜計數機",
"Buy Price": "買入價",
"Daily Price": "每日價",
"Guaranteed Min": "保證價",
"Average": "平均價",
"Maximum": "最高價",
"Minimum": "最低價",
"Mon Tue Wed Thu Fri Sat": "週一 週二 週三 週四 週五 週六",
"AM": "上晝",
"PM": "下晝",
"Clear All Data!": "刪晒所有資料",
"Usage": "使用方法",
"buyPriceInfo": "- <1>買入價</1>係指自己個島上面嘅價錢,喺其他島買入嘅大頭菜唔會影響到呢個數。",
"priceChangeInfo": "- 價格<1>每日會改兩次,</1>所以要抄低晒佢地。我哋會將啲數據會save喺你呢部機上面。",
"guaranteedMinInfo": "- <1>保證價</1>係指喺呢個禮拜入面,你一定會遇到呢個或者更高嘅價錢。",
"contributors": "感謝到目前為止所有嘅貢獻者!",
"About": "關於",
"about1": "如果冇<2>@_Ninji</2>嘅努力,呢一切都冇可能實現。",
"about2": "我喺<2>mikebryant</2>嘅創作得到咗靈感。",
"about3": "最後好重要嘅一點,感謝我嘅兄弟幫手設計,佢係一名遊戲開發者! 去Twitter關注佢:<2>@Consalv0</2>。",
"about4": "如果你發現到任何BUG,可以喺<2>呢度</2>反映。",
"cancel": "取消",
"clearDataTitle": "你確定要清除全部數據?",
"clearDataWarning": "呢個操作無法撤銷!",
"shareDialog": "分享你嘅價格",
"shareClipboard": "複制鏈接:",
"copyButton": "複製",
"shareButton": "分享",
"closeButton": "關閉",
"shareDialogV2": "分享圖片!",
"Most Likely": "最可能價"
}
| {
"pile_set_name": "Github"
} |
.TH LIKWID-SETFREQUENCIES 1 <DATE> likwid\-<VERSION>
.SH NAME
likwid-setFrequencies \- print and manage the clock frequency of CPU cores
.SH SYNOPSIS
.B likwid-setFrequencies
.RB [\-hvplmp]
.RB [ \-c
.IR <cpu_list> ]
.RB [ \-g
.IR <governor> ]
.RB [ \-f,\-\-\^freq
.IR <frequency> ]
.RB [ \-x,\-\-\^min
.IR <min_freq> ]
.RB [ \-y,\-\-\^max
.IR <max_freq> ]
.RB [ \-t,\-\-\^turbo
.IR <0|1> ]
.RB [ \-\-\^umin
.IR <uncore_min_freq> ]
.RB [ \-\-\^umax
.IR <uncore_max_freq> ]
.RB [ \-\-\^reset]
.RB [ \-\-\^ureset]
.SH DESCRIPTION
.B likwid-setFrequencies
is a command line application to set the clock frequency of CPU cores. Since only priviledged users are allowed to change the frequency of CPU cores, the application works in combination with a daemon
.B likwid-setFreq(1).
The daemon needs the suid permission bit to be set in order to manipulate the sysfs entries. With
.B likwid-setFrequencies
the clock of all cores inside the cpu_list or affinity domain can be set to a specific frequency or governor at once.
.B likwid-setFrequencies
works now with the cpufreq drivers 'acpi-cpufreq' and 'intel_pstate'.
.SH OPTIONS
.TP
.B \-h
prints a help message to standard output, then exits.
.TP
.B \-p
prints the current frequencies for all CPU cores
.TP
.B \-l
prints all configurable frequencies
.TP
.B \-m
prints all configurable governors
.TP
.B \-\^c <cpu_list>
set the affinity domain where to set the frequencies. Common are N (Node), SX (Socket X), CX (Cache Group X) and MX (Memory Group X).
For detailed information about affinity domains see
.B likwid-pin(1)
.TP
.B \-\^g <governor>
set the governor of all CPU cores inside the affinity domain. Current governors are ondemand, performance, turbo. Default is ondemand
.TP
.B \-\^f, \-\-\^freq <frequency>
set a fixed frequency at all CPU cores inside the affinity domain. Implicitly sets 'userspace' governor for the cores when using the acpi-cpufreq driver.
.TP
.B \-\^x, \-\-\^min <min_freq>
set a fixed minimal frequency at all CPU cores inside the affinity domain. Can be used in combination with a dynamic governor.
.TP
.B \-\^y, \-\-\^max <max_freq>
set a fixed maximal frequency at all CPU cores inside the affinity domain. Can be used in combination with a dynamic governor.
.TP
.B \-\^t, \-\-\^turbo <0|1>
deactivates/activates Turbo mode for the specified CPU cores.
.TP
.B \-\-\^umin <uncore_min_freq>
set the minimal frequency for the Uncore. There are no limits available, but
.B likwid-setFrequencies
allows the available minimal CPU frequency as minimal Uncore frequency. Only available for Intel architectures.
.TP
.B \-\-\^umax <uncore_max_freq>
set the maximal frequency for the Uncore. There are no limits available, but
.B likwid-setFrequencies
allows the available maximal CPU frequency (with a single core and Turbo) as maximal Uncore frequency. Only available for Intel architectures.
.TP
.B \-\-\^reset
resets the CPU cores to maximal range, deactivates Turbo mode and sets the
governor to "performance", "conservative" or the last one in the governor list
as fallback
.TP
.B \-\-\^ureset
resets the Uncore to maximal range. It uses the minimally available CPU
frequency as minimal Uncore frequency and the maximally achievable CPU frequency
(single core, Turbo active) as maximal Uncore frequency.
.SH AUTHOR
Written by Thomas Gruber <[email protected]>.
.SH BUGS
Report Bugs on <https://github.com/RRZE-HPC/likwid/issues>.
.SH "SEE ALSO"
likwid-pin(1), likwid-perfctr(1), likwid-powermeter(1)
| {
"pile_set_name": "Github"
} |
module T10182a where
import {-# SOURCE #-} T10182
| {
"pile_set_name": "Github"
} |
<?php
/**
* Created by PhpStorm.
* User: peize
* Date: 2017/12/21
* Time: 14:25
*/
namespace app\modules\mch\controllers\book;
use app\models\User;
use app\models\UserAccountLog;
use app\models\YyGoods;
use app\models\YyOrder;
use app\models\YyWechatTplMsgSender;
use app\modules\mch\models\book\OrderForm;
use app\modules\mch\models\ExportList;
use app\modules\mch\models\order\OrderClerkForm;
use app\modules\mch\models\order\OrderDeleteForm;
use app\utils\Refund;
class OrderController extends Controller
{
/**
* @return string
* 订单列表
*/
public function actionIndex()
{
$form = new OrderForm();
$form->attributes = \Yii::$app->request->get();
$form->attributes = \Yii::$app->request->post();
$form->store_id = $this->store->id;
$arr = $form->getList();
$f = new ExportList();
$f->order_type = 3;
$exportList = $f->getList();
return $this->render('index', [
'list' => $arr['list'],
'pagination' => $arr['p'],
'row_count' => $arr['row_count'],
'exportList' => \Yii::$app->serializer->encode($exportList)
]);
}
public function actionRefund()
{
$order_id = \Yii::$app->request->get('id');
$status = \Yii::$app->request->get('status');
$remark = \Yii::$app->request->get('remark');
$order = YyOrder::find()
->andWhere([
'id' => $order_id,
'is_delete' => 0,
'store_id' => $this->store->id,
'is_pay' => 1,
'is_refund' => 0,
'apply_delete' => 1,
])
->one();
if (!$order) {
return [
'code' => 1,
'msg' => '订单错误1',
];
}
if ($order->pay_price < 0) {
return [
'code' => 1,
'msg' => '订单错误2',
];
}
/** @var Wechat $wechat */
$wechat = isset(\Yii::$app->controller->wechat) ? \Yii::$app->controller->wechat : null;
if ($status == 2) {
$order->refund_time = time();
$order->is_refund = 2;
if ($order->save()) {
$msg_sender = new YyWechatTplMsgSender($this->store->id, $order->id, $wechat);
$remark = $remark ? $remark : '商家拒绝了您的取消退款';
$refund_reason = '用户申请取消';
$msg_sender->refundMsg($order->pay_price, $refund_reason, $remark);
return [
'code' => 0,
'msg' => '拒绝退款成功',
];
} else {
return [
'code' => 1,
'msg' => '拒绝退款失败',
];
}
}
if ($order->pay_type == 1) {
$res = Refund::refund($order, $order->order_no, $order->pay_price);
if ($res !== true) {
return $res;
}
}
$t = \Yii::$app->db->beginTransaction();
if ($order->pay_type == 2) {
$user = User::findOne(['id' => $order->user_id, 'store_id' => $this->store->id]);
//余额支付 退换余额
$user->money += floatval($order->pay_price);
$log = new UserAccountLog();
$log->user_id = $user->id;
$log->type = 1;
$log->price = $order->pay_price;
$log->desc = "预约订单退款,订单号({$order->order_no})";
$log->addtime = time();
$log->order_id = $order->id;
$log->order_type = 11;
$log->save();
if (!$user->save()) {
$t->rollBack();
return [
'code' => 1,
'msg' => $this->getErrorResponse($user),
];
}
}
$order->refund_time = time();
$order->is_refund = 1;
if ($order->save()) {
$t->commit();
$msg_sender = new YyWechatTplMsgSender($this->store->id, $order->id, $wechat);
if ($order->is_pay) {
$remark = $remark ? $remark : '商家同意了您的退款请求';
$refund_reason = '用户申请取消';
$msg_sender->refundMsg($order->pay_price, $refund_reason, $remark);
}
//库存恢复
$goods = YyGoods::findOne($order->goods_id);
$attr_id_list = [];
foreach (json_decode($order->attr) as $item) {
array_push($attr_id_list, $item->attr_id);
}
if (!$goods->use_attr) {
$goods->stock++;
}
$goods->numAdd($attr_id_list, 1);
return [
'code' => 0,
'msg' => '订单已退款',
];
} else {
$t->rollBack();
return [
'code' => 1,
'msg' => '订单退款失败',
];
}
}
// 删除订单(软删除)
public function actionDelete($order_id = null)
{
$orderDeleteForm = new OrderDeleteForm();
$orderDeleteForm->order_model = 'app\models\YyOrder';
$orderDeleteForm->order_id = $order_id;
$orderDeleteForm->store = $this->store;
return $orderDeleteForm->delete();
}
// 清空回收站
public function actionDeleteAll()
{
$orderDeleteForm = new OrderDeleteForm();
$orderDeleteForm->order_model = 'app\models\YyOrder';
$orderDeleteForm->store = $this->store;
return $orderDeleteForm->deleteAll();
}
// 移入移出回收站
public function actionRecycle($order_id = null, $is_recycle = 0)
{
$orderDeleteForm = new OrderDeleteForm();
$orderDeleteForm->order_model = 'app\models\YyOrder';
$orderDeleteForm->order_id = $order_id;
$orderDeleteForm->is_recycle = $is_recycle;
$orderDeleteForm->store = $this->store;
return $orderDeleteForm->recycle();
}
// 核销订单
public function actionClerk()
{
$form = new OrderClerkForm();
$form->attributes = \Yii::$app->request->get();
$form->order_model = 'app\models\YyOrder';
$form->order_type = 3;
$form->store = $this->store;
return $form->clerk();
}
//订单详情
public function actionDetail($order_id = null)
{
$order = YyOrder::find()->where(['is_delete' => 0, 'store_id' => $this->store->id, 'id' => $order_id])->asArray()->one();
if (!$order) {
$url = \Yii::$app->urlManager->createUrl(['mch/book/order/index']);
$this->redirect($url)->send();
}
$form = new OrderForm();
$goods_list = $form->getOrderGoodsList($order['goods_id'], $order['id']);
$user = User::find()->where(['id' => $order['user_id'], 'store_id' => $this->store->id])->asArray()->one();
return $this->render('detail', [
'order' => $order,
'goods_list' => $goods_list,
'user' => $user,
]);
}
//添加备注
public function actionSellerComments()
{
$order_id = \Yii::$app->request->get('order_id');
$seller_comments = \Yii::$app->request->get('seller_comments');
$form = YyOrder::find()->where(['store_id' => $this->store->id, 'id' => $order_id])->one();
$form->seller_comments = $seller_comments;
if ($form->save()) {
return [
'code' => 0,
'msg' => '操作成功',
];
} else {
return [
'code' => 1,
'msg' => '操作失败',
];
}
}
}
| {
"pile_set_name": "Github"
} |
StartChar: uni1FB8
Encoding: 970 8120 2004
Width: 1000
VWidth: 0
Flags: MW
LayerCount: 2
MultipleSubs2: "CCMP_Precomp subtable" Alpha uni0306.cap
EndChar
| {
"pile_set_name": "Github"
} |
apiVersion: v1
kind: Service
metadata:
name: weave
namespace: kube-system
annotations:
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
clusterIP: None
selector:
name: weave-net
ports:
- name: weave
protocol: TCP
port: 80
targetPort: 6782
---
apiVersion: v1
kind: Service
metadata:
name: weave-npc
namespace: kube-system
annotations:
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
clusterIP: None
selector:
name: weave-net
ports:
- name: weave-npc
protocol: TCP
port: 80
targetPort: 6781
| {
"pile_set_name": "Github"
} |
package org.mp4parser.boxes.iso14496.part12;
import org.mp4parser.support.AbstractFullBox;
import org.mp4parser.tools.CastUtils;
import org.mp4parser.tools.IsoTypeReader;
import org.mp4parser.tools.IsoTypeWriter;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
/**
* <h1>4cc = "{@value #TYPE}"</h1>
* <pre>
* aligned(8) class SubSampleInformationBox extends FullBox('subs', version, 0) {
* unsigned int(32) entry_count;
* int i,j;
* for (i=0; i < entry_count; i++) {
* unsigned int(32) sample_delta;
* unsigned int(16) subsample_count;
* if (subsample_count > 0) {
* for (j=0; j < subsample_count; j++) {
* if(version == 1)
* {
* unsigned int(32) subsample_size;
* }
* else
* {
* unsigned int(16) subsample_size;
* }
* unsigned int(8) subsample_priority;
* unsigned int(8) discardable;
* unsigned int(32) reserved = 0;
* }
* }
* }
* }
* </pre>
*/
public class SubSampleInformationBox extends AbstractFullBox {
public static final String TYPE = "subs";
private List<SubSampleEntry> entries = new ArrayList<SubSampleEntry>();
public SubSampleInformationBox() {
super(TYPE);
}
public List<SubSampleEntry> getEntries() {
return entries;
}
public void setEntries(List<SubSampleEntry> entries) {
this.entries = entries;
}
@Override
protected long getContentSize() {
long size = 8;
for (SubSampleEntry entry : entries) {
size += 4;
size += 2;
for (int j = 0; j < entry.getSubsampleEntries().size(); j++) {
if (getVersion() == 1) {
size += 4;
} else {
size += 2;
}
size += 2;
size += 4;
}
}
return size;
}
@Override
public void _parseDetails(ByteBuffer content) {
parseVersionAndFlags(content);
long entryCount = IsoTypeReader.readUInt32(content);
for (int i = 0; i < entryCount; i++) {
SubSampleEntry SubSampleEntry = new SubSampleEntry();
SubSampleEntry.setSampleDelta(IsoTypeReader.readUInt32(content));
int subsampleCount = IsoTypeReader.readUInt16(content);
for (int j = 0; j < subsampleCount; j++) {
SubSampleEntry.SubsampleEntry subsampleEntry = new SubSampleEntry.SubsampleEntry();
subsampleEntry.setSubsampleSize(getVersion() == 1 ? IsoTypeReader.readUInt32(content) : IsoTypeReader.readUInt16(content));
subsampleEntry.setSubsamplePriority(IsoTypeReader.readUInt8(content));
subsampleEntry.setDiscardable(IsoTypeReader.readUInt8(content));
subsampleEntry.setReserved(IsoTypeReader.readUInt32(content));
SubSampleEntry.getSubsampleEntries().add(subsampleEntry);
}
entries.add(SubSampleEntry);
}
}
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, entries.size());
for (SubSampleEntry subSampleEntry : entries) {
IsoTypeWriter.writeUInt32(byteBuffer, subSampleEntry.getSampleDelta());
IsoTypeWriter.writeUInt16(byteBuffer, subSampleEntry.getSubsampleCount());
List<SubSampleEntry.SubsampleEntry> subsampleEntries = subSampleEntry.getSubsampleEntries();
for (SubSampleEntry.SubsampleEntry subsampleEntry : subsampleEntries) {
if (getVersion() == 1) {
IsoTypeWriter.writeUInt32(byteBuffer, subsampleEntry.getSubsampleSize());
} else {
IsoTypeWriter.writeUInt16(byteBuffer, CastUtils.l2i(subsampleEntry.getSubsampleSize()));
}
IsoTypeWriter.writeUInt8(byteBuffer, subsampleEntry.getSubsamplePriority());
IsoTypeWriter.writeUInt8(byteBuffer, subsampleEntry.getDiscardable());
IsoTypeWriter.writeUInt32(byteBuffer, subsampleEntry.getReserved());
}
}
}
@Override
public String toString() {
return "SubSampleInformationBox{" +
"entryCount=" + entries.size() +
", entries=" + entries +
'}';
}
public static class SubSampleEntry {
private long sampleDelta;
private List<SubsampleEntry> subsampleEntries = new ArrayList<SubsampleEntry>();
public long getSampleDelta() {
return sampleDelta;
}
public void setSampleDelta(long sampleDelta) {
this.sampleDelta = sampleDelta;
}
public int getSubsampleCount() {
return subsampleEntries.size();
}
public List<SubsampleEntry> getSubsampleEntries() {
return subsampleEntries;
}
@Override
public String toString() {
return "SampleEntry{" +
"sampleDelta=" + sampleDelta +
", subsampleCount=" + subsampleEntries.size() +
", subsampleEntries=" + subsampleEntries +
'}';
}
public static class SubsampleEntry {
private long subsampleSize;
private int subsamplePriority;
private int discardable;
private long reserved;
public long getSubsampleSize() {
return subsampleSize;
}
public void setSubsampleSize(long subsampleSize) {
this.subsampleSize = subsampleSize;
}
public int getSubsamplePriority() {
return subsamplePriority;
}
public void setSubsamplePriority(int subsamplePriority) {
this.subsamplePriority = subsamplePriority;
}
public int getDiscardable() {
return discardable;
}
public void setDiscardable(int discardable) {
this.discardable = discardable;
}
public long getReserved() {
return reserved;
}
public void setReserved(long reserved) {
this.reserved = reserved;
}
@Override
public String toString() {
return "SubsampleEntry{" +
"subsampleSize=" + subsampleSize +
", subsamplePriority=" + subsamplePriority +
", discardable=" + discardable +
", reserved=" + reserved +
'}';
}
}
}
}
| {
"pile_set_name": "Github"
} |
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was CppUTestConfig.cmake.install.in ########
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
####################################################################################
set_and_check(CppUTest_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include")
include("${CMAKE_CURRENT_LIST_DIR}/CppUTestTargets.cmake")
set(CppUTest_LIBRARIES CppUTest CppUTestExt)
include("${CMAKE_CURRENT_LIST_DIR}/Modules/CppUTestBuildTimeDiscoverTests.cmake")
check_required_components(CppUTest)
| {
"pile_set_name": "Github"
} |
del html\*.* /Q
doxygen nrfx.doxyfile
| {
"pile_set_name": "Github"
} |
2014-03-10 Mike Frysinger <[email protected]>
* remote-sim.h (sim_do_command): Add const to cmd.
2014-03-05 Alan Modra <[email protected]>
Update copyright notice.
2014-03-05 Mike Frysinger <[email protected]>
* remote-sim.h (sim_load): Add const to prog.
2014-02-09 Doug Evans <[email protected]>
* section-scripts.h: New file.
2013-03-15 Steve Ellcey <[email protected]>
* gdb/remote-sim.h (sim_command_completer): Make char arguments const.
2013-01-01 Joel Brobecker <[email protected]>
Update year range in copyright notice of all files.
2012-06-23 Doug Evans <[email protected]>
* gdb-index.h: New file.
2012-05-24 Pedro Alves <[email protected]>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2012-05-24 Pedro Alves <[email protected]>
PR gdb/7205
Replace target_signal with gdb_signal throughout.
2012-04-12 Mike Frysinger <[email protected]>
* callback.h (CB_SYS_argc, CB_SYS_argnlen, CB_SYS_argn): Define.
2012-02-03 Kevin Buettner <[email protected]>
* sim-rl78.h: New file.
2011-12-03 Mike Frysinger <[email protected]>
* callback.h (cb_get_string): New prototype.
2011-04-14 Mike Frysinger <[email protected]>
* remote-sim.h (sim_complete_command): New prototype.
2011-03-05 Mike Frysinger <[email protected]>
* sim-bfin.h: New file.
2011-01-11 Andrew Burgess <[email protected]>
* remote-sim.h (sim_store_register): Update the API
documentation for this function.
2010-09-06 Pedro Alves <[email protected]>
* signals.def: Replace all ANY uses by SET with specific numbers.
* signals.h (ANY): Remove.
2010-07-31 Jan Kratochvil <[email protected]>
* signals.h (enum target_signal): Move the content to signals.def.
Include it.
* signals.def: New file.
2010-06-24 Kevin Buettner <[email protected]>
* sim-rx.h (sim_rx_regnum): Add sim_rx_acc_regnum. Adjust
register order.
2010-04-13 Mike Frysinger <[email protected]>
* callback.h: Strip PARAMS from prototypes.
* remote-sim.h: Likewise.
2010-04-13 Mike Frysinger <[email protected]>
* remote-sim.h (sim_write): Add const to buf arg.
2009-11-24 DJ Delorie <[email protected]>
* sim-rx.h: New.
2009-05-18 Jon Beniston <[email protected]>
* sim-lm32.h: New file.
2009-01-07 Hans-Peter Nilsson <[email protected]>
* callback.h (struct host_callback_struct): Mark member error as
pointing to a noreturn function.
2008-02-12 M Ranga Swami Reddy <[email protected]>
* sim-cr16.h: New file.
2008-01-01 Daniel Jacobowitz <[email protected]>
Updated copyright notices for most files.
2007-10-15 Daniel Jacobowitz <[email protected]>
* sim-ppc.h (sim_spr_register_name): New prototype.
2007-10-11 Jesper Nilsson <[email protected]>
* callback.h (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add prototypes.
2007-08-23 Joel Brobecker <[email protected]>
Switch the license of all .h files to GPLv3.
2007-01-09 Daniel Jacobowitz <[email protected]>
Updated copyright notices for most files.
2005-07-08 Ben Elliston <[email protected]>
* callback.h: Remove ANSI_PROTOTYPES conditional code.
2005-01-28 Hans-Peter Nilsson <[email protected]>
* callback.h (struct host_callback_struct): New members pipe,
pipe_empty, pipe_nonempty, ispipe, pipe_buffer and
target_sizeof_int.
(CB_SYS_pipe): New macro.
* callback.h: Include "bfd.h".
(struct host_callback_struct): New member target_endian.
(cb_store_target_endian): Declare.
2004-12-15 Hans-Peter Nilsson <[email protected]>
* callback.h (CB_SYS_truncate, CB_SYS_ftruncate): New macros.
2004-12-13 Hans-Peter Nilsson <[email protected]>
* callback.h (struct host_callback_struct): New member lstat.
(CB_SYS_lstat): New macro.
(CB_SYS_rename): New macro.
2004-09-08 Michael Snyder <[email protected]>
Commited by Corinna Vinschen <[email protected]>
* sim-sh.h: Add new sh2a banked registers.
2004-08-04 Andrew Cagney <[email protected]>
* sim-ppc.h: Add extern "C" wrapper.
(enum sim_ppc_regnum): Add full list of SPRs.
2004-08-04 Jim Blandy <[email protected]>
* sim-ppc.h: New file.
2004-06-25 J"orn Rennecke <[email protected]>
* callback.h (host_callback_struct): Replace members fdopen and
alwaysopen with fd_buddy.
[sim/common: * callback.c: Changed all users. ]
2003-10-31 Kevin Buettner <[email protected]>
* sim-frv.h: New file.
2003-10-15 J"orn Rennecke <[email protected]>
* callback.h (struct host_callback_struct): New members ftruncate
and truncate.
2003-06-10 Corinna Vinschen <[email protected]>
* gdb/fileio.h: New file.
2003-05-07 Andrew Cagney <[email protected]>
* sim-d10v.h (sim_d10v_translate_addr): Add regcache parameter.
(sim_d10v_translate_imap_addr): Add regcache parameter.
(sim_d10v_translate_dmap_addr): Ditto.
2003-03-27 Nick Clifton <[email protected]>
* sim-arm.h (sim_arm_regs): Add iWMMXt registers.
2003-03-20 Nick Clifton <[email protected]>
* sim-arm.h (sim_arm_regs): Add Maverick co-processor
registers.
2003-02-27 Andrew Cagney <[email protected]>
* remote-sim.h (sim_open, sim_load, sim_create_inferior): Rename
_bfd to bfd.
2003-02-20 Andrew Cagney <[email protected]>
* remote-sim.h (SIM_RC): Delete unused SIM_RC_UNKNOWN_BREAKPOINT,
SIM_RC_INSUFFICIENT_RESOURCES and SIM_RC_DUPLICATE_BREAKPOINT.
(sim_set_breakpoint, sim_clear_breakpoint): Delete declarations.
(sim_clear_all_breakpoints, sim_enable_breakpoint): Ditto.
(sim_enable_all_breakpoints, sim_disable_breakpoint): Ditto.
(sim_disable_all_breakpoints): Ditto.
2002-12-26 Kazu Hirata <[email protected]>
* sim-h8300.h: Remove ^M.
2002-07-29 Andrey Volkov <[email protected]>
* sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
prefix.
2002-07-23 Andrey Volkov <[email protected]>
* sim-h8300.h: New file.
2002-07-17 Andrew Cagney <[email protected]>
* remote-sim.h: Update copyright.
(sim_set_callbacks, sim_size, sim_trace)
(sim_set_trace, sim_set_profile_size, sim_kill): Delete. Moved to
"sim/common/run-sim.h".
Wed Jul 17 19:36:38 2002 J"orn Rennecke <[email protected]>
* sim-sh.h: Add enum constants for sh[1-4], sh3e, sh3?-dsp,
renumbering the sh-dsp registers to use distinct numbers.
2002-06-15 Andrew Cagney <[email protected]>
* sim-arm.h (enum sim_arm_regs): Rename sim_arm_regnum.
2002-06-12 Andrew Cagney <[email protected]>
* sim-arm.h: New file.
2002-06-08 Andrew Cagney <[email protected]>
* callback.h: Copy to here from directory above.
* remote-sim.h: Copy to here from directory above.
2002-06-01 Andrew Cagney <[email protected]>
* sim-d10v.h (sim_d10v_regs): Expand to include all registers.
Update copyright.
2002-05-23 Andrew Cagney <[email protected]>
* sim-d10v.h: New file. Moved from include/sim-d10v.h.
2002-05-10 Elena Zannoni <[email protected]>
* sim-sh.h: New file, for sh gdb<->sim interface.
2002-05-09 Daniel Jacobowitz <[email protected]>
* signals.h: Update comments.
(enum target_signal): Remove conditional compilation around
Mach-specific signals. Move them to after TARGET_SIGNAL_DEFAULT.
2002-03-10 Daniel Jacobowitz <[email protected]>
* signals.h: New file, from gdb/defs.h.
Copyright (C) 2002-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Local Variables:
mode: change-log
left-margin: 8
fill-column: 74
version-control: never
End:
| {
"pile_set_name": "Github"
} |
{
"name": "LiquidCarbon",
"black": "#000000",
"red": "#ff3030",
"green": "#559a70",
"yellow": "#ccac00",
"blue": "#0099cc",
"purple": "#cc69c8",
"cyan": "#7ac4cc",
"white": "#bccccc",
"brightBlack": "#000000",
"brightRed": "#ff3030",
"brightGreen": "#559a70",
"brightYellow": "#ccac00",
"brightBlue": "#0099cc",
"brightPurple": "#cc69c8",
"brightCyan": "#7ac4cc",
"brightWhite": "#bccccc",
"background": "#303030",
"foreground": "#afc2c2"
}
| {
"pile_set_name": "Github"
} |
#
# Copyright 2016 Red Hat, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# 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.
#
log4j.rootLogger=info, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %t [%c] %m%n
# For debug, run KeycloakServer with -Dkeycloak.logging.level=debug
keycloak.logging.level=info
log4j.logger.org.keycloak=${keycloak.logging.level}
# Enable to view events
# log4j.logger.org.keycloak.events=debug
# Enable to view loaded SPI and Providers
# log4j.logger.org.keycloak.services.DefaultKeycloakSessionFactory=debug
# log4j.logger.org.keycloak.provider.ProviderManager=debug
# log4j.logger.org.keycloak.provider.FileSystemProviderLoaderFactory=debug
#log4j.logger.org.infinispan.transaction.impl.TransactionCoordinator=OFF
#log4j.logger.org.infinispan.transaction.tm.DummyTransaction=OFF
#log4j.logger.org.infinispan.container.entries.RepeatableReadEntry=OFF
# Broker logging
keycloak.testsuite.logging.level=info
log4j.logger.org.keycloak.testsuite=${keycloak.testsuite.logging.level}
# Liquibase updates logged with "info" by default. Logging level can be changed by system property "keycloak.liquibase.logging.level"
keycloak.liquibase.logging.level=info
log4j.logger.org.keycloak.connections.jpa.updater.liquibase=${keycloak.liquibase.logging.level}
# Enable to view infinispan initialization
# log4j.logger.org.keycloak.models.sessions.infinispan.initializer=trace
# Enable to view cache activity
#log4j.logger.org.keycloak.cluster.infinispan=trace
#log4j.logger.org.keycloak.models.cache.infinispan=debug
# Enable to view database updates
log4j.logger.org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory=${keycloak.liquibase.logging.level}
# log4j.logger.org.keycloak.migration.MigrationModelManager=debug
# Enable to view hibernate statistics
log4j.logger.org.keycloak.connections.jpa.HibernateStatsReporter=debug
keycloak.infinispan.logging.level=info
log4j.logger.org.keycloak.cluster.infinispan=${keycloak.infinispan.logging.level}
log4j.logger.org.keycloak.connections.infinispan=${keycloak.infinispan.logging.level}
log4j.logger.org.keycloak.keys.infinispan=${keycloak.infinispan.logging.level}
log4j.logger.org.keycloak.models.cache.infinispan=${keycloak.infinispan.logging.level}
log4j.logger.org.keycloak.models.sessions.infinispan=${keycloak.infinispan.logging.level}
# Enable to view ldap logging
# log4j.logger.org.keycloak.storage.ldap=trace
# Enable to view queries to LDAP
# log4j.logger.org.keycloak.storage.ldap.idm.store.ldap.LDAPIdentityStore=trace
# Enable to view details about LDAP performance operations
# log4j.logger.org.keycloak.storage.ldap.idm.store.ldap.LDAPOperationManager.perf=trace
# Enable to view kerberos/spnego logging
# log4j.logger.org.keycloak.federation.kerberos=trace
# Enable to view detailed AS REQ and TGS REQ requests to embedded Kerberos server
# log4j.logger.org.apache.directory.server.kerberos=debug
#log4j.logger.org.keycloak.saml=debug
log4j.logger.org.xnio=off
log4j.logger.org.hibernate=off
log4j.logger.org.jboss.resteasy=warn
log4j.logger.org.apache.directory.api=warn
log4j.logger.org.apache.directory.server.core=warn
log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=error
# Enable to view HttpClient connection pool activity
#log4j.logger.org.apache.http.impl.conn=debug
# Enable to view details from identity provider authenticator
#log4j.logger.org.keycloak.authentication.authenticators.browser.IdentityProviderAuthenticator=trace
#log4j.logger.org.keycloak.services.resources.IdentityBrokerService=trace
#log4j.logger.org.keycloak.broker=trace
#log4j.logger.org.keycloak.cluster.infinispan.InfinispanNotificationsManager=trace
#log4j.logger.io.undertow=trace
#log4j.logger.org.keycloak.protocol=debug
#log4j.logger.org.keycloak.services.resources.LoginActionsService=debug
#log4j.logger.org.keycloak.services.managers=debug
#log4j.logger.org.keycloak.services.resources.SessionCodeChecks=debug
#log4j.logger.org.keycloak.authentication=debug
# Enable to view WebAuthn debug logging
#log4j.logger.org.keycloak.credential.WebAuthnCredentialProvider=debug
#log4j.logger.org.keycloak.authentication.requiredactions.WebAuthnRegister=debug
#log4j.logger.org.keycloak.authentication.authenticators.browser.WebAuthnAuthenticator=debug
| {
"pile_set_name": "Github"
} |
function [frq,cr] = cent2frq(c)
%FRQ2ERB Convert Hertz to Cents frequency scale [C,CR]=(FRQ)
% frq = frq2mel(c) converts a vector of frequencies in cents
% to the corresponding values in Hertz.
% 100 cents corresponds to one semitone and 440Hz corresponds to 5700
% cents.
% The optional cr output gives the gradient in Hz/cent.
%
% The relationship between cents and frq is given by:
%
% c = 1200 * log2(f/(440*(2^((3/12)-5)))
%
% Reference:
%
% [1] Ellis, A.
% On the Musical Scales of Various Nations
% Journal of the Society of Arts, 1885, 485-527
% Copyright (C) Mike Brookes 1998
% Version: $Id: cent2frq.m 3123 2013-06-19 19:03:53Z dmb $
%
% VOICEBOX is a MATLAB toolbox for speech processing.
% Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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 can obtain a copy of the GNU General Public License from
% http://www.gnu.org/copyleft/gpl.html or by writing to
% Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
persistent p q
if isempty(p)
p=1200/log(2);
q=5700-p*log(440);
end
% c = 1200*sign(frq).*log2(frq/(440*2^((3/12)-5)));
af=(exp((abs(c)-q)/p));
frq=sign(c).*af;
cr=af/p;
if ~nargout
plot(c,frq,'-x');
ylabel(['Frequency (' yticksi 'Hz)']);
xlabel(['Frequency (' xticksi 'Cents)']);
end
| {
"pile_set_name": "Github"
} |
/** @file
Intel FSP API definition from Intel Firmware Support Package External
Architecture Specification, April 2014, revision 001.
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _FSP_API_H_
#define _FSP_API_H_
#define FSP_STATUS EFI_STATUS
#define FSPAPI EFIAPI
/**
FSP Init continuation function prototype.
Control will be returned to this callback function after FspInit API call.
@param[in] Status Status of the FSP INIT API.
@param[in] HobBufferPtr Pointer to the HOB data structure defined in the PI specification.
**/
typedef
VOID
(* CONTINUATION_PROC) (
IN EFI_STATUS Status,
IN VOID *HobListPtr
);
#pragma pack(1)
typedef struct {
///
/// Base address of the microcode region.
///
UINT32 MicrocodeRegionBase;
///
/// Length of the microcode region.
///
UINT32 MicrocodeRegionLength;
///
/// Base address of the cacheable flash region.
///
UINT32 CodeRegionBase;
///
/// Length of the cacheable flash region.
///
UINT32 CodeRegionLength;
} FSP_TEMP_RAM_INIT_PARAMS;
typedef struct {
///
/// Non-volatile storage buffer pointer.
///
VOID *NvsBufferPtr;
///
/// Runtime buffer pointer
///
VOID *RtBufferPtr;
///
/// Continuation function address
///
CONTINUATION_PROC ContinuationFunc;
} FSP_INIT_PARAMS;
typedef struct {
///
/// Stack top pointer used by the bootloader.
/// The new stack frame will be set up at this location after FspInit API call.
///
UINT32 *StackTop;
///
/// Current system boot mode.
///
UINT32 BootMode;
///
/// User platform configuraiton data region pointer.
///
VOID *UpdDataRgnPtr;
///
/// The size of memory to be reserved below the top of low usable memory (TOLUM)
/// for BootLoader usage. This is optional and value can be zero. If non-zero, the
/// size must be a multiple of 4KB. FSP EAS v1.1
///
UINT32 BootLoaderTolumSize;
///
/// Reserved
///
UINT32 Reserved[6];
} FSP_INIT_RT_COMMON_BUFFER;
typedef enum {
///
/// Notification code for post PCI enuermation
///
EnumInitPhaseAfterPciEnumeration = 0x20,
///
/// Notification code before transfering control to the payload
///
EnumInitPhaseReadyToBoot = 0x40
} FSP_INIT_PHASE;
typedef struct {
///
/// Notification phase used for NotifyPhase API
///
FSP_INIT_PHASE Phase;
} NOTIFY_PHASE_PARAMS;
typedef struct {
///
/// Non-volatile storage buffer pointer.
///
VOID *NvsBufferPtr;
///
/// Runtime buffer pointer
///
VOID *RtBufferPtr;
///
/// Pointer to the HOB data structure defined in the PI specification
///
VOID **HobListPtr;
} FSP_MEMORY_INIT_PARAMS;
#pragma pack()
/**
This FSP API is called soon after coming out of reset and before memory and stack is
available. This FSP API will load the microcode update, enable code caching for the
region specified by the boot loader and also setup a temporary stack to be used until
main memory is initialized.
A hardcoded stack can be set up with the following values, and the "esp" register
initialized to point to this hardcoded stack.
1. The return address where the FSP will return control after setting up a temporary
stack.
2. A pointer to the input parameter structure
However, since the stack is in ROM and not writeable, this FSP API cannot be called
using the "call" instruction, but needs to be jumped to.
@param[in] TempRaminitParamPtr Address pointer to the FSP_TEMP_RAM_INIT_PARAMS structure.
@retval EFI_SUCCESS Temp RAM was initialized successfully.
@retval EFI_INVALID_PARAMETER Input parameters are invalid..
@retval EFI_NOT_FOUND No valid microcode was found in the microcode region.
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
@retval EFI_DEVICE_ERROR Temp RAM initialization failed.
If this function is successful, the FSP initializes the ECX and EDX registers to point to
a temporary but writeable memory range available to the boot loader and returns with
FSP_SUCCESS in register EAX. Register ECX points to the start of this temporary
memory range and EDX points to the end of the range. Boot loader is free to use the
whole range described. Typically the boot loader can reload the ESP register to point
to the end of this returned range so that it can be used as a standard stack.
**/
typedef
EFI_STATUS
(EFIAPI *FSP_TEMP_RAM_INIT) (
IN FSP_TEMP_RAM_INIT_PARAMS *FspTempRamInitPtr
);
/**
This FSP API is called after TempRamInitEntry. This FSP API initializes the memory,
the CPU and the chipset to enable normal operation of these devices. This FSP API
accepts a pointer to a data structure that will be platform dependent and defined for
each FSP binary. This will be documented in the Integration Guide for each FSP
release.
The boot loader provides a continuation function as a parameter when calling FspInit.
After FspInit completes its execution, it does not return to the boot loader from where
it was called but instead returns control to the boot loader by calling the continuation
function which is passed to FspInit as an argument.
@param[in] FspInitParamPtr Address pointer to the FSP_INIT_PARAMS structure.
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
@retval EFI_DEVICE_ERROR FSP initialization failed.
**/
typedef
EFI_STATUS
(EFIAPI *FSP_INIT) (
IN OUT FSP_INIT_PARAMS *FspInitParamPtr
);
#define FSP_FSP_INIT FSP_INIT
/**
This FSP API is used to notify the FSP about the different phases in the boot process.
This allows the FSP to take appropriate actions as needed during different initialization
phases. The phases will be platform dependent and will be documented with the FSP
release. The current FSP supports two notify phases:
Post PCI enumeration
Ready To Boot
@param[in] NotifyPhaseParamPtr Address pointer to the NOTIFY_PHASE_PRAMS
@retval EFI_SUCCESS The notification was handled successfully.
@retval EFI_UNSUPPORTED The notification was not called in the proper order.
@retval EFI_INVALID_PARAMETER The notification code is invalid.
**/
typedef
EFI_STATUS
(EFIAPI *FSP_NOTIFY_PHASE) (
IN NOTIFY_PHASE_PARAMS *NotifyPhaseParamPtr
);
/**
This FSP API is called after TempRamInit and initializes the memory.
This FSP API accepts a pointer to a data structure that will be platform dependent
and defined for each FSP binary. This will be documented in Integration guide with
each FSP release.
After FspMemInit completes its execution, it passes the pointer to the HobList and
returns to the boot loader from where it was called. Bootloader is responsible to
migrate it's stack and data to Memory.
FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to
complete the silicon initialization and provides bootloader an opportunity to get
control after system memory is available and before the temporary RAM is torn down.
These APIs are mutually exclusive to the FspInit API.
@param[in][out] FspMemoryInitParamPtr Address pointer to the FSP_MEMORY_INIT_PARAMS
structure.
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
@retval EFI_DEVICE_ERROR FSP initialization failed.
**/
typedef
EFI_STATUS
(EFIAPI *FSP_MEMORY_INIT) (
IN OUT FSP_MEMORY_INIT_PARAMS *FspMemoryInitParamPtr
);
/**
This FSP API is called after FspMemoryInit API. This FSP API tears down the temporary
memory setup by TempRamInit API. This FSP API accepts a pointer to a data structure
that will be platform dependent and defined for each FSP binary. This will be
documented in Integration Guide.
FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to
complete the silicon initialization and provides bootloader an opportunity to get
control after system memory is available and before the temporary RAM is torn down.
These APIs are mutually exclusive to the FspInit API.
@param[in][out] TempRamExitParamPtr Pointer to the Temp Ram Exit parameters structure.
This structure is normally defined in the Integration Guide.
And if it is not defined in the Integration Guide, pass NULL.
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
@retval EFI_DEVICE_ERROR FSP initialization failed.
**/
typedef
EFI_STATUS
(EFIAPI *FSP_TEMP_RAM_EXIT) (
IN OUT VOID *TempRamExitParamPtr
);
/**
This FSP API is called after TempRamExit API.
FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the
silicon initialization.
These APIs are mutually exclusive to the FspInit API.
@param[in][out] FspSiliconInitParamPtr Pointer to the Silicon Init parameters structure.
This structure is normally defined in the Integration Guide.
And if it is not defined in the Integration Guide, pass NULL.
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
@retval EFI_DEVICE_ERROR FSP initialization failed.
**/
typedef
EFI_STATUS
(EFIAPI *FSP_SILICON_INIT) (
IN OUT VOID *FspSiliconInitParamPtr
);
///
/// FSP API Return Status Code for backward compatibility with v1.0
///@{
#define FSP_SUCCESS EFI_SUCCESS
#define FSP_INVALID_PARAMETER EFI_INVALID_PARAMETER
#define FSP_UNSUPPORTED EFI_UNSUPPORTED
#define FSP_NOT_READY EFI_NOT_READY
#define FSP_DEVICE_ERROR EFI_DEVICE_ERROR
#define FSP_OUT_OF_RESOURCES EFI_OUT_OF_RESOURCES
#define FSP_VOLUME_CORRUPTED EFI_VOLUME_CORRUPTED
#define FSP_NOT_FOUND EFI_NOT_FOUND
#define FSP_TIMEOUT EFI_TIMEOUT
#define FSP_ABORTED EFI_ABORTED
#define FSP_INCOMPATIBLE_VERSION EFI_INCOMPATIBLE_VERSION
#define FSP_SECURITY_VIOLATION EFI_SECURITY_VIOLATION
#define FSP_CRC_ERROR EFI_CRC_ERROR
///@}
#endif
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <ProtocolBuffer/PBCodable.h>
#import <Network/NSCopying-Protocol.h>
@class NSString;
@interface NWPBServiceBrowse : PBCodable <NSCopying>
{
NSString *_domain;
NSString *_type;
}
- (void).cxx_destruct;
@property(retain, nonatomic) NSString *domain; // @synthesize domain=_domain;
@property(retain, nonatomic) NSString *type; // @synthesize type=_type;
- (void)mergeFrom:(id)arg1;
- (unsigned long long)hash;
- (BOOL)isEqual:(id)arg1;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (void)copyTo:(id)arg1;
- (void)writeTo:(id)arg1;
- (BOOL)readFrom:(id)arg1;
- (id)dictionaryRepresentation;
- (id)description;
@property(readonly, nonatomic) BOOL hasDomain;
@property(readonly, nonatomic) BOOL hasType;
@end
| {
"pile_set_name": "Github"
} |
;
; Exports of file sfcfiles.dll
;
; Autogenerated by gen_exportdef
; Written by Kai Tietz, 2007
;
LIBRARY sfcfiles.dll
EXPORTS
SfcGetFiles
| {
"pile_set_name": "Github"
} |
package zemberek.morphology.lexicon;
public class LexiconException extends RuntimeException {
public LexiconException(String message) {
super(message);
}
public LexiconException(String message, Throwable cause) {
super(message, cause);
}
}
| {
"pile_set_name": "Github"
} |
/******************************************************************************
* Product: ADempiere ERP & CRM Smart Business Solution *
* Copyright (C) 2006-2017 ADempiere Foundation, All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* or (at your option) any later version. *
* 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., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* or via [email protected] or http://www.adempiere.net/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_User_Substitute
* @author Adempiere (generated)
* @version Release 3.9.2
*/
public interface I_AD_User_Substitute
{
/** TableName=AD_User_Substitute */
public static final String Table_Name = "AD_User_Substitute";
/** AD_Table_ID=642 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 6 - System - Client
*/
BigDecimal accessLevel = BigDecimal.valueOf(6);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name AD_User_ID */
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
/** Set User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public void setAD_User_ID (int AD_User_ID);
/** Get User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID();
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
/** Column name AD_User_Substitute_ID */
public static final String COLUMNNAME_AD_User_Substitute_ID = "AD_User_Substitute_ID";
/** Set User Substitute.
* Substitute of the user
*/
public void setAD_User_Substitute_ID (int AD_User_Substitute_ID);
/** Get User Substitute.
* Substitute of the user
*/
public int getAD_User_Substitute_ID();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Substitute_ID */
public static final String COLUMNNAME_Substitute_ID = "Substitute_ID";
/** Set Substitute.
* Entity which can be used in place of this entity
*/
public void setSubstitute_ID (int Substitute_ID);
/** Get Substitute.
* Entity which can be used in place of this entity
*/
public int getSubstitute_ID();
public org.compiere.model.I_AD_User getSubstitute() throws RuntimeException;
/** Column name UUID */
public static final String COLUMNNAME_UUID = "UUID";
/** Set Immutable Universally Unique Identifier.
* Immutable Universally Unique Identifier
*/
public void setUUID (String UUID);
/** Get Immutable Universally Unique Identifier.
* Immutable Universally Unique Identifier
*/
public String getUUID();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
/** Column name ValidFrom */
public static final String COLUMNNAME_ValidFrom = "ValidFrom";
/** Set Valid from.
* Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom);
/** Get Valid from.
* Valid from including this date (first day)
*/
public Timestamp getValidFrom();
/** Column name ValidTo */
public static final String COLUMNNAME_ValidTo = "ValidTo";
/** Set Valid to.
* Valid to including this date (last day)
*/
public void setValidTo (Timestamp ValidTo);
/** Get Valid to.
* Valid to including this date (last day)
*/
public Timestamp getValidTo();
}
| {
"pile_set_name": "Github"
} |
#
#
# 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.
#
require 'shell'
require 'stringio'
require 'hbase_constants'
require 'hbase/hbase'
require 'hbase/table'
module Hbase
class NoClusterConnectionTest < Test::Unit::TestCase
include TestHelpers
include HBaseConstants
def setup
puts "starting shell"
end
def teardown
# nothing to teardown
end
define_test "start_hbase_shell_no_cluster" do
assert_nothing_raised do
setup_hbase
end
end
end
end
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python
#
# Copyright (C) 2014 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.
"""Analyzes the dump of initialization failures and creates a Graphviz dot file
representing dependencies."""
import codecs
import os
import re
import string
import sys
_CLASS_RE = re.compile(r'^L(.*);$')
_ERROR_LINE_RE = re.compile(r'^dalvik.system.TransactionAbortError: (.*)')
_STACK_LINE_RE = re.compile(r'^\s*at\s[^\s]*\s([^\s]*)')
def Confused(filename, line_number, line):
sys.stderr.write('%s:%d: confused by:\n%s\n' % (filename, line_number, line))
raise Exception("giving up!")
sys.exit(1)
def ProcessFile(filename):
lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
it = iter(lines)
class_fail_class = {}
class_fail_method = {}
class_fail_load_library = {}
class_fail_get_property = {}
root_failures = set()
root_errors = {}
while True:
try:
# We start with a class descriptor.
raw_line = it.next()
m = _CLASS_RE.search(raw_line)
# print(raw_line)
if m is None:
continue
# Found a class.
failed_clazz = m.group(1).replace('/','.')
# print('Is a class %s' % failed_clazz)
# The error line should be next.
raw_line = it.next()
m = _ERROR_LINE_RE.search(raw_line)
# print(raw_line)
if m is None:
Confused(filename, -1, raw_line)
continue
# Found an error line.
error = m.group(1)
# print('Is an error %s' % error)
# Get the top of the stack
raw_line = it.next()
m = _STACK_LINE_RE.search(raw_line)
if m is None:
continue
# Found a stack line. Get the method.
method = m.group(1)
# print('Is a stack element %s' % method)
(left_of_paren,paren,right_of_paren) = method.partition('(')
(root_err_class,dot,root_method_name) = left_of_paren.rpartition('.')
# print('Error class %s' % err_class)
# print('Error method %s' % method_name)
# Record the root error.
root_failures.add(root_err_class)
# Parse all the trace elements to find the "immediate" cause.
immediate_class = root_err_class
immediate_method = root_method_name
root_errors[root_err_class] = error
was_load_library = False
was_get_property = False
# Now go "up" the stack.
while True:
raw_line = it.next()
m = _STACK_LINE_RE.search(raw_line)
if m is None:
break # Nothing more to see here.
method = m.group(1)
(left_of_paren,paren,right_of_paren) = method.partition('(')
(err_class,dot,err_method_name) = left_of_paren.rpartition('.')
if err_method_name == "<clinit>":
# A class initializer is on the stack...
class_fail_class[err_class] = immediate_class
class_fail_method[err_class] = immediate_method
class_fail_load_library[err_class] = was_load_library
immediate_class = err_class
immediate_method = err_method_name
class_fail_get_property[err_class] = was_get_property
was_get_property = False
was_load_library = err_method_name == "loadLibrary"
was_get_property = was_get_property or err_method_name == "getProperty"
failed_clazz_norm = re.sub(r"^L", "", failed_clazz)
failed_clazz_norm = re.sub(r";$", "", failed_clazz_norm)
failed_clazz_norm = re.sub(r"/", "", failed_clazz_norm)
if immediate_class != failed_clazz_norm:
class_fail_class[failed_clazz_norm] = immediate_class
class_fail_method[failed_clazz_norm] = immediate_method
except StopIteration:
# print('Done')
break # Done
# Assign IDs.
fail_sources = set(class_fail_class.values());
all_classes = fail_sources | set(class_fail_class.keys())
i = 0
class_index = {}
for clazz in all_classes:
class_index[clazz] = i
i = i + 1
# Now create the nodes.
for (r_class, r_id) in class_index.items():
error_string = ''
if r_class in root_failures:
error_string = ',style=filled,fillcolor=Red,tooltip="' + root_errors[r_class] + '",URL="' + root_errors[r_class] + '"'
elif r_class in class_fail_load_library and class_fail_load_library[r_class] == True:
error_string = error_string + ',style=filled,fillcolor=Bisque'
elif r_class in class_fail_get_property and class_fail_get_property[r_class] == True:
error_string = error_string + ',style=filled,fillcolor=Darkseagreen'
print(' n%d [shape=box,label="%s"%s];' % (r_id, r_class, error_string))
# Some space.
print('')
# Connections.
for (failed_class,error_class) in class_fail_class.items():
print(' n%d -> n%d;' % (class_index[failed_class], class_index[error_class]))
def main():
print('digraph {')
print(' overlap=false;')
print(' splines=true;')
ProcessFile(sys.argv[1])
print('}')
sys.exit(0)
if __name__ == '__main__':
main()
| {
"pile_set_name": "Github"
} |
User Database
=============
This section contains commands that manipulate the user database (comments, labels and bookmarks).
.. toctree::
:maxdepth: 0
dbsave
dbload
dbclear
commentset
commentdel
commentlist
commentclear
labelset
labeldel
labellist
labelclear
bookmarkset
bookmarkdel
bookmarklist
bookmarkclear
functionadd
functiondel
functionlist
functionclear
argumentadd
argumentdel
argumentlist
argumentclear | {
"pile_set_name": "Github"
} |
{
"name": "symfony/browser-kit",
"type": "library",
"description": "Symfony BrowserKit Component",
"keywords": [],
"homepage": "http://symfony.com",
"license": "MIT",
"authors": [
{
"name": "Fabien Potencier",
"email": "[email protected]"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"require": {
"php": ">=5.3.3",
"symfony/dom-crawler": "~2.0"
},
"require-dev": {
"symfony/process": "~2.0",
"symfony/css-selector": "~2.0"
},
"suggest": {
"symfony/process": ""
},
"autoload": {
"psr-0": { "Symfony\\Component\\BrowserKit\\": "" }
},
"target-dir": "Symfony/Component/BrowserKit",
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}
| {
"pile_set_name": "Github"
} |
/**
* @Time : 2019-07-29 15:22
* @Author : [email protected]
* @File : transport
* @Software: GoLand
*/
package monitor
import (
"context"
"github.com/dgrijalva/jwt-go"
kitjwt "github.com/go-kit/kit/auth/jwt"
"github.com/go-kit/kit/endpoint"
"github.com/go-kit/kit/log"
kithttp "github.com/go-kit/kit/transport/http"
"github.com/gorilla/mux"
kpljwt "github.com/kplcloud/kplcloud/src/jwt"
"github.com/kplcloud/kplcloud/src/middleware"
"github.com/kplcloud/kplcloud/src/util/encode"
"net/http"
)
type endpoints struct {
QueryNetworkEndpoint endpoint.Endpoint
OpsEndpoint endpoint.Endpoint
MetricsEndpoint endpoint.Endpoint
}
func MakeHandler(svc Service, logger log.Logger) http.Handler {
opts := []kithttp.ServerOption{
kithttp.ServerErrorLogger(logger),
kithttp.ServerErrorEncoder(encode.EncodeError),
kithttp.ServerBefore(kithttp.PopulateRequestContext),
kithttp.ServerBefore(kitjwt.HTTPToContext()),
kithttp.ServerBefore(middleware.CasbinToContext()),
}
eps := endpoints{
QueryNetworkEndpoint: makeQueryNetworkEndpoint(svc),
OpsEndpoint: makeOpsEndpoint(svc),
MetricsEndpoint: makeMetricsEndpoint(svc),
}
ems := []endpoint.Middleware{
middleware.CheckAuthMiddleware(logger), // 2
kitjwt.NewParser(kpljwt.JwtKeyFunc, jwt.SigningMethodHS256, kitjwt.StandardClaimsFactory), // 1
}
mw := map[string][]endpoint.Middleware{
"QueryNetwork": ems,
"Ops": ems,
"Metrics": ems,
}
for _, m := range mw["QueryNetwork"] {
eps.QueryNetworkEndpoint = m(eps.QueryNetworkEndpoint)
}
for _, m := range mw["Ops"] {
eps.OpsEndpoint = m(eps.OpsEndpoint)
}
for _, m := range mw["Metrics"] {
eps.MetricsEndpoint = m(eps.MetricsEndpoint)
}
r := mux.NewRouter()
r.Handle("/monitor/prometheus/query/network", kithttp.NewServer(
eps.QueryNetworkEndpoint,
func(ctx context.Context, r *http.Request) (request interface{}, err error) {
return nil, nil
},
encode.EncodeResponse,
opts...,
)).Methods("GET")
r.Handle("/monitor/prometheus/query/ops", kithttp.NewServer(
eps.OpsEndpoint,
func(ctx context.Context, r *http.Request) (request interface{}, err error) {
return nil, nil
},
encode.EncodeResponse,
opts...,
)).Methods("GET")
r.Handle("/monitor/metrics", kithttp.NewServer(
eps.MetricsEndpoint,
func(ctx context.Context, r *http.Request) (request interface{}, err error) {
return nil, nil
},
encode.EncodeResponse,
opts...,
)).Methods("GET")
return r
}
| {
"pile_set_name": "Github"
} |
{
"name": "GUI_Editor",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
} | {
"pile_set_name": "Github"
} |
''' Implementation of MVT (Mapnik Vector Tiles) data format.
Mapnik's PythonDatasource.features() method can return a list of WKB features,
pairs of WKB format geometry and dictionaries of key-value pairs that are
rendered by Mapnik directly. PythonDatasource is new in Mapnik as of version
2.1.0.
More information:
http://mapnik.org/docs/v2.1.0/api/python/mapnik.PythonDatasource-class.html
The MVT file format is a simple container for Mapnik-compatible vector tiles
that minimizes the amount of conversion performed by the renderer, in contrast
to other file formats such as GeoJSON.
An MVT file starts with 8 bytes.
4 bytes "\\x89MVT"
uint32 Length of body
bytes zlib-compressed body
The following body is a zlib-compressed bytestream. When decompressed,
it starts with four bytes indicating the total feature count.
uint32 Feature count
bytes Stream of feature data
Each feature has two parts, a raw WKB (well-known binary) representation of
the geometry in spherical mercator and a JSON blob for feature properties.
uint32 Length of feature WKB
bytes Raw bytes of WKB
uint32 Length of properties JSON
bytes JSON dictionary of feature properties
By default, encode() approximates the floating point precision of WKB geometry
to 26 bits for a significant compression improvement and no visible impact on
rendering at zoom 18 and lower.
'''
from io import BytesIO
from zlib import decompress as _decompress, compress as _compress
from struct import unpack as _unpack, pack as _pack
import json
from .wkb import approximate_wkb
def decode(file):
''' Decode an MVT file into a list of (WKB, property dict) features.
Result can be passed directly to mapnik.PythonDatasource.wkb_features().
'''
head = file.read(4)
if head != '\x89MVT':
raise Exception('Bad head: "%s"' % head)
body = BytesIO(_decompress(file.read(_next_int(file))))
features = []
for i in range(_next_int(body)):
wkb = body.read(_next_int(body))
raw = body.read(_next_int(body))
props = json.loads(raw)
features.append((wkb, props))
return features
def encode(file, features):
''' Encode a list of (WKB, property dict) features into an MVT stream.
Geometries in the features list are assumed to be in spherical mercator.
Floating point precision in the output is approximated to 26 bits.
'''
parts = []
for feature in features:
wkb = approximate_wkb(feature[0])
prop = json.dumps(feature[1])
parts.extend([_pack('>I', len(wkb)), wkb, _pack('>I', len(prop)), prop])
body = _compress(_pack('>I', len(features)) + b''.join(parts))
file.write(b'\x89MVT')
file.write(_pack('>I', len(body)))
file.write(body)
def _next_int(file):
''' Read the next big-endian 4-byte unsigned int from a file.
'''
return _unpack('!I', file.read(4))[0]
| {
"pile_set_name": "Github"
} |
process primitive support
setOwnerIndexOfProcess: aProcess to: anIndex bind: bind
| threadId |
threadId := anIndex = 0
ifTrue: [objectMemory nilObject]
ifFalse: [objectMemory integerObjectOf: (anIndex << 1) + (bind ifTrue: [1] ifFalse: [0])].
objectMemory storePointerUnchecked: ThreadIdIndex ofObject: aProcess withValue: threadId | {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.