text
stringlengths 2
97.5k
| meta
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"
}
|
#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"
}
|
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"
}
|
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"
}
|
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) => Expression.Convert(
Expression.ArrayIndex(paramsExpr, Expression.Constant(i)),
ctorParam.Parameter.ParameterType))
.ToArray();
NewExpression newExpression = Expression.New(constructorInfo, convertExprs);
var lambda = Expression.Lambda<LateBoundParamsCtor>(newExpression, paramsExpr);
return lambda.Compile();
}
}
}
|
{
"pile_set_name": "Github"
}
|
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/ClassroomKit.framework/ClassroomKit
*/
@interface CRKImage : UIImage
+ (id)imageWithContentsOfFile:(id)arg1;
@end
|
{
"pile_set_name": "Github"
}
|
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"
}
|
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 204.907135 14.955522
v -48.960899 204.190201 15.759321
v -53.076340 208.361084 14.777661
v -49.089302 208.005875 14.772694
v -48.961151 209.809982 13.486244
v -52.912788 210.176559 13.514473
v -49.371204 210.594864 11.562389
v -52.847511 210.927444 11.561452
v -48.655659 211.555145 11.263574
v -52.755451 211.941833 11.264482
v -50.073608 200.482849 12.959841
v -49.685036 201.646408 15.369786
v -49.412819 204.233932 16.743612
v -53.416435 204.597733 16.753277
v -49.047359 211.842636 12.312746
v -52.755451 211.941833 11.264482
v -52.731232 212.188202 12.314841
v -53.752895 200.997208 11.957090
v -53.767101 200.822876 12.982464
v -53.654533 202.013199 15.375034
v -57.510853 209.017899 15.562764
v -57.036453 209.090912 16.516260
v -56.815132 211.567871 14.754994
v -57.313904 211.322922 13.865899
v -57.294819 202.329086 12.098529
v -57.824856 201.328156 11.957051
v -57.545109 203.262924 13.990767
v -58.100113 202.621674 14.468848
v -57.281391 205.269821 14.945374
v -57.875397 205.003555 15.774090
v -57.061821 208.733292 14.785901
v -56.865585 210.531189 13.499339
v -56.326580 211.229477 11.573913
v -56.857502 212.303497 11.277162
v -57.461193 201.156906 12.972079
v -57.624851 202.370834 15.382939
v -57.419788 204.964493 16.756876
v -56.416798 212.515030 12.324955
v -41.775635 229.457138 18.047977
v -41.872253 228.206741 15.385703
v -42.772736 229.190872 15.172268
v -42.654549 230.473297 18.027390
v -51.102455 229.987076 15.212964
v -50.985088 231.220642 18.058485
v -51.479866 225.653870 25.878014
v -51.456467 225.929352 24.832912
v -43.882160 225.252350 24.802677
v -43.001553 224.867279 25.906536
v -51.280014 227.878174 24.012245
v -43.005707 227.136780 24.030910
v -41.944988 227.388000 24.819098
v -43.059986 228.384781 21.964363
v -51.168308 229.139328 21.987885
v -41.811451 229.015274 22.393120
v -51.139622 229.523499 18.249573
v -42.830902 228.768326 18.226805
v -42.990963 227.837021 16.150206
v -51.226509 228.610245 16.159719
v -44.138252 226.211212 15.147850
v -51.387096 226.868637 15.142682
v -42.852158 225.971802 14.018630
v -51.399960 226.748077 14.018695
v -43.695316 225.884827 26.163855
v -42.894444 228.320938 25.140194
v -42.671455 230.039642 22.497196
v -51.015572 230.803680 22.512970
v -43.625042 227.090576 13.863317
v -51.399960 226.748077 14.018695
v -51.305241 227.788986 13.865530
v -51.479866 225.653870 25.878014
v -51.392719 226.603516 26.175186
v -51.168884 229.075394 25.148867
v -60.361603 231.152954 18.078815
v -59.313374 231.993286 18.055027
v -59.438812 230.711472 15.199877
v -60.501823 229.906494 15.416565
v -59.028278 226.634354 24.827864
v -59.960388 226.414688 25.934738
v -59.551746 228.646515 24.058422
v -60.546886 229.085312 24.850031
v -59.279324 229.864700 21.991335
v -60.391708 230.710632 22.424017
v -59.447838 230.284485 18.254374
v -59.465981 229.340195 16.177498
v -58.635170 227.533905 15.171865
v -59.947060 227.531540 14.046949
v -59.093082 227.289780 26.189459
v -59.443207 229.830917 25.167711
v -59.360176 231.562408 22.524950
v -58.984985 228.492004 13.888761
vt 0.525902 0.880028
vt 0.521730 0.887109
vt 0.519466 0.884962
vt 0.523098 0.877854
vt 0.500222 0.875091
vt 0.504543 0.867247
vt 0.568572 0.867127
vt 0.566540 0.870567
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.562716 0.877309
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.558530 0.884574
vt 0.532441 0.869057
vt 0.551917 0.895733
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.547715 0.902647
vt 0.523837 0.895578
vt 0.543781 0.908994
vt 0.517874 0.895209
vt 0.541621 0.912573
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.510947 0.856464
vt 0.515733 0.891181
vt 0.494904 0.884867
vt 0.496572 0.882008
vt 0.521854 0.839422
vt 0.520268 0.842138
vt 0.515813 0.848848
vt 0.525902 0.880028
vt 0.523098 0.877854
vt 0.519466 0.884962
vt 0.521730 0.887109
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.532441 0.869057
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.523837 0.895578
vt 0.517874 0.895209
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.515733 0.891181
vt 0.525902 0.880028
vt 0.521730 0.887109
vt 0.519466 0.884962
vt 0.523098 0.877854
vt 0.500222 0.875091
vt 0.504543 0.867247
vt 0.568572 0.867127
vt 0.566540 0.870567
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.562716 0.877309
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.558530 0.884574
vt 0.532441 0.869057
vt 0.551917 0.895733
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.547715 0.902647
vt 0.523837 0.895578
vt 0.543781 0.908994
vt 0.517874 0.895209
vt 0.541621 0.912573
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.510947 0.856464
vt 0.515733 0.891181
vt 0.494904 0.884867
vt 0.496572 0.882008
vt 0.521854 0.839422
vt 0.520268 0.842138
vt 0.515813 0.848848
vt 0.525902 0.880028
vt 0.523098 0.877854
vt 0.519466 0.884962
vt 0.521730 0.887109
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.532441 0.869057
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.523837 0.895578
vt 0.517874 0.895209
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.515733 0.891181
vt 0.525902 0.880028
vt 0.521730 0.887109
vt 0.519466 0.884962
vt 0.523098 0.877854
vt 0.500222 0.875091
vt 0.504543 0.867247
vt 0.568572 0.867127
vt 0.566540 0.870567
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.562716 0.877309
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.558530 0.884574
vt 0.532441 0.869057
vt 0.551917 0.895733
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.547715 0.902647
vt 0.523837 0.895578
vt 0.543781 0.908994
vt 0.517874 0.895209
vt 0.541621 0.912573
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.510947 0.856464
vt 0.515733 0.891181
vt 0.494904 0.884867
vt 0.496572 0.882008
vt 0.521854 0.839422
vt 0.520268 0.842138
vt 0.515813 0.848848
vt 0.525902 0.880028
vt 0.523098 0.877854
vt 0.519466 0.884962
vt 0.521730 0.887109
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.532441 0.869057
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.523837 0.895578
vt 0.517874 0.895209
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.515733 0.891181
vt 0.525902 0.880028
vt 0.521730 0.887109
vt 0.519466 0.884962
vt 0.523098 0.877854
vt 0.500222 0.875091
vt 0.504543 0.867247
vt 0.568572 0.867127
vt 0.566540 0.870567
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.562716 0.877309
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.558530 0.884574
vt 0.532441 0.869057
vt 0.551917 0.895733
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.547715 0.902647
vt 0.523837 0.895578
vt 0.543781 0.908994
vt 0.517874 0.895209
vt 0.541621 0.912573
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.510947 0.856464
vt 0.515733 0.891181
vt 0.494904 0.884867
vt 0.496572 0.882008
vt 0.521854 0.839422
vt 0.520268 0.842138
vt 0.515813 0.848848
vt 0.525902 0.880028
vt 0.523098 0.877854
vt 0.519466 0.884962
vt 0.521730 0.887109
vt 0.544195 0.859033
vt 0.542000 0.854526
vt 0.539287 0.864441
vt 0.536579 0.862137
vt 0.535905 0.871591
vt 0.532441 0.869057
vt 0.529091 0.881920
vt 0.525226 0.888442
vt 0.523837 0.895578
vt 0.517874 0.895209
vt 0.537698 0.854647
vt 0.533552 0.861139
vt 0.529134 0.867804
vt 0.515733 0.891181
vn 0.990749 -0.097154 0.094753
vn 0.972674 0.201603 0.115161
vn 0.267428 0.282674 0.921183
vn 0.255711 -0.259424 0.931295
vn 0.029422 0.304886 0.951934
vn -0.020204 -0.239281 0.970740
vn -0.010769 -0.099657 -0.994964
vn 0.086533 0.953561 -0.288502
vn 0.257854 0.932790 -0.251822
vn 0.469841 -0.112615 -0.875539
vn 0.089902 0.987532 -0.129219
vn 0.383747 0.902055 -0.197571
vn 0.914611 -0.337932 -0.222009
vn 0.319613 0.674402 -0.665604
vn 0.064976 0.724657 -0.686040
vn 0.986354 -0.161108 0.033924
vn 0.020536 0.242897 -0.969835
vn 0.285958 0.205182 -0.936017
vn 0.236905 -0.254651 -0.937565
vn -0.030334 -0.314943 -0.948626
vn 0.100073 -0.201584 -0.974345
vn -0.017376 -0.172272 -0.984896
vn 0.600620 0.715206 -0.357401
vn 0.083940 0.926585 -0.366599
vn 0.042893 -0.895810 -0.442363
vn 0.158952 -0.981580 0.105992
vn 0.224571 -0.724043 0.652173
vn -0.065777 -0.733268 0.676750
vn 0.190238 0.721707 0.665544
vn 0.083940 0.926585 -0.366599
vn 0.070123 0.756456 0.650275
vn -0.010769 -0.099657 -0.994964
vn -0.080784 -0.876482 -0.474608
vn -0.090092 -0.989355 0.114281
vn -0.991649 0.083757 0.098069
vn -0.295323 -0.209140 0.932226
vn -0.208505 0.326149 0.922037
vn -0.919782 0.374175 0.118296
vn -0.085502 0.964142 -0.251236
vn -0.485611 -0.025443 -0.873805
vn -0.214809 0.956668 -0.196579
vn -0.961407 -0.166753 -0.218839
vn -0.194377 0.721321 -0.664765
vn -0.999104 0.020109 0.037237
vn -0.247273 0.253839 -0.935105
vn -0.282207 -0.207244 -0.936701
vn -0.138003 -0.179900 -0.973956
vn -0.462225 0.812323 -0.355640
vn -0.205858 -0.873102 -0.441945
vn -0.333723 -0.936598 0.106833
vn -0.349795 -0.671641 0.653102
vn -0.054448 0.744041 0.665912
vn 0.984963 -0.156242 -0.073737
vn 0.940761 -0.338975 0.008095
vn 0.198486 -0.656536 -0.727711
vn 0.271319 -0.274576 -0.922493
vn -0.061224 -0.657384 -0.751065
vn -0.026154 -0.269171 -0.962737
vn 0.044976 0.477003 0.877750
vn -0.063998 -0.714079 0.697134
vn 0.159810 -0.743595 0.649251
vn 0.498752 0.341455 0.796653
vn -0.076054 -0.843223 0.532157
vn 0.325444 -0.768335 0.551133
vn 0.968500 0.227470 0.101319
vn 0.298207 -0.269309 0.915721
vn -0.022460 -0.263668 0.964352
vn 0.994795 -0.067033 -0.076746
vn 0.025775 0.264991 0.963906
vn 0.319383 0.240528 0.916592
vn 0.329277 0.574192 0.749587
vn 0.061763 0.663389 0.745722
vn 0.197191 0.561435 0.803683
vn 0.052584 0.561326 0.825922
vn 0.486240 -0.562252 0.668912
vn -0.056801 -0.636512 0.769173
vn 0.259342 0.957227 0.128292
vn 0.382729 0.782338 -0.491393
vn 0.348969 0.232509 -0.907833
vn 0.023845 0.278771 -0.960062
vn 0.071048 -0.916537 -0.393589
vn -0.056801 -0.636512 0.769173
vn -0.085084 -0.925844 -0.368203
vn 0.044976 0.477003 0.877750
vn 0.089882 0.982105 0.165499
vn 0.077097 0.854326 -0.513988
vn -0.997211 0.024612 -0.070453
vn -0.319721 -0.220636 -0.921465
vn -0.316272 -0.609595 -0.726888
vn -0.986540 -0.163127 0.011288
vn -0.289775 -0.702545 0.649970
vn -0.426295 0.425920 0.798038
vn -0.457452 -0.696851 0.552391
vn -0.911004 0.398956 0.104433
vn -0.339167 -0.211141 0.916725
vn -0.990747 0.114129 -0.073456
vn -0.267566 0.294082 0.917564
vn -0.217126 0.623987 0.750664
vn -0.089688 0.587610 0.804158
vn -0.577884 -0.465113 0.670612
vn -0.081223 0.988331 0.128861
vn -0.236439 0.838831 -0.490367
vn -0.304110 0.292096 -0.906751
vn -0.237214 -0.888385 -0.393067
vn 0.998236 -0.022682 0.054866
vn 0.988357 0.142314 -0.053819
vn 0.324036 0.703376 0.632663
vn 0.323738 0.363192 0.873662
vn 0.069683 0.751831 0.655664
vn 0.039320 0.414443 0.909226
vn -0.056766 -0.607778 -0.792076
vn 0.047313 0.533887 -0.844231
vn 0.274119 0.530845 -0.801912
vn 0.408783 -0.554222 -0.725076
vn 0.061762 0.690013 -0.721158
vn 0.443371 0.536144 -0.718311
vn 0.917063 -0.396857 -0.038734
vn 0.305371 0.014118 -0.952129
vn 0.003412 0.055522 -0.998452
vn 0.993168 -0.090272 0.073949
vn -0.039078 -0.411767 -0.910451
vn 0.243163 -0.431461 -0.868742
vn 0.208132 -0.717392 -0.664853
vn -0.070196 -0.757568 -0.648972
vn 0.080402 -0.695107 -0.714396
vn -0.062515 -0.671769 -0.738118
vn 0.557676 0.329071 -0.762043
vn 0.040944 0.464806 -0.884465
vn 0.088541 -0.994524 0.055516
vn 0.251084 -0.698873 0.669726
vn 0.310404 -0.094780 0.945868
vn -0.004835 -0.071103 0.997457
vn 0.246078 0.937868 0.244640
vn 0.040944 0.464806 -0.884465
vn 0.089104 0.972691 0.214321
vn -0.056766 -0.607778 -0.792076
vn -0.090820 -0.995714 0.017485
vn -0.063215 -0.705657 0.705728
vn -0.985730 0.158002 0.058073
vn -0.249950 0.415570 0.874544
vn -0.189313 0.750214 0.633514
vn -0.946452 0.318852 -0.050615
vn -0.175963 0.571936 -0.801203
vn -0.504713 -0.470874 -0.723562
vn -0.341583 0.607741 -0.716918
vn -0.973863 -0.224328 -0.035601
vn -0.301089 0.069431 -0.951065
vn -0.992857 0.090934 0.077239
vn -0.319734 -0.380091 -0.867929
vn -0.336708 -0.667680 -0.663951
vn -0.207217 -0.668865 -0.713919
vn -0.491754 0.424766 -0.760100
vn -0.266525 -0.962188 0.056202
vn -0.371420 -0.642062 0.670674
vn -0.319322 -0.037324 0.946911
vn -0.071844 0.966819 0.245152
vn 0.998396 0.054769 0.014373
vn 0.903920 -0.185787 -0.385243
vn 0.272637 0.694598 -0.665735
vn 0.288081 0.957362 -0.021600
vn 0.067603 0.752817 -0.654749
vn 0.090814 0.995669 -0.019883
vn -0.080033 -0.885469 0.457755
vn -0.067675 -0.729278 -0.680863
vn 0.019635 -0.721799 -0.691824
vn 0.435933 -0.810381 0.391465
vn -0.060656 -0.650975 -0.756672
vn 0.110074 -0.698916 -0.706683
vn 0.932512 -0.174387 0.316244
vn 0.059802 -0.901790 -0.428017
vn -0.082754 -0.899111 -0.429827
vn 0.995889 -0.003708 0.090508
vn -0.090826 -0.995737 0.016047
vn 0.093011 -0.995571 0.013663
vn 0.149533 -0.824896 0.545148
vn -0.066592 -0.741964 0.667125
vn -0.001423 -0.855380 0.517999
vn -0.077466 -0.858250 0.507352
vn 0.392672 -0.770525 -0.502095
vn -0.071295 -0.769881 -0.634192
vn 0.091484 0.201953 0.975113
vn 0.207130 0.614001 0.761643
vn 0.259203 0.868483 0.422553
vn 0.082451 0.895664 0.437022
vn 0.086123 0.074897 -0.993465
vn -0.071295 -0.769881 -0.634192
vn 0.003956 0.061480 -0.998100
vn -0.080033 -0.885469 0.457755
vn 0.018472 0.184532 0.982653
vn 0.059873 0.642252 0.764151
vn -0.971947 0.234537 0.017636
vn -0.110136 0.993696 -0.020940
vn -0.144420 0.732681 -0.665072
vn -0.923809 -0.019695 -0.382346
vn -0.152622 -0.706056 -0.691514
vn -0.573893 -0.718592 0.392776
vn -0.237113 -0.667232 -0.706101
vn -0.947724 -0.002766 0.319081
vn -0.223115 -0.876043 -0.427514
vn -0.979945 0.175902 0.093624
vn -0.271934 -0.962209 0.014362
vn -0.294825 -0.783985 0.546301
vn -0.151700 -0.841669 0.518248
vn -0.527281 -0.686589 -0.500571
vn -0.050222 0.214902 0.975343
vn -0.090088 0.641119 0.762135
vn -0.095915 0.901022 0.423036
vn -0.074410 0.089544 -0.993199
f 1/1/1 2/2/2 3/3/3
f 1/1/1 3/3/3 4/4/4
f 4/4/4 3/3/3 5/5/5
f 4/4/4 5/5/5 6/6/6
f 7/7/7 8/8/8 9/9/9
f 7/7/7 9/9/9 10/10/10
f 9/9/9 8/8/8 11/11/11
f 9/9/9 11/11/11 12/12/12
f 13/13/13 10/10/10 9/9/9
f 13/13/13 9/9/9 12/12/12
f 14/14/14 12/12/12 11/11/11
f 14/14/14 11/11/11 15/15/15
f 16/16/16 13/13/13 12/12/12
f 16/16/16 12/12/12 14/14/14
f 14/14/14 15/15/15 17/17/17
f 14/14/14 17/17/17 18/18/18
f 1/1/1 16/16/16 14/14/14
f 1/1/1 14/14/14 18/18/18
f 1/1/1 18/18/18 19/19/19
f 1/1/1 19/19/19 2/2/2
f 17/17/17 20/20/20 19/19/19
f 17/17/17 19/19/19 18/18/18
f 21/21/21 19/19/19 20/20/20
f 21/21/21 20/20/20 22/22/22
f 19/19/19 21/21/21 23/23/23
f 19/19/19 23/23/23 2/2/2
f 21/21/21 22/22/22 24/24/24
f 21/21/21 24/24/24 23/23/23
f 25/25/25 10/10/10 13/13/13
f 25/25/25 13/13/13 26/26/26
f 26/26/26 13/13/13 16/16/16
f 26/26/26 16/16/16 27/27/27
f 27/27/27 16/16/16 1/1/1
f 27/27/27 1/1/1 4/4/4
f 6/6/6 28/28/28 27/27/27
f 6/6/6 27/27/27 4/4/4
f 29/29/29 3/3/3 2/2/2
f 29/29/29 2/2/2 23/23/23
f 30/30/30 31/31/31 29/29/29
f 30/30/30 29/29/29 23/23/23
f 32/32/32 10/10/10 25/25/25
f 32/32/32 25/25/25 33/33/33
f 25/25/25 26/26/26 34/34/34
f 25/25/25 34/34/34 33/33/33
f 26/26/26 27/27/27 28/28/28
f 26/26/26 28/28/28 34/34/34
f 5/5/5 3/3/3 29/29/29
f 5/5/5 29/29/29 31/31/31
f 35/35/35 36/36/36 37/37/37
f 35/35/35 37/37/37 38/38/38
f 36/36/36 6/6/6 5/5/5
f 36/36/36 5/5/5 37/37/37
f 39/39/39 8/8/8 7/7/7
f 39/39/39 7/7/7 40/40/40
f 39/39/39 41/41/41 11/11/11
f 39/39/39 11/11/11 8/8/8
f 42/42/42 41/41/41 39/39/39
f 42/42/42 39/39/39 40/40/40
f 43/43/43 15/15/15 11/11/11
f 43/43/43 11/11/11 41/41/41
f 44/44/44 43/43/43 41/41/41
f 44/44/44 41/41/41 42/42/42
f 43/43/43 45/45/45 17/17/17
f 43/43/43 17/17/17 15/15/15
f 35/35/35 45/45/45 43/43/43
f 35/35/35 43/43/43 44/44/44
f 35/35/35 38/38/38 46/46/46
f 35/35/35 46/46/46 45/45/45
f 46/46/46 20/20/20 17/17/17
f 46/46/46 17/17/17 45/45/45
f 47/47/47 22/22/22 20/20/20
f 47/47/47 20/20/20 46/46/46
f 46/46/46 38/38/38 48/48/48
f 46/46/46 48/48/48 47/47/47
f 47/47/47 48/48/48 24/24/24
f 47/47/47 24/24/24 22/22/22
f 49/49/49 50/50/50 42/42/42
f 49/49/49 42/42/42 40/40/40
f 50/50/50 51/51/51 44/44/44
f 50/50/50 44/44/44 42/42/42
f 51/51/51 36/36/36 35/35/35
f 51/51/51 35/35/35 44/44/44
f 51/51/51 28/28/28 6/6/6
f 51/51/51 6/6/6 36/36/36
f 52/52/52 48/48/48 38/38/38
f 52/52/52 38/38/38 37/37/37
f 52/52/52 31/31/31 30/30/30
f 52/52/52 30/30/30 48/48/48
f 32/32/32 33/33/33 49/49/49
f 32/32/32 49/49/49 40/40/40
f 34/34/34 50/50/50 49/49/49
f 34/34/34 49/49/49 33/33/33
f 28/28/28 51/51/51 50/50/50
f 28/28/28 50/50/50 34/34/34
f 5/5/5 31/31/31 52/52/52
f 5/5/5 52/52/52 37/37/37
f 53/53/53 54/54/54 55/55/55
f 53/53/53 55/55/55 56/56/56
f 56/56/56 55/55/55 57/57/57
f 56/56/56 57/57/57 58/58/58
f 59/59/59 60/60/60 61/61/61
f 59/59/59 61/61/61 62/62/62
f 61/61/61 60/60/60 63/63/63
f 61/61/61 63/63/63 64/64/64
f 65/65/65 62/62/62 61/61/61
f 65/65/65 61/61/61 64/64/64
f 66/66/66 64/64/64 63/63/63
f 66/66/66 63/63/63 67/67/67
f 68/68/68 65/65/65 64/64/64
f 68/68/68 64/64/64 66/66/66
f 66/66/66 67/67/67 69/69/69
f 66/66/66 69/69/69 70/70/70
f 53/53/53 68/68/68 66/66/66
f 53/53/53 66/66/66 70/70/70
f 53/53/53 70/70/70 71/71/71
f 53/53/53 71/71/71 54/54/54
f 69/69/69 72/72/72 71/71/71
f 69/69/69 71/71/71 70/70/70
f 73/73/73 71/71/71 72/72/72
f 73/73/73 72/72/72 74/74/74
f 71/71/71 73/73/73 75/75/75
f 71/71/71 75/75/75 54/54/54
f 73/73/73 74/74/74 76/76/76
f 73/73/73 76/76/76 75/75/75
f 77/77/77 62/62/62 65/65/65
f 77/77/77 65/65/65 78/78/78
f 78/78/78 65/65/65 68/68/68
f 78/78/78 68/68/68 79/79/79
f 79/79/79 68/68/68 53/53/53
f 79/79/79 53/53/53 56/56/56
f 58/58/58 80/80/80 79/79/79
f 58/58/58 79/79/79 56/56/56
f 81/81/81 55/55/55 54/54/54
f 81/81/81 54/54/54 75/75/75
f 82/82/82 83/83/83 81/81/81
f 82/82/82 81/81/81 75/75/75
f 84/84/84 62/62/62 77/77/77
f 84/84/84 77/77/77 85/85/85
f 77/77/77 78/78/78 86/86/86
f 77/77/77 86/86/86 85/85/85
f 78/78/78 79/79/79 80/80/80
f 78/78/78 80/80/80 86/86/86
f 57/57/57 55/55/55 81/81/81
f 57/57/57 81/81/81 83/83/83
f 87/87/87 88/88/88 89/89/89
f 87/87/87 89/89/89 90/90/90
f 88/88/88 58/58/58 57/57/57
f 88/88/88 57/57/57 89/89/89
f 91/91/91 60/60/60 59/59/59
f 91/91/91 59/59/59 92/92/92
f 91/91/91 93/93/93 63/63/63
f 91/91/91 63/63/63 60/60/60
f 94/94/94 93/93/93 91/91/91
f 94/94/94 91/91/91 92/92/92
f 95/95/95 67/67/67 63/63/63
f 95/95/95 63/63/63 93/93/93
f 96/96/96 95/95/95 93/93/93
f 96/96/96 93/93/93 94/94/94
f 95/95/95 97/97/97 69/69/69
f 95/95/95 69/69/69 67/67/67
f 87/87/87 97/97/97 95/95/95
f 87/87/87 95/95/95 96/96/96
f 87/87/87 90/90/90 98/98/98
f 87/87/87 98/98/98 97/97/97
f 98/98/98 72/72/72 69/69/69
f 98/98/98 69/69/69 97/97/97
f 99/99/99 74/74/74 72/72/72
f 99/99/99 72/72/72 98/98/98
f 98/98/98 90/90/90 100/100/100
f 98/98/98 100/100/100 99/99/99
f 99/99/99 100/100/100 76/76/76
f 99/99/99 76/76/76 74/74/74
f 101/101/101 102/102/102 94/94/94
f 101/101/101 94/94/94 92/92/92
f 102/102/102 103/103/103 96/96/96
f 102/102/102 96/96/96 94/94/94
f 103/103/103 88/88/88 87/87/87
f 103/103/103 87/87/87 96/96/96
f 103/103/103 80/80/80 58/58/58
f 103/103/103 58/58/58 88/88/88
f 104/104/104 100/100/100 90/90/90
f 104/104/104 90/90/90 89/89/89
f 104/104/104 83/83/83 82/82/82
f 104/104/104 82/82/82 100/100/100
f 84/84/84 85/85/85 101/101/101
f 84/84/84 101/101/101 92/92/92
f 86/86/86 102/102/102 101/101/101
f 86/86/86 101/101/101 85/85/85
f 80/80/80 103/103/103 102/102/102
f 80/80/80 102/102/102 86/86/86
f 57/57/57 83/83/83 104/104/104
f 57/57/57 104/104/104 89/89/89
f 105/105/105 106/106/106 107/107/107
f 105/105/105 107/107/107 108/108/108
f 108/108/108 107/107/107 109/109/109
f 108/108/108 109/109/109 110/110/110
f 111/111/111 112/112/112 113/113/113
f 111/111/111 113/113/113 114/114/114
f 113/113/113 112/112/112 115/115/115
f 113/113/113 115/115/115 116/116/116
f 117/117/117 114/114/114 113/113/113
f 117/117/117 113/113/113 116/116/116
f 118/118/118 116/116/116 115/115/115
f 118/118/118 115/115/115 119/119/119
f 120/120/120 117/117/117 116/116/116
f 120/120/120 116/116/116 118/118/118
f 118/118/118 119/119/119 121/121/121
f 118/118/118 121/121/121 122/122/122
f 105/105/105 120/120/120 118/118/118
f 105/105/105 118/118/118 122/122/122
f 105/105/105 122/122/122 123/123/123
f 105/105/105 123/123/123 106/106/106
f 121/121/121 124/124/124 123/123/123
f 121/121/121 123/123/123 122/122/122
f 125/125/125 123/123/123 124/124/124
f 125/125/125 124/124/124 126/126/126
f 123/123/123 125/125/125 127/127/127
f 123/123/123 127/127/127 106/106/106
f 125/125/125 126/126/126 128/128/128
f 125/125/125 128/128/128 127/127/127
f 129/129/129 114/114/114 117/117/117
f 129/129/129 117/117/117 130/130/130
f 130/130/130 117/117/117 120/120/120
f 130/130/130 120/120/120 131/131/131
f 131/131/131 120/120/120 105/105/105
f 131/131/131 105/105/105 108/108/108
f 110/110/110 132/132/132 131/131/131
f 110/110/110 131/131/131 108/108/108
f 133/133/133 107/107/107 106/106/106
f 133/133/133 106/106/106 127/127/127
f 134/134/134 135/135/135 133/133/133
f 134/134/134 133/133/133 127/127/127
f 136/136/136 114/114/114 129/129/129
f 136/136/136 129/129/129 137/137/137
f 129/129/129 130/130/130 138/138/138
f 129/129/129 138/138/138 137/137/137
f 130/130/130 131/131/131 132/132/132
f 130/130/130 132/132/132 138/138/138
f 109/109/109 107/107/107 133/133/133
f 109/109/109 133/133/133 135/135/135
f 139/139/139 140/140/140 141/141/141
f 139/139/139 141/141/141 142/142/142
f 140/140/140 110/110/110 109/109/109
f 140/140/140 109/109/109 141/141/141
f 143/143/143 112/112/112 111/111/111
f 143/143/143 111/111/111 144/144/144
f 143/143/143 145/145/145 115/115/115
f 143/143/143 115/115/115 112/112/112
f 146/146/146 145/145/145 143/143/143
f 146/146/146 143/143/143 144/144/144
f 147/147/147 119/119/119 115/115/115
f 147/147/147 115/115/115 145/145/145
f 148/148/148 147/147/147 145/145/145
f 148/148/148 145/145/145 146/146/146
f 147/147/147 149/149/149 121/121/121
f 147/147/147 121/121/121 119/119/119
f 139/139/139 149/149/149 147/147/147
f 139/139/139 147/147/147 148/148/148
f 139/139/139 142/142/142 150/150/150
f 139/139/139 150/150/150 149/149/149
f 150/150/150 124/124/124 121/121/121
f 150/150/150 121/121/121 149/149/149
f 151/151/151 126/126/126 124/124/124
f 151/151/151 124/124/124 150/150/150
f 150/150/150 142/142/142 152/152/152
f 150/150/150 152/152/152 151/151/151
f 151/151/151 152/152/152 128/128/128
f 151/151/151 128/128/128 126/126/126
f 153/153/153 154/154/154 146/146/146
f 153/153/153 146/146/146 144/144/144
f 154/154/154 155/155/155 148/148/148
f 154/154/154 148/148/148 146/146/146
f 155/155/155 140/140/140 139/139/139
f 155/155/155 139/139/139 148/148/148
f 155/155/155 132/132/132 110/110/110
f 155/155/155 110/110/110 140/140/140
f 156/156/156 152/152/152 142/142/142
f 156/156/156 142/142/142 141/141/141
f 156/156/156 135/135/135 134/134/134
f 156/156/156 134/134/134 152/152/152
f 136/136/136 137/137/137 153/153/153
f 136/136/136 153/153/153 144/144/144
f 138/138/138 154/154/154 153/153/153
f 138/138/138 153/153/153 137/137/137
f 132/132/132 155/155/155 154/154/154
f 132/132/132 154/154/154 138/138/138
f 109/109/109 135/135/135 156/156/156
f 109/109/109 156/156/156 141/141/141
f 157/157/157 158/158/158 159/159/159
f 157/157/157 159/159/159 160/160/160
f 160/160/160 159/159/159 161/161/161
f 160/160/160 161/161/161 162/162/162
f 163/163/163 164/164/164 165/165/165
f 163/163/163 165/165/165 166/166/166
f 165/165/165 164/164/164 167/167/167
f 165/165/165 167/167/167 168/168/168
f 169/169/169 166/166/166 165/165/165
f 169/169/169 165/165/165 168/168/168
f 170/170/170 168/168/168 167/167/167
f 170/170/170 167/167/167 171/171/171
f 172/172/172 169/169/169 168/168/168
f 172/172/172 168/168/168 170/170/170
f 170/170/170 171/171/171 173/173/173
f 170/170/170 173/173/173 174/174/174
f 157/157/157 172/172/172 170/170/170
f 157/157/157 170/170/170 174/174/174
f 157/157/157 174/174/174 175/175/175
f 157/157/157 175/175/175 158/158/158
f 173/173/173 176/176/176 175/175/175
f 173/173/173 175/175/175 174/174/174
f 177/177/177 175/175/175 176/176/176
f 177/177/177 176/176/176 178/178/178
f 175/175/175 177/177/177 179/179/179
f 175/175/175 179/179/179 158/158/158
f 177/177/177 178/178/178 180/180/180
f 177/177/177 180/180/180 179/179/179
f 181/181/181 166/166/166 169/169/169
f 181/181/181 169/169/169 182/182/182
f 182/182/182 169/169/169 172/172/172
f 182/182/182 172/172/172 183/183/183
f 183/183/183 172/172/172 157/157/157
f 183/183/183 157/157/157 160/160/160
f 162/162/162 184/184/184 183/183/183
f 162/162/162 183/183/183 160/160/160
f 185/185/185 159/159/159 158/158/158
f 185/185/185 158/158/158 179/179/179
f 186/186/186 187/187/187 185/185/185
f 186/186/186 185/185/185 179/179/179
f 188/188/188 166/166/166 181/181/181
f 188/188/188 181/181/181 189/189/189
f 181/181/181 182/182/182 190/190/190
f 181/181/181 190/190/190 189/189/189
f 182/182/182 183/183/183 184/184/184
f 182/182/182 184/184/184 190/190/190
f 161/161/161 159/159/159 185/185/185
f 161/161/161 185/185/185 187/187/187
f 191/191/191 192/192/192 193/193/193
f 191/191/191 193/193/193 194/194/194
f 192/192/192 162/162/162 161/161/161
f 192/192/192 161/161/161 193/193/193
f 195/195/195 164/164/164 163/163/163
f 195/195/195 163/163/163 196/196/196
f 195/195/195 197/197/197 167/167/167
f 195/195/195 167/167/167 164/164/164
f 198/198/198 197/197/197 195/195/195
f 198/198/198 195/195/195 196/196/196
f 199/199/199 171/171/171 167/167/167
f 199/199/199 167/167/167 197/197/197
f 200/200/200 199/199/199 197/197/197
f 200/200/200 197/197/197 198/198/198
f 199/199/199 201/201/201 173/173/173
f 199/199/199 173/173/173 171/171/171
f 191/191/191 201/201/201 199/199/199
f 191/191/191 199/199/199 200/200/200
f 191/191/191 194/194/194 202/202/202
f 191/191/191 202/202/202 201/201/201
f 202/202/202 176/176/176 173/173/173
f 202/202/202 173/173/173 201/201/201
f 203/203/203 178/178/178 176/176/176
f 203/203/203 176/176/176 202/202/202
f 202/202/202 194/194/194 204/204/204
f 202/202/202 204/204/204 203/203/203
f 203/203/203 204/204/204 180/180/180
f 203/203/203 180/180/180 178/178/178
f 205/205/205 206/206/206 198/198/198
f 205/205/205 198/198/198 196/196/196
f 206/206/206 207/207/207 200/200/200
f 206/206/206 200/200/200 198/198/198
f 207/207/207 192/192/192 191/191/191
f 207/207/207 191/191/191 200/200/200
f 207/207/207 184/184/184 162/162/162
f 207/207/207 162/162/162 192/192/192
f 208/208/208 204/204/204 194/194/194
f 208/208/208 194/194/194 193/193/193
f 208/208/208 187/187/187 186/186/186
f 208/208/208 186/186/186 204/204/204
f 188/188/188 189/189/189 205/205/205
f 188/188/188 205/205/205 196/196/196
f 190/190/190 206/206/206 205/205/205
f 190/190/190 205/205/205 189/189/189
f 184/184/184 207/207/207 206/206/206
f 184/184/184 206/206/206 190/190/190
f 161/161/161 187/187/187 208/208/208
f 161/161/161 208/208/208 193/193/193
f 157/157/157 158/158/158 159/159/159
f 157/157/157 159/159/159 160/160/160
f 160/160/160 159/159/159 161/161/161
f 160/160/160 161/161/161 162/162/162
f 163/163/163 164/164/164 165/165/165
f 163/163/163 165/165/165 166/166/166
f 165/165/165 164/164/164 167/167/167
f 165/165/165 167/167/167 168/168/168
f 169/169/169 166/166/166 165/165/165
f 169/169/169 165/165/165 168/168/168
f 170/170/170 168/168/168 167/167/167
f 170/170/170 167/167/167 171/171/171
f 172/172/172 169/169/169 168/168/168
f 172/172/172 168/168/168 170/170/170
f 170/170/170 171/171/171 173/173/173
f 170/170/170 173/173/173 174/174/174
f 157/157/157 172/172/172 170/170/170
f 157/157/157 170/170/170 174/174/174
f 157/157/157 174/174/174 175/175/175
f 157/157/157 175/175/175 158/158/158
f 173/173/173 176/176/176 175/175/175
f 173/173/173 175/175/175 174/174/174
f 177/177/177 175/175/175 176/176/176
f 177/177/177 176/176/176 178/178/178
f 175/175/175 177/177/177 179/179/179
f 175/175/175 179/179/179 158/158/158
f 177/177/177 178/178/178 180/180/180
f 177/177/177 180/180/180 179/179/179
f 181/181/181 166/166/166 169/169/169
f 181/181/181 169/169/169 182/182/182
f 182/182/182 169/169/169 172/172/172
f 182/182/182 172/172/172 183/183/183
f 183/183/183 172/172/172 157/157/157
f 183/183/183 157/157/157 160/160/160
f 162/162/162 184/184/184 183/183/183
f 162/162/162 183/183/183 160/160/160
f 185/185/185 159/159/159 158/158/158
f 185/185/185 158/158/158 179/179/179
f 186/186/186 187/187/187 185/185/185
f 186/186/186 185/185/185 179/179/179
f 188/188/188 166/166/166 181/181/181
f 188/188/188 181/181/181 189/189/189
f 181/181/181 182/182/182 190/190/190
f 181/181/181 190/190/190 189/189/189
f 182/182/182 183/183/183 184/184/184
f 182/182/182 184/184/184 190/190/190
f 161/161/161 159/159/159 185/185/185
f 161/161/161 185/185/185 187/187/187
f 191/191/191 192/192/192 193/193/193
f 191/191/191 193/193/193 194/194/194
f 192/192/192 162/162/162 161/161/161
f 192/192/192 161/161/161 193/193/193
f 195/195/195 164/164/164 163/163/163
f 195/195/195 163/163/163 196/196/196
f 195/195/195 197/197/197 167/167/167
f 195/195/195 167/167/167 164/164/164
f 198/198/198 197/197/197 195/195/195
f 198/198/198 195/195/195 196/196/196
f 199/199/199 171/171/171 167/167/167
f 199/199/199 167/167/167 197/197/197
f 200/200/200 199/199/199 197/197/197
f 200/200/200 197/197/197 198/198/198
f 199/199/199 201/201/201 173/173/173
f 199/199/199 173/173/173 171/171/171
f 191/191/191 201/201/201 199/199/199
f 191/191/191 199/199/199 200/200/200
f 191/191/191 194/194/194 202/202/202
f 191/191/191 202/202/202 201/201/201
f 202/202/202 176/176/176 173/173/173
f 202/202/202 173/173/173 201/201/201
f 203/203/203 178/178/178 176/176/176
f 203/203/203 176/176/176 202/202/202
f 202/202/202 194/194/194 204/204/204
f 202/202/202 204/204/204 203/203/203
f 203/203/203 204/204/204 180/180/180
f 203/203/203 180/180/180 178/178/178
f 205/205/205 206/206/206 198/198/198
f 205/205/205 198/198/198 196/196/196
f 206/206/206 207/207/207 200/200/200
f 206/206/206 200/200/200 198/198/198
f 207/207/207 192/192/192 191/191/191
f 207/207/207 191/191/191 200/200/200
f 207/207/207 184/184/184 162/162/162
f 207/207/207 162/162/162 192/192/192
f 208/208/208 204/204/204 194/194/194
f 208/208/208 194/194/194 193/193/193
f 208/208/208 187/187/187 186/186/186
f 208/208/208 186/186/186 204/204/204
f 188/188/188 189/189/189 205/205/205
f 188/188/188 205/205/205 196/196/196
f 190/190/190 206/206/206 205/205/205
f 190/190/190 205/205/205 189/189/189
f 184/184/184 207/207/207 206/206/206
f 184/184/184 206/206/206 190/190/190
f 161/161/161 187/187/187 208/208/208
f 161/161/161 208/208/208 193/193/193
# ext.tangent 0.055482 -0.434629 -0.898899 1.0
# ext.tangent 0.287809 -0.734255 -0.614846 1.0
# ext.tangent 0.832703 -0.553240 -0.023050 1.0
# ext.tangent 0.669466 -0.659053 -0.342730 1.0
# ext.tangent -0.084844 -0.936026 0.341551 1.0
# ext.tangent -0.088613 -0.966621 -0.240397 1.0
# ext.tangent -0.089936 -0.987859 0.126674 1.0
# ext.tangent -0.024759 -0.253468 -0.967027 1.0
# ext.tangent -0.816746 0.064943 -0.573330 1.0
# ext.tangent -0.539252 0.759147 -0.364558 1.0
# ext.tangent -0.010997 -0.102044 -0.994719 1.0
# ext.tangent -0.714264 0.133303 -0.687064 1.0
# ext.tangent 0.033452 0.595033 -0.803005 1.0
# ext.tangent -0.714886 -0.287891 -0.637226 1.0
# ext.tangent -0.061060 -0.655118 -0.753055 1.0
# ext.tangent 0.066935 0.166505 -0.983766 1.0
# ext.tangent -0.088530 -0.965641 -0.244337 1.0
# ext.tangent -0.784761 -0.524381 -0.330417 1.0
# ext.tangent -0.816776 -0.576955 0.000689 1.0
# ext.tangent -0.084480 -0.932233 0.351858 -1.0
# ext.tangent -0.772787 -0.628949 0.084991 1.0
# ext.tangent -0.088634 -0.975031 0.203616 1.0
# ext.tangent 0.434281 -0.601744 -0.670301 1.0
# ext.tangent -0.031642 -0.329366 -0.943672 -1.0
# ext.tangent 0.641442 0.339880 -0.687774 1.0
# ext.tangent 0.604338 0.004546 -0.796715 1.0
# ext.tangent 0.599747 -0.423106 -0.679180 1.0
# ext.tangent -0.060157 -0.645137 -0.761695 -1.0
# ext.tangent 0.871935 -0.418536 0.254079 1.0
# ext.tangent 0.031644 0.329362 0.943673 1.0
# ext.tangent -0.055535 -0.622950 0.780288 1.0
# ext.tangent 0.089936 0.987859 -0.126674 1.0
# ext.tangent 0.040080 0.455728 -0.889216 1.0
# ext.tangent -0.009724 -0.088037 -0.996070 -1.0
# ext.tangent -0.136228 -0.417133 -0.898578 -1.0
# ext.tangent -0.778839 -0.526891 -0.340287 -1.0
# ext.tangent -0.919179 -0.393337 -0.019882 -1.0
# ext.tangent -0.417876 -0.669910 -0.613678 -1.0
# ext.tangent 0.813092 -0.083842 -0.576066 -1.0
# ext.tangent 0.666535 0.649001 -0.366780 -1.0
# ext.tangent 0.724295 0.002031 -0.689488 -1.0
# ext.tangent 0.072103 0.591489 -0.803083 -1.0
# ext.tangent 0.648845 -0.412395 -0.639477 -1.0
# ext.tangent -0.038945 0.176170 -0.983589 -1.0
# ext.tangent 0.675777 -0.657644 -0.332909 -1.0
# ext.tangent 0.698839 -0.715276 -0.001874 -1.0
# ext.tangent 0.646465 -0.758444 0.082737 -1.0
# ext.tangent -0.538204 -0.512857 -0.668816 -1.0
# ext.tangent -0.571618 0.450600 -0.685720 -1.0
# ext.tangent -0.596184 0.114131 -0.794694 -1.0
# ext.tangent -0.668669 -0.307311 -0.677083 -1.0
# ext.tangent -0.932443 -0.253976 0.256996 -1.0
# ext.tangent 0.182011 0.693882 0.696707 1.0
# ext.tangent 0.376891 0.895573 0.236437 1.0
# ext.tangent 0.877610 0.425880 -0.220061 1.0
# ext.tangent 0.777091 0.629225 -0.014337 1.0
# ext.tangent 0.064786 0.722548 -0.688279 1.0
# ext.tangent 0.086041 0.948534 -0.304761 1.0
# ext.tangent 0.077056 0.853911 -0.514682 1.0
# ext.tangent 0.062070 0.666814 0.742635 1.0
# ext.tangent -0.733542 0.351180 0.581884 1.0
# ext.tangent -0.627095 -0.504191 0.593754 1.0
# ext.tangent 0.046581 0.494785 0.867766 1.0
# ext.tangent -0.625119 0.273374 0.731090 1.0
# ext.tangent -0.049810 -0.234605 0.970814 1.0
# ext.tangent -0.629648 0.678847 0.377771 1.0
# ext.tangent 0.088003 0.959678 0.266973 1.0
# ext.tangent 0.094881 0.145171 0.984847 1.0
# ext.tangent 0.086171 0.949901 -0.300437 1.0
# ext.tangent -0.678205 0.734755 -0.013173 1.0
# ext.tangent -0.633308 0.698407 -0.333390 1.0
# ext.tangent 0.064285 0.717177 -0.693920 1.0
# ext.tangent -0.547844 0.720380 -0.425346 1.0
# ext.tangent 0.071923 0.799126 -0.596846 1.0
# ext.tangent 0.591850 0.752802 0.288101 1.0
# ext.tangent 0.069016 0.744364 0.664198 1.0
# ext.tangent 0.446356 -0.229212 0.865002 1.0
# ext.tangent 0.547039 0.228430 0.805337 1.0
# ext.tangent 0.707403 0.584712 0.397106 1.0
# ext.tangent 0.087604 0.954987 0.283418 1.0
# ext.tangent 0.838579 0.241303 -0.488424 1.0
# ext.tangent -0.069014 -0.744365 -0.664198 1.0
# ext.tangent 0.031014 0.356851 -0.933646 1.0
# ext.tangent -0.077058 -0.853911 0.514682 1.0
# ext.tangent -0.013932 -0.170593 0.985243 1.0
# ext.tangent 0.044913 0.476298 0.878136 1.0
# ext.tangent -0.051141 0.715155 0.697093 -1.0
# ext.tangent -0.650421 0.759481 -0.011856 -1.0
# ext.tangent -0.786773 0.577686 -0.217408 -1.0
# ext.tangent -0.207814 0.948921 0.237405 -1.0
# ext.tangent 0.786874 0.212354 0.579427 -1.0
# ext.tangent 0.527412 -0.609383 0.592022 -1.0
# ext.tangent 0.666641 0.155423 0.728995 -1.0
# ext.tangent 0.009719 -0.240038 0.970715 -1.0
# ext.tangent 0.743324 0.553530 0.375597 -1.0
# ext.tangent -0.063805 0.159650 0.985110 -1.0
# ext.tangent 0.799930 0.599890 -0.015623 -1.0
# ext.tangent 0.748077 0.572358 -0.335838 -1.0
# ext.tangent 0.667766 0.609468 -0.427361 -1.0
# ext.tangent -0.444927 0.847420 0.289688 -1.0
# ext.tangent -0.477639 -0.144839 0.866535 -1.0
# ext.tangent -0.494018 0.323416 0.807062 -1.0
# ext.tangent -0.588597 0.702959 0.399253 -1.0
# ext.tangent -0.782645 0.389334 -0.485682 -1.0
# ext.tangent 0.030199 -0.832959 -0.552509 1.0
# ext.tangent 0.187112 -0.980768 -0.055526 1.0
# ext.tangent 0.771747 -0.556299 0.308119 1.0
# ext.tangent 0.642644 -0.753451 0.138998 1.0
# ext.tangent -0.056030 -0.628192 0.776038 1.0
# ext.tangent -0.080280 -0.888104 0.452577 1.0
# ext.tangent -0.068663 -0.764173 0.641346 1.0
# ext.tangent -0.076347 -0.826629 -0.557544 1.0
# ext.tangent -0.814118 -0.321203 -0.483778 1.0
# ext.tangent -0.543724 0.504134 -0.670979 1.0
# ext.tangent -0.064376 -0.692513 -0.718528 1.0
# ext.tangent -0.708057 -0.298564 -0.639934 1.0
# ext.tangent -0.022294 0.065018 -0.997635 1.0
# ext.tangent -0.762618 -0.609833 -0.215677 1.0
# ext.tangent -0.090856 -0.995048 -0.040302 1.0
# ext.tangent 0.050401 -0.331770 -0.942013 1.0
# ext.tangent -0.080409 -0.889452 0.449899 1.0
# ext.tangent -0.788301 -0.598917 0.140998 1.0
# ext.tangent -0.724137 -0.535430 0.434672 1.0
# ext.tangent -0.055429 -0.621682 0.781306 1.0
# ext.tangent -0.653748 -0.548747 0.521047 1.0
# ext.tangent -0.063578 -0.709553 0.701778 1.0
# ext.tangent 0.426920 -0.894507 -0.132656 1.0
# ext.tangent -0.080292 -0.871207 -0.484306 1.0
# ext.tangent 0.463239 -0.003910 -0.886225 1.0
# ext.tangent 0.498908 -0.494498 -0.711732 1.0
# ext.tangent 0.598267 -0.765634 -0.236394 1.0
# ext.tangent -0.090807 -0.994224 -0.057208 1.0
# ext.tangent 0.783986 -0.318559 0.532810 1.0
# ext.tangent 0.080294 0.871206 0.484306 1.0
# ext.tangent -0.018031 -0.215363 0.976368 1.0
# ext.tangent 0.068661 0.764174 -0.641346 1.0
# ext.tangent -0.001463 0.002113 -0.999997 1.0
# ext.tangent -0.062893 -0.675989 -0.734223 1.0
# ext.tangent -0.181872 -0.813649 -0.552175 -1.0
# ext.tangent -0.767940 -0.624752 0.141256 -1.0
# ext.tangent -0.858663 -0.407540 0.310820 -1.0
# ext.tangent -0.361703 -0.930692 -0.054617 -1.0
# ext.tangent 0.740953 -0.463190 -0.486255 -1.0
# ext.tangent 0.623775 0.397609 -0.672913 -1.0
# ext.tangent 0.640192 -0.421457 -0.642283 -1.0
# ext.tangent 0.030415 0.060208 -0.997722 -1.0
# ext.tangent 0.638948 -0.737679 -0.218117 -1.0
# ext.tangent -0.112705 -0.316888 -0.941743 -1.0
# ext.tangent 0.667329 -0.731712 0.138816 -1.0
# ext.tangent 0.616705 -0.657770 0.432451 -1.0
# ext.tangent 0.545352 -0.658154 0.519061 -1.0
# ext.tangent -0.582323 -0.802390 -0.130655 -1.0
# ext.tangent -0.459287 0.080048 -0.884674 -1.0
# ext.tangent -0.582457 -0.395718 -0.710036 -1.0
# ext.tangent -0.727722 -0.644650 -0.234197 -1.0
# ext.tangent -0.826935 -0.171811 0.535405 -1.0
# ext.tangent 0.038735 -0.621201 0.782694 1.0
# ext.tangent 0.383685 -0.223993 0.895887 1.0
# ext.tangent 0.928071 0.012693 0.372186 1.0
# ext.tangent 0.816397 -0.212813 0.536848 1.0
# ext.tangent 0.058053 0.621878 0.780959 1.0
# ext.tangent 0.001706 0.000107 0.999999 1.0
# ext.tangent 0.039794 0.419604 0.906835 -1.0
# ext.tangent -0.058311 -0.652822 0.755264 1.0
# ext.tangent -0.946062 -0.218170 0.239517 1.0
# ext.tangent -0.753070 -0.509585 -0.416185 1.0
# ext.tangent -0.065309 -0.728196 0.682250 1.0
# ext.tangent -0.904308 -0.341070 0.256707 1.0
# ext.tangent -0.127678 -0.975742 -0.177834 1.0
# ext.tangent -0.859926 -0.237756 0.451662 1.0
# ext.tangent -0.036240 -0.413982 0.909563 1.0
# ext.tangent -0.009986 -0.966393 0.256876 1.0
# ext.tangent 0.001388 -0.003450 0.999993 1.0
# ext.tangent -0.832652 -0.053017 0.551253 1.0
# ext.tangent -0.813034 0.217523 0.540054 1.0
# ext.tangent 0.059224 0.634945 0.770284 1.0
# ext.tangent -0.806755 0.295906 0.511455 1.0
# ext.tangent 0.044304 0.469568 0.881784 1.0
# ext.tangent 0.422085 -0.351306 0.835720 1.0
# ext.tangent -0.054102 -0.607350 0.792590 1.0
# ext.tangent 0.715875 -0.690362 0.104508 1.0
# ext.tangent 0.740599 -0.586765 0.327444 1.0
# ext.tangent 0.760047 -0.425298 0.491376 1.0
# ext.tangent -0.036863 -0.420652 0.906473 -1.0
# ext.tangent 0.981086 0.173718 0.085389 1.0
# ext.tangent 0.054100 0.607350 -0.792590 -1.0
# ext.tangent 0.090840 0.994767 0.046765 -1.0
# ext.tangent -0.039796 -0.419621 -0.906827 -1.0
# ext.tangent -0.088355 -0.972273 0.216515 -1.0
# ext.tangent -0.066013 -0.735751 0.674027 -1.0
# ext.tangent -0.147936 -0.604155 0.783015 -1.0
# ext.tangent -0.839646 -0.061713 0.539617 -1.0
# ext.tangent -0.909231 0.180467 0.375141 -1.0
# ext.tangent -0.414975 -0.151175 0.897186 -1.0
# ext.tangent 0.891713 -0.386063 0.236229 -1.0
# ext.tangent 0.647398 -0.636926 -0.418570 -1.0
# ext.tangent 0.828486 -0.499193 0.253805 -1.0
# ext.tangent -0.051623 -0.982684 -0.177955 -1.0
# ext.tangent 0.804234 -0.389365 0.449001 -1.0
# ext.tangent -0.163507 -0.952466 0.257049 -1.0
# ext.tangent 0.811090 -0.203185 0.548497 -1.0
# ext.tangent 0.840803 0.066632 0.537225 -1.0
# ext.tangent 0.848661 0.144865 0.508713 -1.0
# ext.tangent -0.475942 -0.269371 0.837209 -1.0
# ext.tangent -0.828651 -0.549429 0.107076 -1.0
# ext.tangent -0.833479 -0.443146 0.330052 -1.0
# ext.tangent -0.822851 -0.280539 0.494180 -1.0
# ext.tangent -0.933163 0.348374 0.088561 -1.0
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 9 8 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.joint 8 9 9 9
# ext.weight 0.820136 0.179864 0.000000 0.000000
# ext.weight 0.770665 0.229335 0.000000 0.000000
# ext.weight 0.764271 0.235729 0.000000 0.000000
# ext.weight 0.818714 0.181286 0.000000 0.000000
# ext.weight 0.766996 0.233004 0.000000 0.000000
# ext.weight 0.820736 0.179264 0.000000 0.000000
# ext.weight 0.934069 0.065931 0.000000 0.000000
# ext.weight 0.925651 0.074349 0.000000 0.000000
# ext.weight 0.924649 0.075351 0.000000 0.000000
# ext.weight 0.935723 0.064277 0.000000 0.000000
# ext.weight 0.915885 0.084115 0.000000 0.000000
# ext.weight 0.915303 0.084697 0.000000 0.000000
# ext.weight 0.924154 0.075846 0.000000 0.000000
# ext.weight 0.887653 0.112347 0.000000 0.000000
# ext.weight 0.888878 0.111122 0.000000 0.000000
# ext.weight 0.893105 0.106895 0.000000 0.000000
# ext.weight 0.827437 0.172563 0.000000 0.000000
# ext.weight 0.825494 0.174506 0.000000 0.000000
# ext.weight 0.788192 0.211808 0.000000 0.000000
# ext.weight 0.790223 0.209777 0.000000 0.000000
# ext.weight 0.774572 0.225428 0.000000 0.000000
# ext.weight 0.775966 0.224034 0.000000 0.000000
# ext.weight 0.751646 0.248354 0.000000 0.000000
# ext.weight 0.754383 0.245617 0.000000 0.000000
# ext.weight 0.938466 0.061534 0.000000 0.000000
# ext.weight 0.928205 0.071795 0.000000 0.000000
# ext.weight 0.894817 0.105183 0.000000 0.000000
# ext.weight 0.895785 0.104215 0.000000 0.000000
# ext.weight 0.745345 0.254655 0.000000 0.000000
# ext.weight 0.754383 0.245617 0.000000 0.000000
# ext.weight 0.747259 0.252741 0.000000 0.000000
# ext.weight 0.934069 0.065931 0.000000 0.000000
# ext.weight 0.939091 0.060909 0.000000 0.000000
# ext.weight 0.928845 0.071155 0.000000 0.000000
# ext.weight 0.816297 0.183703 0.000000 0.000000
# ext.weight 0.815354 0.184646 0.000000 0.000000
# ext.weight 0.759993 0.240007 0.000000 0.000000
# ext.weight 0.765854 0.234146 0.000000 0.000000
# ext.weight 0.922711 0.077289 0.000000 0.000000
# ext.weight 0.933820 0.066180 0.000000 0.000000
# ext.weight 0.913282 0.086718 0.000000 0.000000
# ext.weight 0.922183 0.077817 0.000000 0.000000
# ext.weight 0.885276 0.114724 0.000000 0.000000
# ext.weight 0.890637 0.109363 0.000000 0.000000
# ext.weight 0.822021 0.177979 0.000000 0.000000
# ext.weight 0.784070 0.215930 0.000000 0.000000
# ext.weight 0.770518 0.229482 0.000000 0.000000
# ext.weight 0.746612 0.253388 0.000000 0.000000
# ext.weight 0.936916 0.063084 0.000000 0.000000
# ext.weight 0.926624 0.073376 0.000000 0.000000
# ext.weight 0.892734 0.107266 0.000000 0.000000
# ext.weight 0.740908 0.259092 0.000000 0.000000
# ext.weight 0.525928 0.474072 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.536882 0.463118 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.533277 0.466723 0.000000 0.000000
# ext.weight 0.610807 0.389193 0.000000 0.000000
# ext.weight 0.592402 0.407598 0.000000 0.000000
# ext.weight 0.594572 0.405428 0.000000 0.000000
# ext.weight 0.614947 0.385053 0.000000 0.000000
# ext.weight 0.592994 0.407006 0.000000 0.000000
# ext.weight 0.596954 0.403046 0.000000 0.000000
# ext.weight 0.616174 0.383827 0.000000 0.000000
# ext.weight 0.572350 0.427650 0.000000 0.000000
# ext.weight 0.569524 0.430476 0.000000 0.000000
# ext.weight 0.589744 0.410256 0.000000 0.000000
# ext.weight 0.513259 0.486741 0.000000 0.000000
# ext.weight 0.516941 0.483059 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.625721 0.374279 0.000000 0.000000
# ext.weight 0.628906 0.371094 0.000000 0.000000
# ext.weight 0.601416 0.398584 0.000000 0.000000
# ext.weight 0.598184 0.401816 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.610807 0.389193 0.000000 0.000000
# ext.weight 0.623400 0.376600 0.000000 0.000000
# ext.weight 0.625750 0.374251 0.000000 0.000000
# ext.weight 0.535959 0.464041 0.000000 0.000000
# ext.weight 0.545707 0.454293 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.601835 0.398165 0.000000 0.000000
# ext.weight 0.622788 0.377212 0.000000 0.000000
# ext.weight 0.604851 0.395149 0.000000 0.000000
# ext.weight 0.624750 0.375250 0.000000 0.000000
# ext.weight 0.580428 0.419572 0.000000 0.000000
# ext.weight 0.598716 0.401284 0.000000 0.000000
# ext.weight 0.526068 0.473932 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.632709 0.367291 0.000000 0.000000
# ext.weight 0.636370 0.363630 0.000000 0.000000
# ext.weight 0.609319 0.390681 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.626557 0.373443 0.000000 0.000000
# ext.weight 0.655730 0.344270 0.000000 0.000000
# ext.weight 0.668369 0.331631 0.000000 0.000000
# ext.weight 0.638117 0.361883 0.000000 0.000000
# ext.weight 0.665427 0.334573 0.000000 0.000000
# ext.weight 0.634603 0.365397 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.502188 0.497812 0.000000 0.000000
# ext.weight 0.505754 0.494246 0.000000 0.000000
# ext.weight 0.502137 0.497863 0.000000 0.000000
# ext.weight 0.550277 0.449723 0.000000 0.000000
# ext.weight 0.547049 0.452951 0.000000 0.000000
# ext.weight 0.556443 0.443557 0.000000 0.000000
# ext.weight 0.609077 0.390923 0.000000 0.000000
# ext.weight 0.612449 0.387551 0.000000 0.000000
# ext.weight 0.636026 0.363974 0.000000 0.000000
# ext.weight 0.633364 0.366636 0.000000 0.000000
# ext.weight 0.635505 0.364495 0.000000 0.000000
# ext.weight 0.633873 0.366127 0.000000 0.000000
# ext.weight 0.656576 0.343424 0.000000 0.000000
# ext.weight 0.653587 0.346413 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.508746 0.491254 0.000000 0.000000
# ext.weight 0.567637 0.432363 0.000000 0.000000
# ext.weight 0.564154 0.435846 0.000000 0.000000
# ext.weight 0.667956 0.332044 0.000000 0.000000
# ext.weight 0.653587 0.346413 0.000000 0.000000
# ext.weight 0.665915 0.334085 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.505007 0.494993 0.000000 0.000000
# ext.weight 0.634968 0.365032 0.000000 0.000000
# ext.weight 0.645505 0.354495 0.000000 0.000000
# ext.weight 0.675346 0.324654 0.000000 0.000000
# ext.weight 0.663717 0.336283 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.515035 0.484965 0.000000 0.000000
# ext.weight 0.512632 0.487368 0.000000 0.000000
# ext.weight 0.558670 0.441330 0.000000 0.000000
# ext.weight 0.565946 0.434055 0.000000 0.000000
# ext.weight 0.620167 0.379833 0.000000 0.000000
# ext.weight 0.643362 0.356638 0.000000 0.000000
# ext.weight 0.641971 0.358029 0.000000 0.000000
# ext.weight 0.663898 0.336102 0.000000 0.000000
# ext.weight 0.500000 0.500000 0.000000 0.000000
# ext.weight 0.517976 0.482024 0.000000 0.000000
# ext.weight 0.576015 0.423985 0.000000 0.000000
# ext.weight 0.674395 0.325605 0.000000 0.000000
# ext.weight 0.980600 0.019400 0.000000 0.000000
# ext.weight 0.967779 0.032221 0.000000 0.000000
# ext.weight 0.972554 0.027446 0.000000 0.000000
# ext.weight 0.984406 0.015594 0.000000 0.000000
# ext.weight 0.969130 0.030870 0.000000 0.000000
# ext.weight 0.981868 0.018132 0.000000 0.000000
# ext.weight 0.968436 0.031564 0.000000 0.000000
# ext.weight 0.966985 0.033015 0.000000 0.000000
# ext.weight 0.969781 0.030219 0.000000 0.000000
# ext.weight 0.970490 0.029510 0.000000 0.000000
# ext.weight 0.976625 0.023375 0.000000 0.000000
# ext.weight 0.979750 0.020250 0.000000 0.000000
# ext.weight 0.983316 0.016684 0.000000 0.000000
# ext.weight 0.981091 0.018909 0.000000 0.000000
# ext.weight 0.978513 0.021487 0.000000 0.000000
# ext.weight 0.986154 0.013846 0.000000 0.000000
# ext.weight 0.972195 0.027805 0.000000 0.000000
# ext.weight 0.975607 0.024393 0.000000 0.000000
# ext.weight 0.964510 0.035490 0.000000 0.000000
# ext.weight 0.960319 0.039681 0.000000 0.000000
# ext.weight 0.945183 0.054817 0.000000 0.000000
# ext.weight 0.940751 0.059249 0.000000 0.000000
# ext.weight 0.942903 0.057097 0.000000 0.000000
# ext.weight 0.936115 0.063885 0.000000 0.000000
# ext.weight 0.976313 0.023687 0.000000 0.000000
# ext.weight 0.986861 0.013139 0.000000 0.000000
# ext.weight 0.989308 0.010692 0.000000 0.000000
# ext.weight 0.987394 0.012606 0.000000 0.000000
# ext.weight 0.951578 0.048422 0.000000 0.000000
# ext.weight 0.936115 0.063885 0.000000 0.000000
# ext.weight 0.946946 0.053054 0.000000 0.000000
# ext.weight 0.968436 0.031564 0.000000 0.000000
# ext.weight 0.974945 0.025055 0.000000 0.000000
# ext.weight 0.985298 0.014702 0.000000 0.000000
# ext.weight 0.982720 0.017280 0.000000 0.000000
# ext.weight 0.986033 0.013967 0.000000 0.000000
# ext.weight 0.975016 0.024984 0.000000 0.000000
# ext.weight 0.970863 0.029137 0.000000 0.000000
# ext.weight 0.971317 0.028683 0.000000 0.000000
# ext.weight 0.972265 0.027735 0.000000 0.000000
# ext.weight 0.981373 0.018627 0.000000 0.000000
# ext.weight 0.984675 0.015325 0.000000 0.000000
# ext.weight 0.982916 0.017084 0.000000 0.000000
# ext.weight 0.987810 0.012190 0.000000 0.000000
# ext.weight 0.977858 0.022142 0.000000 0.000000
# ext.weight 0.967450 0.032551 0.000000 0.000000
# ext.weight 0.948753 0.051247 0.000000 0.000000
# ext.weight 0.947221 0.052779 0.000000 0.000000
# ext.weight 0.977734 0.022266 0.000000 0.000000
# ext.weight 0.987908 0.012092 0.000000 0.000000
# ext.weight 1.000000 0.000000 0.000000 0.000000
# ext.weight 0.955027 0.044973 0.000000 0.000000
|
{
"pile_set_name": "Github"
}
|
<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"
}
|
#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"
}
|
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 TryPutMVarOp = True
primOpHasSideEffects ReadMVarOp = True
primOpHasSideEffects TryReadMVarOp = True
primOpHasSideEffects IsEmptyMVarOp = True
primOpHasSideEffects DelayOp = True
primOpHasSideEffects WaitReadOp = True
primOpHasSideEffects WaitWriteOp = True
primOpHasSideEffects ForkOp = True
primOpHasSideEffects ForkOnOp = True
primOpHasSideEffects KillThreadOp = True
primOpHasSideEffects YieldOp = True
primOpHasSideEffects MyThreadIdOp = True
primOpHasSideEffects LabelThreadOp = True
primOpHasSideEffects IsCurrentThreadBoundOp = True
primOpHasSideEffects NoDuplicateOp = True
primOpHasSideEffects ThreadStatusOp = True
primOpHasSideEffects MkWeakOp = True
primOpHasSideEffects MkWeakNoFinalizerOp = True
primOpHasSideEffects AddCFinalizerToWeakOp = True
primOpHasSideEffects DeRefWeakOp = True
primOpHasSideEffects FinalizeWeakOp = True
primOpHasSideEffects TouchOp = True
primOpHasSideEffects MakeStablePtrOp = True
primOpHasSideEffects DeRefStablePtrOp = True
primOpHasSideEffects EqStablePtrOp = True
primOpHasSideEffects MakeStableNameOp = True
primOpHasSideEffects CompactNewOp = True
primOpHasSideEffects CompactResizeOp = True
primOpHasSideEffects CompactAllocateBlockOp = True
primOpHasSideEffects CompactFixupPointersOp = True
primOpHasSideEffects CompactAdd = True
primOpHasSideEffects CompactAddWithSharing = True
primOpHasSideEffects CompactSize = True
primOpHasSideEffects ParOp = True
primOpHasSideEffects SparkOp = True
primOpHasSideEffects GetSparkOp = True
primOpHasSideEffects NumSparks = True
primOpHasSideEffects NewBCOOp = True
primOpHasSideEffects TraceEventOp = True
primOpHasSideEffects TraceMarkerOp = True
primOpHasSideEffects (VecReadByteArrayOp _ _ _) = True
primOpHasSideEffects (VecWriteByteArrayOp _ _ _) = True
primOpHasSideEffects (VecReadOffAddrOp _ _ _) = True
primOpHasSideEffects (VecWriteOffAddrOp _ _ _) = True
primOpHasSideEffects (VecReadScalarByteArrayOp _ _ _) = True
primOpHasSideEffects (VecWriteScalarByteArrayOp _ _ _) = True
primOpHasSideEffects (VecReadScalarOffAddrOp _ _ _) = True
primOpHasSideEffects (VecWriteScalarOffAddrOp _ _ _) = True
primOpHasSideEffects PrefetchByteArrayOp3 = True
primOpHasSideEffects PrefetchMutableByteArrayOp3 = True
primOpHasSideEffects PrefetchAddrOp3 = True
primOpHasSideEffects PrefetchValueOp3 = True
primOpHasSideEffects PrefetchByteArrayOp2 = True
primOpHasSideEffects PrefetchMutableByteArrayOp2 = True
primOpHasSideEffects PrefetchAddrOp2 = True
primOpHasSideEffects PrefetchValueOp2 = True
primOpHasSideEffects PrefetchByteArrayOp1 = True
primOpHasSideEffects PrefetchMutableByteArrayOp1 = True
primOpHasSideEffects PrefetchAddrOp1 = True
primOpHasSideEffects PrefetchValueOp1 = True
primOpHasSideEffects PrefetchByteArrayOp0 = True
primOpHasSideEffects PrefetchMutableByteArrayOp0 = True
primOpHasSideEffects PrefetchAddrOp0 = True
primOpHasSideEffects PrefetchValueOp0 = True
primOpHasSideEffects _ = False
|
{
"pile_set_name": "Github"
}
|
<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"
}
|
// 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"
}
|
// 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"
}
|
// 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"
}
|
#!/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"
}
|
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"
}
|
<?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"
}
|
/* 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"
}
|
%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"
}
|
/* -*- 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 * (*memAllocator)(size_t), size_t *len, wchar_t **wcStr)
* @brief OpenSOAP String GetStringWC with memAllocator
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP Character String
* @param
* memAllocator() wchar_t * [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
* wcStr wchar_t ** [out] ((|wcStr|)) WC string return buffer pointer. If NULL, then error.
* @note
* After calling this function, the memory allocated to *wcStr should be released.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetStringWCWithAllocator(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ wchar_t * (*memAllocator)(size_t),
/* [out] */ size_t *len,
/* [out] */ wchar_t **wcStr);
/**
* @fn int OpenSOAPStringGetStringUTF8WithAllocator(OpenSOAPStringPtr str, char * (*memAllocator)(size_t), size_t *len, char **utf8Str)
* @brief OpenSOAP String GetString as UTF-8 encoding 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
* utf8Str char ** [out] ((|utf8Str|)) UTF8 string return buffer pointer. If NULL, then error.
* @note
* After calling this function, the memory allocated to *utf8Str should be released.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetStringUTF8WithAllocator(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ char * (*memAllocator)(size_t),
/* [out] */ size_t *len,
/* [out] */ char **utf8Str);
/**
* @fn int OpenSOAPStringGetStringMB(OpenSOAPStringPtr str, size_t *len, char *mb_Str)
* @brief Get MultiByte String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* len size_t * [in, out] ((|len|)) size.
* @param
* mb_Str char * [out] ((|mb_str|)) Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetStringMB(/* [in] */ OpenSOAPStringPtr str,
/* [in, out] */ size_t *len,
/* [out] */ char * mb_Str);
/**
* @fn int OpenSOAPStringGetStringWC(OpenSOAPStringPtr str, size_t *len, wchar_t *wc_str)
* @brief Get WideCharacter String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* len size_t * [in, out] ((|len|)) size.
* @param
* wc_str char * [out] ((|wc_str|)) Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetStringWC(/* [in] */ OpenSOAPStringPtr str,
/* [in, out] */ size_t *len,
/* [out] */ wchar_t *wc_str);
/**
* @fn int OpenSOAPStringGetCharEncodingString(OpenSOAPStringPtr str, const char *char_enc, OpenSOAPByteArrayPtr char_enc_str)
* @brief Get character encoding string
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* char_enc const char * [in] ((|charEnc|)) character encoding
* @param
* char_enc_str OpenSOAPByteArrayPtr [out] ((|charEncStr|)) Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetCharEncodingString(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const char *char_enc,
/* [out] */ OpenSOAPByteArrayPtr char_enc_str);
/**
* @fn int OpenSOAPStringSetStringMB(OpenSOAPStringPtr str, const char *mb_str)
* @brief Set MultiByte Character string for the current locale
* @param
* str OpenSOAPStringPtr [in, out] ((|str|)) OpenSOAP String
* @param
* mb_str char * [in] ((|mb_str|)) Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringSetStringMB(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const char *mb_str);
/**
* @fn int OpenSOAPStringSetStringWC(OpenSOAPStringPtr str, const wchar_t *wc_str)
* @brief Set WideCharacter string
* @param
* str OpenSOAPStringPtr [in, out] ((|str|)) OpenSOAP String
* @param
* wc_str const wchar_t * [in] ((|wc_str|)) Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringSetStringWC(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *wc_str);
/**
* @fn int OpenSOAPStringSetCharEncodingString(OpenSOAPStringPtr str, const char *char_enc, OpenSOAPByteArrayPtr charEncStr)
* @brief Set character encoding string for the current locale
* @param
* str OpenSOAPStringPtr [in, out] ((|str|)) OpenSOAP String
* @param
* char_enc const char * [in] ((|charEnc|)) Character encoding
* @param
* charEncStr OpenSOAPByteArrayPtr [in] ((|charEncStr|)) Character String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringSetCharEncodingString(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const char *char_enc,
/* [in] */ OpenSOAPByteArrayPtr charEncStr);
/**
* @fn int OpenSOAPStringSetStringUTF8(OpenSOAPStringPtr str, const char *utf8Str)
* @brief Set UTF-8 encoded string
* @param
* str OpenSOAPStringPtr [out] ((|str|))
* @param
* utf8Str const char * [in] ((|utf8Str|))
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringSetStringUTF8(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const char *utf8Str);
/**
* @fn int OpenSOAPStringFormatMB(OpenSOAPStringPtr str, const char *format, ...)
* @brief Format MultiByte String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* format const char * [in] ((|format|)) Format String
* @param
* ... Variable parameters
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringFormatMB(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const char *format, ...);
/**
* @fn int OpenSOAPStringFormatWC(OpenSOAPStringPtr str, const wchar_t *format, ...)
* @brief Format WideCharacter String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* format const wchar_t * [in] ((|format|)) Format String
* @param
* ... Variable parameters
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringFormatWC(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *format, ...);
/**
* @fn int OpenSOAPStringVFormatMB(OpenSOAPStringPtr str, const char *format, va_list ap)
* @brief Format MultiByte String with va_list
* @param
* str [out] OpenSOAP String
* @param
* format [in] Format String
* @param
* ap [in] Variable parameters
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringVFormatMB(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const char *format,
/* [in] */ va_list ap);
/**
* @fn int OpenSOAPStringVFormatWC(OpenSOAPStringPtr str, const wchar_t *format, va_list ap)
* @brief Format WideCharacter String with va_list
* @param
* str [out] OpenSOAP String
* @param
* format [in] Format String
* @param
* ap [in] Variable parameters
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringVFormatWC(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *format,
/* [in] */ va_list ap);
/**
* @fn int OpenSOAPStringCompareMB(OpenSOAPStringPtr str, const char *cmp_str, int *cmp_rslt)
* @brief Compare MultiByte String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* cmp_str const char * [in] ((|cmp_str|)) Character String
* @param
* cmp_rslt int * [out] ((|cmp_rslt|)) Comparison Result. Same as for strcmp().
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCompareMB(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const char *cmp_str,
/* [out] */ int *cmp_rslt);
/**
* @fn int OpenSOAPStringCompareWC(OpenSOAPStringPtr str, const wchar_t *cmp_str, int *cmp_rslt)
* @brief Compare WideCharacter String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* cmp_str const wchar_t * [in] ((|cmp_str|)) Character String
* @param
* cmp_rslt int * [out] ((|cmp_rslt|)) Comparison Result. Same as for strcmp().
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCompareWC(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *cmp_str,
/* [out] */ int *cmp_rslt);
/**
* @fn int OpenSOAPStringCompare(OpenSOAPStringPtr str, OpenSOAPStringPtr cmp_str, int *cmp_rslt)
* @brief Compare String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* cmp_str OpenSOAPStringPtr [in] ((|cmp_str|)) Character String
* @param
* cmp_rslt int * [out] ((|cmp_rslt|)) Comparison Result. Same as for strcmp().
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringCompare(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ OpenSOAPStringPtr cmp_str,
/* [out] */ int *cmp_rslt);
/**
* @fn int OpenSOAPStringFindStringMB(OpenSOAPStringPtr str, const char *find_str, size_t *idx)
* @brief Find String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* find_str const char * [in] ((|find_str|)) Search string
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Search result index.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringFindStringMB(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const char *find_str,
/* [in, out] */ size_t *idx);
/**
* @fn int OpenSOAPStringFindStringWC(OpenSOAPStringPtr str, const wchar_t *find_str, size_t *idx)
* @brief Find String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* find_str const wchar_t * [in] ((|find_str|)) Search string
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Search result index.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringFindStringWC(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *find_str,
/* [in, out] */ size_t *idx);
/**
* @fn int OpenSOAPStringFindString(OpenSOAPStringPtr str, OpenSOAPStringPtr find_str, size_t *idx)
* @brief Find String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* find_str OpenSOAPStringPtr [in] ((|find_str|)) Search string
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Search result index.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringFindString(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ OpenSOAPStringPtr find_str,
/* [in, out] */ size_t *idx);
/**
* @typedef int (*OpenSOAPStringFindIfFunc)(void *opt, wchar_t c, int *judge)
* @brief Find String Function Pointer Type Definition
* @param
* opt void * [in] Find Function Option
* @param
* c wchar_t [in]
* @param
* judge int * [out] Result
* @return
* Error Code
*/
typedef int
(*OpenSOAPStringFindIfFunc)(/* [in, out] */ void *opt,
/* [in] */ wchar_t c,
/* [out] */ int *judge);
/**
* @fn int OpenSOAPStringFindIfStringIndex(OpenSOAPStringPtr str, OpenSOAPStringFindIfFunc find_func, void *find_func_opt, size_t *idx)
* @brief Find String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* find_func OpenSOAPStringFindIfFunc [in] ((|find_func|)) Search condition function
* @param
* find_func_opt void * [in] ((|find_func_opt|)) Search condition function first parameter
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Search result index.
* @return
* Error Code
*/
extern
int
OPENSOAP_API
OpenSOAPStringFindIfStringIndex(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ OpenSOAPStringFindIfFunc find_func,
/* [in] */ void *find_func_opt,
/* [in, out] */ size_t *idx);
/**
* @fn int OpenSOAPStringReplaceStringMB(OpenSOAPStringPtr str, const char *find_str, const char *rplc_str, size_t *idx)
* @brief Replace String
* @param
* str OpenSOAPStringPtr [in, out] ((|str|)) OpenSOAP String
* @param
* find_str const char * [in] ((|find_str|)) Search string
* @param
* rplc_str const char * [in] ((|rplc_str|)) Replacement string
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Replacement start index. If can't replace, set (size_)(-1).
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringReplaceStringMB(/* [in, out] */ OpenSOAPStringPtr str,
/* [in] */ const char *find_str,
/* [in] */ const char *rplc_str,
/* [in, out] */ size_t *idx);
/**
* @fn int OpenSOAPStringReplaceStringWC(OpenSOAPStringPtr str, const wchar_t *find_str, const wchar_t *rplc_str, size_t *idx)
* @brief Replace String
* @param
* str OpenSOAPStringPtr [in, out] ((|str|)) OpenSOAP String
* @param
* find_str const wchar_t * [in] ((|find_str|)) Search string
* @param
* rplc_str const wchar_t * [in] ((|rplc_str|)) Replacement string
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Replacement start index. If can't replace, set (size_)(-1).
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringReplaceStringWC(/* [in, out] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *find_str,
/* [in] */ const wchar_t *rplc_str,
/* [in, out] */ size_t *idx);
/**
* @fn int OpenSOAPStringReplaceString(OpenSOAPStringPtr str, OpenSOAPStringPtr find_str, OpenSOAPStringPtr rplc_str, size_t *idx)
* @brief Replace String
* @param
* str OpenSOAPStringPtr [in, out] ((|str|)) OpenSOAP String
* @param
* find_str OpenSOAPStringPtr [in] ((|find_str|)) Search string
* @param
* rplc_str OpenSOAPStringPtr [in] ((|rplc_str|)) Replacement string
* @param
* idx size_t * [in, out] ((|idx|)) [in]:Search start index; [out]:Replacement start index. If can't replace, set (size_)(-1).
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringReplaceString(/* [in, out] */ OpenSOAPStringPtr str,
/* [in] */ OpenSOAPStringPtr find_str,
/* [in] */ OpenSOAPStringPtr rplc_str,
/* [in, out] */ size_t *idx);
/**
* @fn int OpenSOAPStringClear(OpenSOAPStringPtr str)
* @brief Clear OpenSOAPString, set length to 0
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringClear(/* [out] */ OpenSOAPStringPtr str);
/**
* @fn int OpenSOAPStringAppendMB(OpenSOAPStringPtr str, const char *mb_str, size_t mb_len)
* @brief Concatenate MB String To OpenSOAPString for current locale
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* mb_str char * [in] ((|mb_str|)) Concatenate string
* @param
* mb_len size_t [in] ((|mb_len|)) Concatenate string number of characters. If 0, concatenate the entire mb_str.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringAppendMB(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const char *mb_str,
/* [in] */ size_t mb_len);
/**
* @fn int OpenSOAPStringAppendWC(OpenSOAPStringPtr str, const wchar_t *wc_str, size_t wc_len)
* @brief Concatenate WC String To OpenSOAPString
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* wc_str wchar_t * [in] ((|wc_str|)) Concatenate string
* @param
* wc_len size_t [in] ((|wc_len|)) Concatenate string number of characters. If 0, concatenate the entire wc_str.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringAppendWC(/* [out] */ OpenSOAPStringPtr str,
/* [in] */ const wchar_t *wc_str,
/* [in] */ size_t wc_len);
/**
* @fn int OpenSOAPStringDuplicate(OpenSOAPStringPtr str, OpenSOAPStringPtr *dup_str)
* @brief Duplicate String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* dup_str OpenSOAPStringPtr * [out] ((|dup_str|)) Duplicate string
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringDuplicate(/* [in] */ OpenSOAPStringPtr str,
/* [out] */ OpenSOAPStringPtr *dup_str);
/**
* @fn int OpenSOAPStringGetSubstring(OpenSOAPStringPtr str, size_t beg, size_t len, OpenSOAPStringPtr *sub_str)
* @brief Duplicate String
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* beg size_t [in] ((|beg|)) Substring start index
* @param
* len size_t [in] ((|len|)) Substring length. If len == -1 then copy to end of string.
* @param
* sub_str OpenSOAPStringPtr * [out] ((|sub_str|)) Substring
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetSubstring(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ size_t beg,
/* [in] */ size_t len,
/* [out] */ OpenSOAPStringPtr *sub_str);
/**
* @fn int OpenSOAPStringConvertCharEncoding(const char *from_enc, OpenSOAPByteArrayPtr from_str, const char *to_enc, OpenSOAPByteArrayPtr to_str)
* @brief Convert character encoding. This function does not use the OpenSOAP member, but is used for string processing.
* @param
* from_enc const char * [in] ((|fromEnc|)) Convert source character encoding. If NULL or "" then current locale encoding.
* @param
* from_str OpenSOAPByteArrayPtr [in] ((|fromStr|)) Convert source string data.
* @param
* to_enc const char * [in] ((|toEnc|)) Convert destination character encoding. If NULL or "" then current locale encoding.
* @param
* to_str OpenSOAPByteArrayPtr [out] ((|toStr|)) Convert destination string data. If fromEnc equal to toEnc, then copy fromStr to toStr.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringConvertCharEncoding(/* [in] */ const char *from_enc,
/* [in] */ OpenSOAPByteArrayPtr from_str,
/* [in] */ const char *to_enc,
/* [out] */ OpenSOAPByteArrayPtr to_str);
/**
* @fn int OpenSOAPStringConvertXMLCharRefToUTF8(const unsigned char *utf8Beg, OpenSOAPByteArrayPtr utf8BAry)
* @brief Convert XML's CharRef to UTF-8 encoding. This function does not use the OpenSOAP member, but is used for string processing.
* @param
* utf8Beg const unsigned char * [in] ((|utf8Beg|)) Convert source UTF-8 encode string data begin pointer.
* @param
* utf8BAry OpenSOAPByteArrayPtr [out] ((|toStr|)) Convert destination string data.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringConvertXMLCharRefToUTF8(/* [in] */ const unsigned char *utf8Beg,
/* [out] */ OpenSOAPByteArrayPtr utf8BAry);
/**
* @fn int OpenSOAPStringGetStringUSASCII(OpenSOAPStringPtr str, OpenSOAPByteArrayPtr charEncStr)
* @brief Get US-ASCII string
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* charEncStr OpenSOAPByteArrayPtr [out] ((|charEncStr|)) output buffer
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringGetStringUSASCII(/* [in] */ OpenSOAPStringPtr str,
/* [out] */ OpenSOAPByteArrayPtr charEncStr);
/**
* @fn int OpenSOAPStringIterateProc(OpenSOAPStringPtr str, int (*iterateProc)(unsigned long c, size_t idx, size_t len, void *opt), int (*beforeProc)(size_t len, void *opt), int (*afterProc)(size_t len, void *opt), void *opt)
* @brief Iterate procedure
* @param
* str OpenSOAPStringPtr [in] ((|str|)) OpenSOAP String
* @param
* iterateProc() int [in] ( * ((|iterateProc|)) )(unsigned long, size_t, size_t, void *) iterate procedure
* @param
* beforeProc() int [in] ( * ((|beforeProc|)) )(size_t, void *) Before iterate procedure. If NULL, then no effect
* @param
* afterProc() int [in] ( * ((|afterProc|)) )(size_t, void *) After iterate procedure. If NULL, then no effect
* @param
* opt void * [in, out] ((|opt|)) iterateProc, beforeProc, and afterProc's option parameters.
* @return
* Error Code
*/
int
OPENSOAP_API
OpenSOAPStringIterateProc(/* [in] */ OpenSOAPStringPtr str,
/* [in] */ int (*iterateProc)(unsigned long c, size_t idx, size_t len, void *opt),
/* [in] */ int (*beforeProc)(size_t len, void *opt),
/* [in] */ int (*afterProc)(size_t len, void *opt),
/* [in, out] */ void *opt);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OpenSOAP_String_H */
|
{
"pile_set_name": "Github"
}
|
<?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"
}
|
//
// 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"
}
|
<%--
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"
}
|
// 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"
}
|
@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"
}
|
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"
}
|
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"
}
|
<?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"
}
|
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"
}
|
<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"
}
|
#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"
}
|
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"
}
|
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"
}
|
<?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"
}
|
<?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"
}
|
protoc.exe --java_out=. SocketProtocol.proto
@pause
|
{
"pile_set_name": "Github"
}
|
#### 谈谈热修复的原理
##### 参考答案
我们知道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"
}
|
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"
}
|
<!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>
<td class="colLast"><code><span class="memberNameLink"><a href="../Decon_eQTL/ExpressionData.html#getSampleNames--">getSampleNames</a></span>()</code> </td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Decon_eQTL/ExpressionData.html#setGeneExpression-java.util.HashMap-">setGeneExpression</a></span>(java.util.HashMap<java.lang.String,double[]> geneExpression)</code> </td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Decon_eQTL/ExpressionData.html#setSampleNames-java.util.ArrayList-">setSampleNames</a></span>(java.util.ArrayList<java.lang.String> sampleNames)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ExpressionData--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ExpressionData</h4>
<pre>public ExpressionData()</pre>
</li>
</ul>
<a name="ExpressionData-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ExpressionData</h4>
<pre>public ExpressionData(java.lang.String expressionFile)
throws java.io.IOException</pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setSampleNames-java.util.ArrayList-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSampleNames</h4>
<pre>public void setSampleNames(java.util.ArrayList<java.lang.String> sampleNames)</pre>
</li>
</ul>
<a name="getSampleNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSampleNames</h4>
<pre>public java.util.ArrayList<java.lang.String> getSampleNames()</pre>
</li>
</ul>
<a name="setGeneExpression-java.util.HashMap-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGeneExpression</h4>
<pre>public void setGeneExpression(java.util.HashMap<java.lang.String,double[]> geneExpression)</pre>
</li>
</ul>
<a name="getGeneExpression--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getGeneExpression</h4>
<pre>public java.util.HashMap<java.lang.String,double[]> getGeneExpression()
throws java.lang.IllegalAccessException</pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalAccessException</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="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_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </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.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
/* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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"
}
|
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
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
mHalfHeifht = (mHalfSH * 0.87).toFloat()
//line
path = Path()
startLineX = thickness
startLineY = mHalfSH * 2 - thickness
endLineX = mHalfSH * 2 - thickness
endLineY = mHalfSH * 2 - thickness
path.moveTo(startLineX, startLineY)
path.lineTo(mHalfSH, thickness)
path.lineTo(endLineX, endLineY)
// startAnimTriangle
startAnimByStep(3, object : OnAnimationUpdatePLView {
override fun onUpdate(step: Int, fraction: Float) {
path.reset()
when (step) {
1 -> {
pointX = mHalfSH + fraction * (mHalfSH / 2 - thickness)
pointY = 2 * mHalfSH - thickness - fraction * (mHalfSH - thickness)
startLineX = thickness + fraction * (2 * mHalfSH - 2 * thickness)
startLineY = mHalfSH * 2 - thickness
endLineX = mHalfSH * 2 - thickness - fraction * (mHalfSH - thickness)
endLineY = mHalfSH * 2 - thickness - fraction * (2 * mHalfSH - 2 * thickness)
path.moveTo(startLineX, startLineY)
path.lineTo(thickness, mHalfSH * 2 - thickness)
path.lineTo(mHalfSH, thickness)
path.lineTo(endLineX, endLineY)
}
2 -> {
pointX = mHalfSH * 3 / 2 - thickness - fraction * (mHalfSH - 2 * thickness)
pointY = mHalfSH
startLineX = 2 * mHalfSH - thickness - fraction * (mHalfSH - thickness)
startLineY = mHalfSH * 2 - thickness - fraction * (2 * mHalfSH - 2 * thickness)
endLineX = mHalfSH - fraction * (mHalfSH - thickness)
endLineY = thickness + fraction * (2 * mHalfSH - 2 * thickness)
path.moveTo(startLineX, startLineY)
path.lineTo(mHalfSH * 2 - thickness, mHalfSH * 2 - thickness)
path.lineTo(thickness, mHalfSH * 2 - thickness)
path.lineTo(endLineX, endLineY)
}
3 -> {
pointX = mHalfSH / 2 + thickness + fraction * (mHalfSH / 2 - thickness)
pointY = mHalfSH + fraction * (mHalfSH - thickness)
startLineX = mHalfSH - fraction * (mHalfSH - thickness)
startLineY = thickness + fraction * (2 * mHalfSH - 2 * thickness)
endLineX = thickness + fraction * (mHalfSH * 2 - 2 * thickness)
endLineY = mHalfSH * 2 - thickness
path.moveTo(startLineX, startLineY)
path.lineTo(mHalfSH, thickness)
path.lineTo(mHalfSH * 2 - thickness, mHalfSH * 2 - thickness)
path.lineTo(endLineX, endLineY)
}
}
}
})
}
private fun initRound() {
//paint
paintLine.style = Paint.Style.STROKE
paintLine.color = Color.parseColor("#2D283C")
paintLine.strokeWidth = mGridLinestrokeWidth
paintLine.isAntiAlias = true
paintLine.strokeCap = Paint.Cap.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 = mHalfSH * 2 - thickness
startAngle = 225f
// startAnimRound()
startAnimByStep(4, object : OnAnimationUpdatePLView {
override fun onUpdate(step: Int, fraction: Float) {
when (step) {
1 -> {
pointX = mHalfSH + fraction * (mHalfSH - thickness)
pointY = mSideLength - thickness - fraction * (mHalfSH - thickness)
startAngle = 135f - fraction * 90
}
2 -> {
pointX = mSideLength - fraction * (mHalfSH - thickness) - thickness
pointY = mHalfSH - fraction * (mHalfSH - thickness)
startAngle = if (startAngle > 0) {
45 - fraction * 90
} else {
405 - fraction * 90
}
}
3 -> {
pointX = mHalfSH - fraction * (mHalfSH - thickness)
pointY = thickness + fraction * (mHalfSH - thickness)
startAngle = 315f - fraction * 90
}
4 -> {
pointX = thickness + fraction * (mHalfSH - thickness)
pointY = mHalfSH + fraction * (mHalfSH - thickness)
startAngle = 225f - fraction * 90
}
}
}
})
}
private fun startAnimByStep(step: Int, listener: OnAnimationUpdatePLView) {
val interpolator = AccelerateInterpolator(1f)
val pointAnimList = mutableListOf<Animator>()
for (index in 1..step) {
val pointAnimatorTemp = ValueAnimator.ofFloat(0f, 100f)
pointAnimatorTemp.duration = this.TIME_CIRCLE / 4
pointAnimatorTemp.interpolator = interpolator
pointAnimatorTemp.startDelay = 30
pointAnimatorTemp.addUpdateListener { animation ->
val temp = animation.animatedFraction
listener.onUpdate(index, temp)
invalidate()
}
pointAnimList.add(pointAnimatorTemp)
}
animatorSet!!.playSequentially(pointAnimList)
animatorSet!!.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
animatorSet!!.start()
}
})
animatorSet!!.start()
}
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
mSideLength = (if (measuredWidth > measuredHeight) measuredHeight else measuredWidth).toFloat()
//宽必须等于高
MLog.d("宽: $mSideLength 高: $mSideLength")
}
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
when (SHOW_MODEL) {
SHOW_MODEL_ROUND -> drawRound(canvas)
SHOW_MODEL_TRIANGLE -> drawTriangle(canvas)
SHOW_MODEL_SQUARE -> drawSquare(canvas)
else -> {
}
}
}
private fun drawSquare(canvas: Canvas) {
canvas.drawPath(path, paintLine)
canvas.drawPoint(pointX, pointY, paintPoint)
}
private fun drawTriangle(canvas: Canvas) {
canvas.drawPath(path, paintLine)
canvas.drawPoint(pointX, pointY, paintPoint)
}
private fun drawRound(canvas: Canvas) {
if (roundRF == null) {
return
}
canvas.drawArc(roundRF!!, startAngle, swipeAngle, false, paintLine)
canvas.drawPoint(pointX, pointY, paintPoint)
}
interface OnAnimationUpdatePLView {
fun onUpdate(step: Int, fraction: Float)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
startAnimation()
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
stopAnimation()
}
override fun setVisibility(visibility: Int) {
val currentVisibility = getVisibility()
super.setVisibility(visibility)
if (visibility != currentVisibility) {
if (visibility == VISIBLE) {
startAnimation()
} else if (visibility == GONE || visibility == INVISIBLE) {
stopAnimation()
}
}
}
override fun onVisibilityChanged(changedView: View, visibility: Int) {
super.onVisibilityChanged(changedView, visibility)
if (visibility == VISIBLE) {
startAnimation()
} else {
stopAnimation()
}
}
override fun onFocusChanged(gainFocus: Boolean, direction: Int, previouslyFocusedRect: Rect?) {
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect)
if (gainFocus) {
startAnimation()
} else {
stopAnimation()
}
}
//应该绑定activity生命周期
@TargetApi(Build.VERSION_CODES.KITKAT)
fun stopAnimation() {
MLog.d("stopAnimation")
if (animatorSet != null) {
animatorSet?.cancel()
}
}
@TargetApi(Build.VERSION_CODES.KITKAT)
fun startAnimation() {
MLog.d("startAnimation")
if (animatorSet != null && !animatorSet!!.isStarted && !animatorSet!!.isRunning) {
animatorSet!!.start()
}
}
}
|
{
"pile_set_name": "Github"
}
|
/*
* 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(Krb5.KDC_OPTS_MAX + 1);
setDefault();
}
public KDCOptions(int size, byte[] data) throws Asn1Exception {
super(size, data);
if ((size > data.length * BITS_PER_UNIT) || (size > Krb5.KDC_OPTS_MAX + 1))
throw new Asn1Exception(Krb5.BITSTRING_BAD_LENGTH);
}
/**
* Constructs a KDCOptions from the specified bit settings.
*
* @param data the bits to be set for the KDCOptions.
* @exception Asn1Exception if an error occurs while decoding an ASN1
* encoded data.
*
*/
public KDCOptions(boolean[] data) throws Asn1Exception {
super(data);
if (data.length > Krb5.KDC_OPTS_MAX + 1) {
throw new Asn1Exception(Krb5.BITSTRING_BAD_LENGTH);
}
}
public KDCOptions(DerValue encoding) throws Asn1Exception, IOException {
this(encoding.getUnalignedBitString(true).toBooleanArray());
}
/**
* Constructs a KDCOptions from the passed bit settings.
*
* @param options the bits to be set for the KDCOptions.
*
*/
public KDCOptions(byte[] options) {
super(options.length * BITS_PER_UNIT, options);
}
/**
* Parse (unmarshal) a KDCOptions from a DER input stream. This form
* parsing might be used when expanding a value which is part of
* a constructed sequence and uses explicitly tagged type.
*
* @param data the Der input stream value, which contains one or more
* marshaled value.
* @param explicitTag tag number.
* @param optional indicate if this data field is optional
* @return an instance of KDCOptions.
* @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data.
* @exception IOException if an I/O error occurs while reading encoded data.
*
*/
public static KDCOptions parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException {
if ((optional) && (((byte)data.peekByte() & (byte)0x1F) != explicitTag))
return null;
DerValue der = data.getDerValue();
if (explicitTag != (der.getTag() & (byte)0x1F)) {
throw new Asn1Exception(Krb5.ASN1_BAD_ID);
} else {
DerValue subDer = der.getData().getDerValue();
return new KDCOptions(subDer);
}
}
/**
* Sets the value(true/false) for one of the <code>KDCOptions</code>.
*
* @param option an option bit.
* @param value true if the option is selected, false if the option is not selected.
* @exception ArrayIndexOutOfBoundsException if array index out of bound occurs.
* @see sun.security.krb5.internal.Krb5
*/
public void set(int option, boolean value) throws ArrayIndexOutOfBoundsException {
super.set(option, value);
}
/**
* Gets the value(true/false) for one of the <code>KDCOptions</code>.
*
* @param option an option bit.
* @return value true if the option is selected, false if the option is not selected.
* @exception ArrayIndexOutOfBoundsException if array index out of bound occurs.
* @see sun.security.krb5.internal.Krb5
*/
public boolean get(int option) throws ArrayIndexOutOfBoundsException {
return super.get(option);
}
@Override public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("KDCOptions: ");
for (int i=0; i<Krb5.KDC_OPTS_MAX+1; i++) {
if (get(i)) {
if (names[i] != null) {
sb.append(names[i]).append(",");
} else {
sb.append(i).append(",");
}
}
}
return sb.toString();
}
private void setDefault() {
try {
Config config = Config.getInstance();
// If key not present, returns Integer.MIN_VALUE, which is
// almost all zero.
int options = config.getIntValue("libdefaults",
"kdc_default_options");
if ((options & KDC_OPT_RENEWABLE_OK) == KDC_OPT_RENEWABLE_OK) {
set(RENEWABLE_OK, true);
} else {
if (config.getBooleanValue("libdefaults", "renewable")) {
set(RENEWABLE_OK, true);
}
}
if ((options & KDC_OPT_PROXIABLE) == KDC_OPT_PROXIABLE) {
set(PROXIABLE, true);
} else {
if (config.getBooleanValue("libdefaults", "proxiable")) {
set(PROXIABLE, true);
}
}
if ((options & KDC_OPT_FORWARDABLE) == KDC_OPT_FORWARDABLE) {
set(FORWARDABLE, true);
} else {
if (config.getBooleanValue("libdefaults", "forwardable")) {
set(FORWARDABLE, true);
}
}
} catch (KrbException e) {
if (DEBUG) {
System.out.println("Exception in getting default values for " +
"KDC Options from the configuration ");
e.printStackTrace();
}
}
}
}
|
{
"pile_set_name": "Github"
}
|
;;; 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"
}
|
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"
}
|
{
"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",
"orgVecs":[0,0,1,0,0,1,0,0,1,0,0,0,0.0750000029802322,0.144999995827675,0.0800000056624413,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":54,
"name":"E_BONE_C_SPINE0",
"orgVecs":[0,0,1,0,0,1,0,0,1,0,0,0,0.0750000029802322,0.184999942779541,0.0849999934434891,0,0.0750000029802322,0.0300000011920929,0.0300000011920929,0,0.270000010728836,1.05999934673309,-0.0996942594647408,0,0,0,0,0,24,0,0,0,0,0,0,0,2,2,2,0.5]
},{
"children":[{
"children":[{
"children":[{
"id":23,
"name":"E_BONE_L_TALUS",
"orgVecs":[0,1,0,0,1,0,0,0,0,0,1,0,0.100000001490116,0.0750000923871994,0.134999915957451,0,0.100000001490116,0.0700000002980232,0.0500000081956387,0,0.239988371729851,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":22,
"name":"E_BONE_L_LOWERLEG",
"orgVecs":[0,0,-1,0,0,1,0,0,1,0,0,0,0.224999994039536,0.074999988079071,0.0650000050663948,0,0.224999994039536,0.124999992549419,0.129999950528145,0,0,0,-1.94882249832153,0,0,0,0,0,24,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":21,
"name":"E_BONE_L_UPPERLEG",
"orgVecs":[0,0,-1,0,0,1,0,0,1,0,0,0,0.224999994039536,0.0900000259280205,0.115000039339066,0,0.224999994039536,0.0649999678134918,0.150000035762787,0,0.440001487731934,-0.379999995231628,1.179403424263,0,0,0,0,0,26,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":20,
"name":"E_BONE_L_HIP",
"orgVecs":[1,0,0,0,0,1,0,0,0,0,1,0,0.0500000007450581,0.189999535679817,0.134999662637711,0,0.0500000007450581,0.14000004529953,0.150000035762787,0,-0.370000004768372,0.0699999928474426,-0.0399999991059303,0,0,0,0,0,26,0,0,0,0,0,0,0,2,2,2,0.5]
},{
"children":[{
"children":[{
"children":[{
"id":49,
"name":"E_BONE_R_TALUS",
"orgVecs":[0,1,0,0,-1,0,0,0,0,0,1,0,0.100000001490116,0.0750000923871994,0.134999915957451,0,0.100000001490116,0.0700000002980232,0.0500000081956387,0,-0.239988371729851,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":48,
"name":"E_BONE_R_LOWERLEG",
"orgVecs":[0,0,-1,0,0,1,0,0,-1,0,0,0,0.224999994039536,0.074999988079071,0.0650000050663948,0,0.224999994039536,0.124999992549419,0.129999950528145,0,-0.300000131130219,0,0.478823840618134,0,0,0,0,0,24,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":47,
"name":"E_BONE_R_UPPERLEG",
"orgVecs":[0,0,-1,0,0,1,0,0,-1,0,0,0,0.224999994039536,0.0900000259280205,0.115000039339066,0,0.224999994039536,0.0649999678134918,0.150000035762787,0,0.249998480081558,0,0.0505958646535873,0,0,0,0,0,26,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":46,
"name":"E_BONE_R_HIP",
"orgVecs":[-1,0,0,0,0,1,0,0,0,0,1,0,0.0500000007450581,0.189999535679817,0.134999662637711,0,0.0500000007450581,0.14000004529953,0.150000035762787,0,0,0,0,0,0,0,0,0,26,0,0,0,0,0,0,0,2,2,2,0.5]
}],
"id":53,
"name":"E_BONE_C_BASE",
"orgVecs":[0,1,0,0,1,0,0,0,0,0,1,0,0.00499999988824129,0.025000000372529,0.025000000372529,0,0.00499999988824129,0.025000000372529,0.025000000372529,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,2,2,2,0.5]
}
|
{
"pile_set_name": "Github"
}
|
/*=========================================================================
*
* 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"
}
|
{
"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"
}
|
/*
* 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"
}
|
/*
* 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"
}
|
/*
* 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,
struct drm_file *file_priv)
{
struct drm_mode_get_encoder *enc_resp = data;
struct drm_encoder *encoder;
struct drm_crtc *crtc;
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;
encoder = drm_encoder_find(dev, file_priv, enc_resp->encoder_id);
if (!encoder)
return -ENOENT;
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
crtc = drm_encoder_get_crtc(encoder);
if (crtc && drm_lease_held(file_priv, crtc->base.id))
enc_resp->crtc_id = crtc->base.id;
else
enc_resp->crtc_id = 0;
drm_modeset_unlock(&dev->mode_config.connection_mutex);
enc_resp->encoder_type = encoder->encoder_type;
enc_resp->encoder_id = encoder->base.id;
enc_resp->possible_crtcs = drm_lease_filter_crtcs(file_priv,
encoder->possible_crtcs);
enc_resp->possible_clones = encoder->possible_clones;
return 0;
}
|
{
"pile_set_name": "Github"
}
|
<?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"
}
|
/**
* @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"
}
|
'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"
}
|
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"
}
|
//
// 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"
}
|
[
{
"id": "uncraft_book",
"type": "requirement",
"//": "Result of disassembling books, magazines and similar items",
"components": [ [ [ "paper", 1 ] ] ]
}
]
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="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|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Comm.cpp" />
<ClCompile Include="CommDlg.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Comm.rc" />
</ItemGroup>
<ItemGroup>
<None Include="res\Comm.rc2" />
</ItemGroup>
<ItemGroup>
<Image Include="res\Comm.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties RESOURCE_FILE="Comm.rc" />
</VisualStudio>
</ProjectExtensions>
</Project>
|
{
"pile_set_name": "Github"
}
|
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.217912E+01 4.580367E+01
1.217959E+01 4.580334E+01
1.217999E+01 4.580279E+01
1.218028E+01 4.580213E+01
1.218058E+01 4.580198E+01
1.218059E+01 4.580192E+01
1.218005E+01 4.580135E+01
1.218051E+01 4.580105E+01
1.218159E+01 4.580028E+01
1.218202E+01 4.580055E+01
1.218211E+01 4.580045E+01
1.218140E+01 4.579931E+01
1.218138E+01 4.579925E+01
1.218131E+01 4.579913E+01
1.218128E+01 4.579907E+01
1.218120E+01 4.579898E+01
1.218093E+01 4.579863E+01
1.218073E+01 4.579839E+01
1.218064E+01 4.579828E+01
1.218059E+01 4.579822E+01
1.218057E+01 4.579818E+01
1.218056E+01 4.579816E+01
1.218055E+01 4.579813E+01
1.218056E+01 4.579810E+01
1.218059E+01 4.579806E+01
1.218131E+01 4.579768E+01
1.218154E+01 4.579758E+01
1.218202E+01 4.579740E+01
1.218218E+01 4.579733E+01
1.218240E+01 4.579704E+01
1.218282E+01 4.579661E+01
1.218313E+01 4.579618E+01
1.218313E+01 4.579617E+01
1.218311E+01 4.579608E+01
1.218300E+01 4.579589E+01
1.218295E+01 4.579578E+01
1.218288E+01 4.579568E+01
1.218286E+01 4.579557E+01
1.218286E+01 4.579553E+01
1.218291E+01 4.579550E+01
1.218346E+01 4.579538E+01
1.218379E+01 4.579533E+01
1.218397E+01 4.579528E+01
1.218411E+01 4.579523E+01
1.218442E+01 4.579507E+01
1.218470E+01 4.579488E+01
1.218469E+01 4.579485E+01
1.218466E+01 4.579479E+01
1.218451E+01 4.579463E+01
1.218441E+01 4.579452E+01
1.218419E+01 4.579435E+01
1.218381E+01 4.579404E+01
1.218348E+01 4.579376E+01
1.218341E+01 4.579369E+01
1.218335E+01 4.579362E+01
1.218330E+01 4.579355E+01
1.218329E+01 4.579349E+01
1.218331E+01 4.579345E+01
1.218335E+01 4.579342E+01
1.218347E+01 4.579335E+01
1.218379E+01 4.579321E+01
1.218401E+01 4.579313E+01
1.218429E+01 4.579301E+01
1.218448E+01 4.579293E+01
1.218469E+01 4.579280E+01
1.218492E+01 4.579261E+01
1.218510E+01 4.579245E+01
1.218521E+01 4.579234E+01
1.218529E+01 4.579223E+01
1.218534E+01 4.579208E+01
1.218535E+01 4.579186E+01
1.218539E+01 4.579177E+01
1.218549E+01 4.579167E+01
1.218563E+01 4.579155E+01
1.218590E+01 4.579136E+01
1.218608E+01 4.579123E+01
1.218616E+01 4.579117E+01
1.218620E+01 4.579111E+01
1.218623E+01 4.579106E+01
1.218624E+01 4.579102E+01
1.218633E+01 4.579109E+01
1.218633E+01 4.579109E+01
1.218641E+01 4.579117E+01
1.218667E+01 4.579109E+01
1.218715E+01 4.579093E+01
1.218747E+01 4.579081E+01
1.218819E+01 4.579055E+01
1.218828E+01 4.579054E+01
1.218839E+01 4.579055E+01
1.218863E+01 4.579069E+01
1.218879E+01 4.579081E+01
1.218892E+01 4.579094E+01
1.218905E+01 4.579109E+01
1.218914E+01 4.579117E+01
1.218932E+01 4.579130E+01
1.218963E+01 4.579151E+01
1.218979E+01 4.579162E+01
1.219036E+01 4.579200E+01
1.219055E+01 4.579214E+01
1.219085E+01 4.579222E+01
1.219147E+01 4.579239E+01
1.219209E+01 4.579257E+01
1.219263E+01 4.579271E+01
1.219265E+01 4.579271E+01
1.219269E+01 4.579272E+01
1.219293E+01 4.579256E+01
1.219311E+01 4.579231E+01
1.219325E+01 4.579212E+01
1.219343E+01 4.579189E+01
1.219374E+01 4.579160E+01
1.219412E+01 4.579137E+01
1.219484E+01 4.579093E+01
1.219519E+01 4.579069E+01
1.219538E+01 4.579055E+01
1.219557E+01 4.579043E+01
1.219594E+01 4.579024E+01
1.219612E+01 4.579011E+01
1.219631E+01 4.579001E+01
1.219656E+01 4.578993E+01
1.219690E+01 4.578986E+01
1.219738E+01 4.578971E+01
1.219741E+01 4.578970E+01
1.219702E+01 4.578926E+01
1.219700E+01 4.578921E+01
1.219699E+01 4.578917E+01
1.219817E+01 4.578936E+01
1.219869E+01 4.578946E+01
1.219929E+01 4.578958E+01
1.219992E+01 4.578964E+01
1.220109E+01 4.578964E+01
1.220254E+01 4.578961E+01
1.220260E+01 4.578949E+01
1.220263E+01 4.578943E+01
1.220295E+01 4.578918E+01
1.220317E+01 4.578906E+01
1.220317E+01 4.578850E+01
1.220316E+01 4.578833E+01
1.220317E+01 4.578761E+01
1.220312E+01 4.578730E+01
1.220305E+01 4.578711E+01
1.220323E+01 4.578699E+01
1.220348E+01 4.578685E+01
1.220361E+01 4.578677E+01
1.220400E+01 4.578664E+01
1.220416E+01 4.578656E+01
1.220431E+01 4.578645E+01
1.220447E+01 4.578634E+01
1.220459E+01 4.578627E+01
1.220468E+01 4.578617E+01
1.220507E+01 4.578579E+01
1.220539E+01 4.578546E+01
1.220545E+01 4.578536E+01
1.220544E+01 4.578507E+01
1.220539E+01 4.578458E+01
1.220537E+01 4.578421E+01
1.220541E+01 4.578408E+01
1.220547E+01 4.578397E+01
1.220577E+01 4.578349E+01
1.220586E+01 4.578332E+01
1.220601E+01 4.578293E+01
1.220596E+01 4.578267E+01
1.220593E+01 4.578220E+01
1.220590E+01 4.578184E+01
1.220588E+01 4.578164E+01
1.220564E+01 4.578166E+01
1.220544E+01 4.578171E+01
1.220510E+01 4.578180E+01
1.220480E+01 4.578184E+01
1.220440E+01 4.578186E+01
1.220405E+01 4.578192E+01
1.220347E+01 4.578209E+01
1.220331E+01 4.578176E+01
1.220300E+01 4.578136E+01
1.220266E+01 4.578092E+01
1.220221E+01 4.578033E+01
1.220259E+01 4.577989E+01
1.220277E+01 4.577974E+01
1.220303E+01 4.577953E+01
1.220325E+01 4.577928E+01
1.220343E+01 4.577881E+01
1.220351E+01 4.577864E+01
1.220379E+01 4.577830E+01
1.220398E+01 4.577806E+01
1.220415E+01 4.577768E+01
1.220428E+01 4.577731E+01
1.220446E+01 4.577669E+01
1.220454E+01 4.577637E+01
1.220478E+01 4.577584E+01
1.220489E+01 4.577564E+01
1.220514E+01 4.577516E+01
1.220536E+01 4.577482E+01
1.220662E+01 4.577533E+01
1.220697E+01 4.577482E+01
1.220720E+01 4.577449E+01
1.220736E+01 4.577427E+01
1.220748E+01 4.577410E+01
1.220751E+01 4.577407E+01
1.220754E+01 4.577403E+01
1.220740E+01 4.577393E+01
1.220773E+01 4.577342E+01
1.220782E+01 4.577328E+01
1.220789E+01 4.577323E+01
1.220827E+01 4.577301E+01
1.220844E+01 4.577290E+01
1.220841E+01 4.577287E+01
1.220811E+01 4.577258E+01
1.220838E+01 4.577241E+01
1.220899E+01 4.577202E+01
1.220881E+01 4.577185E+01
1.220957E+01 4.577147E+01
1.220988E+01 4.577130E+01
1.221013E+01 4.577124E+01
1.220968E+01 4.577073E+01
1.220899E+01 4.576998E+01
1.220783E+01 4.577059E+01
1.220760E+01 4.577026E+01
1.220736E+01 4.576990E+01
1.220722E+01 4.576965E+01
1.220713E+01 4.576972E+01
1.220700E+01 4.576980E+01
1.220688E+01 4.576989E+01
1.220674E+01 4.577002E+01
1.220647E+01 4.577020E+01
1.220634E+01 4.577032E+01
1.220626E+01 4.577042E+01
1.220613E+01 4.577064E+01
1.220598E+01 4.577089E+01
1.220556E+01 4.577131E+01
1.220530E+01 4.577155E+01
1.220522E+01 4.577158E+01
1.220517E+01 4.577158E+01
1.220512E+01 4.577158E+01
1.220499E+01 4.577147E+01
1.220478E+01 4.577122E+01
1.220385E+01 4.577024E+01
1.220330E+01 4.576965E+01
1.220286E+01 4.576913E+01
1.220226E+01 4.576903E+01
1.220195E+01 4.576898E+01
1.220163E+01 4.576896E+01
1.220139E+01 4.576895E+01
1.220078E+01 4.576889E+01
1.220068E+01 4.576915E+01
1.220025E+01 4.576915E+01
1.219925E+01 4.576914E+01
1.219856E+01 4.576912E+01
1.219821E+01 4.576908E+01
1.219792E+01 4.576893E+01
1.219779E+01 4.576910E+01
1.219749E+01 4.576952E+01
1.219729E+01 4.576991E+01
1.219721E+01 4.577007E+01
1.219717E+01 4.577006E+01
1.219671E+01 4.576991E+01
1.219612E+01 4.576980E+01
1.219573E+01 4.576971E+01
1.219494E+01 4.576954E+01
1.219497E+01 4.576946E+01
1.219515E+01 4.576908E+01
1.219529E+01 4.576890E+01
1.219558E+01 4.576868E+01
1.219566E+01 4.576859E+01
1.219559E+01 4.576853E+01
1.219546E+01 4.576851E+01
1.219526E+01 4.576850E+01
1.219442E+01 4.576846E+01
1.219383E+01 4.576843E+01
1.219372E+01 4.576882E+01
1.219361E+01 4.576881E+01
1.219342E+01 4.576881E+01
1.219259E+01 4.576876E+01
1.219223E+01 4.576876E+01
1.219198E+01 4.576872E+01
1.219126E+01 4.576858E+01
1.219095E+01 4.576851E+01
1.219071E+01 4.576857E+01
1.219063E+01 4.576867E+01
1.219024E+01 4.576869E+01
1.218970E+01 4.576865E+01
1.218972E+01 4.576857E+01
1.218976E+01 4.576834E+01
1.218973E+01 4.576795E+01
1.218950E+01 4.576791E+01
1.218914E+01 4.576787E+01
1.218875E+01 4.576785E+01
1.218875E+01 4.576704E+01
1.218875E+01 4.576640E+01
1.218862E+01 4.576607E+01
1.218854E+01 4.576604E+01
1.218735E+01 4.576590E+01
1.218728E+01 4.576578E+01
1.218720E+01 4.576539E+01
1.218705E+01 4.576473E+01
1.218703E+01 4.576461E+01
1.218690E+01 4.576403E+01
1.218685E+01 4.576382E+01
1.218674E+01 4.576342E+01
1.218670E+01 4.576325E+01
1.218661E+01 4.576301E+01
1.218651E+01 4.576271E+01
1.218644E+01 4.576249E+01
1.218631E+01 4.576212E+01
1.218603E+01 4.576137E+01
1.218590E+01 4.576079E+01
1.218566E+01 4.576014E+01
1.218541E+01 4.575945E+01
1.218535E+01 4.575944E+01
1.218505E+01 4.575934E+01
1.218452E+01 4.575911E+01
1.218433E+01 4.575909E+01
1.218405E+01 4.575914E+01
1.218347E+01 4.575930E+01
1.218280E+01 4.575949E+01
1.218252E+01 4.575957E+01
1.218243E+01 4.575952E+01
1.218169E+01 4.576011E+01
1.218114E+01 4.576054E+01
1.218081E+01 4.576060E+01
1.218042E+01 4.576069E+01
1.218026E+01 4.576074E+01
1.218001E+01 4.576090E+01
1.217979E+01 4.576106E+01
1.217957E+01 4.576118E+01
1.217896E+01 4.576169E+01
1.217867E+01 4.576198E+01
1.217824E+01 4.576238E+01
1.217810E+01 4.576252E+01
1.217797E+01 4.576267E+01
1.217732E+01 4.576240E+01
1.217715E+01 4.576253E+01
1.217697E+01 4.576258E+01
1.217686E+01 4.576332E+01
1.217670E+01 4.576341E+01
1.217551E+01 4.576403E+01
1.217568E+01 4.576423E+01
1.217522E+01 4.576453E+01
1.217536E+01 4.576471E+01
1.217491E+01 4.576500E+01
1.217535E+01 4.576548E+01
1.217417E+01 4.576594E+01
1.217307E+01 4.576637E+01
1.217354E+01 4.576695E+01
1.217385E+01 4.576734E+01
1.217226E+01 4.576794E+01
1.217284E+01 4.576852E+01
1.217252E+01 4.576870E+01
1.217202E+01 4.576896E+01
1.217121E+01 4.576939E+01
1.217138E+01 4.576960E+01
1.217165E+01 4.576992E+01
1.217181E+01 4.577008E+01
1.217196E+01 4.577017E+01
1.217142E+01 4.577054E+01
1.217066E+01 4.577102E+01
1.216952E+01 4.577160E+01
1.216938E+01 4.577148E+01
1.216928E+01 4.577139E+01
1.216884E+01 4.577160E+01
1.216830E+01 4.577182E+01
1.216742E+01 4.577221E+01
1.216744E+01 4.577224E+01
1.216753E+01 4.577237E+01
1.216821E+01 4.577302E+01
1.216854E+01 4.577328E+01
1.216781E+01 4.577368E+01
1.216709E+01 4.577406E+01
1.216710E+01 4.577407E+01
1.216728E+01 4.577424E+01
1.216687E+01 4.577447E+01
1.216644E+01 4.577470E+01
1.216586E+01 4.577502E+01
1.216570E+01 4.577513E+01
1.216556E+01 4.577522E+01
1.216538E+01 4.577547E+01
1.216475E+01 4.577584E+01
1.216430E+01 4.577610E+01
1.216485E+01 4.577657E+01
1.216565E+01 4.577723E+01
1.216565E+01 4.577731E+01
1.216475E+01 4.577783E+01
1.216550E+01 4.577838E+01
1.216570E+01 4.577854E+01
1.216583E+01 4.577864E+01
1.216600E+01 4.577877E+01
1.216669E+01 4.577930E+01
1.216634E+01 4.577953E+01
1.216570E+01 4.577994E+01
1.216550E+01 4.578006E+01
1.216481E+01 4.578056E+01
1.216479E+01 4.578063E+01
1.216508E+01 4.578089E+01
1.216509E+01 4.578096E+01
1.216499E+01 4.578104E+01
1.216461E+01 4.578131E+01
1.216424E+01 4.578155E+01
1.216392E+01 4.578178E+01
1.216336E+01 4.578221E+01
1.216330E+01 4.578234E+01
1.216329E+01 4.578235E+01
1.216322E+01 4.578240E+01
1.216305E+01 4.578239E+01
1.216287E+01 4.578246E+01
1.216237E+01 4.578272E+01
1.216180E+01 4.578308E+01
1.216128E+01 4.578344E+01
1.216115E+01 4.578348E+01
1.216110E+01 4.578357E+01
1.216070E+01 4.578400E+01
1.216069E+01 4.578413E+01
1.216078E+01 4.578424E+01
1.216096E+01 4.578442E+01
1.216118E+01 4.578458E+01
1.216027E+01 4.578491E+01
1.215974E+01 4.578513E+01
1.215932E+01 4.578533E+01
1.215911E+01 4.578549E+01
1.215894E+01 4.578564E+01
1.215881E+01 4.578570E+01
1.215863E+01 4.578575E+01
1.215830E+01 4.578583E+01
1.215809E+01 4.578587E+01
1.215759E+01 4.578605E+01
1.215718E+01 4.578624E+01
1.215708E+01 4.578632E+01
1.215695E+01 4.578647E+01
1.215668E+01 4.578686E+01
1.215657E+01 4.578704E+01
1.215654E+01 4.578721E+01
1.215657E+01 4.578733E+01
1.215664E+01 4.578743E+01
1.215679E+01 4.578755E+01
1.215717E+01 4.578785E+01
1.215738E+01 4.578804E+01
1.215740E+01 4.578812E+01
1.215744E+01 4.578816E+01
1.215777E+01 4.578831E+01
1.215820E+01 4.578846E+01
1.215855E+01 4.578846E+01
1.215919E+01 4.578842E+01
1.215973E+01 4.578840E+01
1.216023E+01 4.578836E+01
1.216071E+01 4.578825E+01
1.216111E+01 4.578816E+01
1.216127E+01 4.578840E+01
1.216074E+01 4.578856E+01
1.216012E+01 4.578874E+01
1.215991E+01 4.578880E+01
1.215967E+01 4.578886E+01
1.215873E+01 4.578924E+01
1.215786E+01 4.578967E+01
1.215756E+01 4.578946E+01
1.215700E+01 4.579010E+01
1.215689E+01 4.579026E+01
1.215662E+01 4.579078E+01
1.215704E+01 4.579091E+01
1.215646E+01 4.579174E+01
1.215614E+01 4.579221E+01
1.215599E+01 4.579214E+01
1.215591E+01 4.579210E+01
1.215585E+01 4.579203E+01
1.215564E+01 4.579209E+01
1.215525E+01 4.579226E+01
1.215499E+01 4.579239E+01
1.215489E+01 4.579249E+01
1.215477E+01 4.579253E+01
1.215475E+01 4.579253E+01
1.215470E+01 4.579254E+01
1.215463E+01 4.579251E+01
1.215449E+01 4.579243E+01
1.215426E+01 4.579228E+01
1.215420E+01 4.579235E+01
1.215391E+01 4.579288E+01
1.215367E+01 4.579336E+01
1.215333E+01 4.579396E+01
1.215307E+01 4.579436E+01
1.215363E+01 4.579466E+01
1.215387E+01 4.579478E+01
1.215384E+01 4.579493E+01
1.215426E+01 4.579501E+01
1.215455E+01 4.579508E+01
1.215477E+01 4.579520E+01
1.215487E+01 4.579530E+01
1.215493E+01 4.579548E+01
1.215499E+01 4.579571E+01
1.215506E+01 4.579589E+01
1.215519E+01 4.579598E+01
1.215544E+01 4.579611E+01
1.215539E+01 4.579613E+01
1.215369E+01 4.579670E+01
1.215346E+01 4.579659E+01
1.215252E+01 4.579615E+01
1.215218E+01 4.579591E+01
1.215162E+01 4.579547E+01
1.215058E+01 4.579445E+01
1.215022E+01 4.579410E+01
1.215000E+01 4.579398E+01
1.214955E+01 4.579385E+01
1.214949E+01 4.579410E+01
1.214949E+01 4.579437E+01
1.214949E+01 4.579443E+01
1.214951E+01 4.579513E+01
1.214951E+01 4.579549E+01
1.214952E+01 4.579591E+01
1.214949E+01 4.579636E+01
1.214950E+01 4.579691E+01
1.214950E+01 4.579713E+01
1.214950E+01 4.579770E+01
1.214949E+01 4.579907E+01
1.214954E+01 4.580089E+01
1.214950E+01 4.580293E+01
1.214952E+01 4.580358E+01
1.214883E+01 4.580359E+01
1.214768E+01 4.580359E+01
1.214516E+01 4.580362E+01
1.214386E+01 4.580362E+01
1.214283E+01 4.580363E+01
1.214282E+01 4.580442E+01
1.214282E+01 4.580518E+01
1.214077E+01 4.580523E+01
1.213910E+01 4.580528E+01
1.213764E+01 4.580532E+01
1.213622E+01 4.580532E+01
1.213624E+01 4.580680E+01
1.213625E+01 4.580719E+01
1.213626E+01 4.580924E+01
1.213629E+01 4.581011E+01
1.213628E+01 4.581084E+01
1.213635E+01 4.581262E+01
1.213637E+01 4.581359E+01
1.213636E+01 4.581407E+01
1.213640E+01 4.581586E+01
1.213640E+01 4.581676E+01
1.213642E+01 4.581822E+01
1.213646E+01 4.581929E+01
1.213645E+01 4.582035E+01
1.213645E+01 4.582174E+01
1.213650E+01 4.582282E+01
1.213650E+01 4.582363E+01
1.213653E+01 4.582404E+01
1.213653E+01 4.582407E+01
1.213653E+01 4.582597E+01
1.213655E+01 4.582677E+01
1.213655E+01 4.582799E+01
1.213655E+01 4.582832E+01
1.213588E+01 4.582834E+01
1.213373E+01 4.582831E+01
1.213262E+01 4.582832E+01
1.213049E+01 4.582831E+01
1.213050E+01 4.582832E+01
1.212955E+01 4.582831E+01
1.212956E+01 4.582883E+01
1.212965E+01 4.583062E+01
1.212968E+01 4.583223E+01
1.212840E+01 4.583227E+01
1.212594E+01 4.583231E+01
1.212505E+01 4.583229E+01
1.212409E+01 4.583234E+01
1.212403E+01 4.583234E+01
1.212303E+01 4.583236E+01
1.212299E+01 4.583314E+01
1.212301E+01 4.583378E+01
1.212302E+01 4.583504E+01
1.212300E+01 4.583564E+01
1.212297E+01 4.583702E+01
1.212297E+01 4.583767E+01
1.212296E+01 4.583875E+01
1.212294E+01 4.583969E+01
1.212293E+01 4.584069E+01
END
END
|
{
"pile_set_name": "Github"
}
|
// -- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-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/' + id;
}
public workPackageCopyPath(workPackageId:string|number) {
return this.workPackagePath(workPackageId) + '/copy';
}
public workPackageDetailsCopyPath(projectIdentifier:string, workPackageId:string|number) {
return this.projectWorkPackagesPath(projectIdentifier) + '/details/' + workPackageId + '/copy';
}
public workPackagesBulkDeletePath() {
return this.workPackagesPath() + '/bulk';
}
public projectLevelListPath() {
return this.projectsPath() + '/level_list.json';
}
public textFormattingHelp() {
return this.staticBase + '/help/text_formatting';
}
}
|
{
"pile_set_name": "Github"
}
|
/*
* 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 */
DECLARE("RW_SHARED", LCK_RW_TYPE_SHARED);
DECLARE("RW_EXCL", LCK_RW_TYPE_EXCLUSIVE);
DECLARE("TH_RECOVER", offsetof(struct thread, recover));
DECLARE("TH_CONTINUATION", offsetof(struct thread, continuation));
DECLARE("TH_KERNEL_STACK", offsetof(struct thread, kernel_stack));
DECLARE("TH_MUTEX_COUNT", offsetof(struct thread, mutex_count));
DECLARE("TH_WAS_PROMOTED_ON_WAKEUP", offsetof(struct thread, was_promoted_on_wakeup));
DECLARE("TH_IOTIER_OVERRIDE", offsetof(struct thread, iotier_override));
DECLARE("TH_SYSCALLS_MACH", offsetof(struct thread, syscalls_mach));
DECLARE("TH_SYSCALLS_UNIX", offsetof(struct thread, syscalls_unix));
DECLARE("TASK_VTIMERS", offsetof(struct task, vtimers));
/* These fields are being added on demand */
DECLARE("TH_TASK", offsetof(struct thread, task));
DECLARE("TH_AST", offsetof(struct thread, ast));
DECLARE("TH_MAP", offsetof(struct thread, map));
DECLARE("TH_SPF", offsetof(struct thread, machine.specFlags));
DECLARE("TH_PCB_ISS", offsetof(struct thread, machine.iss));
DECLARE("TH_PCB_IDS", offsetof(struct thread, machine.ids));
DECLARE("TH_PCB_FPS", offsetof(struct thread, machine.ifps));
#if NCOPY_WINDOWS > 0
DECLARE("TH_COPYIO_STATE", offsetof(struct thread, machine.copyio_state));
DECLARE("WINDOWS_CLEAN", WINDOWS_CLEAN);
#endif
DECLARE("TH_RWLOCK_COUNT", offsetof(struct thread, rwlock_count));
DECLARE("MAP_PMAP", offsetof(struct _vm_map, pmap));
#define IEL_SIZE (sizeof(struct i386_exception_link *))
DECLARE("IKS_SIZE", sizeof(struct thread_kernel_state));
/*
* KSS_* are offsets from the top of the kernel stack (cpu_kernel_stack)
*/
DECLARE("KSS_RBX", offsetof(struct thread_kernel_state, machine.k_rbx));
DECLARE("KSS_RSP", offsetof(struct thread_kernel_state, machine.k_rsp));
DECLARE("KSS_RBP", offsetof(struct thread_kernel_state, machine.k_rbp));
DECLARE("KSS_R12", offsetof(struct thread_kernel_state, machine.k_r12));
DECLARE("KSS_R13", offsetof(struct thread_kernel_state, machine.k_r13));
DECLARE("KSS_R14", offsetof(struct thread_kernel_state, machine.k_r14));
DECLARE("KSS_R15", offsetof(struct thread_kernel_state, machine.k_r15));
DECLARE("KSS_RIP", offsetof(struct thread_kernel_state, machine.k_rip));
DECLARE("DS_DR0", offsetof(struct x86_debug_state32, dr0));
DECLARE("DS_DR1", offsetof(struct x86_debug_state32, dr1));
DECLARE("DS_DR2", offsetof(struct x86_debug_state32, dr2));
DECLARE("DS_DR3", offsetof(struct x86_debug_state32, dr3));
DECLARE("DS_DR4", offsetof(struct x86_debug_state32, dr4));
DECLARE("DS_DR5", offsetof(struct x86_debug_state32, dr5));
DECLARE("DS_DR6", offsetof(struct x86_debug_state32, dr6));
DECLARE("DS_DR7", offsetof(struct x86_debug_state32, dr7));
DECLARE("DS64_DR0", offsetof(struct x86_debug_state64, dr0));
DECLARE("DS64_DR1", offsetof(struct x86_debug_state64, dr1));
DECLARE("DS64_DR2", offsetof(struct x86_debug_state64, dr2));
DECLARE("DS64_DR3", offsetof(struct x86_debug_state64, dr3));
DECLARE("DS64_DR4", offsetof(struct x86_debug_state64, dr4));
DECLARE("DS64_DR5", offsetof(struct x86_debug_state64, dr5));
DECLARE("DS64_DR6", offsetof(struct x86_debug_state64, dr6));
DECLARE("DS64_DR7", offsetof(struct x86_debug_state64, dr7));
DECLARE("FP_VALID", offsetof(struct x86_fx_thread_state,fp_valid));
DECLARE("SS_FLAVOR", offsetof(x86_saved_state_t, flavor));
DECLARE("SS_32", x86_SAVED_STATE32);
DECLARE("SS_64", x86_SAVED_STATE64);
#define R_(x) offsetof(x86_saved_state_t, ss_32.x)
DECLARE("R32_CS", R_(cs));
DECLARE("R32_SS", R_(ss));
DECLARE("R32_DS", R_(ds));
DECLARE("R32_ES", R_(es));
DECLARE("R32_FS", R_(fs));
DECLARE("R32_GS", R_(gs));
DECLARE("R32_UESP", R_(uesp));
DECLARE("R32_EBP", R_(ebp));
DECLARE("R32_EAX", R_(eax));
DECLARE("R32_EBX", R_(ebx));
DECLARE("R32_ECX", R_(ecx));
DECLARE("R32_EDX", R_(edx));
DECLARE("R32_ESI", R_(esi));
DECLARE("R32_EDI", R_(edi));
DECLARE("R32_TRAPNO", R_(trapno));
DECLARE("R32_ERR", R_(err));
DECLARE("R32_EFLAGS", R_(efl));
DECLARE("R32_EIP", R_(eip));
DECLARE("R32_CR2", R_(cr2));
DECLARE("ISS32_SIZE", sizeof (x86_saved_state32_t));
#define R64_(x) offsetof(x86_saved_state_t, ss_64.x)
DECLARE("R64_FS", R64_(fs));
DECLARE("R64_GS", R64_(gs));
DECLARE("R64_R8", R64_(r8));
DECLARE("R64_R9", R64_(r9));
DECLARE("R64_R10", R64_(r10));
DECLARE("R64_R11", R64_(r11));
DECLARE("R64_R12", R64_(r12));
DECLARE("R64_R13", R64_(r13));
DECLARE("R64_R14", R64_(r14));
DECLARE("R64_R15", R64_(r15));
DECLARE("R64_RBP", R64_(rbp));
DECLARE("R64_RAX", R64_(rax));
DECLARE("R64_RBX", R64_(rbx));
DECLARE("R64_RCX", R64_(rcx));
DECLARE("R64_RDX", R64_(rdx));
DECLARE("R64_RSI", R64_(rsi));
DECLARE("R64_RDI", R64_(rdi));
DECLARE("R64_CS", R64_(isf.cs));
DECLARE("R64_SS", R64_(isf.ss));
DECLARE("R64_RSP", R64_(isf.rsp));
DECLARE("R64_TRAPNO", R64_(isf.trapno));
DECLARE("R64_TRAPFN", R64_(isf.trapfn));
DECLARE("R64_ERR", R64_(isf.err));
DECLARE("R64_RFLAGS", R64_(isf.rflags));
DECLARE("R64_RIP", R64_(isf.rip));
DECLARE("R64_CR2", R64_(cr2));
DECLARE("ISS64_OFFSET", R64_(isf));
DECLARE("ISS64_SIZE", sizeof (x86_saved_state64_t));
#define ISF64_(x) offsetof(x86_64_intr_stack_frame_t, x)
DECLARE("ISF64_TRAPNO", ISF64_(trapno));
DECLARE("ISF64_TRAPFN", ISF64_(trapfn));
DECLARE("ISF64_ERR", ISF64_(err));
DECLARE("ISF64_RIP", ISF64_(rip));
DECLARE("ISF64_CS", ISF64_(cs));
DECLARE("ISF64_RFLAGS", ISF64_(rflags));
DECLARE("ISF64_RSP", ISF64_(rsp));
DECLARE("ISF64_SS", ISF64_(ss));
DECLARE("ISF64_SIZE", sizeof(x86_64_intr_stack_frame_t));
DECLARE("NBPG", I386_PGBYTES);
DECLARE("PAGE_SIZE", I386_PGBYTES);
DECLARE("PAGE_MASK", I386_PGBYTES-1);
DECLARE("PAGE_SHIFT", 12);
DECLARE("NKPT", NKPT);
DECLARE("VM_MIN_ADDRESS", VM_MIN_ADDRESS);
DECLARE("VM_MAX_ADDRESS", VM_MAX_ADDRESS);
DECLARE("KERNELBASE", VM_MIN_KERNEL_ADDRESS);
DECLARE("LINEAR_KERNELBASE", LINEAR_KERNEL_ADDRESS);
DECLARE("KERNEL_STACK_SIZE", KERNEL_STACK_SIZE);
DECLARE("ASM_COMM_PAGE32_BASE_ADDRESS", _COMM_PAGE32_BASE_ADDRESS);
DECLARE("ASM_COMM_PAGE32_START_ADDRESS", _COMM_PAGE32_START_ADDRESS);
DECLARE("ASM_COMM_PAGE_SCHED_GEN", _COMM_PAGE_SCHED_GEN);
DECLARE("KERNEL_PML4_INDEX", KERNEL_PML4_INDEX);
DECLARE("IDTSZ", IDTSZ);
DECLARE("GDTSZ", GDTSZ);
DECLARE("KERNEL_DS", KERNEL_DS);
DECLARE("USER_CS", USER_CS);
DECLARE("USER_DS", USER_DS);
DECLARE("USER_CTHREAD", USER_CTHREAD);
DECLARE("KERNEL32_CS", KERNEL32_CS);
DECLARE("KERNEL64_CS", KERNEL64_CS);
DECLARE("USER64_CS", USER64_CS);
DECLARE("KERNEL_TSS", KERNEL_TSS);
DECLARE("KERNEL_LDT", KERNEL_LDT);
DECLARE("SYSENTER_CS", SYSENTER_CS);
DECLARE("SYSENTER_TF_CS",SYSENTER_TF_CS);
DECLARE("SYSENTER_DS", SYSENTER_DS);
DECLARE("SYSCALL_CS", SYSCALL_CS);
DECLARE("CPU_THIS",
offsetof(cpu_data_t, cpu_this));
DECLARE("CPU_ACTIVE_THREAD",
offsetof(cpu_data_t, cpu_active_thread));
DECLARE("CPU_ACTIVE_STACK",
offsetof(cpu_data_t, cpu_active_stack));
DECLARE("CPU_KERNEL_STACK",
offsetof(cpu_data_t, cpu_kernel_stack));
DECLARE("CPU_INT_STACK_TOP",
offsetof(cpu_data_t, cpu_int_stack_top));
DECLARE("CPU_PREEMPTION_LEVEL",
offsetof(cpu_data_t, cpu_preemption_level));
DECLARE("CPU_HIBERNATE",
offsetof(cpu_data_t, cpu_hibernate));
DECLARE("CPU_INTERRUPT_LEVEL",
offsetof(cpu_data_t, cpu_interrupt_level));
DECLARE("CPU_NESTED_ISTACK",
offsetof(cpu_data_t, cpu_nested_istack));
DECLARE("CPU_NUMBER_GS",
offsetof(cpu_data_t,cpu_number));
DECLARE("CPU_RUNNING",
offsetof(cpu_data_t,cpu_running));
DECLARE("CPU_PENDING_AST",
offsetof(cpu_data_t,cpu_pending_ast));
DECLARE("CPU_PROCESSOR",
offsetof(cpu_data_t,cpu_processor));
DECLARE("CPU_INT_STATE",
offsetof(cpu_data_t, cpu_int_state));
DECLARE("CPU_INT_EVENT_TIME",
offsetof(cpu_data_t, cpu_int_event_time));
DECLARE("CPU_TASK_CR3",
offsetof(cpu_data_t, cpu_task_cr3));
DECLARE("CPU_ACTIVE_CR3",
offsetof(cpu_data_t, cpu_active_cr3));
DECLARE("CPU_KERNEL_CR3",
offsetof(cpu_data_t, cpu_kernel_cr3));
DECLARE("CPU_UCR3",
offsetof(cpu_data_t, cpu_ucr3));
#if DEBUG
DECLARE("CPU_ENTRY_CR3",
offsetof(cpu_data_t, cpu_entry_cr3));
DECLARE("CPU_EXIT_CR3",
offsetof(cpu_data_t, cpu_exit_cr3));
#endif
DECLARE("CPU_TLB_INVALID",
offsetof(cpu_data_t, cpu_tlb_invalid));
DECLARE("CPU_PAGEZERO_MAPPED",
offsetof(cpu_data_t, cpu_pagezero_mapped));
DECLARE("CPU_TASK_MAP",
offsetof(cpu_data_t, cpu_task_map));
DECLARE("TASK_MAP_32BIT", TASK_MAP_32BIT);
DECLARE("TASK_MAP_64BIT", TASK_MAP_64BIT);
DECLARE("CPU_UBER_USER_GS_BASE",
offsetof(cpu_data_t, cpu_uber.cu_user_gs_base));
DECLARE("CPU_UBER_ISF",
offsetof(cpu_data_t, cpu_uber.cu_isf));
DECLARE("CPU_UBER_TMP",
offsetof(cpu_data_t, cpu_uber.cu_tmp));
DECLARE("CPU_NANOTIME",
offsetof(cpu_data_t, cpu_nanotime));
DECLARE("CPU_DR7",
offsetof(cpu_data_t, cpu_dr7));
DECLARE("hwIntCnt", offsetof(cpu_data_t,cpu_hwIntCnt));
DECLARE("CPU_ACTIVE_PCID",
offsetof(cpu_data_t, cpu_active_pcid));
DECLARE("CPU_KERNEL_PCID",
offsetof(cpu_data_t, cpu_kernel_pcid));
DECLARE("CPU_PCID_COHERENTP",
offsetof(cpu_data_t, cpu_pmap_pcid_coherentp));
DECLARE("CPU_PCID_COHERENTP_KERNEL",
offsetof(cpu_data_t, cpu_pmap_pcid_coherentp_kernel));
DECLARE("CPU_PMAP_PCID_ENABLED",
offsetof(cpu_data_t, cpu_pmap_pcid_enabled));
#ifdef PCID_STATS
DECLARE("CPU_PMAP_USER_RETS",
offsetof(cpu_data_t, cpu_pmap_user_rets));
DECLARE("CPU_PMAP_PCID_PRESERVES",
offsetof(cpu_data_t, cpu_pmap_pcid_preserves));
DECLARE("CPU_PMAP_PCID_FLUSHES",
offsetof(cpu_data_t, cpu_pmap_pcid_flushes));
#endif
DECLARE("CPU_TLB_INVALID_LOCAL",
offsetof(cpu_data_t, cpu_tlb_invalid_local));
DECLARE("CPU_TLB_INVALID_GLOBAL",
offsetof(cpu_data_t, cpu_tlb_invalid_global));
DECLARE("CPU_ESTACK",
offsetof(cpu_data_t, cd_estack));
DECLARE("CPU_DSHADOW",
offsetof(cpu_data_t, cd_shadow));
DECLARE("enaExpTrace", enaExpTrace);
DECLARE("enaUsrFCall", enaUsrFCall);
DECLARE("enaUsrPhyMp", enaUsrPhyMp);
DECLARE("enaDiagSCs", enaDiagSCs);
DECLARE("enaDiagEM", enaDiagEM);
DECLARE("enaNotifyEM", enaNotifyEM);
DECLARE("dgLock", offsetof(struct diagWork, dgLock));
DECLARE("dgFlags", offsetof(struct diagWork, dgFlags));
DECLARE("dgMisc1", offsetof(struct diagWork, dgMisc1));
DECLARE("dgMisc2", offsetof(struct diagWork, dgMisc2));
DECLARE("dgMisc3", offsetof(struct diagWork, dgMisc3));
DECLARE("dgMisc4", offsetof(struct diagWork, dgMisc4));
DECLARE("dgMisc5", offsetof(struct diagWork, dgMisc5));
DECLARE("TSS_ESP0", offsetof(struct i386_tss, esp0));
DECLARE("TSS_SS0", offsetof(struct i386_tss, ss0));
DECLARE("TSS_LDT", offsetof(struct i386_tss, ldt));
DECLARE("TSS_PDBR", offsetof(struct i386_tss, cr3));
DECLARE("TSS_LINK", offsetof(struct i386_tss, back_link));
DECLARE("K_TASK_GATE", ACC_P|ACC_PL_K|ACC_TASK_GATE);
DECLARE("K_TRAP_GATE", ACC_P|ACC_PL_K|ACC_TRAP_GATE);
DECLARE("U_TRAP_GATE", ACC_P|ACC_PL_U|ACC_TRAP_GATE);
DECLARE("K_INTR_GATE", ACC_P|ACC_PL_K|ACC_INTR_GATE);
DECLARE("U_INTR_GATE", ACC_P|ACC_PL_U|ACC_INTR_GATE);
DECLARE("K_TSS", ACC_P|ACC_PL_K|ACC_TSS);
/*
* usimple_lock fields
*/
DECLARE("USL_INTERLOCK", offsetof(usimple_lock_data_t, interlock));
DECLARE("INTSTACK_SIZE", INTSTACK_SIZE);
DECLARE("KADDR", offsetof(struct boot_args, kaddr));
DECLARE("KSIZE", offsetof(struct boot_args, ksize));
DECLARE("MEMORYMAP", offsetof(struct boot_args, MemoryMap));
DECLARE("DEVICETREEP", offsetof(struct boot_args, deviceTreeP));
DECLARE("RNT_TSC_BASE",
offsetof(pal_rtc_nanotime_t, tsc_base));
DECLARE("RNT_NS_BASE",
offsetof(pal_rtc_nanotime_t, ns_base));
DECLARE("RNT_SCALE",
offsetof(pal_rtc_nanotime_t, scale));
DECLARE("RNT_SHIFT",
offsetof(pal_rtc_nanotime_t, shift));
DECLARE("RNT_GENERATION",
offsetof(pal_rtc_nanotime_t, generation));
/* values from kern/timer.h */
#ifdef __LP64__
DECLARE("TIMER_ALL", offsetof(struct timer, all_bits));
#else
DECLARE("TIMER_LOW", offsetof(struct timer, low_bits));
DECLARE("TIMER_HIGH", offsetof(struct timer, high_bits));
DECLARE("TIMER_HIGHCHK", offsetof(struct timer, high_bits_check));
#endif
DECLARE("TIMER_TSTAMP",
offsetof(struct timer, tstamp));
DECLARE("THREAD_TIMER",
offsetof(struct processor, processor_data.thread_timer));
DECLARE("KERNEL_TIMER",
offsetof(struct processor, processor_data.kernel_timer));
DECLARE("SYSTEM_TIMER",
offsetof(struct thread, system_timer));
DECLARE("USER_TIMER",
offsetof(struct thread, user_timer));
DECLARE("SYSTEM_STATE",
offsetof(struct processor, processor_data.system_state));
DECLARE("USER_STATE",
offsetof(struct processor, processor_data.user_state));
DECLARE("IDLE_STATE",
offsetof(struct processor, processor_data.idle_state));
DECLARE("CURRENT_STATE",
offsetof(struct processor, processor_data.current_state));
DECLARE("OnProc", OnProc);
#if CONFIG_DTRACE
DECLARE("LS_LCK_MTX_LOCK_ACQUIRE", LS_LCK_MTX_LOCK_ACQUIRE);
DECLARE("LS_LCK_MTX_TRY_SPIN_LOCK_ACQUIRE", LS_LCK_MTX_TRY_SPIN_LOCK_ACQUIRE);
DECLARE("LS_LCK_MTX_UNLOCK_RELEASE", LS_LCK_MTX_UNLOCK_RELEASE);
DECLARE("LS_LCK_MTX_TRY_LOCK_ACQUIRE", LS_LCK_MTX_TRY_LOCK_ACQUIRE);
DECLARE("LS_LCK_RW_LOCK_SHARED_ACQUIRE", LS_LCK_RW_LOCK_SHARED_ACQUIRE);
DECLARE("LS_LCK_RW_DONE_RELEASE", LS_LCK_RW_DONE_RELEASE);
DECLARE("LS_LCK_MTX_EXT_LOCK_ACQUIRE", LS_LCK_MTX_EXT_LOCK_ACQUIRE);
DECLARE("LS_LCK_MTX_TRY_EXT_LOCK_ACQUIRE", LS_LCK_MTX_TRY_EXT_LOCK_ACQUIRE);
DECLARE("LS_LCK_MTX_EXT_UNLOCK_RELEASE", LS_LCK_MTX_EXT_UNLOCK_RELEASE);
DECLARE("LS_LCK_RW_LOCK_EXCL_ACQUIRE", LS_LCK_RW_LOCK_EXCL_ACQUIRE);
DECLARE("LS_LCK_RW_LOCK_SHARED_TO_EXCL_UPGRADE", LS_LCK_RW_LOCK_SHARED_TO_EXCL_UPGRADE);
DECLARE("LS_LCK_RW_TRY_LOCK_EXCL_ACQUIRE", LS_LCK_RW_TRY_LOCK_EXCL_ACQUIRE);
DECLARE("LS_LCK_RW_TRY_LOCK_SHARED_ACQUIRE", LS_LCK_RW_TRY_LOCK_SHARED_ACQUIRE);
DECLARE("LS_LCK_MTX_LOCK_SPIN_ACQUIRE", LS_LCK_MTX_LOCK_SPIN_ACQUIRE);
#endif
return (0);
}
|
{
"pile_set_name": "Github"
}
|
'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.input.controller).be.eql('foo');
});
});
it('should expose all error objects as capitalized constructors', () => {
const errors = {
KuzzleError,
UnauthorizedError,
TooManyRequestsError,
SizeLimitError,
ServiceUnavailableError,
PreconditionError,
PluginImplementationError,
PartialError,
NotFoundError,
InternalError,
GatewayTimeoutError,
ForbiddenError,
ExternalServiceError,
BadRequestError,
};
should(context.errors).be.an.Object().and.not.be.empty();
_.forOwn(errors, (constructor, name) => {
should(context.errors[name]).be.a.Function();
should(new context.errors[name]('foo')).be.instanceOf(constructor);
});
});
it('should expose the right accessors', () => {
[
'silly',
'verbose',
'info',
'debug',
'warn',
'error'
].forEach(level => {
should(context.log[level]).be.an.instanceOf(Function);
context.log[level]('test');
should(kuzzle.log[level])
.calledOnce()
.calledWithExactly('[pluginName] test');
});
should(context.accessors).be.an.Object().and.not.be.empty();
should(context.accessors).have.properties(
['execute', 'validation', 'storage', 'trigger', 'strategies', 'sdk']);
});
it('should adds the plugin name in logs', done => {
context.log.info('foobar');
process.nextTick(() => {
try {
should(kuzzle.log.info)
.be.calledOnce()
.be.calledWith('[pluginName] foobar');
done();
}
catch (e) {
done(e);
}
});
});
it('should expose a data validation accessor', () => {
const validation = context.accessors.validation;
should(validation.addType)
.be.eql(kuzzle.validation.addType.bind(kuzzle.validation));
should(validation.validate)
.be.eql(kuzzle.validation.validate.bind(kuzzle.validation));
});
it('should expose an API execution accessor', () => {
const execute = context.accessors.execute;
should(execute).be.a.Function();
});
it('should expose an event trigger accessor', () => {
const trigger = context.accessors.trigger;
should(trigger).be.a.Function();
});
it('should expose a private storage accessor', () => {
const storage = context.accessors.storage;
should(storage.bootstrap).be.a.Function();
should(storage.createCollection).be.a.Function();
});
it('should expose an authentication strategies management accessor', () => {
const strategies = context.accessors.strategies;
should(strategies.add).be.a.Function();
should(strategies.remove).be.a.Function();
});
it('should expose a EmbeddedSDK in accessors', () => {
const sdk = context.accessors.sdk;
should(sdk).be.instanceOf(EmbeddedSDK);
});
describe('#trigger', () => {
it('should call trigger with the given event name and payload and return pipe chain result', async () => {
kuzzle.pipe.resolves('pipe chain result');
const eventName = 'backHome';
const payload = {
question: 'whose motorcycle is this?',
answer: 'it\'s a chopper, baby.',
anotherQuestion: 'whose chopper is this, then?',
anotherAnswer: 'it\'s Zed\'s',
yetAnotherQuestion: 'who\'s Zed?',
yetAnotherAnswer: 'Zed\'s dead, baby, Zed\'s dead.'
};
const result = await context.accessors.trigger(eventName, payload);
should(result).be.eql('pipe chain result');
should(kuzzle.pipe)
.be.calledWithExactly(`plugin-pluginName:${eventName}`, payload);
});
});
describe('#execute', () => {
it('should call the callback with a result if everything went well', done => {
const
request = new Request({requestId: 'request'}, {connectionId: 'connectionid'}),
result = {foo: 'bar'},
callback = sinon.spy((err, res) => {
try {
should(callback).be.calledOnce();
should(err).be.null();
should(res).match(request);
should(res.result).be.equal(result);
should(kuzzle.funnel.executePluginRequest).calledWith(request);
done();
}
catch(e) {
done(e);
}
});
kuzzle.funnel.executePluginRequest.resolves(result);
should(context.accessors.execute(request, callback)).not.be.a.Promise();
});
it('should resolve a Promise with a result if everything went well', () => {
const
request = new Request({requestId: 'request'}, {connectionId: 'connectionid'}),
result = {foo: 'bar'};
kuzzle.funnel.executePluginRequest.resolves(result);
const ret = context.accessors.execute(request);
should(ret).be.a.Promise();
return ret
.then(res => {
should(res).match(request);
should(res.result).be.equal(result);
should(kuzzle.funnel.executePluginRequest).calledWith(request);
});
});
it('should call the callback with an error if something went wrong', done => {
const
request = new Request({body: {some: 'request'}}, {connectionId: 'connectionid'}),
error = new Error('error'),
callback = sinon.spy(
(err, res) => {
try {
should(kuzzle.funnel.executePluginRequest).calledWith(request);
should(callback).be.calledOnce();
should(err).match(error);
should(res).be.undefined();
done();
}
catch(e) {
done(e);
}
});
kuzzle.funnel.executePluginRequest.rejects(error);
context.accessors.execute(request, callback);
});
it('should reject a Promise with an error if something went wrong', () => {
const
request = new Request({body: {some: 'request'}}, {connectionId: 'connectionid'}),
error = new Error('error');
kuzzle.funnel.executePluginRequest.rejects(error);
return context.accessors.execute(request)
.catch(err => {
should(kuzzle.funnel.executePluginRequest).calledWith(request);
should(err).match(error);
});
});
it('should resolve to an error if no Request object is provided', done => {
const
callback = sinon.spy(
(err, res) => {
try {
should(kuzzle.funnel.executePluginRequest).not.be.called();
should(callback).be.calledOnce();
should(err).be.instanceOf(PluginImplementationError);
should(err.message).startWith('Invalid argument: a Request object must be supplied');
should(res).be.undefined();
done();
}
catch(e) {
done(e);
}
});
context.accessors.execute({}, callback);
});
it('should reject if no Request object is provided', () => {
return should(context.accessors.execute({})).be.rejectedWith(
/Invalid argument: a Request object must be supplied/
);
});
it('should reject if callback argument is not a function', () => {
return should(context.accessors.execute({requestId: 'request'}, 'foo'))
.be.rejectedWith({message: /^Invalid argument: Expected callback to be a function, received "string"/});
});
it('should reject if trying to call forbidden methods from realtime controller', () => {
return Promise.resolve()
.then(() => {
return should(context.accessors.execute(new Request({
controller: 'realtime',
action: 'subscribe'
})))
.be.rejectedWith(PluginImplementationError, {
id: 'plugin.context.unavailable_realtime'
});
})
.then(() => {
return should(context.accessors.execute(new Request({
controller: 'realtime',
action: 'unsubscribe'
})))
.be.rejectedWith(PluginImplementationError, {
id: 'plugin.context.unavailable_realtime'
});
});
});
});
describe('#strategies', () => {
it('should allow to add a strategy and link it to its owner plugin', () => {
const
mockedStrategy = {
config: {
authenticator: 'foo'
}
},
result = context.accessors.strategies.add('foo', mockedStrategy);
should(result).be.a.Promise();
return result
.then(() => {
should(kuzzle.pluginsManager.registerStrategy).calledWith('pluginName', 'foo', mockedStrategy);
should(kuzzle.pipe).calledWith('core:auth:strategyAdded', {
pluginName: 'pluginName',
name: 'foo',
strategy: mockedStrategy
});
});
});
it('should reject the promise if the strategy registration throws', () => {
const error = new Error('foobar');
kuzzle.pluginsManager.registerStrategy.throws(error);
const result = context.accessors.strategies.add('foo', {
config: {
authenticator: 'foobar'
}
});
should(result).be.a.Promise();
return should(result).be.rejectedWith(error);
});
it('should throw if no authenticator is provided', () => {
return should(context.accessors.strategies.add('foo', null))
.rejectedWith(PluginImplementationError, {message: '[pluginName] Strategy foo: dynamic strategy registration can only be done using an "authenticator" option (see https://tinyurl.com/y7boozbk).\nThis is probably not a Kuzzle error, but a problem with a plugin implementation.'});
});
it('should allow to remove a strategy', () => {
const result = context.accessors.strategies.remove('foo');
should(result).be.a.Promise();
return result
.then(() => {
should(kuzzle.pluginsManager.unregisterStrategy).calledWith('pluginName', 'foo');
should(kuzzle.pipe).calledWith('core:auth:strategyRemoved', {
pluginName: 'pluginName',
name: 'foo'
});
});
});
it('should reject the promise if the strategy removal throws', () => {
const error = new Error('foobar');
kuzzle.pluginsManager.unregisterStrategy.throws(error);
const result = context.accessors.strategies.remove('foo');
should(result).be.a.Promise();
return should(result).be.rejectedWith(error);
});
});
});
});
|
{
"pile_set_name": "Github"
}
|
#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"
}
|
/*
* 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"
}
|
{
"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"
}
|
/*
* 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),
* we can skip most computations for the unused components.
*/
boolean component_needed; /* do we need the value of this component? */
/* These values are computed before starting a scan of the component. */
/* The decompressor output side may not use these variables. */
int MCU_width; /* number of blocks per MCU, horizontally */
int MCU_height; /* number of blocks per MCU, vertically */
int MCU_blocks; /* MCU_width * MCU_height */
int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */
int last_col_width; /* # of non-dummy blocks across in last MCU */
int last_row_height; /* # of non-dummy blocks down in last MCU */
/* Saved quantization table for component; NULL if none yet saved.
* See jdinput.c comments about the need for this information.
* This field is currently used only for decompression.
*/
JQUANT_TBL * quant_table;
/* Private per-component storage for DCT or IDCT subsystem. */
void * dct_table;
} jpeg_component_info;
/* The script for encoding a multiple-scan file is an array of these: */
typedef struct {
int comps_in_scan; /* number of components encoded in this scan */
int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */
int Ss, Se; /* progressive JPEG spectral selection parms */
int Ah, Al; /* progressive JPEG successive approx. parms */
} jpeg_scan_info;
/* The decompressor can save APPn and COM markers in a list of these: */
typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;
struct jpeg_marker_struct {
jpeg_saved_marker_ptr next; /* next in list, or NULL */
UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */
unsigned int original_length; /* # bytes of data in the file */
unsigned int data_length; /* # bytes of data saved at data[] */
JOCTET FAR * data; /* the data contained in the marker */
/* the marker length word is not counted in data_length or original_length */
};
/* Known color spaces. */
typedef enum {
JCS_UNKNOWN, /* error/unspecified */
JCS_GRAYSCALE, /* monochrome */
JCS_RGB, /* red/green/blue */
JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */
JCS_CMYK, /* C/M/Y/K */
JCS_YCCK /* Y/Cb/Cr/K */
} J_COLOR_SPACE;
/* Supported color transforms. */
typedef enum {
JCT_NONE = 0,
JCT_SUBTRACT_GREEN = 1
} J_COLOR_TRANSFORM;
/* DCT/IDCT algorithm options. */
typedef enum {
JDCT_ISLOW, /* slow but accurate integer algorithm */
JDCT_IFAST, /* faster, less accurate integer method */
JDCT_FLOAT /* floating-point: accurate, fast on fast HW */
} J_DCT_METHOD;
#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */
#define JDCT_DEFAULT JDCT_ISLOW
#endif
#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */
#define JDCT_FASTEST JDCT_IFAST
#endif
/* Dithering options for decompression. */
typedef enum {
JDITHER_NONE, /* no dithering */
JDITHER_ORDERED, /* simple ordered dither */
JDITHER_FS /* Floyd-Steinberg error diffusion dither */
} J_DITHER_MODE;
/* Common fields between JPEG compression and decompression master structs. */
#define jpeg_common_fields \
struct jpeg_error_mgr * err; /* Error handler module */\
struct jpeg_memory_mgr * mem; /* Memory manager module */\
struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
void * client_data; /* Available for use by application */\
boolean is_decompressor; /* So common code can tell which is which */\
int global_state /* For checking call sequence validity */
/* Routines that are to be used by both halves of the library are declared
* to receive a pointer to this structure. There are no actual instances of
* jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.
*/
struct jpeg_common_struct {
jpeg_common_fields; /* Fields common to both master struct types */
/* Additional fields follow in an actual jpeg_compress_struct or
* jpeg_decompress_struct. All three structs must agree on these
* initial fields! (This would be a lot cleaner in C++.)
*/
};
typedef struct jpeg_common_struct * j_common_ptr;
typedef struct jpeg_compress_struct * j_compress_ptr;
typedef struct jpeg_decompress_struct * j_decompress_ptr;
/* Master record for a compression instance */
struct jpeg_compress_struct {
jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */
/* Destination for compressed data */
struct jpeg_destination_mgr * dest;
/* Description of source image --- these fields must be filled in by
* outer application before starting compression. in_color_space must
* be correct before you can even call jpeg_set_defaults().
*/
JDIMENSION image_width; /* input image width */
JDIMENSION image_height; /* input image height */
int input_components; /* # of color components in input image */
J_COLOR_SPACE in_color_space; /* colorspace of input image */
double input_gamma; /* image gamma of input image */
/* Compression parameters --- these fields must be set before calling
* jpeg_start_compress(). We recommend calling jpeg_set_defaults() to
* initialize everything to reasonable defaults, then changing anything
* the application specifically wants to change. That way you won't get
* burnt when new parameters are added. Also note that there are several
* helper routines to simplify changing parameters.
*/
unsigned int scale_num, scale_denom; /* fraction by which to scale image */
JDIMENSION jpeg_width; /* scaled JPEG image width */
JDIMENSION jpeg_height; /* scaled JPEG image height */
/* Dimensions of actual JPEG image that will be written to file,
* derived from input dimensions by scaling factors above.
* These fields are computed by jpeg_start_compress().
* You can also use jpeg_calc_jpeg_dimensions() to determine these values
* in advance of calling jpeg_start_compress().
*/
int data_precision; /* bits of precision in image data */
int num_components; /* # of color components in JPEG image */
J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
jpeg_component_info * comp_info;
/* comp_info[i] describes component that appears i'th in SOF */
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
int q_scale_factor[NUM_QUANT_TBLS];
/* ptrs to coefficient quantization tables, or NULL if not defined,
* and corresponding scale factors (percentage, initialized 100).
*/
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
/* ptrs to Huffman coding tables, or NULL if not defined */
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
int num_scans; /* # of entries in scan_info array */
const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */
/* The default value of scan_info is NULL, which causes a single-scan
* sequential JPEG file to be emitted. To create a multi-scan file,
* set num_scans and scan_info to point to an array of scan definitions.
*/
boolean raw_data_in; /* TRUE=caller supplies downsampled data */
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
J_DCT_METHOD dct_method; /* DCT algorithm selector */
/* The restart interval can be specified in absolute MCUs by setting
* restart_interval, or in MCU rows by setting restart_in_rows
* (in which case the correct restart_interval will be figured
* for each scan).
*/
unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */
int restart_in_rows; /* if > 0, MCU rows per restart interval */
/* Parameters controlling emission of special markers. */
boolean write_JFIF_header; /* should a JFIF marker be written? */
UINT8 JFIF_major_version; /* What to write for the JFIF version number */
UINT8 JFIF_minor_version;
/* These three values are not used by the JPEG code, merely copied */
/* into the JFIF APP0 marker. density_unit can be 0 for unknown, */
/* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */
/* ratio is defined by X_density/Y_density even when density_unit=0. */
UINT8 density_unit; /* JFIF code for pixel size units */
UINT16 X_density; /* Horizontal pixel density */
UINT16 Y_density; /* Vertical pixel density */
boolean write_Adobe_marker; /* should an Adobe marker be written? */
J_COLOR_TRANSFORM color_transform;
/* Color transform identifier, writes LSE marker if nonzero */
/* State variable: index of next scanline to be written to
* jpeg_write_scanlines(). Application may use this to control its
* processing loop, e.g., "while (next_scanline < image_height)".
*/
JDIMENSION next_scanline; /* 0 .. image_height-1 */
/* Remaining fields are known throughout compressor, but generally
* should not be touched by a surrounding application.
*/
/*
* These fields are computed during compression startup
*/
boolean progressive_mode; /* TRUE if scan script uses progressive mode */
int max_h_samp_factor; /* largest h_samp_factor */
int max_v_samp_factor; /* largest v_samp_factor */
int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */
int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */
JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */
/* The coefficient controller receives data in units of MCU rows as defined
* for fully interleaved scans (whether the JPEG file is interleaved or not).
* There are v_samp_factor * DCTSIZE sample rows of each component in an
* "iMCU" (interleaved MCU) row.
*/
/*
* These fields are valid during any one scan.
* They describe the components and MCUs actually appearing in the scan.
*/
int comps_in_scan; /* # of JPEG components in this scan */
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
/* *cur_comp_info[i] describes component that appears i'th in SOS */
JDIMENSION MCUs_per_row; /* # of MCUs across the image */
JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */
int blocks_in_MCU; /* # of DCT blocks per MCU */
int MCU_membership[C_MAX_BLOCKS_IN_MCU];
/* MCU_membership[i] is index in cur_comp_info of component owning */
/* i'th block in an MCU */
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
int block_size; /* the basic DCT block size: 1..16 */
const int * natural_order; /* natural-order position array */
int lim_Se; /* min( Se, DCTSIZE2-1 ) */
/*
* Links to compression subobjects (methods and private variables of modules)
*/
struct jpeg_comp_master * master;
struct jpeg_c_main_controller * main;
struct jpeg_c_prep_controller * prep;
struct jpeg_c_coef_controller * coef;
struct jpeg_marker_writer * marker;
struct jpeg_color_converter * cconvert;
struct jpeg_downsampler * downsample;
struct jpeg_forward_dct * fdct;
struct jpeg_entropy_encoder * entropy;
jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */
int script_space_size;
};
/* Master record for a decompression instance */
struct jpeg_decompress_struct {
jpeg_common_fields; /* Fields shared with jpeg_compress_struct */
/* Source of compressed data */
struct jpeg_source_mgr * src;
/* Basic description of image --- filled in by jpeg_read_header(). */
/* Application may inspect these values to decide how to process image. */
JDIMENSION image_width; /* nominal image width (from SOF marker) */
JDIMENSION image_height; /* nominal image height */
int num_components; /* # of color components in JPEG image */
J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
/* Decompression processing parameters --- these fields must be set before
* calling jpeg_start_decompress(). Note that jpeg_read_header() initializes
* them to default values.
*/
J_COLOR_SPACE out_color_space; /* colorspace for output */
unsigned int scale_num, scale_denom; /* fraction by which to scale image */
double output_gamma; /* image gamma wanted in output */
boolean buffered_image; /* TRUE=multiple output passes */
boolean raw_data_out; /* TRUE=downsampled data wanted */
J_DCT_METHOD dct_method; /* IDCT algorithm selector */
boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
boolean do_block_smoothing; /* TRUE=apply interblock smoothing */
boolean quantize_colors; /* TRUE=colormapped output wanted */
/* the following are ignored if not quantize_colors: */
J_DITHER_MODE dither_mode; /* type of color dithering to use */
boolean two_pass_quantize; /* TRUE=use two-pass color quantization */
int desired_number_of_colors; /* max # colors to use in created colormap */
/* these are significant only in buffered-image mode: */
boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */
boolean enable_external_quant;/* enable future use of external colormap */
boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */
/* Description of actual output image that will be returned to application.
* These fields are computed by jpeg_start_decompress().
* You can also use jpeg_calc_output_dimensions() to determine these values
* in advance of calling jpeg_start_decompress().
*/
JDIMENSION output_width; /* scaled image width */
JDIMENSION output_height; /* scaled image height */
int out_color_components; /* # of color components in out_color_space */
int output_components; /* # of color components returned */
/* output_components is 1 (a colormap index) when quantizing colors;
* otherwise it equals out_color_components.
*/
int rec_outbuf_height; /* min recommended height of scanline buffer */
/* If the buffer passed to jpeg_read_scanlines() is less than this many rows
* high, space and time will be wasted due to unnecessary data copying.
* Usually rec_outbuf_height will be 1 or 2, at most 4.
*/
/* When quantizing colors, the output colormap is described by these fields.
* The application can supply a colormap by setting colormap non-NULL before
* calling jpeg_start_decompress; otherwise a colormap is created during
* jpeg_start_decompress or jpeg_start_output.
* The map has out_color_components rows and actual_number_of_colors columns.
*/
int actual_number_of_colors; /* number of entries in use */
JSAMPARRAY colormap; /* The color map as a 2-D pixel array */
/* State variables: these variables indicate the progress of decompression.
* The application may examine these but must not modify them.
*/
/* Row index of next scanline to be read from jpeg_read_scanlines().
* Application may use this to control its processing loop, e.g.,
* "while (output_scanline < output_height)".
*/
JDIMENSION output_scanline; /* 0 .. output_height-1 */
/* Current input scan number and number of iMCU rows completed in scan.
* These indicate the progress of the decompressor input side.
*/
int input_scan_number; /* Number of SOS markers seen so far */
JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */
/* The "output scan number" is the notional scan being displayed by the
* output side. The decompressor will not allow output scan/row number
* to get ahead of input scan/row, but it can fall arbitrarily far behind.
*/
int output_scan_number; /* Nominal scan number being displayed */
JDIMENSION output_iMCU_row; /* Number of iMCU rows read */
/* Current progression status. coef_bits[c][i] indicates the precision
* with which component c's DCT coefficient i (in zigzag order) is known.
* It is -1 when no data has yet been received, otherwise it is the point
* transform (shift) value for the most recent scan of the coefficient
* (thus, 0 at completion of the progression).
* This pointer is NULL when reading a non-progressive file.
*/
int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */
/* Internal JPEG parameters --- the application usually need not look at
* these fields. Note that the decompressor output side may not use
* any parameters that can change between scans.
*/
/* Quantization and Huffman tables are carried forward across input
* datastreams when processing abbreviated JPEG datastreams.
*/
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
/* ptrs to coefficient quantization tables, or NULL if not defined */
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
/* ptrs to Huffman coding tables, or NULL if not defined */
/* These parameters are never carried across datastreams, since they
* are given in SOF/SOS markers or defined to be reset by SOI.
*/
int data_precision; /* bits of precision in image data */
jpeg_component_info * comp_info;
/* comp_info[i] describes component that appears i'th in SOF */
boolean is_baseline; /* TRUE if Baseline SOF0 encountered */
boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */
unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */
/* These fields record data obtained from optional markers recognized by
* the JPEG library.
*/
boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */
/* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
UINT8 JFIF_major_version; /* JFIF version number */
UINT8 JFIF_minor_version;
UINT8 density_unit; /* JFIF code for pixel size units */
UINT16 X_density; /* Horizontal pixel density */
UINT16 Y_density; /* Vertical pixel density */
boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */
UINT8 Adobe_transform; /* Color transform code from Adobe marker */
J_COLOR_TRANSFORM color_transform;
/* Color transform identifier derived from LSE marker, otherwise zero */
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
/* Aside from the specific data retained from APPn markers known to the
* library, the uninterpreted contents of any or all APPn and COM markers
* can be saved in a list for examination by the application.
*/
jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */
/* Remaining fields are known throughout decompressor, but generally
* should not be touched by a surrounding application.
*/
/*
* These fields are computed during decompression startup
*/
int max_h_samp_factor; /* largest h_samp_factor */
int max_v_samp_factor; /* largest v_samp_factor */
int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */
int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */
JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */
/* The coefficient controller's input and output progress is measured in
* units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows
* in fully interleaved JPEG scans, but are used whether the scan is
* interleaved or not. We define an iMCU row as v_samp_factor DCT block
* rows of each component. Therefore, the IDCT output contains
* v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row.
*/
JSAMPLE * sample_range_limit; /* table for fast range-limiting */
/*
* These fields are valid during any one scan.
* They describe the components and MCUs actually appearing in the scan.
* Note that the decompressor output side must not use these fields.
*/
int comps_in_scan; /* # of JPEG components in this scan */
jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];
/* *cur_comp_info[i] describes component that appears i'th in SOS */
JDIMENSION MCUs_per_row; /* # of MCUs across the image */
JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */
int blocks_in_MCU; /* # of DCT blocks per MCU */
int MCU_membership[D_MAX_BLOCKS_IN_MCU];
/* MCU_membership[i] is index in cur_comp_info of component owning */
/* i'th block in an MCU */
int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */
/* These fields are derived from Se of first SOS marker.
*/
int block_size; /* the basic DCT block size: 1..16 */
const int * natural_order; /* natural-order position array for entropy decode */
int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */
/* This field is shared between entropy decoder and marker parser.
* It is either zero or the code of a JPEG marker that has been
* read from the data source, but has not yet been processed.
*/
int unread_marker;
/*
* Links to decompression subobjects (methods, private variables of modules)
*/
struct jpeg_decomp_master * master;
struct jpeg_d_main_controller * main;
struct jpeg_d_coef_controller * coef;
struct jpeg_d_post_controller * post;
struct jpeg_input_controller * inputctl;
struct jpeg_marker_reader * marker;
struct jpeg_entropy_decoder * entropy;
struct jpeg_inverse_dct * idct;
struct jpeg_upsampler * upsample;
struct jpeg_color_deconverter * cconvert;
struct jpeg_color_quantizer * cquantize;
};
/* "Object" declarations for JPEG modules that may be supplied or called
* directly by the surrounding application.
* As with all objects in the JPEG library, these structs only define the
* publicly visible methods and state variables of a module. Additional
* private fields may exist after the public ones.
*/
/* Error handler object */
struct jpeg_error_mgr {
/* Error exit handler: does not return to caller */
JMETHOD(noreturn_t, error_exit, (j_common_ptr cinfo));
/* Conditionally emit a trace or warning message */
JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
/* Routine that actually outputs a trace or error message */
JMETHOD(void, output_message, (j_common_ptr cinfo));
/* Format a message string for the most recent JPEG error or message */
JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */
/* Reset error state variables at start of a new image */
JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
/* The message ID code and any parameters are saved here.
* A message can have one string parameter or up to 8 int parameters.
*/
int msg_code;
#define JMSG_STR_PARM_MAX 80
union {
int i[8];
char s[JMSG_STR_PARM_MAX];
} msg_parm;
/* Standard state variables for error facility */
int trace_level; /* max msg_level that will be displayed */
/* For recoverable corrupt-data errors, we emit a warning message,
* but keep going unless emit_message chooses to abort. emit_message
* should count warnings in num_warnings. The surrounding application
* can check for bad data by seeing if num_warnings is nonzero at the
* end of processing.
*/
long num_warnings; /* number of corrupt-data warnings */
/* These fields point to the table(s) of error message strings.
* An application can change the table pointer to switch to a different
* message list (typically, to change the language in which errors are
* reported). Some applications may wish to add additional error codes
* that will be handled by the JPEG library error mechanism; the second
* table pointer is used for this purpose.
*
* First table includes all errors generated by JPEG library itself.
* Error code 0 is reserved for a "no such error string" message.
*/
const char * const * jpeg_message_table; /* Library errors */
int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */
/* Second table can be added by application (see cjpeg/djpeg for example).
* It contains strings numbered first_addon_message..last_addon_message.
*/
const char * const * addon_message_table; /* Non-library errors */
int first_addon_message; /* code for first string in addon table */
int last_addon_message; /* code for last string in addon table */
};
/* Progress monitor object */
struct jpeg_progress_mgr {
JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
long pass_counter; /* work units completed in this pass */
long pass_limit; /* total number of work units in this pass */
int completed_passes; /* passes completed so far */
int total_passes; /* total number of passes expected */
};
/* Data destination object for compression */
struct jpeg_destination_mgr {
JOCTET * next_output_byte; /* => next byte to write in buffer */
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
JMETHOD(void, init_destination, (j_compress_ptr cinfo));
JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
JMETHOD(void, term_destination, (j_compress_ptr cinfo));
};
/* Data source object for decompression */
struct jpeg_source_mgr {
const JOCTET * next_input_byte; /* => next byte to read from buffer */
size_t bytes_in_buffer; /* # of bytes remaining in buffer */
JMETHOD(void, init_source, (j_decompress_ptr cinfo));
JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
JMETHOD(void, term_source, (j_decompress_ptr cinfo));
};
/* Memory manager object.
* Allocates "small" objects (a few K total), "large" objects (tens of K),
* and "really big" objects (virtual arrays with backing store if needed).
* The memory manager does not allow individual objects to be freed; rather,
* each created object is assigned to a pool, and whole pools can be freed
* at once. This is faster and more convenient than remembering exactly what
* to free, especially where malloc()/free() are not too speedy.
* NB: alloc routines never return NULL. They exit to error_exit if not
* successful.
*/
#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */
#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */
#define JPOOL_NUMPOOLS 2
typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
typedef struct jvirt_barray_control * jvirt_barray_ptr;
struct jpeg_memory_mgr {
/* Method pointers */
JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
size_t sizeofobject));
JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
size_t sizeofobject));
JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
JDIMENSION samplesperrow,
JDIMENSION numrows));
JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
JDIMENSION blocksperrow,
JDIMENSION numrows));
JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
int pool_id,
boolean pre_zero,
JDIMENSION samplesperrow,
JDIMENSION numrows,
JDIMENSION maxaccess));
JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
int pool_id,
boolean pre_zero,
JDIMENSION blocksperrow,
JDIMENSION numrows,
JDIMENSION maxaccess));
JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
jvirt_sarray_ptr ptr,
JDIMENSION start_row,
JDIMENSION num_rows,
boolean writable));
JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
jvirt_barray_ptr ptr,
JDIMENSION start_row,
JDIMENSION num_rows,
boolean writable));
JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
JMETHOD(void, self_destruct, (j_common_ptr cinfo));
/* Limit on memory allocation for this JPEG object. (Note that this is
* merely advisory, not a guaranteed maximum; it only affects the space
* used for virtual-array buffers.) May be changed by outer application
* after creating the JPEG object.
*/
long max_memory_to_use;
/* Maximum allocation request accepted by alloc_large. */
long max_alloc_chunk;
};
/* Routine signature for application-supplied marker processing methods.
* Need not pass marker code since it is stored in cinfo->unread_marker.
*/
typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
/* Declarations for routines called by application.
* The JPP macro hides prototype parameters from compilers that can't cope.
* Note JPP requires double parentheses.
*/
#ifdef HAVE_PROTOTYPES
#define JPP(arglist) arglist
#else
#define JPP(arglist) ()
#endif
/* Short forms of external names for systems with brain-damaged linkers.
* We shorten external names to be unique in the first six letters, which
* is good enough for all known systems.
* (If your compiler itself needs names to be unique in less than 15
* characters, you are out of luck. Get a better compiler.)
*/
#ifdef NEED_SHORT_EXTERNAL_NAMES
#define jpeg_std_error jStdError
#define jpeg_CreateCompress jCreaCompress
#define jpeg_CreateDecompress jCreaDecompress
#define jpeg_destroy_compress jDestCompress
#define jpeg_destroy_decompress jDestDecompress
#define jpeg_stdio_dest jStdDest
#define jpeg_stdio_src jStdSrc
#define jpeg_mem_dest jMemDest
#define jpeg_mem_src jMemSrc
#define jpeg_set_defaults jSetDefaults
#define jpeg_set_colorspace jSetColorspace
#define jpeg_default_colorspace jDefColorspace
#define jpeg_set_quality jSetQuality
#define jpeg_set_linear_quality jSetLQuality
#define jpeg_default_qtables jDefQTables
#define jpeg_add_quant_table jAddQuantTable
#define jpeg_quality_scaling jQualityScaling
#define jpeg_simple_progression jSimProgress
#define jpeg_suppress_tables jSuppressTables
#define jpeg_alloc_quant_table jAlcQTable
#define jpeg_alloc_huff_table jAlcHTable
#define jpeg_start_compress jStrtCompress
#define jpeg_write_scanlines jWrtScanlines
#define jpeg_finish_compress jFinCompress
#define jpeg_calc_jpeg_dimensions jCjpegDimensions
#define jpeg_write_raw_data jWrtRawData
#define jpeg_write_marker jWrtMarker
#define jpeg_write_m_header jWrtMHeader
#define jpeg_write_m_byte jWrtMByte
#define jpeg_write_tables jWrtTables
#define jpeg_read_header jReadHeader
#define jpeg_start_decompress jStrtDecompress
#define jpeg_read_scanlines jReadScanlines
#define jpeg_finish_decompress jFinDecompress
#define jpeg_read_raw_data jReadRawData
#define jpeg_has_multiple_scans jHasMultScn
#define jpeg_start_output jStrtOutput
#define jpeg_finish_output jFinOutput
#define jpeg_input_complete jInComplete
#define jpeg_new_colormap jNewCMap
#define jpeg_consume_input jConsumeInput
#define jpeg_core_output_dimensions jCoreDimensions
#define jpeg_calc_output_dimensions jCalcDimensions
#define jpeg_save_markers jSaveMarkers
#define jpeg_set_marker_processor jSetMarker
#define jpeg_read_coefficients jReadCoefs
#define jpeg_write_coefficients jWrtCoefs
#define jpeg_copy_critical_parameters jCopyCrit
#define jpeg_abort_compress jAbrtCompress
#define jpeg_abort_decompress jAbrtDecompress
#define jpeg_abort jAbort
#define jpeg_destroy jDestroy
#define jpeg_resync_to_restart jResyncRestart
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Default error-management setup */
EXTERN(struct jpeg_error_mgr *) jpeg_std_error
JPP((struct jpeg_error_mgr * err));
/* Initialization of JPEG compression objects.
* jpeg_create_compress() and jpeg_create_decompress() are the exported
* names that applications should call. These expand to calls on
* jpeg_CreateCompress and jpeg_CreateDecompress with additional information
* passed for version mismatch checking.
* NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
*/
#define jpeg_create_compress(cinfo) \
jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
(size_t) sizeof(struct jpeg_compress_struct))
#define jpeg_create_decompress(cinfo) \
jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
(size_t) sizeof(struct jpeg_decompress_struct))
EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
int version, size_t structsize));
EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
int version, size_t structsize));
/* Destruction of JPEG compression objects */
EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
/* Standard data source and destination managers: stdio streams. */
/* Caller is responsible for opening the file before and closing after. */
EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
/* Data source and destination managers: memory buffers. */
EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
unsigned char ** outbuffer,
unsigned long * outsize));
EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
unsigned char * inbuffer,
unsigned long insize));
/* Default parameter setup for compression */
EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
/* Compression parameter setup aids */
EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
J_COLOR_SPACE colorspace));
EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
boolean force_baseline));
EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
int scale_factor,
boolean force_baseline));
EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
boolean force_baseline));
EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
const unsigned int *basic_table,
int scale_factor,
boolean force_baseline));
EXTERN(int) jpeg_quality_scaling JPP((int quality));
EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
boolean suppress));
EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
/* Main entry points for compression */
EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
boolean write_all_tables));
EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
JSAMPARRAY scanlines,
JDIMENSION num_lines));
EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
/* Precalculate JPEG dimensions for current compression parameters. */
EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
JSAMPIMAGE data,
JDIMENSION num_lines));
/* Write a special marker. See libjpeg.txt concerning safe usage. */
EXTERN(void) jpeg_write_marker
JPP((j_compress_ptr cinfo, int marker,
const JOCTET * dataptr, unsigned int datalen));
/* Same, but piecemeal. */
EXTERN(void) jpeg_write_m_header
JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
EXTERN(void) jpeg_write_m_byte
JPP((j_compress_ptr cinfo, int val));
/* Alternate compression function: just write an abbreviated table file */
EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
/* Decompression startup: read start of JPEG datastream to see what's there */
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
boolean require_image));
/* Return value is one of: */
#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
#define JPEG_HEADER_OK 1 /* Found valid image datastream */
#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */
/* If you pass require_image = TRUE (normal case), you need not check for
* a TABLES_ONLY return code; an abbreviated file will cause an error exit.
* JPEG_SUSPENDED is only possible if you use a data source module that can
* give a suspension return (the stdio source module doesn't).
*/
/* Main entry points for decompression */
EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
JSAMPARRAY scanlines,
JDIMENSION max_lines));
EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
JSAMPIMAGE data,
JDIMENSION max_lines));
/* Additional entry points for buffered-image mode. */
EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
int scan_number));
EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
/* Return value is one of: */
/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */
#define JPEG_REACHED_SOS 1 /* Reached start of new scan */
#define JPEG_REACHED_EOI 2 /* Reached end of image */
#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */
#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */
/* Precalculate output dimensions for current decompression parameters. */
EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
/* Control saving of COM and APPn markers into marker_list. */
EXTERN(void) jpeg_save_markers
JPP((j_decompress_ptr cinfo, int marker_code,
unsigned int length_limit));
/* Install a special processing method for COM or APPn markers. */
EXTERN(void) jpeg_set_marker_processor
JPP((j_decompress_ptr cinfo, int marker_code,
jpeg_marker_parser_method routine));
/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
jvirt_barray_ptr * coef_arrays));
EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
j_compress_ptr dstinfo));
/* If you choose to abort compression or decompression before completing
* jpeg_finish_(de)compress, then you need to clean up to release memory,
* temporary files, etc. You can just call jpeg_destroy_(de)compress
* if you're done with the JPEG object, but if you want to clean it up and
* reuse it, call this:
*/
EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
/* Generic versions of jpeg_abort and jpeg_destroy that work on either
* flavor of JPEG object. These may be more convenient in some places.
*/
EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
/* Default restart-marker-resync procedure for use by data source modules */
EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
int desired));
/* These marker codes are exported since applications and data source modules
* are likely to want to use them.
*/
#define JPEG_RST0 0xD0 /* RST0 marker code */
#define JPEG_EOI 0xD9 /* EOI marker code */
#define JPEG_APP0 0xE0 /* APP0 marker code */
#define JPEG_COM 0xFE /* COM marker code */
/* If we have a brain-damaged compiler that emits warnings (or worse, errors)
* for structure definitions that are never filled in, keep it quiet by
* supplying dummy definitions for the various substructures.
*/
#ifdef INCOMPLETE_TYPES_BROKEN
#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */
struct jvirt_sarray_control { long dummy; };
struct jvirt_barray_control { long dummy; };
struct jpeg_comp_master { long dummy; };
struct jpeg_c_main_controller { long dummy; };
struct jpeg_c_prep_controller { long dummy; };
struct jpeg_c_coef_controller { long dummy; };
struct jpeg_marker_writer { long dummy; };
struct jpeg_color_converter { long dummy; };
struct jpeg_downsampler { long dummy; };
struct jpeg_forward_dct { long dummy; };
struct jpeg_entropy_encoder { long dummy; };
struct jpeg_decomp_master { long dummy; };
struct jpeg_d_main_controller { long dummy; };
struct jpeg_d_coef_controller { long dummy; };
struct jpeg_d_post_controller { long dummy; };
struct jpeg_input_controller { long dummy; };
struct jpeg_marker_reader { long dummy; };
struct jpeg_entropy_decoder { long dummy; };
struct jpeg_inverse_dct { long dummy; };
struct jpeg_upsampler { long dummy; };
struct jpeg_color_deconverter { long dummy; };
struct jpeg_color_quantizer { long dummy; };
#endif /* JPEG_INTERNALS */
#endif /* INCOMPLETE_TYPES_BROKEN */
/*
* The JPEG library modules define JPEG_INTERNALS before including this file.
* The internal structure declarations are read only when that is true.
* Applications using the library should not include jpegint.h, but may wish
* to include jerror.h.
*/
#ifdef JPEG_INTERNALS
#include "jpegint.h" /* fetch private declarations */
#include "jerror.h" /* fetch error codes too */
#endif
#ifdef __cplusplus
#ifndef DONT_USE_EXTERN_C
}
#endif
#endif
#endif /* JPEGLIB_H */
|
{
"pile_set_name": "Github"
}
|
/*
==============================================================================
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"
}
|
<?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"
}
|
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"
}
|
{
"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"
}
|
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"
}
|
// 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(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
_p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 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 Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
_, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
Syscall(SYS_EXIT, uintptr(code), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
egid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
gid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
pgrp = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
pid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
ppid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (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_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (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_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 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 Rename(from string, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
newoffset = int64(int64(r1)<<32 | int64(r0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 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 Setegid(egid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(name)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
|
{
"pile_set_name": "Github"
}
|
/**
* 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"
}
|
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"
}
|
/**************************************************************************\
* 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"
}
|
<?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"
}
|
# 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"
}
|
/* 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_I2S_MS_MASK (0x1 << 3)
#define RT1016_I2S_MS_SFT 3
#define RT1016_I2S_MS_M (0x0 << 3)
#define RT1016_I2S_MS_S (0x1 << 3)
#define RT1016_I2S_DF_MASK (0x7 << 0)
#define RT1016_I2S_DF_SFT 0
#define RT1016_I2S_DF_I2S (0x0)
#define RT1016_I2S_DF_LEFT (0x1)
#define RT1016_I2S_DF_PCM_A (0x2)
#define RT1016_I2S_DF_PCM_B (0x3)
/* 0xa0 */
#define RT1016_SIL_DET_EN (0x1 << 15)
#define RT1016_SIL_DET_EN_BIT 15
/* 0xc2 */
#define RT1016_CKGEN_DAC (0x1 << 13)
#define RT1016_CKGEN_DAC_BIT 13
/* 0xc4 */
#define RT1016_VCM_SLOW (0x1 << 6)
#define RT1016_VCM_SLOW_BIT 6
/* 0xc5 */
#define RT1016_PLL_M_MAX 0xf
#define RT1016_PLL_M_MASK (RT1016_PLL_M_MAX << 12)
#define RT1016_PLL_M_SFT 12
#define RT1016_PLL_M_BP (0x1 << 11)
#define RT1016_PLL_M_BP_SFT 11
#define RT1016_PLL_N_MAX 0x1ff
#define RT1016_PLL_N_MASK (RT1016_PLL_N_MAX << 0)
#define RT1016_PLL_N_SFT 0
/* 0xc6 */
#define RT1016_PLL2_EN (0x1 << 15)
#define RT1016_PLL2_EN_BIT 15
#define RT1016_PLL_K_BP (0x1 << 5)
#define RT1016_PLL_K_BP_SFT 5
#define RT1016_PLL_K_MAX 0x1f
#define RT1016_PLL_K_MASK (RT1016_PLL_K_MAX)
#define RT1016_PLL_K_SFT 0
/* 0xcf */
#define RT1016_PWR_BG_1_2 (0x1 << 12)
#define RT1016_PWR_BG_1_2_BIT 12
#define RT1016_PWR_MBIAS_BG (0x1 << 11)
#define RT1016_PWR_MBIAS_BG_BIT 11
#define RT1016_PWR_PLL (0x1 << 9)
#define RT1016_PWR_PLL_BIT 9
#define RT1016_PWR_BASIC (0x1 << 8)
#define RT1016_PWR_BASIC_BIT 8
#define RT1016_PWR_CLSD (0x1 << 7)
#define RT1016_PWR_CLSD_BIT 7
#define RT1016_PWR_25M (0x1 << 6)
#define RT1016_PWR_25M_BIT 6
#define RT1016_PWR_DACL (0x1 << 4)
#define RT1016_PWR_DACL_BIT 4
#define RT1016_PWR_DACR (0x1 << 3)
#define RT1016_PWR_DACR_BIT 3
#define RT1016_PWR_LDO2 (0x1 << 2)
#define RT1016_PWR_LDO2_BIT 2
#define RT1016_PWR_VREF (0x1 << 1)
#define RT1016_PWR_VREF_BIT 1
#define RT1016_PWR_MBIAS (0x1 << 0)
#define RT1016_PWR_MBIAS_BIT 0
/* System Clock Source */
enum {
RT1016_SCLK_S_MCLK,
RT1016_SCLK_S_PLL,
};
/* PLL1 Source */
enum {
RT1016_PLL_S_MCLK,
RT1016_PLL_S_BCLK,
};
enum {
RT1016_AIF1,
RT1016_AIFS,
};
struct rt1016_priv {
struct snd_soc_component *component;
struct regmap *regmap;
int sysclk;
int sysclk_src;
int lrck;
int bclk;
int master;
int pll_src;
int pll_in;
int pll_out;
};
#endif /* __RT1016_H__ */
|
{
"pile_set_name": "Github"
}
|
[@scale < 3000] {
mark: symbol(circle);
:mark {
fill: gray;
size: 5;
};
[type = 'important'] {
mark: symbol(triangle);
:mark {
fill: red;
stroke: yellow;
}
}
}
|
{
"pile_set_name": "Github"
}
|
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"
}
|
# 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"
}
|
# 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"
}
|
// 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"
}
|
/* -*- 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"
}
|
/*
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"
}
|
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"
}
|
/*
* 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 p(*this); p.appendPath(leaf); return p; }
String8 appendPathCopy(const String8& leaf) const { return appendPathCopy(leaf.string()); }
/*
* Converts all separators in this string to /, the default path separator.
*
* If the default OS separator is backslash, this converts all
* backslashes to slashes, in-place. Otherwise it does nothing.
* Returns self.
*/
String8& convertToResPath();
private:
status_t real_append(const char* other, size_t numChars);
char* find_extension(void) const;
const char* mString;
};
// String8 can be trivially moved using memcpy() because moving does not
// require any change to the underlying SharedBuffer contents or reference count.
ANDROID_TRIVIAL_MOVE_TRAIT(String8)
TextOutput& operator<<(TextOutput& to, const String16& val);
// ---------------------------------------------------------------------------
// No user servicable parts below.
inline int compare_type(const String8& lhs, const String8& rhs)
{
return lhs.compare(rhs);
}
inline int strictly_order_type(const String8& lhs, const String8& rhs)
{
return compare_type(lhs, rhs) < 0;
}
inline const String8 String8::empty() {
return String8();
}
inline const char* String8::string() const
{
return mString;
}
inline size_t String8::length() const
{
return SharedBuffer::sizeFromData(mString)-1;
}
inline size_t String8::size() const
{
return length();
}
inline bool String8::isEmpty() const
{
return length() == 0;
}
inline size_t String8::bytes() const
{
return SharedBuffer::sizeFromData(mString)-1;
}
inline const SharedBuffer* String8::sharedBuffer() const
{
return SharedBuffer::bufferFromData(mString);
}
inline String8& String8::operator=(const String8& other)
{
setTo(other);
return *this;
}
inline String8& String8::operator=(const char* other)
{
setTo(other);
return *this;
}
inline String8& String8::operator+=(const String8& other)
{
append(other);
return *this;
}
inline String8 String8::operator+(const String8& other) const
{
String8 tmp(*this);
tmp += other;
return tmp;
}
inline String8& String8::operator+=(const char* other)
{
append(other);
return *this;
}
inline String8 String8::operator+(const char* other) const
{
String8 tmp(*this);
tmp += other;
return tmp;
}
inline int String8::compare(const String8& other) const
{
return strcmp(mString, other.mString);
}
inline bool String8::operator<(const String8& other) const
{
return strcmp(mString, other.mString) < 0;
}
inline bool String8::operator<=(const String8& other) const
{
return strcmp(mString, other.mString) <= 0;
}
inline bool String8::operator==(const String8& other) const
{
return strcmp(mString, other.mString) == 0;
}
inline bool String8::operator!=(const String8& other) const
{
return strcmp(mString, other.mString) != 0;
}
inline bool String8::operator>=(const String8& other) const
{
return strcmp(mString, other.mString) >= 0;
}
inline bool String8::operator>(const String8& other) const
{
return strcmp(mString, other.mString) > 0;
}
inline bool String8::operator<(const char* other) const
{
return strcmp(mString, other) < 0;
}
inline bool String8::operator<=(const char* other) const
{
return strcmp(mString, other) <= 0;
}
inline bool String8::operator==(const char* other) const
{
return strcmp(mString, other) == 0;
}
inline bool String8::operator!=(const char* other) const
{
return strcmp(mString, other) != 0;
}
inline bool String8::operator>=(const char* other) const
{
return strcmp(mString, other) >= 0;
}
inline bool String8::operator>(const char* other) const
{
return strcmp(mString, other) > 0;
}
inline String8::operator const char*() const
{
return mString;
}
} // namespace android
// ---------------------------------------------------------------------------
#endif // ANDROID_STRING8_H
|
{
"pile_set_name": "Github"
}
|
#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"
}
|
| 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"
}
|
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"
}
|
[
["", ""],
["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"
}
|
# -*- 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"
}
|
// 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"
}
|
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"
}
|
**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"
}
|
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"
}
|
/*****************************************************************************
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"
}
|
<?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"
}
|
#ifndef _H8300_SIGINFO_H
#define _H8300_SIGINFO_H
#include <asm-generic/siginfo.h>
#endif
|
{
"pile_set_name": "Github"
}
|
/**
* $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"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.