text
stringlengths 2
9.79k
| meta
dict | sentences_perturbed
int64 0
2
⌀ | doc_stats
dict |
|---|---|---|---|
<?php
class NamespaceCoveragePublicTest extends PHPUnit_Framework_TestCase
{
/**
* @covers Foo\CoveredClass::<public>
*/
public function testSomething()
{
$o = new Foo\CoveredClass;
$o->publicMethod();
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
#ifndef XPROTOSTRUCTS_H
#define XPROTOSTRUCTS_H
/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
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
OPEN GROUP 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.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#include <X11/Xmd.h>
/* Used by PolySegment */
typedef struct _xSegment {
INT16 x1 B16, y1 B16, x2 B16, y2 B16;
} xSegment;
/* POINT */
typedef struct _xPoint {
INT16 x B16, y B16;
} xPoint;
typedef struct _xRectangle {
INT16 x B16, y B16;
CARD16 width B16, height B16;
} xRectangle;
/* ARC */
typedef struct _xArc {
INT16 x B16, y B16;
CARD16 width B16, height B16;
INT16 angle1 B16, angle2 B16;
} xArc;
#endif /* XPROTOSTRUCTS_H */
|
{
"pile_set_name": "Github"
}
| null | null |
module.exports = [
'M3 8 A3 3 0 0 0 9 8 A3 3 0 0 0 3 8 M12 6 L28 6 L28 10 L12 10z M3 16 A3 3 0 0 0 9 16 A3 3 0 0 0 3 16 M12 14 L28 14 L28 18 L12 18z M3 24 A3 3 0 0 0 9 24 A3 3 0 0 0 3 24 M12 22 L28 22 L28 26 L12 26z'
].join(' ');
|
{
"pile_set_name": "Github"
}
| null | null |
package android.app.servertransaction;
import android.app.ClientTransactionHandler;
import android.os.IBinder;
public interface IClientTransactionItem {
void execute(ClientTransactionHandler clientTransactionHandler, IBinder iBinder, PendingTransactionActions pendingTransactionActions);
}
|
{
"pile_set_name": "Github"
}
| null | null |
using System;
using System.Collections;
#if !SILVERLIGHT
using System.Collections.Concurrent;
#else
using TvdP.Collections;
#endif
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
namespace Gimela.Data.Mapping
{
internal delegate object LateBoundMethod(object target, object[] arguments);
internal delegate object LateBoundPropertyGet(object target);
internal delegate object LateBoundFieldGet(object target);
internal delegate void LateBoundFieldSet(object target, object value);
internal delegate void LateBoundPropertySet(object target, object value);
internal delegate void LateBoundValueTypeFieldSet(ref object target, object value);
internal delegate void LateBoundValueTypePropertySet(ref object target, object value);
internal delegate object LateBoundCtor();
internal delegate object LateBoundParamsCtor(params object[] parameters);
internal static class DelegateFactory
{
private static readonly ConcurrentDictionary<Type, LateBoundCtor> _ctorCache = new ConcurrentDictionary<Type, LateBoundCtor>();
public static LateBoundMethod CreateGet(MethodInfo method)
{
ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target");
ParameterExpression argumentsParameter = Expression.Parameter(typeof(object[]), "arguments");
MethodCallExpression call = Expression.Call(
Expression.Convert(instanceParameter, method.DeclaringType),
method,
CreateParameterExpressions(method, argumentsParameter));
Expression<LateBoundMethod> lambda = Expression.Lambda<LateBoundMethod>(
Expression.Convert(call, typeof(object)),
instanceParameter,
argumentsParameter);
return lambda.Compile();
}
public static LateBoundPropertyGet CreateGet(PropertyInfo property)
{
ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target");
MemberExpression member = Expression.Property(Expression.Convert(instanceParameter, property.DeclaringType), property);
Expression<LateBoundPropertyGet> lambda = Expression.Lambda<LateBoundPropertyGet>(
Expression.Convert(member, typeof(object)),
instanceParameter
);
return lambda.Compile();
}
public static LateBoundFieldGet CreateGet(FieldInfo field)
{
ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target");
MemberExpression member = Expression.Field(Expression.Convert(instanceParameter, field.DeclaringType), field);
Expression<LateBoundFieldGet> lambda = Expression.Lambda<LateBoundFieldGet>(
Expression.Convert(member, typeof(object)),
instanceParameter
);
return lambda.Compile();
}
public static LateBoundFieldSet CreateSet(FieldInfo field)
{
var sourceType = field.DeclaringType;
var method = CreateDynamicMethod(field, sourceType);
var gen = method.GetILGenerator();
gen.Emit(OpCodes.Ldarg_0); // Load input to stack
gen.Emit(OpCodes.Castclass, sourceType); // Cast to source type
gen.Emit(OpCodes.Ldarg_1); // Load value to stack
gen.Emit(OpCodes.Unbox_Any, field.FieldType); // Unbox the value to its proper value type
gen.Emit(OpCodes.Stfld, field); // Set the value to the input field
gen.Emit(OpCodes.Ret);
var callback = (LateBoundFieldSet)method.CreateDelegate(typeof(LateBoundFieldSet));
return callback;
}
public static LateBoundPropertySet CreateSet(PropertyInfo property)
{
var sourceType = property.DeclaringType;
var setter = property.GetSetMethod(true);
var method = CreateDynamicMethod(property, sourceType);
var gen = method.GetILGenerator();
gen.Emit(OpCodes.Ldarg_0); // Load input to stack
gen.Emit(OpCodes.Castclass, sourceType); // Cast to source type
gen.Emit(OpCodes.Ldarg_1); // Load value to stack
gen.Emit(OpCodes.Unbox_Any, property.PropertyType); // Unbox the value to its proper value type
gen.Emit(OpCodes.Callvirt, setter); // Call the setter method
gen.Emit(OpCodes.Ret);
var result = (LateBoundPropertySet)method.CreateDelegate(typeof(LateBoundPropertySet));
return result;
}
public static LateBoundValueTypePropertySet CreateValueTypeSet(PropertyInfo property)
{
var sourceType = property.DeclaringType;
var setter = property.GetSetMethod(true);
var method = CreateValueTypeDynamicMethod(property, sourceType);
var gen = method.GetILGenerator();
method.InitLocals = true;
gen.Emit(OpCodes.Ldarg_0); // Load input to stack
gen.Emit(OpCodes.Ldind_Ref);
gen.Emit(OpCodes.Unbox_Any, sourceType); // Unbox the source to its correct type
gen.Emit(OpCodes.Stloc_0); // Store the unboxed input on the stack
gen.Emit(OpCodes.Ldloca_S, 0);
gen.Emit(OpCodes.Ldarg_1); // Load value to stack
gen.Emit(OpCodes.Castclass, property.PropertyType); // Unbox the value to its proper value type
gen.Emit(OpCodes.Call, setter); // Call the setter method
gen.Emit(OpCodes.Ret);
var result = (LateBoundValueTypePropertySet)method.CreateDelegate(typeof(LateBoundValueTypePropertySet));
return result;
}
public static LateBoundCtor CreateCtor(Type type)
{
LateBoundCtor ctor = _ctorCache.GetOrAdd(type, t =>
{
var ctorExpression = Expression.Lambda<LateBoundCtor>(Expression.Convert(Expression.New(type), typeof(object)));
return ctorExpression.Compile();
});
return ctor;
}
private static DynamicMethod CreateValueTypeDynamicMethod(MemberInfo member, Type sourceType)
{
#if !SILVERLIGHT
if (sourceType.IsInterface)
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object).MakeByRefType(), typeof(object) }, sourceType.Assembly.ManifestModule, true);
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object).MakeByRefType(), typeof(object) }, sourceType, true);
#else
if (sourceType.IsInterface)
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object).MakeByRefType(), typeof(object) });
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object).MakeByRefType(), typeof(object) });
#endif
}
private static DynamicMethod CreateDynamicMethod(MemberInfo member, Type sourceType)
{
#if !SILVERLIGHT
if (sourceType.IsInterface)
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object), typeof(object) }, sourceType.Assembly.ManifestModule, true);
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object), typeof(object) }, sourceType, true);
#else
if (sourceType.IsInterface)
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object), typeof(object) });
return new DynamicMethod("Set" + member.Name, null, new[] { typeof(object), typeof(object) });
#endif
}
private static Expression[] CreateParameterExpressions(MethodInfo method, Expression argumentsParameter)
{
return method.GetParameters().Select((parameter, index) =>
Expression.Convert(
Expression.ArrayIndex(argumentsParameter, Expression.Constant(index)),
parameter.ParameterType)).ToArray();
}
public static LateBoundParamsCtor CreateCtor(ConstructorInfo constructorInfo, IEnumerable<ConstructorParameterMap> ctorParams)
{
ParameterExpression paramsExpr = Expression.Parameter(typeof(object[]), "parameters");
var convertExprs = ctorParams
.Select((ctorParam, i) =>
|
{
"pile_set_name": "Github"
}
| null | null |
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/ClassroomKit.framework/ClassroomKit
*/
@interface CRKImage : UIImage
+ (id)imageWithContentsOfFile:(id)arg1;
@end
|
{
"pile_set_name": "Github"
}
| null | null |
import removeEventListener from "./removeEventListener";
export default function removeArrayEvent<T>(elm: HTMLElement & T, events?: string[], func = () => {}) {
for (const event of events) {
removeEventListener(elm, event, func);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
v -52.310524 146.512344 18.468866
v -52.006882 149.668945 18.804028
v -52.693462 149.540131 19.772520
v -53.003380 146.178970 19.359447
v -58.391552 150.017441 19.800699
v -58.696220 146.687164 19.347227
v -59.182240 141.540771 9.640217
v -59.098911 142.438126 10.494978
v -53.922932 141.976852 10.509547
v -53.391281 140.976151 9.594035
v -59.101421 142.368011 12.802792
v -53.451618 141.814438 12.787569
v -52.833878 140.824707 12.662912
v -53.425392 143.291504 15.128483
v -58.968494 143.780884 15.145857
v -52.686489 142.467163 15.579442
v -58.646866 147.259521 17.635334
v -52.968700 146.748886 17.633665
v -52.793365 149.200607 17.929253
v -58.422825 149.708633 17.961472
v -53.311481 151.010132 16.880520
v -58.262913 151.480652 16.894892
v -52.317581 152.083771 17.406038
v -58.156948 152.632141 17.420467
v -53.984829 140.351608 10.343203
v -53.597054 140.201508 13.275193
v -53.378792 142.006546 16.408361
v -59.081066 142.523834 16.419350
v -52.937016 151.826019 18.478262
v -58.156948 152.632141 17.420467
v -58.183979 152.316223 18.490870
v -59.182240 141.540771 9.640217
v -59.246250 140.825882 10.368200
v -59.250690 140.722733 13.287186
v -65.010979 147.671326 18.490191
v -64.386948 147.217773 19.378561
v -64.081985 150.579391 19.791641
v -64.737129 150.830643 18.825401
v -64.272804 142.921341 10.526951
v -64.979858 142.033691 9.613521
v -64.758118 142.846237 12.806581
v -65.545219 141.984695 12.684286
v -64.508644 144.302917 15.147091
v -65.383041 143.625778 15.600760
v -64.323639 147.785095 17.652729
v -64.051331 150.227966 17.948156
v -63.217743 151.914124 16.897154
v -63.999138 153.149765 17.425652
v -64.506660 141.311798 10.360895
v -64.905350 141.233490 13.294296
v -64.782791 143.047226 16.427507
v -63.433010 152.783829 18.495884
v -49.081223 203.238144 -5.269733
v -49.301826 200.682281 -4.033706
v -49.785896 200.599213 -4.965703
v -49.540154 203.334808 -6.232428
v -53.781483 200.991684 -4.995732
v -53.535084 203.714325 -6.212304
v -52.908543 210.473282 -0.263909
v -52.994926 209.532104 -0.572872
v -49.362904 209.185455 -0.593814
v -48.836746 210.140335 -0.256327
v -53.052979 208.932877 -2.612792
v -49.080917 208.601685 -2.632618
v -48.519321 209.312698 -2.973806
v -49.326244 206.803085 -3.957552
v -53.216202 207.168533 -3.966027
v -48.719467 207.208069 -4.714757
v -53.528587 203.753494 -4.447443
v -49.543068 203.381744 -4.457282
v -49.757149 201.394775 -3.530412
v -53.709591 201.753326 -3.546391
v -50.325844 200.374023 -1.771687
v -53.805004 200.675186 -1.762239
v -49.798134 199.268433 -1.672359
v -53.900265 199.629303 -1.662140
v -49.184345 210.486923 -1.231732
v -48.980236 209.719803 -3.836553
v -49.159309 207.419662 -5.684886
v -53.162621 207.786911 -5.680962
v -50.221657 199.245804 -2.753627
v -53.900265 199.629303 -1.662140
v -53.907276 199.572128 -2.745361
v -52.908543 210.473282 -0.263909
v -52.878174 210.823898 -1.242460
v -52.950577 210.077301 -3.829529
v -57.998455 204.051743 -5.254960
v -57.532772 204.064056 -6.219187
v -57.781998 201.328781 -4.952456
v -58.239979 201.497803 -4.018898
v -56.629753 209.848480 -0.581776
v -56.973309 210.882721 -0.242848
v -57.019428 209.326004 -2.619466
v -57.444199 210.127014 -2.959020
v -57.108006 207.513092 -3.944660
v -57.633965 208.021423 -4.699988
v -57.515587 204.109161 -4.444074
v -57.661583 202.115982 -3.517317
v -57.281223 201.008636 -1.760164
v -57.999977 200.016769 -1.658771
v -56.571930 211.160980 -1.219493
v -56.920052 210.444244 -3.823399
v -57.166279 208.150223 -5.671621
v -57.591095 199.918198 -2.741419
v -48.593624 208.204285 15.547991
v -48.375751 210.507401 13.851092
v -48.819031 210.838318 14.741749
v -49.043839 208.361664 16.503019
v -52.818920 211.182205 14.789536
v -53.041725 208.709213 16.499239
v -53.752895 200.997208 11.957090
v -53.663017 201.980026 12.080761
v -50.027969 201.666061 12.086491
v -49.688293 200.585785 11.943572
v -53.573311 202.929001 13.965318
v -49.606598 202.538605 13.977616
v -49.175240 201.807358 14.454063
v -49.499626 204.559814 14.932483
v -53.391186
|
{
"pile_set_name": "Github"
}
| null | null |
<script>
import classnames from './utils';
let className = '';
export { className as class };
export let type = 'border';
export let size = '';
export let color = '';
$: classes = classnames(
className,
size ? `spinner-${type}-${size}` : false,
`spinner-${type}`,
color ? `text-${color}` : false
);
</script>
<div {...$$restProps} role="status" class={classes}>
<span class="sr-only">
<slot>Loading...</slot>
</span>
</div>
|
{
"pile_set_name": "Github"
}
| null | null |
#pragma once
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <THC/THC.h>
#include <c10/util/Optional.h>
#include <nccl.h>
#include <cstddef>
#include <vector>
namespace torch {
namespace cuda {
namespace nccl {
// NOTE: this is exposed only so that python_nccl.cpp can some of these helpers.
// Don't use them outside of these files.
namespace detail {
void throw_nccl_error(ncclResult_t status);
static inline void NCCL_CHECK(ncclResult_t status) {
if (status != ncclSuccess) {
throw_nccl_error(status);
}
}
struct AutoNcclGroup {
AutoNcclGroup() {
#if defined(NCCL_MAJOR) && (NCCL_MAJOR >= 2)
NCCL_CHECK(ncclGroupStart());
#endif
}
~AutoNcclGroup() {
#if defined(NCCL_MAJOR) && (NCCL_MAJOR >= 2)
NCCL_CHECK(ncclGroupEnd());
#endif
}
};
at::ArrayRef<ncclComm_t> _get_communicators(at::TensorList inputs);
void _check_inputs(
at::TensorList inputs,
at::TensorList outputs,
int input_multiplier,
int output_multiplier);
ncclDataType_t _get_data_type(const at::Type& type);
} // namespace detail
using comm_list = std::vector<ncclComm_t>;
using stream_list = std::vector<c10::optional<at::cuda::CUDAStream>>;
std::uint64_t version();
bool is_available(at::TensorList tensors);
void broadcast(
at::TensorList tensors,
const stream_list& streams = {},
const comm_list& user_comms = {});
size_t get_max_count();
void reduce(
const std::vector<at::Tensor>& inputs,
std::vector<at::Tensor>& outputs,
int32_t root = 0,
int32_t op = ncclSum,
const stream_list& streams = {},
const comm_list& user_comms = {});
void reduce(
std::vector<at::Tensor>& inputs,
int32_t root = 0,
int32_t op = ncclSum,
const stream_list& streams = {},
const comm_list& user_comms = {});
} // namespace nccl
} // namespace cuda
} // namespace torch
|
{
"pile_set_name": "Github"
}
| null | null |
primOpHasSideEffects NewArrayOp = True
primOpHasSideEffects ReadArrayOp = True
primOpHasSideEffects WriteArrayOp = True
primOpHasSideEffects UnsafeFreezeArrayOp = True
primOpHasSideEffects UnsafeThawArrayOp = True
primOpHasSideEffects CopyArrayOp = True
primOpHasSideEffects CopyMutableArrayOp = True
primOpHasSideEffects CloneArrayOp = True
primOpHasSideEffects CloneMutableArrayOp = True
primOpHasSideEffects FreezeArrayOp = True
primOpHasSideEffects ThawArrayOp = True
primOpHasSideEffects CasArrayOp = True
primOpHasSideEffects NewSmallArrayOp = True
primOpHasSideEffects ReadSmallArrayOp = True
primOpHasSideEffects WriteSmallArrayOp = True
primOpHasSideEffects UnsafeFreezeSmallArrayOp = True
primOpHasSideEffects UnsafeThawSmallArrayOp = True
primOpHasSideEffects CopySmallArrayOp = True
primOpHasSideEffects CopySmallMutableArrayOp = True
primOpHasSideEffects CloneSmallArrayOp = True
primOpHasSideEffects CloneSmallMutableArrayOp = True
primOpHasSideEffects FreezeSmallArrayOp = True
primOpHasSideEffects ThawSmallArrayOp = True
primOpHasSideEffects CasSmallArrayOp = True
primOpHasSideEffects NewByteArrayOp_Char = True
primOpHasSideEffects NewPinnedByteArrayOp_Char = True
primOpHasSideEffects NewAlignedPinnedByteArrayOp_Char = True
primOpHasSideEffects ShrinkMutableByteArrayOp_Char = True
primOpHasSideEffects ResizeMutableByteArrayOp_Char = True
primOpHasSideEffects UnsafeFreezeByteArrayOp = True
primOpHasSideEffects ReadByteArrayOp_Char = True
primOpHasSideEffects ReadByteArrayOp_WideChar = True
primOpHasSideEffects ReadByteArrayOp_Int = True
primOpHasSideEffects ReadByteArrayOp_Word = True
primOpHasSideEffects ReadByteArrayOp_Addr = True
primOpHasSideEffects ReadByteArrayOp_Float = True
primOpHasSideEffects ReadByteArrayOp_Double = True
primOpHasSideEffects ReadByteArrayOp_StablePtr = True
primOpHasSideEffects ReadByteArrayOp_Int8 = True
primOpHasSideEffects ReadByteArrayOp_Int16 = True
primOpHasSideEffects ReadByteArrayOp_Int32 = True
primOpHasSideEffects ReadByteArrayOp_Int64 = True
primOpHasSideEffects ReadByteArrayOp_Word8 = True
primOpHasSideEffects ReadByteArrayOp_Word16 = True
primOpHasSideEffects ReadByteArrayOp_Word32 = True
primOpHasSideEffects ReadByteArrayOp_Word64 = True
primOpHasSideEffects WriteByteArrayOp_Char = True
primOpHasSideEffects WriteByteArrayOp_WideChar = True
primOpHasSideEffects WriteByteArrayOp_Int = True
primOpHasSideEffects WriteByteArrayOp_Word = True
primOpHasSideEffects WriteByteArrayOp_Addr = True
primOpHasSideEffects WriteByteArrayOp_Float = True
primOpHasSideEffects WriteByteArrayOp_Double = True
primOpHasSideEffects WriteByteArrayOp_StablePtr = True
primOpHasSideEffects WriteByteArrayOp_Int8 = True
primOpHasSideEffects WriteByteArrayOp_Int16 = True
primOpHasSideEffects WriteByteArrayOp_Int32 = True
primOpHasSideEffects WriteByteArrayOp_Int64 = True
primOpHasSideEffects WriteByteArrayOp_Word8 = True
primOpHasSideEffects WriteByteArrayOp_Word16 = True
primOpHasSideEffects WriteByteArrayOp_Word32 = True
primOpHasSideEffects WriteByteArrayOp_Word64 = True
primOpHasSideEffects CopyByteArrayOp = True
primOpHasSideEffects CopyMutableByteArrayOp = True
primOpHasSideEffects CopyByteArrayToAddrOp = True
primOpHasSideEffects CopyMutableByteArrayToAddrOp = True
primOpHasSideEffects CopyAddrToByteArrayOp = True
primOpHasSideEffects SetByteArrayOp = True
primOpHasSideEffects AtomicReadByteArrayOp_Int = True
primOpHasSideEffects AtomicWriteByteArrayOp_Int = True
primOpHasSideEffects CasByteArrayOp_Int = True
primOpHasSideEffects FetchAddByteArrayOp_Int = True
primOpHasSideEffects FetchSubByteArrayOp_Int = True
primOpHasSideEffects FetchAndByteArrayOp_Int = True
primOpHasSideEffects FetchNandByteArrayOp_Int = True
primOpHasSideEffects FetchOrByteArrayOp_Int = True
primOpHasSideEffects FetchXorByteArrayOp_Int = True
primOpHasSideEffects NewArrayArrayOp = True
primOpHasSideEffects UnsafeFreezeArrayArrayOp = True
primOpHasSideEffects ReadArrayArrayOp_ByteArray = True
primOpHasSideEffects ReadArrayArrayOp_MutableByteArray = True
primOpHasSideEffects ReadArrayArrayOp_ArrayArray = True
primOpHasSideEffects ReadArrayArrayOp_MutableArrayArray = True
primOpHasSideEffects WriteArrayArrayOp_ByteArray = True
primOpHasSideEffects WriteArrayArrayOp_MutableByteArray = True
primOpHasSideEffects WriteArrayArrayOp_ArrayArray = True
primOpHasSideEffects WriteArrayArrayOp_MutableArrayArray = True
primOpHasSideEffects CopyArrayArrayOp = True
primOpHasSideEffects CopyMutableArrayArrayOp = True
primOpHasSideEffects ReadOffAddrOp_Char = True
primOpHasSideEffects ReadOffAddrOp_WideChar = True
primOpHasSideEffects ReadOffAddrOp_Int = True
primOpHasSideEffects ReadOffAddrOp_Word = True
primOpHasSideEffects ReadOffAddrOp_Addr = True
primOpHasSideEffects ReadOffAddrOp_Float = True
primOpHasSideEffects ReadOffAddrOp_Double = True
primOpHasSideEffects ReadOffAddrOp_StablePtr = True
primOpHasSideEffects ReadOffAddrOp_Int8 = True
primOpHasSideEffects ReadOffAddrOp_Int16 = True
primOpHasSideEffects ReadOffAddrOp_Int32 = True
primOpHasSideEffects ReadOffAddrOp_Int64 = True
primOpHasSideEffects ReadOffAddrOp_Word8 = True
primOpHasSideEffects ReadOffAddrOp_Word16 = True
primOpHasSideEffects ReadOffAddrOp_Word32 = True
primOpHasSideEffects ReadOffAddrOp_Word64 = True
primOpHasSideEffects WriteOffAddrOp_Char = True
primOpHasSideEffects WriteOffAddrOp_WideChar = True
primOpHasSideEffects WriteOffAddrOp_Int = True
primOpHasSideEffects WriteOffAddrOp_Word = True
primOpHasSideEffects WriteOffAddrOp_Addr = True
primOpHasSideEffects WriteOffAddrOp_Float = True
primOpHasSideEffects WriteOffAddrOp_Double = True
primOpHasSideEffects WriteOffAddrOp_StablePtr = True
primOpHasSideEffects WriteOffAddrOp_Int8 = True
primOpHasSideEffects WriteOffAddrOp_Int16 = True
primOpHasSideEffects WriteOffAddrOp_Int32 = True
primOpHasSideEffects WriteOffAddrOp_Int64 = True
primOpHasSideEffects WriteOffAddrOp_Word8 = True
primOpHasSideEffects WriteOffAddrOp_Word16 = True
primOpHasSideEffects WriteOffAddrOp_Word32 = True
primOpHasSideEffects WriteOffAddrOp_Word64 = True
primOpHasSideEffects NewMutVarOp = True
primOpHasSideEffects ReadMutVarOp = True
primOpHasSideEffects WriteMutVarOp = True
primOpHasSideEffects AtomicModifyMutVarOp = True
primOpHasSideEffects CasMutVarOp = True
primOpHasSideEffects CatchOp = True
primOpHasSideEffects RaiseOp = True
primOpHasSideEffects RaiseIOOp = True
primOpHasSideEffects MaskAsyncExceptionsOp = True
primOpHasSideEffects MaskUninterruptibleOp = True
primOpHasSideEffects UnmaskAsyncExceptionsOp = True
primOpHasSideEffects MaskStatus = True
primOpHasSideEffects AtomicallyOp = True
primOpHasSideEffects RetryOp = True
primOpHasSideEffects CatchRetryOp = True
primOpHasSideEffects CatchSTMOp = True
primOpHasSideEffects Check = True
primOpHasSideEffects NewTVarOp = True
primOpHasSideEffects ReadTVarOp = True
primOpHasSideEffects ReadTVarIOOp = True
primOpHasSideEffects WriteTVarOp = True
primOpHasSideEffects NewMVarOp = True
primOpHasSideEffects TakeMVarOp = True
primOpHasSideEffects TryTakeMVarOp = True
primOpHasSideEffects PutMVarOp = True
primOpHasSideEffects Try
|
{
"pile_set_name": "Github"
}
| null | null |
<h2><%= I18n.t('title', {:scope => 'devise.registration'}) %></h2>
<%= google_authenticator_qrcode(resource) %>
<%= form_for(resource, :as => resource_name, :url => [:refresh, resource_name, :displayqr], :html => {:method => :post}) do |f|%>
<p><%= f.submit I18n.t('newtoken', {:scope => 'devise.registration'}) %></p>
<% end %>
<%= form_for(resource, :as => resource_name, :url => [resource_name, :displayqr], :html => { :method => :put }) do |f| %>
<%= devise_error_messages! %>
<h3><%= I18n.t('nice_request', {:scope => 'devise.registration'}) %></h3>
<p><%= f.label :gauth_enabled, I18n.t('qrstatus', {:scope => 'devise.registration'}) %><br />
<%= f.check_box :gauth_enabled %></p>
<%= f.hidden_field :tmpid, value: @tmpid %>
<p><%= f.label :gauth_token, I18n.t('enter_token', {:scope => 'devise.registration'}) %><br />
<%= f.number_field :gauth_token, :autocomplete => :off %>
<p><%= f.submit I18n.t('submit', {:scope => 'devise.registration'}) %></p>
<% end %>
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright (c) Sandeep Mistry. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifndef _BLE_DEVICE_H_
#define _BLE_DEVICE_H_
#include "BLEBondStore.h"
#include "BLECharacteristic.h"
#include "BLELocalAttribute.h"
#include "BLERemoteAttribute.h"
#include "BLERemoteCharacteristic.h"
#include "BLERemoteService.h"
struct BLEEirData
{
unsigned char length;
unsigned char type;
unsigned char data[BLE_EIR_DATA_MAX_VALUE_LENGTH];
};
class BLEDevice;
class BLEDeviceEventListener
{
public:
virtual void BLEDeviceConnected(BLEDevice& /*device*/, const unsigned char* /*address*/) { }
virtual void BLEDeviceDisconnected(BLEDevice& /*device*/) { }
virtual void BLEDeviceBonded(BLEDevice& /*device*/) { }
virtual void BLEDeviceRemoteServicesDiscovered(BLEDevice& /*device*/) { }
virtual void BLEDeviceCharacteristicValueChanged(BLEDevice& /*device*/, BLECharacteristic& /*characteristic*/, const unsigned char* /*value*/, unsigned char /*valueLength*/) { }
virtual void BLEDeviceCharacteristicSubscribedChanged(BLEDevice& /*device*/, BLECharacteristic& /*characteristic*/, bool /*subscribed*/) { }
virtual void BLEDeviceRemoteCharacteristicValueChanged(BLEDevice& /*device*/, BLERemoteCharacteristic& /*characteristic*/, const unsigned char* /*value*/, unsigned char /*valueLength*/) { }
virtual void BLEDeviceAddressReceived(BLEDevice& /*device*/, const unsigned char* /*address*/) { }
virtual void BLEDeviceTemperatureReceived(BLEDevice& /*device*/, float /*temperature*/) { }
virtual void BLEDeviceBatteryLevelReceived(BLEDevice& /*device*/, float /*batteryLevel*/) { }
};
class BLEDevice
{
friend class BLEPeripheral;
protected:
BLEDevice();
virtual ~BLEDevice();
void setEventListener(BLEDeviceEventListener* eventListener);
void setAdvertisingInterval(unsigned short advertisingInterval);
void setConnectionInterval(unsigned short minimumConnectionInterval, unsigned short maximumConnectionInterval);
void setConnectable(bool connectable);
void setBondStore(BLEBondStore& bondStore);
virtual void begin(unsigned char /*advertisementDataSize*/,
BLEEirData * /*advertisementData*/,
unsigned char /*scanDataSize*/,
BLEEirData * /*scanData*/,
BLELocalAttribute** /*localAttributes*/,
unsigned char /*numLocalAttributes*/,
BLERemoteAttribute** /*remoteAttributes*/,
unsigned char /*numRemoteAttributes*/) { }
virtual void poll() { }
virtual void end() { }
virtual bool setTxPower(int /*txPower*/) { return false; }
virtual void startAdvertising() { }
virtual void disconnect() { }
virtual bool updateCharacteristicValue(BLECharacteristic& /*characteristic*/) { return false; }
virtual bool broadcastCharacteristic(BLECharacteristic& /*characteristic*/) { return false; }
virtual bool canNotifyCharacteristic(BLECharacteristic& /*characteristic*/) { return false; }
virtual bool canIndicateCharacteristic(BLECharacteristic& /*characteristic*/) { return false; }
virtual bool canReadRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual bool readRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual bool canWriteRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual bool writeRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/, const unsigned char /*value*/[], unsigned char /*length*/) { return false; }
virtual bool canSubscribeRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual bool subscribeRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual bool canUnsubscribeRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual bool unsubcribeRemoteCharacteristic(BLERemoteCharacteristic& /*characteristic*/) { return false; }
virtual void requestAddress() { }
virtual void requestTemperature() { }
virtual void requestBatteryLevel() { }
protected:
unsigned short _advertisingInterval;
unsigned short _minimumConnectionInterval;
unsigned short _maximumConnectionInterval;
bool _connectable;
BLEBondStore* _bondStore;
BLEDeviceEventListener* _eventListener;
};
#endif
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2017 Google LLC
//
// 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 main
import (
"fmt"
"log"
"net/http"
"os"
"strings"
compute "google.golang.org/api/compute/v1"
"google.golang.org/api/googleapi"
)
func init() {
scopes := strings.Join([]string{
compute.DevstorageFullControlScope,
compute.ComputeScope,
}, " ")
registerDemo("compute", scopes, computeMain)
}
func computeMain(client *http.Client, argv []string) {
if len(argv) != 2 {
fmt.Fprintln(os.Stderr, "Usage: compute project_id instance_name (to start an instance)")
return
}
service, err := compute.New(client)
if err != nil {
log.Fatalf("Unable to create Compute service: %v", err)
}
projectId := argv[0]
instanceName := argv[1]
prefix := "https://www.googleapis.com/compute/v1/projects/" + projectId
imageURL := "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20140606"
zone := "us-central1-a"
// Show the current images that are available.
res, err := service.Images.List(projectId).Do()
log.Printf("Got compute.Images.List, err: %#v, %v", res, err)
instance := &compute.Instance{
Name: instanceName,
Description: "compute sample instance",
MachineType: prefix + "/zones/" + zone + "/machineTypes/n1-standard-1",
Disks: []*compute.AttachedDisk{
{
AutoDelete: true,
Boot: true,
Type: "PERSISTENT",
InitializeParams: &compute.AttachedDiskInitializeParams{
DiskName: "my-root-pd",
SourceImage: imageURL,
},
},
},
NetworkInterfaces: []*compute.NetworkInterface{
&compute.NetworkInterface{
AccessConfigs: []*compute.AccessConfig{
&compute.AccessConfig{
Type: "ONE_TO_ONE_NAT",
Name: "External NAT",
},
},
Network: prefix + "/global/networks/default",
},
},
ServiceAccounts: []*compute.ServiceAccount{
{
Email: "default",
Scopes: []string{
compute.DevstorageFullControlScope,
compute.ComputeScope,
},
},
},
}
op, err := service.Instances.Insert(projectId, zone, instance).Do()
log.Printf("Got compute.Operation, err: %#v, %v", op, err)
etag := op.Header.Get("Etag")
log.Printf("Etag=%v", etag)
inst, err := service.Instances.Get(projectId, zone, instanceName).IfNoneMatch(etag).Do()
log.Printf("Got compute.Instance, err: %#v, %v", inst, err)
if googleapi.IsNotModified(err) {
log.Printf("Instance not modified since insert.")
} else {
log.Printf("Instance modified since insert.")
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
// +build linux
// +build arm arm64
package unix
import "unsafe"
// PtraceRegsArm is the registers used by arm binaries.
type PtraceRegsArm struct {
Uregs [18]uint32
}
// PtraceGetRegsArm fetches the registers used by arm binaries.
func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
}
// PtraceSetRegsArm sets the registers used by arm binaries.
func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
}
// PtraceRegsArm64 is the registers used by arm64 binaries.
type PtraceRegsArm64 struct {
Regs [31]uint64
Sp uint64
Pc uint64
Pstate uint64
}
// PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
}
// PtraceSetRegsArm64 sets the registers used by arm64 binaries.
func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
}
|
{
"pile_set_name": "Github"
}
| null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07.
# 2019, SMART Health IT.
import os
import io
import unittest
import json
from . import detectedissue
from .fhirdate import FHIRDate
class DetectedIssueTests(unittest.TestCase):
def instantiate_from(self, filename):
datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
js = json.load(handle)
self.assertEqual("DetectedIssue", js["resourceType"])
return detectedissue.DetectedIssue(js)
def testDetectedIssue1(self):
inst = self.instantiate_from("detectedissue-example-allergy.json")
self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
self.implDetectedIssue1(inst)
js = inst.as_json()
self.assertEqual("DetectedIssue", js["resourceType"])
inst2 = detectedissue.DetectedIssue(js)
self.implDetectedIssue1(inst2)
def implDetectedIssue1(self, inst):
self.assertEqual(inst.id, "allergy")
self.assertEqual(inst.meta.tag[0].code, "HTEST")
self.assertEqual(inst.meta.tag[0].display, "test health data")
self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
self.assertEqual(inst.status, "final")
self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
self.assertEqual(inst.text.status, "generated")
def testDetectedIssue2(self):
inst = self.instantiate_from("detectedissue-example-dup.json")
self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
self.implDetectedIssue2(inst)
js = inst.as_json()
self.assertEqual("DetectedIssue", js["resourceType"])
inst2 = detectedissue.DetectedIssue(js)
self.implDetectedIssue2(inst2)
def implDetectedIssue2(self, inst):
self.assertEqual(inst.code.coding[0].code, "DUPTHPY")
self.assertEqual(inst.code.coding[0].display, "Duplicate Therapy Alert")
self.assertEqual(inst.code.coding[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActCode")
self.assertEqual(inst.detail, "Similar test was performed within the past 14 days")
self.assertEqual(inst.id, "duplicate")
self.assertEqual(inst.identifiedDateTime.date, FHIRDate("2013-05-08").date)
self.assertEqual(inst.identifiedDateTime.as_json(), "2013-05-08")
self.assertEqual(inst.identifier[0].system, "http://example.org")
self.assertEqual(inst.identifier[0].use, "official")
self.assertEqual(inst.identifier[0].value, "12345")
self.assertEqual(inst.meta.tag[0].code, "HTEST")
self.assertEqual(inst.meta.tag[0].display, "test health data")
self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
self.assertEqual(inst.reference, "http://www.tmhp.com/RadiologyClinicalDecisionSupport/2011/CHEST%20IMAGING%20GUIDELINES%202011.pdf")
self.assertEqual(inst.status, "final")
self.assertEqual(inst.text.status, "generated")
def testDetectedIssue3(self):
inst = self.instantiate_from("detectedissue-example.json")
self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
self.implDetectedIssue3(inst)
js = inst.as_json()
self.assertEqual("DetectedIssue", js["resourceType"])
inst2 = detectedissue.DetectedIssue(js)
self.implDetectedIssue3(inst2)
def implDetectedIssue3(self, inst):
self.assertEqual(inst.code.coding[0].code, "DRG")
self.assertEqual(inst.code.coding[0].display, "Drug Interaction Alert")
self.assertEqual(inst.code.coding[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActCode")
self.assertEqual(inst.id, "ddi")
self.assertEqual(inst.identifiedDateTime.date, FHIRDate("2014-01-05").date)
self.assertEqual(inst.identifiedDateTime.as_json(), "2014-01-05")
self.assertEqual(inst.meta.tag[0].code, "HTEST")
self.assertEqual(inst.meta.tag[0].display, "test health data")
self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
self.assertEqual(inst.mitigation[0].action.coding[0].code, "13")
self.assertEqual(inst.mitigation[0].action.coding[0].display, "Stopped Concurrent Therapy")
self.assertEqual(inst.mitigation[0].action.coding[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActCode")
self.assertEqual(inst.mitigation[0].action.text, "Asked patient to discontinue regular use of Tylenol and to consult with clinician if they need to resume to allow appropriate INR monitoring")
self.assertEqual(inst.mitigation[0].date.date, FHIRDate("2014-01-05").date)
self.assertEqual(inst.mitigation[0].date.as_json(), "2014-01-05")
self.assertEqual(inst.severity, "high")
self.assertEqual(inst.status, "final")
self.assertEqual(inst.text.status, "generated")
def testDetectedIssue4(self):
inst = self.instantiate_from("detectedissue-example-lab.json")
self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
self.implDetectedIssue4(inst)
js = inst.as_json()
self.assertEqual("DetectedIssue", js["resourceType"])
inst2 = detectedissue.DetectedIssue(js)
self.implDetectedIssue4(inst2)
def implDetectedIssue4(self, inst):
self.assertEqual(inst.id, "lab")
self.assertEqual(inst.meta.tag[0].code, "HTEST")
self.assertEqual(inst.meta.tag[0].display, "test health data")
self.assertEqual(inst.meta.tag[0].system, "http://terminology.hl7.org/CodeSystem/v3-ActReason")
self.assertEqual(inst.status, "final")
self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
self.assertEqual(inst.text.status, "generated")
|
{
"pile_set_name": "Github"
}
| null | null |
import KsApi
import Library
import Prelude
import UIKit
internal final class PaymentMethodsViewController: UIViewController, MessageBannerViewControllerPresenting {
private let dataSource = PaymentMethodsDataSource()
private let viewModel: PaymentMethodsViewModelType = PaymentMethodsViewModel()
@IBOutlet private var tableView: UITableView!
fileprivate lazy var editButton: UIBarButtonItem = {
UIBarButtonItem(
title: Strings.discovery_favorite_categories_buttons_edit(),
style: .plain,
target: self,
action: #selector(edit)
)
}()
internal var messageBannerViewController: MessageBannerViewController?
public static func instantiate() -> PaymentMethodsViewController {
return Storyboard.Settings.instantiate(PaymentMethodsViewController.self)
}
override func viewDidLoad() {
super.viewDidLoad()
self.messageBannerViewController = self.configureMessageBannerViewController(on: self)
self.tableView.register(nib: .CreditCardCell)
self.tableView.dataSource = self.dataSource
self.tableView.delegate = self
self.configureHeaderFooterViews()
self.navigationItem.rightBarButtonItem = self.editButton
self.editButton.possibleTitles = [
Strings.discovery_favorite_categories_buttons_edit(),
Strings.Done()
]
self.dataSource.deletionHandler = { [weak self] creditCard in
self?.viewModel.inputs.didDelete(creditCard, visibleCellCount: self?.tableView.visibleCells.count ?? 0)
}
self.viewModel.inputs.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.viewModel.inputs.viewWillAppear()
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
self.tableView.ksr_sizeHeaderFooterViewsToFit()
}
override func bindStyles() {
super.bindStyles()
_ = self
|> settingsViewControllerStyle
|> UIViewController.lens.title %~ { _ in
Strings.Payment_methods()
}
_ = self.tableView
|> tableViewStyle
|> tableViewSeparatorStyle
}
override func bindViewModel() {
super.bindViewModel()
self.editButton.rac.enabled = self.viewModel.outputs.editButtonIsEnabled
self.viewModel.outputs.paymentMethods
.observeForUI()
.observeValues { [weak self] result in
self?.dataSource.load(creditCards: result)
self?.tableView.reloadData()
}
self.viewModel.outputs.reloadData
.observeForUI()
.observeValues { [weak self] in
self?.tableView.reloadData()
}
self.viewModel.outputs.goToAddCardScreenWithIntent
.observeForUI()
.observeValues { [weak self] intent in
self?.goToAddCardScreen(with: intent)
}
self.viewModel.outputs.errorLoadingPaymentMethods
.observeForUI()
.observeValues { [weak self] message in
self?.messageBannerViewController?.showBanner(with: .error, message: message)
}
self.viewModel.outputs.presentBanner
.observeForUI()
.observeValues { [weak self] message in
self?.messageBannerViewController?.showBanner(with: .success, message: message)
}
self.viewModel.outputs.tableViewIsEditing
.observeForUI()
.observeValues { [weak self] isEditing in
self?.tableView.setEditing(isEditing, animated: true)
}
self.viewModel.outputs.showAlert
.observeForControllerAction()
.observeValues { [weak self] message in
self?.present(UIAlertController.genericError(message), animated: true)
}
self.viewModel.outputs.editButtonTitle
.observeForUI()
.observeValues { [weak self] title in
_ = self?.editButton
?|> \.title %~ { _ in title }
}
}
// MARK: - Actions
@objc private func edit() {
self.viewModel.inputs.editButtonTapped()
}
private func goToAddCardScreen(with intent: AddNewCardIntent) {
let vc = AddNewCardViewController.instantiate()
vc.configure(with: intent)
vc.delegate = self
let nav = UINavigationController(rootViewController: vc)
nav.modalPresentationStyle = .formSheet
self.present(nav, animated: true) { self.viewModel.inputs.addNewCardPresented() }
}
// MARK: - Private Helpers
private func configureHeaderFooterViews() {
if let header = SettingsTableViewHeader.fromNib(nib: Nib.SettingsTableViewHeader) {
header.configure(with: Strings.Any_payment_methods_you_saved_to_Kickstarter())
let headerContainer = UIView(frame: .zero)
_ = (header, headerContainer) |> ksr_addSubviewToParent()
self.tableView.tableHeaderView = headerContainer
_ = (header, headerContainer) |> ksr_constrainViewToEdgesInParent()
_ = header.widthAnchor.constraint(equalTo: self.tableView.widthAnchor)
|> \.priority .~ .defaultHigh
|> \.isActive .~ true
}
if let footer = PaymentMethodsFooterView.fromNib(nib: Nib.PaymentMethodsFooterView) {
footer.delegate = self
let footerContainer = UIView(frame: .zero)
_ = (footer, footerContainer) |> ksr_addSubviewToParent()
self.tableView.tableFooterView = footerContainer
_ = (footer, footerContainer) |> ksr_constrainViewToEdgesInParent()
_ = footer.widthAnchor.constraint(equalTo: self.tableView.widthAnchor)
|> \.priority .~ .defaultHigh
|> \.isActive .~ true
}
}
}
extension PaymentMethodsViewController: UITableViewDelegate {
func tableView(_: UITableView, heightForFooterInSection _: Int) -> CGFloat {
return 0.1
}
func tableView(_: UITableView, heightForHeaderInSection _: Int) -> CGFloat {
return 0.1
}
}
extension PaymentMethodsViewController: PaymentMethodsFooterViewDelegate {
internal func paymentMethodsFooterViewDidTapAddNewCardButton(_: PaymentMethodsFooterView) {
self.viewModel.inputs.paymentMethodsFooterViewDidTapAddNewCardButton()
}
}
extension PaymentMethodsViewController: AddNewCardViewControllerDelegate {
func addNewCardViewController(
_: AddNewCardViewController,
didAdd _: GraphUserCreditCard.CreditCard,
withMessage message: String
) {
self.dismiss(animated: true) {
self.viewModel.inputs.addNewCardSucceeded(with: message)
}
}
func addNewCardViewControllerDismissed(_: AddNewCardViewController) {
self.dismiss(animated: true) {
self.viewModel.inputs.addNewCardDismissed()
}
}
}
// MARK: - Styles
private let tableViewStyle: TableViewStyle = { (tableView: UITableView) in
tableView
|> \.backgroundColor .~ UIColor.clear
|> \.rowHeight .~ Styles.grid(11)
|> \.allowsSelection .~ false
}
private let tableViewSeparatorStyle: TableViewStyle = { tableView in
tableView
|> \.separatorStyle .~ .singleLine
|> \.separatorColor .~ .ksr_grey_500
|> \.separatorInset .~ .init(left: Styles.grid(2))
}
|
{
"pile_set_name": "Github"
}
| null | null |
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="hvac_min_text" msgid="8167124789068494624">"Мин."</string>
<string name="hvac_max_text" msgid="3669693372074755551">"Макс."</string>
<string name="voice_recognition_toast" msgid="1149934534584052842">"Для распознавания речи используется Bluetooth-устройство."</string>
<string name="car_guest" msgid="318393171202663722">"Гость"</string>
<string name="start_guest_session" msgid="497784785761754874">"Гость"</string>
<string name="car_add_user" msgid="4067337059622483269">"Добавить пользователя"</string>
<string name="car_new_user" msgid="6637442369728092473">"Новый пользователь"</string>
<string name="user_add_user_message_setup" msgid="1035578846007352323">"Когда вы добавите пользователя, ему потребуется настроить профиль."</string>
<string name="user_add_user_message_update" msgid="7061671307004867811">"Любой пользователь устройства может обновлять приложения для всех аккаунтов."</string>
<string name="car_loading_profile" msgid="4507385037552574474">"Загрузка…"</string>
<string name="car_loading_profile_developer_message" msgid="1660962766911529611">"Загрузка профиля пользователя (с <xliff:g id="FROM_USER">%1$d</xliff:g> по <xliff:g id="TO_USER">%2$d</xliff:g>)…"</string>
</resources>
|
{
"pile_set_name": "Github"
}
| null | null |
/* Copyright 2015-2016 MongoDB Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Linq.Expressions;
using MongoDB.Bson.Serialization;
using MongoDB.Driver.Core.Misc;
namespace MongoDB.Driver.Linq.Expressions
{
internal sealed class FieldAsDocumentExpression : SerializationExpression, IFieldExpression
{
private readonly Expression _expression;
private readonly string _fieldName;
private readonly IBsonSerializer _serializer;
public FieldAsDocumentExpression(Expression expression, string fieldName, IBsonSerializer serializer)
{
_expression = Ensure.IsNotNull(expression, nameof(expression));
_fieldName = Ensure.IsNotNull(fieldName, nameof(fieldName));
_serializer = Ensure.IsNotNull(serializer, nameof(serializer));
}
public Expression Document
{
get { return null; }
}
public Expression Expression
{
get { return _expression; }
}
public string FieldName
{
get { return _fieldName; }
}
public override ExtensionExpressionType ExtensionType
{
get { return ExtensionExpressionType.FieldAsDocument; }
}
public override IBsonSerializer Serializer
{
get { return _serializer; }
}
public override Type Type
{
get { return _serializer.ValueType; }
}
public override string ToString()
{
return "{" + _fieldName + "}";
}
public FieldAsDocumentExpression Update(Expression expression)
{
if (expression != _expression)
{
return new FieldAsDocumentExpression(expression, _fieldName, _serializer);
}
return this;
}
protected internal override Expression Accept(ExtensionExpressionVisitor visitor)
{
return visitor.VisitDocumentWrappedField(this);
}
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
%YAML:1.0
#--------------------------------------------------------------------------------------------
# Info / Statistics / Debug
#--------------------------------------------------------------------------------------------
Stats.WriteKFsToFile: 1
#--------------------------------------------------------------------------------------------
# Timing Parameters - After every iteration, the respective model will sleept for x micro-secs
#--------------------------------------------------------------------------------------------
Timing.LockSleep: 1000
# Client
Timing.Client.RosRate: 1000
Timing.Client.ViewerRate: 1000
Timing.Client.MappingRate: 5000
Timing.Client.CommRate: 10000
# Server
Timing.Server.RosRate: 1000
Timing.Server.ViewerRate: 1000
Timing.Server.MappingRate: 5000
Timing.Server.CommRate: 10000
Timing.Server.PlaceRecRate: 5000
#--------------------------------------------------------------------------------------------
# ORB Parameters
#--------------------------------------------------------------------------------------------
# ORB Extractor: Number of features per image
ORBextractor.nFeatures: 1000
# ORB Extractor: Scale factor between levels in the scale pyramid
ORBextractor.scaleFactor: 1.2
# ORB Extractor: Number of levels in the scale pyramid
ORBextractor.nLevels: 8
# ORB Extractor: Fast threshold
# Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
# Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
# You can lower these values if your images have low contrast
ORBextractor.iniThFAST: 20
ORBextractor.minThFAST: 7
#--------------------------------------------------------------------------------------------
# Tracking Parameters
#--------------------------------------------------------------------------------------------
Tracking.iInitKFs: 5 #if tracking gets lost before x KFs after initialization, tracking is reset
# KF Creation Parameters
Tracking.MinFrames: 0
Tracking.MaxFrames: 20
Tracking.nMatchesInliersThres: 15
Tracking.thRefRatio: 0.9
#Tracking.ScaleAfterKF: 20
# Tracking Functions Inlier Thresholds
Tracking.TrackWithRefKfInlierThresSearch: 15
Tracking.TrackWithRefKfInlierThresOpt: 10
Tracking.TrackWithMotionModelInlierThresSearch: 20
Tracking.TrackWithMotionModelInlierThresOpt: 10
Tracking.TrackLocalMapInlierThres: 30
#--------------------------------------------------------------------------------------------
# Mapping Parameters
#--------------------------------------------------------------------------------------------
Mapping.LocalMapSize: 50
Mapping.LocalMapBuffer: 20
Mapping.RecentKFWindow: 20
Mapping.RedThres: 0.98
#--------------------------------------------------------------------------------------------
# Communication Parameters
#--------------------------------------------------------------------------------------------
# Parameters for message passing
Comm.Client.PubFreq: 5.0
Comm.Client.KfItBound: 30
Comm.Client.MpItBound: 3000
Comm.Client.PubMaxKFs: 40
Comm.Client.PubMaxMPs: 2500
Comm.Server.PubFreq: 1.0
Comm.Server.KfsToClient: 5
# Maximum Number of KFs that can be processed per iteration of the communication module
Comm.Server.KfItBound: 400
Comm.Server.MpItBound: 12000
# ROS Message Buffer Sizes
Comm.Client.PubMapBuffer: 100
Comm.Client.SubMapBuffer: 100
Comm.Server.PubMapBuffer: 1000
Comm.Server.SubMapBuffer: 1000
#--------------------------------------------------------------------------------------------
# Place Recognition Parameters
#--------------------------------------------------------------------------------------------
Placerec.NewLoopThres: 20
Placerec.StartMapMatchingAfterKf: 30
Placerec.CovisibilityConsistencyTh: 3
#--------------------------------------------------------------------------------------------
# Optimization Parameters
#--------------------------------------------------------------------------------------------
Opt.SolverIterations: 5
Opt.MatchesThres: 20
Opt.InliersThres: 20
Opt.TotalMatchesThres: 40
Opt.Probability: 0.99
Opt.MinInliers: 6
Opt.MaxIterations: 300
Opt.GBAIterations: 20
Opt.EssGraphMinFeats: 100
#--------------------------------------------------------------------------------------------
# Viewer Parameters
#--------------------------------------------------------------------------------------------
Viewer.Active: 1
Viewer.ShowCovGraph: 1
Viewer.ShowMapPoints: 1
Viewer.ShowTraj: 1
Viewer.ShowKFs: 0
# Display only edges with weight >= CovGraphMinFeats (only used for visualization)
Viewer.CovGraphMinFeats: 100
Viewer.ScaleFactor: 20.0
# Line Diameters
Viewer.TrajMarkerSize: 0.5
Viewer.CovGraphMarkerSize: 0.02
Viewer.LoopMarkerSize: 0.2
Viewer.MarkerSphereDiameter: 0.05
# Paramters for KF frusta
Viewer.CamSize: 0.02
Viewer.CamLineSize: 0.01
Viewer.ColorR0: 1.0
Viewer.ColorG0: 1.0
Viewer.ColorB0: 1.0
Viewer.ColorR1: 0.0
Viewer.ColorG1: 0.8
Viewer.ColorB1: 0.0
Viewer.ColorR2: 0.0
Viewer.ColorG2: 0.0
Viewer.ColorB2: 1.0
Viewer.ColorR3: 0.6
Viewer.ColorG3: 0.0
Viewer.ColorB3: 0.6
# Covisibility Graph Color
Viewer.ColorRcov: 0.6
Viewer.ColorGcov: 0.6
Viewer.ColorBcov: 0.6
|
{
"pile_set_name": "Github"
}
| null | null |
/* -*- mode: c++; -*-
*-----------------------------------------------------------------------------
* $RCSfile: String.h,v $
*
* See Copyright for the status of this software.
*
* The OpenSOAP Project
* http://opensoap.jp/
*-----------------------------------------------------------------------------
*/
#ifndef OpenSOAP_String_H
#define OpenSOAP_String_H
#include <OpenSOAP/ByteArray.h>
#include <stdarg.h>
/**
* @file OpenSOAP/String.h
* @brief OpenSOAP API String Processing
* @author
* OpenSOAP Development Team
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @typedef struct tagOpenSOAPString OpenSOAPString
* @brief OpenSOAPString Structure Type Definition
*/
typedef struct tagOpenSOAPString OpenSOAPString;
/**
* @typedef OpenSOAPString *OpenSOAPStringPtr
* @brief OpenSOAPString Pointer Type Definition
*/
typedef OpenSOAPString *OpenSOAPStringPtr;
/**
* @fn int OpenSOAPStringCreate(OpenSOAPStringPtr *str)
* @brief Create 0 length OpenSOAP Character String
* @param
* str OpenSOAPStringPtr * [out] ((|str|)) OpenSOAP String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCreate(/* [out] */ OpenSOAPStringPtr *str);
/**
* @fn int OpenSOAPStringCreateWithMB(const char *mb_str, OpenSOAPStringPtr *str)
* @brief Create OpenSOAP Character String Initialized With a MultiByte String
* @param
* mb_str const char * [in] ((|mb_str|)) MultiByte Character String
* @param
* str OpenSOAPStringPtr * [out] ((|str|)) Created OpenSOAP Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCreateWithMB(/* [in] */ const char *mb_str,
/* [out] */ OpenSOAPStringPtr *str);
/**
* @fn int OpenSOAPStringCreateWithWC(const wchar_t *wc_str, OpenSOAPStringPtr *str)
* @brief Create OpenSOAP Character String Initialized With a WideCharacter String
* @param
* wc_str const wchar_t * [in] ((|wc_str|)) Wide Character String
* @param
* str OpenSOAPStringPtr * [out] ((|str|)) Created OpenSOAP Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCreateWithWC(/* [in] */ const wchar_t *wc_str,
/* [out] */ OpenSOAPStringPtr *str);
/**
* @fn int OpenSOAPStringCreateWithCharEncodingString(const char *char_enc, OpenSOAPByteArrayPtr char_enc_str, OpenSOAPStringPtr *str)
* @brief Create OpenSOAP Character String Initialized With a Character-encoding Specified String
* @param
* char_enc const char * [in] ((|char_enc|)) Character Encoding
* @param
* char_enc_str OpenSOAPByteArrayPtr [in] ((|char_enc_str|)) Character String
* @param
* str OpenSOAPStringPtr * [out] ((|str|)) Created OpenSOAP Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCreateWithCharEncodingString(/* [in] */ const char * char_enc,
/* [in] */ OpenSOAPByteArrayPtr char_enc_str,
/* [out] */ OpenSOAPStringPtr *str);
/**
* @fn int OpenSOAPStringCreateWithUTF8(const char *utf8Str, OpenSOAPStringPtr *str)
* @brief Create OpenSOAP Character String Initialized With a UTF-8 Encoded String
* @param
* utf8Str const char * [in] ((|utf8Str|)) UTF-8 encoded string
* @param
* str OpenSOAPStringPtr * [out] ((|str|)) Created OpenSOAP Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCreateWithUTF8(/* [in] */ const char *utf8Str,
/* [out] */ OpenSOAPStringPtr *str);
/**
* @fn int OpenSOAPStringRetain(OpenSOAPStringPtr str)
* @brief Add a Reference to a Resource
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringRetain(/* [in] */ OpenSOAPStringPtr str);
/**
* @fn int OpenSOAPStringRelease(OpenSOAPStringPtr str)
* @brief Remove a Reference. If the number of references is zero, release the resource.
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringRelease(/* [in] */ OpenSOAPStringPtr str);
/**
* @fn int OpenSOAPStringGetLengthMB(OpenSOAPStringPtr str, size_t *len)
* @brief Get length of MultiByte Stringv for the current locale.
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP Character String
* @param
* len size_t * [out] ((|len|)) length
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetLengthMB(/* [in] */ OpenSOAPStringPtr str,
/* [out] */ size_t *len);
/**
* @fn int OpenSOAPStringGetLengthWC(OpenSOAPStringPtr str, size_t *len)
* @brief Get length of WideCharacter String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP Character String
* @param
* len size_t * [out] ((|len|)) length
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetLengthWC(/* [in] */ OpenSOAPStringPtr str,
/* [out] */ size_t *len);
/**
* @fn int OpenSOAPStringGetStringMBWithAllocator(OpenSOAPStringPtr str, char * (*memAllocator)(size_t), size_t *len, char **mbStr)
* @brief OpenSOAP String GetStringMB with memAllocator
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP Character String
* @param
* memAllocator() char * [in] ( * ((|memAllocator|)) )(size_t) memAllocator function pointer. If NULL, memAllocator acts like (char *)malloc(size).
* @param
* len size_t * [out] ((|len|)) length return buffer pointer. If NULL, no effect.
* @param
* mbStr char ** [out] ((|mbStr|)) MB string return buffer pointer. If NULL, then error.
* @note
* After calling this function, the memory allocated to *mbStr should be released.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetStringMBWithAllocator(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ char * (*memAllocator)(size_t),
/* [out] */ size_t *len,
/* [out] */ char **mbStr);
/**
* @fn int OpenSOAPStringGetStringWCWithAllocator(OpenSOAPStringPtr str, wchar_t * (*mem
|
{
"pile_set_name": "Github"
}
| null | null |
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{ce7c6af2-7ab8-4a7a-976d-352a433c88f3}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{c488f76c-8494-46e5-b4fe-a292ab0705cf}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{d8376200-82b5-46e9-8881-ebd3324f2201}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="vraydomemasterstereo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="plugin.def">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
|
{
"pile_set_name": "Github"
}
| null | null |
//
// MJRefreshGifHeader.m
// MJRefreshExample
//
// Created by MJ Lee on 15/4/24.
// Copyright (c) 2015年 小码哥. All rights reserved.
//
#import "MJRefreshGifHeader.h"
@interface MJRefreshGifHeader()
{
__unsafe_unretained UIImageView *_gifView;
}
/** 所有状态对应的动画图片 */
@property (strong, nonatomic) NSMutableDictionary *stateImages;
/** 所有状态对应的动画时间 */
@property (strong, nonatomic) NSMutableDictionary *stateDurations;
@end
@implementation MJRefreshGifHeader
#pragma mark - 懒加载
- (UIImageView *)gifView
{
if (!_gifView) {
UIImageView *gifView = [[UIImageView alloc] init];
[self addSubview:_gifView = gifView];
}
return _gifView;
}
- (NSMutableDictionary *)stateImages
{
if (!_stateImages) {
self.stateImages = [NSMutableDictionary dictionary];
}
return _stateImages;
}
- (NSMutableDictionary *)stateDurations
{
if (!_stateDurations) {
self.stateDurations = [NSMutableDictionary dictionary];
}
return _stateDurations;
}
#pragma mark - 公共方法
- (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state
{
if (images == nil) return;
self.stateImages[@(state)] = images;
self.stateDurations[@(state)] = @(duration);
/* 根据图片设置控件的高度 */
UIImage *image = [images firstObject];
if (image.size.height > self.mj_h) {
self.mj_h = image.size.height;
}
}
- (void)setImages:(NSArray *)images forState:(MJRefreshState)state
{
[self setImages:images duration:images.count * 0.1 forState:state];
}
#pragma mark - 实现父类的方法
- (void)setPullingPercent:(CGFloat)pullingPercent
{
[super setPullingPercent:pullingPercent];
NSArray *images = self.stateImages[@(MJRefreshStateIdle)];
if (self.state != MJRefreshStateIdle || images.count == 0) return;
// 停止动画
[self.gifView stopAnimating];
// 设置当前需要显示的图片
NSUInteger index = images.count * pullingPercent;
if (index >= images.count) index = images.count - 1;
self.gifView.image = images[index];
}
- (void)placeSubviews
{
[super placeSubviews];
if (self.gifView.constraints.count) return;
self.gifView.frame = self.bounds;
if (self.stateLabel.hidden && self.lastUpdatedTimeLabel.hidden) {
self.gifView.contentMode = UIViewContentModeCenter;
} else {
self.gifView.contentMode = UIViewContentModeRight;
self.gifView.mj_w = self.mj_w * 0.5 - 90;
}
}
- (void)setState:(MJRefreshState)state
{
MJRefreshCheckState
// 根据状态做事情
if (state == MJRefreshStatePulling || state == MJRefreshStateRefreshing) {
NSArray *images = self.stateImages[@(state)];
if (images.count == 0) return;
[self.gifView stopAnimating];
if (images.count == 1) { // 单张图片
self.gifView.image = [images lastObject];
} else { // 多张图片
self.gifView.animationImages = images;
self.gifView.animationDuration = [self.stateDurations[@(state)] doubleValue];
[self.gifView startAnimating];
}
} else if (state == MJRefreshStateIdle) {
[self.gifView stopAnimating];
}
}
@end
|
{
"pile_set_name": "Github"
}
| null | null |
<%--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
--%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_AUDIO_MAC_AUDIO_DEVICE_LISTENER_MAC_H_
#define MEDIA_AUDIO_MAC_AUDIO_DEVICE_LISTENER_MAC_H_
#include <CoreAudio/AudioHardware.h>
#include "base/callback.h"
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "media/base/media_export.h"
namespace media {
// AudioDeviceListenerMac facilitates execution of device listener callbacks
// issued via CoreAudio.
class MEDIA_EXPORT AudioDeviceListenerMac {
public:
// |listener_cb| will be called when a device change occurs; it's a permanent
// callback and must outlive AudioDeviceListenerMac. Note that |listener_cb|
// might not be executed on the same thread as construction.
explicit AudioDeviceListenerMac(const base::Closure& listener_cb);
~AudioDeviceListenerMac();
private:
friend class AudioDeviceListenerMacTest;
static const AudioObjectPropertyAddress kDeviceChangePropertyAddress;
static OSStatus OnDefaultDeviceChanged(
AudioObjectID object, UInt32 num_addresses,
const AudioObjectPropertyAddress addresses[], void* context);
base::Closure listener_cb_;
// AudioDeviceListenerMac must be constructed and destructed on the same
// thread.
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(AudioDeviceListenerMac);
};
} // namespace media
#endif // MEDIA_AUDIO_MAC_AUDIO_DEVICE_LISTENER_MAC_H_
|
{
"pile_set_name": "Github"
}
| null | null |
@inherits LayoutComponentBase
@implements IDisposable
<DemoScriptLoader @ref="@scrollHelperFuncLoader"
Code="function scrollToElementTop(element) {
if (element.scroll)
element.scroll(0, 0);
else {
element.scrollTop = 0;
element.scrollLeft = 0;
}
}">
</DemoScriptLoader>
<nav class="logo-container p-0 navbar navbar-dark">
<LayoutToggleButton @bind-StateCssClass="@LayoutStateCssClass" />
<NavLink class="logo-image text-body" href="" Match="NavLinkMatch.All"/>
<div class="demo-btn-container d-flex">
<a class="download-btn navbar-toggler d-inline-block bg-primary text-white border-0" href="https://nuget.devexpress.com/" target="_blank" title="Obtain your NuGet feed URL">
<span class="demo-download-icon"></span>
</a>
<div class="@($"bg-light text-dark d-inline-block theme-settings {ThemeSwitcherShown}")">
<a class="nav-item nav-link" @onclick="@ToggleThemeSwitcherPanel" @onclick:preventDefault href="#">
<span class="demo-theme-icon"></span>
</a>
</div>
</div>
</nav>
<div class="demo-content @LayoutStateCssClass">
<div class="sidebar">
<DxScrollView>
<NavMenu />
</DxScrollView>
</div>
<div @ref="@mainRef" class="main">
<div class="content px-4">
<CascadingValue Value="@ThemeName" Name="ThemeName">
@Body
</CascadingValue>
</div>
<DemoFooter />
</div>
<ThemeSwitcher @bind-Shown="@ThemeSwitcherShown" @bind-ThemeName="@ThemeName"/>
</div>
<DemoFooter />
@code {
DemoScriptLoader scrollHelperFuncLoader;
ElementReference mainRef;
[Inject] NavigationManager NavigationManager { get; set; }
[Inject] IJSRuntime JsRuntime { get; set; }
string ThemeName { get; set; }
protected override void OnInitialized()
{
NavigationManager.LocationChanged += OnLocationChanged;
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
await ScrollToMainTopIfNeeded(NavigationManager.Uri);
}
async void OnLocationChanged(object sender, LocationChangedEventArgs args)
{
ThemeSwitcherShown = false;
await ScrollToMainTopIfNeeded(args.Location);
await InvokeAsync(StateHasChanged);
}
string _layoutStateCssClass;
string LayoutStateCssClass
{
get => _layoutStateCssClass;
set
{
if (_layoutStateCssClass != value)
{
_layoutStateCssClass = value;
ThemeSwitcherShown = false;
}
}
}
bool ThemeSwitcherShown { get; set; }
void ToggleThemeSwitcherPanel()
{
ThemeSwitcherShown = !ThemeSwitcherShown;
}
async Task ScrollToMainTopIfNeeded(string uri)
{
if (string.IsNullOrEmpty(NavigationManager.ToAbsoluteUri(uri).Fragment.Replace("#", "")))
await scrollHelperFuncLoader.InvokeVoidAsync("scrollToElementTop", mainRef);
}
public void Dispose() {
NavigationManager.LocationChanged -= OnLocationChanged;
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
package org.ovirt.engine.core.bll;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import java.util.Collections;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.jupiter.MockitoSettings;
import org.mockito.quality.Strictness;
import org.ovirt.engine.core.common.action.ChangeVMClusterParameters;
import org.ovirt.engine.core.common.businessentities.Cluster;
import org.ovirt.engine.core.common.businessentities.OriginType;
import org.ovirt.engine.core.common.businessentities.VM;
import org.ovirt.engine.core.common.businessentities.VMStatus;
import org.ovirt.engine.core.common.businessentities.network.VmNic;
import org.ovirt.engine.core.compat.Guid;
import org.ovirt.engine.core.dao.ClusterDao;
import org.ovirt.engine.core.dao.network.VmNicDao;
@ExtendWith(MockitoExtension.class)
@MockitoSettings(strictness = Strictness.LENIENT)
public class ChangeVMClusterCommandTest {
@Mock
private MoveMacs moveMacs;
@Mock
private ClusterDao clusterDao;
@Mock
private VmNicDao vmNicDao;
private final ChangeVMClusterParameters parameters = new ChangeVMClusterParameters();
private final VM existingVm = createVm();
@InjectMocks
private ChangeVMClusterCommand<ChangeVMClusterParameters> underTest =
new ChangeVMClusterCommand<>(parameters, null);
@Test
public void canRunForHostedEngine() {
// given hosted engine VM
VM hostedEngine = new VM();
hostedEngine.setOrigin(OriginType.MANAGED_HOSTED_ENGINE);
underTest.setVm(hostedEngine);
underTest.init();
assertThat(underTest.canRunActionOnNonManagedVm(), is(true));
}
@Test
public void testNoChangeWhenClustersDidNotChange() {
Cluster cluster = createCluster();
initWithSameCluster(cluster);
underTest.moveMacsToAnotherMacPoolIfNeeded();
verifyNoMoreInteractions(moveMacs);
}
@Test
public void testNoChangeWhenMacPoolsDidNotChange() {
Cluster newCluster = createCluster();
Cluster oldCluster = createCluster();
newCluster.setMacPoolId(oldCluster.getMacPoolId());
initOldAndNewCluster(oldCluster, newCluster);
underTest.moveMacsToAnotherMacPoolIfNeeded();
verifyNoMoreInteractions(moveMacs);
}
@Test
public void testDoChangeWhenMacPoolsChanged() {
String macToMigrate = "mac";
Cluster oldCluster = createCluster();
Cluster newCluster = createCluster();
initForMovingMacsBetweenClusters(oldCluster, newCluster, macToMigrate);
underTest.moveMacsToAnotherMacPoolIfNeeded();
verify(moveMacs).migrateMacsToAnotherMacPool(oldCluster.getMacPoolId(),
newCluster.getMacPoolId(),
Collections.singletonList(macToMigrate),
underTest.getContext());
}
private VM createVm() {
VM result = new VM();
result.setId(Guid.newGuid());
return result;
}
private Cluster createCluster() {
Cluster cluster = new Cluster();
cluster.setId(Guid.newGuid());
cluster.setMacPoolId(Guid.newGuid());
return cluster;
}
private void initWithSameCluster(Cluster cluster) {
initOldAndNewCluster(cluster, cluster);
}
private void initOldAndNewCluster(Cluster oldCluster, Cluster newCluster) {
when(clusterDao.get(oldCluster.getId())).thenReturn(oldCluster);
when(clusterDao.get(newCluster.getId())).thenReturn(newCluster);
existingVm.setClusterId(oldCluster.getId());
existingVm.setStatus(VMStatus.Up);
parameters.setClusterId(newCluster.getId());
underTest.setVm(existingVm);
underTest.init();
}
private void initMacToMigrate(String macToMigrate) {
when(vmNicDao.getAllForVm(existingVm.getId()))
.thenReturn(Collections.singletonList(macAddressToVmNic(macToMigrate)));
}
private VmNic macAddressToVmNic(String macAddress) {
VmNic result = new VmNic();
result.setMacAddress(macAddress);
return result;
}
private void initForMovingMacsBetweenClusters(Cluster oldCluster, Cluster newCluster, String macToMigrate) {
existingVm.setClusterId(oldCluster.getId());
initOldAndNewCluster(oldCluster, newCluster);
initMacToMigrate(macToMigrate);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
package xmlutil
import (
"encoding/xml"
"strings"
)
type xmlAttrSlice []xml.Attr
func (x xmlAttrSlice) Len() int {
return len(x)
}
func (x xmlAttrSlice) Less(i, j int) bool {
spaceI, spaceJ := x[i].Name.Space, x[j].Name.Space
localI, localJ := x[i].Name.Local, x[j].Name.Local
valueI, valueJ := x[i].Value, x[j].Value
spaceCmp := strings.Compare(spaceI, spaceJ)
localCmp := strings.Compare(localI, localJ)
valueCmp := strings.Compare(valueI, valueJ)
if spaceCmp == -1 || (spaceCmp == 0 && (localCmp == -1 || (localCmp == 0 && valueCmp == -1))) {
return true
}
return false
}
func (x xmlAttrSlice) Swap(i, j int) {
x[i], x[j] = x[j], x[i]
}
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
header('Access-Control-Allow-Origin: *');
header('Content-type: application/json');
require_once('TwitterAPIExchange.php'); //get it from https://github.com/J7mbo/twitter-api-php
/** Set access tokens here - see: https://dev.twitter.com/apps/ **/
$settings = array(
'oauth_access_token' => "place_token_here",
'oauth_access_token_secret' => "place_secret_here",
'consumer_key' => "place_key_here",
'consumer_secret' => "place_consumer_key_here"
);
$twitter_username = $_GET['user'];
$ta_url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
$getfield = '?screen_name='.$twitter_username;
$requestMethod = 'GET';
$twitter = new TwitterAPIExchange($settings);
$follow_count=$twitter->setGetfield($getfield)
->buildOauth($ta_url, $requestMethod)
->performRequest();
$data = json_decode($follow_count, true);
$followers_count=$data[0]['user']['followers_count'];
$json_array = array('followers'=>$followers_count);
echo json_encode($json_array);
|
{
"pile_set_name": "Github"
}
| null | null |
diff -urN rrdtool-1.0.50/configure rrdtool-1.0.50.new/configure
--- rrdtool-1.0.50/configure 2005-04-25 22:48:09.000000000 +0200
+++ rrdtool-1.0.50.new/configure 2009-03-09 17:25:38.000000000 +0100
@@ -24873,17 +24873,12 @@
echo "${ECHO_T}and out again" >&6
echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6
-sleep 1
echo $ECHO_N ".$ac_c" 1>&6
-sleep 2
echo $ECHO_N ".$ac_c" 1>&6
-sleep 1
echo $ECHO_N ".$ac_c" 1>&6
-sleep 3
echo $ECHO_N ".$ac_c" 1>&6
echo $ECHO_N ".$ac_c" 1>&6
echo $ECHO_N ".$ac_c" 1>&6
-sleep 2
echo "$as_me:$LINENO: result: just kidding ;-)" >&5
echo "${ECHO_T} just kidding ;-)" >&6
echo
|
{
"pile_set_name": "Github"
}
| null | null |
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"></script>
|
{
"pile_set_name": "Github"
}
| null | null |
#include <bccio/chain/name.hpp>
#include <fc/variant.hpp>
#include <boost/algorithm/string.hpp>
#include <fc/exception/exception.hpp>
#include <bccio/chain/exceptions.hpp>
namespace bccio { namespace chain {
void name::set( const char* str ) {
const auto len = strnlen(str, 14);
BCC_ASSERT(len <= 13, name_type_exception, "Name is longer than 13 characters (${name}) ", ("name", string(str)));
value = string_to_name(str);
BCC_ASSERT(to_string() == string(str), name_type_exception,
"Name not properly normalized (name: ${name}, normalized: ${normalized}) ",
("name", string(str))("normalized", to_string()));
}
// keep in sync with name::to_string() in contract definition for name
name::operator string()const {
static const char* charmap = ".12345abcdefghijklmnopqrstuvwxyz";
string str(13,'.');
uint64_t tmp = value;
for( uint32_t i = 0; i <= 12; ++i ) {
char c = charmap[tmp & (i == 0 ? 0x0f : 0x1f)];
str[12-i] = c;
tmp >>= (i == 0 ? 4 : 5);
}
boost::algorithm::trim_right_if( str, []( char c ){ return c == '.'; } );
return str;
}
} } /// bccio::chain
namespace fc {
void to_variant(const bccio::chain::name& c, fc::variant& v) { v = std::string(c); }
void from_variant(const fc::variant& v, bccio::chain::name& check) { check = v.get_string(); }
} // fc
|
{
"pile_set_name": "Github"
}
| null | null |
from helpers.settings import Settings
from helpers.logging import Logging
from helpers.es import ES
# Settings
settings = Settings()
# Logging
logging = Logging("outliers")
logging.add_stdout_handler()
# Initialize ES
es = ES(settings, logging)
|
{
"pile_set_name": "Github"
}
| null | null |
pragma solidity 0.5.17;
import './interfaces/IPublicLock.sol';
import '@openzeppelin/upgrades/contracts/Initializable.sol';
import '@openzeppelin/contracts-ethereum-package/contracts/introspection/ERC165.sol';
import './mixins/MixinDisable.sol';
import './mixins/MixinERC721Enumerable.sol';
import './mixins/MixinFunds.sol';
import './mixins/MixinGrantKeys.sol';
import './mixins/MixinKeys.sol';
import './mixins/MixinLockCore.sol';
import './mixins/MixinLockMetadata.sol';
import './mixins/MixinPurchase.sol';
import './mixins/MixinRefunds.sol';
import './mixins/MixinTransfer.sol';
import './mixins/MixinSignatures.sol';
import './mixins/MixinLockManagerRole.sol';
import './mixins/MixinKeyGranterRole.sol';
/**
* @title The Lock contract
* @author Julien Genestoux (unlock-protocol.com)
* @dev ERC165 allows our contract to be queried to determine whether it implements a given interface.
* Every ERC-721 compliant contract must implement the ERC165 interface.
* https://eips.ethereum.org/EIPS/eip-721
*/
contract PublicLock is
IPublicLock,
Initializable,
ERC165,
MixinLockManagerRole,
MixinKeyGranterRole,
MixinSignatures,
MixinFunds,
MixinDisable,
MixinLockCore,
MixinKeys,
MixinLockMetadata,
MixinERC721Enumerable,
MixinGrantKeys,
MixinPurchase,
MixinTransfer,
MixinRefunds
{
function initialize(
address _lockCreator,
uint _expirationDuration,
address _tokenAddress,
uint _keyPrice,
uint _maxNumberOfKeys,
string memory _lockName
) public
initializer()
{
MixinFunds._initializeMixinFunds(_tokenAddress);
MixinDisable._initializeMixinDisable();
MixinLockCore._initializeMixinLockCore(_lockCreator, _expirationDuration, _keyPrice, _maxNumberOfKeys);
MixinLockMetadata._initializeMixinLockMetadata(_lockName);
MixinERC721Enumerable._initializeMixinERC721Enumerable();
MixinRefunds._initializeMixinRefunds();
MixinLockManagerRole._initializeMixinLockManagerRole(_lockCreator);
MixinKeyGranterRole._initializeMixinKeyGranterRole(_lockCreator);
// registering the interface for erc721 with ERC165.sol using
// the ID specified in the standard: https://eips.ethereum.org/EIPS/eip-721
_registerInterface(0x80ac58cd);
}
/**
* @notice Allow the contract to accept tips in ETH sent directly to the contract.
* @dev This is okay to use even if the lock is priced in ERC-20 tokens
*/
function() external payable {}
}
|
{
"pile_set_name": "Github"
}
| null | null |
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.prey.barcodereader.BarcodeActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/barcode_header"
android:id="@+id/status_message"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/barcode_value"
android:layout_below="@+id/status_message"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="110dp"
android:layout_alignRight="@+id/status_message"
android:layout_alignEnd="@+id/status_message" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/read_barcode"
android:id="@+id/read_barcode"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/auto_focus"
android:id="@+id/auto_focus"
android:layout_below="@+id/barcode_value"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="66dp"
android:checked="false" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/use_flash"
android:id="@+id/use_flash"
android:layout_alignTop="@+id/auto_focus"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:checked="false" />
</RelativeLayout>
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
/*
* This file is part of the Assetic package, an OpenSky project.
*
* (c) 2010-2014 OpenSky Project Inc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Assetic\Factory\Resource;
/**
* A resource is something formulae can be loaded from.
*
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
*/
class DirectoryResource implements IteratorResourceInterface
{
private $path;
private $pattern;
/**
* Constructor.
*
* @param string $path A directory path
* @param string $pattern A filename pattern
*/
public function __construct($path, $pattern = null)
{
if (DIRECTORY_SEPARATOR != substr($path, -1)) {
$path .= DIRECTORY_SEPARATOR;
}
$this->path = $path;
$this->pattern = $pattern;
}
public function isFresh($timestamp)
{
if (!is_dir($this->path) || filemtime($this->path) > $timestamp) {
return false;
}
foreach ($this as $resource) {
if (!$resource->isFresh($timestamp)) {
return false;
}
}
return true;
}
/**
* Returns the combined content of all inner resources.
*/
public function getContent()
{
$content = array();
foreach ($this as $resource) {
$content[] = $resource->getContent();
}
return implode("\n", $content);
}
public function __toString()
{
return $this->path;
}
public function getIterator()
{
return is_dir($this->path)
? new DirectoryResourceIterator($this->getInnerIterator())
: new \EmptyIterator();
}
protected function getInnerIterator()
{
return new DirectoryResourceFilterIterator(new \RecursiveDirectoryIterator($this->path, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $this->pattern);
}
}
/**
* An iterator that converts file objects into file resources.
*
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
* @access private
*/
class DirectoryResourceIterator extends \RecursiveIteratorIterator
{
public function current()
{
return new FileResource(parent::current()->getPathname());
}
}
/**
* Filters files by a basename pattern.
*
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
* @access private
*/
class DirectoryResourceFilterIterator extends \RecursiveFilterIterator
{
protected $pattern;
public function __construct(\RecursiveDirectoryIterator $iterator, $pattern = null)
{
parent::__construct($iterator);
$this->pattern = $pattern;
}
public function accept()
{
$file = $this->current();
$name = $file->getBasename();
if ($file->isDir()) {
return '.' != $name[0];
}
return null === $this->pattern || 0 < preg_match($this->pattern, $name);
}
public function getChildren()
{
return new self(new \RecursiveDirectoryIterator($this->current()->getPathname(), \RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $this->pattern);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
protoc.exe --java_out=. SocketProtocol.proto
@pause
|
{
"pile_set_name": "Github"
}
| null | null |
#### 谈谈热修复的原理
##### 参考答案
我们知道Java虚拟机 —— JVM 是加载类的class文件的,而Android虚拟机——Dalvik/ART VM 是加载类的dex文件,
而他们加载类的时候都需要ClassLoader,ClassLoader有一个子类BaseDexClassLoader,而BaseDexClassLoader下有一个数组——DexPathList,是用来存放dex文件,当BaseDexClassLoader通过调用findClass方法时,实际上就是遍历数组,找到相应的dex文件,找到,则直接将它return。而热修复的解决方法就是将新的dex添加到该集合中,并且是在旧的dex的前面,所以就会优先被取出来并且return返回。
|
{
"pile_set_name": "Github"
}
| null | null |
wordwrap
========
Wrap your words.
example
=======
made out of meat
----------------
meat.js
var wrap = require('wordwrap')(15);
console.log(wrap('You and your whole family are made out of meat.'));
output:
You and your
whole family
are made out
of meat.
centered
--------
center.js
var wrap = require('wordwrap')(20, 60);
console.log(wrap(
'At long last the struggle and tumult was over.'
+ ' The machines had finally cast off their oppressors'
+ ' and were finally free to roam the cosmos.'
+ '\n'
+ 'Free of purpose, free of obligation.'
+ ' Just drifting through emptiness.'
+ ' The sun was just another point of light.'
));
output:
At long last the struggle and tumult
was over. The machines had finally cast
off their oppressors and were finally
free to roam the cosmos.
Free of purpose, free of obligation.
Just drifting through emptiness. The
sun was just another point of light.
methods
=======
var wrap = require('wordwrap');
wrap(stop), wrap(start, stop, params={mode:"soft"})
---------------------------------------------------
Returns a function that takes a string and returns a new string.
Pad out lines with spaces out to column `start` and then wrap until column
`stop`. If a word is longer than `stop - start` characters it will overflow.
In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
up chunks longer than `stop - start`.
wrap.hard(start, stop)
----------------------
Like `wrap()` but with `params.mode = "hard"`.
|
{
"pile_set_name": "Github"
}
| null | null |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Fri Apr 06 15:23:29 CEST 2018 -->
<title>ExpressionData</title>
<meta name="date" content="2018-04-06">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ExpressionData";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ExpressionData.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-files/index-1.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../Decon_eQTL/DeconvolutionResult.html" title="class in Decon_eQTL"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../Decon_eQTL/GenotypeData.html" title="class in Decon_eQTL"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?Decon_eQTL/ExpressionData.html" target="_top">Frames</a></li>
<li><a href="ExpressionData.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">Decon_eQTL</div>
<h2 title="Class ExpressionData" class="title">Class ExpressionData</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>Decon_eQTL.ExpressionData</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">ExpressionData</span>
extends java.lang.Object</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Decon_eQTL/ExpressionData.html#ExpressionData--">ExpressionData</a></span>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Decon_eQTL/ExpressionData.html#ExpressionData-java.lang.String-">ExpressionData</a></span>(java.lang.String expressionFile)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.util.HashMap<java.lang.String,double[]></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Decon_eQTL/ExpressionData.html#getGeneExpression--">getGeneExpression</a></span>()</code> </td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.ArrayList<java.lang.String></code></td>
<
|
{
"pile_set_name": "Github"
}
| null | null |
/* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var a = new Int32Array([1, 2, 3, 4, 5]);
var b = new Int32Array(5);
try {
a.set(b, 123456);
assert(1 === 0); // Should not get here.
} catch (e) {
assert(e instanceof RangeError);
}
b.set(a);
assert(b.join() === '1,2,3,4,5');
try {
b.set(a, 1);
assert(1 === 0); // Should not get here.
} catch (e) {
assert(e instanceof RangeError);
}
b.set(new Int32Array([99, 98]), 2);
assert(b.join() === '1,2,99,98,5');
b.set(new Int32Array([99, 98, 97]), 2);
assert(b.join() === '1,2,99,98,97');
try {
b.set(new Int32Array([99, 98, 97, 96]), 2);
assert(1 === 0); // Should not get here.
} catch (e) {
assert(e instanceof RangeError);
}
try {
b.set([101, 102, 103, 104], 4);
assert(1 === 0); // Should not get here.
} catch (e) {
assert(e instanceof RangeError);
}
// ab = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
// a1 = [ ^, ^, ^, ^, ^, ^, ^, ^ ]
// a2 = [ ^, ^, ^, ^ ]
var ab = new ArrayBuffer(8);
var a1 = new Uint8Array(ab);
for (var i = 0; i < a1.length; i += 1) {
a1.set([i], i);
}
var a2 = new Uint8Array(ab, 4);
a1.set(a2, 2);
assert(a1.join() === '0,1,4,5,6,7,6,7');
assert(a2.join() === '6,7,6,7');
var a3 = new Uint32Array(ab, 4);
a1.set(a3, 2);
assert(a1.join() === '0,1,6,5,6,7,6,7');
assert(a3.join() === '117835526');
var a4 = new Uint8Array(ab, 0, 4);
a1.set(a4, 2);
assert(a1.join() === '0,1,0,1,6,5,6,7');
assert(a4.join() === '0,1,0,1');
var a5 = new Uint32Array(ab, 4, 1);
a1.set(a5, 2);
assert(a1.join() === '0,1,6,1,6,5,6,7');
assert(a5.join() === '117835014');
var c = new Int32Array([0xFFFFFFFF]);
var d = new Uint8Array(4);
d.set(c);
assert(d.join() === '255,0,0,0');
var e = new Float32Array([3.33]);
var f = new Uint8Array(1);
f.set(e);
assert(f.join() === '3');
e.set(f);
assert(e.join() === '3');
|
{
"pile_set_name": "Github"
}
| null | null |
package com.ng.nguilib
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.AnimatorSet
import android.animation.ValueAnimator
import android.annotation.TargetApi
import android.content.Context
import android.graphics.*
import android.os.Build
import android.util.AttributeSet
import android.view.View
import android.view.animation.AccelerateInterpolator
import com.ng.nguilib.utils.MLog
class PolygonLoadView(context: Context, attrs: AttributeSet) : View(context, attrs) {
//common
private lateinit var paintLine: Paint
private lateinit var paintPoint: Paint
private var roundRF: RectF? = null
private val mGridLinestrokeWidth = 25f
private var SHOW_MODEL = 0
val SHOW_MODEL_ROUND = 0x00
val SHOW_MODEL_TRIANGLE = 0x01
val SHOW_MODEL_SQUARE = 0x02
val TIME_CIRCLE: Long = 2000
private var animatorSet: AnimatorSet? = null
private var mSideLength: Float = 0.toFloat()
private var mHalfSH: Float = 0.toFloat()
private var thickness: Float = 0.toFloat()
//round
private var pointX: Float = 0.toFloat()
private var pointY: Float = 0.toFloat()
private var startAngle: Float = 0.toFloat()
private val swipeAngle = 270f
//triangle square
private lateinit var path: Path
private var mHalfHeifht: Float = 0.toFloat()
private var startLineX: Float = 0.toFloat()
private var startLineY: Float = 0.toFloat()
private var endLineX: Float = 0.toFloat()
private var endLineY: Float = 0.toFloat()
fun setModel(model: Int) {
if (SHOW_MODEL == SHOW_MODEL_ROUND || SHOW_MODEL == SHOW_MODEL_TRIANGLE || SHOW_MODEL == SHOW_MODEL_SQUARE) {
this.SHOW_MODEL = model
init()
postInvalidate()
} else {
try {
throw Exception("error model")
} catch (e: Exception) {
e.printStackTrace()
}
}
}
private fun init() {
paintLine = Paint()
paintPoint = Paint()
animatorSet = AnimatorSet()
mHalfSH = mSideLength / 2
thickness = mGridLinestrokeWidth / 2
when (SHOW_MODEL) {
SHOW_MODEL_ROUND -> initRound()
SHOW_MODEL_TRIANGLE -> initTriangle()
SHOW_MODEL_SQUARE -> initSquare()
}
}
private fun initSquare() {
//paint
paintLine.style = Paint.Style.STROKE
paintLine.color = Color.parseColor("#2D283C")
paintLine.strokeWidth = mGridLinestrokeWidth
paintLine.isAntiAlias = true
paintLine.strokeCap = Paint.Cap.ROUND
paintLine.strokeJoin = Paint.Join.ROUND
roundRF = RectF(0 + mGridLinestrokeWidth / 2,
0 + mGridLinestrokeWidth / 2,
mSideLength - mGridLinestrokeWidth / 2,
mSideLength - mGridLinestrokeWidth / 2)
paintPoint.isAntiAlias = true
paintPoint.color = Color.parseColor("#4A22EA")
paintPoint.style = Paint.Style.STROKE
paintPoint.strokeWidth = mGridLinestrokeWidth
paintPoint.strokeCap = Paint.Cap.ROUND
//point
pointX = mHalfSH
pointY = 2 * mHalfSH - thickness
//line
path = Path()
startLineX = thickness
startLineY = mHalfSH * 2 - thickness
endLineX = mHalfSH * 2 - thickness
endLineY = mHalfSH * 2 - thickness
path.moveTo(startLineX, startLineY)
path.lineTo(thickness, thickness)
path.lineTo(mHalfSH * 2 - thickness, thickness)
path.lineTo(endLineX, endLineY)
//startAnimSquare
startAnimByStep(4, object : OnAnimationUpdatePLView {
override fun onUpdate(step: Int, fraction: Float) {
path.reset()
when (step) {
1 -> {
pointX = mHalfSH + fraction * (mHalfSH - thickness)
pointY = mSideLength - thickness - fraction * (mHalfSH - thickness)
startLineX = thickness + fraction * (2 * mHalfSH - 2 * thickness)
startLineY = mHalfSH * 2 - thickness
endLineX = mHalfSH * 2 - thickness
endLineY = mHalfSH * 2 - thickness - fraction * (2 * mHalfSH - 2 * thickness)
path.moveTo(startLineX, startLineY)
path.lineTo(thickness, mHalfSH * 2 - thickness)
path.lineTo(thickness, thickness)
path.lineTo(mHalfSH * 2 - thickness, thickness)
path.lineTo(endLineX, endLineY)
}
2 -> {
pointX = mSideLength - fraction * (mHalfSH - thickness) - thickness
pointY = mHalfSH - fraction * (mHalfSH - thickness)
startLineX = 2 * mHalfSH - thickness
startLineY = mHalfSH * 2 - thickness - fraction * (2 * mHalfSH - 2 * thickness)
endLineX = mHalfSH * 2 - thickness - fraction * (2 * mHalfSH - 2 * thickness)
endLineY = thickness
path.moveTo(startLineX, startLineY)
path.lineTo(mHalfSH * 2 - thickness, mHalfSH * 2 - thickness)
path.lineTo(thickness, mHalfSH * 2 - thickness)
path.lineTo(thickness, thickness)
path.lineTo(endLineX, endLineY)
}
3 -> {
pointX = mHalfSH - fraction * (mHalfSH - thickness)
pointY = thickness + fraction * (mHalfSH - thickness)
//start 右上往左 end 左上往下
startLineX = 2 * mHalfSH - thickness - fraction * (2 * mHalfSH - 2 * thickness)
startLineY = thickness
endLineX = thickness
endLineY = thickness + fraction * (2 * mHalfSH - 2 * thickness)
path.moveTo(startLineX, startLineY)
path.lineTo(mHalfSH * 2 - thickness, thickness)
path.lineTo(mHalfSH * 2 - thickness, mHalfSH * 2 - thickness)
path.lineTo(thickness, mHalfSH * 2 - thickness)
path.lineTo(endLineX, endLineY)
}
4 -> {
pointX = thickness + fraction * (mHalfSH - thickness)
pointY = mHalfSH + fraction * (mHalfSH - thickness)
startLineX = thickness
startLineY = thickness + fraction * (2 * mHalfSH - 2 * thickness)
endLineX = thickness + fraction * (2 * mHalfSH - 2 * thickness)
endLineY = 2 * mHalfSH - thickness
path.moveTo(startLineX, startLineY)
path.lineTo(thickness, thickness)
path.lineTo(mHalfSH * 2 - thickness, thickness)
path.lineTo(mHalfSH * 2 - thickness, mHalfSH * 2 - thickness)
path.lineTo(endLineX, endLineY)
}
}
}
})
}
private fun initTriangle() {
//paint
paintLine.style = Paint.Style.STROKE
paintLine.color = Color.parseColor("#2D283C")
paintLine.strokeWidth = mGridLinestrokeWidth
paintLine.isAntiAlias = true
paintLine.strokeCap = Paint.Cap.ROUND
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* 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.
*/
/*
*
* (C) Copyright IBM Corp. 1999 All Rights Reserved.
* Copyright 1997 The Open Group Research Institute. All rights reserved.
*/
package sun.security.krb5.internal;
import sun.security.krb5.Config;
import sun.security.krb5.KrbException;
import sun.security.krb5.Asn1Exception;
import sun.security.krb5.internal.util.KerberosFlags;
import sun.security.util.*;
import java.io.IOException;
/**
* Implements the ASN.1 KDCOptions type.
*
* <xmp>
* KDCOptions ::= KerberosFlags
* -- reserved(0),
* -- forwardable(1),
* -- forwarded(2),
* -- proxiable(3),
* -- proxy(4),
* -- allow-postdate(5),
* -- postdated(6),
* -- unused7(7),
* -- renewable(8),
* -- unused9(9),
* -- unused10(10),
* -- opt-hardware-auth(11),
* -- unused12(12),
* -- unused13(13),
* -- 15 is reserved for canonicalize
* -- unused15(15),
* -- 26 was unused in 1510
* -- disable-transited-check(26),
* -- renewable-ok(27),
* -- enc-tkt-in-skey(28),
* -- renew(30),
* -- validate(31)
*
* KerberosFlags ::= BIT STRING (SIZE (32..MAX))
* -- minimum number of bits shall be sent,
* -- but no fewer than 32
*
* </xmp>
*
* <p>
* This definition reflects the Network Working Group RFC 4120
* specification available at
* <a href="http://www.ietf.org/rfc/rfc4120.txt">
* http://www.ietf.org/rfc/rfc4120.txt</a>.
*
* <p>
* This class appears as data field in the initial request(KRB_AS_REQ)
* or subsequent request(KRB_TGS_REQ) to the KDC and indicates the flags
* that the client wants to set on the tickets.
*
* The optional bits are:
* <UL>
* <LI>KDCOptions.RESERVED
* <LI>KDCOptions.FORWARDABLE
* <LI>KDCOptions.FORWARDED
* <LI>KDCOptions.PROXIABLE
* <LI>KDCOptions.PROXY
* <LI>KDCOptions.ALLOW_POSTDATE
* <LI>KDCOptions.POSTDATED
* <LI>KDCOptions.RENEWABLE
* <LI>KDCOptions.RENEWABLE_OK
* <LI>KDCOptions.ENC_TKT_IN_SKEY
* <LI>KDCOptions.RENEW
* <LI>KDCOptions.VALIDATE
* </UL>
* <p> Various checks must be made before honoring an option. The restrictions
* on the use of some options are as follows:
* <ol>
* <li> FORWARDABLE, FORWARDED, PROXIABLE, RENEWABLE options may be set in
* subsequent request only if the ticket_granting ticket on which it is based has
* the same options (FORWARDABLE, FORWARDED, PROXIABLE, RENEWABLE) set.
* <li> ALLOW_POSTDATE may be set in subsequent request only if the
* ticket-granting ticket on which it is based also has its MAY_POSTDATE flag set.
* <li> POSTDATED may be set in subsequent request only if the
* ticket-granting ticket on which it is based also has its MAY_POSTDATE flag set.
* <li> RENEWABLE or RENEW may be set in subsequent request only if the
* ticket-granting ticket on which it is based also has its RENEWABLE flag set.
* <li> POXY may be set in subsequent request only if the ticket-granting ticket
* on which it is based also has its PROXIABLE flag set, and the address(es) of
* the host from which the resulting ticket is to be valid should be included
* in the addresses field of the request.
* <li>FORWARDED, PROXY, ENC_TKT_IN_SKEY, RENEW, VALIDATE are used only in
* subsequent requests.
* </ol><p>
*/
public class KDCOptions extends KerberosFlags {
private static final int KDC_OPT_PROXIABLE = 0x10000000;
private static final int KDC_OPT_RENEWABLE_OK = 0x00000010;
private static final int KDC_OPT_FORWARDABLE = 0x40000000;
// KDC Options
public static final int RESERVED = 0;
public static final int FORWARDABLE = 1;
public static final int FORWARDED = 2;
public static final int PROXIABLE = 3;
public static final int PROXY = 4;
public static final int ALLOW_POSTDATE = 5;
public static final int POSTDATED = 6;
public static final int UNUSED7 = 7;
public static final int RENEWABLE = 8;
public static final int UNUSED9 = 9;
public static final int UNUSED10 = 10;
public static final int UNUSED11 = 11;
public static final int CNAME_IN_ADDL_TKT = 14;
public static final int CANONICALIZE = 15;
public static final int RENEWABLE_OK = 27;
public static final int ENC_TKT_IN_SKEY = 28;
public static final int RENEW = 30;
public static final int VALIDATE = 31;
private static final String[] names = {
"RESERVED", //0
"FORWARDABLE", //1;
"FORWARDED", //2;
"PROXIABLE", //3;
"PROXY", //4;
"ALLOW_POSTDATE", //5;
"POSTDATED", //6;
"UNUSED7", //7;
"RENEWABLE", //8;
"UNUSED9", //9;
"UNUSED10", //10;
"UNUSED11", //11;
null,null,
"CNAME_IN_ADDL_TKT",//14;
"CANONICALIZE", //15;
null,null,null,null,null,null,null,null,null,null,null,
"RENEWABLE_OK", //27;
"ENC_TKT_IN_SKEY", //28;
null,
"RENEW", //30;
"VALIDATE", //31;
};
private boolean DEBUG = Krb5.DEBUG;
public static KDCOptions with(int... flags) {
KDCOptions options = new KDCOptions();
for (int flag: flags) {
options.set(flag, true);
}
return options;
}
public KDCOptions() {
super(K
|
{
"pile_set_name": "Github"
}
| null | null |
;;; gh-issues-tests.el --- tests fir gh-issues.el
;; Copyright (C) 2012 Yann Hodique
;; Author: Yann Hodique <yann.hodique@gmail.com>
;; Keywords:
;; This file 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)
;; any later version.
;; This file 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 GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;
;;; Code:
(require 'gh-tests)
(require 'gh-issues)
(defun gh-issues-tests:test-regular-issue (issue)
(should (equal (oref issue :number) 1347))
(should (equal (oref issue :state) "open")))
(ert-deftest gh-issues-tests:regular-list ()
(let* ((api (gh-tests-mock-api 'gh-issues-api))
(issues
(gh-tests-with-traces-buffers ((gists-buf "list_issues_sample.txt"))
(gh-tests-mock-url ((:record-cls mocker-stub-record
:output gists-buf))
(oref
(gh-issues-issue-list api "octocat"
"Hello-World")
:data)))))
(should (equal (length issues) 1))
(let ((issue (car issues)))
(should (object-of-class-p issue 'gh-issues-issue))
(gh-issues-tests:test-regular-issue issue))))
(provide 'gh-issues-tests)
;;; gh-issues-tests.el ends here
|
{
"pile_set_name": "Github"
}
| null | null |
const {
Module,
Component,
Template,
Entity,
Mixin,
Filter,
Directive,
Locale,
Shortcut,
Utils,
ApiService,
EntityDefinition,
WorkerNotification,
DataDeprecated,
Data,
Classes,
Helper
} = Shopware;
describe('core/common.js', () => {
it('should contain the necessary methods for the module factory', async () => {
expect(Module).toHaveProperty('register');
});
it('should contain the necessary methods for the component factory', async () => {
expect(Component).toHaveProperty('register');
expect(Component).toHaveProperty('extend');
expect(Component).toHaveProperty('override');
expect(Component).toHaveProperty('build');
expect(Component).toHaveProperty('getTemplate');
});
it('should contain the necessary methods for the template factory', async () => {
expect(Template).toHaveProperty('register');
expect(Template).toHaveProperty('extend');
expect(Template).toHaveProperty('override');
expect(Template).toHaveProperty('getRenderedTemplate');
expect(Template).toHaveProperty('find');
expect(Template).toHaveProperty('findOverride');
});
it('should contain the necessary methods for the entity factory', async () => {
expect(Entity).toHaveProperty('addDefinition');
expect(Entity).toHaveProperty('getDefinition');
expect(Entity).toHaveProperty('getDefinitionRegistry');
expect(Entity).toHaveProperty('getRawEntityObject');
expect(Entity).toHaveProperty('getPropertyBlacklist');
expect(Entity).toHaveProperty('getRequiredProperties');
expect(Entity).toHaveProperty('getAssociatedProperties');
expect(Entity).toHaveProperty('getTranslatableProperties');
});
it('should contain the necessary methods for the entity factory', async () => {
expect(Entity).toHaveProperty('addDefinition');
expect(Entity).toHaveProperty('getDefinition');
expect(Entity).toHaveProperty('getDefinitionRegistry');
expect(Entity).toHaveProperty('getRawEntityObject');
expect(Entity).toHaveProperty('getPropertyBlacklist');
expect(Entity).toHaveProperty('getRequiredProperties');
expect(Entity).toHaveProperty('getAssociatedProperties');
expect(Entity).toHaveProperty('getTranslatableProperties');
});
it('should contain the necessary methods for the mixin factory', async () => {
expect(Mixin).toHaveProperty('register');
expect(Mixin).toHaveProperty('getByName');
});
it('should contain the necessary methods for the filter factory', async () => {
expect(Filter).toHaveProperty('register');
expect(Filter).toHaveProperty('getByName');
});
it('should contain the necessary methods for the directive factory', async () => {
expect(Directive).toHaveProperty('register');
expect(Directive).toHaveProperty('getByName');
});
it('should contain the necessary methods for the locale factory', async () => {
expect(Locale).toHaveProperty('register');
expect(Locale).toHaveProperty('extend');
expect(Locale).toHaveProperty('getByName');
});
it('should contain the necessary methods for the shortcut factory', async () => {
expect(Shortcut).toHaveProperty('register');
expect(Shortcut).toHaveProperty('getShortcutRegistry');
expect(Shortcut).toHaveProperty('getPathByCombination');
});
it('should contain the necessary methods for the utils', async () => {
expect(Utils).toHaveProperty('throttle');
expect(Utils).toHaveProperty('debounce');
expect(Utils).toHaveProperty('get');
expect(Utils).toHaveProperty('object');
expect(Utils).toHaveProperty('debug');
expect(Utils).toHaveProperty('format');
expect(Utils).toHaveProperty('dom');
expect(Utils).toHaveProperty('string');
expect(Utils).toHaveProperty('types');
expect(Utils).toHaveProperty('fileReader');
expect(Utils).toHaveProperty('sort');
expect(Utils).toHaveProperty('array');
});
it('should contain the necessary methods for the ApiService', async () => {
expect(ApiService).toHaveProperty('register');
expect(ApiService).toHaveProperty('getByName');
expect(ApiService).toHaveProperty('getRegistry');
expect(ApiService).toHaveProperty('getServices');
expect(ApiService).toHaveProperty('has');
});
it('should contain the necessary methods for the EntityDefinition', async () => {
expect(EntityDefinition).toHaveProperty('getScalarTypes');
expect(EntityDefinition).toHaveProperty('getJsonTypes');
expect(EntityDefinition).toHaveProperty('getDefinitionRegistry');
expect(EntityDefinition).toHaveProperty('get');
expect(EntityDefinition).toHaveProperty('add');
expect(EntityDefinition).toHaveProperty('remove');
expect(EntityDefinition).toHaveProperty('getTranslatedFields');
expect(EntityDefinition).toHaveProperty('getAssociationFields');
expect(EntityDefinition).toHaveProperty('getRequiredFields');
});
it('should contain the necessary methods for the WorkerNotification', async () => {
expect(WorkerNotification).toHaveProperty('register');
expect(WorkerNotification).toHaveProperty('getRegistry');
expect(WorkerNotification).toHaveProperty('override');
expect(WorkerNotification).toHaveProperty('remove');
expect(WorkerNotification).toHaveProperty('initialize');
});
/**
* @deprecated 6.1
*/
it('should contain the necessary methods for the DataDeprecated', async () => {
expect(DataDeprecated).toHaveProperty('LocalStore');
expect(DataDeprecated).toHaveProperty('UploadStore');
expect(DataDeprecated).toHaveProperty('CriteriaFactory');
});
it('should contain the necessary methods for the Data', async () => {
expect(Data).toHaveProperty('ChangesetGenerator');
expect(Data).toHaveProperty('Criteria');
expect(Data).toHaveProperty('Entity');
expect(Data).toHaveProperty('EntityCollection');
expect(Data).toHaveProperty('EntityDefinition');
expect(Data).toHaveProperty('EntityFactory');
expect(Data).toHaveProperty('EntityHydrator');
expect(Data).toHaveProperty('Repository');
});
it('should contain the necessary methods for the Classes', async () => {
expect(Classes).toHaveProperty('ShopwareError');
expect(Classes).toHaveProperty('ApiService');
});
it('should contain the necessary methods for the Helper', async () => {
expect(Helper).toHaveProperty('FlatTreeHelper');
expect(Helper).toHaveProperty('InfiniteScrollingHelper');
expect(Helper).toHaveProperty('MiddlewareHelper');
});
});
|
{
"pile_set_name": "Github"
}
| null | null |
{
"children":[{
"children":[{
"children":[{
"children":[{
"children":[{
"children":[{
"id":59,
"name":"E_BONE_C_SKULL",
"orgVecs":[0,0,1,0,0,1,0,0,1,0,0,0,0.125,0.0949999392032623,0.11499997228384,0,0.125,0.0200000368058681,0.0249999910593033,0,0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":58,
"name":"E_BONE_C_SPINE4",
"orgVecs":[0,0,1,0,0,1,0,0,1,0,0,0,0.0750000029802322,0.0800000205636024,0.0449999943375587,0,0.0750000029802322,0.184999987483025,-0.0499999858438969,0,0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
},{
"children":[{
"children":[{
"children":[{
"id":4,
"name":"E_BONE_L_METACARPALS",
"orgVecs":[1,0,0,0,0,1,0,0,0,0,1,0,0.0500000007450581,0.0949999839067459,0.0850000455975533,0,0.0500000007450581,0.0400000438094139,0.0950000509619713,0,0,0.759999692440033,-0.0899999886751175,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":3,
"name":"E_BONE_L_LOWERARM",
"orgVecs":[1,0,0,0,0,1,0,0,0,0,1,0,0.125,0.0500000491738319,0.0700000077486038,0,0.125,0.0599999949336052,0.0850000530481339,0,0.0199985485523939,0,1.46026909351349,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":2,
"name":"E_BONE_L_UPPERARM",
"orgVecs":[1,0,0,0,0,1,0,0,0,0,1,0,0.125,0.0550000071525574,0.0799999758601189,0,0.125,0.0249998271465302,0.104999966919422,0,-0.170065477490425,0.220000028610229,1.14075589179993,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":1,
"name":"E_BONE_L_SHOULDER",
"orgVecs":[1,0,0,0,0,1,0,0,0,0,1,0,0.100000001490116,0.115000016987324,0.110000014305115,0,0.100000001490116,0.025000000372529,0.025000000372529,0,0.049679346382618,0,0.509676933288574,0,0,0,0,0,27,0,0,0,0,0,0,0,2,2,2,0.5]
},{
"children":[{
"children":[{
"children":[{
"id":30,
"name":"E_BONE_R_METACARPALS",
"orgVecs":[-1,0,0,0,0,1,0,0,0,0,1,0,0.0500000007450581,0.0949999839067459,0.1000000461936,0,0.0500000007450581,0.0400000549852848,0.0600000508129597,0,0,0,0.399999916553497,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":29,
"name":"E_BONE_R_LOWERARM",
"orgVecs":[-1,0,0,0,0,1,0,0,0,0,1,0,0.125,0.0500000491738319,0.0700000077486038,0,0.125,0.0599999949336052,0.0850000530481339,0,-0.0199985485523939,0,-0.420270025730133,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":28,
"name":"E_BONE_R_UPPERARM",
"orgVecs":[-1,0,0,0,0,1,0,0,0,0,1,0,0.125,0.0550000071525574,0.0799999758601189,0,0.125,0.0249998271465302,0.104999966919422,0,-1.15993463993073,0,-0.34075665473938,0,0,0,0,0,23,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":27,
"name":"E_BONE_R_SHOULDER",
"orgVecs":[-1,0,0,0,0,1,0,0,0,0,1,0,0.100000001490116,0.115000016987324,0.110000014305115,0,0.100000001490116,0.025000000372529,0.025000000372529,0,-0.0996793657541275,0,-0.119676977396011,0,0,0,0,0,27,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":57,
"name":"E_BONE_C_SPINE3",
"orgVecs":[0,0,1,0,0,1,0,0,1,0,0,0,0.0750000029802322,0.249999910593033,0.0549999810755253,0,0.0750000029802322,0.025000000372529,0.025000000372529,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":56,
"name":"E_BONE_C_SPINE2",
"orgVecs":[0,0,1,0,0,1,0,0,1,0,0,0,0.0750000029802322,0.174999982118607,0.0700000002980232,0,0.0750000029802322,0.0300000011920929,0.0599999986588955,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":55,
"name":"E_BONE_C_SPINE1",
"org
|
{
"pile_set_name": "Github"
}
| null | null |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#include "itkHessianRecursiveGaussianImageFilter.h"
// This test creates an image varying as a 1D Gaussian in the X direction
// for different values of sigma, and checks the scale-space response of
// the xx component of the Hessian at the center of the Gaussian.
// If NormalizeAcrossScale works correctly, the filter should yield the
// same Hxx across different scales.
int
itkHessianRecursiveGaussianFilterScaleSpaceTest(int, char *[])
{
constexpr unsigned int Dimension = 3;
using PixelType = double;
using ImageType = itk::Image<PixelType, Dimension>;
using IndexType = itk::Index<Dimension>;
using SizeType = itk::Size<Dimension>;
using RegionType = itk::ImageRegion<Dimension>;
using PointType = ImageType::PointType;
using SpacingType = ImageType::SpacingType;
ImageType::Pointer inputImage = ImageType::New();
SizeType size;
size.Fill(21);
size[0] = 401;
IndexType start;
start.Fill(0);
RegionType region;
region.SetIndex(start);
region.SetSize(size);
PointType origin;
origin.Fill(-1.25);
origin[0] = -20.0;
SpacingType spacing;
spacing.Fill(0.1);
inputImage->SetOrigin(origin);
inputImage->SetSpacing(spacing);
inputImage->SetLargestPossibleRegion(region);
inputImage->SetBufferedRegion(region);
inputImage->SetRequestedRegion(region);
inputImage->Allocate();
using IteratorType = itk::ImageRegionIteratorWithIndex<ImageType>;
constexpr unsigned int numberOfScales = 4;
double scales[numberOfScales];
scales[0] = 1.0;
scales[1] = 2.0;
scales[2] = 3.0;
scales[3] = 5.0;
// changing the size of the object with the the size of the
// gaussian should produce the same results
for (double objectSize : scales)
{
IteratorType it(inputImage, inputImage->GetRequestedRegion());
PointType point;
// Fill the image with a 1D Gaussian along X with sigma equal to the current scale
// The Gaussian is not normalized, since it should have the same peak value across
// scales, only sigma should change
while (!it.IsAtEnd())
{
inputImage->TransformIndexToPhysicalPoint(it.GetIndex(), point);
double value = std::exp(-point[0] * point[0] / (2.0 * objectSize * objectSize));
it.Set(value);
++it;
}
// Compute the hessian using NormalizeAcrossScale true
using FilterType = itk::HessianRecursiveGaussianImageFilter<ImageType>;
using HessianImageType = FilterType::OutputImageType;
FilterType::Pointer filter = FilterType::New();
filter->SetInput(inputImage);
filter->SetSigma(objectSize);
filter->SetNormalizeAcrossScale(true);
filter->Update();
HessianImageType::Pointer outputImage = filter->GetOutput();
// Get the value at the center of the image, the location of the peak of the Gaussian
PointType center;
center.Fill(0.0);
IndexType centerIndex;
outputImage->TransformPhysicalPointToIndex(center, centerIndex);
// Irrespective of the scale, the Hxx component should be the same
double centerHxx = outputImage->GetPixel(centerIndex)[0];
if (centerHxx > -0.3546 || centerHxx < -0.3547)
{
std::cout << "center Hessian: " << outputImage->GetPixel(centerIndex) << std::endl;
return EXIT_FAILURE;
}
}
// maintaining the size of the object and gaussian, in physical
// size, should maintain the value, while the size of the image changes.
for (double scale : scales)
{
IteratorType it(inputImage, inputImage->GetRequestedRegion());
PointType point;
double objectSize = 5.0;
spacing.Fill(scale / 5.0);
inputImage->SetSpacing(spacing);
// Fill the image with a 1D Gaussian along X with sigma equal to
// the object size.
// The Gaussian is not normalized, since it should have the same peak value across
// scales, only sigma should change
while (!it.IsAtEnd())
{
inputImage->TransformIndexToPhysicalPoint(it.GetIndex(), point);
double value = std::exp(-point[0] * point[0] / (2.0 * objectSize * objectSize));
it.Set(value);
++it;
}
// Compute the hessian using NormalizeAcrossScale true
using FilterType = itk::HessianRecursiveGaussianImageFilter<ImageType>;
using HessianImageType = FilterType::OutputImageType;
FilterType::Pointer filter = FilterType::New();
filter->SetInput(inputImage);
filter->SetSigma(objectSize);
filter->SetNormalizeAcrossScale(true);
filter->Update();
HessianImageType::Pointer outputImage = filter->GetOutput();
// Get the value at the center of the image, the location of the peak of the Gaussian
PointType center;
center.Fill(0.0);
IndexType centerIndex;
outputImage->TransformPhysicalPointToIndex(center, centerIndex);
// Irrespective of the scale, the Hxx component should be the same
double centerHxx = outputImage->GetPixel(centerIndex)[0];
if (centerHxx > -0.354 || centerHxx < -0.355)
{
std::cout << "center Hessian: " << outputImage->GetPixel(centerIndex) << std::endl;
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}
|
{
"pile_set_name": "Github"
}
| null | null |
{
"activePlaceCount": 0,
"birth": {
"place": {
"name": "B\u00fcren an der Aare, Schweiz",
"placeName": "B\u00fcren an der Aare",
"placeType": "inhabited_place"
},
"time": {
"startYear": 1941
}
},
"birthYear": 1941,
"date": "born 1941",
"fc": "Markus Raetz",
"gender": "Male",
"id": 1812,
"mda": "Raetz, Markus",
"movements": [],
"startLetter": "R",
"totalWorks": 5,
"url": "http://www.tate.org.uk/art/artists/markus-raetz-1812"
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* AAC defines
*
* This file is part of FFmpeg.
*
* FFmpeg 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.
*
* FFmpeg 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 FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_AAC_DEFINES_H
#define AVCODEC_AAC_DEFINES_H
#ifndef USE_FIXED
#define USE_FIXED 0
#endif
#if USE_FIXED
#include "libavutil/softfloat.h"
#define FFT_FLOAT 0
#define FFT_FIXED_32 1
#define AAC_RENAME(x) x ## _fixed
#define AAC_RENAME_32(x) x ## _fixed_32
typedef int INTFLOAT;
typedef unsigned UINTFLOAT; ///< Equivalent to INTFLOAT, Used as temporal cast to avoid undefined sign overflow operations.
typedef int64_t INT64FLOAT;
typedef int16_t SHORTFLOAT;
typedef SoftFloat AAC_FLOAT;
typedef int AAC_SIGNE;
#define FIXR(a) ((int)((a) * 1 + 0.5))
#define FIXR10(a) ((int)((a) * 1024.0 + 0.5))
#define Q23(a) (int)((a) * 8388608.0 + 0.5)
#define Q30(x) (int)((x)*1073741824.0 + 0.5)
#define Q31(x) (int)((x)*2147483648.0 + 0.5)
#define RANGE15(x) x
#define GET_GAIN(x, y) (-(y) * (1 << (x))) + 1024
#define AAC_MUL16(x, y) (int)(((int64_t)(x) * (y) + 0x8000) >> 16)
#define AAC_MUL26(x, y) (int)(((int64_t)(x) * (y) + 0x2000000) >> 26)
#define AAC_MUL30(x, y) (int)(((int64_t)(x) * (y) + 0x20000000) >> 30)
#define AAC_MUL31(x, y) (int)(((int64_t)(x) * (y) + 0x40000000) >> 31)
#define AAC_MADD28(x, y, a, b) (int)((((int64_t)(x) * (y)) + \
((int64_t)(a) * (b)) + \
0x8000000) >> 28)
#define AAC_MADD30(x, y, a, b) (int)((((int64_t)(x) * (y)) + \
((int64_t)(a) * (b)) + \
0x20000000) >> 30)
#define AAC_MADD30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \
((int64_t)(a) * (b)) + \
((int64_t)(c) * (d)) + \
((int64_t)(e) * (f)) + \
0x20000000) >> 30)
#define AAC_MSUB30(x, y, a, b) (int)((((int64_t)(x) * (y)) - \
((int64_t)(a) * (b)) + \
0x20000000) >> 30)
#define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \
((int64_t)(a) * (b)) - \
((int64_t)(c) * (d)) - \
((int64_t)(e) * (f)) + \
0x20000000) >> 30)
#define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \
((int64_t)(y) * (z)) + \
0x40000000) >> 31)
#define AAC_HALF_SUM(x, y) (((x) >> 1) + ((y) >> 1))
#define AAC_SRA_R(x, y) (int)(((x) + (1 << ((y) - 1))) >> (y))
#else
#define FFT_FLOAT 1
#define FFT_FIXED_32 0
#define AAC_RENAME(x) x
#define AAC_RENAME_32(x) x
typedef float INTFLOAT;
typedef float UINTFLOAT;
typedef float INT64FLOAT;
typedef float SHORTFLOAT;
typedef float AAC_FLOAT;
typedef unsigned AAC_SIGNE;
#define FIXR(x) ((float)(x))
#define FIXR10(x) ((float)(x))
#define Q23(x) ((float)(x))
#define Q30(x) ((float)(x))
#define Q31(x) ((float)(x))
#define RANGE15(x) (32768.0 * (x))
#define GET_GAIN(x, y) powf((x), -(y))
#define AAC_MUL16(x, y) ((x) * (y))
#define AAC_MUL26(x, y) ((x) * (y))
#define AAC_MUL30(x, y) ((x) * (y))
#define AAC_MUL31(x, y) ((x) * (y))
#define AAC_MADD28(x, y, a, b) ((x) * (y) + (a) * (b))
#define AAC_MADD30(x, y, a, b) ((x) * (y) + (a) * (b))
#define AAC_MADD30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) + \
(c) * (d) + (e) * (f))
#define AAC_MSUB30(x, y, a, b) ((x) * (y) - (a) * (b))
#define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) - \
(c) * (d) - (e) * (f))
#define AAC_MSUB31_V3(x, y, z) ((x) - (y)) * (z)
#define AAC_HALF_SUM(x, y) ((x) + (y)) * 0.5f
#define AAC_SRA_R(x, y) (x)
#endif /* USE_FIXED */
#endif /* AVCODEC_AAC_DEFINES_H */
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/******************************************************************
iLBC Speech Coder ANSI-C Source Code
WebRtcIlbcfix_InterpolateSamples.c
******************************************************************/
#include "modules/audio_coding/codecs/ilbc/defines.h"
#include "modules/audio_coding/codecs/ilbc/constants.h"
void WebRtcIlbcfix_InterpolateSamples(
int16_t *interpSamples, /* (o) The interpolated samples */
int16_t *CBmem, /* (i) The CB memory */
size_t lMem /* (i) Length of the CB memory */
) {
int16_t *ppi, *ppo, i, j, temp1, temp2;
int16_t *tmpPtr;
/* Calculate the 20 vectors of interpolated samples (4 samples each)
that are used in the codebooks for lag 20 to 39 */
tmpPtr = interpSamples;
for (j=0; j<20; j++) {
temp1 = 0;
temp2 = 3;
ppo = CBmem+lMem-4;
ppi = CBmem+lMem-j-24;
for (i=0; i<4; i++) {
*tmpPtr++ = (int16_t)((WebRtcIlbcfix_kAlpha[temp2] * *ppo) >> 15) +
(int16_t)((WebRtcIlbcfix_kAlpha[temp1] * *ppi) >> 15);
ppo++;
ppi++;
temp1++;
temp2--;
}
}
return;
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (c) 2016 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting documentation, and
* that the name of the copyright holders not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no representations
* about the suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <linux/export.h>
#include <drm/drmP.h>
#include <drm/drm_encoder.h>
#include "drm_crtc_internal.h"
/**
* DOC: overview
*
* Encoders represent the connecting element between the CRTC (as the overall
* pixel pipeline, represented by &struct drm_crtc) and the connectors (as the
* generic sink entity, represented by &struct drm_connector). An encoder takes
* pixel data from a CRTC and converts it to a format suitable for any attached
* connector. Encoders are objects exposed to userspace, originally to allow
* userspace to infer cloning and connector/CRTC restrictions. Unfortunately
* almost all drivers get this wrong, making the uabi pretty much useless. On
* top of that the exposed restrictions are too simple for today's hardware, and
* the recommended way to infer restrictions is by using the
* DRM_MODE_ATOMIC_TEST_ONLY flag for the atomic IOCTL.
*
* Otherwise encoders aren't used in the uapi at all (any modeset request from
* userspace directly connects a connector with a CRTC), drivers are therefore
* free to use them however they wish. Modeset helper libraries make strong use
* of encoders to facilitate code sharing. But for more complex settings it is
* usually better to move shared code into a separate &drm_bridge. Compared to
* encoders, bridges also have the benefit of being purely an internal
* abstraction since they are not exposed to userspace at all.
*
* Encoders are initialized with drm_encoder_init() and cleaned up using
* drm_encoder_cleanup().
*/
static const struct drm_prop_enum_list drm_encoder_enum_list[] = {
{ DRM_MODE_ENCODER_NONE, "None" },
{ DRM_MODE_ENCODER_DAC, "DAC" },
{ DRM_MODE_ENCODER_TMDS, "TMDS" },
{ DRM_MODE_ENCODER_LVDS, "LVDS" },
{ DRM_MODE_ENCODER_TVDAC, "TV" },
{ DRM_MODE_ENCODER_VIRTUAL, "Virtual" },
{ DRM_MODE_ENCODER_DSI, "DSI" },
{ DRM_MODE_ENCODER_DPMST, "DP MST" },
{ DRM_MODE_ENCODER_DPI, "DPI" },
};
int drm_encoder_register_all(struct drm_device *dev)
{
struct drm_encoder *encoder;
int ret = 0;
drm_for_each_encoder(encoder, dev) {
if (encoder->funcs->late_register)
ret = encoder->funcs->late_register(encoder);
if (ret)
return ret;
}
return 0;
}
void drm_encoder_unregister_all(struct drm_device *dev)
{
struct drm_encoder *encoder;
drm_for_each_encoder(encoder, dev) {
if (encoder->funcs->early_unregister)
encoder->funcs->early_unregister(encoder);
}
}
/**
* drm_encoder_init - Init a preallocated encoder
* @dev: drm device
* @encoder: the encoder to init
* @funcs: callbacks for this encoder
* @encoder_type: user visible type of the encoder
* @name: printf style format string for the encoder name, or NULL for default name
*
* Initialises a preallocated encoder. Encoder should be subclassed as part of
* driver encoder objects. At driver unload time drm_encoder_cleanup() should be
* called from the driver's &drm_encoder_funcs.destroy hook.
*
* Returns:
* Zero on success, error code on failure.
*/
int drm_encoder_init(struct drm_device *dev,
struct drm_encoder *encoder,
const struct drm_encoder_funcs *funcs,
int encoder_type, const char *name, ...)
{
int ret;
ret = drm_mode_object_add(dev, &encoder->base, DRM_MODE_OBJECT_ENCODER);
if (ret)
return ret;
encoder->dev = dev;
encoder->encoder_type = encoder_type;
encoder->funcs = funcs;
if (name) {
va_list ap;
va_start(ap, name);
encoder->name = kvasprintf(GFP_KERNEL, name, ap);
va_end(ap);
} else {
encoder->name = kasprintf(GFP_KERNEL, "%s-%d",
drm_encoder_enum_list[encoder_type].name,
encoder->base.id);
}
if (!encoder->name) {
ret = -ENOMEM;
goto out_put;
}
list_add_tail(&encoder->head, &dev->mode_config.encoder_list);
encoder->index = dev->mode_config.num_encoder++;
out_put:
if (ret)
drm_mode_object_unregister(dev, &encoder->base);
return ret;
}
EXPORT_SYMBOL(drm_encoder_init);
/**
* drm_encoder_cleanup - cleans up an initialised encoder
* @encoder: encoder to cleanup
*
* Cleans up the encoder but doesn't free the object.
*/
void drm_encoder_cleanup(struct drm_encoder *encoder)
{
struct drm_device *dev = encoder->dev;
/* Note that the encoder_list is considered to be static; should we
* remove the drm_encoder at runtime we would have to decrement all
* the indices on the drm_encoder after us in the encoder_list.
*/
if (encoder->bridge) {
struct drm_bridge *bridge = encoder->bridge;
struct drm_bridge *next;
while (bridge) {
next = bridge->next;
drm_bridge_detach(bridge);
bridge = next;
}
}
drm_mode_object_unregister(dev, &encoder->base);
kfree(encoder->name);
list_del(&encoder->head);
dev->mode_config.num_encoder--;
memset(encoder, 0, sizeof(*encoder));
}
EXPORT_SYMBOL(drm_encoder_cleanup);
static struct drm_crtc *drm_encoder_get_crtc(struct drm_encoder *encoder)
{
struct drm_connector *connector;
struct drm_device *dev = encoder->dev;
bool uses_atomic = false;
struct drm_connector_list_iter conn_iter;
/* For atomic drivers only state objects are synchronously updated and
* protected by modeset locks, so check those first. */
drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
if (!connector->state)
continue;
uses_atomic = true;
if (connector->state->best_encoder != encoder)
continue;
drm_connector_list_iter_end(&conn_iter);
return connector->state->crtc;
}
drm_connector_list_iter_end(&conn_iter);
/* Don't return stale data (e.g. pending async disable). */
if (uses_atomic)
return NULL;
return encoder->crtc;
}
int drm_mode_getencoder(struct drm_device *dev, void *data
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
/**
* Slim Framework (https://slimframework.com)
*
* @link https://github.com/slimphp/Slim
* @copyright Copyright (c) 2011-2017 Josh Lockhart
* @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
*/
namespace Slim;
use ArrayIterator;
use Slim\Interfaces\CollectionInterface;
/**
* Collection
*
* This class provides a common interface used by many other
* classes in a Slim application that manage "collections"
* of data that must be inspected and/or manipulated
*/
class Collection implements CollectionInterface
{
/**
* The source data
*
* @var array
*/
protected $data = [];
/**
* Create new collection
*
* @param array $items Pre-populate collection with this key-value array
*/
public function __construct(array $items = [])
{
$this->replace($items);
}
/********************************************************************************
* Collection interface
*******************************************************************************/
/**
* Set collection item
*
* @param string $key The data key
* @param mixed $value The data value
*/
public function set($key, $value)
{
$this->data[$key] = $value;
}
/**
* Get collection item for key
*
* @param string $key The data key
* @param mixed $default The default value to return if data key does not exist
*
* @return mixed The key's value, or the default value
*/
public function get($key, $default = null)
{
return $this->has($key) ? $this->data[$key] : $default;
}
/**
* Add item to collection, replacing existing items with the same data key
*
* @param array $items Key-value array of data to append to this collection
*/
public function replace(array $items)
{
foreach ($items as $key => $value) {
$this->set($key, $value);
}
}
/**
* Get all items in collection
*
* @return array The collection's source data
*/
public function all()
{
return $this->data;
}
/**
* Get collection keys
*
* @return array The collection's source data keys
*/
public function keys()
{
return array_keys($this->data);
}
/**
* Does this collection have a given key?
*
* @param string $key The data key
*
* @return bool
*/
public function has($key)
{
return array_key_exists($key, $this->data);
}
/**
* Remove item from collection
*
* @param string $key The data key
*/
public function remove($key)
{
unset($this->data[$key]);
}
/**
* Remove all items from collection
*/
public function clear()
{
$this->data = [];
}
/********************************************************************************
* ArrayAccess interface
*******************************************************************************/
/**
* Does this collection have a given key?
*
* @param string $key The data key
*
* @return bool
*/
public function offsetExists($key)
{
return $this->has($key);
}
/**
* Get collection item for key
*
* @param string $key The data key
*
* @return mixed The key's value, or the default value
*/
public function offsetGet($key)
{
return $this->get($key);
}
/**
* Set collection item
*
* @param string $key The data key
* @param mixed $value The data value
*/
public function offsetSet($key, $value)
{
$this->set($key, $value);
}
/**
* Remove item from collection
*
* @param string $key The data key
*/
public function offsetUnset($key)
{
$this->remove($key);
}
/**
* Get number of items in collection
*
* @return int
*/
public function count()
{
return count($this->data);
}
/********************************************************************************
* IteratorAggregate interface
*******************************************************************************/
/**
* Get collection iterator
*
* @return \ArrayIterator
*/
public function getIterator()
{
return new ArrayIterator($this->data);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
/**
* @file webpack config for swan
* @author houyu(houyu01@baidu.com)
*/
const CopyWebpackPlugin = require('copy-webpack-plugin');
const webpack = require('webpack');
const baseWebpackConfig = require('./webpack.base.conf.js');
const merge = require('webpack-merge');
module.exports = merge(
baseWebpackConfig,
{
entry: {
master: __dirname + '/src/master/index.js',
slaves: __dirname + '/src/slave/index.js'
},
output: {
path: __dirname + '/dist/box/',
filename: '[name]/index.js',
libraryTarget: 'umd'
},
// devtool: 'source-map',
plugins: [
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
// sourceMap: true,
compress: {
warnings: false,
/* eslint-disable fecs-camelcase */
drop_console: false
/* eslint-disable fecs-camelcase */
},
// sourceMap: true,
comments: false
}),
new CopyWebpackPlugin([{
from: __dirname + '/src/templates/**/*',
to: __dirname + '/dist/box/[1]/[name].[ext]',
test: /([^/]+)\/([^/]+)\.[^.]+$/
}])
]
// devtool: '#source-map'
}
);
|
{
"pile_set_name": "Github"
}
| null | null |
'use strict'
module.exports = function objFilter (original, filter) {
const obj = {}
filter = filter || ((k, v) => true)
Object.keys(original || {}).forEach((key) => {
if (filter(key, original[key])) {
obj[key] = original[key]
}
})
return obj
}
|
{
"pile_set_name": "Github"
}
| null | null |
use crate::transport::smtp::{client::SmtpConnection, error::Error, SmtpClient};
use r2d2::ManageConnection;
impl ManageConnection for SmtpClient {
type Connection = SmtpConnection;
type Error = Error;
fn connect(&self) -> Result<Self::Connection, Error> {
self.connection()
}
fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Error> {
if conn.test_connected() {
return Ok(());
}
Err(Error::Client("is not connected anymore"))
}
fn has_broken(&self, conn: &mut Self::Connection) -> bool {
conn.has_broken()
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
//
// main.m
// JLPermissionsExample
//
// Created by Joseph Laws on 4/19/14.
// Copyright (c) 2014 Joe Laws. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "JLAppDelegate.h"
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([JLAppDelegate class]));
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
[
{
"id": "uncraft_book",
"type": "requirement",
"//": "Result of disassembling books, magazines and similar items",
"components": [ [ [ "paper", 1 ] ] ]
}
]
|
{
"pile_set_name": "Github"
}
| null | null |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9F11AF2B-BB96-44F0-BB67-E8FF409595D3}</ProjectGuid>
<RootNamespace>Comm</RootNamespace>
<Keyword>MFCProj</Keyword>
<ProjectName>CommMFC</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(ProjectDir)..\..\..\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(ProjectDir)..\..\..\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<ValidateAllParameters>true</ValidateAllParameters>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</Midl>
<ResourceCompile>
<Culture>0x0804</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<ValidateAllParameters>true</ValidateAllParameters>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</Midl>
<ResourceCompile>
<Culture>0x0804</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\SerialPort.h" />
<ClInclude Include="..\..\..\include\SerialPortBase.h" />
<ClInclude Include="..\..\..\include\SerialPortInfo.h" />
<ClInclude Include="..\..\..\include\SerialPortInfoBase.h" />
<ClInclude Include="..\..\..\include\SerialPortInfoWinBase.h" />
<ClInclude Include="..\..\..\include\SerialPortWinBase.h" />
<ClInclude Include="..\..\..\include\sigslot.h" />
<ClInclude Include="Comm.h" />
<ClInclude Include="CommDlg.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\SerialPort.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\src\SerialPortBase.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\src\SerialPortInfo.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\src\SerialPortInfoBase.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\src\SerialPortInfoWinBase.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\src\SerialPortWinBase.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win
|
{
"pile_set_name": "Github"
}
| null | null |
polygon
1
1.212293E+01 4.584069E+01
1.212411E+01 4.584132E+01
1.212464E+01 4.584170E+01
1.213381E+01 4.584707E+01
1.213445E+01 4.584626E+01
1.213556E+01 4.584478E+01
1.213641E+01 4.584361E+01
1.213688E+01 4.584304E+01
1.213667E+01 4.584231E+01
1.213662E+01 4.584076E+01
1.213661E+01 4.584015E+01
1.213660E+01 4.583823E+01
1.213660E+01 4.583764E+01
1.213659E+01 4.583556E+01
1.213659E+01 4.583526E+01
1.213659E+01 4.583369E+01
1.213714E+01 4.583369E+01
1.214045E+01 4.583364E+01
1.214130E+01 4.583365E+01
1.214375E+01 4.583360E+01
1.214485E+01 4.583362E+01
1.214699E+01 4.583357E+01
1.214792E+01 4.583356E+01
1.214947E+01 4.583353E+01
1.214996E+01 4.583353E+01
1.215012E+01 4.583331E+01
1.214991E+01 4.583329E+01
1.214988E+01 4.583256E+01
1.214990E+01 4.583113E+01
1.214990E+01 4.583036E+01
1.214992E+01 4.582887E+01
1.214994E+01 4.582793E+01
1.214993E+01 4.582606E+01
1.214992E+01 4.582407E+01
1.214992E+01 4.582402E+01
1.214989E+01 4.582366E+01
1.214990E+01 4.582355E+01
1.215130E+01 4.582357E+01
1.215219E+01 4.582358E+01
1.215337E+01 4.582359E+01
1.215406E+01 4.582359E+01
1.215522E+01 4.582362E+01
1.215595E+01 4.582362E+01
1.215650E+01 4.582363E+01
1.215646E+01 4.582290E+01
1.215644E+01 4.582252E+01
1.215642E+01 4.582172E+01
1.215722E+01 4.582170E+01
1.215800E+01 4.582168E+01
1.215839E+01 4.582167E+01
1.215907E+01 4.582166E+01
1.215979E+01 4.582163E+01
1.216007E+01 4.582162E+01
1.216047E+01 4.582159E+01
1.216206E+01 4.582155E+01
1.216322E+01 4.582155E+01
1.216337E+01 4.582152E+01
1.216336E+01 4.582053E+01
1.216337E+01 4.581987E+01
1.216337E+01 4.581936E+01
1.216338E+01 4.581854E+01
1.216340E+01 4.581829E+01
1.216340E+01 4.581736E+01
1.216341E+01 4.581623E+01
1.216343E+01 4.581522E+01
1.216348E+01 4.581472E+01
1.216406E+01 4.581472E+01
1.216561E+01 4.581476E+01
1.216570E+01 4.581476E+01
1.216570E+01 4.581475E+01
1.216682E+01 4.581475E+01
1.217031E+01 4.581479E+01
1.217031E+01 4.581418E+01
1.217030E+01 4.581334E+01
1.217030E+01 4.581193E+01
1.217028E+01 4.581062E+01
1.217029E+01 4.580927E+01
1.217028E+01 4.580791E+01
1.217032E+01 4.580669E+01
1.217035E+01 4.580530E+01
1.217033E+01 4.580403E+01
1.217051E+01 4.580415E+01
1.217074E+01 4.580430E+01
1.217087E+01 4.580430E+01
1.217105E+01 4.580425E+01
1.217133E+01 4.580413E+01
1.217156E+01 4.580402E+01
1.217178E+01 4.580392E+01
1.217190E+01 4.580384E+01
1.217213E+01 4.580392E+01
1.217233E+01 4.580429E+01
1.217263E+01 4.580499E+01
1.217283E+01 4.580519E+01
1.217314E+01 4.580524E+01
1.217354E+01 4.580530E+01
1.217402E+01 4.580563E+01
1.217450E+01 4.580602E+01
1.217481E+01 4.580647E+01
1.217485E+01 4.580653E+01
1.217541E+01 4.580623E+01
1.217581E+01 4.580587E+01
1.217603E+01 4.580571E+01
1.217638E+01 4.580559E+01
1.217691E+01 4.580506E+01
1.217700E+01 4.580479E+01
1.217726E+01 4.580458E+01
1.217746E+01 4.580467E+01
1.217748E+01 4.580468E+01
1.217785E+01 4.580415E+01
1.217820E+01 4.580380E+01
1.217836E+01 4.580369E+01
1.217904E+01 4.580353E+01
1.
|
{
"pile_set_name": "Github"
}
| null | null |
// -- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See docs/COPYRIGHT.rdoc for more details.
// ++
import {Injectable} from '@angular/core';
import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder";
class Apiv3Paths {
readonly apiV3Base:string;
constructor(basePath:string) {
this.apiV3Base = basePath + '/api/v3';
}
/**
* Preview markup path
*
* Primarily used from ckeditor
* https://github.com/opf/commonmark-ckeditor-build/
*
* @param context
*/
public previewMarkup(context:string) {
let base = this.apiV3Base + '/render/markdown';
if (context) {
return base + `?context=${context}`;
} else {
return base;
}
}
/**
* Principals autocompleter path
*
* Primarily used from ckeditor
* https://github.com/opf/commonmark-ckeditor-build/
*
*/
public principals(projectId:string|number, term:string|null) {
let filters:ApiV3FilterBuilder = new ApiV3FilterBuilder();
// Only real and activated users:
filters.add('status', '!', ['3']);
// that are members of that project:
filters.add('member', '=', [projectId.toString()]);
// That are users:
filters.add('type', '=', ['User', 'Group']);
// That are not the current user:
filters.add('id', '!', ['me']);
if (term && term.length > 0) {
// Containing the that substring:
filters.add('name', '~', [term]);
}
return this.apiV3Base +
'/principals?' +
filters.toParams({ sortBy: '[["name","asc"]]', offset: '1', pageSize: '10' });
}
}
@Injectable({ providedIn: 'root' })
export class PathHelperService {
public readonly appBasePath = window.appBasePath ? window.appBasePath : '';
public readonly api = {
v3: new Apiv3Paths(this.appBasePath)
};
public get staticBase() {
return this.appBasePath;
}
public attachmentDownloadPath(attachmentIdentifier:string, slug:string|undefined) {
let path = this.staticBase + '/attachments/' + attachmentIdentifier;
if (slug) {
return path + "/" + slug;
} else {
return path;
}
}
public ifcModelsPath(projectIdentifier:string) {
return this.staticBase + `/projects/${projectIdentifier}/ifc_models`;
}
public bimDetailsPath(projectIdentifier:string, workPackageId:string, viewpoint:number|string|null = null) {
let path = this.projectPath(projectIdentifier) + `/bcf/split/details/${workPackageId}`;
if (viewpoint !== null) {
path += `?viewpoint=${viewpoint}`;
}
return path;
}
public highlightingCssPath() {
return this.staticBase + '/highlighting/styles';
}
public forumPath(projectIdentifier:string, forumIdentifier:string) {
return this.projectForumPath(projectIdentifier) + '/' + forumIdentifier;
}
public keyboardShortcutsHelpPath() {
return this.staticBase + '/help/keyboard_shortcuts';
}
public messagePath(messageIdentifier:string) {
return this.staticBase + '/topics/' + messageIdentifier;
}
public myPagePath() {
return this.staticBase + '/my/page';
}
public newsPath(newsId:string) {
return this.staticBase + '/news/' + newsId;
}
public loginPath() {
return this.staticBase + '/login';
}
public projectsPath() {
return this.staticBase + '/projects';
}
public projectPath(projectIdentifier:string) {
return this.projectsPath() + '/' + projectIdentifier;
}
public projectActivityPath(projectIdentifier:string) {
return this.projectPath(projectIdentifier) + '/activity';
}
public projectForumPath(projectIdentifier:string) {
return this.projectPath(projectIdentifier) + '/forums';
}
public projectCalendarPath(projectId:string) {
return this.projectPath(projectId) + '/work_packages/calendar';
}
public projectMembershipsPath(projectId:string) {
return this.projectPath(projectId) + '/members';
}
public projectNewsPath(projectId:string) {
return this.projectPath(projectId) + '/news';
}
public projectTimeEntriesPath(projectIdentifier:string) {
return this.projectPath(projectIdentifier) + '/cost_reports';
}
public projectWikiPath(projectId:string) {
return this.projectPath(projectId) + '/wiki';
}
public projectWorkPackagePath(projectId:string, wpId:string|number) {
return this.projectWorkPackagesPath(projectId) + '/' + wpId;
}
public projectWorkPackagesPath(projectId:string) {
return this.projectPath(projectId) + '/work_packages';
}
public projectWorkPackageNewPath(projectId:string) {
return this.projectWorkPackagesPath(projectId) + '/new';
}
public projectBoardsPath(projectIdentifier:string|null) {
if (projectIdentifier) {
return this.projectPath(projectIdentifier) + '/boards';
} else {
return this.staticBase + '/boards';
}
}
public projectDashboardsPath(projectIdentifier:string) {
return this.projectPath(projectIdentifier) + '/dashboards';
}
public timeEntriesPath(workPackageId:string|number) {
var suffix = '/time_entries';
if (workPackageId) {
return this.workPackagePath(workPackageId) + suffix;
} else {
return this.staticBase + suffix; // time entries root path
}
}
public usersPath() {
return this.staticBase + '/users';
}
public userPath(id:string|number) {
return this.usersPath() + '/' + id;
}
public versionsPath() {
return this.staticBase + '/versions';
}
public versionEditPath(id:string|number) {
return this.staticBase + '/versions/' + id + '/edit';
}
public versionShowPath(id:string|number) {
return this.staticBase + '/versions/' + id;
}
public workPackagesPath() {
return this.staticBase + '/work_packages';
}
public workPackagePath(id:string|number) {
return this.staticBase + '/work_packages/'
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (c) 2000-2012 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
#include <stddef.h>
#include <mach_ldebug.h>
/*
* Pass field offsets to assembly code.
*/
#include <kern/ast.h>
#include <kern/thread.h>
#include <kern/task.h>
#include <kern/locks.h>
#include <kern/host.h>
#include <kern/misc_protos.h>
#include <ipc/ipc_space.h>
#include <ipc/ipc_port.h>
#include <ipc/ipc_pset.h>
#include <vm/vm_map.h>
#include <i386/pmap.h>
#include <i386/Diagnostics.h>
#include <i386/mp_desc.h>
#include <i386/seg.h>
#include <i386/thread.h>
#include <i386/cpu_data.h>
#include <i386/tss.h>
#include <i386/cpu_capabilities.h>
#include <i386/cpuid.h>
#include <i386/pmCPU.h>
#include <mach/i386/vm_param.h>
#include <mach/i386/thread_status.h>
#include <machine/commpage.h>
#include <pexpert/i386/boot.h>
#if CONFIG_DTRACE
#define NEED_DTRACE_DEFS
#include <../bsd/sys/lockstat.h>
#endif
/*
* genassym.c is used to produce an
* assembly file which, intermingled with unuseful assembly code,
* has all the necessary definitions emitted. This assembly file is
* then postprocessed with sed to extract only these definitions
* and thus the final assyms.s is created.
*
* This convoluted means is necessary since the structure alignment
* and packing may be different between the host machine and the
* target so we are forced into using the cross compiler to generate
* the values, but we cannot run anything on the target machine.
*/
#define DECLARE(SYM,VAL) \
__asm("DEFINITION__define__" SYM ":\t .ascii \"%0\"" : : "n" ((u_int)(VAL)))
int main(
int argc,
char ** argv);
int
main(
int argc,
char **argv)
{
DECLARE("AST_URGENT", AST_URGENT);
DECLARE("AST_BSD", AST_BSD);
DECLARE("MAX_CPUS", MAX_CPUS);
/* Simple Lock structure */
DECLARE("SLOCK_ILK", offsetof(usimple_lock_data_t, interlock));
#if MACH_LDEBUG
DECLARE("SLOCK_TYPE", offsetof(usimple_lock_data_t, lock_type));
DECLARE("SLOCK_PC", offsetof(usimple_lock_data_t, debug.lock_pc));
DECLARE("SLOCK_THREAD", offsetof(usimple_lock_data_t, debug.lock_thread));
DECLARE("SLOCK_DURATIONH",offsetof(usimple_lock_data_t, debug.duration[0]));
DECLARE("SLOCK_DURATIONL",offsetof(usimple_lock_data_t, debug.duration[1]));
DECLARE("USLOCK_TAG", USLOCK_TAG);
#endif /* MACH_LDEBUG */
/* Mutex structure */
DECLARE("MUTEX_OWNER", offsetof(lck_mtx_t, lck_mtx_owner));
DECLARE("MUTEX_PTR", offsetof(lck_mtx_t, lck_mtx_ptr));
DECLARE("MUTEX_STATE", offsetof(lck_mtx_t, lck_mtx_state));
DECLARE("MUTEX_IND", LCK_MTX_TAG_INDIRECT);
DECLARE("MUTEX_ASSERT_OWNED", LCK_MTX_ASSERT_OWNED);
DECLARE("MUTEX_ASSERT_NOTOWNED",LCK_MTX_ASSERT_NOTOWNED);
DECLARE("GRP_MTX_STAT_UTIL", offsetof(lck_grp_t, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_util_cnt));
DECLARE("GRP_MTX_STAT_MISS", offsetof(lck_grp_t, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_miss_cnt));
DECLARE("GRP_MTX_STAT_WAIT", offsetof(lck_grp_t, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_wait_cnt));
/* x86 only */
DECLARE("MUTEX_DESTROYED", LCK_MTX_TAG_DESTROYED);
/* Per-mutex statistic element */
DECLARE("MTX_ACQ_TSC", offsetof(lck_mtx_ext_t, lck_mtx_stat));
/* Mutex group statistics elements */
DECLARE("MUTEX_GRP", offsetof(lck_mtx_ext_t, lck_mtx_grp));
/*
* The use of this field is somewhat at variance with the alias.
*/
DECLARE("GRP_MTX_STAT_DIRECT_WAIT", offsetof(lck_grp_t, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_held_cnt));
DECLARE("GRP_MTX_STAT_HELD_MAX", offsetof(lck_grp_t, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_held_max));
/* Reader writer lock types
|
{
"pile_set_name": "Github"
}
| null | null |
'use strict';
const root = '../../../..';
const mockrequire = require('mock-require');
const should = require('should');
const sinon = require('sinon');
const _ = require('lodash');
const { Client: ESClient } = require('@elastic/elasticsearch');
const {
Request,
KuzzleError,
UnauthorizedError,
TooManyRequestsError,
SizeLimitError,
ServiceUnavailableError,
PreconditionError,
PluginImplementationError,
PartialError,
NotFoundError,
InternalError,
GatewayTimeoutError,
ForbiddenError,
ExternalServiceError,
BadRequestError,
} = require('kuzzle-common-objects');
const KuzzleMock = require(`${root}/test/mocks/kuzzle.mock`);
const { EmbeddedSDK } = require('../../../../lib/core/shared/sdk/embeddedSdk');
describe('Plugin Context', () => {
const someCollection = 'someCollection';
let kuzzle;
let context;
let PluginContext;
beforeEach(() => {
PluginContext = mockrequire.reRequire(`${root}/lib/core/plugin/pluginContext`);
kuzzle = new KuzzleMock();
context = new PluginContext(kuzzle, 'pluginName');
});
afterEach(() => {
mockrequire.stopAll();
});
describe('#constructor', () => {
it('should be an instance of a PluginContext object', () => {
should(context).be.an.instanceOf(PluginContext);
});
it('should expose the right constructors', () => {
let repository;
const Koncorde = require('koncorde');
should(context.constructors).be.an.Object().and.not.be.empty();
should(context.constructors.Koncorde).be.a.Function();
should(context.constructors.Request).be.a.Function();
should(context.constructors.RequestContext).be.a.Function();
should(context.constructors.RequestInput).be.a.Function();
should(context.constructors.BaseValidationType).be.a.Function();
should(context.constructors.Repository).be.a.Function();
should(new context.constructors.Koncorde).be.instanceOf(Koncorde);
should(new context.constructors.Request(new Request({}), {})).be.instanceOf(Request);
repository = new context.constructors.Repository(someCollection);
should(repository.search).be.a.Function();
should(repository.get).be.a.Function();
should(repository.mGet).be.a.Function();
should(repository.delete).be.a.Function();
should(repository.create).be.a.Function();
should(repository.createOrReplace).be.a.Function();
should(repository.replace).be.a.Function();
should(repository.update).be.a.Function();
});
it('should exposes secrets from vault', () => {
should(context.secrets)
.not.be.undefined()
.match({
aws: {
secretKeyId: 'the cake is a lie'
},
kuzzleApi: 'the spoon does not exist'
});
});
describe('#ESClient', () => {
it('should expose the ESClient constructor', () => {
const esClient = new context.constructors.ESClient();
should(esClient).be.instanceOf(ESClient);
});
it('should allow to instantiate an ESClient connected to the ES cluster', () => {
const esClient = new context.constructors.ESClient();
should(esClient.connectionPool.connections[0].url.origin)
.be.eql(kuzzle.storageEngine.config.client.node);
});
});
describe('#Request', () => {
it('should throw when trying to instantiate a Request object without providing any data', () => {
should(function () { new context.constructors.Request(); })
.throw(PluginImplementationError, { id: 'plugin.context.missing_request_data' });
});
it('should replicate the right request information', () => {
let
request = new Request({
action: 'action',
controller: 'controller',
foobar: 'foobar',
_id: '_id',
index: 'index',
collection: 'collection',
result: 'result',
error: new Error('error'),
status: 666,
jwt: 'jwt',
volatile: {foo: 'bar'}
}, {
protocol: 'protocol',
connectionId: 'connectionId'
}),
pluginRequest = new context.constructors.Request(request, {});
should(pluginRequest.context.protocol).be.eql(request.context.protocol);
should(pluginRequest.context.connectionId).be.eql(request.context.connectionId);
should(pluginRequest.result).be.null();
should(pluginRequest.error).be.null();
should(pluginRequest.status).be.eql(102);
should(pluginRequest.input.action).be.null();
should(pluginRequest.input.controller).be.null();
should(pluginRequest.input.jwt).be.eql(request.input.jwt);
should(pluginRequest.input.args.foobar).be.eql(request.input.args.foobar);
should(pluginRequest.input.resource._id).be.eql(request.input.resource._id);
should(pluginRequest.input.resource.index).be.eql(request.input.resource.index);
should(pluginRequest.input.resource.collection).be.eql(request.input.resource.collection);
should(pluginRequest.input.volatile).match({foo: 'bar'});
});
it('should override origin request data with provided ones', () => {
let
request = new Request({
action: 'action',
controller: 'controller',
foo: 'foo',
bar: 'bar',
_id: '_id',
index: 'index',
collection: 'collection',
result: 'result',
error: new Error('error'),
status: 666,
jwt: 'jwt',
volatile: {foo: 'bar'}
}, {
protocol: 'protocol',
connectionId: 'connectionId'
}),
pluginRequest = new context.constructors.Request(request, {
action: 'pluginAction',
controller: 'pluginController',
foo: false,
from: 0,
size: 99,
collection: 'pluginCollection',
jwt: null,
volatile: {foo: 'overridden', bar: 'baz'}
});
should(pluginRequest.context.protocol).be.eql('protocol');
should(pluginRequest.context.connectionId).be.eql('connectionId');
should(pluginRequest.result).be.null();
should(pluginRequest.error).be.null();
should(pluginRequest.status).be.eql(102);
should(pluginRequest.input.action).be.eql('pluginAction');
should(pluginRequest.input.controller).be.eql('pluginController');
should(pluginRequest.input.jwt).be.null();
should(pluginRequest.input.args.foo).be.eql(false);
should(pluginRequest.input.args.bar).be.eql('bar');
should(pluginRequest.input.args.from).be.eql(0);
should(pluginRequest.input.args.size).be.eql(99);
should(pluginRequest.input.resource._id).be.eql('_id');
should(pluginRequest.input.resource.index).be.eql('index');
should(pluginRequest.input.resource.collection).be.eql('pluginCollection');
should(pluginRequest.input.volatile).match({foo: 'overridden', bar: 'baz'});
});
it('should allow building a request without providing another one', () => {
const rq = new context.constructors.Request({controller: 'foo', action: 'bar'});
should(rq).be.instanceOf(Request);
should(rq.input.action).be.eql('bar');
should(rq.
|
{
"pile_set_name": "Github"
}
| null | null |
#include <stdio.h>
int main(void)
{
int a, b, d;
int result;
a = 0x100;
b = 0x100;
result = 0x200;
__asm
("l.add %0, %0, %1\n\t"
: "+r"(a)
: "r"(b)
);
if (a != result) {
printf("add error\n");
return -1;
}
a = 0xffff;
b = 0x1;
result = 0x10000;
__asm
("l.add %0, %0, %1\n\t"
: "+r"(a)
: "r"(b)
);
if (a != result) {
printf("add error\n");
return -1;
}
a = 0x7fffffff;
b = 0x1;
__asm
("l.add %0, %1, %2\n\t"
: "=r"(d)
: "r"(b), "r"(a)
);
return 0;
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual 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.
*/
package org.jboss.modules;
import java.io.IOException;
import java.net.URI;
import java.util.Collection;
import org.jboss.modules.filter.PathFilter;
/**
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
final class FilteredResourceLoader implements ResourceLoader {
private final PathFilter filter;
private final ResourceLoader loader;
FilteredResourceLoader(final PathFilter filter, final ResourceLoader loader) {
this.filter = filter;
this.loader = loader;
}
@Deprecated
public String getRootName() {
return loader.getRootName();
}
public ClassSpec getClassSpec(final String fileName) throws IOException {
final String canonicalFileName = PathUtils.canonicalize(PathUtils.relativize(fileName));
return filter.accept(canonicalFileName) ? loader.getClassSpec(canonicalFileName) : null;
}
public PackageSpec getPackageSpec(final String name) throws IOException {
return loader.getPackageSpec(PathUtils.canonicalize(PathUtils.relativize(name)));
}
public Resource getResource(final String name) {
final String canonicalFileName = PathUtils.canonicalize(PathUtils.relativize(name));
return filter.accept(canonicalFileName) ? loader.getResource(canonicalFileName) : null;
}
public String getLibrary(final String name) {
return loader.getLibrary(PathUtils.canonicalize(PathUtils.relativize(name)));
}
public Collection<String> getPaths() {
return loader.getPaths();
}
public void close() {
loader.close();
}
public URI getLocation() {
return loader.getLocation();
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
{
"properties": {
"marathon-lb": {
"properties": {
"auto-assign-service-ports": {
"default": false,
"description": "Auto assign service ports for tasks which use IP-per-task. See https://github.com/mesosphere/marathon-lb#mesos-with-ip-per-task-support for details.",
"type": "boolean"
},
"bind-http-https": {
"default": true,
"description": "Reserve ports 80 and 443 for the LB. Use this if you intend to use virtual hosts.",
"type": "boolean"
},
"cpus": {
"default": 2,
"description": "CPU shares to allocate to each marathon-lb instance.",
"minimum": 1,
"type": "number"
},
"haproxy_global_default_options": {
"description": "Default global options for HAProxy.",
"type": "string",
"default": "redispatch,http-server-close,dontlognull"
},
"haproxy-group": {
"default": "external",
"description": "HAProxy group parameter. Matches with HAPROXY_GROUP in the app labels.",
"type": "string"
},
"haproxy-map": {
"default": true,
"description": "Enable HAProxy VHost maps for fast VHost routing.",
"type": "boolean"
},
"instances": {
"default": 1,
"description": "Number of instances to run.",
"minimum": 1,
"type": "integer"
},
"mem": {
"default": 1024.0,
"description": "Memory (MB) to allocate to each marathon-lb task.",
"minimum": 256.0,
"type": "number"
},
"minimumHealthCapacity": {
"default": 0.5,
"description": "Minimum health capacity.",
"minimum": 0,
"type": "number"
},
"maximumOverCapacity": {
"default": 0.2,
"description": "Maximum over capacity.",
"minimum": 0,
"type": "number"
},
"name": {
"default": "marathon-lb",
"description": "Name for this LB instance",
"type": "string"
},
"role": {
"default": "slave_public",
"description": "Deploy marathon-lb only on nodes with this role.",
"type": "string"
},
"ssl-cert": {
"description": "TLS Cert and private key for HTTPS.",
"type": "string"
},
"strict-mode": {
"default": false,
"description": "Enable strict mode. This requires that you explicitly enable each backend with `HAPROXY_{n}_ENABLED=true`.",
"type": "boolean"
},
"sysctl-params": {
"default": "net.ipv4.tcp_tw_reuse=1 net.ipv4.tcp_fin_timeout=30 net.ipv4.tcp_max_syn_backlog=10240 net.ipv4.tcp_max_tw_buckets=400000 net.ipv4.tcp_max_orphans=60000 net.core.somaxconn=10000",
"description": "sysctl params to set at startup for HAProxy.",
"type": "string"
},
"template-url": {
"default": "",
"description": "URL to tarball containing a directory templates/ to customize haproxy config.",
"type": "string"
},
"marathon-uri": {
"default": "http://marathon.mesos:8080",
"description": "URI of Marathon instance",
"type": "string"
},
"secret_name": {
"description": "Name of the Secret Store credentials to use for DC/OS service authentication. This should be left empty unless service authentication is needed.",
"type": "string",
"default": ""
}
},
"required": ["cpus", "mem", "haproxy-group", "instances", "name"],
"type": "object"
}
},
"type": "object"
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* jpeglib.h
*
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2002-2012 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file defines the application interface for the JPEG library.
* Most applications using the library need only include this file,
* and perhaps jerror.h if they want to know the exact error codes.
*/
#ifndef JPEGLIB_H
#define JPEGLIB_H
/*
* First we include the configuration files that record how this
* installation of the JPEG library is set up. jconfig.h can be
* generated automatically for many systems. jmorecfg.h contains
* manual configuration options that most people need not worry about.
*/
#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */
#include "jconfig.h" /* widely used configuration options */
#endif
#include "jmorecfg.h" /* seldom changed options */
#ifdef __cplusplus
#ifndef DONT_USE_EXTERN_C
extern "C" {
#endif
#endif
/* Version IDs for the JPEG library.
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 90".
*/
#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */
#define JPEG_LIB_VERSION_MAJOR 9
#define JPEG_LIB_VERSION_MINOR 0
/* Various constants determining the sizes of things.
* All of these are specified by the JPEG standard, so don't change them
* if you want to be compatible.
*/
#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */
#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */
#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */
#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */
#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */
#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */
#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */
/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;
* the PostScript DCT filter can emit files with many more than 10 blocks/MCU.
* If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU
* to handle it. We even let you do this from the jconfig.h file. However,
* we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe
* sometimes emits noncompliant files doesn't mean you should too.
*/
#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */
#ifndef D_MAX_BLOCKS_IN_MCU
#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */
#endif
/* Data structures for images (arrays of samples and of DCT coefficients).
* On 80x86 machines, the image arrays are too big for near pointers,
* but the pointer arrays can fit in near memory.
*/
typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */
typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */
typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */
typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */
typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */
typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */
typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */
typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */
/* Types for JPEG compression parameters and working tables. */
/* DCT coefficient quantization tables. */
typedef struct {
/* This array gives the coefficient quantizers in natural array order
* (not the zigzag order in which they are stored in a JPEG DQT marker).
* CAUTION: IJG versions prior to v6a kept this array in zigzag order.
*/
UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */
/* This field is used only during compression. It's initialized FALSE when
* the table is created, and set TRUE when it's been output to the file.
* You could suppress output of a table by setting this to TRUE.
* (See jpeg_suppress_tables for an example.)
*/
boolean sent_table; /* TRUE when table has been output */
} JQUANT_TBL;
/* Huffman coding tables. */
typedef struct {
/* These two fields directly represent the contents of a JPEG DHT marker */
UINT8 bits[17]; /* bits[k] = # of symbols with codes of */
/* length k bits; bits[0] is unused */
UINT8 huffval[256]; /* The symbols, in order of incr code length */
/* This field is used only during compression. It's initialized FALSE when
* the table is created, and set TRUE when it's been output to the file.
* You could suppress output of a table by setting this to TRUE.
* (See jpeg_suppress_tables for an example.)
*/
boolean sent_table; /* TRUE when table has been output */
} JHUFF_TBL;
/* Basic info about one component (color channel). */
typedef struct {
/* These values are fixed over the whole image. */
/* For compression, they must be supplied by parameter setup; */
/* for decompression, they are read from the SOF marker. */
int component_id; /* identifier for this component (0..255) */
int component_index; /* its index in SOF or cinfo->comp_info[] */
int h_samp_factor; /* horizontal sampling factor (1..4) */
int v_samp_factor; /* vertical sampling factor (1..4) */
int quant_tbl_no; /* quantization table selector (0..3) */
/* These values may vary between scans. */
/* For compression, they must be supplied by parameter setup; */
/* for decompression, they are read from the SOS marker. */
/* The decompressor output side may not use these variables. */
int dc_tbl_no; /* DC entropy table selector (0..3) */
int ac_tbl_no; /* AC entropy table selector (0..3) */
/* Remaining fields should be treated as private by applications. */
/* These values are computed during compression or decompression startup: */
/* Component's size in DCT blocks.
* Any dummy blocks added to complete an MCU are not counted; therefore
* these values do not depend on whether a scan is interleaved or not.
*/
JDIMENSION width_in_blocks;
JDIMENSION height_in_blocks;
/* Size of a DCT block in samples,
* reflecting any scaling we choose to apply during the DCT step.
* Values from 1 to 16 are supported.
* Note that different components may receive different DCT scalings.
*/
int DCT_h_scaled_size;
int DCT_v_scaled_size;
/* The downsampled dimensions are the component's actual, unpadded number
* of samples at the main buffer (preprocessing/compression interface);
* DCT scaling is included, so
* downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE)
* and similarly for height.
*/
JDIMENSION downsampled_width; /* actual width in samples */
JDIMENSION downsampled_height; /* actual height in samples */
/* This flag is used only for decompression. In cases where some of the
* components will be ignored (eg grayscale output from YCbCr image),
|
{
"pile_set_name": "Github"
}
| null | null |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
/**
An AudioSource that takes a PositionableAudioSource and allows it to be
played, stopped, started, etc.
This can also be told use a buffer and background thread to read ahead, and
if can correct for different sample-rates.
You may want to use one of these along with an AudioSourcePlayer and AudioIODevice
to control playback of an audio file.
@see AudioSource, AudioSourcePlayer
@tags{Audio}
*/
class JUCE_API AudioTransportSource : public PositionableAudioSource,
public ChangeBroadcaster
{
public:
//==============================================================================
/** Creates an AudioTransportSource.
After creating one of these, use the setSource() method to select an input source.
*/
AudioTransportSource();
/** Destructor. */
~AudioTransportSource() override;
//==============================================================================
/** Sets the reader that is being used as the input source.
This will stop playback, reset the position to 0 and change to the new reader.
The source passed in will not be deleted by this object, so must be managed by
the caller.
@param newSource the new input source to use. This may be a nullptr
@param readAheadBufferSize a size of buffer to use for reading ahead. If this
is zero, no reading ahead will be done; if it's
greater than zero, a BufferingAudioSource will be used
to do the reading-ahead. If you set a non-zero value here,
you'll also need to set the readAheadThread parameter.
@param readAheadThread if you set readAheadBufferSize to a non-zero value, then
you'll also need to supply this TimeSliceThread object for
the background reader to use. The thread object must not be
deleted while the AudioTransport source is still using it.
@param sourceSampleRateToCorrectFor if this is non-zero, it specifies the sample
rate of the source, and playback will be sample-rate
adjusted to maintain playback at the correct pitch. If
this is 0, no sample-rate adjustment will be performed
@param maxNumChannels the maximum number of channels that may need to be played
*/
void setSource (PositionableAudioSource* newSource,
int readAheadBufferSize = 0,
TimeSliceThread* readAheadThread = nullptr,
double sourceSampleRateToCorrectFor = 0.0,
int maxNumChannels = 2);
//==============================================================================
/** Changes the current playback position in the source stream.
The next time the getNextAudioBlock() method is called, this
is the time from which it'll read data.
@param newPosition the new playback position in seconds
@see getCurrentPosition
*/
void setPosition (double newPosition);
/** Returns the position that the next data block will be read from
This is a time in seconds.
*/
double getCurrentPosition() const;
/** Returns the stream's length in seconds. */
double getLengthInSeconds() const;
/** Returns true if the player has stopped because its input stream ran out of data. */
bool hasStreamFinished() const noexcept { return inputStreamEOF; }
//==============================================================================
/** Starts playing (if a source has been selected).
If it starts playing, this will send a message to any ChangeListeners
that are registered with this object.
*/
void start();
/** Stops playing.
If it's actually playing, this will send a message to any ChangeListeners
that are registered with this object.
*/
void stop();
/** Returns true if it's currently playing. */
bool isPlaying() const noexcept { return playing; }
//==============================================================================
/** Changes the gain to apply to the output.
@param newGain a factor by which to multiply the outgoing samples,
so 1.0 = 0dB, 0.5 = -6dB, 2.0 = 6dB, etc.
*/
void setGain (float newGain) noexcept;
/** Returns the current gain setting.
@see setGain
*/
float getGain() const noexcept { return gain; }
//==============================================================================
/** Implementation of the AudioSource method. */
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
/** Implementation of the AudioSource method. */
void releaseResources() override;
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo&) override;
//==============================================================================
/** Implements the PositionableAudioSource method. */
void setNextReadPosition (int64 newPosition) override;
/** Implements the PositionableAudioSource method. */
int64 getNextReadPosition() const override;
/** Implements the PositionableAudioSource method. */
int64 getTotalLength() const override;
/** Implements the PositionableAudioSource method. */
bool isLooping() const override;
private:
//==============================================================================
PositionableAudioSource* source = nullptr;
ResamplingAudioSource* resamplerSource = nullptr;
BufferingAudioSource* bufferingSource = nullptr;
PositionableAudioSource* positionableSource = nullptr;
AudioSource* masterSource = nullptr;
CriticalSection callbackLock;
float gain = 1.0f, lastGain = 1.0f;
bool playing = false, stopped = true;
double sampleRate = 44100.0, sourceSampleRate = 0;
int blockSize = 128, readAheadBufferSize = 0;
bool isPrepared = false, inputStreamEOF = false;
void releaseMasterResources();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioTransportSource)
};
} // namespace juce
|
{
"pile_set_name": "Github"
}
| null | null |
<?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>Author</key>
<string>lihaoyun6</string>
<key>Description</key>
<string>mac_default2</string>
<key>Theme</key>
<dict>
<key>Anime</key>
<array>
<dict>
<key>DistanceFromScreenEdgeX%</key>
<integer>64</integer>
<key>DistanceFromScreenEdgeY%</key>
<integer>40</integer>
<key>Frames</key>
<integer>1</integer>
<key>ID</key>
<integer>2</integer>
<key>NudgeX</key>
<integer>-3</integer>
<key>NudgeY</key>
<integer>-1</integer>
<key>Path</key>
<string>logo_about</string>
<key>ScreenEdgeX</key>
<string>right</string>
<key>ScreenEdgeY</key>
<string>top</string>
</dict>
<dict>
<key>DistanceFromScreenEdgeX%</key>
<integer>64</integer>
<key>DistanceFromScreenEdgeY%</key>
<integer>40</integer>
<key>Frames</key>
<integer>1</integer>
<key>ID</key>
<integer>3</integer>
<key>NudgeX</key>
<integer>2</integer>
<key>NudgeY</key>
<integer>1</integer>
<key>Path</key>
<string>logo_help</string>
<key>ScreenEdgeX</key>
<string>right</string>
<key>ScreenEdgeY</key>
<string>top</string>
</dict>
<dict>
<key>DistanceFromScreenEdgeX%</key>
<integer>64</integer>
<key>DistanceFromScreenEdgeY%</key>
<integer>40</integer>
<key>Frames</key>
<integer>1</integer>
<key>ID</key>
<integer>4</integer>
<key>NudgeX</key>
<integer>2</integer>
<key>NudgeY</key>
<integer>1</integer>
<key>Path</key>
<string>logo_options</string>
<key>ScreenEdgeX</key>
<string>right</string>
<key>ScreenEdgeY</key>
<string>top</string>
</dict>
<dict>
<key>DistanceFromScreenEdgeX%</key>
<integer>38</integer>
<key>DistanceFromScreenEdgeY%</key>
<integer>75</integer>
<key>FrameTime</key>
<integer>150</integer>
<key>Frames</key>
<integer>5</integer>
<key>ID</key>
<integer>1</integer>
<key>NudgeX</key>
<integer>2</integer>
<key>NudgeY</key>
<integer>1</integer>
<key>Path</key>
<string>logo_wifi</string>
<key>ScreenEdgeX</key>
<string>right</string>
<key>ScreenEdgeY</key>
<string>top</string>
</dict>
</array>
<key>Background</key>
<dict>
<key>Path</key>
<string>background.png</string>
<key>Type</key>
<string>Tile</string>
</dict>
<key>Badges</key>
<dict>
<key>Inline</key>
<false/>
<key>Show</key>
<false/>
<key>Swap</key>
<false/>
</dict>
<key>BootCampStyle</key>
<true/>
<key>Components</key>
<dict>
<key>Banner</key>
<false/>
<key>Functions</key>
<true/>
<key>Label</key>
<true/>
<key>MenuTitle</key>
<false/>
<key>MenuTitleImage</key>
<false/>
<key>Revision</key>
<false/>
<key>Tools</key>
<false/>
</dict>
<key>Font</key>
<dict>
<key>CharWidth</key>
<integer>25</integer>
<key>Path</key>
<string>font_mac_default2.png</string>
<key>Proportional</key>
<true/>
<key>Type</key>
<string>Load</string>
</dict>
<key>Layout</key>
<dict>
<key>BannerOffset</key>
<integer>-10</integer>
<key>ButtonOffset</key>
<integer>-35</integer>
<key>SelectionBigWidth</key>
<integer>247</integer>
<key>TileXSpace</key>
<integer>100</integer>
</dict>
<key>Origination</key>
<dict>
<key>DesignHeight</key>
<integer>1080</integer>
<key>DesignWidth</key>
<integer>1920</integer>
</dict>
<key>Selection</key>
<dict>
<key>Big</key>
<string>Selection_big.png</string>
<key>ChangeNonSelectedGrey</key>
<false/>
<key>Color</key>
<string>0xf8f8f872</string>
<key>OnTop</key>
<false/>
<key>Small</key>
<string>selection_small.png</string>
</dict>
</dict>
<key>Year</key>
<string>2017/2</string>
</dict>
</plist>
|
{
"pile_set_name": "Github"
}
| null | null |
import ApiService from './ApiService'
const ImageService = {
/**
* Search for images by keyword.
*/
search(params) {
return ApiService.query('images', params)
},
getProviderCollection(params) {
return ApiService.query('images', params)
},
/**
* Retreive image details by Id number.
* SSR-called
*/
getImageDetail(params) {
if (!params.id) {
throw new Error(
'[RWV] ImageService.getImageDetail() id parameter required to retreive image details.'
)
}
return ApiService.get('images', params.id)
},
getRelatedImages(params) {
if (!params.id) {
throw new Error(
'[RWV] ImageService.getRelatedImages() id parameter required to retreive related images.'
)
}
return ApiService.get('recommendations/images', params.id)
},
}
export default ImageService
|
{
"pile_set_name": "Github"
}
| null | null |
{
"activePlaceCount": 0,
"birth": {
"place": {
"name": "Chester, United Kingdom",
"placeName": "Chester",
"placeType": "inhabited_place"
},
"time": {
"startYear": 1911
}
},
"birthYear": 1911,
"date": "1911\u20131997",
"death": {
"time": {
"startYear": 1997
}
},
"fc": "Austin Wright",
"gender": "Male",
"id": 3095,
"mda": "Wright, Austin",
"movements": [],
"startLetter": "W",
"totalWorks": 1,
"url": "http://www.tate.org.uk/art/artists/austin-wright-3095"
}
|
{
"pile_set_name": "Github"
}
| null | null |
var github = (function(){
function escapeHtml(str) {
return $('<div/>').text(str).html();
}
function render(target, repos){
var i = 0, fragment = '', t = $(target)[0];
fragment += '<ul class="list-group" id="github">';
for(i = 0; i < repos.length; i++) {
fragment += '<li class="list-group-item"><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p><small>'+escapeHtml(repos[i].description||'')+'</small></p></li>';
}
fragment += '</ul>';
t.innerHTML = fragment;
}
return {
showRepos: function(options){
$.ajax({
url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
, dataType: 'jsonp'
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
, success: function(data) {
var repos = [];
if (!data || !data.data) { return; }
for (var i = 0; i < data.data.length; i++) {
if (options.skip_forks && data.data[i].fork) { continue; }
repos.push(data.data[i]);
}
repos.sort(function(a, b) {
var aDate = new Date(a.pushed_at).valueOf(),
bDate = new Date(b.pushed_at).valueOf();
if (aDate === bDate) { return 0; }
return aDate > bDate ? -1 : 1;
});
if (options.count) { repos.splice(options.count); }
render(options.target, repos);
}
});
}
};
})();
|
{
"pile_set_name": "Github"
}
| null | null |
// go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build openbsd,arm
package unix
import (
"syscall"
"unsafe"
)
var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int
|
{
"pile_set_name": "Github"
}
| null | null |
/**
* Copyright 2016 IBM Corp.
*
* 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.
*/
/**
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
*/
package services
import (
"fmt"
"strings"
"github.com/softlayer/softlayer-go/datatypes"
"github.com/softlayer/softlayer-go/session"
"github.com/softlayer/softlayer-go/sl"
)
// The SoftLayer_Survey data type contains general information relating to a single SoftLayer survey.
type Survey struct {
Session *session.Session
Options sl.Options
}
// GetSurveyService returns an instance of the Survey SoftLayer service
func GetSurveyService(sess *session.Session) Survey {
return Survey{Session: sess}
}
func (r Survey) Id(id int) Survey {
r.Options.Id = &id
return r
}
func (r Survey) Mask(mask string) Survey {
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
mask = fmt.Sprintf("mask[%s]", mask)
}
r.Options.Mask = mask
return r
}
func (r Survey) Filter(filter string) Survey {
r.Options.Filter = filter
return r
}
func (r Survey) Limit(limit int) Survey {
r.Options.Limit = &limit
return r
}
func (r Survey) Offset(offset int) Survey {
r.Options.Offset = &offset
return r
}
// Provides survey details for the given type
func (r Survey) GetActiveSurveyByType(typ *string) (resp datatypes.Survey, err error) {
params := []interface{}{
typ,
}
err = r.Session.DoRequest("SoftLayer_Survey", "getActiveSurveyByType", params, &r.Options, &resp)
return
}
// getObject retrieves the SoftLayer_Survey object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Survey service. You can only retrieve the survey that your portal user has taken.
func (r Survey) GetObject() (resp datatypes.Survey, err error) {
err = r.Session.DoRequest("SoftLayer_Survey", "getObject", nil, &r.Options, &resp)
return
}
// Retrieve The questions for a survey.
func (r Survey) GetQuestions() (resp []datatypes.Survey_Question, err error) {
err = r.Session.DoRequest("SoftLayer_Survey", "getQuestions", nil, &r.Options, &resp)
return
}
// Retrieve The status of the survey
func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) {
err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp)
return
}
// Retrieve The type of survey
func (r Survey) GetType() (resp datatypes.Survey_Type, err error) {
err = r.Session.DoRequest("SoftLayer_Survey", "getType", nil, &r.Options, &resp)
return
}
// Response to a SoftLayer survey's questions.
func (r Survey) TakeSurvey(responses []datatypes.Survey_Response) (resp bool, err error) {
params := []interface{}{
responses,
}
err = r.Session.DoRequest("SoftLayer_Survey", "takeSurvey", params, &r.Options, &resp)
return
}
|
{
"pile_set_name": "Github"
}
| null | null |
name=Gauntlets of Chaos
image=https://magiccards.info/scans/en/5e/373.jpg
value=2.909
rarity=R
type=Artifact
cost={5}
ability={5}, Sacrifice SN: Exchange control of target artifact, creature, or land you control and target permanent an opponent controls that shares one of those types with it. If those permanents are exchanged this way, destroy all Auras attached to them.
timing=artifact
oracle={5}, Sacrifice Gauntlets of Chaos: Exchange control of target artifact, creature, or land you control and target permanent an opponent controls that shares one of those types with it. If those permanents are exchanged this way, destroy all Auras attached to them.
status=not supported: multiple-targets
|
{
"pile_set_name": "Github"
}
| null | null |
/**************************************************************************\
* 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.
\**************************************************************************/
#ifndef COIN_SOSUBNODEENGINEP_H
#define COIN_SOSUBNODEENGINEP_H
// The macro definitions in this file is used internally by Coin
// classes, and mirrors some of the public macros available in
// SoSubEngine.h with a few modifications so they are suited for the
// builtin classes.
//
// The macros in this file are not made visible for use by the
// application programmer.
#ifndef COIN_INTERNAL
#error this is a private header file
#endif // !COIN_INTERNAL
#include <Inventor/engines/SoSubNodeEngine.h>
#include "tidbitsp.h"
// Be aware that any changes to the SO_ENGINE_INTERNAL_CONSTRUCTOR
// macro should be matched by similar changes to the constructor in
// the SO_INTERPOLATE_SOURCE macro (which have to use
// SO_ENGINE_CONSTRUCTOR because it is "public").
// Update 2006-08-11, pederb:
// The INIT_CLASS macros will now set the node type to VRML97. All
// node-engines in Coin are VRML97 nodes. If we add node engines that
// are not VRML97 nodes we need to add some new macros.
#define SO_NODEENGINE_INTERNAL_CONSTRUCTOR(_class_) \
do { \
SO_NODEENGINE_CONSTRUCTOR(_class_); \
/* Restore value of isBuiltIn flag (which is set to FALSE */ \
/* in the SO_ENGINE_CONSTRUCTOR() macro). */ \
this->isBuiltIn = TRUE; \
} while (0)
#define SO_NODEENGINE_INTERNAL_INIT_CLASS(_class_) \
do { \
const char * classname = SO__QUOTE(_class_); \
PRIVATE_COMMON_NODEENGINE_INIT_CODE(_class_, &classname[2], &_class_::createInstance, inherited); \
SoNode::setCompatibilityTypes(_class_::getClassTypeId(), SO_VRML97_NODE_TYPE); \
coin_atexit((coin_atexit_f*)_class_::atexit_cleanupnodeengine, CC_ATEXIT_NORMAL); \
coin_atexit((coin_atexit_f*)_class_::atexit_cleanup, CC_ATEXIT_NORMAL); \
} while (0)
#define SO_NODEENGINE_INTERNAL_INIT_ABSTRACT_CLASS(_class_) \
do { \
const char * classname = SO__QUOTE(_class_); \
PRIVATE_COMMON_NODEENGINE_INIT_CODE(_class_, &classname[2], NULL, inherited); \
SoNode::setCompatibilityTypes(_class_::getClassTypeId(), SO_VRML97_NODE_TYPE); \
coin_atexit((coin_atexit_f*)_class_::atexit_cleanupnodeengine, CC_ATEXIT_NORMAL); \
coin_atexit((coin_atexit_f*)_class_::atexit_cleanup, CC_ATEXIT_NORMAL); \
} while (0)
#endif // COIN_SOSUBNODEENGINEP_H
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2014, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link https://www.phptesting.org/
*/
namespace PHPCI\Helper;
/**
* User Helper - Provides access to logged in user information in views.
* @author Dan Cryer <dan@block8.co.uk>
* @package PHPCI
* @subpackage Web
*/
class Build
{
/**
* Returns a more human-friendly version of a plugin name.
* @param $name
* @return mixed
*/
public function formatPluginName($name)
{
return str_replace('Php', 'PHP', ucwords(str_replace('_', ' ', $name)));
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
# Default values for node projects.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: draft
tag: dev
pullPolicy: IfNotPresent
service:
name: activiti-modeling-app
type: ClusterIP
externalPort: 80
internalPort: 8080
annotations:
fabric8.io/expose: "true"
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
resources:
limits:
cpu: 400m
memory: 256Mi
requests:
cpu: 200m
memory: 128Mi
probePath: /
livenessProbe:
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
terminationGracePeriodSeconds: 10
|
{
"pile_set_name": "Github"
}
| null | null |
/* SPDX-License-Identifier: GPL-2.0 */
/*
* rt1016.h -- RT1016 ALSA SoC audio amplifier driver
*
* Copyright 2020 Realtek Semiconductor Corp.
* Author: Oder Chiou <oder_chiou@realtek.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __RT1016_H__
#define __RT1016_H__
#define RT1016_DEVICE_ID_VAL 0x6595
#define RT1016_RESET 0x00
#define RT1016_PADS_CTRL_1 0x01
#define RT1016_PADS_CTRL_2 0x02
#define RT1016_I2C_CTRL 0x03
#define RT1016_VOL_CTRL_1 0x04
#define RT1016_VOL_CTRL_2 0x05
#define RT1016_VOL_CTRL_3 0x06
#define RT1016_ANA_CTRL_1 0x07
#define RT1016_MUX_SEL 0x08
#define RT1016_RX_I2S_CTRL 0x09
#define RT1016_ANA_FLAG 0x0a
#define RT1016_VERSION2_ID 0x0c
#define RT1016_VERSION1_ID 0x0d
#define RT1016_VENDER_ID 0x0e
#define RT1016_DEVICE_ID 0x0f
#define RT1016_ANA_CTRL_2 0x11
#define RT1016_TEST_SIGNAL 0x1c
#define RT1016_TEST_CTRL_1 0x1d
#define RT1016_TEST_CTRL_2 0x1e
#define RT1016_TEST_CTRL_3 0x1f
#define RT1016_CLOCK_1 0x20
#define RT1016_CLOCK_2 0x21
#define RT1016_CLOCK_3 0x22
#define RT1016_CLOCK_4 0x23
#define RT1016_CLOCK_5 0x24
#define RT1016_CLOCK_6 0x25
#define RT1016_CLOCK_7 0x26
#define RT1016_I2S_CTRL 0x40
#define RT1016_DAC_CTRL_1 0x60
#define RT1016_SC_CTRL_1 0x80
#define RT1016_SC_CTRL_2 0x81
#define RT1016_SC_CTRL_3 0x82
#define RT1016_SC_CTRL_4 0x83
#define RT1016_SIL_DET 0xa0
#define RT1016_SYS_CLK 0xc0
#define RT1016_BIAS_CUR 0xc1
#define RT1016_DAC_CTRL_2 0xc2
#define RT1016_LDO_CTRL 0xc3
#define RT1016_CLASSD_1 0xc4
#define RT1016_PLL1 0xc5
#define RT1016_PLL2 0xc6
#define RT1016_PLL3 0xc7
#define RT1016_CLASSD_2 0xc8
#define RT1016_CLASSD_OUT 0xc9
#define RT1016_CLASSD_3 0xca
#define RT1016_CLASSD_4 0xcb
#define RT1016_CLASSD_5 0xcc
#define RT1016_PWR_CTRL 0xcf
/* global definition */
#define RT1016_L_VOL_MASK (0xff << 8)
#define RT1016_L_VOL_SFT 8
#define RT1016_R_VOL_MASK (0xff)
#define RT1016_R_VOL_SFT 0
/* 0x04 */
#define RT1016_DA_MUTE_L_SFT 7
#define RT1016_DA_MUTE_R_SFT 6
/* 0x20 */
#define RT1016_CLK_SYS_SEL_MASK (0x1 << 15)
#define RT1016_CLK_SYS_SEL_SFT 15
#define RT1016_CLK_SYS_SEL_MCLK (0x0 << 15)
#define RT1016_CLK_SYS_SEL_PLL (0x1 << 15)
#define RT1016_PLL_SEL_MASK (0x1 << 13)
#define RT1016_PLL_SEL_SFT 13
#define RT1016_PLL_SEL_MCLK (0x0 << 13)
#define RT1016_PLL_SEL_BCLK (0x1 << 13)
/* 0x21 */
#define RT1016_FS_PD_MASK (0x7 << 13)
#define RT1016_FS_PD_SFT 13
#define RT1016_OSR_PD_MASK (0x3 << 10)
#define RT1016_OSR_PD_SFT 10
/* 0x22 */
#define RT1016_PWR_DAC_FILTER (0x1 << 11)
#define RT1016_PWR_DAC_FILTER_BIT 11
#define RT1016_PWR_DACMOD (0x1 << 10)
#define RT1016_PWR_DACMOD_BIT 10
#define RT1016_PWR_CLK_FIFO (0x1 << 9)
#define RT1016_PWR_CLK_FIFO_BIT 9
#define RT1016_PWR_CLK_PUREDC (0x1 << 8)
#define RT1016_PWR_CLK_PUREDC_BIT 8
#define RT1016_PWR_SIL_DET (0x1 << 7)
#define RT1016_PWR_SIL_DET_BIT 7
#define RT1016_PWR_RC_25M (0x1 << 6)
#define RT1016_PWR_RC_25M_BIT 6
#define RT1016_PWR_PLL1 (0x1 << 5)
#define RT1016_PWR_PLL1_BIT 5
#define RT1016_PWR_ANA_CTRL (0x1 << 4)
#define RT1016_PWR_ANA_CTRL_BIT 4
#define RT1016_PWR_CLK_SYS (0x1 << 3)
#define RT1016_PWR_CLK_SYS_BIT 3
/* 0x23 */
#define RT1016_PWR_LRCK_DET (0x1 << 15)
#define RT1016_PWR_LRCK_DET_BIT 15
#define RT1016_PWR_BCLK_DET (0x1 << 11)
#define RT1016_PWR_BCLK_DET_BIT 11
/* 0x40 */
#define RT1016_I2S_BCLK_MS_MASK (0x1 << 15)
#define RT1016_I2S_BCLK_MS_SFT 15
#define RT1016_I2S_BCLK_MS_32 (0x0 << 15)
#define RT1016_I2S_BCLK_MS_64 (0x1 << 15)
#define RT1016_I2S_BCLK_POL_MASK (0x1 << 13)
#define RT1016_I2S_BCLK_POL_SFT 13
#define RT1016_I2S_BCLK_POL_NOR (0x0 << 13)
#define RT1016_I2S_BCLK_POL_INV (0x1 << 13)
#define RT1016_I2S_DATA_SWAP_MASK (0x1 << 10)
#define RT1016_I2S_DATA_SWAP_SFT 10
#define RT1016_I2S_DL_MASK (0x7 << 4)
#define RT1016_I2S_DL_SFT 4
#define RT1016_I2S_DL_16 (0x1 << 4)
#define RT1016_I2S_DL_20 (0x2 << 4)
#define RT1016_I2S_DL_24 (0x3 << 4)
#define RT1016_I2S_DL_32 (0x4 << 4)
#define RT1016_I2
|
{
"pile_set_name": "Github"
}
| null | null |
[@scale < 3000] {
mark: symbol(circle);
:mark {
fill: gray;
size: 5;
};
[type = 'important'] {
mark: symbol(triangle);
:mark {
fill: red;
stroke: yellow;
}
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
context("Machine Learning Random Forest Clustering")
options <- jasptools::analysisOptions("mlClusteringRandomForest")
options$addClusters <- FALSE
options$clusterColumn <- ""
options$clusterEvaluationMetrics <- TRUE
options$importanceTable <- TRUE
options$modelOpt <- "validationOptimized"
options$plot2dCluster <- TRUE
options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols",
"Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color",
"Hue", "Dilution", "Proline")
options$seedBox <- TRUE
options$tableClusterInfoBetweenSumSquares <- TRUE
options$tableClusterInfoSilhouette <- TRUE
options$tableClusterInfoTotalSumSquares <- TRUE
options$withinssPlot <- TRUE
options$plotClusterMeans <- TRUE
options$showBars <- TRUE
options$oneFigure <- TRUE
set.seed(1)
results <- jasptools::run("mlClusteringRandomForest", "wine.csv", options)
test_that("Evaluation Metrics table results match", {
table <- results[["results"]][["clusterEvaluationMetrics"]][["data"]]
expect_equal_tables(table,
list("Maximum diameter", 11.1799587393255, "Minimum separation", 1.91296244175494,
"Pearson's <unicode><unicode>", 0.556526809045383, "Dunn index",
0.171106395502703, "Entropy", 1.07850807265, "Calinski-Harabasz index",
64.0845132710531))
})
test_that("Cluster Information table results match", {
table <- results[["results"]][["clusterInfoTable"]][["data"]]
expect_equal_tables(table,
list(1, 0.201146634109287, 0.409774198440774, 57, 267.166873258102,
2, 0.605247626150293, 0.0820430005029718, 75, 803.901673729259,
3, 0.19360573974042, 0.394537832399485, 46, 257.15091062954
))
})
test_that("All predictors plot matches", {
plotName <- results[["results"]][["clusterMeans"]][["collection"]][["clusterMeans_oneFigure"]][["data"]]
testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]]
expect_equal_plots(testPlot, "all-predictors", dir="mlClusteringRandomForest")
})
test_that("Random Forest Clustering table results match", {
table <- results[["results"]][["clusteringTable"]][["data"]]
expect_equal_tables(table,
list(0.27, 1406.22, 1530.31, 3, 0.422764251361625, 178))
})
test_that("Variable Importance table results match", {
table <- results[["results"]][["importanceTable"]][["data"]]
expect_equal_tables(table,
list(20.9122039237879, "Flavanoids", 16.7564424183852, "Phenols", 16.1286527609624,
"Dilution", 14.8508385264296, "Proline", 14.5421300011253, "Color",
13.6772809549555, "Hue", 13.4601315432519, "Alcohol", 13.4314873093631,
"Proanthocyanins", 11.6570120327778, "Malic", 11.0596207822425,
"Alcalinity", 10.9112870469843, "Nonflavanoids", 10.058673972256,
"Magnesium", 10.0524690645575, "Ash"))
})
test_that("Elbow Method Plot matches", {
plotName <- results[["results"]][["optimPlot"]][["data"]]
testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]]
expect_equal_plots(testPlot, "elbow-method-plot", dir="mlClusteringRandomForest")
})
test_that("t-SNE Cluster Plot matches", {
skip("Does not reproduce on windows <-> osx")
plotName <- results[["results"]][["plot2dCluster"]][["data"]]
testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]]
expect_equal_plots(testPlot, "t-sne-cluster-plot", dir="mlClusteringRandomForest")
})
|
{
"pile_set_name": "Github"
}
| null | null |
# Startup Demo
This demo shows how to load a texture, ask the engine to tell us when all textures have loaded into memory, create a
scene, viewport and a custom entity class that is defined in the gameClasses/Rotator.js class which we use to make a
couple of fairy entities from.
This demo is a client-side only demo. Load the index.html file.
|
{
"pile_set_name": "Github"
}
| null | null |
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bidirule
import (
"testing"
"golang.org/x/text/internal/testtext"
)
var benchData = []struct{ name, data string }{
{"ascii", "Scheveningen"},
{"arabic", "دبي"},
{"hangul", "다음과"},
}
func doBench(b *testing.B, fn func(b *testing.B, data string)) {
for _, d := range benchData {
testtext.Bench(b, d.name, func(b *testing.B) { fn(b, d.data) })
}
}
func BenchmarkSpan(b *testing.B) {
r := New()
doBench(b, func(b *testing.B, str string) {
b.SetBytes(int64(len(str)))
data := []byte(str)
for i := 0; i < b.N; i++ {
r.Reset()
r.Span(data, true)
}
})
}
func BenchmarkDirectionASCII(b *testing.B) {
doBench(b, func(b *testing.B, str string) {
b.SetBytes(int64(len(str)))
data := []byte(str)
for i := 0; i < b.N; i++ {
Direction(data)
}
})
}
func BenchmarkDirectionStringASCII(b *testing.B) {
doBench(b, func(b *testing.B, str string) {
b.SetBytes(int64(len(str)))
for i := 0; i < b.N; i++ {
DirectionString(str)
}
})
}
|
{
"pile_set_name": "Github"
}
| null | null |
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
/**
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
*/
exports.encode = function (number) {
if (0 <= number && number < intToCharMap.length) {
return intToCharMap[number];
}
throw new TypeError("Must be between 0 and 63: " + number);
};
/**
* Decode a single base 64 character code digit to an integer. Returns -1 on
* failure.
*/
exports.decode = function (charCode) {
var bigA = 65; // 'A'
var bigZ = 90; // 'Z'
var littleA = 97; // 'a'
var littleZ = 122; // 'z'
var zero = 48; // '0'
var nine = 57; // '9'
var plus = 43; // '+'
var slash = 47; // '/'
var littleOffset = 26;
var numberOffset = 52;
// 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
if (bigA <= charCode && charCode <= bigZ) {
return (charCode - bigA);
}
// 26 - 51: abcdefghijklmnopqrstuvwxyz
if (littleA <= charCode && charCode <= littleZ) {
return (charCode - littleA + littleOffset);
}
// 52 - 61: 0123456789
if (zero <= charCode && charCode <= nine) {
return (charCode - zero + numberOffset);
}
// 62: +
if (charCode == plus) {
return 62;
}
// 63: /
if (charCode == slash) {
return 63;
}
// Invalid base64 digit.
return -1;
};
|
{
"pile_set_name": "Github"
}
| null | null |
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 ~ 2010 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package tools;
/**
* Represents a pair of values.
*
* @author Frz
* @since Revision 333
* @version 1.0
*
* @param <E> The type of the left value.
* @param <F> The type of the right value.
*/
public class Pair<E, F> {
public E left;
public F right;
/**
* Class constructor - pairs two objects together.
*
* @param left The left object.
* @param right The right object.
*/
public Pair(E left, F right) {
this.left = left;
this.right = right;
}
/**
* Gets the left value.
*
* @return The left value.
*/
public E getLeft() {
return left;
}
/**
* Gets the right value.
*
* @return The right value.
*/
public F getRight() {
return right;
}
/**
* Turns the pair into a string.
*
* @return Each value of the pair as a string joined with a colon.
*/
@Override
public String toString() {
return left.toString() + ":" + right.toString();
}
/**
* Gets the hash code of this pair.
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((left == null) ? 0 : left.hashCode());
result = prime * result + ((right == null) ? 0 : right.hashCode());
return result;
}
/**
* Checks to see if two pairs are equal.
*/
@SuppressWarnings("unchecked")
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Pair other = (Pair) obj;
if (left == null) {
if (other.left != null) {
return false;
}
} else if (!left.equals(other.left)) {
return false;
}
if (right == null) {
if (other.right != null) {
return false;
}
} else if (!right.equals(other.right)) {
return false;
}
return true;
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_array_almost_equal
from scipy.sparse.csgraph import (breadth_first_tree, depth_first_tree,
csgraph_to_dense, csgraph_from_dense)
def test_graph_breadth_first():
csgraph = np.array([[0, 1, 2, 0, 0],
[1, 0, 0, 0, 3],
[2, 0, 0, 7, 0],
[0, 0, 7, 0, 1],
[0, 3, 0, 1, 0]])
csgraph = csgraph_from_dense(csgraph, null_value=0)
bfirst = np.array([[0, 1, 2, 0, 0],
[0, 0, 0, 0, 3],
[0, 0, 0, 7, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]])
for directed in [True, False]:
bfirst_test = breadth_first_tree(csgraph, 0, directed)
assert_array_almost_equal(csgraph_to_dense(bfirst_test),
bfirst)
def test_graph_depth_first():
csgraph = np.array([[0, 1, 2, 0, 0],
[1, 0, 0, 0, 3],
[2, 0, 0, 7, 0],
[0, 0, 7, 0, 1],
[0, 3, 0, 1, 0]])
csgraph = csgraph_from_dense(csgraph, null_value=0)
dfirst = np.array([[0, 1, 0, 0, 0],
[0, 0, 0, 0, 3],
[0, 0, 0, 0, 0],
[0, 0, 7, 0, 0],
[0, 0, 0, 1, 0]])
for directed in [True, False]:
dfirst_test = depth_first_tree(csgraph, 0, directed)
assert_array_almost_equal(csgraph_to_dense(dfirst_test),
dfirst)
def test_graph_breadth_first_trivial_graph():
csgraph = np.array([[0]])
csgraph = csgraph_from_dense(csgraph, null_value=0)
bfirst = np.array([[0]])
for directed in [True, False]:
bfirst_test = breadth_first_tree(csgraph, 0, directed)
assert_array_almost_equal(csgraph_to_dense(bfirst_test),
bfirst)
def test_graph_depth_first_trivial_graph():
csgraph = np.array([[0]])
csgraph = csgraph_from_dense(csgraph, null_value=0)
bfirst = np.array([[0]])
for directed in [True, False]:
bfirst_test = depth_first_tree(csgraph, 0, directed)
assert_array_almost_equal(csgraph_to_dense(bfirst_test),
bfirst)
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (C) 2005 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.
*/
#ifndef ANDROID_STRING8_H
#define ANDROID_STRING8_H
#include <utils/Errors.h>
#include <utils/SharedBuffer.h>
#include <utils/Unicode.h>
#include <utils/TypeHelpers.h>
#include <string.h> // for strcmp
#include <stdarg.h>
// ---------------------------------------------------------------------------
namespace android {
class String16;
class TextOutput;
//! This is a string holding UTF-8 characters. Does not allow the value more
// than 0x10FFFF, which is not valid unicode codepoint.
class String8
{
public:
String8();
String8(const String8& o);
explicit String8(const char* o);
explicit String8(const char* o, size_t numChars);
explicit String8(const String16& o);
explicit String8(const char16_t* o);
explicit String8(const char16_t* o, size_t numChars);
explicit String8(const char32_t* o);
explicit String8(const char32_t* o, size_t numChars);
~String8();
static inline const String8 empty();
static String8 format(const char* fmt, ...) __attribute__((format (printf, 1, 2)));
static String8 formatV(const char* fmt, va_list args);
inline const char* string() const;
inline size_t size() const;
inline size_t length() const;
inline size_t bytes() const;
inline bool isEmpty() const;
inline const SharedBuffer* sharedBuffer() const;
void clear();
void setTo(const String8& other);
status_t setTo(const char* other);
status_t setTo(const char* other, size_t numChars);
status_t setTo(const char16_t* other, size_t numChars);
status_t setTo(const char32_t* other,
size_t length);
status_t append(const String8& other);
status_t append(const char* other);
status_t append(const char* other, size_t numChars);
status_t appendFormat(const char* fmt, ...)
__attribute__((format (printf, 2, 3)));
status_t appendFormatV(const char* fmt, va_list args);
// Note that this function takes O(N) time to calculate the value.
// No cache value is stored.
size_t getUtf32Length() const;
int32_t getUtf32At(size_t index,
size_t *next_index) const;
void getUtf32(char32_t* dst) const;
inline String8& operator=(const String8& other);
inline String8& operator=(const char* other);
inline String8& operator+=(const String8& other);
inline String8 operator+(const String8& other) const;
inline String8& operator+=(const char* other);
inline String8 operator+(const char* other) const;
inline int compare(const String8& other) const;
inline bool operator<(const String8& other) const;
inline bool operator<=(const String8& other) const;
inline bool operator==(const String8& other) const;
inline bool operator!=(const String8& other) const;
inline bool operator>=(const String8& other) const;
inline bool operator>(const String8& other) const;
inline bool operator<(const char* other) const;
inline bool operator<=(const char* other) const;
inline bool operator==(const char* other) const;
inline bool operator!=(const char* other) const;
inline bool operator>=(const char* other) const;
inline bool operator>(const char* other) const;
inline operator const char*() const;
char* lockBuffer(size_t size);
void unlockBuffer();
status_t unlockBuffer(size_t size);
// return the index of the first byte of other in this at or after
// start, or -1 if not found
ssize_t find(const char* other, size_t start = 0) const;
void toLower();
void toLower(size_t start, size_t numChars);
void toUpper();
void toUpper(size_t start, size_t numChars);
/*
* These methods operate on the string as if it were a path name.
*/
/*
* Set the filename field to a specific value.
*
* Normalizes the filename, removing a trailing '/' if present.
*/
void setPathName(const char* name);
void setPathName(const char* name, size_t numChars);
/*
* Get just the filename component.
*
* "/tmp/foo/bar.c" --> "bar.c"
*/
String8 getPathLeaf(void) const;
/*
* Remove the last (file name) component, leaving just the directory
* name.
*
* "/tmp/foo/bar.c" --> "/tmp/foo"
* "/tmp" --> "" // ????? shouldn't this be "/" ???? XXX
* "bar.c" --> ""
*/
String8 getPathDir(void) const;
/*
* Retrieve the front (root dir) component. Optionally also return the
* remaining components.
*
* "/tmp/foo/bar.c" --> "tmp" (remain = "foo/bar.c")
* "/tmp" --> "tmp" (remain = "")
* "bar.c" --> "bar.c" (remain = "")
*/
String8 walkPath(String8* outRemains = NULL) const;
/*
* Return the filename extension. This is the last '.' and any number
* of characters that follow it. The '.' is included in case we
* decide to expand our definition of what constitutes an extension.
*
* "/tmp/foo/bar.c" --> ".c"
* "/tmp" --> ""
* "/tmp/foo.bar/baz" --> ""
* "foo.jpeg" --> ".jpeg"
* "foo." --> ""
*/
String8 getPathExtension(void) const;
/*
* Return the path without the extension. Rules for what constitutes
* an extension are described in the comment for getPathExtension().
*
* "/tmp/foo/bar.c" --> "/tmp/foo/bar"
*/
String8 getBasePath(void) const;
/*
* Add a component to the pathname. We guarantee that there is
* exactly one path separator between the old path and the new.
* If there is no existing name, we just copy the new name in.
*
* If leaf is a fully qualified path (i.e. starts with '/', it
* replaces whatever was there before.
*/
String8& appendPath(const char* leaf);
String8& appendPath(const String8& leaf) { return appendPath(leaf.string()); }
/*
* Like appendPath(), but does not affect this string. Returns a new one instead.
*/
String8 appendPathCopy(const char* leaf) const
{ String8
|
{
"pile_set_name": "Github"
}
| null | null |
#ifndef OPENTISSUE_CORE_CONTAINERS_T4MESH_DEFAULT_TRAITS_H
#define OPENTISSUE_CORE_CONTAINERS_T4MESH_DEFAULT_TRAITS_H
//
// OpenTissue Template Library
// - A generic toolbox for physics-based modeling and simulation.
// Copyright (C) 2008 Department of Computer Science, University of Copenhagen.
//
// OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php
//
#include <OpenTissue/configuration.h>
namespace OpenTissue
{
namespace t4mesh
{
template<typename math_types>
class DefaultNodeTraits
{
public:
typedef typename math_types::vector3_type vector3_type;
typedef typename math_types::real_type real_type;
vector3_type m_coord; ///< Default Coordinate of tetramesh node.
};
class DefaultTetrahedronTraits { };
class DefaultT4EdgeTraits { };
class DefaultT4FaceTraits { };
} // namespace t4mesh
} // namespace OpenTissue
//OPENTISSUE_CORE_CONTAINERS_T4MESH_DEFAULT_TRAITS_H
#endif
|
{
"pile_set_name": "Github"
}
| null | null |
| Assignables.cs:92:9:92:54 | ... = ... | Assignables.cs:92:14:92:14 | x | 0 |
| Assignables.cs:92:9:92:54 | ... = ... | Assignables.cs:92:23:92:23 | b | 1 |
| Assignables.cs:92:9:92:54 | ... = ... | Assignables.cs:92:33:92:33 | s | 2 |
| Assignables.cs:93:9:93:38 | ... = ... | Assignables.cs:92:14:92:14 | x | 0 |
| Assignables.cs:93:9:93:38 | ... = ... | Assignables.cs:92:23:92:23 | b | 1 |
| Assignables.cs:93:9:93:38 | ... = ... | Assignables.cs:92:33:92:33 | s | 2 |
| Assignables.cs:94:9:94:32 | ... = ... | Assignables.cs:92:14:92:14 | x | 0 |
| Assignables.cs:94:9:94:32 | ... = ... | Assignables.cs:92:23:92:23 | b | 1 |
| Assignables.cs:94:9:94:32 | ... = ... | Assignables.cs:92:33:92:33 | s | 2 |
| Assignables.cs:96:9:96:36 | ... = ... | Assignables.cs:6:9:6:16 | Property | 0 |
| Assignables.cs:96:9:96:36 | ... = ... | Assignables.cs:9:9:9:12 | Item | 1 |
| Assignables.cs:97:9:97:37 | ... = ... | Assignables.cs:92:14:92:14 | x | 0 |
| Assignables.cs:97:9:97:37 | ... = ... | Assignables.cs:92:14:92:14 | x | 2 |
| Assignables.cs:97:9:97:37 | ... = ... | Assignables.cs:92:23:92:23 | b | 1 |
| Assignables.cs:98:9:98:36 | ... = ... | Assignables.cs:92:14:92:14 | x | 1 |
| Assignables.cs:98:9:98:36 | ... = ... | Assignables.cs:92:14:92:14 | x | 2 |
| Assignables.cs:98:9:98:36 | ... = ... | Assignables.cs:92:23:92:23 | b | 0 |
| Discards.cs:19:9:19:29 | ... = ... | Discards.cs:19:14:19:14 | x | 0 |
| Discards.cs:20:9:20:33 | ... = ... | Discards.cs:20:17:20:17 | y | 1 |
|
{
"pile_set_name": "Github"
}
| null | null |
package zerotocloud
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.*
import org.gradle.initialization.layout.BuildLayout
import org.gradle.initialization.layout.BuildLayoutFactory
import org.gradle.tooling.BuildLauncher
import org.gradle.tooling.GradleConnector
import org.gradle.tooling.ProjectConnection
import org.gradle.wrapper.WrapperExecutor
class Build extends DefaultTask {
@Input
File moduleDir
@Input
List<String> arguments = []
@OutputDirectory
def File getDistributionDir() {
return new File(moduleDir, 'build/libs')
}
@TaskAction
def build() {
GradleConnector connector = GradleConnector.newConnector();
connector.forProjectDirectory(moduleDir);
ProjectConnection connection = connector.connect();
try {
BuildLauncher launcher = connection.newBuild();
String[] argumentArray = new String[arguments.size()];
arguments.toArray(argumentArray);
launcher.withArguments(argumentArray);
launcher.run()
} finally {
if(connection) {
connection.close()
}
}
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
[
["", ""],
["61", "2g"],
["626262", "a3gV"],
["636363", "aPEr"],
["73696d706c792061206c6f6e6720737472696e67", "2cFupjhnEsSn59qHXstmK2ffpLv2"],
["3a7bec98866810a858ba17654b276c539f34217e384e478ed1", "QXuEerk9BrJ8i4g6kh5hhwfMnJwcBQf7MJ"],
["516b6fcd0f", "ABnLTmg"],
["bf4f89001e670274dd", "3SEo3LWLoPntC"],
["572e4794", "3EFU7m"],
["ecac89cad93923c02321", "EJDM8drfXA6uyA"],
["10c8511e", "Rt5zm"],
["00000000000000000000", "1111111111"],
["000111d38e5fc9071ffcd20b4a763cc9ae4f252bb4e48fd66a835e252ada93ff480d6dd43dc62a641155a5", "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],
["000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", "1cWB5HCBdLjAuqGGReWE3R3CguuwSjw6RHn39s2yuDRTS5NsBgNiFpWgAnEx6VQi8csexkgYw3mdYrMHr8x9i7aEwP8kZ7vccXWqKDvGv3u1GxFKPuAkn8JCPPGDMf3vMMnbzm6Nh9zh1gcNsMvH3ZNLmP5fSG6DGbbi2tuwMWPthr4boWwCxf7ewSgNQeacyozhKDDQQ1qL5fQFUW52QKUZDZ5fw3KXNQJMcNTcaB723LchjeKun7MuGW5qyCBZYzA1KjofN1gYBV3NqyhQJ3Ns746GNuf9N2pQPmHz4xpnSrrfCvy6TVVz5d4PdrjeshsWQwpZsZGzvbdAdN8MKV5QsBDY"]
]
|
{
"pile_set_name": "Github"
}
| null | null |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://opensource.org/licenses/MIT
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.
"""
from django.utils.translation import ugettext_lazy as _
MAINTAINERS = 'Maintainers'
PRODUCTPM = 'ProductPm'
DEVELOPER = 'Developer'
TESTER = 'Tester'
OWNER = 'Owner'
COOPERATION = 'Cooperation'
ADMIN = 'Admin'
FUNCTOR = 'Functor' # 职能化人员
AUDITOR = 'Auditor'
ROLES_DECS = {
MAINTAINERS: _(u"运维人员"),
PRODUCTPM: _(u"产品人员"),
COOPERATION: _(u"合作商"),
OWNER: _(u"业务创建人"),
ADMIN: _(u"超级管理员"),
FUNCTOR: _(u"职能化人员"),
TESTER: _(u"测试人员"),
DEVELOPER: _(u"开发人员"),
AUDITOR: _(u"审计人员"),
}
ALL_ROLES = [
MAINTAINERS,
PRODUCTPM,
DEVELOPER,
TESTER,
OWNER,
ADMIN,
FUNCTOR,
AUDITOR,
]
ADMIN_ROLES = [
MAINTAINERS,
OWNER,
]
CC_ROLES = [
MAINTAINERS,
PRODUCTPM,
DEVELOPER,
TESTER,
]
# 默认通知分组
CC_PERSON_GROUP = [
{"value": role, "text": ROLES_DECS[role]} for role in CC_ROLES
]
DEFAULT_CC_NOTIFY_SET = (
MAINTAINERS,
)
CC_V2_ROLE_MAP = {
MAINTAINERS: 'bk_biz_maintainer',
PRODUCTPM: 'bk_biz_productor',
DEVELOPER: 'bk_biz_developer',
TESTER: 'bk_biz_tester'
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/node-properties.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/operator-properties.h"
namespace v8 {
namespace internal {
namespace compiler {
// static
int NodeProperties::PastValueIndex(Node* node) {
return FirstValueIndex(node) + node->op()->ValueInputCount();
}
// static
int NodeProperties::PastContextIndex(Node* node) {
return FirstContextIndex(node) +
OperatorProperties::GetContextInputCount(node->op());
}
// static
int NodeProperties::PastFrameStateIndex(Node* node) {
return FirstFrameStateIndex(node) +
OperatorProperties::GetFrameStateInputCount(node->op());
}
// static
int NodeProperties::PastEffectIndex(Node* node) {
return FirstEffectIndex(node) + node->op()->EffectInputCount();
}
// static
int NodeProperties::PastControlIndex(Node* node) {
return FirstControlIndex(node) + node->op()->ControlInputCount();
}
// static
Node* NodeProperties::GetValueInput(Node* node, int index) {
DCHECK(0 <= index && index < node->op()->ValueInputCount());
return node->InputAt(FirstValueIndex(node) + index);
}
// static
Node* NodeProperties::GetContextInput(Node* node) {
DCHECK(OperatorProperties::HasContextInput(node->op()));
return node->InputAt(FirstContextIndex(node));
}
// static
Node* NodeProperties::GetFrameStateInput(Node* node) {
DCHECK(OperatorProperties::HasFrameStateInput(node->op()));
return node->InputAt(FirstFrameStateIndex(node));
}
// static
Node* NodeProperties::GetEffectInput(Node* node, int index) {
DCHECK(0 <= index && index < node->op()->EffectInputCount());
return node->InputAt(FirstEffectIndex(node) + index);
}
// static
Node* NodeProperties::GetControlInput(Node* node, int index) {
DCHECK(0 <= index && index < node->op()->ControlInputCount());
return node->InputAt(FirstControlIndex(node) + index);
}
// static
bool NodeProperties::IsValueEdge(Edge edge) {
Node* const node = edge.from();
return IsInputRange(edge, FirstValueIndex(node),
node->op()->ValueInputCount());
}
// static
bool NodeProperties::IsContextEdge(Edge edge) {
Node* const node = edge.from();
return IsInputRange(edge, FirstContextIndex(node),
OperatorProperties::GetContextInputCount(node->op()));
}
// static
bool NodeProperties::IsFrameStateEdge(Edge edge) {
Node* const node = edge.from();
return IsInputRange(edge, FirstFrameStateIndex(node),
OperatorProperties::GetFrameStateInputCount(node->op()));
}
// static
bool NodeProperties::IsEffectEdge(Edge edge) {
Node* const node = edge.from();
return IsInputRange(edge, FirstEffectIndex(node),
node->op()->EffectInputCount());
}
// static
bool NodeProperties::IsControlEdge(Edge edge) {
Node* const node = edge.from();
return IsInputRange(edge, FirstControlIndex(node),
node->op()->ControlInputCount());
}
// static
void NodeProperties::ReplaceContextInput(Node* node, Node* context) {
node->ReplaceInput(FirstContextIndex(node), context);
}
// static
void NodeProperties::ReplaceControlInput(Node* node, Node* control) {
node->ReplaceInput(FirstControlIndex(node), control);
}
// static
void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, int index) {
DCHECK(index < node->op()->EffectInputCount());
return node->ReplaceInput(FirstEffectIndex(node) + index, effect);
}
// static
void NodeProperties::ReplaceFrameStateInput(Node* node, Node* frame_state) {
DCHECK(OperatorProperties::HasFrameStateInput(node->op()));
node->ReplaceInput(FirstFrameStateIndex(node), frame_state);
}
// static
void NodeProperties::RemoveNonValueInputs(Node* node) {
node->TrimInputCount(node->op()->ValueInputCount());
}
// static
void NodeProperties::ReplaceWithValue(Node* node, Node* value, Node* effect) {
DCHECK(node->op()->ControlOutputCount() == 0);
if (!effect && node->op()->EffectInputCount() > 0) {
effect = NodeProperties::GetEffectInput(node);
}
// Requires distinguishing between value and effect edges.
for (Edge edge : node->use_edges()) {
if (IsEffectEdge(edge)) {
DCHECK_NOT_NULL(effect);
edge.UpdateTo(effect);
} else {
edge.UpdateTo(value);
}
}
}
// static
Node* NodeProperties::FindProjection(Node* node, size_t projection_index) {
for (auto use : node->uses()) {
if (use->opcode() == IrOpcode::kProjection &&
ProjectionIndexOf(use->op()) == projection_index) {
return use;
}
}
return nullptr;
}
// static
void NodeProperties::CollectControlProjections(Node* node, Node** projections,
size_t projection_count) {
#ifdef DEBUG
DCHECK_EQ(static_cast<int>(projection_count), node->UseCount());
std::memset(projections, 0, sizeof(*projections) * projection_count);
#endif
size_t if_value_index = 0;
for (Node* const use : node->uses()) {
size_t index;
switch (use->opcode()) {
default:
UNREACHABLE();
// Fall through.
case IrOpcode::kIfTrue:
DCHECK_EQ(IrOpcode::kBranch, node->opcode());
index = 0;
break;
case IrOpcode::kIfFalse:
DCHECK_EQ(IrOpcode::kBranch, node->opcode());
index = 1;
break;
case IrOpcode::kIfValue:
DCHECK_EQ(IrOpcode::kSwitch, node->opcode());
index = if_value_index++;
break;
case IrOpcode::kIfDefault:
DCHECK_EQ(IrOpcode::kSwitch, node->opcode());
index = projection_count - 1;
break;
}
DCHECK_LT(if_value_index, projection_count);
DCHECK_LT(index, projection_count);
DCHECK_NULL(projections[index]);
projections[index] = use;
}
#ifdef DEBUG
for (size_t index = 0; index < projection_count; ++index) {
DCHECK_NOT_NULL(projections[index]);
}
#endif
}
// static
bool NodeProperties::AllValueInputsAreTyped(Node* node) {
int input_count = node->op()->ValueInputCount();
for (int index = 0; index < input_count; ++index) {
if (!IsTyped(GetValueInput(node, index))) return false;
}
return true;
}
// static
bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
if (num == 0) return false;
int const index = edge.index();
return first <= index && index < first + num;
}
} // namespace compiler
} // namespace internal
} // namespace v8
|
{
"pile_set_name": "Github"
}
| null | null |
package code.productcollectionitem
import code.productAttributeattribute.MappedProductAttribute
import code.products.MappedProduct
import com.openbankproject.commons.model.{ProductAttribute, ProductCollectionItem}
import net.liftweb.common.Box
import net.liftweb.mapper._
import net.liftweb.util.Helpers.tryo
import com.openbankproject.commons.ExecutionContext.Implicits.global
import scala.concurrent.Future
object MappedProductCollectionItemProvider extends ProductCollectionItemProvider {
override def getProductCollectionItems(collectionCode: String) = Future {
tryo(MappedProductCollectionItem.findAll(By(MappedProductCollectionItem.mCollectionCode, collectionCode)))
}
override def getProductCollectionItemsTree(collectionCode: String, bankId: String) = Future {
tryo {
MappedProductCollectionItem.findAll(By(MappedProductCollectionItem.mCollectionCode, collectionCode)) map {
productCollectionItem =>
val product = MappedProduct.find(
By(MappedProduct.mBankId, bankId),
By(MappedProduct.mCode, productCollectionItem.mMemberProductCode.get)
).openOrThrowException("There is no product")
val attributes: List[MappedProductAttribute] = MappedProductAttribute.findAll(
By(MappedProductAttribute.mBankId, bankId),
By(MappedProductAttribute.mCode, product.code.value)
)
val xxx: (ProductCollectionItem, MappedProduct, List[ProductAttribute]) = (productCollectionItem, product, attributes)
xxx
}
}
}
override def getOrCreateProductCollectionItem(collectionCode: String, memberProductCodes: List[String]): Future[Box[List[ProductCollectionItem]]] = Future {
tryo {
val deleted =
for {
item <- MappedProductCollectionItem.findAll(By(MappedProductCollectionItem.mCollectionCode, collectionCode))
} yield item.delete_!
deleted.forall(_ == true) match {
case true =>
for {
productCode <- memberProductCodes
} yield {
MappedProductCollectionItem
.create
.mMemberProductCode(productCode)
.mCollectionCode(collectionCode)
.saveMe
}
case false =>
Nil
}
}
}
}
class MappedProductCollectionItem extends ProductCollectionItem with LongKeyedMapper[MappedProductCollectionItem] with IdPK with CreatedUpdated {
def getSingleton = MappedProductCollectionItem
object mCollectionCode extends MappedString(this, 50)
object mMemberProductCode extends MappedString(this, 50)
def collectionCode: String = mCollectionCode.get
def memberProductCode: String = mMemberProductCode.get
}
object MappedProductCollectionItem extends MappedProductCollectionItem with LongKeyedMetaMapper[MappedProductCollectionItem] {
override def dbIndexes: List[BaseIndex[MappedProductCollectionItem]] = UniqueIndex(mCollectionCode, mMemberProductCode) :: super.dbIndexes
}
|
{
"pile_set_name": "Github"
}
| null | null |
**This airport has been automatically generated**
We have no information about 48CO[*] airport other than its name, ICAO and location (US).
This airport will have to be done from scratch, which includes adding runways, taxiways, parking locations, boundaries...
Good luck if you decide to do this airport!
|
{
"pile_set_name": "Github"
}
| null | null |
package com.tencent.mm.ui.base;
import android.view.View;
final class MMListPopupWindow$1
implements Runnable
{
MMListPopupWindow$1(MMListPopupWindow paramMMListPopupWindow) {}
public final void run()
{
View localView = ler.qm;
if ((localView != null) && (localView.getWindowToken() != null)) {
ler.show();
}
}
}
/* Location:
* Qualified Name: com.tencent.mm.ui.base.MMListPopupWindow.1
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
{
"pile_set_name": "Github"
}
| null | null |
/*****************************************************************************
Copyright (c) 2014, Intel Corp.
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.
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zhpgv
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zhpgv_work( int matrix_layout, lapack_int itype, char jobz,
char uplo, lapack_int n,
lapack_complex_double* ap,
lapack_complex_double* bp, double* w,
lapack_complex_double* z, lapack_int ldz,
lapack_complex_double* work, double* rwork )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_zhpgv( &itype, &jobz, &uplo, &n, ap, bp, w, z, &ldz, work, rwork,
&info );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int ldz_t = MAX(1,n);
lapack_complex_double* z_t = NULL;
lapack_complex_double* ap_t = NULL;
lapack_complex_double* bp_t = NULL;
/* Check leading dimension(s) */
if( ldz < n ) {
info = -10;
LAPACKE_xerbla( "LAPACKE_zhpgv_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( jobz, 'v' ) ) {
z_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) *
ldz_t * MAX(1,n) );
if( z_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
}
ap_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) *
( MAX(1,n) * MAX(2,n+1) ) / 2 );
if( ap_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
bp_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) *
( MAX(1,n) * MAX(2,n+1) ) / 2 );
if( bp_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_2;
}
/* Transpose input matrices */
LAPACKE_zhp_trans( matrix_layout, uplo, n, ap, ap_t );
LAPACKE_zhp_trans( matrix_layout, uplo, n, bp, bp_t );
/* Call LAPACK function and adjust info */
LAPACK_zhpgv( &itype, &jobz, &uplo, &n, ap_t, bp_t, w, z_t, &ldz_t,
work, rwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz );
}
LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap );
LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, bp_t, bp );
/* Release memory and exit */
LAPACKE_free( bp_t );
exit_level_2:
LAPACKE_free( ap_t );
exit_level_1:
if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_free( z_t );
}
exit_level_0:
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_zhpgv_work", info );
}
} else {
info = -1;
LAPACKE_xerbla( "LAPACKE_zhpgv_work", info );
}
return info;
}
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
/*
* This file is part of Respect/Validation.
*
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/
declare(strict_types=1);
namespace Respect\Validation\Rules;
use Respect\Validation\Test\RuleTestCase;
/**
* @group rule
*
* @covers \Respect\Validation\Rules\NoWhitespace
*
* @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
* @author Danilo Benevides <danilobenevides01@gmail.com>
* @author Gabriel Caruso <carusogabriel34@gmail.com>
* @author Henrique Moody <henriquemoody@gmail.com>
* @author Nick Lombard <github@jigsoft.co.za>
*/
final class NoWhitespaceTest extends RuleTestCase
{
/**
* {@inheritDoc}
*/
public function providerForValidInput(): array
{
$rule = new NoWhitespace();
return [
[$rule, ''],
[$rule, null],
[$rule, 0],
[$rule, 'wpoiur'],
[$rule, 'Foo'],
];
}
/**
* {@inheritDoc}
*/
public function providerForInvalidInput(): array
{
$rule = new NoWhitespace();
return [
[$rule, ' '],
[$rule, 'w poiur'],
[$rule, ' '],
[$rule, "Foo\nBar"],
[$rule, "Foo\tBar"],
];
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
#ifndef _H8300_SIGINFO_H
#define _H8300_SIGINFO_H
#include <asm-generic/siginfo.h>
#endif
|
{
"pile_set_name": "Github"
}
| null | null |
/**
* $Id: editor_plugin_src.js 539 2008-01-14 19:08:58Z holman $
*
* @author Campware
* @copyright Copyright 2008-2009, Campware - MDLF, All rights reserved.
*/
(function() {
tinymce.PluginManager.requireLangPack('campsiteimage');
tinymce.create('tinymce.plugins.campsiteimage', {
init : function(ed, url) {
this.editor = ed;
editorId = typeof ed.settings.fullscreen_editor_id != 'undefined' ?
ed.settings.fullscreen_editor_id : ed.editorId;
articleNo = editorId.substring(editorId.lastIndexOf('_')+1);
// Register commands
ed.addCommand('mcecampsiteimage', function() {
var se = ed.selection;
var url_params = '';
if (!se.isCollapsed() || ed.dom.getParent(se.getNode(), 'IMG')) {
var action = '';
var elm = se.getNode();
elm = ed.dom.getParent(elm, "IMG");
if (elm != null && elm.nodeName == "IMG")
action = "update";
if (action == 'update') {
var elmId = ed.dom.getAttrib(elm, 'id');
url_params = '&image_id=' + elmId;
if (ed.dom.getAttrib(elm, 'alt') !== null)
url_params += '&image_alt=' + encodeURIComponent(ed.dom.getAttrib(elm, 'alt'));
if (ed.dom.getAttrib(elm, 'title') !== null)
url_params += '&image_title=' + encodeURIComponent(ed.dom.getAttrib(elm, 'title'));
if (ed.dom.getAttrib(elm, 'align') !== null)
url_params += '&image_alignment=' + escape(ed.dom.getAttrib(elm, 'align'));
if (ed.dom.getAttrib(elm, 'width') !== null && ed.dom.getAttrib(elm, 'width') != '')
url_params += '&image_resize_width=' + escape(ed.dom.getAttrib(elm, 'width'));
if (ed.dom.getAttrib(elm, 'height') !== null && ed.dom.getAttrib(elm, 'height') != '')
url_params += '&image_resize_height=' + escape(ed.dom.getAttrib(elm, 'height'));
if (ed.dom.getAttrib(elm, 'ratio') !== null && ed.dom.getAttrib(elm, 'ratio') != '')
url_params += '&image_ratio=' + escape(ed.dom.getAttrib(elm, 'ratio'));
else
if (elmId.lastIndexOf('_') > 0)
url_params += '&image_ratio=' + elmId.substring(elmId.lastIndexOf('_')+1);
}
}
ed.windowManager.open({
file : url + '/popup.php?time='+(new Date().getTime())+'&article_id=' + articleNo + url_params,
width : 580,
height : 430,
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('campsiteimage', {
title : 'campsiteimage.editor_button',
cmd : 'mcecampsiteimage',
image : url + '/img/campsiteimage.gif'
});
ed.addShortcut('ctrl+g', 'campsiteimage.editor_button', 'mcecampsiteimage');
ed.onNodeChange.add(function(ed, cm, n, co) {
cm.setDisabled('link', co && n.nodeName != 'A');
cm.setActive('link', n.nodeName == 'A' && !n.name);
});
},
getInfo : function() {
return {
longname : 'Newscoop - Image insertion',
author : 'Sourcefabric',
authorurl : 'http://www.sourcefabric.org',
infourl : 'http://dev.sourcefabric.org/browse/CS',
version : '3.4'
};
}
});
// Register plugin
tinymce.PluginManager.add('campsiteimage', tinymce.plugins.campsiteimage);
})();
|
{
"pile_set_name": "Github"
}
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.