text
stringlengths
2
99k
meta
dict
package option type Interface interface { Name() string Value() interface{} } type Option struct { name string value interface{} } func New(name string, value interface{}) *Option { return &Option{ name: name, value: value, } } func (o *Option) Name() string { return o.name } func (o *Option) Value() interface{} { return o.value }
{ "pile_set_name": "Github" }
%module(directors="1") director_frob; #pragma SWIG nowarn=SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR #ifdef SWIGSCILAB %rename(cb) coreCallbacks; %rename(On3dEngRedrawn) coreCallbacksOn3dEngineRedrawnData; %rename (_On3dEngRedrawn) coreCallbacks_On3dEngineRedrawnData; #endif %header %{ #include <iostream> %} %feature("director"); %feature("nodirector") Bravo::abs_method(); // ok %feature("director") Charlie::abs_method(); // ok %feature("nodirector") Delta::abs_method(); // ok %inline %{ struct Alpha { virtual ~Alpha() { }; virtual const char* abs_method() = 0; }; struct Bravo : Alpha { const char* abs_method() { return "Bravo::abs_method()"; } }; struct Charlie : Bravo { const char* abs_method() { return "Charlie::abs_method()"; } }; struct Delta : Charlie { }; %} %rename(OpInt) operator int(); %rename(OpIntStarStarConst) operator int **() const; %rename(OpIntAmp) operator int &(); %rename(OpIntStar) operator void *(); %rename(OpConstIntIntStar) operator const int *(); %inline %{ class Ops { public: Ops() : num(0) {} virtual ~Ops() {} #if !defined(__SUNPRO_CC) virtual operator int() { return 0; } #endif virtual operator int **() const { return (int **) 0; } virtual operator int &() { return num; } virtual operator void *() { return (void *) this; } virtual operator const int *() { return &num; } private: int num; }; struct Prims { virtual ~Prims() {} virtual unsigned long long ull(unsigned long long i, unsigned long long j) { return i + j; } unsigned long long callull(int i, int j) { return ull(i, j); } }; %} // The similarity of the director class name and other symbol names were causing a problem in the code generation %feature("director") coreCallbacks; %inline %{ class corePoint3d {}; struct coreCallbacks_On3dEngineRedrawnData { corePoint3d _eye; corePoint3d _at; }; struct coreCallbacksOn3dEngineRedrawnData { corePoint3d _eye; corePoint3d _at; }; class coreCallbacks { public: coreCallbacks(void) {} virtual ~coreCallbacks(void) {} virtual void On3dEngineRedrawn(const coreCallbacks_On3dEngineRedrawnData& data){} virtual void On3dEngineRedrawn2(const coreCallbacksOn3dEngineRedrawnData& data){} }; %}
{ "pile_set_name": "Github" }
package hydrograph.engine.spark.components.handler import java.util.ArrayList import hydrograph.engine.core.component.entity.elements.{MapField, Operation, PassThroughField} import hydrograph.engine.expression.api.ValidationAPI import hydrograph.engine.spark.core.reusablerow.{InputReusableRow, OutputReusableRow, RowToReusableMapper} import hydrograph.engine.transformation.userfunctions.base.ReusableRow import org.apache.spark.sql.Row import org.apache.spark.sql.types.StructType import scala.collection.JavaConverters.asScalaBufferConverter import scala.reflect.ClassTag import hydrograph.engine.spark.components.utils.EncoderHelper /** * The Class SparkOperation. * * @author Bitwise * */ case class SparkOperation[T](baseClassInstance: T, operationEntity: Operation, inputRow: InputReusableRow, outputRow: OutputReusableRow, validatioinAPI: ValidationAPI, initalValue: String,operationOutFields:Array[String],fieldName:Array[String],fieldType:Array[String]) trait OperationHelper[T] { def initializeOperationList[U](operationList: java.util.List[Operation], inputSchema: StructType, outputSchema: StructType)(implicit ct: ClassTag[U]): List[SparkOperation[T]] = { def populateOperation(operationList: List[Operation]): List[SparkOperation[T]] = (operationList) match { case (List()) => List() case (x :: xs) if x.isExpressionPresent => { val tf = classLoader[T](ct.runtimeClass.getCanonicalName) val fieldName=new Array[String](x.getOperationInputFields.length) val fieldType=new Array[String](x.getOperationInputFields.length) x.getOperationInputFields.zipWithIndex.foreach(s=>{ fieldName(s._2)=inputSchema(s._1).name; fieldType(s._2)=inputSchema(s._1).dataType.typeName }) SparkOperation[T](tf, x, InputReusableRow(null, new RowToReusableMapper(inputSchema, x .getOperationInputFields)), getOutputReusableRow(outputSchema, x),new ValidationAPI(x.getExpression, "") , x.getAccumulatorInitialValue,x.getOperationOutputFields,fieldName,fieldType) :: populateOperation(xs) } case (x :: xs) => { val tf = classLoader[T](x.getOperationClass) SparkOperation[T](tf, x, InputReusableRow(null, new RowToReusableMapper(inputSchema, x .getOperationInputFields)), getOutputReusableRow(outputSchema, x), null, null,null,null,null) :: populateOperation(xs) } } if (operationList != null) { populateOperation(operationList.asScala.toList) } else List() } def initializeOperationList[U](operationList: java.util.List[Operation], inputSchema: StructType)(implicit ct: ClassTag[U]): List[SparkOperation[T]] = { def populateOperation(operationList: List[Operation]): List[SparkOperation[T]] = (operationList) match { case (List()) => List() case (x :: xs) if x.isExpressionPresent => { val tf = classLoader[T](ct.runtimeClass.getCanonicalName) val fieldName = new Array[String](x.getOperationInputFields.length) val fieldType = new Array[String](x.getOperationInputFields.length) x.getOperationInputFields.zipWithIndex.foreach(s => { fieldName(s._2) = inputSchema(s._1).name; fieldType(s._2) = inputSchema(s._1).dataType.typeName }) val (in, out) = getReusableRows(x, inputSchema) SparkOperation[T](tf, x, in, out, new ValidationAPI(x.getExpression, ""), x.getAccumulatorInitialValue, x.getOperationOutputFields, fieldName, fieldType) :: populateOperation(xs) } case (x :: xs) => { val tf = classLoader[T](x.getOperationClass) val (in, out) = getReusableRows(x, inputSchema) SparkOperation[T](tf, x, in, out, null, null, null, null, null) :: populateOperation(xs) } } if (operationList != null) { populateOperation(operationList.asScala.toList) } else List() } def getReusableRows(op: Operation, inputSchema: StructType): (InputReusableRow, OutputReusableRow) = { val out = if (op.getOperationFields != null) OutputReusableRow(null, new RowToReusableMapper(EncoderHelper().getEncoder(op.getOperationFields), op .getOperationOutputFields)) else OutputReusableRow(null, new RowToReusableMapper(new StructType(), Array[String]())) val in = if (op.getOperationInputFields != null) InputReusableRow(null, new RowToReusableMapper(getPartialSchema(inputSchema, op.getOperationInputFields), op .getOperationInputFields)) else InputReusableRow(null, new RowToReusableMapper(new StructType(), Array[String]())) println(op.getOperationId + "**********inschema" + getPartialSchema(inputSchema, op.getOperationInputFields) ) println(op.getOperationId + "**********outschema" + EncoderHelper().getEncoder(op.getOperationFields) ) (in, out) } def getPartialSchema(schema: StructType, requiredFields: Array[String]): StructType = { var outSchema = new StructType(); requiredFields.foreach(field => outSchema = outSchema.add(schema(field))) outSchema } def getOutputReusableRow[U](outputSchema: StructType, x: Operation): OutputReusableRow = { if (x .getOperationOutputFields != null) OutputReusableRow(null, new RowToReusableMapper(outputSchema, x .getOperationOutputFields)) else null } def classLoader[T](className: String): T = { val clazz = Class.forName(className).getDeclaredConstructors clazz(0).setAccessible(true) clazz(0).newInstance().asInstanceOf[T] } implicit def arrayToList(arr: Array[String]): ArrayList[String] = { val lst = new ArrayList[String]() arr.foreach(v => lst.add(v)) lst } def getMapSourceFields(mapfields: List[MapField], inSocketId: String): Array[String] = mapfields.filter { x => x.getInSocketId.equals(inSocketId) }.map { x => x.getSourceName }.toArray[String] def getMapTargetFields(mapfields: List[MapField], inSocketId: String): Array[String] = mapfields.filter { x => x.getInSocketId.equals(inSocketId) }.map { x => x.getName }.toArray[String] def getPassthroughSourceFields(passthroughfields: List[PassThroughField], inSocketId: String): Array[String] = passthroughfields.filter { x => x.getInSocketId.equals(inSocketId) }.map { x => x.getName }.toArray[String] def getIndexes(firstSchema: StructType, secondSchema: StructType, fields: Array[String]): Array[(Int, Int)] = fields.map { field => (firstSchema.fieldIndex(field), secondSchema.fieldIndex(field)) } def getIndexes(firstSchema: StructType, fields: Array[String]): Array[(Int, Int)] = fields.zipWithIndex.map { field => (firstSchema.fieldIndex(field._1),field._2 ) } def getIndexes(firstSchema: StructType, secondSchema: StructType, firstFields: Array[String], secondFields: Array[String]): Array[(Int, Int)] = firstFields.zip(secondFields).map { pair => (firstSchema.fieldIndex(pair._1), secondSchema.fieldIndex(pair._2)) } def copyFields(input: ReusableRow, output: ReusableRow): Unit = { for (index <- 0 until input.getFieldNames.size()) { output.setField(index, input.getField(index)) } } def copyFields(input: Row, output: Array[Any], indexes: Array[(Int, Int)]): Unit = { indexes.foreach(pair => output(pair._2) = input.get(pair._1)) } }
{ "pile_set_name": "Github" }
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts index c0150b7..2c6c84f 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts @@ -148,6 +185,20 @@ status = "okay"; }; +&de { + status = "okay"; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + &pio { vcc-pc-supply = <&reg_bldo2>; vcc-pd-supply = <&reg_cldo1>;
{ "pile_set_name": "Github" }
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // While it's not (currently) necessary, add some noise here to push down token // positions in this file compared to the file regress_34841_lib.dart. // This is to ensure that any possible tokens in that file are just comments // (i.e. not actual) positions in this file. import 'package:observatory/service_io.dart'; import 'package:test/test.dart'; import 'test_helper.dart'; import 'service_test_common.dart'; import 'dart:developer'; import 'regress_34841_lib.dart'; class Bar extends Object with Foo {} void testFunction() { Bar bar = new Bar(); print(bar.foo); print(bar.baz()); debugger(); } var tests = <IsolateTest>[ hasStoppedAtBreakpoint, (Isolate isolate) async { var stack = await isolate.getStack(); // Make sure we are in the right place. expect(stack.type, equals('Stack')); expect(stack['frames'].length, greaterThanOrEqualTo(1)); expect(stack['frames'][0].function.name, equals('testFunction')); var root = isolate.rootLibrary; await root.load(); Script script = root.scripts.first; await script.load(); var params = { 'reports': ['Coverage'], 'scriptId': script.id, 'forceCompile': true }; var report = await isolate.invokeRpcNoUpgrade('getSourceReport', params); List<dynamic> ranges = report['ranges']; List<int> coveragePlaces = <int>[]; for (var range in ranges) { for (int i in range["coverage"]["hits"]) { coveragePlaces.add(i); } for (int i in range["coverage"]["misses"]) { coveragePlaces.add(i); } } // Make sure we can translate it all. for (int place in coveragePlaces) { int line = script.tokenToLine(place); int column = script.tokenToCol(place); if (line == null || column == null) { throw "Token $place translated to $line:$column"; } } }, ]; main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
{ "pile_set_name": "Github" }
# Exported using automatic converter by Erwin Coumans mtllib bedroom.mtl #object Box02 v 129.648697 154.367706 14.670700 v 126.362198 154.367706 14.670700 v 126.362198 157.184296 14.670700 v 129.648697 155.818893 14.670700 v 129.648697 155.304703 14.670700 v 129.648697 156.247299 14.670700 v 129.648697 155.733200 14.670700 v 129.648697 157.184296 14.670700 v 126.758102 157.869095 23.982300 v 126.768402 155.145203 23.982300 v 129.691803 155.145203 23.982300 v 129.681503 157.869095 23.982300 v 125.957802 154.025696 15.129500 v 125.957802 154.025696 14.526300 v 130.502396 154.025696 14.526300 v 130.502396 154.025696 15.129500 v 125.957802 157.869095 15.129500 v 125.957802 157.869095 14.526300 v 125.957802 154.025696 14.526300 v 125.957802 154.025696 15.129500 v 130.502396 157.869095 15.129500 v 130.502396 157.869095 14.526300 v 125.957802 157.869095 14.526300 v 125.957802 157.869095 15.129500 v 130.502396 154.025696 15.129500 v 130.502396 154.025696 14.526300 v 130.502396 157.869095 14.526300 v 130.502396 157.869095 15.129500 v 126.768402 155.145203 15.129500 v 125.957802 154.025696 15.129500 v 130.502396 154.025696 15.129500 v 129.691803 155.145203 15.129500 v 126.758102 157.869095 15.129500 v 125.957802 157.869095 15.129500 v 125.957802 154.025696 15.129500 v 129.681503 157.869095 15.129500 v 130.502396 157.869095 15.129500 v 125.957802 157.869095 15.129500 v 126.758102 157.869095 15.129500 v 130.502396 154.025696 15.129500 v 130.502396 157.869095 15.129500 v 129.681503 157.869095 15.129500 v 126.768402 155.145203 23.481199 v 126.768402 155.145203 22.757401 v 126.768402 155.145203 15.129500 v 126.768402 155.145203 23.481199 v 126.768402 155.145203 15.129500 v 129.691803 155.145203 15.129500 v 126.768402 155.145203 23.982300 v 126.768402 155.145203 23.481199 v 129.691803 155.145203 15.129500 v 129.691803 155.145203 23.982300 v 126.768402 155.145203 23.481199 v 126.768402 155.145203 23.982300 v 126.758102 157.869095 23.982300 v 126.767403 155.417603 23.481199 v 126.766403 155.690002 23.481199 v 126.765404 155.962402 23.481199 v 126.766403 155.690002 23.481199 v 126.758102 157.869095 23.982300 v 126.764297 156.234695 23.481199 v 126.765404 155.962402 23.481199 v 126.763298 156.507095 23.481199 v 126.762299 156.779495 23.481199 v 126.763298 156.507095 23.481199 v 126.761200 157.051895 23.481199 v 126.762299 156.779495 23.481199 v 126.760201 157.324295 23.481199 v 126.761200 157.051895 23.481199 v 126.759201 157.596695 23.481199 v 126.760201 157.324295 23.481199 v 126.758102 157.869095 23.481199 v 129.681503 157.869095 23.982300 v 129.681503 157.869095 15.129500 v 126.758102 157.869095 15.129500 v 126.758102 157.869095 22.757401 v 126.758102 157.869095 23.481199 v 126.758102 157.869095 23.982300 v 126.758102 157.869095 22.757401 v 126.758102 157.869095 23.982300 v 129.681503 157.869095 23.982300 v 126.758102 157.869095 15.129500 v 129.691803 155.145203 23.982300 v 129.691803 155.145203 15.129500 v 129.681503 157.869095 15.129500 v 129.681503 157.869095 15.129500 v 129.681503 157.869095 23.982300 v 129.691803 155.145203 23.982300 v 130.199402 157.270004 14.526300 v 130.502396 157.869095 14.526300 v 130.502396 154.025696 14.526300 v 130.502396 154.025696 14.526300 v 130.199402 154.281998 14.526300 v 130.199402 157.270004 14.526300 v 126.260902 157.270004 14.526300 v 125.957802 157.869095 14.526300 v 130.502396 157.869095 14.526300 v 130.199402 157.270004 14.526300 v 126.260902 154.281998 14.526300 v 125.957802 154.025696 14.526300 v 125.957802 157.869095 14.526300 v 125.957802 157.869095 14.526300 v 126.260902 157.270004 14.526300 v 126.260902 154.281998 14.526300 v 130.199402 154.281998 14.526300 v 130.502396 154.025696 14.526300 v 125.957802 154.025696 14.526300 v 130.199402 157.270004 14.598500 v 130.199402 157.270004 14.526300 v 130.199402 154.281998 14.526300 v 130.199402 154.281998 14.598500 v 126.260902 157.270004 14.598500 v 126.260902 157.270004 14.526300 v 130.199402 157.270004 14.526300 v 130.199402 157.270004 14.598500 v 126.260902 154.281998 14.598500 v 126.260902 154.281998 14.526300 v 126.260902 157.270004 14.526300 v 126.260902 157.270004 14.598500 v 130.199402 154.281998 14.598500 v 130.199402 154.281998 14.526300 v 126.260902 154.281998 14.526300 v 126.260902 154.281998 14.598500 v 130.098007 157.184296 14.598500 v 130.199402 157.270004 14.598500 v 130.199402 154.281998 14.598500 v 130.199402 154.281998 14.598500 v 130.098007 154.367706 14.598500 v 130.098007 157.184296 14.598500 v 126.362198 157.184296 14.598500 v 126.260902 157.270004 14.598500 v 130.199402 157.270004 14.598500 v 130.098007 157.184296 14.598500 v 126.362198 154.367706 14.598500 v 126.260902 154.281998 14.598500 v 126.260902 157.270004 14.598500 v 126.260902 157.270004 14.598500 v 126.362198 157.184296 14.598500 v 126.362198 154.367706 14.598500 v 130.098007 154.367706 14.598500 v 130.199402 154.281998 14.598500 v 126.260902 154.281998 14.598500 v 129.648697 154.367706 14.598500 v 130.098007 154.367706 14.598500 v 126.260902 154.281998 14.598500 v 129.648697 154.367706 14.598500 v 130.098007 157.184296 14.670700 v 130.098007 157.184296 14.598500 v 130.098007 154.367706 14.598500 v 130.098007 155.733200 14.670700 v 130.098007 156.247299 14.670700 v 130.098007 155.304703 14.670700 v 130.098007 155.818893 14.670700 v 130.098007 154.367706 14.670700 v 126.362198 157.184296 14.670700 v 126.362198 157.184296 14.598500 v 130.098007 157.184296 14.598500 v 129.648697 157.184296 14.670700 v 130.098007 157.184296 14.670700 v 126.362198 154.367706 14.670700 v 126.362198 154.367706 14.598500 v 126.362198 157.184296 14.598500 v 126.362198 157.184296 14.670700 v 126.362198 154.367706 14.670700 v 129.648697 154.367706 14.670700 v 129.648697 154.367706 14.598500 v 126.362198 154.367706 14.598500 v 130.098007 154.367706 14.670700 v 130.098007 154.367706 14.598500 v 130.098007 155.304703 14.670700 v 130.098007 154.367706 14.670700 v 130.098007 157.184296 14.670700 v 130.098007 156.247299 14.670700 v 129.795502 155.891800 14.960000 v 130.011993 155.891800 14.960000 v 130.011993 155.660294 14.960000 v 129.795502 155.660294 14.960000 v 130.011993 155.660294 14.658200 v 130.098007 155.561798 14.658200 v 129.648697 155.561798 14.658200 v 129.795502 155.660294 14.658200 v 130.011993 155.891800 14.658200 v 130.098007 155.990204 14.658200 v 129.795502 155.891800 14.658200 v 129.648697 155.990204 14.658200 v 130.011993 155.660294 14.960000 v 130.011993 155.660294 14.670700 v 129.795502 155.660294 14.670700 v 129.795502 155.660294 14.960000 v 130.011993 155.891800 14.960000 v 130.011993 155.891800 14.670700 v 130.011993 155.660294 14.670700 v 130.011993 155.660294 14.960000 v 129.795502 155.891800 14.960000 v 129.795502 155.891800 14.670700 v 130.011993 155.891800 14.670700 v 130.011993 155.891800 14.960000 v 129.795502 155.660294 14.960000 v 129.795502 155.660294 14.670700 v 129.795502 155.891800 14.670700 v 129.795502 155.891800 14.960000 v 130.098007 155.561798 14.658200 v 129.648697 155.561798 14.658200 v 130.098007 155.990204 14.658200 v 130.098007 155.561798 14.658200 v 130.098007 155.990204 14.658200 v 130.098007 155.818893 14.670700 v 129.648697 155.990204 14.658200 v 129.648697 155.561798 14.658200 v 129.648697 155.818893 14.670700 v 129.648697 155.733200 14.670700 v 129.795502 155.660294 14.658200 v 130.011993 155.660294 14.658200 v 129.795502 155.891800 14.658200 v 129.795502 155.660294 14.658200 v 130.011993 155.891800 14.658200 v 129.795502 155.891800 14.658200 v 130.011993 155.660294 14.658200 v 130.011993 155.891800 14.658200 v 126.758102 157.869095 22.757401 v 126.758102 157.869095 15.129500 v 126.768402 155.145203 15.129500 v 126.759201 157.596695 22.757401 v 126.758102 157.869095 22.757401 v 126.768402 155.145203 15.129500 v 126.760201 157.324295 22.757401 v 126.759201 157.596695 22.757401 v 126.761200 157.051895 22.757401 v 126.760201 157.324295 22.757401 v 126.762299 156.779495 22.757401 v 126.761200 157.051895 22.757401 v 126.763298 156.507095 22.757401 v 126.762299 156.779495 22.757401 v 126.764297 156.234695 22.757401 v 126.763298 156.507095 22.757401 v 126.765404 155.962402 22.757401 v 126.764297 156.234695 22.757401 v 126.766403 155.690002 22.757401 v 126.767403 155.417603 22.757401 v 126.766403 155.690002 22.757401 v 126.768402 155.145203 22.757401 v 130.098007 155.304703 14.670700 v 129.648697 155.818893 14.670700 v 129.648697 155.304703 14.670700 v 130.098007 155.733200 14.670700 v 130.098007 156.247299 14.670700 v 129.648697 156.247299 14.670700 v 130.098007 155.304703 14.670700 v 129.648697 155.304703 14.670700 v 129.648697 155.561798 14.658200 v 130.098007 155.561798 14.658200 v 129.648697 156.247299 14.670700 v 130.098007 156.247299 14.670700 v 130.098007 155.990204 14.658200 v 129.648697 155.990204 14.658200 v 126.767403 155.417603 22.757401 v 126.768402 155.145203 22.757401 v 126.768402 155.145203 23.481199 v 126.760902 157.128998 23.372700 v 126.760498 157.247192 23.372700 v 126.760902 157.128998 22.865900 v 126.760498 157.247192 22.865900 v 126.760902 157.128998 22.865900 v 126.760498 157.247192 22.865900 v 126.760498 157.247192 23.372700 v 126.762001 156.856598 23.372700 v 126.761497 156.974792 23.372700 v 126.762001 156.856598 22.865900 v 126.762001 156.856598 23.372700 v 126.762001 156.856598 22.865900 v 126.761497 156.974792 22.865900 v 126.761497 156.974792 22.865900 v 126.761497 156.974792 23.372700 v 126.763000 156.584198 23.372700 v 126.762604 156.702393 23.372700 v 126.763000 156.584198 23.372700 v 126.763000 156.584198 22.865900 v 126.762604 156.702393 22.865900 v 126.762604 156.702393 22.865900 v 126.764000 156.311798 23.372700 v 126.764297 156.234695 23.481199 v 126.763603 156.430099 23.372700 v 126.764000 156.311798 23.372700 v 126.764000 156.311798 22.865900 v 126.764000 156.311798 22.865900 v 126.763603 156.430099 22.865900 v 126.765099 156.039398 23.372700 v 126.764603 156.157700 23.372700 v 126.765099 156.039398 23.372700 v 126.765099 156.039398 22.865900 v 126.765404 155.962402 22.757401 v 126.764603 156.157700 22.865900 v 126.764603 156.157700 22.865900 v 126.764603 156.157700 23.372700 v 126.766098 155.766998 23.372700 v 126.765602 155.885300 23.372700 v 126.766098 155.766998 23.372700 v 126.766098 155.766998 22.865900 v 126.766098 155.766998 22.865900 v 126.765602 155.885300 22.865900 v 126.765602 155.885300 22.865900 v 126.765602 155.885300 23.372700 v 126.783897 156.311905 23.372700 v 126.764000 156.311798 23.372700 v 126.763603 156.430099 23.372700 v 126.783401 156.430099 23.372700 v 126.783897 156.311905 22.865900 v 126.764000 156.311798 22.865900 v 126.764000 156.311798 23.372700 v 126.783897 156.311905 23.372700 v 126.783401 156.430099 22.865900 v 126.763603 156.430099 22.865900 v 126.764000 156.311798 22.865900 v 126.783897 156.311905 22.865900 v 126.783401 156.430099 23.372700 v 126.763603 156.430099 23.372700 v 126.763603 156.430099 22.865900 v 126.783401 156.430099 22.865900 v 126.780800 157.128998 23.372700 v 126.760902 157.128998 23.372700 v 126.760498 157.247192 23.372700 v 126.780296 157.247299 23.372700 v 126.780800 157.128998 22.865900 v 126.760902 157.128998 22.865900 v 126.760902 157.128998 23.372700 v 126.780800 157.128998 23.372700 v 126.780296 157.247299 22.865900 v 126.760498 157.247192 22.865900 v 126.760902 157.128998 22.865900 v 126.780800 157.128998 22.865900 v 126.780296 157.247299 23.372700 v 126.760498 157.247192 23.372700 v 126.760498 157.247192 22.865900 v 126.760498 157.247192 22.865900 v 126.780296 157.247299 22.865900 v 126.780296 157.247299 23.372700 v 126.781799 156.856598 23.372700 v 126.762001 156.856598 23.372700 v 126.761497 156.974792 23.372700 v 126.781403 156.974899 23.372700 v 126.781799 156.856598 22.865900 v 126.762001 156.856598 22.865900 v 126.762001 156.856598 23.372700 v 126.781799 156.856598 23.372700 v 126.781403 156.974899 22.865900 v 126.761497 156.974792 22.865900 v 126.762001 156.856598 22.865900 v 126.781799 156.856598 22.865900 v 126.781403 156.974899 23.372700 v 126.761497 156.974792 23.372700 v 126.761497 156.974792 22.865900 v 126.781403 156.974899 22.865900 v 126.782898 156.584305 23.372700 v 126.763000 156.584198 23.372700 v 126.762604 156.702393 23.372700 v 126.782402 156.702499 23.372700 v 126.782898 156.584305 22.865900 v 126.763000 156.584198 22.865900 v 126.763000 156.584198 23.372700 v 126.763000 156.584198 23.372700 v 126.782898 156.584305 23.372700 v 126.782898 156.584305 22.865900 v 126.782402 156.702499 22.865900 v 126.762604 156.702393 22.865900 v 126.763000 156.584198 22.865900 v 126.782898 156.584305 22.865900 v 126.782402 156.702499 23.372700 v 126.762604 156.702393 23.372700 v 126.762604 156.702393 22.865900 v 126.762604 156.702393 22.865900 v 126.782402 156.702499 22.865900 v 126.782402 156.702499 23.372700 v 126.785896 155.767105 23.372700 v 126.766098 155.766998 23.372700 v 126.765602 155.885300 23.372700 v 126.785500 155.885300 23.372700 v 126.785896 155.767105 22.865900 v 126.766098 155.766998 22.865900 v 126.766098 155.766998 23.372700 v 126.785896 155.767105 23.372700 v 126.785500 155.885300 22.865900 v 126.765602 155.885300 22.865900 v 126.766098 155.766998 22.865900 v 126.785896 155.767105 22.865900 v 126.785500 155.885300 23.372700 v 126.765602 155.885300 23.372700 v 126.765602 155.885300 22.865900 v 126.785500 155.885300 22.865900 v 126.784897 156.039505 23.372700 v 126.765099 156.039398 23.372700 v 126.764603 156.157700 23.372700 v 126.784500 156.157700 23.372700 v 126.784897 156.039505 22.865900 v 126.765099 156.039398 22.865900 v 126.765099 156.039398 23.372700 v 126.765099 156.039398 23.372700 v 126.784897 156.039505 23.372700 v 126.784897 156.039505 22.865900 v 126.784500 156.157700 22.865900 v 126.764603 156.157700 22.865900 v 126.765099 156.039398 22.865900 v 126.784897 156.039505 22.865900 v 126.784500 156.157700 23.372700 v 126.764603 156.157700 23.372700 v 126.764603 156.157700 22.865900 v 126.784500 156.157700 22.865900 usemtl wire_214229166 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 -1.000000 vn -1.000000 -0.000000 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn -0.996100 0.088200 0.000000 vn -0.996100 0.088200 0.000000 vn -0.996100 0.088200 0.000000 vn 0.000000 -1.000000 -0.000000 vn 0.000000 -1.000000 -0.000000 vn 0.000000 -1.000000 -0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 1.000000 0.003200 -0.000000 vn 1.000000 0.003200 -0.000000 vn 1.000000 0.003200 -0.000000 vn 1.000000 0.003200 0.000000 vn 1.000000 0.003200 0.000000 vn 1.000000 0.003200 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn 0.000000 -0.000000 -1.000000 vn 0.000000 -0.000000 -1.000000 vn 0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 -0.000000 -1.000000 vn 0.000000 -0.000000 -1.000000 vn 0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn -0.000000 -0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn -0.000000 0.000000 -1.000000 vn 0.000000 -0.000000 -1.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn -0.000000 1.000000 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -0.000000 -1.000000 0.000000 vn -0.000000 -1.000000 0.000000 vn -0.000000 -1.000000 0.000000 vn -0.000000 -1.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn -0.000000 -1.000000 0.000000 vn -0.000000 -1.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn 1.000000 0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000 vn -1.000000 -0.000000 0.000000 vn -0.000000 -0.034700 -0.999400 vn -0.000000 -0.034700 -0.999400 vn -0.000000 -0.034700 -0.999400 vn -0.000000 -0.034700 -0.999400 vn 0.000000 0.034700 -0.999400 vn 0.000000 0.034700 -0.999400 vn 0.000000 0.034700 -0.999400 vn 0.000000 0.034700 -0.999400 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 0.000000 vn -1.000000 -0.003200 -0.000000 vn -1.000000 -0.003200 -0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn 0.000000 -0.000000 1.000000 vn 0.000000 -0.000000 1.000000 vn 0.000000 -0.000000 1.000000 vn 0.000000 -0.000000 1.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.003200 -1.000000 -0.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 0.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn -0.003200 1.000000 -0.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.000000 0.000000 1.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vn 0.003200 -1.000000 0.000000 vt 0.500000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 0.500000 0.515200 vt 0.500000 0.332700 vt 0.500000 0.667300 vt 0.500000 0.484800 vt 0.500000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 1.000000 0.100000 vt 1.000000 0.200000 vt 1.000000 0.300000 vt 1.000000 0.200000 vt 1.000000 1.000000 vt 1.000000 0.400000 vt 1.000000 0.300000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.500000 vt 1.000000 0.700000 vt 1.000000 0.600000 vt 1.000000 0.800000 vt 1.000000 0.700000 vt 1.000000 0.900000 vt 1.000000 0.800000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 vt 1.000000 1.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.500000 0.000000 vt 1.000000 0.000000 vt 0.000000 0.000000 vt 0.500000 0.000000 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.484800 vt 1.000000 0.667300 vt 1.000000 0.332700 vt 1.000000 0.515200 vt 1.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 1.000000 1.000000 vt 0.500000 1.000000 vt 1.000000 1.000000 vt 0.000000 0.000000 vt 0.000000 0.000000 vt 0.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 vt 0.500000 0.000000 vt 0.500000 0.000000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.332700 vt 1.000000 0.000000 vt 1.000000 1.000000 vt 1.000000 0.667300 vt 0.500000 0.576100 vt 1.000000 0.576100 vt 1.000000 0.423900 vt 0.500000 0.423900 vt 1.000000 0.423900 vt 1.000000 0.423900 vt 0.500000 0.423900 vt 0.500000 0.423900 vt 1.000000 0.576100 vt 1.000000 0.576100 vt 0.500000 0.576100 vt 0.500000 0.576100 vt 1.000000 0.423900 vt 1.000000 0.423900 vt 0.500000 0.423900 vt 0.500000 0.423900 vt 1.000000 0.576100 vt 1.000000 0.576100 vt 1.000000 0.423900 vt 1.000000 0.423900 vt 0.500000 0.576100 vt 0.500000 0.576100 vt 1.000000 0.576100 vt 1.000000 0.576100 vt 0.500000 0.423900 vt 0.500000 0.423900 vt 0.500000 0.576100 vt 0.500000 0.576100 vt 1.000000 0.423900 vt 0.500000 0.423900 vt 1.000000 0.576100 vt 1.000000 0.423900 vt 1.000000 0.576100 vt 1.000000 0.515200 vt 0.500000 0.576100 vt 0.500000 0.423900 vt 0.500000 0.515200 vt 0.500000 0.484800 vt 0.500000 0.423900 vt 1.000000 0.423900 vt 0.500000 0.576100 vt 0.500000 0.423900 vt 1.000000 0.576100 vt 0.500000 0.576100 vt 1.000000 0.423900 vt 1.000000 0.576100 vt 1.000000 1.000000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.900000 vt 1.000000 1.000000 vt 1.000000 0.000000 vt 1.000000 0.800000 vt 1.000000 0.900000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.600000 vt 1.000000 0.700000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.400000 vt 1.000000 0.500000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.200000 vt 1.000000 0.100000 vt 1.000000 0.200000 vt 1.000000 0.000000 vt 1.000000 0.332700 vt 0.500000 0.515200 vt 0.500000 0.332700 vt 1.000000 0.484800 vt 1.000000 0.667300 vt 0.500000 0.667300 vt 1.000000 0.332700 vt 0.500000 0.332700 vt 0.500000 0.423900 vt 1.000000 0.423900 vt 0.500000 0.667300 vt 1.000000 0.667300 vt 1.000000 0.576100 vt 0.500000 0.576100 vt 1.000000 0.100000 vt 1.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.600000 vt 1.000000 0.700000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.500000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.500000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.200000 vt 1.000000 0.300000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.800000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.700000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.500000 vt 1.000000 0.500000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.600000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.200000 vt 1.000000 0.200000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.300000 vt 1.000000 0.300000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.400000 vt 1.000000 0.400000 s off f 1/1/1 2/2/2 3/3/3 f 4/4/4 5/5/5 1/1/1 f 6/6/6 7/7/7 4/4/4 f 6/6/6 4/4/4 1/1/1 f 6/6/6 1/1/1 3/3/3 f 6/6/6 3/3/3 8/8/8 f 9/9/9 10/10/10 11/11/11 f 11/11/11 12/12/12 9/9/9 f 13/13/13 14/14/14 15/15/15 f 15/15/15 16/16/16 13/13/13 f 17/17/17 18/18/18 19/19/19 f 19/19/19 20/20/20 17/17/17 f 21/21/21 22/22/22 23/23/23 f 23/23/23 24/24/24 21/21/21 f 25/25/25 26/26/26 27/27/27 f 27/27/27 28/28/28 25/25/25 f 29/29/29 30/30/30 31/31/31 f 31/31/31 32/32/32 29/29/29 f 33/33/33 34/34/34 35/35/35 f 35/35/35 29/29/29 33/33/33 f 36/36/36 37/37/37 38/38/38 f 38/38/38 39/39/39 36/36/36 f 32/32/32 40/40/40 41/41/41 f 41/41/41 42/42/42 32/32/32 f 43/43/43 44/44/44 45/45/45 f 46/46/46 47/47/47 48/48/48 f 49/49/49 50/50/50 51/51/51 f 52/52/52 49/49/49 51/51/51 f 53/53/53 54/54/54 55/55/55 f 56/56/56 53/53/53 55/55/55 f 57/57/57 56/56/56 55/55/55 f 58/58/58 59/59/59 60/60/60 f 61/61/61 62/62/62 55/55/55 f 63/63/63 61/61/61 55/55/55 f 64/64/64 65/65/65 60/60/60 f 66/66/66 67/67/67 55/55/55 f 68/68/68 69/69/69 60/60/60 f 70/70/70 71/71/71 55/55/55 f 70/70/70 55/55/55 72/72/72 f 73/73/73 74/74/74 75/75/75 f 76/76/76 77/77/77 78/78/78 f 79/79/79 80/80/80 81/81/81 f 79/79/79 81/81/81 82/82/82 f 83/83/83 84/84/84 85/85/85 f 86/86/86 87/87/87 88/88/88 f 89/89/89 90/90/90 91/91/91 f 92/92/92 93/93/93 94/94/94 f 95/95/95 96/96/96 97/97/97 f 97/97/97 98/98/98 95/95/95 f 99/99/99 100/100/100 101/101/101 f 102/102/102 103/103/103 104/104/104 f 105/105/105 106/106/106 107/107/107 f 107/107/107 99/99/99 105/105/105 f 108/108/108 109/109/109 110/110/110 f 110/110/110 111/111/111 108/108/108 f 112/112/112 113/113/113 114/114/114 f 114/114/114 115/115/115 112/112/112 f 116/116/116 117/117/117 118/118/118 f 118/118/118 119/119/119 116/116/116 f 120/120/120 121/121/121 122/122/122 f 122/122/122 123/123/123 120/120/120 f 124/124/124 125/125/125 126/126/126 f 127/127/127 128/128/128 129/129/129 f 130/130/130 131/131/131 132/132/132 f 132/132/132 133/133/133 130/130/130 f 134/134/134 135/135/135 136/136/136 f 137/137/137 138/138/138 139/139/139 f 140/140/140 141/141/141 142/142/142 f 143/143/143 144/144/144 145/145/145 f 134/134/134 146/146/146 135/135/135 f 147/147/147 148/148/148 149/149/149 f 150/150/150 151/151/151 147/147/147 f 152/152/152 153/153/153 150/150/150 f 152/152/152 150/150/150 147/147/147 f 152/152/152 147/147/147 149/149/149 f 154/154/154 152/152/152 149/149/149 f 155/155/155 156/156/156 157/157/157 f 158/158/158 155/155/155 157/157/157 f 159/159/159 158/158/158 157/157/157 f 160/160/160 161/161/161 162/162/162 f 162/162/162 163/163/163 160/160/160 f 164/164/164 165/165/165 166/166/166 f 166/166/166 167/167/167 164/164/164 f 165/165/165 168/168/168 169/169/169 f 169/169/169 166/166/166 165/165/165 f 5/5/5 170/170/170 171/171/171 f 171/171/171 1/1/1 5/5/5 f 6/6/6 8/8/8 172/172/172 f 172/172/172 173/173/173 6/6/6 f 174/174/174 175/175/175 176/176/176 f 176/176/176 177/177/177 174/174/174 f 178/178/178 179/179/179 180/180/180 f 180/180/180 181/181/181 178/178/178 f 182/182/182 183/183/183 179/179/179 f 179/179/179 178/178/178 182/182/182 f 184/184/184 185/185/185 183/183/183 f 183/183/183 182/182/182 184/184/184 f 181/181/181 180/180/180 185/185/185 f 185/185/185 184/184/184 181/181/181 f 186/186/186 187/187/187 188/188/188 f 188/188/188 189/189/189 186/186/186 f 190/190/190 191/191/191 192/192/192 f 192/192/192 193/193/193 190/190/190 f 194/194/194 195/195/195 196/196/196 f 196/196/196 197/197/197 194/194/194 f 198/198/198 199/199/199 200/200/200 f 200/200/200 201/201/201 198/198/198 f 202/202/202 202/202/202 203/203/203 f 203/203/203 203/203/203 202/202/202 f 204/204/204 150/150/150 153/153/153 f 204/204/204 204/204/204 153/153/153 f 205/205/205 206/206/206 207/207/207 f 202/202/202 153/153/153 202/202/202 f 208/208/208 208/208/208 204/204/204 f 204/204/204 204/204/204 208/208/208 f 209/209/209 210/210/210 211/211/211 f 203/203/203 203/203/203 7/7/7 f 208/208/208 203/203/203 7/7/7 f 208/208/208 7/7/7 208/208/208 f 212/212/212 188/188/188 187/187/187 f 187/187/187 213/213/213 212/212/212 f 214/214/214 200/200/200 199/199/199 f 199/199/199 215/215/215 214/214/214 f 216/216/216 196/196/196 195/195/195 f 195/195/195 217/217/217 216/216/216 f 218/218/218 192/192/192 191/191/191 f 191/191/191 219/219/219 218/218/218 f 220/220/220 221/221/221 222/222/222 f 223/223/223 224/224/224 225/225/225 f 226/226/226 227/227/227 222/222/222 f 228/228/228 229/229/229 225/225/225 f 230/230/230 231/231/231 222/222/222 f 232/232/232 233/233/233 225/225/225 f 234/234/234 235/235/235 222/222/222 f 236/236/236 237/237/237 225/225/225 f 238/238/238 236/236/236 225/225/225 f 239/239/239 240/240/240 222/222/222 f 239/239/239 222/222/222 241/241/241 f 205/205/205 207/207/207 242/242/242 f 243/243/243 203/203/203 244/244/244 f 245/245/245 206/206/206 246/246/246 f 208/208/208 7/7/7 247/247/247 f 248/248/248 249/249/249 250/250/250 f 250/250/250 251/251/251 248/248/248 f 252/252/252 253/253/253 254/254/254 f 254/254/254 255/255/255 252/252/252 f 70/70/70 72/72/72 220/220/220 f 70/70/70 220/220/220 227/227/227 f 71/71/71 70/70/70 227/227/227 f 71/71/71 227/227/227 226/226/226 f 256/256/256 257/257/257 258/258/258 f 239/239/239 53/53/53 56/56/56 f 240/240/240 239/239/239 56/56/56 f 240/240/240 56/56/56 57/57/57 f 259/259/259 66/66/66 71/71/71 f 71/71/71 260/260/260 259/259/259 f 261/261/261 231/231/231 66/66/66 f 66/66/66 259/259/259 261/261/261 f 262/262/262 226/226/226 231/231/231 f 228/228/228 263/263/263 264/264/264 f 260/260/260 71/71/71 226/226/226 f 229/229/229 264/264/264 265/265/265 f 266/266/266 64/64/64 69/69/69 f 69/69/69 267/267/267 266/266/266 f 268/268/268 233/233/233 64/64/64 f 67/67/67 269/269/269 270/270/270 f 271/271/271 231/231/231 230/230/230 f 233/233/233 268/268/268 272/272/272 f 273/273/273 66/66/66 231/231/231 f 231/231/231 271/271/271 273/273/273 f 274/274/274 63/63/63 67/67/67 f 64/64/64 275/275/275 276/276/276 f 277/277/277 235/235/235 63/63/63 f 63/63/63 274/274/274 277/277/277 f 278/278/278 233/233/233 232/232/232 f 235/235/235 277/277/277 279/279/279 f 275/275/275 64/64/64 233/233/233 f 233/233/233 278/278/278 275/275/275 f 280/280/280 281/281/281 65/65/65 f 63/63/63 282/282/282 283/283/283 f 284/284/284 237/237/237 281/281/281 f 61/61/61 283/283/283 285/285/285 f 286/286/286 235/235/235 234/234/234 f 234/234/234 285/285/285 286/286/286 f 282/282/282 63/63/63 235/235/235 f 235/235/235 286/286/286 282/282/282 f 287/287/287 58/58/58 281/281/281 f 61/61/61 288/288/288 289/289/289 f 290/290/290 291/291/291 62/62/62 f 62/62/62 289/289/289 290/290/290 f 292/292/292 237/237/237 236/236/236 f 291/291/291 290/290/290 293/293/293 f 294/294/294 281/281/281 237/237/237 f 234/234/234 293/293/293 288/288/288 f 295/295/295 59/59/59 58/58/58 f 62/62/62 296/296/296 297/297/297 f 298/298/298 240/240/240 57/57/57 f 59/59/59 295/295/295 299/299/299 f 300/300/300 291/291/291 240/240/240 f 240/240/240 298/298/298 300/300/300 f 296/296/296 62/62/62 291/291/291 f 236/236/236 301/301/301 302/302/302 f 303/303/303 304/304/304 305/305/305 f 305/305/305 306/306/306 303/303/303 f 307/307/307 308/308/308 309/309/309 f 309/309/309 310/310/310 307/307/307 f 311/311/311 312/312/312 313/313/313 f 313/313/313 314/314/314 311/311/311 f 315/315/315 316/316/316 317/317/317 f 317/317/317 318/318/318 315/315/315 f 319/319/319 320/320/320 321/321/321 f 321/321/321 322/322/322 319/319/319 f 323/323/323 324/324/324 325/325/325 f 325/325/325 326/326/326 323/323/323 f 327/327/327 328/328/328 329/329/329 f 329/329/329 330/330/330 327/327/327 f 331/331/331 332/332/332 333/333/333 f 334/334/334 335/335/335 336/336/336 f 337/337/337 338/338/338 339/339/339 f 339/339/339 340/340/340 337/337/337 f 341/341/341 342/342/342 343/343/343 f 343/343/343 344/344/344 341/341/341 f 345/345/345 346/346/346 347/347/347 f 347/347/347 348/348/348 345/345/345 f 349/349/349 350/350/350 351/351/351 f 351/351/351 352/352/352 349/349/349 f 353/353/353 354/354/354 355/355/355 f 355/355/355 356/356/356 353/353/353 f 357/357/357 358/358/358 359/359/359 f 360/360/360 361/361/361 362/362/362 f 363/363/363 364/364/364 365/365/365 f 365/365/365 366/366/366 363/363/363 f 367/367/367 368/368/368 369/369/369 f 370/370/370 371/371/371 372/372/372 f 373/373/373 374/374/374 375/375/375 f 375/375/375 376/376/376 373/373/373 f 377/377/377 378/378/378 379/379/379 f 379/379/379 380/380/380 377/377/377 f 381/381/381 382/382/382 383/383/383 f 383/383/383 384/384/384 381/381/381 f 385/385/385 386/386/386 387/387/387 f 387/387/387 388/388/388 385/385/385 f 389/389/389 390/390/390 391/391/391 f 391/391/391 392/392/392 389/389/389 f 393/393/393 394/394/394 395/395/395 f 396/396/396 397/397/397 398/398/398 f 399/399/399 400/400/400 401/401/401 f 401/401/401 402/402/402 399/399/399 f 403/403/403 404/404/404 405/405/405 f 405/405/405 406/406/406 403/403/403
{ "pile_set_name": "Github" }
/* * Copyright 2013-2020 Arx Libertatis Team (see the AUTHORS file) * * This file is part of Arx Libertatis. * * Original source is copyright 2010 - 2011. Alexey Tsoy. * http://sourceforge.net/projects/interpreter11/ * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organization * obtaining a copy of the software and accompanying documentation covered by * this license (the "Software") to use, reproduce, display, distribute, * execute, and transmit the Software, and to prepare derivative works of the * Software, and to permit third-parties to whom the Software is furnished to * do so, all subject to the following: * * The copyright notices in the Software and this entire statement, including * the above license grant, this restriction and the following disclaimer, * must be included in all copies of the Software, in whole or in part, and * all derivative works of the Software, unless such copies or derivative * works are solely in the form of machine-executable object code generated by * a source language processor. * * 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifndef ARX_UTIL_CMDLINE_COMMANDLINEEXCEPTION_H #define ARX_UTIL_CMDLINE_COMMANDLINEEXCEPTION_H #include <stdexcept> #include "platform/Platform.h" namespace util { namespace cmdline { class error : public virtual std::runtime_error { public: typedef enum { no_exception, invalid_value, invalid_arg_count, already_exists, cmd_not_found, invalid_cmd_syntax, } exception_code; error(exception_code c, const std::string & message) : std::runtime_error(message), m_code(c) { } explicit error(exception_code c) : std::runtime_error(default_message(c)), m_code(c) { } static std::string default_message(exception_code c) { switch(c) { case no_exception: return "uninitialized exception"; case invalid_value: return "the syntax is incorrect"; case invalid_arg_count: return "invalid arguments count"; case already_exists: return "command already exists"; case cmd_not_found: return "command not found"; case invalid_cmd_syntax: return "commands must start with a dash (-)"; } arx_unreachable(); } exception_code code() const { return m_code; } private: exception_code m_code; }; } } // namespace util::cmdline #endif // ARX_UTIL_CMDLINE_COMMANDLINEEXCEPTION_H
{ "pile_set_name": "Github" }
/* * Utility functions for handling cvecs * This file is #included by regcomp.c. * * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. * * Development of this software was funded, in part, by Cray Research Inc., * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics * Corporation, none of whom are responsible for the results. The author * thanks all of them. * * Redistribution and use in source and binary forms -- with or without * modification -- are permitted for any purpose, provided that * redistributions in source form retain this entire copyright notice and * indicate the origin and nature of any modifications. * * I'd appreciate being given credit for this package in the documentation * of software which uses it, but that is not a requirement. * * THIS SOFTWARE IS PROVIDED ``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 * HENRY SPENCER 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. * * src/backend/regex/regc_cvec.c * */ /* * Notes: * Only (selected) functions in _this_ file should treat the chr arrays * of a cvec as non-constant. */ /* * newcvec - allocate a new cvec */ static struct cvec * newcvec(int nchrs, /* to hold this many chrs... */ int nranges) /* ... and this many ranges */ { size_t nc = (size_t) nchrs + (size_t) nranges * 2; size_t n = sizeof(struct cvec) + nc * sizeof(chr); struct cvec *cv = (struct cvec *) MALLOC(n); if (cv == NULL) return NULL; cv->chrspace = nchrs; cv->chrs = (chr *) (((char *) cv) + sizeof(struct cvec)); cv->ranges = cv->chrs + nchrs; cv->rangespace = nranges; return clearcvec(cv); } /* * clearcvec - clear a possibly-new cvec * Returns pointer as convenience. */ static struct cvec * clearcvec(struct cvec *cv) { assert(cv != NULL); cv->nchrs = 0; cv->nranges = 0; cv->cclasscode = -1; return cv; } /* * addchr - add a chr to a cvec */ static void addchr(struct cvec *cv, /* character vector */ chr c) /* character to add */ { assert(cv->nchrs < cv->chrspace); cv->chrs[cv->nchrs++] = c; } /* * addrange - add a range to a cvec */ static void addrange(struct cvec *cv, /* character vector */ chr from, /* first character of range */ chr to) /* last character of range */ { assert(cv->nranges < cv->rangespace); cv->ranges[cv->nranges * 2] = from; cv->ranges[cv->nranges * 2 + 1] = to; cv->nranges++; } /* * getcvec - get a transient cvec, initialized to empty * * The returned cvec is valid only until the next call of getcvec, which * typically will recycle the space. Callers should *not* free the cvec * explicitly; it will be cleaned up when the struct vars is destroyed. * * This is typically used while interpreting bracket expressions. In that * usage the cvec is only needed momentarily until we build arcs from it, * so transientness is a convenient behavior. */ static struct cvec * getcvec(struct vars *v, /* context */ int nchrs, /* to hold this many chrs... */ int nranges) /* ... and this many ranges */ { /* recycle existing transient cvec if large enough */ if (v->cv != NULL && nchrs <= v->cv->chrspace && nranges <= v->cv->rangespace) return clearcvec(v->cv); /* nope, make a new one */ if (v->cv != NULL) freecvec(v->cv); v->cv = newcvec(nchrs, nranges); if (v->cv == NULL) ERR(REG_ESPACE); return v->cv; } /* * freecvec - free a cvec */ static void freecvec(struct cvec *cv) { FREE(cv); }
{ "pile_set_name": "Github" }
<rdf:RDF xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xml:base="http://www.daml.org/2001/10/html/zipcode-ont"> <owl:Ontology rdf:about=""> <owl:versionInfo>$Id: zipcode-ont.daml,v 1.4 2002/02/28 10:25:33 mdean Exp $</owl:versionInfo> <rdfs:comment>United States Postal Service Zone Improvement Program (ZIP) Code Ontology</rdfs:comment> </owl:Ontology> <rdfs:Class rdf:ID="ZipCode"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#zip"/> <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction owl:cardinality="1"> <owl:onProperty rdf:resource="#zip"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#association"/> <owl:allValuesFrom rdf:resource="#Association"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#defaultAssociation"/> <owl:allValuesFrom rdf:resource="#Association"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction owl:cardinality="1"> <owl:onProperty rdf:resource="#defaultAssociation"/> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <rdfs:Class rdf:ID="Association"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#city"/> <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction owl:cardinality="1"> <owl:onProperty rdf:resource="#city"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#state"/> <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction owl:cardinality="1"> <owl:onProperty rdf:resource="#state"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#acceptable"/> <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction owl:cardinality="1"> <owl:onProperty rdf:resource="#acceptable"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#type"/> <owl:allValuesFrom rdf:resource="http://www.w3.org/2001/XMLSchema#string"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction owl:cardinality="1"> <owl:onProperty rdf:resource="#type"/> </owl:Restriction> </rdfs:subClassOf> </rdfs:Class> <owl:ObjectProperty rdf:ID="association"/> <owl:ObjectProperty rdf:ID="defaultAssociation"> <rdfs:subPropertyOf rdf:resource="#association"/> </owl:ObjectProperty> <owl:DatatypeProperty rdf:ID="city"/> <owl:DatatypeProperty rdf:ID="state"/> <owl:DatatypeProperty rdf:ID="acceptable"/> <owl:DatatypeProperty rdf:ID="type"/> <owl:DatatypeProperty rdf:ID="zip"/> </rdf:RDF>
{ "pile_set_name": "Github" }
namespace AngleSharp.Dom.Events { using AngleSharp.Attributes; /// <summary> /// An enumeration over all possible keyboard locations. /// </summary> [DomName("KeyboardEvent")] public enum KeyboardLocation : byte { /// <summary> /// The standard location. /// </summary> [DomName("DOM_KEY_LOCATION_STANDARD")] Standard = 0, /// <summary> /// The left location. /// </summary> [DomName("DOM_KEY_LOCATION_LEFT")] Left = 1, /// <summary> /// The right location. /// </summary> [DomName("DOM_KEY_LOCATION_RIGHT")] Right = 2, /// <summary> /// The location of the numpad. /// </summary> [DomName("DOM_KEY_LOCATION_NUMPAD")] NumPad = 3 } }
{ "pile_set_name": "Github" }
'use strict'; module.exports = require('./shim');
{ "pile_set_name": "Github" }
package io.quarkus.arc.test.remove; import javax.enterprise.context.Dependent; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.arc.Arc; import io.quarkus.test.QuarkusUnitTest; public class RemoveFwkBeansTest { @RegisterExtension static final QuarkusUnitTest config = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) .addClasses(UnusedBean.class) .addAsResource(new StringAsset("quarkus.arc.remove-unused-beans=fwk"), "application.properties")); @Test public void unusedBeanNotRemoved() { Assertions.assertNotNull(Arc.container().instance(UnusedBean.class).get()); } @Dependent public static class UnusedBean { } }
{ "pile_set_name": "Github" }
package com.yzx.chat.module.group.presenter; import android.os.Handler; import com.yzx.chat.R; import com.yzx.chat.core.AppClient; import com.yzx.chat.core.GroupManager; import com.yzx.chat.core.entity.ContactEntity; import com.yzx.chat.core.entity.GroupEntity; import com.yzx.chat.core.entity.GroupMemberEntity; import com.yzx.chat.core.entity.UserEntity; import com.yzx.chat.module.group.contract.CreateGroupContract; import com.yzx.chat.util.AndroidHelper; import com.yzx.chat.widget.listener.LifecycleMVPResultCallback; import java.util.Arrays; import java.util.List; /** * Created by YZX on 2018年02月27日. * 优秀的代码是它自己最好的文档,当你考虑要添加一个注释时,问问自己:"如何能改进这段代码,以让它不需要注释?" */ public class CreateGroupPresenter implements CreateGroupContract.Presenter { private CreateGroupContract.View mCreateGroupView; private GroupManager mGroupManager; private Handler mHandler; private boolean isCreating; private boolean isAdding; private String[] mAddingMembersID; @Override public void attachView(CreateGroupContract.View view) { mCreateGroupView = view; mHandler = new Handler(); mGroupManager = AppClient.getInstance().getGroupManager(); mGroupManager.addGroupChangeListener(mOnGroupOperationListener); } @Override public void detachView() { mGroupManager.removeGroupChangeListener(mOnGroupOperationListener); mHandler.removeCallbacksAndMessages(null); mHandler = null; mGroupManager = null; mCreateGroupView = null; } @Override public void createGroup(List<ContactEntity> members) { if (isCreating) { return; } StringBuilder stringBuilder = new StringBuilder(64); String[] membersID = new String[members.size()]; UserEntity user; for (int i = 0, count = members.size(); i < count; i++) { user = members.get(i).getUserProfile(); stringBuilder.append(user.getNickname()); stringBuilder.append("、"); membersID[i] = user.getUserID(); } stringBuilder.append(AppClient.getInstance().getUserManager().getCurrentUser().getNickname()).append("的群聊"); mGroupManager.createGroup(stringBuilder.toString(), membersID, new LifecycleMVPResultCallback<Void>(mCreateGroupView) { @Override protected void onSuccess(Void result) { mHandler.postDelayed(new Runnable() { @Override public void run() { onFailure(0,AndroidHelper.getString(R.string.Error_Server1)); } }, 15000); } @Override protected boolean onError(int code, String error) { isCreating = false; return false; } }); isCreating = true; } @Override public void addMembers(String groupID, List<ContactEntity> members) { if (isAdding) { return; } mAddingMembersID = new String[members.size()]; for (int i = 0, count = members.size(); i < count; i++) { mAddingMembersID[i] = members.get(i).getUserProfile().getUserID(); } mGroupManager.addMember(groupID, mAddingMembersID, new LifecycleMVPResultCallback<Void>(mCreateGroupView) { @Override protected void onSuccess(Void result) { mHandler.postDelayed(new Runnable() { @Override public void run() { onFailure(0,AndroidHelper.getString(R.string.Error_Server1)); } }, 15000); } @Override protected boolean onError(int code, String error) { isAdding = false; return super.onError(code, error); } }); isAdding = true; } private final GroupManager.OnGroupOperationListener mOnGroupOperationListener = new GroupManager.OnGroupOperationListener() { @Override public void onCreatedGroup(GroupEntity group) { if (group.getOwner().equals(AppClient.getInstance().getUserID())) { mCreateGroupView.launchChatActivity(group); isCreating = false; } } @Override public void onQuitGroup(GroupEntity group) { } @Override public void onBulletinChange(GroupEntity group) { } @Override public void onNameChange(GroupEntity group) { } @Override public void onMemberAdded(GroupEntity group, String[] newMembersID) { if (Arrays.equals(mAddingMembersID, newMembersID)) { mCreateGroupView.launchChatActivity(group); isCreating = false; } } @Override public void onMemberJoin(GroupEntity group, String memberID) { } @Override public void onMemberQuit(GroupEntity group, GroupMemberEntity quitMember) { } @Override public void onMemberAliasChange(GroupEntity group, GroupMemberEntity member, String newAlias) { } }; }
{ "pile_set_name": "Github" }
/* * Zinc - The incremental compiler for Scala. * Copyright Lightbend, Inc. and Mark Harrah * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package sbt package internal package inc import scala.collection.JavaConverters._ import xsbti.{ UseScope, VirtualFileRef } import xsbti.api.NameHash import xsbti.compile.Changes import xsbti.compile.{ APIChange => XAPIChange } import xsbti.compile.{ InitialChanges => XInitialChanges } import xsbti.compile.{ UsedName => XUsedName } final case class InitialChanges( internalSrc: Changes[VirtualFileRef], removedProducts: Set[VirtualFileRef], libraryDeps: Set[VirtualFileRef], external: APIChanges ) extends XInitialChanges { def isEmpty: Boolean = internalSrc.isEmpty && removedProducts.isEmpty && libraryDeps.isEmpty && external.apiChanges.isEmpty def getInternalSrc: Changes[VirtualFileRef] = internalSrc def getRemovedProducts: java.util.Set[VirtualFileRef] = removedProducts.asJava def getLibraryDeps: java.util.Set[VirtualFileRef] = libraryDeps.asJava def getExternal: Array[XAPIChange] = external.apiChanges.toArray } final class APIChanges(val apiChanges: Iterable[APIChange]) { override def toString = "API Changes: " + apiChanges def allModified: Iterable[String] = apiChanges.map(_.modifiedClass) } sealed abstract class APIChange(val modifiedClass: String) extends XAPIChange { override def getModifiedClass: String = modifiedClass override def getModifiedNames: java.util.Set[XUsedName] = this match { case _: APIChangeDueToMacroDefinition => java.util.Collections.emptySet[XUsedName] case _: TraitPrivateMembersModified => java.util.Collections.emptySet[XUsedName] case NamesChange(_, modifiedNames) => modifiedNames.names.map(x => x: XUsedName).asJava } } /** * If we recompile a source file that contains a macro definition then we always assume that it's * api has changed. The reason is that there's no way to determine if changes to macros implementation * are affecting its users or not. Therefore we err on the side of caution. */ final case class APIChangeDueToMacroDefinition(modified0: String) extends APIChange(modified0) /** * An APIChange that carries information about modified names. * * This class is used only when name hashing algorithm is enabled. */ final case class NamesChange(modified0: String, modifiedNames: ModifiedNames) extends APIChange(modified0) final case class TraitPrivateMembersModified(modified: String) extends APIChange(modified) /** * ModifiedNames are determined by comparing name hashes in two versions of an API representation. * * Note that we distinguish between sets of regular (non-implicit) and implicit modified names. * This distinction is needed because the name hashing algorithm makes different decisions based * on whether modified name is implicit or not. Implicit names are much more difficult to handle * due to difficulty of reasoning about the implicit scope. */ final case class ModifiedNames(names: Set[UsedName]) { def in(scope: UseScope): Set[UsedName] = names.filter(_.scopes.contains(scope)) import collection.JavaConverters._ private lazy val lookupMap: Set[(String, UseScope)] = names.flatMap(n => n.scopes.asScala.map(n.name -> _)) def isModified(usedName: UsedName): Boolean = usedName.scopes.asScala.exists(scope => lookupMap.contains(usedName.name -> scope)) override def toString: String = s"ModifiedNames(changes = ${names.mkString(", ")})" } object ModifiedNames { def compareTwoNameHashes(a: Array[NameHash], b: Array[NameHash]): ModifiedNames = { val xs = a.toSet val ys = b.toSet val changed = (xs union ys) diff (xs intersect ys) val modifiedNames: Set[UsedName] = changed .groupBy(_.name) .map({ case (name, nameHashes) => UsedName(name, nameHashes.map(_.scope())) }) .toSet ModifiedNames(modifiedNames) } } abstract class UnderlyingChanges[A] extends Changes[A] { def added: Set[A] def removed: Set[A] def changed: Set[A] def unmodified: Set[A] import scala.collection.JavaConverters.setAsJavaSetConverter override def getAdded: java.util.Set[A] = added.asJava override def getChanged: java.util.Set[A] = changed.asJava override def getRemoved: java.util.Set[A] = removed.asJava override def getUnmodified: java.util.Set[A] = unmodified.asJava override def isEmpty = added.isEmpty && removed.isEmpty && changed.isEmpty override def toString: String = { s"""Changes(added = $added, removed = $removed, changed = $changed, unmodified = ...)""".stripMargin } }
{ "pile_set_name": "Github" }
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Concurrent; using System.Diagnostics; using System.Diagnostics.Tracing; using Microsoft.DotNet.RemoteExecutor; using Xunit; namespace System.Linq.Parallel.Tests { public class EtwTests { [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public static void TestEtw() { RemoteExecutor.Invoke(() => { using (var listener = new TestEventListener(new Guid("159eeeec-4a14-4418-a8fe-faabcd987887"), EventLevel.Verbose)) { var events = new ConcurrentQueue<int>(); listener.RunWithCallback(ev => events.Enqueue(ev.EventId), () => { Enumerable.Range(0, 10000).AsParallel().Select(i => i).ToArray(); }); const int BeginEventId = 1; Assert.Equal(expected: 1, actual: events.Count(i => i == BeginEventId)); const int EndEventId = 2; Assert.Equal(expected: 1, actual: events.Count(i => i == EndEventId)); const int ForkEventId = 3; const int JoinEventId = 4; Assert.True(events.Count(i => i == ForkEventId) > 0); Assert.Equal(events.Count(i => i == ForkEventId), events.Count(i => i == JoinEventId)); } }).Dispose(); } } }
{ "pile_set_name": "Github" }
enable_language(C) add_library(empty empty.c) install(TARGETS empty DESTINATION $<NOTAGENEX>)
{ "pile_set_name": "Github" }
/* WWDC.h project Created by author on 09/06/2014 05:18AM. Copyright (c) 2014 author. All rights reserved. */ @interface WWDC : XXXDataModel @property (nonatomic, assign) NSInteger ID; @property (nonatomic, strong) NSString *wwdcYear; @property (nonatomic, strong) NSString *title; @property (nonatomic, strong) NSString *category; @property (nonatomic, strong) NSString *platform; @property (nonatomic, strong) NSString *hdLink; @property (nonatomic, strong) NSString *sdLink; @property (nonatomic, strong) NSString *pdfLink; @property (nonatomic, strong) NSString *details; @property (nonatomic, assign) NSInteger sortOrder; /*init property member var by parsing NSDictionary parameter*/ - (id)initWithDictionary:(NSDictionary *)dictionary; /*save new model object*/ - (BOOL)save; /*save updated model object*/ - (BOOL)update; /*delete current model object*/ - (BOOL)delete; @end
{ "pile_set_name": "Github" }
<?php //// RCMCardDAV Plugin Admin Settings //// ** GLOBAL SETTINGS // Disallow users to add / edit / delete custom addressbooks (default: false) // // If true, User cannot add custom addressbooks // If false, user can add / edit / delete custom addressbooks // // This option only affects custom addressbooks. Preset addressbooks (see below) // are not affected. // $prefs['_GLOBAL']['fixed'] = true; // When enabled, this option hides the 'CardDAV' section inside Preferences. // $prefs['_GLOBAL']['hide_preferences'] = true; // Scheme for storing the CardDAV passwords, in order from least to best security. // Options: // plain: store as plaintext // base64: store encoded with base64 (default) // des_key: store encrypted with global des_key of roundcube // encrypted: store encrypted with IMAP password of the user // NOTE: if the IMAP password of the user changes, the stored // CardDAV passwords cannot be decrypted anymore and the user // needs to reenter them. // $prefs['_GLOBAL']['pwstore_scheme'] = 'base64'; //// ** ADDRESSBOOK PRESETS // Each addressbook preset takes the following form: /* $prefs['<Presetname>'] = array( // required attributes 'name' => '<Addressbook Name>', 'username' => '<CardDAV Username>', 'password' => '<CardDAV Password>', 'url' => '<CardDAV URL>', // optional attributes 'active' => <true or false>, 'readonly' => <true or false>, 'refresh_time' => '<Refresh Time in Hours, Format HH[:MM[:SS]]>', // attributes that are fixed (i.e., not editable by the user) and // auto-updated for this preset 'fixed' => array( < 0 or more of the other attribute keys > ), // hide this preset from CalDAV preferences section so users can't even // see it 'hide' => <true or false>, ); */ // All values in angle brackets <VALUE> have to be substituted. // // The meaning of the different parameters is as follows: // // <Presetname>: Unique preset name, must not be '_GLOBAL'. The presetname is // not user visible and only used for an internal mapping between // addressbooks created from a preset and the preset itself. You // should never change this throughout its lifetime. // // The following parameters are REQUIRED and need to be specified for any preset. // // name: User-visible name of the addressbook. If the server provides // an additional display name for the addressbooks found for the // preset, it will be appended in brackets to this name, except // if carddav_name_only is true (see below). // // username: CardDAV username to access the addressbook. Set this setting // to '%u' to use the roundcube username. // In case one uses an email address as username there is the // additional option to choose '%l', which will only use the // local part of the username (eg: user.name@example.com will // become user.name). // Also, %d is available to get only the domain part of the // username (eg: user.name@example.com will become example.com). // // password: CardDAV password to access the addressbook. Set this setting // to '%p' to use the roundcube password. The password will not // be stored in the database when using %p. // // url: URL where to find the CardDAV addressbook(s). If the given URL // refers directly to an addressbook, only this single // addressbook will be added. If the URL points somewhere in the // CardDAV space, but _not_ to the location of a particular // addressbook, the server will be queried for the available // addressbooks and all of them will be added. You can use %u // within the URL as a placeholder for the CardDAV username. // '%l' works the same way as it does for the username field. // // The following parameters are OPTIONAL and need to be specified only if the default // value is not acceptable. // // active: If this parameter is false, the addressbook is not used by roundcube // unless the user changes this setting. // Default: true // // carddav_name_only: // If this parameter is true, only the server provided displayname // is used for addressbooks created from this preset, except if // the server does not provide a display name. // Default: false // // readonly: If this parameter is true, the addressbook will only be // accessible in read-only mode, i.e., the user will not be able // to add, modify or delete contacts in the addressbook. // Default: false // // refresh_time: Time interval for that cached versions of the addressbook // entries should be used, in hours. After this time interval has // passed since the last pull from the server, it will be // refreshed when the addressbook is accessed the next time. // Default: 01:00:00 // // fixed: Array of parameter keys that must not be changed by the user. // Note that only fixed parameters will be automatically updated // for existing addressbooks created from presets. Otherwise the // user may already have changed the setting, and his change // would be lost. You can add any of the above keys, but it the // setting only affects parameters that can be changed via the // settings pane (e.g., readonly cannot be changed by the user // anyway). Still only parameters listed as fixed will // automatically updated if the preset is changed. // Default: empty, all settings modifiable by user // // !!! WARNING: Only add 'url' to the list of fixed addressbooks // if it _directly_ points to an address book collection. // Otherwise, the plugin will initially lookup the URLs for the // collections on the server, and at the next login overwrite it // with the fixed value stored here. Therefore, if you change the // URL, you have two options: // 1) If the new URL is a variation of the old one (e.g. hostname // change), you can run an SQL UPDATE query directly in the // database to adopt all addressbooks. // 2) If the new URL is not easily derivable from the old one, // change the key of the preset and change the URL. Addressbooks // belonging to the old preset will be deleted upon the next // login of the user and freshly created. // // hide: Whether this preset should be hidden from the CalDAV listing // on the preferences page. // How Preset Updates work // // Preset addressbooks are created for a user as she logs in. //// ** ADDRESSBOOK PRESETS - EXAMPLE: Two Addressbook Presets //// Preset 1: Personal /* $prefs['Personal'] = array( // required attributes 'name' => 'Personal', // will be substituted for the roundcube username 'username' => '%u', // will be substituted for the roundcube password 'password' => '%p', // %u will be substituted for the CardDAV username 'url' => 'https://ical.example.org/caldav.php/%u/Personal', 'active' => true, 'readonly' => false, 'refresh_time' => '02:00:00', 'fixed' => array( 'username' ), 'hide' => false, ); */ //// Preset 2: Corporate /* $prefs['Work'] = array( 'name' => 'Corporate', 'username' => 'CorpUser', 'password' => 'C0rpPasswo2d', 'url' => 'https://ical.example.org/caldav.php/%u/Corporate', 'fixed' => array( 'name', 'username', 'password' ), 'hide' => true, ); */
{ "pile_set_name": "Github" }
/* * Copyright 2015 Red Hat Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: Ben Skeggs <bskeggs@redhat.com> */ #include "priv.h" u32 nv40_pci_rd32(struct nvkm_pci *pci, u16 addr) { struct nvkm_device *device = pci->subdev.device; return nvkm_rd32(device, 0x088000 + addr); } void nv40_pci_wr08(struct nvkm_pci *pci, u16 addr, u8 data) { struct nvkm_device *device = pci->subdev.device; nvkm_wr08(device, 0x088000 + addr, data); } void nv40_pci_wr32(struct nvkm_pci *pci, u16 addr, u32 data) { struct nvkm_device *device = pci->subdev.device; nvkm_wr32(device, 0x088000 + addr, data); } void nv40_pci_msi_rearm(struct nvkm_pci *pci) { nvkm_pci_wr08(pci, 0x0068, 0xff); } static const struct nvkm_pci_func nv40_pci_func = { .rd32 = nv40_pci_rd32, .wr08 = nv40_pci_wr08, .wr32 = nv40_pci_wr32, .msi_rearm = nv40_pci_msi_rearm, }; int nv40_pci_new(struct nvkm_device *device, int index, struct nvkm_pci **ppci) { return nvkm_pci_new_(&nv40_pci_func, device, index, ppci); }
{ "pile_set_name": "Github" }
/* 在BC31下编译 */ /* compile under Borland C++ 3.1 */ #include <stdio.h> #include <sys\timeb.h> #define Alpha 3.90 double initvalue(); double random(void)/*返回一个(0,1)之间的随机数*/ { static double f=-1.0; double initvlaue(); if(f==-1.0) f=initvalue(); else f=Alpha*f*(1.0-f); return f; } double initvalue()/*返回随机数序列初值*/ { double f0; struct timeb *pr; for(;;){ ftime(pr); f0=pr->millitm*0.9876543*0.001; if(f0<0.001) continue; break; } return f0; } void main() { double test; int i; clrscr(); puts("This is a random number generator."); puts("\n The random number are: "); for ( i = 0; i < 3; i++ ) { test = random(); printf ( " >> rand%d:%f\n", i, test ); } puts("\n Press any key to quit..."); getch(); }
{ "pile_set_name": "Github" }
/-- This set of tests is run only with the 8-bit library. They do not require UTF-8 or Unicode property support. The file starts with all the tests of the POSIX interface, because that is supported only with the 8-bit library. --/ < forbid 8W /abc/P abc 0: abc *** Failers No match: POSIX code 17: match failed /^abc|def/P abcdef 0: abc abcdef\B 0: def /.*((abc)$|(def))/P defabc 0: defabc 1: abc 2: abc \Zdefabc 0: def 1: def 3: def /the quick brown fox/P the quick brown fox 0: the quick brown fox *** Failers No match: POSIX code 17: match failed The Quick Brown Fox No match: POSIX code 17: match failed /the quick brown fox/Pi the quick brown fox 0: the quick brown fox The Quick Brown Fox 0: The Quick Brown Fox /abc.def/P *** Failers No match: POSIX code 17: match failed abc\ndef No match: POSIX code 17: match failed /abc$/P abc 0: abc abc\n 0: abc /(abc)\2/P Failed: POSIX code 15: bad back reference at offset 7 /(abc\1)/P abc No match: POSIX code 17: match failed /a*(b+)(z)(z)/P aaaabbbbzzzz 0: aaaabbbbzz 1: bbbb 2: z 3: z aaaabbbbzzzz\O0 aaaabbbbzzzz\O1 0: aaaabbbbzz aaaabbbbzzzz\O2 0: aaaabbbbzz 1: bbbb aaaabbbbzzzz\O3 0: aaaabbbbzz 1: bbbb 2: z aaaabbbbzzzz\O4 0: aaaabbbbzz 1: bbbb 2: z 3: z aaaabbbbzzzz\O5 0: aaaabbbbzz 1: bbbb 2: z 3: z /ab.cd/P ab-cd 0: ab-cd ab=cd 0: ab=cd ** Failers No match: POSIX code 17: match failed ab\ncd No match: POSIX code 17: match failed /ab.cd/Ps ab-cd 0: ab-cd ab=cd 0: ab=cd ab\ncd 0: ab\x0acd /a(b)c/PN abc Matched with REG_NOSUB /a(?P<name>b)c/PN abc Matched with REG_NOSUB /a?|b?/P abc 0: a ** Failers 0: ddd\N No match: POSIX code 17: match failed /\w+A/P CDAAAAB 0: CDAAAA /\w+A/PU CDAAAAB 0: CDA /\Biss\B/I+P Mississippi 0: iss 0+ issippi /abc/\P Failed: POSIX code 9: bad escape sequence at offset 4 /-- End of POSIX tests --/ /a\Cb/ aXb 0: aXb a\nb 0: a\x0ab ** Failers (too big char) No match A\x{123}B ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled. ** Truncation will probably give the wrong result. No match A\o{443}B ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled. ** Truncation will probably give the wrong result. No match /\x{100}/I Failed: character value in \x{} or \o{} is too large at offset 6 /\o{400}/I Failed: character value in \x{} or \o{} is too large at offset 6 / (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* # optional leading comment (?: (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | " (?: # opening quote... [^\\\x80-\xff\n\015"] # Anything except backslash and quote | # or \\ [^\x80-\xff] # Escaped something (something != CR) )* " # closing quote ) # initial word (?: (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* \. (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | " (?: # opening quote... [^\\\x80-\xff\n\015"] # Anything except backslash and quote | # or \\ [^\x80-\xff] # Escaped something (something != CR) )* " # closing quote ) )* # further okay, if led by a period (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* @ (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # initial subdomain (?: # (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* \. # if led by a period... (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # ...further okay )* # address | # or (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | " (?: # opening quote... [^\\\x80-\xff\n\015"] # Anything except backslash and quote | # or \\ [^\x80-\xff] # Escaped something (something != CR) )* " # closing quote ) # one word, optionally followed by.... (?: [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or... \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) | # comments, or... " (?: # opening quote... [^\\\x80-\xff\n\015"] # Anything except backslash and quote | # or \\ [^\x80-\xff] # Escaped something (something != CR) )* " # closing quote # quoted strings )* < (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* # leading < (?: @ (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # initial subdomain (?: # (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* \. # if led by a period... (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # ...further okay )* (?: (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* , (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* @ (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # initial subdomain (?: # (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* \. # if led by a period... (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # ...further okay )* )* # further okay, if led by comma : # closing colon (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* )? # optional route (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | " (?: # opening quote... [^\\\x80-\xff\n\015"] # Anything except backslash and quote | # or \\ [^\x80-\xff] # Escaped something (something != CR) )* " # closing quote ) # initial word (?: (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* \. (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | " (?: # opening quote... [^\\\x80-\xff\n\015"] # Anything except backslash and quote | # or \\ [^\x80-\xff] # Escaped something (something != CR) )* " # closing quote ) )* # further okay, if led by a period (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* @ (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # initial subdomain (?: # (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* \. # if led by a period... (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* (?: [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom | \[ # [ (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff \] # ] ) # ...further okay )* # address spec (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* > # trailing > # name and address ) (?: [\040\t] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* \) )* # optional trailing comment /xSI Capturing subpattern count = 0 Contains explicit CR or LF match Options: extended No first char No need char Subject length lower bound = 3 Starting chars: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8 9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f /-- Although this saved pattern was compiled with link-size=2, it does no harm to run this test with other link sizes because it is going to generated a "compiled in wrong mode" error as soon as it is loaded, so the link size does not matter. --/ <!testsaved16 Compiled pattern loaded from testsaved16 No study data Error -28 from pcre_fullinfo(0) Running in 8-bit mode but pattern was compiled in 16-bit mode <!testsaved32 Compiled pattern loaded from testsaved32 No study data Error -28 from pcre_fullinfo(0) Running in 8-bit mode but pattern was compiled in 32-bit mode /\h/SI Capturing subpattern count = 0 No options No first char No need char Subject length lower bound = 1 Starting chars: \x09 \x20 \xa0 /\H/SI Capturing subpattern count = 0 No options No first char No need char Subject length lower bound = 1 No starting char list /\v/SI Capturing subpattern count = 0 No options No first char No need char Subject length lower bound = 1 Starting chars: \x0a \x0b \x0c \x0d \x85 /\V/SI Capturing subpattern count = 0 No options No first char No need char Subject length lower bound = 1 No starting char list /\R/SI Capturing subpattern count = 0 No options No first char No need char Subject length lower bound = 1 Starting chars: \x0a \x0b \x0c \x0d \x85 /[\h]/BZ ------------------------------------------------------------------ Bra [\x09 \xa0] Ket End ------------------------------------------------------------------ >\x09< 0: \x09 /[\h]+/BZ ------------------------------------------------------------------ Bra [\x09 \xa0]++ Ket End ------------------------------------------------------------------ >\x09\x20\xa0< 0: \x09 \xa0 /[\v]/BZ ------------------------------------------------------------------ Bra [\x0a-\x0d\x85] Ket End ------------------------------------------------------------------ /[\H]/BZ ------------------------------------------------------------------ Bra [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] Ket End ------------------------------------------------------------------ /[^\h]/BZ ------------------------------------------------------------------ Bra [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg) Ket End ------------------------------------------------------------------ /[\V]/BZ ------------------------------------------------------------------ Bra [\x00-\x09\x0e-\x84\x86-\xff] Ket End ------------------------------------------------------------------ /[\x0a\V]/BZ ------------------------------------------------------------------ Bra [\x00-\x0a\x0e-\x84\x86-\xff] Ket End ------------------------------------------------------------------ /\777/I Failed: octal value is greater than \377 in 8-bit non-UTF-8 mode at offset 3 /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/K Failed: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN) at offset 259 /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/K XX 0: XX MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE /\u0100/<JS> Failed: character value in \u.... sequence is too large at offset 5 /[\u0100-\u0200]/<JS> Failed: character value in \u.... sequence is too large at offset 6 /[^\x00-a]{12,}[^b-\xff]*/BZ ------------------------------------------------------------------ Bra [b-\xff] (neg){12,}+ [\x00-a] (neg)*+ Ket End ------------------------------------------------------------------ /[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ ------------------------------------------------------------------ Bra [\x00-\x08\x0e-\x1f!-\xff] (neg)*+ \s* [0-9A-Z_a-z]++ \W+ [\x00-/:-\xff] (neg)*+ \d 0 [\x00-/:-@[-^`{-\xff] (neg){4,6}+ \w* A Ket End ------------------------------------------------------------------ /(?'ABC'[bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar](*THEN:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/ /-- End of testinput14 --/
{ "pile_set_name": "Github" }
var sys = require('util'), fs = require('fs'), BSON = require('../../ext').BSON, Buffer = require('buffer').Buffer, BSONJS = require('../../lib/bson/bson').BSON, BinaryParser = require('../../lib/bson/binary_parser').BinaryParser, Long = require('../../lib/bson/long').Long, ObjectID = require('../../lib/bson/bson').ObjectID, Binary = require('../../lib/bson/bson').Binary, Code = require('../../lib/bson/bson').Code, DBRef = require('../../lib/bson/bson').DBRef, Symbol = require('../../lib/bson/bson').Symbol, Double = require('../../lib/bson/bson').Double, MaxKey = require('../../lib/bson/bson').MaxKey, MinKey = require('../../lib/bson/bson').MinKey, Timestamp = require('../../lib/bson/bson').Timestamp, gleak = require('../../tools/gleak'), assert = require('assert'); // Parsers var bsonC = new BSON([Long, ObjectID, Binary, Code, DBRef, Symbol, Double, Timestamp, MaxKey, MinKey]); var bsonJS = new BSONJS([Long, ObjectID, Binary, Code, DBRef, Symbol, Double, Timestamp, MaxKey, MinKey]); /** * Retrieve the server information for the current * instance of the db client * * @ignore */ exports.setUp = function(callback) { callback(); } /** * Retrieve the server information for the current * instance of the db client * * @ignore */ exports.tearDown = function(callback) { callback(); } /** * @ignore */ exports['Should Correctly Deserialize object'] = function(test) { var bytes = [95,0,0,0,2,110,115,0,42,0,0,0,105,110,116,101,103,114,97,116,105,111,110,95,116,101,115,116,115,95,46,116,101,115,116,95,105,110,100,101,120,95,105,110,102,111,114,109,97,116,105,111,110,0,8,117,110,105,113,117,101,0,0,3,107,101,121,0,12,0,0,0,16,97,0,1,0,0,0,0,2,110,97,109,101,0,4,0,0,0,97,95,49,0,0]; var serialized_data = ''; // Convert to chars for(var i = 0; i < bytes.length; i++) { serialized_data = serialized_data + BinaryParser.fromByte(bytes[i]); } var object = bsonC.deserialize(serialized_data); assert.equal("a_1", object.name); assert.equal(false, object.unique); assert.equal(1, object.key.a); test.done(); } /** * @ignore */ exports['Should Correctly Deserialize object with all types'] = function(test) { var bytes = [26,1,0,0,7,95,105,100,0,161,190,98,75,118,169,3,0,0,3,0,0,4,97,114,114,97,121,0,26,0,0,0,16,48,0,1,0,0,0,16,49,0,2,0,0,0,16,50,0,3,0,0,0,0,2,115,116,114,105,110,103,0,6,0,0,0,104,101,108,108,111,0,3,104,97,115,104,0,19,0,0,0,16,97,0,1,0,0,0,16,98,0,2,0,0,0,0,9,100,97,116,101,0,161,190,98,75,0,0,0,0,7,111,105,100,0,161,190,98,75,90,217,18,0,0,1,0,0,5,98,105,110,97,114,121,0,7,0,0,0,2,3,0,0,0,49,50,51,16,105,110,116,0,42,0,0,0,1,102,108,111,97,116,0,223,224,11,147,169,170,64,64,11,114,101,103,101,120,112,0,102,111,111,98,97,114,0,105,0,8,98,111,111,108,101,97,110,0,1,15,119,104,101,114,101,0,25,0,0,0,12,0,0,0,116,104,105,115,46,120,32,61,61,32,51,0,5,0,0,0,0,3,100,98,114,101,102,0,37,0,0,0,2,36,114,101,102,0,5,0,0,0,116,101,115,116,0,7,36,105,100,0,161,190,98,75,2,180,1,0,0,2,0,0,0,10,110,117,108,108,0,0]; var serialized_data = ''; // Convert to chars for(var i = 0; i < bytes.length; i++) { serialized_data = serialized_data + BinaryParser.fromByte(bytes[i]); } var object = bsonJS.deserialize(new Buffer(serialized_data, 'binary')); assert.equal("hello", object.string); assert.deepEqual([1, 2, 3], object.array); assert.equal(1, object.hash.a); assert.equal(2, object.hash.b); assert.ok(object.date != null); assert.ok(object.oid != null); assert.ok(object.binary != null); assert.equal(42, object.int); assert.equal(33.3333, object.float); assert.ok(object.regexp != null); assert.equal(true, object.boolean); assert.ok(object.where != null); assert.ok(object.dbref != null); assert.ok(object['null'] == null); test.done(); } /** * @ignore */ exports['Should Serialize and Deserialize String'] = function(test) { var test_string = {hello: 'world'} var serialized_data = bsonC.serialize(test_string) assert.deepEqual(test_string, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Integer'] = function(test) { var test_number = {doc: 5} var serialized_data = bsonC.serialize(test_number) assert.deepEqual(test_number, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize null value'] = function(test) { var test_null = {doc:null} var serialized_data = bsonC.serialize(test_null) var object = bsonC.deserialize(serialized_data); assert.deepEqual(test_null, object); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize undefined value'] = function(test) { var test_undefined = {doc:undefined} var serialized_data = bsonC.serialize(test_undefined) var object = bsonJS.deserialize(new Buffer(serialized_data, 'binary')); assert.equal(null, object.doc) test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Number'] = function(test) { var test_number = {doc: 5.5} var serialized_data = bsonC.serialize(test_number) assert.deepEqual(test_number, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Integer'] = function(test) { var test_int = {doc: 42} var serialized_data = bsonC.serialize(test_int) assert.deepEqual(test_int, bsonC.deserialize(serialized_data)); test_int = {doc: -5600} serialized_data = bsonC.serialize(test_int) assert.deepEqual(test_int, bsonC.deserialize(serialized_data)); test_int = {doc: 2147483647} serialized_data = bsonC.serialize(test_int) assert.deepEqual(test_int, bsonC.deserialize(serialized_data)); test_int = {doc: -2147483648} serialized_data = bsonC.serialize(test_int) assert.deepEqual(test_int, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Object'] = function(test) { var doc = {doc: {age: 42, name: 'Spongebob', shoe_size: 9.5}} var serialized_data = bsonC.serialize(doc) assert.deepEqual(doc, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Array'] = function(test) { var doc = {doc: [1, 2, 'a', 'b']} var serialized_data = bsonC.serialize(doc) assert.deepEqual(doc, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Array with added on functions'] = function(test) { var doc = {doc: [1, 2, 'a', 'b']} var serialized_data = bsonC.serialize(doc) assert.deepEqual(doc, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize A Boolean'] = function(test) { var doc = {doc: true} var serialized_data = bsonC.serialize(doc) assert.deepEqual(doc, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize a Date'] = function(test) { var date = new Date() //(2009, 11, 12, 12, 00, 30) date.setUTCDate(12) date.setUTCFullYear(2009) date.setUTCMonth(11 - 1) date.setUTCHours(12) date.setUTCMinutes(0) date.setUTCSeconds(30) var doc = {doc: date} var serialized_data = bsonC.serialize(doc) assert.deepEqual(doc, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Oid'] = function(test) { var doc = {doc: new ObjectID()} var serialized_data = bsonC.serialize(doc) assert.deepEqual(doc.doc.toHexString(), bsonC.deserialize(serialized_data).doc.toHexString()) test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Buffer'] = function(test) { var doc = {doc: new Buffer("123451234512345")} var serialized_data = bsonC.serialize(doc) assert.equal("123451234512345", bsonC.deserialize(serialized_data).doc.buffer.toString('ascii')); test.done(); } /** * @ignore */ exports['Should Correctly encode Empty Hash'] = function(test) { var test_code = {} var serialized_data = bsonC.serialize(test_code) assert.deepEqual(test_code, bsonC.deserialize(serialized_data)); test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Ordered Hash'] = function(test) { var doc = {doc: {b:1, a:2, c:3, d:4}} var serialized_data = bsonC.serialize(doc) var decoded_hash = bsonC.deserialize(serialized_data).doc var keys = [] for(var name in decoded_hash) keys.push(name) assert.deepEqual(['b', 'a', 'c', 'd'], keys) test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize Regular Expression'] = function(test) { var doc = {doc: /foobar/mi} var serialized_data = bsonC.serialize(doc) var doc2 = bsonC.deserialize(serialized_data); assert.equal(doc.doc.toString(), doc2.doc.toString()) test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize a Binary object'] = function(test) { var bin = new Binary() var string = 'binstring' for(var index = 0; index < string.length; index++) { bin.put(string.charAt(index)) } var doc = {doc: bin} var serialized_data = bsonC.serialize(doc) var deserialized_data = bsonC.deserialize(serialized_data); assert.equal(doc.doc.value(), deserialized_data.doc.value()) test.done(); } /** * @ignore */ exports['Should Correctly Serialize and Deserialize a big Binary object'] = function(test) { var data = fs.readFileSync("test/node/data/test_gs_weird_bug.png", 'binary'); var bin = new Binary() bin.write(data) var doc = {doc: bin} var serialized_data = bsonC.serialize(doc) var deserialized_data = bsonC.deserialize(serialized_data); assert.equal(doc.doc.value(), deserialized_data.doc.value()) test.done(); } /** * @ignore */ exports.noGlobalsLeaked = function(test) { var leaks = gleak.detectNew(); test.equal(0, leaks.length, "global var leak detected: " + leaks.join(', ')); test.done(); }
{ "pile_set_name": "Github" }
package com.git.hui.boot.security; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * Created by @author yihui in 10:59 19/12/24. */ @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
{ "pile_set_name": "Github" }
test1a: OK test1b: OK test1c: OK test1d: OK test2a: OK test2b: OK test2c: OK test2d: OK test3a: OK test3b: OK test3c: OK test3d: OK test4a: OK test4b: OK test4c: OK test4d: OK test5a: OK test5b: OK test5c: OK test5d: OK test5e: OK test5f: OK test6a: OK test6a: OK test6a: OK test6a: OK test6b: OK test6b: OK test6b: OK test6b: OK test6c: OK test6c: OK test6c: OK test6c: OK test12a: OK test12a: OK test12a: OK test12a: OK test13a: OK test13a: OK test13a: OK test13a: OK test13a: OK test13a: OK test13a: OK test13a: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test13b: OK test14a: OK test14a: OK test14a: OK test14a: OK test14a: OK test14a: OK test14a: OK test14a: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test14b: OK test15a: OK test15a: OK test15a: OK test15a: OK test15a: OK test15a: OK test15a: OK test15a: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test15b: OK test16a: OK test16a: OK test16a: OK test16a: OK test16a: OK test16a: OK test16a: OK test16a: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test16b: OK test17a: OK test17a: OK test17a: OK test17a: OK test17a: OK test17a: OK test17a: OK test17a: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test17b: OK test18: OK test19a: OK test19b: OK test19c: OK test19d: OK test20a: OK test20b: OK test20c: OK test20d: OK test21a: OK test21b: OK
{ "pile_set_name": "Github" }
// // PullToBounseScrollViewWrapper.swift // Bounse // // Created by Takuya Okamoto on 2015/08/12. // Copyright (c) 2015年 Uniface. All rights reserved. // // Inspired by https://dribbble.com/shots/1797373-Pull-Down-To-Refresh import UIKit // FIXME: comparison operators with optionals were removed from the Swift Standard Libary. // Consider refactoring the code to use the non-optional operators. fileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool { switch (lhs, rhs) { case let (l?, r?): return l < r case (nil, _?): return true default: return false } } open class PullToBounceWrapper: UIView { var pullDist: CGFloat = 80 var bendDist: CGFloat = 40 var stopPos:CGFloat { get { return pullDist + bendDist } } open var didPullToRefresh: (()->())? var bounceView: BounceView! open var scrollView: UIScrollView? /** Please addSubView this insted of your scrollView. The only required parameter is scrollView. And you can customize animation by other parameters. */ public init( scrollView: UIScrollView, bounceDuration: CFTimeInterval = 0.8, ballSize:CGFloat = 36, ballMoveTimingFunc:CAMediaTimingFunction = CAMediaTimingFunction(controlPoints:0.49,0.13,0.29,1.61), moveUpDuration:CFTimeInterval = 0.25, pullDistance: CGFloat = 96, bendDistance: CGFloat = 40, didPullToRefresh: (()->())? = nil ) { if scrollView.frame == CGRect.zero { assert(false, "Wow, scrollView.frame is CGRectZero. Please set frame size.") } super.init(frame: scrollView.frame) self.pullDist = pullDistance self.bendDist = bendDistance self.didPullToRefresh = didPullToRefresh let moveUpDist = pullDist/2 + ballSize/2 bounceView = BounceView( frame: scrollView.frame , bounceDuration: bounceDuration , ballSize: ballSize , ballMoveTimingFunc: ballMoveTimingFunc , moveUpDuration: moveUpDuration , moveUpDist: moveUpDist , color: scrollView.backgroundColor ) self.addSubview(bounceView) self.scrollView = scrollView // scrollView.frame = self.frame scrollView.backgroundColor = UIColor.clear self.addSubview(scrollView) scrollView.addObserver(self, forKeyPath: contentOffsetKeyPath, options: .initial, context: &KVOContext) } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } deinit { scrollView?.removeObserver(self, forKeyPath: contentOffsetKeyPath, context: &KVOContext) } func scrollViewDidScroll() { if scrollView?.contentOffset.y < 0 { let y = scrollView!.contentOffset.y * -1 if y < pullDist { bounceView.frame.y = y bounceView.wave(0) scrollView?.alpha = (pullDist - y)/pullDist } else if y < stopPos { bounceView.wave(y - pullDist) scrollView?.alpha = 0 } else if y > stopPos { scrollView?.isScrollEnabled = false scrollView?.setContentOffset(CGPoint(x: scrollView!.contentOffset.x, y: -stopPos), animated: false) bounceView.frame.y = pullDist bounceView.wave(stopPos - pullDist) bounceView.didRelease(stopPos - pullDist) self.didPullToRefresh?() scrollView?.alpha = 0 } } else { bounceView.frame.y = 0 scrollView?.alpha = 1 } } open func stopLoadingAnimation() { bounceView.endingAnimation { self.scrollView?.setContentOffset(CGPoint(x: 0, y: 0), animated: true) self.scrollView?.isScrollEnabled = true } } // MARK: ScrollView KVO fileprivate var KVOContext = "PullToRefreshKVOContext" fileprivate let contentOffsetKeyPath = "contentOffset" open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { if (context == &KVOContext && keyPath == contentOffsetKeyPath && object as? UIScrollView == scrollView) { scrollViewDidScroll() } else { super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context) } } }
{ "pile_set_name": "Github" }
Car 0.00 0 1.8809690038349967 234.79 189.26 469.38 322.54 1.3722466084925842 1.6332377495901131 3.7221710105762864 -3.34 1.70 10.02 1.5592184494383545 0.9999989 Car 0.00 1 1.2304826835778098 382.44 167.04 530.35 272.51 1.5127868041215848 1.673821802503004 4.126941817008056 -2.88 1.70 14.33 1.0321479048977007 0.9935822 Van 0.00 1 1.3474818179991583 888.60 114.57 1159.44 229.96 2.278686135553322 1.905588106819017 4.977211078459072 10.32 1.35 18.35 1.8597936546296545 0.96053725 Car 0.00 0 -1.7697476456549506 719.11 180.00 799.11 230.77 1.4865099791257095 1.6391746404306435 3.6350282450542832 4.57 1.69 22.81 -1.5720148745549951 0.9989862 Car 0.00 1 1.5845378870752196 501.69 174.12 573.89 232.52 1.6502403173415374 1.6999751210869694 3.833479296542802 -2.29 1.79 23.48 1.4873155581025377 0.9999975 Car 0.00 1 1.4346274743464331 699.19 169.75 763.55 218.23 1.483752694335432 1.652239291249349 4.046753855548896 4.73 1.69 28.91 1.5968018073136854 0.9996685 Car 0.00 2 -1.5367407845940928 534.65 174.89 583.25 220.42 1.506502418202014 1.610423024064436 3.681210937105217 -1.99 1.78 28.43 -1.6066232859679659 0.97563803 DontCare -1 -1 -1.7658752659943442 639.77 172.94 662.73 185.48 1.5180416669516277 1.6363227984593653 3.8476906736717607 -1000 -1000 -1000 -0.9804771025968959 0.56104344 DontCare -1 -1 -1.6681216369059424 574.15 173.98 608.57 197.98 1.5267016220657539 1.6333212165818953 3.988075079523125 -1000 -1000 -1000 -0.8827234735084941 0.5957506
{ "pile_set_name": "Github" }
// Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef AS_TO_PYTHON_FUNCTION_DWA2002121_HPP # define AS_TO_PYTHON_FUNCTION_DWA2002121_HPP # include <boost/python/converter/to_python_function_type.hpp> namespace boost { namespace python { namespace converter { // Given a typesafe to_python conversion function, produces a // to_python_function_t which can be registered in the usual way. template <class T, class ToPython> struct as_to_python_function { // Assertion functions used to prevent wrapping of converters // which take non-const reference parameters. The T* argument in // the first overload ensures it isn't used in case T is a // reference. template <class U> static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} template <class U> static void convert_function_must_take_value_or_const_reference(U(*)(T const&), long ...) {} static PyObject* convert(void const* x) { convert_function_must_take_value_or_const_reference(&ToPython::convert, 1L); // Yes, the const_cast below opens a hole in const-correctness, // but it's needed to convert auto_ptr<U> to python. // // How big a hole is it? It allows ToPython::convert() to be // a function which modifies its argument. The upshot is that // client converters applied to const objects may invoke // undefined behavior. The damage, however, is limited by the // use of the assertion function. Thus, the only way this can // modify its argument is if T is an auto_ptr-like type. There // is still a const-correctness hole w.r.t. auto_ptr<U> const, // but c'est la vie. return ToPython::convert(*const_cast<T*>(static_cast<T const*>(x))); } #ifndef BOOST_PYTHON_NO_PY_SIGNATURES static PyTypeObject const * get_pytype() { return ToPython::get_pytype(); } #endif }; }}} // namespace boost::python::converter #endif // AS_TO_PYTHON_FUNCTION_DWA2002121_HPP
{ "pile_set_name": "Github" }
// Automatically generated by the Fast Binary Encoding compiler, do not modify! // https://github.com/chronoxor/FastBinaryEncoding // Source: test.fbe // Version: 1.4.0.0 @file:Suppress("UnusedImport", "unused") package com.chronoxor.test.fbe // Fast Binary Encoding EnumTyped final model class FinalModelEnumTyped(buffer: com.chronoxor.fbe.Buffer, offset: Long) : com.chronoxor.fbe.FinalModel(buffer, offset) { // Get the allocation size @Suppress("UNUSED_PARAMETER") fun fbeAllocationSize(value: com.chronoxor.test.EnumTyped): Long = fbeSize // Final size override val fbeSize: Long = 1 // Check if the value is valid override fun verify(): Long { if ((_buffer.offset + fbeOffset + fbeSize) > _buffer.size) return Long.MAX_VALUE return fbeSize } // Get the value fun get(size: com.chronoxor.fbe.Size): com.chronoxor.test.EnumTyped { if ((_buffer.offset + fbeOffset + fbeSize) > _buffer.size) return com.chronoxor.test.EnumTyped() size.value = fbeSize return com.chronoxor.test.EnumTyped(readInt8(fbeOffset)) } // Set the value fun set(value: com.chronoxor.test.EnumTyped): Long { assert((_buffer.offset + fbeOffset + fbeSize) <= _buffer.size) { "Model is broken!" } if ((_buffer.offset + fbeOffset + fbeSize) > _buffer.size) return 0 write(fbeOffset, value.raw) return fbeSize } }
{ "pile_set_name": "Github" }
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This file was automatically generated by informer-gen package core import ( v1 "k8s.io/client-go/informers/core/v1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface } type group struct { internalinterfaces.SharedInformerFactory } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory) Interface { return &group{f} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.New(g.SharedInformerFactory) }
{ "pile_set_name": "Github" }
[section FParsec vs alternatives] The following tables contain a bullet-point comparison between FParsec and the two main alternatives for parsing with F#: parser generator tools (e.g. fslex & fsyacc) and "hand-written" recursive descent parsers. [table Relative advantages [[Parser-generator tools] [FParsec] [Hand-written[br] recursive-descent parser]] [ [ - Declarative and easy-to-read syntax - Ensures adherence to grammar formalism - Can check for certain kinds of ambiguity in grammar - You don't have to think about performance. Either the generated parser is fast enough, or not. There's not much you can do about it. ] [ - Implemented as F# library, so no extra tools or build steps - Parsers are first-class values within the language - Succinct and expressive syntax - Modular and easily extensible - Extensive set of predefined parsers and combinators - Semi-automatically generated, highly readable error messages - Supports arbitrary lookahead and backtracking - Runtime-configurable operator-precedence parser component - Does not require a pre-parsing tokenization phase - Comprehensive documentation - Extensively unit-tested ] [ - No extra tools or build steps - Most amenable to individual requirements - Potentially as fast as technically possible - Parsers are relatively portable if you stick to simple language features and keep library dependencies to a minimum ] ] ] [table Relative disadvantages [[Parser-generator tools] [FParsec] [Hand-written[br] recursive-descent parser]] [ [ - Restricted to features of grammar formalism - Extra tools and compilation steps - Reliance on opaque generator tool, that is often hard to debug, optimize or extend - Static grammar that can't be changed at runtime - Often hard to generate good error messages - Many tools generate comparatively slow parsers - Some tools have only limited Unicode support - Portability problems ] [ - Tradeoff between declarativeness and performance - Syntax less readable than PEG or Regular Expression syntax - [url "https://en.wikipedia.org/wiki/Left_recursion" Left-recursive] grammar rules have to be rewritten - Does not support a pre-parsing tokenization phase - You have to learn the API - Limited to F# - Code-dependence on FParsec - Aggressive performance optimizations add complexity to parts of the lower-level FParsec source code ] [ - You have to write everything yourself, which can take a lot of effort - Implementing (fast) parsers requires some experience - Expression (sub)grammars with infix operators can be ugly and inefficient to parse with a pure recursive-descent parser, so you might also have to write some kind of embedded operator precedence parser ] ] ] [/section]
{ "pile_set_name": "Github" }
c c $Id$ c subroutine smd_leapf_shake(natms, > ntcons, > tstep, > ekin, > mass, > icon1, > icon2, > consdist, > ncc, > nvv, > dcc, > nrij, > orij, > fff, > vvv, > ccc) implicit none c integer natms integer ntcons double precision tstep double precision ekin double precision mass(natms) integer icon1(ntcons) integer icon2(ntcons) double precision consdist(ntcons) double precision ncc(3,natms),nvv(3,natms),dcc(3,natms) double precision nrij(3,ntcons),orij(3,ntcons) double precision fff(3,natms) double precision vvv(3,natms) double precision ccc(3,natms) integer i,j,it,maxit,iatm1,iatm2 double precision force,rma,rmb double precision tmpvx,tmpvy,tmpvz double precision tstepsq,rtstep,tol,mxdiff double precision nrijsq,dijsq,diffsq,dotprod character*(42) pname pname = "smd_leapf_shake" write(*,*) "in "//pname ekin=0.0 tstepsq=tstep**2 rtstep=1.0/tstep tol=1.0d-8 maxit=100 mxdiff = 0.0d0 do i=1,ntcons iatm1=icon1(i) iatm2=icon2(i) orij(1,i)=ccc(1,iatm1)-ccc(1,iatm2) orij(2,i)=ccc(2,iatm1)-ccc(2,iatm2) orij(3,i)=ccc(3,iatm1)-ccc(3,iatm2) enddo call smd_lat_rebox(ntcons,orij) do i=1,natms ncc(1,i)=ccc(1,i) ncc(2,i)=ccc(2,i) ncc(3,i)=ccc(3,i) nvv(1,i)=vvv(1,i)+fff(1,i)*tstep/mass(i) nvv(2,i)=vvv(2,i)+fff(2,i)*tstep/mass(i) nvv(3,i)=vvv(3,i)+fff(3,i)*tstep/mass(i) ccc(1,i)=ncc(1,i)+tstep*nvv(1,i) ccc(2,i)=ncc(2,i)+tstep*nvv(2,i) ccc(3,i)=ncc(3,i)+tstep*nvv(3,i) enddo do i=1,maxit do j=1,ntcons iatm1=icon1(j) iatm2=icon2(j) nrij(1,j)=ccc(1,iatm1)-ccc(1,iatm2) nrij(2,j)=ccc(2,iatm1)-ccc(2,iatm2) nrij(3,j)=ccc(3,iatm1)-ccc(3,iatm2) enddo call smd_lat_rebox(ntcons,nrij) do j=1,natms dcc(1,j)=0.0 dcc(2,j)=0.0 dcc(3,j)=0.0 enddo do j=1,ntcons iatm1=icon1(j) iatm2=icon2(j) nrijsq=nrij(1,j)**2+nrij(2,j)**2+nrij(3,j)**2 dijsq=consdist(j)**2 diffsq=dijsq-nrijsq mxdiff=max(mxdiff,abs(diffsq)/consdist(j)) dotprod=orij(1,j)*nrij(1,j) $ +orij(2,j)*nrij(2,j) $ +orij(3,j)*nrij(3,j) rma= tstepsq/mass(iatm1) rmb=-tstepsq/mass(iatm2) force=diffsq/(-2.0*(rma-rmb)*dotprod) dcc(1,iatm1)=dcc(1,iatm1)-rma*orij(1,j)*force dcc(2,iatm1)=dcc(2,iatm1)-rma*orij(2,j)*force dcc(3,iatm1)=dcc(3,iatm1)-rma*orij(3,j)*force dcc(1,iatm2)=dcc(1,iatm2)-rmb*orij(1,j)*force dcc(2,iatm2)=dcc(2,iatm2)-rmb*orij(2,j)*force dcc(3,iatm2)=dcc(3,iatm2)-rmb*orij(3,j)*force enddo do j=1,ntcons iatm1=icon1(j) iatm2=icon2(j) ccc(1,iatm1)=ccc(1,iatm1)+0.5*dcc(1,iatm1) ccc(2,iatm1)=ccc(2,iatm1)+0.5*dcc(2,iatm1) ccc(3,iatm1)=ccc(3,iatm1)+0.5*dcc(3,iatm1) ccc(1,iatm2)=ccc(1,iatm2)+0.5*dcc(1,iatm2) ccc(2,iatm2)=ccc(2,iatm2)+0.5*dcc(2,iatm2) ccc(3,iatm2)=ccc(3,iatm2)+0.5*dcc(3,iatm2) enddo mxdiff=mxdiff*0.5 if(mxdiff.lt.tol)goto 100 enddo 100 continue do i=1,natms nvv(1,i)=(ccc(1,i)-ncc(1,i))*rtstep nvv(2,i)=(ccc(2,i)-ncc(2,i))*rtstep nvv(3,i)=(ccc(3,i)-ncc(3,i))*rtstep tmpvx=0.5*(nvv(1,i)+vvv(1,i)) tmpvy=0.5*(nvv(2,i)+vvv(2,i)) tmpvz=0.5*(nvv(3,i)+vvv(3,i)) ekin=ekin+mass(i)*(tmpvx**2+tmpvy**2+tmpvz**2) fff(1,i)=(nvv(1,i)-vvv(1,i))*mass(i)*rtstep fff(2,i)=(nvv(2,i)-vvv(2,i))*mass(i)*rtstep fff(3,i)=(nvv(3,i)-vvv(3,i))*mass(i)*rtstep vvv(1,i)=nvv(1,i) vvv(2,i)=nvv(2,i) vvv(3,i)=nvv(3,i) enddo ekin=0.5*ekin write(*,*) "out "//pname return END
{ "pile_set_name": "Github" }
package yundun_bastionhost //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. // // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // InstanceInDescribeInstances is a nested struct in yundun_bastionhost response type InstanceInDescribeInstances struct { InstanceId string `json:"InstanceId" xml:"InstanceId"` RegionId string `json:"RegionId" xml:"RegionId"` NetworkType string `json:"NetworkType" xml:"NetworkType"` IntranetIp string `json:"IntranetIp" xml:"IntranetIp"` InternetIp string `json:"InternetIp" xml:"InternetIp"` InstanceStatus int `json:"InstanceStatus" xml:"InstanceStatus"` StartTime int64 `json:"StartTime" xml:"StartTime"` ExpireTime int64 `json:"ExpireTime" xml:"ExpireTime"` VpcId string `json:"VpcId" xml:"VpcId"` VswitchId string `json:"VswitchId" xml:"VswitchId"` Description string `json:"Description" xml:"Description"` }
{ "pile_set_name": "Github" }
/* Copyright Barrett Adair 2016-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt) */ #include <boost/callable_traits/remove_transaction_safe.hpp> #include <tuple> #include "test.hpp" #ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE int main(){} #else template<typename T> struct is_substitution_failure_remove_tx_safe { template<typename> static auto test(...) -> std::true_type; template<typename A, typename std::remove_reference< TRAIT(remove_transaction_safe, A)>::type* = nullptr> static auto test(int) -> std::false_type; static constexpr bool value = decltype(test<T>(0))::value; }; struct foo; int main() { auto lambda = [](){}; CT_ASSERT(is_substitution_failure_remove_tx_safe<decltype(lambda)>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<decltype(lambda)&>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int &>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int (* const &)()>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* &)()>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* const)()>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* const &)()>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* volatile)()>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<void>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<void*>::value); CT_ASSERT(is_substitution_failure_remove_tx_safe<void(**)()>::value); } #endif //#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
{ "pile_set_name": "Github" }
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ #ifndef UNICODE #define UNICODE #endif #include "WebServices.h" #include "process.h" #include "stdio.h" #include "string.h" // Print out rich error info void PrintError(HRESULT errorCode, WS_ERROR* error) { wprintf(L"Failure: errorCode=0x%lx\n", errorCode); if (errorCode == E_INVALIDARG || errorCode == WS_E_INVALID_OPERATION) { // Correct use of the APIs should never generate these errors wprintf(L"The error was due to an invalid use of an API. This is likely due to a bug in the program.\n"); DebugBreak(); } HRESULT hr = NOERROR; if (error != NULL) { ULONG errorCount; hr = WsGetErrorProperty(error, WS_ERROR_PROPERTY_STRING_COUNT, &errorCount, sizeof(errorCount)); if (FAILED(hr)) { goto Exit; } for (ULONG i = 0; i < errorCount; i++) { WS_STRING string; hr = WsGetErrorString(error, i, &string); if (FAILED(hr)) { goto Exit; } wprintf(L"%.*s\n", string.length, string.chars); } } Exit: if (FAILED(hr)) { wprintf(L"Could not get error string (errorCode=0x%lx)\n", hr); } } static const WS_XML_STRING valueLocalName = WS_XML_STRING_VALUE("value"); static const WS_XML_STRING valueNs = WS_XML_STRING_VALUE(""); static const char xml[] = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" "<value>Hello World.</value>"; // Main entry point int __cdecl wmain(int argc, __in_ecount(argc) wchar_t **argv) { UNREFERENCED_PARAMETER(argc); UNREFERENCED_PARAMETER(argv); HRESULT hr = NOERROR; WS_ERROR* error = NULL; WS_XML_READER* reader = NULL; // Create an error object for storing rich error information hr = WsCreateError( NULL, 0, &error); if (FAILED(hr)) { goto Exit; } // Create an XML reader hr = WsCreateReader( NULL, 0, &reader, error); if (FAILED(hr)) { goto Exit; } // Setup the input WS_XML_READER_BUFFER_INPUT bufferInput; ZeroMemory( &bufferInput, sizeof(bufferInput)); bufferInput.input.inputType = WS_XML_READER_INPUT_TYPE_BUFFER; bufferInput.encodedData = (BYTE*)xml; bufferInput.encodedDataSize = sizeof(xml) - 1; // Setup the encoding WS_XML_READER_TEXT_ENCODING textEncoding; ZeroMemory( &textEncoding, sizeof(textEncoding)); textEncoding.encoding.encodingType = WS_XML_READER_ENCODING_TYPE_TEXT; textEncoding.charSet = WS_CHARSET_AUTO; // Setup the reader hr = WsSetInput( reader, &textEncoding.encoding, &bufferInput.input, NULL, 0, error); if (FAILED(hr)) { goto Exit; } hr = WsReadToStartElement( reader, &valueLocalName, &valueNs, NULL, error); if (FAILED(hr)) { goto Exit; } hr = WsReadStartElement( reader, error); if (FAILED(hr)) { goto Exit; } for (;;) { WCHAR chars[128]; ULONG charCount; hr = WsReadChars( reader, chars, 128, &charCount, error); if (FAILED(hr)) { goto Exit; } if (charCount == 0) { break; } wprintf(L"%.*s", charCount, chars); } wprintf(L"\n"); hr = WsReadEndElement( reader, error); if (FAILED(hr)) { goto Exit; } Exit: if (FAILED(hr)) { // Print out the error PrintError(hr, error); } fflush( stdout); if (reader != NULL) { WsFreeReader(reader); } if (error != NULL) { WsFreeError(error); } fflush(stdout); return SUCCEEDED(hr) ? 0 : -1; }
{ "pile_set_name": "Github" }
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2016, Knut Reinert, FU Berlin // 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 Knut Reinert or the FU Berlin 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 KNUT REINERT OR THE FU BERLIN 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. // // ========================================================================== // Author: Tobias Rausch <rausch@embl.de> // Author: Anne-Katrin Emde <anne-katrin.emde@fu-berlin.de> // ========================================================================== #ifndef SEQAN_INCLUDE_SEQAN_GRAPH_ALGORITHM_REFINE_ALIGN_H_ #define SEQAN_INCLUDE_SEQAN_GRAPH_ALGORITHM_REFINE_ALIGN_H_ namespace seqan { /////////////////////////////////////////////////////////////////////////////////////////////////////// //Functions for Align<TSource,TSpec> //project onto other sequence template<typename TSource,typename TSpec,typename TValue, typename TId1, typename TPos1, typename TId2, typename TPos2,typename TMap> void _getOtherSequenceAndProject(Align<TSource,TSpec> & segment, TValue seg_num, TMap & seq_map, TId1 , TPos1 node_i, TId2 & seq_j_id, TPos2 & node_j) { if(seg_num == 0) { seq_j_id = seq_map[getObjectId(source(row(segment, 1)))]; TPos1 view_clipped_end_pos = clippedEndPosition(row(segment,0)) - clippedBeginPosition(row(segment, 0)); if(node_i >= (TPos1)toSourcePosition(row(segment, 0), view_clipped_end_pos)) node_j = static_cast<TPos2>(-1); else node_j = toSourcePosition(row(segment, 1), toViewPosition(row(segment, 0), node_i)); } else { seq_j_id = seq_map[getObjectId(source(row(segment, 0)))]; TPos1 view_clipped_end_pos = clippedEndPosition(row(segment, 1)) - clippedBeginPosition(row(segment, 1)); if(node_i >= (TPos1)toSourcePosition(row(segment, 1), view_clipped_end_pos)) node_j = static_cast<TPos2>(-1); else node_j = toSourcePosition(row(segment, 0), toViewPosition(row(segment, 1), node_i)); } } //unspektakul�re funktion, die die int ID zur�ckgibt (braucht man damit es f�r alle alignment typen geht) //template<typename TSource,typename TSpec, typename TValue, typename TSeqMap> //int //_getSeqMapId(TSeqMap & seq_map, // Align<TSource,TSpec> & segment, // TValue seq_i) //{ // return seq_map[getObjectId(source(row(segment,seq_i)))]; //} // //given seq and segment, get the sequenceId (seq_i) and its begin and end //if seq = 0 get first sequence (that takes part in the segment match) //if seq = 1 get second sequence template<typename TAliSource,typename TAliSpec, typename TId, typename TPosition, typename TId2> void _getSeqBeginAndEnd(Align<TAliSource,TAliSpec> & segment, std::map<const void * ,int> & seq_map, TId & seq_i_id, TPosition & begin_i, TPosition & end_i, TId2 seq) { seq_i_id = seq_map[getObjectId(source(row(segment,seq)))]; begin_i = clippedBeginPosition(row(segment, seq)); end_i = toSourcePosition(row(segment, seq), clippedEndPosition(row(segment, seq)) - begin_i); } //////////////////////////////////////////////////////////////////////////////////////// // 50000 _getRefinedMatchScore Functions //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////// //TODO(singer): Remove this forward template <typename T> struct Row; //for Align<TAliSource,TAliSpec> //get score for alignment of length len starting at pos_i on first sequence //and pos_j on second sequence template<typename TScoreValue,typename TScoreSpec,typename TStringSet,typename TAliSource,typename TAliSpec,typename TValue> TScoreValue _getRefinedMatchScore(Score<TScoreValue,TScoreSpec> & score_type, TStringSet &, Align<TAliSource,TAliSpec> & segment, TValue pos_i, TValue pos_j, TValue len, TValue) { typedef Align<TAliSource,TAliSpec> TAlign; typedef typename Row<TAlign>::Type TRow; // typedef typename Iterator<TRow,GapsIterator<ArrayGaps> >::Type TIterator; typedef typename Iterator<TRow, Rooted>::Type TIterator; TIterator row0_it, row1_it; row0_it = iter(row(segment,0),toViewPosition(row(segment,0),pos_i)); row1_it = iter(row(segment,1),toViewPosition(row(segment,1),pos_j)); len = toViewPosition(row(segment,0),pos_i + len) - toViewPosition(row(segment,0),pos_i); TValue i = 0; TScoreValue ret_score = 0; while(i < len) { if(isGap(row1_it)||isGap(row0_it)) ret_score += scoreGapExtend(score_type); else ret_score += score(score_type,getValue(row0_it),getValue(row1_it)); ++i; ++row0_it; ++row1_it; } return ret_score; } //get score for alignment starting at pos_i on first sequence //and pos_j on second sequence, if len1!=len2 then the refinement //process was stopped (the cut is not exact) //template<typename TScore,typename TStringSet, typename TAliSource,typename TAliSpec,typename TValue> //typename Value<TScore>::Type //_getRefinedMatchScore(TScore & score_type, // TStringSet &, // Align<TAliSource,TAliSpec> & segment, // TValue pos_i, // TValue pos_j, // TValue len1, // TValue len2) //{ // typedef Align<TAliSource,TAliSpec> TAlign; // typedef typename Row<TAlign>::Type TRow; // typedef typename Iterator<TRow>::Type TIterator; // TIterator row0_it, row1_it; // TValue len; // row0_it = iter(row(segment,0),toViewPosition(row(segment,0),pos_i)); // row1_it = iter(row(segment,1),toViewPosition(row(segment,1),pos_j)); // len1 = toViewPosition(row(segment,0),pos_i + len1) - toViewPosition(row(segment,0),pos_i); // len2 = toViewPosition(row(segment,1),pos_j + len2) - toViewPosition(row(segment,1),pos_j); // len = (len1 < len2) ? len1 : len2; // int i = 0; // typename Value<TScore>::Type ret_score = 0; // // //calculate score for aligned region // while(i < len) // { // ret_score += score(score_type,getValue(row0_it),getValue(row1_it)); // ++i; // ++row0_it; // ++row1_it; // } // //fill up with gaps if one sequence is longer than the other // len = (len1 > len2) ? len1 : len2; // ret_score += (len - i) * scoreGapExtend(score_type); // // return ret_score; //} } // namespace seqan #endif // #ifndef SEQAN_INCLUDE_SEQAN_GRAPH_ALGORITHM_REFINE_ALIGN_H_
{ "pile_set_name": "Github" }
gcr.io/google_containers/kube-controller-manager:v1.13.0-alpha.3
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0-only */ /* * cs35l35.h -- CS35L35 ALSA SoC audio driver * * Copyright 2016 Cirrus Logic, Inc. * * Author: Brian Austin <brian.austin@cirrus.com> */ #ifndef __CS35L35_H__ #define __CS35L35_H__ #define CS35L35_FIRSTREG 0x01 #define CS35L35_LASTREG 0x7E #define CS35L35_CHIP_ID 0x00035A35 #define CS35L35_DEVID_AB 0x01 /* Device ID A & B [RO] */ #define CS35L35_DEVID_CD 0x02 /* Device ID C & D [RO] */ #define CS35L35_DEVID_E 0x03 /* Device ID E [RO] */ #define CS35L35_FAB_ID 0x04 /* Fab ID [RO] */ #define CS35L35_REV_ID 0x05 /* Revision ID [RO] */ #define CS35L35_PWRCTL1 0x06 /* Power Ctl 1 */ #define CS35L35_PWRCTL2 0x07 /* Power Ctl 2 */ #define CS35L35_PWRCTL3 0x08 /* Power Ctl 3 */ #define CS35L35_CLK_CTL1 0x0A /* Clocking Ctl 1 */ #define CS35L35_CLK_CTL2 0x0B /* Clocking Ctl 2 */ #define CS35L35_CLK_CTL3 0x0C /* Clocking Ctl 3 */ #define CS35L35_SP_FMT_CTL1 0x0D /* Serial Port Format CTL1 */ #define CS35L35_SP_FMT_CTL2 0x0E /* Serial Port Format CTL2 */ #define CS35L35_SP_FMT_CTL3 0x0F /* Serial Port Format CTL3 */ #define CS35L35_MAG_COMP_CTL 0x13 /* Magnitude Comp CTL */ #define CS35L35_AMP_INP_DRV_CTL 0x14 /* Amp Input Drive Ctl */ #define CS35L35_AMP_DIG_VOL_CTL 0x15 /* Amplifier Dig Volume Ctl */ #define CS35L35_AMP_DIG_VOL 0x16 /* Amplifier Dig Volume */ #define CS35L35_ADV_DIG_VOL 0x17 /* Advisory Digital Volume */ #define CS35L35_PROTECT_CTL 0x18 /* Amp Gain - Prot Ctl Param */ #define CS35L35_AMP_GAIN_AUD_CTL 0x19 /* Amp Serial Port Gain Ctl */ #define CS35L35_AMP_GAIN_PDM_CTL 0x1A /* Amplifier Gain PDM Ctl */ #define CS35L35_AMP_GAIN_ADV_CTL 0x1B /* Amplifier Gain Ctl */ #define CS35L35_GPI_CTL 0x1C /* GPI Ctl */ #define CS35L35_BST_CVTR_V_CTL 0x1D /* Boost Conv Voltage Ctl */ #define CS35L35_BST_PEAK_I 0x1E /* Boost Conv Peak Current */ #define CS35L35_BST_RAMP_CTL 0x20 /* Boost Conv Soft Ramp Ctl */ #define CS35L35_BST_CONV_COEF_1 0x21 /* Boost Conv Coefficients 1 */ #define CS35L35_BST_CONV_COEF_2 0x22 /* Boost Conv Coefficients 2 */ #define CS35L35_BST_CONV_SLOPE_COMP 0x23 /* Boost Conv Slope Comp */ #define CS35L35_BST_CONV_SW_FREQ 0x24 /* Boost Conv L BST SW Freq */ #define CS35L35_CLASS_H_CTL 0x30 /* CLS H Control */ #define CS35L35_CLASS_H_HEADRM_CTL 0x31 /* CLS H Headroom Ctl */ #define CS35L35_CLASS_H_RELEASE_RATE 0x32 /* CLS H Release Rate */ #define CS35L35_CLASS_H_FET_DRIVE_CTL 0x33 /* CLS H Weak FET Drive Ctl */ #define CS35L35_CLASS_H_VP_CTL 0x34 /* CLS H VP Ctl */ #define CS35L35_CLASS_H_STATUS 0x38 /* CLS H Status */ #define CS35L35_VPBR_CTL 0x3A /* VPBR Ctl */ #define CS35L35_VPBR_VOL_CTL 0x3B /* VPBR Volume Ctl */ #define CS35L35_VPBR_TIMING_CTL 0x3C /* VPBR Timing Ctl */ #define CS35L35_VPBR_MODE_VOL_CTL 0x3D /* VPBR Mode/Attack Vol Ctl */ #define CS35L35_VPBR_ATTEN_STATUS 0x4B /* VPBR Attenuation Status */ #define CS35L35_SPKR_MON_CTL 0x4E /* Speaker Monitoring Ctl */ #define CS35L35_IMON_SCALE_CTL 0x51 /* IMON Scale Ctl */ #define CS35L35_AUDIN_RXLOC_CTL 0x52 /* Audio Input RX Loc Ctl */ #define CS35L35_ADVIN_RXLOC_CTL 0x53 /* Advisory Input RX Loc Ctl */ #define CS35L35_VMON_TXLOC_CTL 0x54 /* VMON TX Loc Ctl */ #define CS35L35_IMON_TXLOC_CTL 0x55 /* IMON TX Loc Ctl */ #define CS35L35_VPMON_TXLOC_CTL 0x56 /* VPMON TX Loc Ctl */ #define CS35L35_VBSTMON_TXLOC_CTL 0x57 /* VBSTMON TX Loc Ctl */ #define CS35L35_VPBR_STATUS_TXLOC_CTL 0x58 /* VPBR Status TX Loc Ctl */ #define CS35L35_ZERO_FILL_LOC_CTL 0x59 /* Zero Fill Loc Ctl */ #define CS35L35_AUDIN_DEPTH_CTL 0x5A /* Audio Input Depth Ctl */ #define CS35L35_SPKMON_DEPTH_CTL 0x5B /* SPK Mon Output Depth Ctl */ #define CS35L35_SUPMON_DEPTH_CTL 0x5C /* Supply Mon Out Depth Ctl */ #define CS35L35_ZEROFILL_DEPTH_CTL 0x5D /* Zero Fill Mon Output Ctl */ #define CS35L35_MULT_DEV_SYNCH1 0x62 /* Multidevice Synch */ #define CS35L35_MULT_DEV_SYNCH2 0x63 /* Multidevice Synch 2 */ #define CS35L35_PROT_RELEASE_CTL 0x64 /* Protection Release Ctl */ #define CS35L35_DIAG_MODE_REG_LOCK 0x68 /* Diagnostic Mode Reg Lock */ #define CS35L35_DIAG_MODE_CTL_1 0x69 /* Diagnostic Mode Ctl 1 */ #define CS35L35_DIAG_MODE_CTL_2 0x6A /* Diagnostic Mode Ctl 2 */ #define CS35L35_INT_MASK_1 0x70 /* Interrupt Mask 1 */ #define CS35L35_INT_MASK_2 0x71 /* Interrupt Mask 2 */ #define CS35L35_INT_MASK_3 0x72 /* Interrupt Mask 3 */ #define CS35L35_INT_MASK_4 0x73 /* Interrupt Mask 4 */ #define CS35L35_INT_STATUS_1 0x74 /* Interrupt Status 1 */ #define CS35L35_INT_STATUS_2 0x75 /* Interrupt Status 2 */ #define CS35L35_INT_STATUS_3 0x76 /* Interrupt Status 3 */ #define CS35L35_INT_STATUS_4 0x77 /* Interrupt Status 4 */ #define CS35L35_PLL_STATUS 0x78 /* PLL Status */ #define CS35L35_OTP_TRIM_STATUS 0x7E /* OTP Trim Status */ #define CS35L35_MAX_REGISTER 0x7F /* CS35L35_PWRCTL1 */ #define CS35L35_SFT_RST 0x80 #define CS35L35_DISCHG_FLT 0x02 #define CS35L35_PDN_ALL 0x01 /* CS35L35_PWRCTL2 */ #define CS35L35_PDN_VMON 0x80 #define CS35L35_PDN_IMON 0x40 #define CS35L35_PDN_CLASSH 0x20 #define CS35L35_PDN_VPBR 0x10 #define CS35L35_PDN_BST 0x04 #define CS35L35_PDN_AMP 0x01 /* CS35L35_PWRCTL3 */ #define CS35L35_PDN_VBSTMON_OUT 0x10 #define CS35L35_PDN_VMON_OUT 0x08 #define CS35L35_AUDIN_DEPTH_MASK 0x03 #define CS35L35_AUDIN_DEPTH_SHIFT 0 #define CS35L35_ADVIN_DEPTH_MASK 0x0C #define CS35L35_ADVIN_DEPTH_SHIFT 2 #define CS35L35_SDIN_DEPTH_8 0x01 #define CS35L35_SDIN_DEPTH_16 0x02 #define CS35L35_SDIN_DEPTH_24 0x03 #define CS35L35_SDOUT_DEPTH_8 0x01 #define CS35L35_SDOUT_DEPTH_12 0x02 #define CS35L35_SDOUT_DEPTH_16 0x03 #define CS35L35_AUD_IN_LR_MASK 0x80 #define CS35L35_AUD_IN_LR_SHIFT 7 #define CS35L35_ADV_IN_LR_MASK 0x80 #define CS35L35_ADV_IN_LR_SHIFT 7 #define CS35L35_AUD_IN_LOC_MASK 0x0F #define CS35L35_AUD_IN_LOC_SHIFT 0 #define CS35L35_ADV_IN_LOC_MASK 0x0F #define CS35L35_ADV_IN_LOC_SHIFT 0 #define CS35L35_IMON_DEPTH_MASK 0x03 #define CS35L35_IMON_DEPTH_SHIFT 0 #define CS35L35_VMON_DEPTH_MASK 0x0C #define CS35L35_VMON_DEPTH_SHIFT 2 #define CS35L35_VBSTMON_DEPTH_MASK 0x03 #define CS35L35_VBSTMON_DEPTH_SHIFT 0 #define CS35L35_VPMON_DEPTH_MASK 0x0C #define CS35L35_VPMON_DEPTH_SHIFT 2 #define CS35L35_VPBRSTAT_DEPTH_MASK 0x30 #define CS35L35_VPBRSTAT_DEPTH_SHIFT 4 #define CS35L35_ZEROFILL_DEPTH_MASK 0x03 #define CS35L35_ZEROFILL_DEPTH_SHIFT 0x00 #define CS35L35_MON_TXLOC_MASK 0x3F #define CS35L35_MON_TXLOC_SHIFT 0 #define CS35L35_MON_FRM_MASK 0x80 #define CS35L35_MON_FRM_SHIFT 7 #define CS35L35_IMON_SCALE_MASK 0xF8 #define CS35L35_IMON_SCALE_SHIFT 3 #define CS35L35_MS_MASK 0x80 #define CS35L35_MS_SHIFT 7 #define CS35L35_SPMODE_MASK 0x40 #define CS35L35_SP_DRV_MASK 0x10 #define CS35L35_SP_DRV_SHIFT 4 #define CS35L35_CLK_CTL2_MASK 0xFF #define CS35L35_PDM_MODE_MASK 0x40 #define CS35L35_PDM_MODE_SHIFT 6 #define CS35L35_CLK_SOURCE_MASK 0x03 #define CS35L35_CLK_SOURCE_SHIFT 0 #define CS35L35_CLK_SOURCE_MCLK 0 #define CS35L35_CLK_SOURCE_SCLK 1 #define CS35L35_CLK_SOURCE_PDM 2 #define CS35L35_SP_SCLKS_MASK 0x0F #define CS35L35_SP_SCLKS_SHIFT 0x00 #define CS35L35_SP_SCLKS_16FS 0x03 #define CS35L35_SP_SCLKS_32FS 0x07 #define CS35L35_SP_SCLKS_48FS 0x0B #define CS35L35_SP_SCLKS_64FS 0x0F #define CS35L35_SP_RATE_MASK 0xC0 #define CS35L35_PDN_BST_MASK 0x06 #define CS35L35_PDN_BST_FETON_SHIFT 1 #define CS35L35_PDN_BST_FETOFF_SHIFT 2 #define CS35L35_PWR2_PDN_MASK 0xE0 #define CS35L35_PWR3_PDN_MASK 0x1E #define CS35L35_PDN_ALL_MASK 0x01 #define CS35L35_DISCHG_FILT_MASK 0x02 #define CS35L35_DISCHG_FILT_SHIFT 1 #define CS35L35_MCLK_DIS_MASK 0x04 #define CS35L35_MCLK_DIS_SHIFT 2 #define CS35L35_BST_CTL_MASK 0x7F #define CS35L35_BST_CTL_SHIFT 0 #define CS35L35_BST_IPK_MASK 0x1F #define CS35L35_BST_IPK_SHIFT 0 #define CS35L35_AMP_MUTE_MASK 0x20 #define CS35L35_AMP_MUTE_SHIFT 5 #define CS35L35_AMP_GAIN_ZC_MASK 0x10 #define CS35L35_AMP_GAIN_ZC_SHIFT 4 #define CS35L35_AMP_DIGSFT_MASK 0x02 #define CS35L35_AMP_DIGSFT_SHIFT 1 /* CS35L35_SP_FMT_CTL3 */ #define CS35L35_SP_I2S_DRV_MASK 0x03 #define CS35L35_SP_I2S_DRV_SHIFT 0 /* Boost Converter Config */ #define CS35L35_BST_CONV_COEFF_MASK 0xFF #define CS35L35_BST_CONV_SLOPE_MASK 0xFF #define CS35L35_BST_CONV_LBST_MASK 0x03 #define CS35L35_BST_CONV_SWFREQ_MASK 0xF0 /* Class H Algorithm Control */ #define CS35L35_CH_STEREO_MASK 0x40 #define CS35L35_CH_STEREO_SHIFT 6 #define CS35L35_CH_BST_OVR_MASK 0x04 #define CS35L35_CH_BST_OVR_SHIFT 2 #define CS35L35_CH_BST_LIM_MASK 0x08 #define CS35L35_CH_BST_LIM_SHIFT 3 #define CS35L35_CH_MEM_DEPTH_MASK 0x01 #define CS35L35_CH_MEM_DEPTH_SHIFT 0 #define CS35L35_CH_HDRM_CTL_MASK 0x3F #define CS35L35_CH_HDRM_CTL_SHIFT 0 #define CS35L35_CH_REL_RATE_MASK 0xFF #define CS35L35_CH_REL_RATE_SHIFT 0 #define CS35L35_CH_WKFET_DIS_MASK 0x80 #define CS35L35_CH_WKFET_DIS_SHIFT 7 #define CS35L35_CH_WKFET_DEL_MASK 0x70 #define CS35L35_CH_WKFET_DEL_SHIFT 4 #define CS35L35_CH_WKFET_THLD_MASK 0x0F #define CS35L35_CH_WKFET_THLD_SHIFT 0 #define CS35L35_CH_VP_AUTO_MASK 0x80 #define CS35L35_CH_VP_AUTO_SHIFT 7 #define CS35L35_CH_VP_RATE_MASK 0x60 #define CS35L35_CH_VP_RATE_SHIFT 5 #define CS35L35_CH_VP_MAN_MASK 0x1F #define CS35L35_CH_VP_MAN_SHIFT 0 /* CS35L35_PROT_RELEASE_CTL */ #define CS35L35_CAL_ERR_RLS 0x80 #define CS35L35_SHORT_RLS 0x04 #define CS35L35_OTW_RLS 0x02 #define CS35L35_OTE_RLS 0x01 /* INT Mask Registers */ #define CS35L35_INT1_CRIT_MASK 0x38 #define CS35L35_INT2_CRIT_MASK 0xEF #define CS35L35_INT3_CRIT_MASK 0xEE #define CS35L35_INT4_CRIT_MASK 0xFF /* PDN DONE Masks */ #define CS35L35_M_PDN_DONE_SHIFT 4 #define CS35L35_M_PDN_DONE_MASK 0x10 /* CS35L35_INT_1 */ #define CS35L35_CAL_ERR 0x80 #define CS35L35_OTP_ERR 0x40 #define CS35L35_LRCLK_ERR 0x20 #define CS35L35_SPCLK_ERR 0x10 #define CS35L35_MCLK_ERR 0x08 #define CS35L35_AMP_SHORT 0x04 #define CS35L35_OTW 0x02 #define CS35L35_OTE 0x01 /* CS35L35_INT_2 */ #define CS35L35_PDN_DONE 0x10 #define CS35L35_VPBR_ERR 0x02 #define CS35L35_VPBR_CLR 0x01 /* CS35L35_INT_3 */ #define CS35L35_BST_HIGH 0x10 #define CS35L35_BST_HIGH_FLAG 0x08 #define CS35L35_BST_IPK_FLAG 0x04 #define CS35L35_LBST_SHORT 0x01 /* CS35L35_INT_4 */ #define CS35L35_VMON_OVFL 0x08 #define CS35L35_IMON_OVFL 0x04 #define CS35L35_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) struct cs35l35_private { struct device *dev; struct cs35l35_platform_data pdata; struct regmap *regmap; struct regulator_bulk_data supplies[2]; int num_supplies; int sysclk; int sclk; bool pdm_mode; bool i2s_mode; bool slave_mode; /* GPIO for /RST */ struct gpio_desc *reset_gpio; struct completion pdn_done; }; static const char * const cs35l35_supplies[] = { "VA", "VP", }; #endif
{ "pile_set_name": "Github" }
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s // CHECK-NOT: Round_ne // CHECK: fptosi // CHECK: IsInf // CHECK: IsNaN // CHECK: IsFinite // CHECK: dot4 // CHECK: Fma // CHECK: dot4 // CHECK: Sqrt // CHECK: FMad // CHECK: IMad // CHECK: UMad float4 n; float4 i; float4 ng; float eta; double a; double b; double c; float x; float y; float z; int ix; int iy; int iz; uint ux; uint uy; uint uz; float4 main(float4 arg : A) : SV_TARGET { int4 i4 = D3DCOLORtoUBYTE4(arg); if (any(i4) || all(i4)) return i4; bool4 inf = isinf(arg); bool4 nan = isnan(arg); bool4 isf = isfinite(arg); if (any(inf)) return inf; if (all(nan)) return nan; if (any(isf)) return isf; float4 ff = faceforward(n, i, ng); double ma = fma(a, b, c); float st = step(y, x) + smoothstep(y, x, 0.3); float4 ref = refract(i, n, eta); float fmad = mad(x,y,z); int ima = mad(ix,iy,iz); uint uma = mad(ux,uy,uz); return ff + ma + st + ref + fmad + ima + uma; }
{ "pile_set_name": "Github" }
# EE First [![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] [![Gittip][gittip-image]][gittip-url] Get the first event in a set of event emitters and event pairs, then clean up after itself. ## Install ```sh $ npm install ee-first ``` ## API ```js var first = require('ee-first') ``` ### first(arr, listener) Invoke `listener` on the first event from the list specified in `arr`. `arr` is an array of arrays, with each array in the format `[ee, ...event]`. `listener` will be called only once, the first time any of the given events are emitted. If `error` is one of the listened events, then if that fires first, the `listener` will be given the `err` argument. The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the first argument emitted from an `error` event, if applicable; `ee` is the event emitter that fired; `event` is the string event name that fired; and `args` is an array of the arguments that were emitted on the event. ```js var ee1 = new EventEmitter() var ee2 = new EventEmitter() first([ [ee1, 'close', 'end', 'error'], [ee2, 'error'] ], function (err, ee, event, args) { // listener invoked }) ``` #### .cancel() The group of listeners can be cancelled before being invoked and have all the event listeners removed from the underlying event emitters. ```js var thunk = first([ [ee1, 'close', 'end', 'error'], [ee2, 'error'] ], function (err, ee, event, args) { // listener invoked }) // cancel and clean up thunk.cancel() ``` [npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square [npm-url]: https://npmjs.org/package/ee-first [github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square [github-url]: https://github.com/jonathanong/ee-first/tags [travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square [travis-url]: https://travis-ci.org/jonathanong/ee-first [coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square [coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master [license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square [license-url]: LICENSE.md [downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square [downloads-url]: https://npmjs.org/package/ee-first [gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square [gittip-url]: https://www.gittip.com/jonathanong/
{ "pile_set_name": "Github" }
/* this header file is to be removed soon. added for compatibility purpose (1.0.0) */ #include <mruby/error.h>
{ "pile_set_name": "Github" }
package com.simibubi.create.content.contraptions.relays.belt; import static com.simibubi.create.content.contraptions.relays.belt.BeltPart.MIDDLE; import static com.simibubi.create.content.contraptions.relays.belt.BeltSlope.HORIZONTAL; import static net.minecraft.util.Direction.AxisDirection.NEGATIVE; import static net.minecraft.util.Direction.AxisDirection.POSITIVE; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltInventory; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler.TransportedEntityInfo; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltTunnelInteractionHandler; import com.simibubi.create.content.contraptions.relays.belt.transport.ItemHandlerBeltSegment; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult; import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.item.DyeColor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.NBTUtil; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; import net.minecraftforge.client.model.data.IModelData; import net.minecraftforge.client.model.data.ModelDataMap; import net.minecraftforge.client.model.data.ModelProperty; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; public class BeltTileEntity extends KineticTileEntity { public Map<Entity, TransportedEntityInfo> passengers; public int color; public int beltLength; public int index; public Direction lastInsert; public CasingType casing; protected BlockPos controller; protected BeltInventory inventory; protected LazyOptional<IItemHandler> itemHandler; public CompoundNBT trackerUpdateTag; public static enum CasingType { NONE, ANDESITE, BRASS; } public BeltTileEntity(TileEntityType<? extends BeltTileEntity> type) { super(type); controller = BlockPos.ZERO; itemHandler = LazyOptional.empty(); casing = CasingType.NONE; color = -1; } @Override public void addBehaviours(List<TileEntityBehaviour> behaviours) { super.addBehaviours(behaviours); behaviours.add(new DirectBeltInputBehaviour(this).onlyInsertWhen(this::canInsertFrom) .setInsertionHandler(this::tryInsertingFromSide)); behaviours.add(new TransportedItemStackHandlerBehaviour(this, this::applyToAllItems) .withStackPlacement(this::getWorldPositionOf)); } @Override public void tick() { super.tick(); // Init belt if (beltLength == 0) BeltBlock.initBelt(world, pos); if (!AllBlocks.BELT.has(world.getBlockState(pos))) return; if (getSpeed() == 0) return; initializeItemHandler(); // Move Items if (!isController()) return; getInventory().tick(); // Move Entities if (passengers == null) passengers = new HashMap<>(); List<Entity> toRemove = new ArrayList<>(); passengers.forEach((entity, info) -> { boolean canBeTransported = BeltMovementHandler.canBeTransported(entity); boolean leftTheBelt = info.getTicksSinceLastCollision() > ((getBlockState().get(BeltBlock.SLOPE) != HORIZONTAL) ? 3 : 1); if (!canBeTransported || leftTheBelt) { toRemove.add(entity); return; } info.tick(); BeltMovementHandler.transportEntity(this, entity, info); }); toRemove.forEach(passengers::remove); } @Override public float calculateStressApplied() { if (!isController()) return 0; return super.calculateStressApplied(); } @Override public AxisAlignedBB getRenderBoundingBox() { if (!isController()) return super.getRenderBoundingBox(); return super.getRenderBoundingBox().grow(beltLength + 1); } protected void initializeItemHandler() { if (world.isRemote || itemHandler.isPresent()) return; if (!world.isBlockPresent(controller)) return; TileEntity te = world.getTileEntity(controller); if (te == null || !(te instanceof BeltTileEntity)) return; BeltInventory inventory = ((BeltTileEntity) te).getInventory(); if (inventory == null) return; IItemHandler handler = new ItemHandlerBeltSegment(inventory, index); itemHandler = LazyOptional.of(() -> handler); } @Override public boolean hasFastRenderer() { return !isController(); } @Override public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) { if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { if (side == Direction.UP || BeltBlock.canAccessFromSide(side, getBlockState())) { return itemHandler.cast(); } } return super.getCapability(cap, side); } @Override public void remove() { super.remove(); itemHandler.invalidate(); } @Override public void write(CompoundNBT compound, boolean clientPacket) { if (controller != null) compound.put("Controller", NBTUtil.writeBlockPos(controller)); compound.putBoolean("IsController", isController()); compound.putInt("Color", color); compound.putInt("Length", beltLength); compound.putInt("Index", index); NBTHelper.writeEnum(compound, "Casing", casing); if (isController()) compound.put("Inventory", getInventory().write()); super.write(compound, clientPacket); } @Override protected void read(CompoundNBT compound, boolean clientPacket) { super.read(compound, clientPacket); if (compound.getBoolean("IsController")) controller = pos; if (!wasMoved) { if (!isController()) controller = NBTUtil.readBlockPos(compound.getCompound("Controller")); trackerUpdateTag = compound; color = compound.getInt("Color"); beltLength = compound.getInt("Length"); index = compound.getInt("Index"); } if (isController()) getInventory().read(compound.getCompound("Inventory")); CasingType casingBefore = casing; casing = NBTHelper.readEnum(compound, "Casing", CasingType.class); if (!clientPacket) return; if (casingBefore == casing) return; requestModelDataUpdate(); if (hasWorld()) world.notifyBlockUpdate(getPos(), getBlockState(), getBlockState(), 16); } @Override public void clearKineticInformation() { super.clearKineticInformation(); beltLength = 0; index = 0; controller = null; trackerUpdateTag = new CompoundNBT(); } public void applyColor(DyeColor colorIn) { int colorValue = colorIn.getMapColor().colorValue; for (BlockPos blockPos : BeltBlock.getBeltChain(world, getController())) { BeltTileEntity belt = BeltHelper.getSegmentTE(world, blockPos); if (belt == null) continue; belt.color = belt.color == -1 ? colorValue : ColorHelper.mixColors(belt.color, colorValue, .5f); belt.markDirty(); belt.sendData(); } } public BeltTileEntity getControllerTE() { if (controller == null) return null; if (!world.isBlockPresent(controller)) return null; TileEntity te = world.getTileEntity(controller); if (te == null || !(te instanceof BeltTileEntity)) return null; return (BeltTileEntity) te; } public void setController(BlockPos controller) { this.controller = controller; } public BlockPos getController() { return controller == null ? pos : controller; } public boolean isController() { return pos.equals(controller); } public float getBeltMovementSpeed() { return getSpeed() / 480f; } public float getDirectionAwareBeltMovementSpeed() { int offset = getBeltFacing().getAxisDirection() .getOffset(); if (getBeltFacing().getAxis() == Axis.X) offset *= -1; return getBeltMovementSpeed() * offset; } public boolean hasPulley() { if (!AllBlocks.BELT.has(getBlockState())) return false; return getBlockState().get(BeltBlock.PART) != BeltPart.MIDDLE; } protected boolean isLastBelt() { if (getSpeed() == 0) return false; Direction direction = getBeltFacing(); if (getBlockState().get(BeltBlock.SLOPE) == BeltSlope.VERTICAL) return false; BeltPart part = getBlockState().get(BeltBlock.PART); if (part == MIDDLE) return false; boolean movingPositively = (getSpeed() > 0 == (direction.getAxisDirection() .getOffset() == 1)) ^ direction.getAxis() == Axis.X; return part == BeltPart.START ^ movingPositively; } public Vec3i getMovementDirection(boolean firstHalf) { return this.getMovementDirection(firstHalf, false); } public Vec3i getBeltChainDirection() { return this.getMovementDirection(true, true); } protected Vec3i getMovementDirection(boolean firstHalf, boolean ignoreHalves) { if (getSpeed() == 0) return BlockPos.ZERO; final BlockState blockState = getBlockState(); final Direction beltFacing = blockState.get(BlockStateProperties.HORIZONTAL_FACING); final BeltSlope slope = blockState.get(BeltBlock.SLOPE); final BeltPart part = blockState.get(BeltBlock.PART); final Axis axis = beltFacing.getAxis(); Direction movementFacing = Direction.getFacingFromAxis(axis == Axis.X ? NEGATIVE : POSITIVE, axis); boolean notHorizontal = blockState.get(BeltBlock.SLOPE) != HORIZONTAL; if (getSpeed() < 0) movementFacing = movementFacing.getOpposite(); Vec3i movement = movementFacing.getDirectionVec(); boolean slopeBeforeHalf = (part == BeltPart.END) == (beltFacing.getAxisDirection() == POSITIVE); boolean onSlope = notHorizontal && (part == MIDDLE || slopeBeforeHalf == firstHalf || ignoreHalves); boolean movingUp = onSlope && slope == (movementFacing == beltFacing ? BeltSlope.UPWARD : BeltSlope.DOWNWARD); if (!onSlope) return movement; return new Vec3i(movement.getX(), movingUp ? 1 : -1, movement.getZ()); } public Direction getMovementFacing() { Axis axis = getBeltFacing().getAxis(); return Direction.getFacingFromAxisDirection(axis, getBeltMovementSpeed() < 0 ^ axis == Axis.X ? NEGATIVE : POSITIVE); } protected Direction getBeltFacing() { return getBlockState().get(BlockStateProperties.HORIZONTAL_FACING); } public BeltInventory getInventory() { if (!isController()) { BeltTileEntity controllerTE = getControllerTE(); if (controllerTE != null) return controllerTE.getInventory(); return null; } if (inventory == null) { inventory = new BeltInventory(this); } return inventory; } private void applyToAllItems(float maxDistanceFromCenter, Function<TransportedItemStack, TransportedResult> processFunction) { BeltTileEntity controller = getControllerTE(); if (controller == null) return; BeltInventory inventory = controller.getInventory(); if (inventory != null) inventory.applyToEachWithin(index + .5f, maxDistanceFromCenter, processFunction); } private Vec3d getWorldPositionOf(TransportedItemStack transported) { BeltTileEntity controllerTE = getControllerTE(); if (controllerTE == null) return Vec3d.ZERO; return BeltHelper.getVectorForOffset(controllerTE, transported.beltPosition); } public void setCasingType(CasingType type) { if (casing == type) return; casing = type; boolean shouldBlockHaveCasing = type != CasingType.NONE; BlockState blockState = getBlockState(); if (blockState.get(BeltBlock.CASING) != shouldBlockHaveCasing) KineticTileEntity.switchToBlockState(world, pos, blockState.with(BeltBlock.CASING, shouldBlockHaveCasing)); markDirty(); sendData(); } private boolean canInsertFrom(Direction side) { if (getSpeed() == 0) return false; return getMovementFacing() != side.getOpposite(); } private ItemStack tryInsertingFromSide(TransportedItemStack transportedStack, Direction side, boolean simulate) { BeltTileEntity nextBeltController = getControllerTE(); ItemStack inserted = transportedStack.stack; ItemStack empty = ItemStack.EMPTY; if (nextBeltController == null) return inserted; BeltInventory nextInventory = nextBeltController.getInventory(); TileEntity teAbove = world.getTileEntity(pos.up()); if (teAbove instanceof BrassTunnelTileEntity) { BrassTunnelTileEntity tunnelTE = (BrassTunnelTileEntity) teAbove; if (tunnelTE.hasDistributionBehaviour()) { if (!tunnelTE.getStackToDistribute() .isEmpty()) return inserted; if (!tunnelTE.testFlapFilter(side.getOpposite(), inserted)) return inserted; if (!simulate) { BeltTunnelInteractionHandler.flapTunnel(nextInventory, index, side.getOpposite(), true); tunnelTE.setStackToDistribute(inserted); } return empty; } } if (getSpeed() == 0) return inserted; if (getMovementFacing() == side.getOpposite()) return inserted; if (!nextInventory.canInsertAtFromSide(index, side)) return inserted; if (simulate) return empty; transportedStack = transportedStack.copy(); transportedStack.beltPosition = index + .5f - Math.signum(getDirectionAwareBeltMovementSpeed()) / 16f; Direction movementFacing = getMovementFacing(); if (!side.getAxis() .isVertical()) { if (movementFacing != side) { transportedStack.sideOffset = side.getAxisDirection() .getOffset() * .35f; if (side.getAxis() == Axis.X) transportedStack.sideOffset *= -1; } else transportedStack.beltPosition = getDirectionAwareBeltMovementSpeed() > 0 ? index : index + 1; } transportedStack.prevSideOffset = transportedStack.sideOffset; transportedStack.insertedAt = index; transportedStack.insertedFrom = side; transportedStack.prevBeltPosition = transportedStack.beltPosition; BeltTunnelInteractionHandler.flapTunnel(nextInventory, index, side.getOpposite(), true); nextInventory.addItem(transportedStack); nextBeltController.markDirty(); nextBeltController.sendData(); return empty; } public static ModelProperty<CasingType> CASING_PROPERTY = new ModelProperty<>(); @Override public IModelData getModelData() { return new ModelDataMap.Builder().withInitial(CASING_PROPERTY, casing) .build(); } }
{ "pile_set_name": "Github" }
target=android-16 android.library=true source.dir=../src
{ "pile_set_name": "Github" }
using System.Collections.Generic; using Plato.StopForumSpam.Models; using Plato.StopForumSpam.Services; namespace Plato.Ideas.StopForumSpam { public class SpamOperations : ISpamOperationProvider<SpamOperation> { public static readonly SpamOperation Idea = new SpamOperation( "Ideas", "Ideas", "Customize what will happen when ideas are detected as SPAM.") { FlagAsSpam = true, NotifyAdmin = true, NotifyStaff = true, CustomMessage = false, Message = "Sorry but we've identified your details have been used by known spammers. You cannot post at this time. Please try updating your email address or username. If the problem persists please contact us and request we verify your account." }; public static readonly SpamOperation Comment = new SpamOperation( "IdeaComments", "Idea Comments", "Customize what will happen when idea comments are detected as SPAM.") { FlagAsSpam = true, NotifyAdmin = true, NotifyStaff = true, CustomMessage = false, Message = "Sorry but we've identified your details have been used by known spammers. You cannot post at this time. Please try updating your email address or username. If the problem persists please contact us and request we verify your account." }; public IEnumerable<SpamOperation> GetSpamOperations() { return new[] { Idea, Comment }; } } }
{ "pile_set_name": "Github" }
<!doctype html> <title>CodeMirror: Clojure mode</title> <meta charset="utf-8"/> <link rel=stylesheet href="../../doc/docs.css"> <link rel="stylesheet" href="../../lib/codemirror.css"> <script src="../../lib/codemirror.js"></script> <script src="clojure.js"></script> <style>.CodeMirror {background: #f8f8f8;}</style> <div id=nav> <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> <ul> <li><a href="../../index.html">Home</a> <li><a href="../../doc/manual.html">Manual</a> <li><a href="https://github.com/codemirror/codemirror">Code</a> </ul> <ul> <li><a href="../index.html">Language modes</a> <li><a class=active href="#">Clojure</a> </ul> </div> <article> <h2>Clojure mode</h2> <form><textarea id="code" name="code"> ; Conway's Game of Life, based on the work of: ;; Laurent Petit https://gist.github.com/1200343 ;; Christophe Grand http://clj-me.cgrand.net/2011/08/19/conways-game-of-life (ns ^{:doc "Conway's Game of Life."} game-of-life) ;; Core game of life's algorithm functions (defn neighbours "Given a cell's coordinates, returns the coordinates of its neighbours." [[x y]] (for [dx [-1 0 1] dy (if (zero? dx) [-1 1] [-1 0 1])] [(+ dx x) (+ dy y)])) (defn step "Given a set of living cells, computes the new set of living cells." [cells] (set (for [[cell n] (frequencies (mapcat neighbours cells)) :when (or (= n 3) (and (= n 2) (cells cell)))] cell))) ;; Utility methods for displaying game on a text terminal (defn print-board "Prints a board on *out*, representing a step in the game." [board w h] (doseq [x (range (inc w)) y (range (inc h))] (if (= y 0) (print "\n")) (print (if (board [x y]) "[X]" " . ")))) (defn display-grids "Prints a squence of boards on *out*, representing several steps." [grids w h] (doseq [board grids] (print-board board w h) (print "\n"))) ;; Launches an example board (def ^{:doc "board represents the initial set of living cells"} board #{[2 1] [2 2] [2 3]}) (display-grids (take 3 (iterate step board)) 5 5) ;; Let's play with characters (println \1 \a \# \\ \" \( \newline \} \" \space \tab \return \backspace \u1000 \uAaAa \u9F9F) </textarea></form> <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), {}); </script> <p><strong>MIME types defined:</strong> <code>text/x-clojure</code>.</p> </article>
{ "pile_set_name": "Github" }
<% var a =[1,3]; var b = {}; a[0]=2; b["a"]="hello"; //c is array c[0]=99; d[0][0]=99; %> ${a[0]}-${b["a"]}-${c[0]}-${d[0][0]}
{ "pile_set_name": "Github" }
// src/components/ui/MessageSnackbar.js import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import Snackbar from '@material-ui/core/Snackbar'; import CircularProgress from '@material-ui/core/CircularProgress'; const styles = theme => ({ progress: { color: theme.colors.progress, }, snackBarMessage: { position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)', }, }) class MessageSnackbar extends React.Component { render () { const { classes, theme, open, message } = this.props; return ( <Snackbar anchorOrigin={{ vertical: 'bottom', horizontal: 'center', }} open={open} ContentProps={{ 'aria-describedby': 'message-id', }} message={ <div> <CircularProgress className={classes.progress} thickness={4} /> <span className={classes.snackBarMessage} id="message-id"> {message} </span> </div>} /> ) } } MessageSnackbar.propTypes = { // Style props classes: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, // Custom props open: PropTypes.bool.isRequired, message: PropTypes.string.isRequired, }; export default withStyles(styles, { withTheme: true })(MessageSnackbar);
{ "pile_set_name": "Github" }
/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */ .hljs { display: block; overflow-x: auto; padding: 0.5em; background: white; color: black; } .hljs-string, .hljs-variable, .hljs-template-variable, .hljs-symbol, .hljs-bullet, .hljs-section, .hljs-addition, .hljs-attribute, .hljs-link { color: #888; } .hljs-comment, .hljs-quote, .hljs-meta, .hljs-deletion { color: #ccc; } .hljs-keyword, .hljs-selector-tag, .hljs-section, .hljs-name, .hljs-type, .hljs-strong { font-weight: bold; } .hljs-emphasis { font-style: italic; }
{ "pile_set_name": "Github" }
/* * linux/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds */ #include <linuxmt/debug.h> #include <linuxmt/types.h> #include <linuxmt/sched.h> #include <linuxmt/kernel.h> #include <linuxmt/signal.h> #include <linuxmt/errno.h> #include <linuxmt/wait.h> #include <linuxmt/mm.h> #include <arch/segment.h> static void generate(sig_t sig, sigset_t msksig, register struct task_struct *p) { register __sigdisposition_t sd; sd = p->sig.action[sig - 1].sa_dispose; if ((sd == SIGDISP_IGN) || ((sd == SIGDISP_DFL) && (msksig & (SM_SIGCONT | SM_SIGCHLD | SM_SIGWINCH | SM_SIGURG)))) { if (!(msksig & SM_SIGCHLD)) debug_sig("SIGNAL ignoring %d pid %d\n", sig, p->pid); return; } debug_sig("SIGNAL gen_sig %d mask %x action %x:%x pid %d\n", sig, msksig, _FP_SEG(p->sig.handler), _FP_OFF(p->sig.handler), p->pid); p->signal |= msksig; if ((p->state == TASK_INTERRUPTIBLE) /* && (p->signal & ~p->blocked) */ ) { debug_sig("SIGNAL wakeup pid %d\n", p->pid); wake_up_process(p); } } int send_sig(sig_t sig, register struct task_struct *p, int priv) { register __ptask currentp = current; sigset_t msksig; if (sig != SIGCHLD) debug_sig("SIGNAL send_sig %d pid %d\n", sig, p->pid); if (!priv && ((sig != SIGCONT) || (currentp->session != p->session)) && (currentp->euid ^ p->suid) && (currentp->euid ^ p->uid) && (currentp->uid ^ p->suid) && (currentp->uid ^ p->uid) && !suser()) return -EPERM; msksig = (((sigset_t)1) << (sig - 1)); if (msksig & (SM_SIGKILL | SM_SIGCONT)) { if (p->state == TASK_STOPPED) wake_up_process(p); p->signal &= ~(SM_SIGSTOP | SM_SIGTSTP | SM_SIGTTIN | SM_SIGTTOU); } if (msksig & (SM_SIGSTOP | SM_SIGTSTP | SM_SIGTTIN | SM_SIGTTOU)) p->signal &= ~SM_SIGCONT; /* Actually generate the signal */ generate(sig, msksig, p); return 0; } int kill_pg(pid_t pgrp, sig_t sig, int priv) { register struct task_struct *p; int err = -ESRCH; if (!pgrp) { debug_sig("SIGNAL kill_pg 0 ignored\n"); return 0; } debug_sig("SIGNAL kill_pg %d\n", pgrp); for_each_task(p) { if (p->pgrp == pgrp) { if (p->state < TASK_ZOMBIE) err = send_sig(sig, p, priv); else if (p->state != TASK_UNUSED) debug_sig("SIGNAL skip kill_pg pgrp %d pid %d state %d\n", pgrp, p->pid, p->state); } } return err; } int kill_process(pid_t pid, sig_t sig, int priv) { register struct task_struct *p; debug_sig("SIGNAL kill_proc sig %d pid %d\n", sig, pid); for_each_task(p) if (p->pid == pid) return send_sig(sig, p, 0); return -ESRCH; } int sys_kill(pid_t pid, sig_t sig) { register __ptask pcurrent = current; register struct task_struct *p; int count, err, retval; debug_sig("SIGNAL sys_kill %d, %d pid %d\n", pid, sig, current->pid); if ((unsigned int)(sig - 1) > (NSIG-1)) return -EINVAL; count = retval = 0; if (pid == -1) { for_each_task(p) if (p->pid > 1 && p != pcurrent) { count++; if ((err = send_sig(sig, p, 0)) != -EPERM) retval = err; } return (count ? retval : -ESRCH); } if (pid < 1) return kill_pg((!pid ? pcurrent->pgrp : -pid), sig, 0); return kill_process(pid, sig, 0); } int sys_signal(int signr, __kern_sighandler_t handler) { debug_sig("SIGNAL sys_signal %d action %x:%x pid %d\n", signr, _FP_SEG(handler), _FP_OFF(handler), current->pid); if (((unsigned int)signr > NSIG) || signr == SIGKILL || signr == SIGSTOP) return -EINVAL; if (handler == KERN_SIG_DFL) current->sig.action[signr - 1].sa_dispose = SIGDISP_DFL; else if (handler == KERN_SIG_IGN) current->sig.action[signr - 1].sa_dispose = SIGDISP_IGN; else { if (_FP_SEG(handler) < current->mm.seg_code->base || _FP_SEG(handler) >= current->mm.seg_code->base + current->mm.seg_code->size) { debug_sig("SIGNAL sys_signal supplied handler is bogus!\n"); debug_sig("SIGNAL sys_signal cs not in [%x, %x)\n", current->mm.seg_code->base, current->mm.seg_code->base + current->mm.seg_code->size); return -EINVAL; } current->sig.handler = handler; current->sig.action[signr - 1].sa_dispose = SIGDISP_CUSTOM; } return 0; }
{ "pile_set_name": "Github" }
/*$ Copyright (C) 2013-2020 Azel. This file is part of AzPainter. AzPainter is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AzPainter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. $*/ /************************************** * DrawData * * 選択範囲関連 **************************************/ /* * tileimgSel : 選択範囲がない時は NULL または空の状態。 * sel.rcsel : 選択範囲全体を含む矩形 (おおよその範囲) */ #include "mDef.h" #include "mRectBox.h" #include "mStr.h" #include "mUtilFile.h" #include "defDraw.h" #include "draw_main.h" #include "draw_select.h" #include "draw_layer.h" #include "draw_op_sub.h" #include "TileImage.h" #include "TileImageDrawInfo.h" #include "LayerItem.h" #include "ConfigData.h" #include "MainWinCanvas.h" #include "PopupThread.h" //--------------- #define _CURSOR_WAIT MainWinCanvasArea_setCursor_wait(); #define _CURSOR_RESTORE MainWinCanvasArea_restoreCursor(); #define _FILENAME_SELCOPY "selcopy.dat" //--------------- //====================== // sub //====================== /** キャンバスイメージ全体の範囲を取得 */ static void _get_canvimage_rect(DrawData *p,mRect *rc) { rc->x1 = rc->y1 = 0; rc->x2 = p->imgw - 1; rc->y2 = p->imgh - 1; } /** 現在のレイヤにおける選択範囲の描画範囲を取得 */ static void _get_cur_drawrect(DrawData *p,mRect *rc) { if(drawOpSub_isFolder_curlayer()) //フォルダの場合はイメージ全体 _get_canvimage_rect(p, rc); else //カレントレイヤの描画可能範囲 TileImage_getCanDrawRect_pixel(p->curlayer->img, rc); } //====================== // //====================== /** 選択範囲があるか */ mBool drawSel_isHave() { return (APP_DRAW->tileimgSel && !mRectIsEmpty(&APP_DRAW->sel.rcsel)); } /** 選択範囲解除 */ void drawSel_release(DrawData *p,mBool update) { if(p->tileimgSel) { //イメージ削除 TileImage_free(p->tileimgSel); p->tileimgSel = NULL; //更新 if(update) drawUpdate_rect_canvas_forSelect(p, &p->sel.rcsel); } } //====================== // コマンド //====================== /** 選択範囲反転 */ void drawSel_inverse(DrawData *p) { if(!drawSel_createImage(p)) return; _CURSOR_WAIT //描画 TileImageDrawInfo_clearDrawRect(); TileImage_inverseSelect(p->tileimgSel); //透明部分を解放 drawSel_freeEmpty(p); //更新 drawUpdate_rect_canvas_forSelect(p, &g_tileimage_dinfo.rcdraw); _CURSOR_RESTORE } /** すべて選択 */ void drawSel_all(DrawData *p) { mRect rc; //イメージ再作成 drawSel_release(p, FALSE); if(!drawSel_createImage(p)) return; //描画 (キャンバスイメージの範囲) _CURSOR_WAIT _get_canvimage_rect(p, &rc); g_tileimage_dinfo.funcDrawPixel = TileImage_setPixel_new; p->w.rgbaDraw.a = 0x8000; TileImage_drawFillBox(p->tileimgSel, rc.x1, rc.y1, rc.x2 - rc.x1 + 1, rc.y2 - rc.y1 + 1, &p->w.rgbaDraw); //範囲セット p->sel.rcsel = rc; //更新 drawUpdate_rect_canvas_forSelect(p, &rc); _CURSOR_RESTORE } /** 塗りつぶし/消去 */ void drawSel_fill_erase(DrawData *p,mBool erase) { mRect rc; if(drawOpSub_canDrawLayer_mes(p)) return; /* [!] beginDraw/endDraw でカーソルは変更される */ //範囲 drawSel_getFullDrawRect(p, &rc); //描画 drawOpSub_setDrawInfo_fillerase(erase); drawOpSub_beginDraw_single(p); TileImage_drawFillBox(p->w.dstimg, rc.x1, rc.y1, rc.x2 - rc.x1 + 1, rc.y2 - rc.y1 + 1, &p->w.rgbaDraw); drawOpSub_endDraw_single(p); } /** コピー/切り取り */ void drawSel_copy_cut(DrawData *p,mBool cut) { int ret; TileImage *img; mStr str = MSTR_INIT; //選択範囲なし if(!drawSel_isHave()) return; //カレントがフォルダの場合は除く。ロック時はコピーのみ ret = drawOpSub_canDrawLayer(p); if(ret == CANDRAWLAYER_FOLDER) return; if(ret == CANDRAWLAYER_LOCK) cut = FALSE; //現在のコピーイメージを削除 TileImage_free(p->sel.tileimgCopy); p->sel.tileimgCopy = NULL; //--------- _CURSOR_WAIT //----- コピー/切り取り //切り取り準備 if(cut) { drawOpSub_setDrawInfo_select_cut(); drawOpSub_beginDraw(p); } //コピー/切り取り img = TileImage_createSelCopyImage(p->curlayer->img, p->tileimgSel, &p->sel.rcsel, cut, FALSE); //切り取り後 if(cut) drawOpSub_finishDraw_single(p); //---- イメージ保持 /* デフォルトで、作業用ディレクトリにファイル保存。 * 作業用ディレクトリがない or 保存に失敗した場合は sel.tileimgCopy に保持。 */ if(img) { if(ConfigData_getTempPath(&str, _FILENAME_SELCOPY) && TileImage_saveTileImageFile(img, str.buf, p->curlayer->col)) { //ファイル出力に成功した場合、イメージ削除 TileImage_free(img); } else { //ファイル出力できない場合、メモリ上に保持 p->sel.tileimgCopy = img; p->sel.col_copyimg = p->curlayer->col; } mStrFree(&str); } // _CURSOR_RESTORE } /** 新規レイヤに貼り付け */ void drawSel_paste_newlayer(DrawData *p) { mStr str = MSTR_INIT; TileImage *img; uint32_t col; //コピーイメージが存在しない if(!p->sel.tileimgCopy && !(ConfigData_getTempPath(&str, _FILENAME_SELCOPY) && mIsFileExist(str.buf, FALSE))) { mStrFree(&str); return; } //レイヤのイメージ用意 (ファイルの場合、読み込み) if(p->sel.tileimgCopy) { img = TileImage_newClone(p->sel.tileimgCopy); col = p->sel.col_copyimg; } else img = TileImage_loadTileImageFile(str.buf, &col); mStrFree(&str); if(!img) return; //新規レイヤ if(!drawLayer_newLayer_fromImage(p, img, col)) TileImage_free(img); } /** [スレッド] 拡張/縮小 */ static int _thread_expand(mPopupProgress *prog,void *data) { TileImage_expandSelect(APP_DRAW->tileimgSel, *((int *)data), prog); return 1; } /** 範囲の拡張/縮小 */ void drawSel_expand(DrawData *p,int cnt) { //準備 g_tileimage_dinfo.funcColor = TileImage_colfunc_overwrite; TileImageDrawInfo_clearDrawRect(); //スレッド PopupThread_run(&cnt, _thread_expand); //範囲 if(cnt > 0) p->sel.rcsel = g_tileimage_dinfo.rcdraw; else drawSel_freeEmpty(p); //更新 drawUpdate_rect_canvas_forSelect(p, &g_tileimage_dinfo.rcdraw); } //====================== // 作業用処理 //====================== /** イメージ全体に対して描画する際の範囲取得 */ void drawSel_getFullDrawRect(DrawData *p,mRect *rc) { if(drawSel_isHave()) *rc = p->sel.rcsel; else _get_cur_drawrect(p, rc); } /** 選択範囲イメージを確保 (範囲セット前に行う) * * @return FALSE で失敗 */ mBool drawSel_createImage(DrawData *p) { mRect rc; if(p->tileimgSel) return TRUE; else { //描画可能範囲から作成 _get_cur_drawrect(p, &rc); p->tileimgSel = TileImage_newFromRect(TILEIMAGE_COLTYPE_ALPHA1, &rc); mRectEmpty(&p->sel.rcsel); return (p->tileimgSel != NULL); } } /** 範囲削除後の処理 * * 透明タイルを解放して範囲を再計算。 * すべて透明ならイメージ削除。 */ void drawSel_freeEmpty(DrawData *p) { if(p->tileimgSel) { if(TileImage_freeEmptyTiles(p->tileimgSel)) { //すべて透明なら削除 TileImage_free(p->tileimgSel); p->tileimgSel = NULL; } else //点が残っていれば、範囲を再計算 TileImage_getHaveImageRect_pixel(p->tileimgSel, &p->sel.rcsel, NULL); } }
{ "pile_set_name": "Github" }
package cn.lijunkui; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringbootexamplesApplication { public static void main(String[] args) { SpringApplication.run(SpringbootexamplesApplication.class, args); } }
{ "pile_set_name": "Github" }
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; namespace CSharpToVisualBasicConverter.Utilities { internal static class CSharpExtensions { public static IEnumerable<T> GetAncestorsOrThis<T>(this SyntaxNode node, bool allowStructuredTrivia = false) where T : SyntaxNode { SyntaxNode current = node; while (current != null) { if (current is T) { yield return (T)current; } if (allowStructuredTrivia && current.IsStructuredTrivia && current.Parent == null) { StructuredTriviaSyntax structuredTrivia = (StructuredTriviaSyntax)current; SyntaxTrivia parentTrivia = structuredTrivia.ParentTrivia; current = parentTrivia.Token.Parent; } else { current = current.Parent; } } } public static SyntaxNode GetParent(this SyntaxTree syntaxTree, SyntaxNode node) => node?.Parent; public static TypeSyntax GetVariableType(this VariableDeclaratorSyntax variable) { if (!(variable.Parent is VariableDeclarationSyntax parent)) { return null; } return parent.Type; } public static bool IsBreakableConstruct(this SyntaxNode node) { switch (node.Kind()) { case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: case SyntaxKind.SwitchStatement: case SyntaxKind.ForStatement: case SyntaxKind.ForEachStatement: return true; } return false; } public static bool IsContinuableConstruct(this SyntaxNode node) { switch (node.Kind()) { case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: case SyntaxKind.ForStatement: case SyntaxKind.ForEachStatement: return true; } return false; } public static bool IsParentKind(this SyntaxNode node, SyntaxKind kind) => node?.Parent.IsKind(kind) == true; } }
{ "pile_set_name": "Github" }
; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags ; Library options: dependencies, extra library storages ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html [platformio] ; uncomment below to build a one env ; env_default= d1 ; env_default= nodemcuv2 ; env_default= esp32dev ; env_default= samd21g18a [global] lib_deps = https://github.com/WebThingsIO/webthing-arduino.git monitor_speed = 115200 [env:d1] platform = espressif8266 board = d1 framework = arduino lib_deps = ${global.lib_deps} ESP Async WebServer lib_ignore = WiFi101 lib_ldf_mode = deep+ monitor_speed = ${global.monitor_speed} [env:nodemcuv2] platform = espressif8266 board = nodemcuv2 framework = arduino lib_deps = ${global.lib_deps} ESP Async WebServer lib_ignore = ArduinoMDNS WiFi101 lib_ldf_mode = deep+ monitor_speed = ${global.monitor_speed} [env:esp32dev] platform = espressif32 board = esp32dev framework = arduino lib_deps = ${global.lib_deps} ESP Async WebServer lib_ignore = WiFi101 lib_ldf_mode = deep+ monitor_speed = ${global.monitor_speed} [env:samd21g18a] platform = atmelsam board = samd21g18a framework = arduino lib_deps = ${global.lib_deps} WiFi101 ArduinoMDNS lib_ldf_mode = deep+
{ "pile_set_name": "Github" }
# ruler.tcl -- # # This demonstration script creates a canvas widget that displays a ruler # with tab stops that can be set, moved, and deleted. if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." } package require Tk # rulerMkTab -- # This procedure creates a new triangular polygon in a canvas to # represent a tab stop. # # Arguments: # c - The canvas window. # x, y - Coordinates at which to create the tab stop. proc rulerMkTab {c x y} { upvar #0 demo_rulerInfo v $c create polygon $x $y [expr {$x+$v(size)}] [expr {$y+$v(size)}] \ [expr {$x-$v(size)}] [expr {$y+$v(size)}] } set w .ruler catch {destroy $w} toplevel $w wm title $w "Ruler Demonstration" wm iconname $w "ruler" positionWindow $w set c $w.c label $w.msg -font $font -wraplength 5i -justify left -text "This canvas widget shows a mock-up of a ruler. You can create tab stops by dragging them out of the well to the right of the ruler. You can also drag existing tab stops. If you drag a tab stop far enough up or down so that it turns dim, it will be deleted when you release the mouse button." pack $w.msg -side top ## See Code / Dismiss buttons set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x canvas $c -width 14.8c -height 2.5c pack $w.c -side top -fill x set demo_rulerInfo(grid) .25c set demo_rulerInfo(left) [winfo fpixels $c 1c] set demo_rulerInfo(right) [winfo fpixels $c 13c] set demo_rulerInfo(top) [winfo fpixels $c 1c] set demo_rulerInfo(bottom) [winfo fpixels $c 1.5c] set demo_rulerInfo(size) [winfo fpixels $c .2c] set demo_rulerInfo(normalStyle) "-fill black" # Main widget program sets variable tk_demoDirectory if {[winfo depth $c] > 1} { set demo_rulerInfo(activeStyle) "-fill red -stipple {}" set demo_rulerInfo(deleteStyle) [list -fill red \ -stipple @[file join $tk_demoDirectory images gray25.xbm]] } else { set demo_rulerInfo(activeStyle) "-fill black -stipple {}" set demo_rulerInfo(deleteStyle) [list -fill black \ -stipple @[file join $tk_demoDirectory images gray25.xbm]] } $c create line 1c 0.5c 1c 1c 13c 1c 13c 0.5c -width 1 for {set i 0} {$i < 12} {incr i} { set x [expr {$i+1}] $c create line ${x}c 1c ${x}c 0.6c -width 1 $c create line $x.25c 1c $x.25c 0.8c -width 1 $c create line $x.5c 1c $x.5c 0.7c -width 1 $c create line $x.75c 1c $x.75c 0.8c -width 1 $c create text $x.15c .75c -text $i -anchor sw } $c addtag well withtag [$c create rect 13.2c 1c 13.8c 0.5c \ -outline black -fill [lindex [$c config -bg] 4]] $c addtag well withtag [rulerMkTab $c [winfo pixels $c 13.5c] \ [winfo pixels $c .65c]] $c bind well <1> "rulerNewTab $c %x %y" $c bind tab <1> "rulerSelectTab $c %x %y" bind $c <B1-Motion> "rulerMoveTab $c %x %y" bind $c <Any-ButtonRelease-1> "rulerReleaseTab $c" # rulerNewTab -- # Does all the work of creating a tab stop, including creating the # triangle object and adding tags to it to give it tab behavior. # # Arguments: # c - The canvas window. # x, y - The coordinates of the tab stop. proc rulerNewTab {c x y} { upvar #0 demo_rulerInfo v $c addtag active withtag [rulerMkTab $c $x $y] $c addtag tab withtag active set v(x) $x set v(y) $y rulerMoveTab $c $x $y } # rulerSelectTab -- # This procedure is invoked when mouse button 1 is pressed over # a tab. It remembers information about the tab so that it can # be dragged interactively. # # Arguments: # c - The canvas widget. # x, y - The coordinates of the mouse (identifies the point by # which the tab was picked up for dragging). proc rulerSelectTab {c x y} { upvar #0 demo_rulerInfo v set v(x) [$c canvasx $x $v(grid)] set v(y) [expr {$v(top)+2}] $c addtag active withtag current eval "$c itemconf active $v(activeStyle)" $c raise active } # rulerMoveTab -- # This procedure is invoked during mouse motion events to drag a tab. # It adjusts the position of the tab, and changes its appearance if # it is about to be dragged out of the ruler. # # Arguments: # c - The canvas widget. # x, y - The coordinates of the mouse. proc rulerMoveTab {c x y} { upvar #0 demo_rulerInfo v if {[$c find withtag active] == ""} { return } set cx [$c canvasx $x $v(grid)] set cy [$c canvasy $y] if {$cx < $v(left)} { set cx $v(left) } if {$cx > $v(right)} { set cx $v(right) } if {($cy >= $v(top)) && ($cy <= $v(bottom))} { set cy [expr {$v(top)+2}] eval "$c itemconf active $v(activeStyle)" } else { set cy [expr {$cy-$v(size)-2}] eval "$c itemconf active $v(deleteStyle)" } $c move active [expr {$cx-$v(x)}] [expr {$cy-$v(y)}] set v(x) $cx set v(y) $cy } # rulerReleaseTab -- # This procedure is invoked during button release events that end # a tab drag operation. It deselects the tab and deletes the tab if # it was dragged out of the ruler. # # Arguments: # c - The canvas widget. # x, y - The coordinates of the mouse. proc rulerReleaseTab c { upvar #0 demo_rulerInfo v if {[$c find withtag active] == {}} { return } if {$v(y) != $v(top)+2} { $c delete active } else { eval "$c itemconf active $v(normalStyle)" $c dtag active } }
{ "pile_set_name": "Github" }
/**************************************************************************************************** * arch/arm/src/stm32/chip/stm32f40xxx_rcc.h * * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************************************/ #ifndef __ARCH_ARM_SRC_STM32_CHIP_STM32F40XXX_RCC_H #define __ARCH_ARM_SRC_STM32_CHIP_STM32F40XXX_RCC_H /**************************************************************************************************** * Pre-processor Definitions ****************************************************************************************************/ /* Register Offsets *********************************************************************************/ #define STM32_RCC_CR_OFFSET 0x0000 /* Clock control register */ #define STM32_RCC_PLLCFG_OFFSET 0x0004 /* PLL configuration register */ #define STM32_RCC_CFGR_OFFSET 0x0008 /* Clock configuration register */ #define STM32_RCC_CIR_OFFSET 0x000c /* Clock interrupt register */ #define STM32_RCC_AHB1RSTR_OFFSET 0x0010 /* AHB1 peripheral reset register */ #define STM32_RCC_AHB2RSTR_OFFSET 0x0014 /* AHB2 peripheral reset register */ #define STM32_RCC_AHB3RSTR_OFFSET 0x0018 /* AHB3 peripheral reset register */ #define STM32_RCC_APB1RSTR_OFFSET 0x0020 /* APB1 Peripheral reset register */ #define STM32_RCC_APB2RSTR_OFFSET 0x0024 /* APB2 Peripheral reset register */ #define STM32_RCC_AHB1ENR_OFFSET 0x0030 /* AHB1 Peripheral Clock enable register */ #define STM32_RCC_AHB2ENR_OFFSET 0x0034 /* AHB2 Peripheral Clock enable register */ #define STM32_RCC_AHB3ENR_OFFSET 0x0038 /* AHB3 Peripheral Clock enable register */ #define STM32_RCC_APB1ENR_OFFSET 0x0040 /* APB1 Peripheral Clock enable register */ #define STM32_RCC_APB2ENR_OFFSET 0x0044 /* APB2 Peripheral Clock enable register */ #define STM32_RCC_AHB1LPENR_OFFSET 0x0050 /* RCC AHB1 low power modeperipheral clock enable register */ #define STM32_RCC_AH2BLPENR_OFFSET 0x0054 /* RCC AHB2 low power modeperipheral clock enable register */ #define STM32_RCC_AH3BLPENR_OFFSET 0x0058 /* RCC AHB3 low power modeperipheral clock enable register */ #define STM32_RCC_APB1LPENR_OFFSET 0x0060 /* RCC APB1 low power modeperipheral clock enable register */ #define STM32_RCC_APB2LPENR_OFFSET 0x0064 /* RCC APB2 low power modeperipheral clock enable register */ #define STM32_RCC_BDCR_OFFSET 0x0070 /* Backup domain control register */ #define STM32_RCC_CSR_OFFSET 0x0074 /* Control/status register */ #define STM32_RCC_SSCGR_OFFSET 0x0080 /* Spread spectrum clock generation register */ #define STM32_RCC_PLLI2SCFGR_OFFSET 0x0084 /* PLLI2S configuration register */ /* Register Addresses *******************************************************************************/ #define STM32_RCC_CR (STM32_RCC_BASE+STM32_RCC_CR_OFFSET) #define STM32_RCC_PLLCFG (STM32_RCC_BASE+STM32_RCC_PLLCFG_OFFSET) #define STM32_RCC_CFGR (STM32_RCC_BASE+STM32_RCC_CFGR_OFFSET) #define STM32_RCC_CIR (STM32_RCC_BASE+STM32_RCC_CIR_OFFSET) #define STM32_RCC_AHB1RSTR (STM32_RCC_BASE+STM32_RCC_AHB1RSTR_OFFSET) #define STM32_RCC_AHB2RSTR (STM32_RCC_BASE+STM32_RCC_AHB2RSTR_OFFSET) #define STM32_RCC_AHB3RSTR (STM32_RCC_BASE+STM32_RCC_AHB3RSTR_OFFSET) #define STM32_RCC_APB1RSTR (STM32_RCC_BASE+STM32_RCC_APB1RSTR_OFFSET) #define STM32_RCC_APB2RSTR (STM32_RCC_BASE+STM32_RCC_APB2RSTR_OFFSET) #define STM32_RCC_AHB1ENR (STM32_RCC_BASE+STM32_RCC_AHB1ENR_OFFSET) #define STM32_RCC_AHB2ENR (STM32_RCC_BASE+STM32_RCC_AHB2ENR_OFFSET) #define STM32_RCC_AHB3ENR (STM32_RCC_BASE+STM32_RCC_AHB3ENR_OFFSET) #define STM32_RCC_APB1ENR (STM32_RCC_BASE+STM32_RCC_APB1ENR_OFFSET) #define STM32_RCC_APB2ENR (STM32_RCC_BASE+STM32_RCC_APB2ENR_OFFSET) #define STM32_RCC_AHB1LPENR (STM32_RCC_BASE+STM32_RCC_AHB1LPENR_OFFSET) #define STM32_RCC_AH2BLPENR (STM32_RCC_BASE+STM32_RCC_AH2BLPENR) #define STM32_RCC_AH3BLPENR (STM32_RCC_BASE+STM32_RCC_AH3BLPENR_OFFSET) #define STM32_RCC_APB1LPENR (STM32_RCC_BASE+STM32_RCC_APB1LPENR_OFFSET) #define STM32_RCC_APB2LPENR (STM32_RCC_BASE+STM32_RCC_APB2LPENR_OFFSET) #define STM32_RCC_BDCR (STM32_RCC_BASE+STM32_RCC_BDCR_OFFSET) #define STM32_RCC_CSR (STM32_RCC_BASE+STM32_RCC_CSR_OFFSET) #define STM32_RCC_SSCGR (STM32_RCC_BASE+STM32_RCC_SSCGR_OFFSET) #define STM32_RCC_PLLI2SCFGR (STM32_RCC_BASE+STM32_RCC_PLLI2SCFGR_OFFSET) /* Register Bitfield Definitions ********************************************************************/ /* Clock control register */ #define RCC_CR_HSION (1 << 0) /* Bit 0: Internal High Speed clock enable */ #define RCC_CR_HSIRDY (1 << 1) /* Bit 1: Internal High Speed clock ready flag */ #define RCC_CR_HSITRIM_SHIFT (3) /* Bits 7-3: Internal High Speed clock trimming */ #define RCC_CR_HSITRIM_MASK (0x1f << RCC_CR_HSITRIM_SHIFT) #define RCC_CR_HSICAL_SHIFT (8) /* Bits 15-8: Internal High Speed clock Calibration */ #define RCC_CR_HSICAL_MASK (0xff << RCC_CR_HSICAL_SHIFT) #define RCC_CR_HSEON (1 << 16) /* Bit 16: External High Speed clock enable */ #define RCC_CR_HSERDY (1 << 17) /* Bit 17: External High Speed clock ready flag */ #define RCC_CR_HSEBYP (1 << 18) /* Bit 18: External High Speed clock Bypass */ #define RCC_CR_CSSON (1 << 19) /* Bit 19: Clock Security System enable */ #define RCC_CR_PLLON (1 << 24) /* Bit 24: PLL enable */ #define RCC_CR_PLLRDY (1 << 25) /* Bit 25: PLL clock ready flag */ #define RCC_CR_PLLI2SON (1 << 26) /* Bit 26: PLLI2S enable */ #define RCC_CR_PLLI2SRDY (1 << 27) /* Bit 27: PLLI2S clock ready flag */ #define RCC_CR_PLLSAION (1 << 28) /* Bit 28: PLLSAI enable */ #define RCC_CR_PLLSAIRDY (1 << 29) /* Bit 29: PLLSAI clock ready flag */ /* PLL configuration register */ #define RCC_PLLCFG_PLLM_SHIFT (0) /* Bits 0-5: Main PLL (PLL) and audio PLL (PLLI2S) * input clock divider */ #define RCC_PLLCFG_PLLM_MASK (0x3f << RCC_PLLCFG_PLLM_SHIFT) # define RCC_PLLCFG_PLLM(n) ((n) << RCC_PLLCFG_PLLM_SHIFT) /* n = 2..63 */ #define RCC_PLLCFG_PLLN_SHIFT (6) /* Bits 6-14: Main PLL (PLL) VCO multiplier */ #define RCC_PLLCFG_PLLN_MASK (0x1ff << RCC_PLLCFG_PLLN_SHIFT) # define RCC_PLLCFG_PLLN(n) ((n) << RCC_PLLCFG_PLLN_SHIFT) /* n = 2..432 */ #define RCC_PLLCFG_PLLP_SHIFT (16) /* Bits 16-17: Main PLL (PLL) main system clock divider */ #define RCC_PLLCFG_PLLP_MASK (3 << RCC_PLLCFG_PLLP_SHIFT) # define RCC_PLLCFG_PLLP(n) ((((n)>>1)-1)<< RCC_PLLCFG_PLLP_SHIFT) /* n=2,4,6,8 */ # define RCC_PLLCFG_PLLP_2 (0 << RCC_PLLCFG_PLLP_SHIFT) /* 00: PLLP = 2 */ # define RCC_PLLCFG_PLLP_4 (1 << RCC_PLLCFG_PLLP_SHIFT) /* 01: PLLP = 4 */ # define RCC_PLLCFG_PLLP_6 (2 << RCC_PLLCFG_PLLP_SHIFT) /* 10: PLLP = 6 */ # define RCC_PLLCFG_PLLP_8 (3 << RCC_PLLCFG_PLLP_SHIFT) /* 11: PLLP = 8 */ #define RCC_PLLCFG_PLLSRC (1 << 22) /* Bit 22: Main PLL(PLL) and audio PLL (PLLI2S) * entry clock source */ # define RCC_PLLCFG_PLLSRC_HSI (0) # define RCC_PLLCFG_PLLSRC_HSE RCC_PLLCFG_PLLSRC #define RCC_PLLCFG_PLLQ_SHIFT (24) /* Bits 24-27: Main PLL (PLL) divider * (USB OTG FS, SDIO and RNG clocks) */ #define RCC_PLLCFG_PLLQ_MASK (15 << RCC_PLLCFG_PLLQ_SHIFT) # define RCC_PLLCFG_PLLQ(n) ((n) << RCC_PLLCFG_PLLQ_SHIFT) /* n=2..15 */ #define RCC_PLLCFG_RESET (0x24003010) /* PLLCFG reset value */ /* Clock configuration register */ #define RCC_CFGR_SW_SHIFT (0) /* Bits 0-1: System clock Switch */ #define RCC_CFGR_SW_MASK (3 << RCC_CFGR_SW_SHIFT) # define RCC_CFGR_SW_HSI (0 << RCC_CFGR_SW_SHIFT) /* 00: HSI selected as system clock */ # define RCC_CFGR_SW_HSE (1 << RCC_CFGR_SW_SHIFT) /* 01: HSE selected as system clock */ # define RCC_CFGR_SW_PLL (2 << RCC_CFGR_SW_SHIFT) /* 10: PLL selected as system clock */ #define RCC_CFGR_SWS_SHIFT (2) /* Bits 2-3: System Clock Switch Status */ #define RCC_CFGR_SWS_MASK (3 << RCC_CFGR_SWS_SHIFT) # define RCC_CFGR_SWS_HSI (0 << RCC_CFGR_SWS_SHIFT) /* 00: HSI oscillator used as system clock */ # define RCC_CFGR_SWS_HSE (1 << RCC_CFGR_SWS_SHIFT) /* 01: HSE oscillator used as system clock */ # define RCC_CFGR_SWS_PLL (2 << RCC_CFGR_SWS_SHIFT) /* 10: PLL used as system clock */ #define RCC_CFGR_HPRE_SHIFT (4) /* Bits 4-7: AHB prescaler */ #define RCC_CFGR_HPRE_MASK (0x0f << RCC_CFGR_HPRE_SHIFT) # define RCC_CFGR_HPRE_SYSCLK (0 << RCC_CFGR_HPRE_SHIFT) /* 0xxx: SYSCLK not divided */ # define RCC_CFGR_HPRE_SYSCLKd2 (8 << RCC_CFGR_HPRE_SHIFT) /* 1000: SYSCLK divided by 2 */ # define RCC_CFGR_HPRE_SYSCLKd4 (9 << RCC_CFGR_HPRE_SHIFT) /* 1001: SYSCLK divided by 4 */ # define RCC_CFGR_HPRE_SYSCLKd8 (10 << RCC_CFGR_HPRE_SHIFT) /* 1010: SYSCLK divided by 8 */ # define RCC_CFGR_HPRE_SYSCLKd16 (11 << RCC_CFGR_HPRE_SHIFT) /* 1011: SYSCLK divided by 16 */ # define RCC_CFGR_HPRE_SYSCLKd64 (12 << RCC_CFGR_HPRE_SHIFT) /* 1100: SYSCLK divided by 64 */ # define RCC_CFGR_HPRE_SYSCLKd128 (13 << RCC_CFGR_HPRE_SHIFT) /* 1101: SYSCLK divided by 128 */ # define RCC_CFGR_HPRE_SYSCLKd256 (14 << RCC_CFGR_HPRE_SHIFT) /* 1110: SYSCLK divided by 256 */ # define RCC_CFGR_HPRE_SYSCLKd512 (15 << RCC_CFGR_HPRE_SHIFT) /* 1111: SYSCLK divided by 512 */ #define RCC_CFGR_PPRE1_SHIFT (10) /* Bits 10-12: APB Low speed prescaler (APB1) */ #define RCC_CFGR_PPRE1_MASK (7 << RCC_CFGR_PPRE1_SHIFT) # define RCC_CFGR_PPRE1_HCLK (0 << RCC_CFGR_PPRE1_SHIFT) /* 0xx: HCLK not divided */ # define RCC_CFGR_PPRE1_HCLKd2 (4 << RCC_CFGR_PPRE1_SHIFT) /* 100: HCLK divided by 2 */ # define RCC_CFGR_PPRE1_HCLKd4 (5 << RCC_CFGR_PPRE1_SHIFT) /* 101: HCLK divided by 4 */ # define RCC_CFGR_PPRE1_HCLKd8 (6 << RCC_CFGR_PPRE1_SHIFT) /* 110: HCLK divided by 8 */ # define RCC_CFGR_PPRE1_HCLKd16 (7 << RCC_CFGR_PPRE1_SHIFT) /* 111: HCLK divided by 16 */ #define RCC_CFGR_PPRE2_SHIFT (13) /* Bits 13-15: APB High speed prescaler (APB2) */ #define RCC_CFGR_PPRE2_MASK (7 << RCC_CFGR_PPRE2_SHIFT) # define RCC_CFGR_PPRE2_HCLK (0 << RCC_CFGR_PPRE2_SHIFT) /* 0xx: HCLK not divided */ # define RCC_CFGR_PPRE2_HCLKd2 (4 << RCC_CFGR_PPRE2_SHIFT) /* 100: HCLK divided by 2 */ # define RCC_CFGR_PPRE2_HCLKd4 (5 << RCC_CFGR_PPRE2_SHIFT) /* 101: HCLK divided by 4 */ # define RCC_CFGR_PPRE2_HCLKd8 (6 << RCC_CFGR_PPRE2_SHIFT) /* 110: HCLK divided by 8 */ # define RCC_CFGR_PPRE2_HCLKd16 (7 << RCC_CFGR_PPRE2_SHIFT) /* 111: HCLK divided by 16 */ #define RCC_CFGR_RTCPRE_SHIFT (16) /* Bits 16-20: APB High speed prescaler (APB2) */ #define RCC_CFGR_RTCPRE_MASK (31 << RCC_CFGR_RTCPRE_SHIFT) # define RCC_CFGR_RTCPRE(n) ((n) << RCC_CFGR_RTCPRE_SHIFT) /* HSE/n, n=1..31 */ #define RCC_CFGR_MCO1_SHIFT (21) /* Bits 21-22: Microcontroller Clock Output */ #define RCC_CFGR_MCO1_MASK (3 << RCC_CFGR_MCO1_SHIFT) # define RCC_CFGR_MCO1_HSI (0 << RCC_CFGR_MCO1_SHIFT) /* 00: HSI clock selected */ # define RCC_CFGR_MCO1_LSE (1 << RCC_CFGR_MCO1_SHIFT) /* 01: LSE oscillator selected */ # define RCC_CFGR_MCO1_HSE (2 << RCC_CFGR_MCO1_SHIFT) /* 10: HSE oscillator clock selected */ # define RCC_CFGR_MCO1_PLL (3 << RCC_CFGR_MCO1_SHIFT) /* 11: PLL clock selected */ #define RCC_CFGR_I2SSRC (1 << 23) /* Bit 23: I2S clock selection */ #define RCC_CFGR_MCO1PRE_SHIFT (24) /* Bits 24-26: MCO1 prescaler */ #define RCC_CFGR_MCO1PRE_MASK (7 << RCC_CFGR_MCO1PRE_SHIFT) # define RCC_CFGR_MCO1PRE_NONE (0 << RCC_CFGR_MCO1PRE_SHIFT) /* 0xx: no division */ # define RCC_CFGR_MCO1PRE_DIV2 (4 << RCC_CFGR_MCO1PRE_SHIFT) /* 100: division by 2 */ # define RCC_CFGR_MCO1PRE_DIV3 (5 << RCC_CFGR_MCO1PRE_SHIFT) /* 101: division by 3 */ # define RCC_CFGR_MCO1PRE_DIV4 (6 << RCC_CFGR_MCO1PRE_SHIFT) /* 110: division by 4 */ # define RCC_CFGR_MCO1PRE_DIV5 (7 << RCC_CFGR_MCO1PRE_SHIFT) /* 111: division by 5 */ #define RCC_CFGR_MCO2PRE_SHIFT (27) /* Bits 27-29: MCO2 prescaler */ #define RCC_CFGR_MCO2PRE_MASK (7 << RCC_CFGR_MCO2PRE_SHIFT) # define RCC_CFGR_MCO2PRE_NONE (0 << RCC_CFGR_MCO2PRE_SHIFT) /* 0xx: no division */ # define RCC_CFGR_MCO2PRE_DIV2 (4 << RCC_CFGR_MCO2PRE_SHIFT) /* 100: division by 2 */ # define RCC_CFGR_MCO2PRE_DIV3 (5 << RCC_CFGR_MCO2PRE_SHIFT) /* 101: division by 3 */ # define RCC_CFGR_MCO2PRE_DIV4 (6 << RCC_CFGR_MCO2PRE_SHIFT) /* 110: division by 4 */ # define RCC_CFGR_MCO2PRE_DIV5 (7 << RCC_CFGR_MCO2PRE_SHIFT) /* 111: division by 5 */ #define RCC_CFGR_MCO2_SHIFT (30) /* Bits 30-31: Microcontroller clock output 2 */ #define RCC_CFGR_MCO2_MASK (3 << RCC_CFGR_MCO2_SHIFT) # define RCC_CFGR_MCO2_SYSCLK (0 << RCC_CFGR_MCO2_SHIFT) /* 00: System clock (SYSCLK) selected */ # define RCC_CFGR_MCO2_PLLI2S (1 << RCC_CFGR_MCO2_SHIFT) /* 01: PLLI2S clock selected */ # define RCC_CFGR_MCO2_HSE (2 << RCC_CFGR_MCO2_SHIFT) /* 10: HSE oscillator clock selected */ # define RCC_CFGR_MCO2_PLL (3 << RCC_CFGR_MCO2_SHIFT) /* 11: PLL clock selected */ /* Clock interrupt register */ #define RCC_CIR_LSIRDYF (1 << 0) /* Bit 0: LSI Ready Interrupt flag */ #define RCC_CIR_LSERDYF (1 << 1) /* Bit 1: LSE Ready Interrupt flag */ #define RCC_CIR_HSIRDYF (1 << 2) /* Bit 2: HSI Ready Interrupt flag */ #define RCC_CIR_HSERDYF (1 << 3) /* Bit 3: HSE Ready Interrupt flag */ #define RCC_CIR_PLLRDYF (1 << 4) /* Bit 4: PLL Ready Interrupt flag */ #define RCC_CIR_PLLI2SRDYF (1 << 5) /* Bit 5: PLLI2S Ready Interrupt flag */ #define RCC_CIR_CSSF (1 << 7) /* Bit 7: Clock Security System Interrupt flag */ #define RCC_CIR_LSIRDYIE (1 << 8) /* Bit 8: LSI Ready Interrupt Enable */ #define RCC_CIR_LSERDYIE (1 << 9) /* Bit 9: LSE Ready Interrupt Enable */ #define RCC_CIR_HSIRDYIE (1 << 10) /* Bit 10: HSI Ready Interrupt Enable */ #define RCC_CIR_HSERDYIE (1 << 11) /* Bit 11: HSE Ready Interrupt Enable */ #define RCC_CIR_PLLRDYIE (1 << 12) /* Bit 12: PLL Ready Interrupt Enable */ #define RCC_CIR_PLLI2SRDYIE (1 << 13) /* Bit 13: PLLI2S Ready Interrupt enable */ #define RCC_CIR_PLLSAIRDYIE (1 << 14) /* Bit 14: PLLSAI Ready Interrupt enable */ #define RCC_CIR_LSIRDYC (1 << 16) /* Bit 16: LSI Ready Interrupt Clear */ #define RCC_CIR_LSERDYC (1 << 17) /* Bit 17: LSE Ready Interrupt Clear */ #define RCC_CIR_HSIRDYC (1 << 18) /* Bit 18: HSI Ready Interrupt Clear */ #define RCC_CIR_HSERDYC (1 << 19) /* Bit 19: HSE Ready Interrupt Clear */ #define RCC_CIR_PLLRDYC (1 << 20) /* Bit 20: PLL Ready Interrupt Clear */ #define RCC_CIR_PLLI2SRDYC (1 << 21) /* Bit 21: PLLI2S Ready Interrupt clear */ #define RCC_CIR_PLLSAIRDYC (1 << 22) /* Bit 22: PLLSAI Ready Interrupt clear */ #define RCC_CIR_CSSC (1 << 23) /* Bit 23: Clock Security System Interrupt Clear */ /* AHB1 peripheral reset register */ #define RCC_AHB1RSTR_GPIOARST (1 << 0) /* Bit 0: IO port A reset */ #define RCC_AHB1RSTR_GPIOBRST (1 << 1) /* Bit 1: IO port B reset */ #define RCC_AHB1RSTR_GPIOCRST (1 << 2) /* Bit 2: IO port C reset */ #define RCC_AHB1RSTR_GPIODRST (1 << 3) /* Bit 3: IO port D reset */ #define RCC_AHB1RSTR_GPIOERST (1 << 4) /* Bit 4: IO port E reset */ #define RCC_AHB1RSTR_GPIOFRST (1 << 5) /* Bit 5: IO port F reset */ #define RCC_AHB1RSTR_GPIOGRST (1 << 6) /* Bit 6: IO port G reset */ #define RCC_AHB1RSTR_GPIOHRST (1 << 7) /* Bit 7: IO port H reset */ #define RCC_AHB1RSTR_GPIOIRST (1 << 8) /* Bit 8: IO port I reset */ #define RCC_AHB1RSTR_GPIOJRST (1 << 9) /* Bit 9: IO port J reset */ #define RCC_AHB1RSTR_GPIOKRST (1 << 10) /* Bit 10: IO port K reset */ #define RCC_AHB1RSTR_CRCRST (1 << 12) /* Bit 12 CRC reset */ #define RCC_AHB1RSTR_DMA1RST (1 << 21) /* Bit 21: DMA1 reset */ #define RCC_AHB1RSTR_DMA2RST (1 << 22) /* Bit 22: DMA2 reset */ #define RCC_AHB1RSTR_DMA2DRST (1 << 23) /* Bit 23: DMA2D reset */ #define RCC_AHB1RSTR_ETHMACRST (1 << 25) /* Bit 25: Ethernet MAC reset */ #define RCC_AHB1RSTR_OTGHSRST (1 << 29) /* Bit 29: USB OTG HS module reset */ /* AHB2 peripheral reset register */ #define RCC_AHB2RSTR_DCMIRST (1 << 0) /* Bit 0: Camera interface reset */ #define RCC_AHB2RSTR_CRYPRST (1 << 4) /* Bit 4: Cryptographic module reset */ #define RCC_AHB2RSTR_HASHRST (1 << 5) /* Bit 5: Hash module reset */ #define RCC_AHB2RSTR_RNGRST (1 << 6) /* Bit 6: Random number generator module reset */ #define RCC_AHB2RSTR_OTGFSRST (1 << 7) /* Bit 7: USB OTG FS module reset */ /* AHB3 peripheral reset register */ #define RCC_AHB3RSTR_FSMCRST (1 << 0) /* Bit 0: Flexible static memory controller module reset */ /* APB1 Peripheral reset register */ #define RCC_APB1RSTR_TIM2RST (1 << 0) /* Bit 0: TIM2 reset */ #define RCC_APB1RSTR_TIM3RST (1 << 1) /* Bit 1: TIM3 reset */ #define RCC_APB1RSTR_TIM4RST (1 << 2) /* Bit 2: TIM4 reset */ #define RCC_APB1RSTR_TIM5RST (1 << 3) /* Bit 3: TIM5 reset */ #define RCC_APB1RSTR_TIM6RST (1 << 4) /* Bit 4: TIM6 reset */ #define RCC_APB1RSTR_TIM7RST (1 << 5) /* Bit 5: TIM7 reset */ #define RCC_APB1RSTR_TIM12RST (1 << 6) /* Bit 6: TIM12 reset */ #define RCC_APB1RSTR_TIM13RST (1 << 7) /* Bit 7: TIM13 reset */ #define RCC_APB1RSTR_TIM14RST (1 << 8) /* Bit 8: TIM14 reset */ #define RCC_APB1RSTR_WWDGRST (1 << 11) /* Bit 11: Window watchdog reset */ #define RCC_APB1RSTR_SPI2RST (1 << 14) /* Bit 14: SPI 2 reset */ #define RCC_APB1RSTR_SPI3RST (1 << 15) /* Bit 15: SPI 3 reset */ #define RCC_APB1RSTR_USART2RST (1 << 17) /* Bit 17: USART 2 reset */ #define RCC_APB1RSTR_USART3RST (1 << 18) /* Bit 18: USART 3 reset */ #define RCC_APB1RSTR_UART4RST (1 << 19) /* Bit 19: USART 4 reset */ #define RCC_APB1RSTR_UART5RST (1 << 20) /* Bit 20: USART 5 reset */ #define RCC_APB1RSTR_I2C1RST (1 << 21) /* Bit 21: I2C 1 reset */ #define RCC_APB1RSTR_I2C2RST (1 << 22) /* Bit 22: I2C 2 reset */ #define RCC_APB1RSTR_I2C3RST (1 << 23) /* Bit 23: I2C3 reset */ #define RCC_APB1RSTR_CAN1RST (1 << 25) /* Bit 25: CAN1 reset */ #define RCC_APB1RSTR_CAN2RST (1 << 26) /* Bit 26: CAN2 reset */ #define RCC_APB1RSTR_PWRRST (1 << 28) /* Bit 28: Power interface reset */ #define RCC_APB1RSTR_DACRST (1 << 29) /* Bit 29: DAC reset */ /* APB2 Peripheral reset register */ #define RCC_APB2RSTR_TIM1RST (1 << 0) /* Bit 0: TIM1 reset */ #define RCC_APB2RSTR_TIM8RST (1 << 1) /* Bit 1: TIM8 reset */ #define RCC_APB2RSTR_USART1RST (1 << 4) /* Bit 4: USART1 reset */ #define RCC_APB2RSTR_USART6RST (1 << 5) /* Bit 5: USART6 reset */ #define RCC_APB2RSTR_ADCRST (1 << 8) /* Bit 8: ADC interface reset (common to all ADCs) */ #define RCC_APB2RSTR_SDIORST (1 << 11) /* Bit 11: SDIO reset */ #define RCC_APB2RSTR_SPI1RST (1 << 12) /* Bit 12: SPI1 reset */ #define RCC_APB2RSTR_SYSCFGRST (1 << 14) /* Bit 14: System configuration controller reset */ #define RCC_APB2RSTR_TIM9RST (1 << 16) /* Bit 16: TIM9 reset */ #define RCC_APB2RSTR_TIM10RST (1 << 17) /* Bit 17: TIM10 reset */ #define RCC_APB2RSTR_TIM11RST (1 << 18) /* Bit 18: TIM11 reset */ /* AHB1 Peripheral Clock enable register */ #define RCC_AHB1ENR_GPIOEN(n) (1 << (n)) #define RCC_AHB1ENR_GPIOAEN (1 << 0) /* Bit 0: IO port A clock enable */ #define RCC_AHB1ENR_GPIOBEN (1 << 1) /* Bit 1: IO port B clock enable */ #define RCC_AHB1ENR_GPIOCEN (1 << 2) /* Bit 2: IO port C clock enable */ #define RCC_AHB1ENR_GPIODEN (1 << 3) /* Bit 3: IO port D clock enable */ #define RCC_AHB1ENR_GPIOEEN (1 << 4) /* Bit 4: IO port E clock enable */ #define RCC_AHB1ENR_GPIOFEN (1 << 5) /* Bit 5: IO port F clock enable */ #define RCC_AHB1ENR_GPIOGEN (1 << 6) /* Bit 6: IO port G clock enable */ #define RCC_AHB1ENR_GPIOHEN (1 << 7) /* Bit 7: IO port H clock enable */ #define RCC_AHB1ENR_GPIOIEN (1 << 8) /* Bit 8: IO port I clock enable */ #define RCC_AHB1ENR_CRCEN (1 << 12) /* Bit 12: CRC clock enable */ #define RCC_AHB1ENR_BKPSRAMEN (1 << 18) /* Bit 18: Backup SRAM interface clock enable */ #define RCC_AHB1ENR_CCMDATARAMEN (1 << 20) /* Bit 20: CCM data RAM clock enable */ #define RCC_AHB1ENR_DMA1EN (1 << 21) /* Bit 21: DMA1 clock enable */ #define RCC_AHB1ENR_DMA2EN (1 << 22) /* Bit 22: DMA2 clock enable */ #define RCC_AHB1ENR_DMA2DEN (1 << 23) /* Bit 23: DMA2D clock enable */ #define RCC_AHB1ENR_ETHMACEN (1 << 25) /* Bit 25: Ethernet MAC clock enable */ #define RCC_AHB1ENR_ETHMACTXEN (1 << 26) /* Bit 26: Ethernet Transmission clock enable */ #define RCC_AHB1ENR_ETHMACRXEN (1 << 27) /* Bit 27: Ethernet Reception clock enable */ #define RCC_AHB1ENR_ETHMACPTPEN (1 << 28) /* Bit 28: Ethernet PTP clock enable */ #define RCC_AHB1ENR_OTGHSEN (1 << 29) /* Bit 29: USB OTG HS clock enable */ #define RCC_AHB1ENR_OTGHSULPIEN (1 << 30) /* Bit 30: USB OTG HSULPI clock enable */ /* AHB2 Peripheral Clock enable register */ #define RCC_AHB2ENR_DCMIEN (1 << 0) /* Bit 0: Camera interface enable */ #define RCC_AHB2ENR_CRYPEN (1 << 4) /* Bit 4: Cryptographic modules clock enable */ #define RCC_AHB2ENR_HASHEN (1 << 5) /* Bit 5: Hash modules clock enable */ #define RCC_AHB2ENR_RNGEN (1 << 6) /* Bit 6: Random number generator clock enable */ #define RCC_AHB2ENR_OTGFSEN (1 << 7) /* Bit 7: USB OTG FS clock enable */ /* AHB3 Peripheral Clock enable register */ #define RCC_AHB3ENR_FSMCEN (1 << 0) /* Bit 0: Flexible static memory controller module clock enable */ /* APB1 Peripheral Clock enable register */ #define RCC_APB1ENR_TIM2EN (1 << 0) /* Bit 0: TIM2 clock enable */ #define RCC_APB1ENR_TIM3EN (1 << 1) /* Bit 1: TIM3 clock enable */ #define RCC_APB1ENR_TIM4EN (1 << 2) /* Bit 2: TIM4 clock enable */ #define RCC_APB1ENR_TIM5EN (1 << 3) /* Bit 3: TIM5 clock enable */ #define RCC_APB1ENR_TIM6EN (1 << 4) /* Bit 4: TIM6 clock enable */ #define RCC_APB1ENR_TIM7EN (1 << 5) /* Bit 5: TIM7 clock enable */ #define RCC_APB1ENR_TIM12EN (1 << 6) /* Bit 6: TIM12 clock enable */ #define RCC_APB1ENR_TIM13EN (1 << 7) /* Bit 7: TIM13 clock enable */ #define RCC_APB1ENR_TIM14EN (1 << 8) /* Bit 8: TIM14 clock enable */ #define RCC_APB1ENR_WWDGEN (1 << 11) /* Bit 11: Window watchdog clock enable */ #define RCC_APB1ENR_SPI2EN (1 << 14) /* Bit 14: SPI2 clock enable */ #define RCC_APB1ENR_SPI3EN (1 << 15) /* Bit 15: SPI3 clock enable */ #define RCC_APB1ENR_USART2EN (1 << 17) /* Bit 17: USART 2 clock enable */ #define RCC_APB1ENR_USART3EN (1 << 18) /* Bit 18: USART3 clock enable */ #define RCC_APB1ENR_UART4EN (1 << 19) /* Bit 19: UART4 clock enable */ #define RCC_APB1ENR_UART5EN (1 << 20) /* Bit 20: UART5 clock enable */ #define RCC_APB1ENR_I2C1EN (1 << 21) /* Bit 21: I2C1 clock enable */ #define RCC_APB1ENR_I2C2EN (1 << 22) /* Bit 22: I2C2 clock enable */ #define RCC_APB1ENR_I2C3EN (1 << 23) /* Bit 23: I2C3 clock enable */ #define RCC_APB1ENR_CAN1EN (1 << 25) /* Bit 25: CAN 1 clock enable */ #define RCC_APB1ENR_CAN2EN (1 << 26) /* Bit 26: CAN 2 clock enable */ #define RCC_APB1ENR_PWREN (1 << 28) /* Bit 28: Power interface clock enable */ #define RCC_APB1ENR_DACEN (1 << 29) /* Bit 29: DAC interface clock enable */ /* APB2 Peripheral Clock enable register */ #define RCC_APB2ENR_TIM1EN (1 << 0) /* Bit 0: TIM1 clock enable */ #define RCC_APB2ENR_TIM8EN (1 << 1) /* Bit 1: TIM8 clock enable */ #define RCC_APB2ENR_USART1EN (1 << 4) /* Bit 4: USART1 clock enable */ #define RCC_APB2ENR_USART6EN (1 << 5) /* Bit 5: USART6 clock enable */ #define RCC_APB2ENR_ADC1EN (1 << 8) /* Bit 8: ADC1 clock enable */ #define RCC_APB2ENR_ADC2EN (1 << 9) /* Bit 9: ADC2 clock enable */ #define RCC_APB2ENR_ADC3EN (1 << 10) /* Bit 10: ADC3 clock enable */ #define RCC_APB2ENR_SDIOEN (1 << 11) /* Bit 11: SDIO clock enable */ #define RCC_APB2ENR_SPI1EN (1 << 12) /* Bit 12: SPI1 clock enable */ #define RCC_APB2ENR_SYSCFGEN (1 << 14) /* Bit 14: System configuration controller clock enable */ #define RCC_APB2ENR_TIM9EN (1 << 16) /* Bit 16: TIM9 clock enable */ #define RCC_APB2ENR_TIM10EN (1 << 17) /* Bit 17: TIM10 clock enable */ #define RCC_APB2ENR_TIM11EN (1 << 18) /* Bit 18: TIM11 clock enable */ /* RCC AHB1 low power mode peripheral clock enable register */ #define RCC_AHB1LPENR_GPIOLPEN(n) (1 << (n)) #define RCC_AHB1LPENR_GPIOALPEN (1 << 0) /* Bit 0: IO port A clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOBLPEN (1 << 1) /* Bit 1: IO port B clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOCLPEN (1 << 2) /* Bit 2: IO port C clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIODLPEN (1 << 3) /* Bit 3: IO port D clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOELPEN (1 << 4) /* Bit 4: IO port E clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOFLPEN (1 << 5) /* Bit 5: IO port F clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOGLPEN (1 << 6) /* Bit 6: IO port G clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOHLPEN (1 << 7) /* Bit 7: IO port H clock enable during Sleep mode */ #define RCC_AHB1LPENR_GPIOILPEN (1 << 8) /* Bit 8: IO port I clock enable during Sleep mode */ #define RCC_AHB1LPENR_CRCLPEN (1 << 12) /* Bit 12: CRC clock enable during Sleep mode */ #define RCC_AHB1LPENR_FLITFLPEN (1 << 15) /* Bit 15: Flash interface clock enable during Sleep mode */ #define RCC_AHB1LPENR_SRAM1LPEN (1 << 16) /* Bit 16: SRAM 1 interface clock enable during Sleep mode */ #define RCC_AHB1LPENR_SRAM2LPEN (1 << 17) /* Bit 17: SRAM 2 interface clock enable during Sleep mode */ #define RCC_AHB1LPENR_BKPSRAMLPEN (1 << 18) /* Bit 18: Backup SRAM interface clock enable during Sleep mode */ #define RCC_AHB1LPENR_CCMDATARAMLPEN (1 << 20) /* Bit 20: CCM data RAM clock enable during Sleep mode */ #define RCC_AHB1LPENR_DMA1LPEN (1 << 21) /* Bit 21: DMA1 clock enable during Sleep mode */ #define RCC_AHB1LPENR_DMA2LPEN (1 << 22) /* Bit 22: DMA2 clock enable during Sleep mode */ #define RCC_AHB1LPENR_DMA2DLPEN (1 << 23) /* Bit 23: DMA2D clock enable during Sleep mode */ #define RCC_AHB1LPENR_ETHMACLPEN (1 << 25) /* Bit 25: Ethernet MAC clock enable during Sleep mode */ #define RCC_AHB1LPENR_ETHMACTXLPEN (1 << 26) /* Bit 26: Ethernet Transmission clock enable during Sleep mode */ #define RCC_AHB1LPENR_ETHMACRXLPEN (1 << 27) /* Bit 27: Ethernet Reception clock enable during Sleep mode */ #define RCC_AHB1LPENR_ETHMACPTPLPEN (1 << 28) /* Bit 28: Ethernet PTP clock enable during Sleep mode */ #define RCC_AHB1LPENR_OTGHSLPEN (1 << 29) /* Bit 29: USB OTG HS clock enable during Sleep mode */ #define RCC_AHB1LPENR_OTGHSULPILPEN (1 << 30) /* Bit 30: USB OTG HSULPI clock enable during Sleep mode */ /* RCC AHB2 low power modeperipheral clock enable register */ #define RCC_AHB2LPENR_DCMILPEN (1 << 0) /* Bit 0: Camera interface enable during Sleep mode */ #define RCC_AHB2LPENR_CRYPLPEN (1 << 4) /* Bit 4: Cryptographic modules clock enable during Sleep mode */ #define RCC_AHB2LPENR_HASHLPEN (1 << 5) /* Bit 5: Hash modules clock enable during Sleep mode */ #define RCC_AHB2LPENR_RNGLPEN (1 << 6) /* Bit 6: Random number generator clock enable during Sleep mode */ #define RCC_AHB2LPENR_OTGFLPSEN (1 << 7) /* Bit 7: USB OTG FS clock enable during Sleep mode */ /* RCC AHB3 low power modeperipheral clock enable register */ #define RCC_AHB3LPENR_FSMLPEN (1 << 0) /* Bit 0: Flexible static memory controller module clock * enable during Sleep mode */ /* RCC APB1 low power modeperipheral clock enable register */ #define RCC_APB1LPENR_TIM2LPEN (1 << 0) /* Bit 0: TIM2 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM3LPEN (1 << 1) /* Bit 1: TIM3 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM4LPEN (1 << 2) /* Bit 2: TIM4 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM5LPEN (1 << 3) /* Bit 3: TIM5 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM6LPEN (1 << 4) /* Bit 4: TIM6 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM7LPEN (1 << 5) /* Bit 5: TIM7 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM12LPEN (1 << 6) /* Bit 6: TIM12 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM13LPEN (1 << 7) /* Bit 7: TIM13 clock enable during Sleep mode */ #define RCC_APB1LPENR_TIM14LPEN (1 << 8) /* Bit 8: TIM14 clock enable during Sleep mode */ #define RCC_APB1LPENR_WWDGLPEN (1 << 11) /* Bit 11: Window watchdog clock enable during Sleep mode */ #define RCC_APB1LPENR_SPI2LPEN (1 << 14) /* Bit 14: SPI2 clock enable during Sleep mode */ #define RCC_APB1LPENR_SPI3LPEN (1 << 15) /* Bit 15: SPI3 clock enable during Sleep mode */ #define RCC_APB1LPENR_USART2LPEN (1 << 17) /* Bit 17: USART 2 clock enable during Sleep mode */ #define RCC_APB1LPENR_USART3LPEN (1 << 18) /* Bit 18: USART3 clock enable during Sleep mode */ #define RCC_APB1LPENR_UART4LPEN (1 << 19) /* Bit 19: UART4 clock enable during Sleep mode */ #define RCC_APB1LPENR_UART5LPEN (1 << 20) /* Bit 20: UART5 clock enable during Sleep mode */ #define RCC_APB1LPENR_I2C1LPEN (1 << 21) /* Bit 21: I2C1 clock enable during Sleep mode */ #define RCC_APB1LPENR_I2C2LPEN (1 << 22) /* Bit 22: I2C2 clock enable during Sleep mode */ #define RCC_APB1LPENR_I2C3LPEN (1 << 23) /* Bit 23: I2C3 clock enable during Sleep mode */ #define RCC_APB1LPENR_CAN1LPEN (1 << 25) /* Bit 25: CAN 1 clock enable during Sleep mode */ #define RCC_APB1LPENR_CAN2LPEN (1 << 26) /* Bit 26: CAN 2 clock enable during Sleep mode */ #define RCC_APB1LPENR_PWRLPEN (1 << 28) /* Bit 28: Power interface clock enable during Sleep mode */ #define RCC_APB1LPENR_DACLPEN (1 << 29) /* Bit 29: DAC interface clock enable during Sleep mode */ /* RCC APB2 low power mode peripheral clock enable register */ #define RCC_APB2LPENR_TIM1LPEN (1 << 0) /* Bit 0: TIM1 clock enable during Sleep mode */ #define RCC_APB2LPENR_TIM8LPEN (1 << 1) /* Bit 1: TIM8 clock enable during Sleep mode */ #define RCC_APB2LPENR_USART1LPEN (1 << 4) /* Bit 4: USART1 clock enable during Sleep mode */ #define RCC_APB2LPENR_USART6LPEN (1 << 5) /* Bit 5: USART6 clock enable during Sleep mode */ #define RCC_APB2LPENR_ADC1LPEN (1 << 8) /* Bit 8: ADC1 clock enable during Sleep mode */ #define RCC_APB2LPENR_ADC2LPEN (1 << 9) /* Bit 9: ADC2 clock enable during Sleep mode */ #define RCC_APB2LPENR_ADC3LPEN (1 << 10) /* Bit 10: ADC3 clock enable during Sleep mode */ #define RCC_APB2LPENR_SDIOLPEN (1 << 11) /* Bit 11: SDIO clock enable during Sleep mode */ #define RCC_APB2LPENR_SPI1LPEN (1 << 12) /* Bit 12: SPI1 clock enable during Sleep mode */ #define RCC_APB2LPENR_SYSCFGLPEN (1 << 14) /* Bit 14: System configuration controller clock enable during Sleep mode */ #define RCC_APB2LPENR_TIM9LPEN (1 << 16) /* Bit 16: TIM9 clock enable during Sleep mode */ #define RCC_APB2LPENR_TIM10LPEN (1 << 17) /* Bit 17: TIM10 clock enable during Sleep mode */ #define RCC_APB2LPENR_TIM11LPEN (1 << 18) /* Bit 18: TIM11 clock enable during Sleep mode */ /* Backup domain control register */ #define RCC_BDCR_LSEON (1 << 0) /* Bit 0: External Low Speed oscillator enable */ #define RCC_BDCR_LSERDY (1 << 1) /* Bit 1: External Low Speed oscillator Ready */ #define RCC_BDCR_LSEBYP (1 << 2) /* Bit 2: External Low Speed oscillator Bypass */ #define RCC_BDCR_RTCSEL_SHIFT (8) /* Bits 9:8: RTC clock source selection */ #define RCC_BDCR_RTCSEL_MASK (3 << RCC_BDCR_RTCSEL_SHIFT) # define RCC_BDCR_RTCSEL_NOCLK (0 << RCC_BDCR_RTCSEL_SHIFT) /* 00: No clock */ # define RCC_BDCR_RTCSEL_LSE (1 << RCC_BDCR_RTCSEL_SHIFT) /* 01: LSE oscillator clock used as RTC clock */ # define RCC_BDCR_RTCSEL_LSI (2 << RCC_BDCR_RTCSEL_SHIFT) /* 10: LSI oscillator clock used as RTC clock */ # define RCC_BDCR_RTCSEL_HSE (3 << RCC_BDCR_RTCSEL_SHIFT) /* 11: HSE oscillator clock divided by 128 used as RTC clock */ #define RCC_BDCR_RTCEN (1 << 15) /* Bit 15: RTC clock enable */ #define RCC_BDCR_BDRST (1 << 16) /* Bit 16: Backup domain software reset */ /* Control/status register */ #define RCC_CSR_LSION (1 << 0) /* Bit 0: Internal Low Speed oscillator enable */ #define RCC_CSR_LSIRDY (1 << 1) /* Bit 1: Internal Low Speed oscillator Ready */ #define RCC_CSR_RMVF (1 << 24) /* Bit 24: Remove reset flag */ #define RCC_CSR_BORRSTF (1 << 25) /* Bit 25: BOR reset flag */ #define RCC_CSR_PINRSTF (1 << 26) /* Bit 26: PIN reset flag */ #define RCC_CSR_PORRSTF (1 << 27) /* Bit 27: POR/PDR reset flag */ #define RCC_CSR_SFTRSTF (1 << 28) /* Bit 28: Software Reset flag */ #define RCC_CSR_IWDGRSTF (1 << 29) /* Bit 29: Independent Watchdog reset flag */ #define RCC_CSR_WWDGRSTF (1 << 30) /* Bit 30: Window watchdog reset flag */ #define RCC_CSR_LPWRRSTF (1 << 31) /* Bit 31: Low-Power reset flag */ /* Spread spectrum clock generation register */ #define RCC_SSCGR_MODPER_SHIFT (0) /* Bit 0-12: Modulation period */ #define RCC_SSCGR_MODPER_MASK (0x1fff << RCC_SSCGR_MODPER_SHIFT) # define RCC_SSCGR_MODPER(n) ((n) << RCC_SSCGR_MODPER_SHIFT) #define RCC_SSCGR_INCSTEP_SHIFT (13) /* Bit 13-27: Incrementation step */ #define RCC_SSCGR_INCSTEP_MASK (0x7fff << RCC_SSCGR_INCSTEP_SHIFT) # define RCC_SSCGR_INCSTEP(n) ((n) << RCC_SSCGR_INCSTEP_SHIFT) #define RCC_SSCGR_SPREADSEL (1 << 30) /* Bit 30: Spread Select */ #define RCC_SSCGR_SSCGEN (1 << 31) /* Bit 31: Spread spectrum modulation enable */ /* PLLI2S configuration register */ #define RCC_PLLI2SCFGR_PLLI2SN_SHIFT (6) /* Bits 6-14: PLLI2S multiplication factor for VCO */ #define RCC_PLLI2SCFGR_PLLI2SN_MASK (0x1ff << RCC_PLLI2SCFGR_PLLI2SN_SHIFT) #define RCC_PLLI2SCFGR_PLLI2SR_SHIFT (28) /* Bits 28-30: PLLI2S division factor for I2S clocks */ #define RCC_PLLI2SCFGR_PLLI2SR_MASK (7 << RCC_PLLI2SCFGR_PLLI2SR_SHIFT) /* PLLSAI configuration register */ #define RCC_PLLSAICFGR_PLLSAIN_SHIFT (6) /* Bits 6-14: PLLSAI divider (N) for VCO */ #define RCC_PLLSAICFGR_PLLSAIN_MASK (0x1ff << RCC_PLLSAICFGR_PLLSAIN_SHIFT) # define RCC_PLLSAICFGR_PLLSAIN(n) ((n) << RCC_PLLSAICFGR_PLLSAIN_SHIFT) #define RCC_PLLSAICFGR_PLLSAIQ_SHIFT (24) /* Bits 24-27: PLLSAI division factor for SAI clock */ #define RCC_PLLSAICFGR_PLLSAIQ_MASK (0x0F << RCC_PLLSAICFGR_PLLSAIQ_SHIFT) # define RCC_PLLSAICFGR_PLLSAIQ(n) ((n) << RCC_PLLSAICFGR_PLLSAIQ_SHIFT) #define RCC_PLLSAICFGR_PLLSAIR_SHIFT (28) /* Bits 28-30: PLLSAI division factor for LCD clock */ #define RCC_PLLSAICFGR_PLLSAIR_MASK (7 << RCC_PLLSAICFGR_PLLSAIR_SHIFT) # define RCC_PLLSAICFGR_PLLSAIR(n) ((n) << RCC_PLLSAICFGR_PLLSAIR_SHIFT) /* Dedicated clocks configuration register */ #define RCC_SAICLKSRC_PLLSAI 0 #define RCC_SAICLKSRC_PLLI2S 1 #define RCC_SAICLKSRC_ALTERNATE 2 #define RCC_PLLSAIDIVR_DIV2 0 #define RCC_PLLSAIDIVR_DIV4 1 #define RCC_PLLSAIDIVR_DIV8 2 #define RCC_PLLSAIDIVR_DIV16 3 #endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F40XXX_RCC_H */
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html class="no-js css-menubar" lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui"> <meta name="description" content="bootstrap material admin template"> <meta name="author" content=""> <title>Chartist | Remark Material Admin Template</title> <link rel="apple-touch-icon" href="../assets/images/apple-touch-icon.png"> <link rel="shortcut icon" href="../assets/images/favicon.ico"> <!-- Stylesheets --> <link rel="stylesheet" href="../../global/css/bootstrap.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/css/bootstrap-extend.min.css?v2.1.0"> <link rel="stylesheet" href="../assets/css/site.min.css?v2.1.0"> <!-- Skin tools (demo site only) --> <link rel="stylesheet" href="../../global/css/skintools.min.css?v2.1.0"> <script src="../assets/js/sections/skintools.min.js"></script> <!-- Plugins --> <link rel="stylesheet" href="../../global/vendor/animsition/animsition.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/asscrollable/asScrollable.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/switchery/switchery.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/intro-js/introjs.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/slidepanel/slidePanel.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/flag-icon-css/flag-icon.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/waves/waves.min.css?v2.1.0"> <!-- Plugins For This Page --> <link rel="stylesheet" href="../../global/vendor/chartist-js/chartist.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/vendor/chartist-plugin-tooltip/chartist-plugin-tooltip.min.css?v2.1.0"> <!-- Page --> <link rel="stylesheet" href="../assets/examples/css/charts/chartist.min.css?v2.1.0"> <!-- Fonts --> <link rel="stylesheet" href="../../global/fonts/material-design/material-design.min.css?v2.1.0"> <link rel="stylesheet" href="../../global/fonts/brand-icons/brand-icons.min.css?v2.1.0"> <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto:400,400italic,700'> <!--[if lt IE 9]> <script src="../../global/vendor/html5shiv/html5shiv.min.js"></script> <![endif]--> <!--[if lt IE 10]> <script src="../../global/vendor/media-match/media.match.min.js"></script> <script src="../../global/vendor/respond/respond.min.js"></script> <![endif]--> <!-- Scripts --> <script src="../../global/vendor/modernizr/modernizr.min.js"></script> <script src="../../global/vendor/breakpoints/breakpoints.min.js"></script> <script> Breakpoints(); </script> </head> <body> <!--[if lt IE 8]> <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <nav class="site-navbar navbar navbar-inverse navbar-fixed-top navbar-mega" role="navigation"> <div class="navbar-container container-fluid"> <!-- Navbar Collapse --> <div class="navbar-collapse navbar-collapse-toolbar" id="site-navbar-collapse"> <!-- Navbar Toolbar --> <ul class="nav navbar-toolbar"> <li id="toggleMenubar"> <a data-toggle="menubar" href="#" role="button"> <i class="icon hamburger hamburger-arrow-left"> <span class="sr-only">Toggle menubar</span> <span class="hamburger-bar"></span> </i> </a> </li> <li> <a class="icon md-search" data-toggle="collapse" href="#site-navbar-search" role="button"> <span class="sr-only">Toggle Search</span> </a> </li> </ul> <!-- End Navbar Toolbar --> <!-- Navbar Toolbar Right --> <ul class="nav navbar-toolbar navbar-right navbar-toolbar-right"> <li class="dropdown"> <a data-toggle="dropdown" href="javascript:void(0)" title="Notifications" aria-expanded="false" data-animation="scale-up" role="button"> <i class="icon md-notifications" aria-hidden="true"></i> <span class="badge badge-danger up">5</span> </a> <ul class="dropdown-menu dropdown-menu-right dropdown-menu-media" role="menu"> <li class="dropdown-menu-header" role="presentation"> <h5>NOTIFICATIONS</h5> <span class="label label-round label-danger">New 5</span> </li> <li class="list-group" role="presentation"> <div data-role="container"> <div data-role="content"> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <i class="icon md-receipt bg-red-600 white icon-circle" aria-hidden="true"></i> </div> <div class="media-body"> <h6 class="media-heading">A new order has been placed</h6> <time class="media-meta" datetime="2015-06-12T20:50:48+08:00">5 hours ago</time> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <i class="icon md-account bg-green-600 white icon-circle" aria-hidden="true"></i> </div> <div class="media-body"> <h6 class="media-heading">Completed the task</h6> <time class="media-meta" datetime="2015-06-11T18:29:20+08:00">2 days ago</time> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <i class="icon md-settings bg-red-600 white icon-circle" aria-hidden="true"></i> </div> <div class="media-body"> <h6 class="media-heading">Settings updated</h6> <time class="media-meta" datetime="2015-06-11T14:05:00+08:00">2 days ago</time> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <i class="icon md-calendar bg-blue-600 white icon-circle" aria-hidden="true"></i> </div> <div class="media-body"> <h6 class="media-heading">Event started</h6> <time class="media-meta" datetime="2015-06-10T13:50:18+08:00">3 days ago</time> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <i class="icon md-comment bg-orange-600 white icon-circle" aria-hidden="true"></i> </div> <div class="media-body"> <h6 class="media-heading">Message received</h6> <time class="media-meta" datetime="2015-06-10T12:34:48+08:00">3 days ago</time> </div> </div> </a> </div> </div> </li> <li class="dropdown-menu-footer" role="presentation"> <a class="dropdown-menu-footer-btn" href="javascript:void(0)" role="button"> <i class="icon md-settings" aria-hidden="true"></i> </a> <a href="javascript:void(0)" role="menuitem"> All notifications </a> </li> </ul> </li> <li class="dropdown"> <a data-toggle="dropdown" href="javascript:void(0)" title="Messages" aria-expanded="false" data-animation="scale-up" role="button"> <i class="icon md-email" aria-hidden="true"></i> <span class="badge badge-info up">3</span> </a> <ul class="dropdown-menu dropdown-menu-right dropdown-menu-media" role="menu"> <li class="dropdown-menu-header" role="presentation"> <h5>MESSAGES</h5> <span class="label label-round label-info">New 3</span> </li> <li class="list-group" role="presentation"> <div data-role="container"> <div data-role="content"> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <span class="avatar avatar-sm avatar-online"> <img src="../../global/portraits/2.jpg" alt="..." /> <i></i> </span> </div> <div class="media-body"> <h6 class="media-heading">Mary Adams</h6> <div class="media-meta"> <time datetime="2015-06-17T20:22:05+08:00">30 minutes ago</time> </div> <div class="media-detail">Anyways, i would like just do it</div> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <span class="avatar avatar-sm avatar-off"> <img src="../../global/portraits/3.jpg" alt="..." /> <i></i> </span> </div> <div class="media-body"> <h6 class="media-heading">Caleb Richards</h6> <div class="media-meta"> <time datetime="2015-06-17T12:30:30+08:00">12 hours ago</time> </div> <div class="media-detail">I checheck the document. But there seems</div> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <span class="avatar avatar-sm avatar-busy"> <img src="../../global/portraits/4.jpg" alt="..." /> <i></i> </span> </div> <div class="media-body"> <h6 class="media-heading">June Lane</h6> <div class="media-meta"> <time datetime="2015-06-16T18:38:40+08:00">2 days ago</time> </div> <div class="media-detail">Lorem ipsum Id consectetur et minim</div> </div> </div> </a> <a class="list-group-item" href="javascript:void(0)" role="menuitem"> <div class="media"> <div class="media-left padding-right-10"> <span class="avatar avatar-sm avatar-away"> <img src="../../global/portraits/5.jpg" alt="..." /> <i></i> </span> </div> <div class="media-body"> <h6 class="media-heading">Edward Fletcher</h6> <div class="media-meta"> <time datetime="2015-06-15T20:34:48+08:00">3 days ago</time> </div> <div class="media-detail">Dolor et irure cupidatat commodo nostrud nostrud.</div> </div> </div> </a> </div> </div> </li> <li class="dropdown-menu-footer" role="presentation"> <a class="dropdown-menu-footer-btn" href="javascript:void(0)" role="button"> <i class="icon md-settings" aria-hidden="true"></i> </a> <a href="javascript:void(0)" role="menuitem"> See all messages </a> </li> </ul> </li> <li id="toggleChat"> <a data-toggle="site-sidebar" href="javascript:void(0)" title="Chat" data-url="../site-sidebar.tpl"> <i class="icon md-comment" aria-hidden="true"></i> </a> </li> </ul> <!-- End Navbar Toolbar Right --> <div class="navbar-brand navbar-brand-center"> <a href="../index.html"> <img class="navbar-brand-logo" src="../assets/images/logo.png" title="Remark"> </a> </div> </div> <!-- End Navbar Collapse --> <!-- Site Navbar Seach --> <div class="collapse navbar-search-overlap" id="site-navbar-search"> <form role="search"> <div class="form-group"> <div class="input-search"> <i class="input-search-icon md-search" aria-hidden="true"></i> <input type="text" class="form-control" name="site-search" placeholder="Search..."> <button type="button" class="input-search-close icon md-close" data-target="#site-navbar-search" data-toggle="collapse" aria-label="Close"></button> </div> </div> </form> </div> <!-- End Site Navbar Seach --> </div> </nav> <div class="site-menubar"> <div class="site-menubar-header"> <div class="cover overlay"> <img class="cover-image" src="../assets/examples/images/dashboard-header.jpg" alt="..."> <div class="overlay-panel vertical-align overlay-background"> <div class="vertical-align-middle"> <a class="avatar avatar-lg" href="javascript:void(0)"> <img src="../../global/portraits/1.jpg" alt=""> </a> <div class="site-menubar-info"> <h5 class="site-menubar-user">Machi</h5> <p class="site-menubar-email">machidesign@gmail.com</p> </div> </div> </div> </div> </div> <div class="site-menubar-body"> <div> <div> <ul class="site-menu"> <li class="site-menu-item"> <a class="animsition-link" href="../index.html"> <i class="site-menu-icon md-view-dashboard" aria-hidden="true"></i> <span class="site-menu-title">Dashboard</span> </a> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-view-compact" aria-hidden="true"></i> <span class="site-menu-title">Layouts</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/menubar-fold.html"> <span class="site-menu-title">Menubar Fold</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/menubar-disable-hover.html"> <span class="site-menu-title">Menubar Disable Hover</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/menubar-open.html"> <span class="site-menu-title">Menubar Open</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/menubar-push.html"> <span class="site-menu-title">Menubar Push</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/grids.html"> <span class="site-menu-title">Grid Scaffolding</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/layout-grid.html"> <span class="site-menu-title">Layout Grid</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/headers.html"> <span class="site-menu-title">Different Headers</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/panel-transition.html"> <span class="site-menu-title">Panel Transition</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/boxed.html"> <span class="site-menu-title">Boxed Layout</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../layouts/two-columns.html"> <span class="site-menu-title">Two Columns</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-google-pages" aria-hidden="true"></i> <span class="site-menu-title">Pages</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <span class="site-menu-title">Errors</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../pages/error-400.html"> <span class="site-menu-title">400</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/error-403.html"> <span class="site-menu-title">403</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/error-404.html"> <span class="site-menu-title">404</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/error-500.html"> <span class="site-menu-title">500</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/error-503.html"> <span class="site-menu-title">503</span> </a> </li> </ul> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/faq.html"> <span class="site-menu-title">FAQ</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/gallery.html"> <span class="site-menu-title">Gallery</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/gallery-grid.html"> <span class="site-menu-title">Gallery Grid</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/search-result.html"> <span class="site-menu-title">Search Result</span> </a> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <span class="site-menu-title">Maps</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../pages/map-google.html"> <span class="site-menu-title">Google Maps</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/map-vector.html"> <span class="site-menu-title">Vector Maps</span> </a> </li> </ul> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/maintenance.html"> <span class="site-menu-title">Maintenance</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/forgot-password.html"> <span class="site-menu-title">Forgot Password</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/lockscreen.html"> <span class="site-menu-title">Lockscreen</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/login.html"> <span class="site-menu-title">Login</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/register.html"> <span class="site-menu-title">Register</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/login-v2.html"> <span class="site-menu-title">Login V2</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/register-v2.html"> <span class="site-menu-title">Register V2</span> <div class="site-menu-label"> <span class="label label-info label-round">new</span> </div> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/login-v3.html"> <span class="site-menu-title">Login V3</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/register-v3.html"> <span class="site-menu-title">Register V3</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/user.html"> <span class="site-menu-title">User List</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/invoice.html"> <span class="site-menu-title">Invoice</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/blank.html"> <span class="site-menu-title">Blank Page</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/email.html"> <span class="site-menu-title">Email</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/code-editor.html"> <span class="site-menu-title">Code Editor</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/profile.html"> <span class="site-menu-title">Profile</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../pages/site-map.html"> <span class="site-menu-title">Sitemap</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-palette" aria-hidden="true"></i> <span class="site-menu-title">Basic UI</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <span class="site-menu-title">Panel</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/panel-structure.html"> <span class="site-menu-title">Panel Structure</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/panel-actions.html"> <span class="site-menu-title">Panel Actions</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/panel-portlets.html"> <span class="site-menu-title">Panel Portlets</span> </a> </li> </ul> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/buttons.html"> <span class="site-menu-title">Buttons</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/dropdowns.html"> <span class="site-menu-title">Dropdowns</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/icons.html"> <span class="site-menu-title">Icons</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/list.html"> <span class="site-menu-title">List</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/tooltip-popover.html"> <span class="site-menu-title">Tooltip &amp; Popover</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/modals.html"> <span class="site-menu-title">Modals</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/tabs-accordions.html"> <span class="site-menu-title">Tabs &amp; Accordions</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/images.html"> <span class="site-menu-title">Images</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/badges-labels.html"> <span class="site-menu-title">Badges &amp; Labels</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/progress-bars.html"> <span class="site-menu-title">Progress Bars</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/carousel.html"> <span class="site-menu-title">Carousel</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/typography.html"> <span class="site-menu-title">Typography</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/colors.html"> <span class="site-menu-title">Colors</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../uikit/utilities.html"> <span class="site-menu-title">Utilties</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-format-color-fill" aria-hidden="true"></i> <span class="site-menu-title">Advanced UI</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item hidden-xs site-tour-trigger"> <a href="javascript:void(0)"> <span class="site-menu-title">Tour</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/animation.html"> <span class="site-menu-title">Animation</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/highlight.html"> <span class="site-menu-title">Highlight</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/lightbox.html"> <span class="site-menu-title">Lightbox</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/scrollable.html"> <span class="site-menu-title">Scrollable</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/rating.html"> <span class="site-menu-title">Rating</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/context-menu.html"> <span class="site-menu-title">Context Menu</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/alertify.html"> <span class="site-menu-title">Alertify</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/masonry.html"> <span class="site-menu-title">Masonry</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/treeview.html"> <span class="site-menu-title">Treeview</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/toastr.html"> <span class="site-menu-title">Toastr</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/maps-vector.html"> <span class="site-menu-title">Vector Maps</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/maps-google.html"> <span class="site-menu-title">Google Maps</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/sortable-nestable.html"> <span class="site-menu-title">Sortable &amp; Nestable</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../advanced/bootbox-sweetalert.html"> <span class="site-menu-title">Bootbox &amp; Sweetalert</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-puzzle-piece" aria-hidden="true"></i> <span class="site-menu-title">Structure</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../structure/alerts.html"> <span class="site-menu-title">Alerts</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/ribbon.html"> <span class="site-menu-title">Ribbon</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/pricing-tables.html"> <span class="site-menu-title">Pricing Tables</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/overlay.html"> <span class="site-menu-title">Overlay</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/cover.html"> <span class="site-menu-title">Cover</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/timeline-simple.html"> <span class="site-menu-title">Simple Timeline</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/timeline.html"> <span class="site-menu-title">Timeline</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/step.html"> <span class="site-menu-title">Step</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/comments.html"> <span class="site-menu-title">Comments</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/media.html"> <span class="site-menu-title">Media</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/chat.html"> <span class="site-menu-title">Chat</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/testimonials.html"> <span class="site-menu-title">Testimonials</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/nav.html"> <span class="site-menu-title">Nav</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/navbars.html"> <span class="site-menu-title">Navbars</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/blockquotes.html"> <span class="site-menu-title">Blockquotes</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/pagination.html"> <span class="site-menu-title">Pagination</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../structure/breadcrumbs.html"> <span class="site-menu-title">Breadcrumbs</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-widgets" aria-hidden="true"></i> <span class="site-menu-title">Widgets</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../widgets/statistics.html"> <span class="site-menu-title">Statistics Widgets</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../widgets/data.html"> <span class="site-menu-title">Data Widgets</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../widgets/blog.html"> <span class="site-menu-title">Blog Widgets</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../widgets/chart.html"> <span class="site-menu-title">Chart Widgets</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../widgets/social.html"> <span class="site-menu-title">Social Widgets</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../widgets/weather.html"> <span class="site-menu-title">Weather Widgets</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-comment-alt-text" aria-hidden="true"></i> <span class="site-menu-title">Forms</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../forms/general.html"> <span class="site-menu-title">General Elements</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/material.html"> <span class="site-menu-title">Material Elements</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/advanced.html"> <span class="site-menu-title">Advanced Elements</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/layouts.html"> <span class="site-menu-title">Form Layouts</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/wizard.html"> <span class="site-menu-title">Form Wizard</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/validation.html"> <span class="site-menu-title">Form Validation</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/masks.html"> <span class="site-menu-title">Form Masks</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/editable.html"> <span class="site-menu-title">Form Editable</span> </a> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <span class="site-menu-title">Editors</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../forms/editor-summernote.html"> <span class="site-menu-title">Summernote</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/editor-markdown.html"> <span class="site-menu-title">Markdown</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/editor-ace.html"> <span class="site-menu-title">Ace Editor</span> </a> </li> </ul> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/image-cropping.html"> <span class="site-menu-title">Image Cropping</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../forms/file-uploads.html"> <span class="site-menu-title">File Uploads</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-border-all" aria-hidden="true"></i> <span class="site-menu-title">Tables</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../tables/basic.html"> <span class="site-menu-title">Basic Tables</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/bootstrap.html"> <span class="site-menu-title">Bootstrap Tables</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/floatthead.html"> <span class="site-menu-title">floatThead</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/responsive.html"> <span class="site-menu-title">Responsive Tables</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/editable.html"> <span class="site-menu-title">Editable Tables</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/jsgrid.html"> <span class="site-menu-title">jsGrid</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/footable.html"> <span class="site-menu-title">FooTable</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../tables/datatable.html"> <span class="site-menu-title">DataTables</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub active"> <a href="javascript:void(0)"> <i class="site-menu-icon md-chart" aria-hidden="true"></i> <span class="site-menu-title">Chart</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="chartjs.html"> <span class="site-menu-title">Chart.js</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="gauges.html"> <span class="site-menu-title">Gauges</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="flot.html"> <span class="site-menu-title">Flot</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="peity.html"> <span class="site-menu-title">Peity</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="sparkline.html"> <span class="site-menu-title">Sparkline</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="morris.html"> <span class="site-menu-title">Morris</span> </a> </li> <li class="site-menu-item active"> <a class="animsition-link" href="chartist.html"> <span class="site-menu-title">Chartist.js</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="rickshaw.html"> <span class="site-menu-title">Rickshaw</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="pie-progress.html"> <span class="site-menu-title">Pie Progress</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="c3.html"> <span class="site-menu-title">C3</span> </a> </li> </ul> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <i class="site-menu-icon md-apps" aria-hidden="true"></i> <span class="site-menu-title">Apps</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../apps/contacts/contacts.html"> <span class="site-menu-title">Contacts</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/calendar/calendar.html"> <span class="site-menu-title">Calendar</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/notebook/notebook.html"> <span class="site-menu-title">Notebook</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/taskboard/taskboard.html"> <span class="site-menu-title">Taskboard</span> </a> </li> <li class="site-menu-item has-sub"> <a href="javascript:void(0)"> <span class="site-menu-title">Documents</span> <span class="site-menu-arrow"></span> </a> <ul class="site-menu-sub"> <li class="site-menu-item"> <a class="animsition-link" href="../apps/documents/articles.html"> <span class="site-menu-title">Articles</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/documents/categories.html"> <span class="site-menu-title">Categories</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/documents/article.html"> <span class="site-menu-title">Article</span> </a> </li> </ul> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/forum/forum.html"> <span class="site-menu-title">Forum</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/message/message.html"> <span class="site-menu-title">Message</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/projects/projects.html"> <span class="site-menu-title">Projects</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/mailbox/mailbox.html"> <span class="site-menu-title">Mailbox</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/media/overview.html"> <span class="site-menu-title">Media</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/work/work.html"> <span class="site-menu-title">Work</span> </a> </li> <li class="site-menu-item"> <a class="animsition-link" href="../apps/location/location.html"> <span class="site-menu-title">Location</span> </a> </li> </ul> </li> <li class="site-menu-item"> <a class="animsition-link" href="../angular/index.html"> <i class="site-menu-icon bd-angular" aria-hidden="true"></i> <span class="site-menu-title">Angular UI</span> <div class="site-menu-label"> <span class="label label-danger label-round">new</span> </div> </a> </li> </ul> </div> </div> </div> </div> <!-- Page --> <div class="page animsition"> <div class="page-header"> <h1 class="page-title">Chartist</h1> <ol class="breadcrumb"> <li><a href="../index.html">Home</a></li> <li><a href="javascript:void(0)">Charts</a></li> <li class="active">Chartist</li> </ol> <div class="page-header-actions"> <a class="btn btn-sm btn-primary btn-round" href="https://gionkunz.github.io/chartist-js/" target="_blank"> <i class="icon md-link" aria-hidden="true"></i> <span class="hidden-xs">Official Website</span> </a> </div> </div> <div class="page-content container-fluid"> <!-- Panel line css animation Chart --> <div class="panel"> <div class="panel-heading"> <h3 class="panel-title">CSS ANIMATION</h3> </div> <div class="panel-body"> <!-- Example css animation Chart --> <div class="example-wrap"> <div class="row row-lg"> <div class="col-lg-9"> <div class="example"> <div class="ct-chart ct-golden-section" id="exampleLineAnimation"></div> </div> </div> <div class="col-lg-3"> <p class="margin-top-20">Specifying the style of your chart in CSS is not only cleaner but also enables you to use awesome CSS animations and transitions to be applied to your SVG elements!</p> </div> </div> </div> <!-- End Example css animation Chart --> </div> </div> <!-- End Panel Pie --> <!-- Panel Line --> <div class="panel"> <div class="panel-heading"> <h3 class="panel-title">Line</h3> </div> <div class="panel-body"> <div class="row row-lg"> <div class="col-md-6"> <!-- Example Simple Line Chart --> <div class="example-wrap"> <h4 class="example-title">Simple Line Chart</h4> <p>An example of a simple line chart with three series.</p> <div class="example"> <div class="ct-chart" id="exampleSimpleLine"></div> </div> </div> <!-- End Example Simple Line Chart --> </div> <div class="col-md-6"> <!-- Example Line Scatter Diagram --> <div class="example-wrap"> <h4 class="example-title">Line Scatter Diagram</h4> <p>This advanced example uses a line chart to draw a scatter diagram. The data object is created with a functional style random mechanism. There is a mobile first responsive configuration using the responsive options to show less labels on small screens.</p> <div class="example"> <div class="ct-chart" id="exampleLineScatter"></div> </div> </div> <!-- End Example Line Scatter Diagram --> </div> <div class="col-md-6"> <!-- Example Line Chart With Tooltips --> <div class="example-wrap"> <h4 class="example-title">Line Chart With Tooltips</h4> <p> This is just one of many benefits of using inline-SVG and provides you with the freedom you need in order to create exactly the experience you're looking for.</p> <div class="example"> <div class="ct-chart" id="exampleTooltipsLine"></div> </div> </div> <!-- End Example Line Chart With Tooltips --> </div> <div class="col-md-6"> <!-- Example Line Chart With Area --> <div class="example-wrap"> <h4 class="example-title">Line Chart With Area</h4> <p>This chart uses the showArea option to draw line, dots but also an area shape. Use the low option to specify a fixed lower bound that will make the area expand. You can also use the areaBase property to specify a data value that will be used to determine the area shape base position (this is 0 by default).</p> <div class="example"> <div class="ct-chart" id="exampleAreaLine"></div> </div> </div> <!-- Example Line Chart With Area --> </div> <div class="col-md-6"> <!-- Example Bi-Polar Line --> <div class="example-wrap"> <h4 class="example-title">Bi-Polar Line Chart With Area Only</h4> <p>You can also only draw the area shapes of the line chart. Area shapes will always be constructed around their areaBase (that can be configured in the options) which also allows you to draw nice bi-polar areas.</p> <div class="example"> <div class="ct-chart" id="exampleOnlyArea"></div> </div> </div> <!-- End Example Bi Polar Line --> </div> <div class="col-md-6"> <!-- Example Advanced Smil Animations --> <div class="example-wrap"> <h4 class="example-title">Advanced Smil Animations</h4> <p>Chartist provides a simple API to animate the elements on the Chart using SMIL. Usually you can achieve most animation with CSS3 animations but in some cases you'd like to animate SVG properties that are not available in CSS.</p> <div class="example"> <div class="ct-chart" id="exampleLineAnimations"></div> </div> </div> <!-- End Example Advanced Smil Animations --> </div> <div class="col-md-6"> <!-- Example Svg Path Animation --> <div class="example-wrap margin-md-0"> <h4 class="example-title">Svg Path Animation</h4> <p>Path animation is made easy with the SVG Path API. The API allows you to modify complex SVG paths and transform them for different animation morphing states.</p> <div class="example"> <div class="ct-chart" id="examplePathAnimation"></div> </div> </div> <!-- Example Svg Path Animation --> </div> <div class="col-md-6"> <!-- Example Line Interpolation --> <div class="example-wrap"> <h4 class="example-title">Line Interpolation / Smoothing</h4> <p>By default Chartist uses a cardinal spline algorithm to smooth the lines. However, like all other things in Chartist, this can be customized easily! </p> <div class="example"> <div class="ct-chart" id="exampleSmoothingLine"></div> </div> </div> <!-- End Example Line Interpolation --> </div> </div> </div> </div> <!-- End Panel Line --> <!-- Panel Bar --> <div class="panel"> <div class="panel-heading"> <h3 class="panel-title">Bar</h3> </div> <div class="panel-body"> <div class="row row-lg"> <div class="col-md-6"> <!-- Example Bi-Polar Bar --> <div class="example-wrap"> <h4 class="example-title">Bi-Polar Bar Chart</h4> <p>A bi-plar bar chart with a range limit set with low and high. There is also an interpolation function used to skip every odd grid line / label.</p> <div class="example"> <div class="ct-chart" id="exampleBiPolarBar"></div> </div> </div> <!-- End Example Bi Polar Bar --> </div> <div class="col-md-6"> <!-- Example Overlapping Bars --> <div class="example-wrap"> <h4 class="example-title">Overlapping Bars On Mobile</h4> <p>This example makes use of label interpolation and the seriesBarDistance property that allows you to make bars overlap over each other. This then can be used to use the available space on mobile better. </p> <div class="example"> <div class="ct-chart" id="exampleOverlappingBar"></div> </div> </div> <!-- End Example Overlapping Bars --> </div> <div class="col-md-6"> <!-- Example Add Peak Circles --> <div class="example-wrap"> <h4 class="example-title">Add Peak Circles Using The Draw Events</h4> <p>With the help of draw events we are able to add a custom SVG shape to the peak of our bars.</p> <div class="example"> <div class="ct-chart" id="examplePeakCirclesBar"></div> </div> </div> <!-- End Example Add Peak Circles --> </div> <div class="col-md-6"> <!-- Example Multi-Line Labels --> <div class="example-wrap"> <h4 class="example-title">Multi-Line Labels</h4> <p>Chartist will figure out if your browser supports foreignObject and it will use them to create labels that re based on regular HTML text elements. Multi-line and regular CSS styles are just two of many benefits while using foreignObjects!</p> <div class="example"> <div class="ct-chart" id="exampleMultiLabelsBar"></div> </div> </div> <!-- End Example Multi Line Labels --> </div> <div class="col-md-6"> <!-- Example Stacked Bar Chart --> <div class="example-wrap"> <h4 class="example-title">Stacked Bar Chart</h4> <p>You can also set your bar chart to stack the series bars on top of each other easily by using the stackBars property in your configuration.</p> <div class="example"> <div class="ct-chart" id="exampleStackedBar"></div> </div> </div> <!-- End Example Stacked Bar Chart --> </div> <div class="col-md-6"> <!-- Example Horizontal Bar --> <div class="example-wrap margin-md-0"> <h4 class="example-title">Horizontal Bar Chart</h4> <p>Guess what! Creating horizontal bar charts is as simple as it can get. There's no new chart type you need to learn, just passing an additional option is enough.</p> <div class="example"> <div class="ct-chart" id="exampleHorizontalBar"></div> </div> </div> <!-- End Example Horizontal Bar --> </div> <div class="clearfix visible-md-block visible-lg-block"></div> <div class="col-md-6"> <!-- Example Extreme Responsive --> <div class="example-wrap"> <h4 class="example-title">Extreme Responsive Configuration</h4> <p>As all settings of a chart can be customized with the responsive configuration override mechanism of Chartist, you can create a chart that adopts to every media condition!</p> <div class="example"> <div class="ct-chart" id="exampleResponsiveBar"></div> </div> </div> <!-- End Example Extreme Responsive --> </div> </div> </div> </div> <!-- End Panel Bar --> <!-- Panel Pie --> <div class="panel"> <div class="panel-heading"> <h3 class="panel-title">Pie</h3> </div> <div class="panel-body"> <div class="row row-lg"> <div class="col-md-6"> <!-- Example Simple Pie Chart --> <div class="example-wrap"> <h4 class="example-title">Simple Pie Chart</h4> <p>A very simple pie chart with label interpolation to show percentage instead of the actual data series value.</p> <div class="example"> <div class="ct-chart" id="exampleSimplePie"></div> </div> </div> <!-- End Example Simple Pie Chart --> </div> <div class="col-md-6"> <!-- Example Simple Pie Chart Labels --> <div class="example-wrap margin-md-0"> <h4 class="example-title">Pie Chart With Custom Labels</h4> <p>This pie chart is configured with custom labels specified in the data object. On desktop we use the labelOffset property to offset the labels from the center. Also labelDirection can be used to control the direction in which the labels are expanding.</p> <div class="example"> <div class="ct-chart" id="exampleLabelsPie"></div> </div> </div> <!-- End Example Simple Pie Chart Labels --> </div> <div class="clearfix visible-md-block visible-lg-block"></div> <div class="col-md-6"> <!-- Example Gauge Chart --> <div class="example-wrap"> <h4 class="example-title">Gauge Chart</h4> <p>This pie chart uses donut, startAngle and total to draw a gauge chart.</p> <div class="example"> <div class="ct-chart" id="exampleGaugePie"></div> </div> </div> <!-- End Example Gauge Chart --> </div> </div> </div> </div> <!-- End Panel Pie --> </div> </div> <!-- End Page --> <!-- Footer --> <footer class="site-footer"> <div class="site-footer-legal">© 2015 <a href="http://themeforest.net/item/remark-responsive-bootstrap-admin-template/11989202">Remark</a></div> <div class="site-footer-right"> Crafted with <i class="red-600 icon md-favorite"></i> by <a href="http://themeforest.net/user/amazingSurge">amazingSurge</a> </div> </footer> <!-- Core --> <script src="../../global/vendor/jquery/jquery.min.js"></script> <script src="../../global/vendor/bootstrap/bootstrap.min.js"></script> <script src="../../global/vendor/animsition/animsition.min.js"></script> <script src="../../global/vendor/asscroll/jquery-asScroll.min.js"></script> <script src="../../global/vendor/mousewheel/jquery.mousewheel.min.js"></script> <script src="../../global/vendor/asscrollable/jquery.asScrollable.all.min.js"></script> <script src="../../global/vendor/ashoverscroll/jquery-asHoverScroll.min.js"></script> <script src="../../global/vendor/waves/waves.min.js"></script> <!-- Plugins --> <script src="../../global/vendor/switchery/switchery.min.js"></script> <script src="../../global/vendor/intro-js/intro.min.js"></script> <script src="../../global/vendor/screenfull/screenfull.min.js"></script> <script src="../../global/vendor/slidepanel/jquery-slidePanel.min.js"></script> <!-- Plugins For This Page --> <script src="../../global/vendor/chartist-js/chartist.min.js"></script> <script src="../../global/vendor/chartist-plugin-tooltip/chartist-plugin-tooltip.min.js"></script> <!-- Scripts --> <script src="../../global/js/core.min.js"></script> <script src="../assets/js/site.min.js"></script> <script src="../assets/js/sections/menu.min.js"></script> <script src="../assets/js/sections/menubar.min.js"></script> <script src="../assets/js/sections/sidebar.min.js"></script> <script src="../../global/js/configs/config-colors.min.js"></script> <script src="../assets/js/configs/config-tour.min.js"></script> <script src="../../global/js/components/asscrollable.min.js"></script> <script src="../../global/js/components/animsition.min.js"></script> <script src="../../global/js/components/slidepanel.min.js"></script> <script src="../../global/js/components/switchery.min.js"></script> <script src="../../global/js/components/tabs.min.js"></script> <script src="../assets/examples/js/charts/chartist.min.js"></script> <!-- Google Analytics --> <script> (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-65522665-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>
{ "pile_set_name": "Github" }
OC.L10N.register( "social", { "Social" : "شبکه های اجتماعی", "Help" : "راه‌نما", "Follow %s on Social" : "ما را در %s دنبال کنید", "🎉 Nextcloud becomes part of the federated social networks!" : "🎉 نکست کلود به بخشی از فدراسیون شبکه های اجتماعی شبکه کارها تبدیل می شود!", "** Disclaimer: this is an ALPHA version **\n\n**🎉 Nextcloud becomes part of the federated social networks!**\n\n**🙋 Find your friends:** No matter if they use Nextcloud, 🐘 Mastodon, 🇫 Friendica, and soon ✱ Diaspora, 👹 MediaGoblin and more – you can follow them!\n\n**📜 Profile info:** No need to fill out more profiles – your info from Nextcloud will be used and extended.\n\n**👐 Own your posts:** Everything you post stays on your Nextcloud!\n\n**🕸 Open standards:** We use the established ActivityPub standard!" : "** اخطار: این یک نسخه ALPHA است **\n\n** 🎉 نکست کلود به بخشی از فدراسیون شبکه های اجتماعی شبکه کارها تبدیل می شود!\n\n** دوستان خود را پیدا کنید: ** مهم نیست که آنها از نکست کلود، 🐘 Mastodon ، 🇫 Friendica ، و به زودی ✱ Diaspora ، 👹 MediaGoblin و موارد دیگر استفاده کنند - می توانید آنها را دنبال کنید!\n\n** اطلاعات پروفایل: ** بدون نیاز به پر کردن پروفایل های بیشتر - اطلاعات شما از نکست کلود استفاده و تمدید خواهد شد.\n\n** پست های خود را داشته باشید: ** هر آنچه که ارسال می کنید در نکست کلود شما باقی می ماند!\n\n** استانداردهای باز: ** ما از استاندارد تأسیس ActivityPub استفاده می کنیم!", ".well-known/webfinger isn't properly set up!" : "well-known/webfinger به درستی تنظیم نشده است!", "Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "اجتماعی نیاز به کشف خودکار مشهور شناخته شده دارد تا به درستی تنظیم شود. اگر نکست کلود در ریشه دامنه نصب نشده باشد ، اغلب به این صورت است که نکست کلود نمی تواند این کار را بطور خودکار پیکربندی کند. برای استفاده از شبکه های اجتماعی، مدیر این مثال نکست کلود باید به صورت دستی پیکربندیهای شناخته شده خوب را پیکربندی کند:", "Open documentation" : "مستندات باز", "Social app setup" : "راه اندازی برنامه شبکه اجتماعی", "ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPub برای منحصر به فرد بودن ورودی ها به یک URL ثابت نیاز دارد. توجه داشته باشید که این کار بعداً بدون بازنشانی برنامه اجتماعی قابل تغییر نیست.", "ActivityPub URL base" : "پایگاه اینترنتی ActivityPub", "Finish setup" : "اتمام نصب", "The Social app needs to be set up by the server administrator." : "برنامه اجتماعی باید توسط مدیر سرور تنظیم شود.", "Home" : "خانه ", "Direct messages" : "پیامهای مستقیم", "Notifications" : "آگاهی‌ها", "Profile" : "مشخصات", "Liked" : "دوست داشتن", "Local timeline" : "جدول زمانی محلی", "Global timeline" : "جدول زمانی جهانی", "Following" : "دنبال کردن", "Post publicly" : "پست عمومی", "Post to followers" : "ارسال به دنبال کنندگان", "Post to recipients" : "ارسال به گیرندگان", "Post unlisted" : "ارسال ثبت نشده است", "Public" : "عمومی", "Post to public timelines" : "ارسال به جدول زمانی عمومی", "Unlisted" : "لیست نشده", "Do not post to public timelines" : "در زمان بندی های عمومی ارسال نکنید", "Followers" : "دنبال کنندگان", "Post to followers only" : "ارسال فقط به دنبال کنندگان", "Direct" : "مستقیم", "Post to mentioned users only" : "فقط برای کاربران ذکر شده ارسال کنید", "Error while trying to post your message: Could not find any valid recipients." : "خطا هنگام ارسال پیام شما: هیچ گیرنده معتبری یافت نشد.", "Unfollow" : "لغو دنبال کردن", "Follow" : "دنبال کردن", "posts" : "پست ها", "following" : "دنبال شوندگان", "followers" : "دنبال کنندگان", "No results found" : "هیچ نتیجه ای یافت نشد", "There were no results for your search:" : "هیچ نتیجه ای برای جستجوی شما وجود ندارد:", "Searching for" : "در جستجوی", "boosted" : "تقویت شده", "No posts found" : "هیچ پستی یافت نشد", "Posts from people you follow will show up here" : "پست های افرادی که شما دنبال می کنید در اینجا نشان داده می شود", "No direct messages found" : "هیچ پیام مستقیم یافت نشد", "Posts directed to you will show up here" : "پستهایی که برای شما ارسال شده است در اینجا نشان داده می شوند", "No local posts found" : "هیچ پست محلی یافت نشد", "Posts from other people on this instance will show up here" : "پست های سایر افراد در این مورد در اینجا نشان داده می شود", "No notifications found" : "هیچ اعلانی یافت نشد", "You haven't receive any notifications yet" : "شما هنوز هیچ اعلانی دریافت نکرده اید", "No global posts found" : "هیچ پست جهانی یافت نشد", "Posts from federated instances will show up here" : "پست های نمونه های فدرال در اینجا نشان داده می شود", "No liked posts found" : "هیچ پست مورد پسند یافت نشد", "You haven't tooted yet" : "شما هنوز ثبت نام نکرده اید", "No posts found for this tag" : "هیچ پستی برای این برچسب یافت نشد", "hasn't tooted yet" : "هنوز نكرده است", "Reply" : "پاسخ", "Boost" : "تقویت", "Like" : "دوست داشتن", "More actions" : "اقدامات بیشتر", "Delete post" : "پست را حذف کنید", "Follow on Nextcloud Social" : "در شبکه اجتماعی نکست کلود دنبال کنید", "Hello" : "سلام", "Please confirm that you want to follow this account:" : "لطفاً تأیید کنید که می خواهید این حساب را دنبال کنید:", "You are following this account" : "شما این حساب را دنبال می کنید", "Close" : "بستن", "You are going to follow:" : "شما می خواهید دنبال کنید:", "name@domain of your federation account" : "name@domain حساب فدراسیون شما", "Continue" : "ادامه", "This step is needed as the user is probably not registered on the same server as you are. We will redirect you to your homeserver to follow this account." : "این مرحله لازم است زیرا احتمالاً کاربر در همان سرور شما ثبت نشده است. ما برای دنبال کردن این حساب ، شما را به سرور خود هدایت می کنیم.", "User not found" : "کاربر یافت نشد", "Sorry, we could not find the account of {userId}" : "متأسفیم ، نتوانستیم حساب {userId} را پیدا کنیم", "Nextcloud becomes part of the federated social networks!" : "نکست کلود به بخشی از شبکه های اجتماعی فدراسیون تبدیل می شود!", "We automatically created a Social account for you. Your Social ID is the same as your federated cloud ID:" : "ما بطور خودکار یک حساب اجتماعی برای شما ایجاد کردیم. شناسه اجتماعی شما همان شناسه نکست کلود شماست:", "Since you are new to Social, start by following the official Nextcloud account so you don't miss any news" : "از آنجا که تازه وارد Social شده اید ، با دنبال کردن حساب رسمی نکست کلود شروع کنید تا هیچ خبری از دست ندهید", "Follow Nextcloud on mastodon.xyz" : "نکست کلود را در mastodon.xyz دنبال کنید" }, "nplurals=2; plural=(n > 1);");
{ "pile_set_name": "Github" }
use crate::crates::Crate; use crate::experiments::Experiment; use crate::prelude::*; use crate::report::analyzer::{ReportConfig, ReportCrates, ToolchainSelect}; use crate::report::{ crate_to_url, BuildTestResult, Comparison, CrateResult, ReportWriter, ResultName, TestResults, }; use crate::utils::serialize::to_vec; use indexmap::{IndexMap, IndexSet}; use std::fmt::Write; #[derive(Serialize)] enum ReportCratesMD { Plain(Vec<CrateResult>), Complete { // only string keys are allowed in JSON maps #[serde(serialize_with = "to_vec")] res: IndexMap<CrateResult, Vec<CrateResult>>, #[serde(serialize_with = "to_vec")] orphans: IndexMap<Crate, Vec<CrateResult>>, }, } #[derive(Serialize)] struct ResultsContext<'a> { ex: &'a Experiment, categories: Vec<(Comparison, ReportCratesMD)>, info: IndexMap<Comparison, u32>, full: bool, crates_count: usize, } fn write_crate( mut rendered: &mut String, krate: &CrateResult, comparison: Comparison, is_child: bool, ) -> Fallible<()> { let get_run_name = |run: &BuildTestResult| { if !is_child { run.res.long_name() } else { run.res.name() } }; let runs = [ krate.runs[0] .as_ref() .map(get_run_name) .unwrap_or_else(|| "unavailable".into()), krate.runs[0] .as_ref() .map(|run| run.log.to_owned()) .unwrap_or_else(|| "#".into()), krate.runs[1] .as_ref() .map(get_run_name) .unwrap_or_else(|| "unavailable".into()), krate.runs[1] .as_ref() .map(|run| run.log.to_owned()) .unwrap_or_else(|| "#".into()), ]; let prefix = if is_child { " * " } else { "* " }; let status_warning = krate .status .map(|status| format!(" ({})", status.to_string())) .unwrap_or_default(); if let ReportConfig::Complete(toolchain) = comparison.report_config() { let (conj, run) = match toolchain { ToolchainSelect::Start => ("from", 0), ToolchainSelect::End => ("due to", 2), }; writeln!( &mut rendered, "{}[{}{}]({}) {} {} **{}** [start]({}/log.txt) | [end]({}/log.txt)", prefix, krate.name, status_warning, krate.url, comparison.to_string(), conj, runs[run], runs[1], runs[3] )?; } else { writeln!( &mut rendered, "{}[{}{}]({}) {} [start]({}/log.txt) | [end]({}/log.txt)", prefix, krate.name, status_warning, krate.url, comparison.to_string(), runs[1], runs[3] )?; }; Ok(()) } fn render_markdown(context: &ResultsContext) -> Fallible<String> { let mut rendered = String::new(); //add title writeln!(&mut rendered, "# Crater report for {}\n\n", context.ex.name)?; for (comparison, results) in context.categories.iter() { writeln!(&mut rendered, "\n### {}", comparison.to_string())?; match results { ReportCratesMD::Plain(crates) => { for krate in crates { write_crate(&mut rendered, krate, *comparison, false)?; } } ReportCratesMD::Complete { res, orphans } => { for (root, deps) in res { write_crate(&mut rendered, root, *comparison, false)?; for krate in deps { write_crate(&mut rendered, krate, *comparison, true)?; } } for (krate, deps) in orphans { writeln!( &mut rendered, "* [{}]({}) (not covered in crater testing)", krate, crate_to_url(&krate)? )?; for krate in deps { write_crate(&mut rendered, krate, *comparison, true)?; } } } } } Ok(rendered) } fn write_report<W: ReportWriter>( ex: &Experiment, crates_count: usize, res: &TestResults, full: bool, to: &str, dest: &W, output_templates: bool, ) -> Fallible<()> { let categories = res .categories .iter() .filter(|(category, _)| full || category.show_in_summary()) .map(|(&category, crates)| (category, crates.to_owned())) .map(|(category, crates)| match crates { ReportCrates::Plain(crates) => ( category, ReportCratesMD::Plain(crates.into_iter().collect::<Vec<_>>()), ), ReportCrates::Complete { mut tree, results } => { let res = results .into_iter() .flat_map(|(_key, values)| values.into_iter()) .collect::<IndexSet<_>>() // remove duplicates .into_iter() .map(|krate| { // done here to avoid cloning krate let deps = tree.remove(&krate.krate).unwrap_or_default(); (krate, deps) }) .collect::<IndexMap<_, _>>(); (category, ReportCratesMD::Complete { res, orphans: tree }) } }) .collect(); let context = ResultsContext { ex, categories, info: res.info.clone(), full, crates_count, }; let markdown = render_markdown(&context)?; info!("generating {}", to); dest.write_string(to, markdown.into(), &mime::TEXT_PLAIN)?; if output_templates { dest.write_string( [to, ".context.json"].concat(), serde_json::to_string(&context)?.into(), &mime::TEXT_PLAIN, )?; } Ok(()) } pub fn write_markdown_report<W: ReportWriter>( ex: &Experiment, crates_count: usize, res: &TestResults, dest: &W, output_templates: bool, ) -> Fallible<()> { write_report( ex, crates_count, res, false, "markdown.md", dest, output_templates, )?; Ok(()) }
{ "pile_set_name": "Github" }
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. namespace SnipInsight.Controls.Ariadne { public interface IAriControl : IShyControl { } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="Target" xml:space="preserve"> <value>H4sIAAAAAAAEAO0dyW4jufUeIP9Q0CkJeizbjUkmhjwDt9xOnLQXWO5Bbo1yFSUXphZNkfJYCfJlOeST8gshaxP3IlnU4plBX1os8u2PfFze8//+89/Jd69ZGryAEiZFfj46OToeBSCPijjJF+ejFZp/9c3ou29/+5vJxzh7Db5v+70n/fDIHJ6PnhFano3HMHoGWQiPsiQqC1jM0VFUZOMwLsanx8d/Hp+cjAEGMcKwgmDysMpRkoHqB/45LfIILNEqTG+KGKSwacdfZhXU4DbMAFyGETgfPSbRDwBdAvjD0WWRhUk+Ci7SJMSEzEA6HwVhnhcoRJjMs88QzFBZ5IvZEjeE6eN6CXC/eZhC0JB/tuluysnxKeFkvBnYgopWEGGK7ACevG9EM+aHOwl41ImuEmu2TMErYbuS4PnoYrlMk6gCfw/KLIFEnXAGEML6HgU8CWfTtCSjJVI/qjR1pAX4LhCGvetsCJsa+fcumK5StCrBeQ5WqAzTd8H96gnD/DtYPxY/gPw8X6UpzRZm7L4slqBE64arGSixdpN/gngU1ORitVcM3YSvn0C+QM/nI/zfUXCVvIK4bWns4HOeYHvHg1C5wj/HtATHlAiNJYvtEEToUwKRH8EK8H6hcr1fwefbAiXzTi5ezFYO9ZckYzxPlh6FS8A1w+Gm5Vc5V3KuuaWcGU6LlPh3NeO7CVsH8+cr3484hEBr1RTsZ+Ldronib0wDJdUHMBe5Ig2scIh4eCi8ZgQASvWcnH5jpJ5bzEr4lILuOyXfGSpK8BeQgzJEIL4PEQIljoRui1wknSOUCiA6InFIp48xJNTosWxWUyUWyQJuiUQx2an5Us2+WryT8cYHtJ5R2+/HF5AjGouLeyhA7ddHatzXMa8WaeeKdsO+s9UTjMrkCZTigH7P25BVy/Q6R+9PrW2po3cIEJYR5Qxw+vUf3WYAPfZreAt+atF+KIoUhLkDkAcQxkOh8J52D/K4koIl2NvwJVnUEGRKr5Q2Ch5AWvWBz8my8Xrq+xeFM+Fp4qossociZeEp+395DMsFwPgeC4tBs2JVRtacbSypjz0a2xdxsJRF7ZiOYgmb+oGtfIbOngNnzLc/S/qb9PzEDIaTYz+y6xhUejdCiPWHDWtZr6HKyfTr42PraFdEiKPfrLI8r1G1bHr9K8rSodNrJZ4P690vMbVesEpb1OT/j0kG7uZzSFzfwSbIxmOFgOgEHO7GgzvZJXlYYhGQU81VWYI8Wt9UjFVcM8JQxNs+ae2ZzjWTOL1ySJYk5rNiBWL7uC04suVxV+uqZsHpX4wHLDbu68xhLjG7XDZMZ/IaI8GmncO3MVlNMcGLotRNk9tB/JigVM/uVtBeAhQmKfSwhlnvGXwsao/hghwG6E5O/Cz1JSCWvI/ls0G9pwX07qec7Ah2zfQFhMkiB/Fj4QG3yWQzw+JasYdA7AdbrVXhRTPaSncWcGdgLwHdpxCiz8sYM7Jf7B7Fel8mRVmtTBp2PBjbxXwOIgSnVQixcSzX6e8th7dt8OonyJWHg/JA2PVURUcsfaLRxIk8wUIXRWQu9nOLzvHaqKMYf1aSuvmmoJHqICPOMqamz55co+sNjMOMsw/2EHvH58/um14nF5PPC2pXHGDF2CfczRcPPgS7xWS4W2IzeGe7xHDRd2u6nT2To9+5W77hVC23dclc7mTk1NuRgU9P9mvohBAXG2/H7TreNbqw1r4Tsg2wqdcqAhL9IxnHO/FVJoYEzbbrGl6lOI7pADqHBxU8j5aHtRqDMl1jEdCzACvZG5DhNaaN/bGQXjAL34fpCv88FvTA9L7Bc+N1Pi+6/if6/g8AFukLCcOb/qf6/tO0gFTv96Kuaq3QjXhXXkRJJXdGWWykziL9mMeBQdjOb7uxZ2EtJOQZBjYZwj3v2Xf5JUgBAsFFVD/pnYYwCmPJMxxMgg1NXcTL09TcM7KE/UHAh6caQPboSZjijRjEJpTkSJyXkjxKlmHaLxxuqG3UOe5Q8V8uwRLkZLHtF8ZQGjpUnGr6ZDUZUzZnYopikKhXvSZiFE6CqF1Knw30o1Fa2VYtf4BtKlnYsX0qNfZmbJQK5/RWI4vteHOpdh225ijb378VOxRp37EBilp5M5bXcwerNxrTC1mjZXOr67npkywppewzzC0u9mbyHGZbNg+IHFzBTNC7ZWG3zqR/SWdgpobP6jyYqgN6paeoYyFxmzLURYxI3IKN6Q5nXX3FSNt74MW709RbfTwG4RHdpnOz+yZfwKvsNc1nCJo9PWxOTHgzJpBnAClzS+Ao2Jw0yHIImnMRwT9YwMplUoSu9ElzFD1gDUGpoRgCYG67FKBo5zcCWt9EKaBVAWwPGDpvTQKIOZrkQFH2yZPFXTBSPTX3kLzrmJ1vdAxRihK80OxYQgDV0s+HSSznxlKRXLOoJNOz2bbabgtsMZbYKyv1Brtf9M6ios/lVTJSbfbMtnsC8bUr9YpDssHbohz6nnaqZGOzHXHfkBg6jPs+Qo6Ak4FPUfekb2jFbRGwDgtZHaQyLEi1mUE08m+vKbrYpfs2Gdc1L5oGkv4qLY4xuQmXS7JUbUY2LcGsrpQx/WpmX0Miq2GMI8Yz+Eirw4SKMlwA7it5rhODq6SE5EV++BSSO5VpnAndxEhNsUK3+NTBmKjidvlux5L/8wFie4kjCdzEgLcBdIU5JhkZFfOAsgcTIAEpaRKmYdmXpDst0lWWG6UAN3CbNOm+pFoDEUiybCUIVazQmeA0FyJU+Dcohq+tF3DsmHMsJPgaKZ3P+PXAsAB0O/zqr25N1K240vWhcwVtQwQxGXOOKOwzBd8XjvbYacVo0rEIIGxmHtWmzn76MYakUuJmt0+rUHcGoILUHZzRgJSnaRqzYg4UGN/SHjWoITaZyDSopskGRp2IzAKp28yhKBORdf7TdZKcx+zdLTy6wjDzf8smL+aXCgCZr+aQu0RSGmDXaGP+dU4Na/51myWfH9YS9j4Ib/L65VW90RcFVTWbw+oeutOQusYDczk/3ubsaPvwsebUocrYE2HV7Rb+0CXhMQ7RtdrQVWXVsSRVTeYwuhQ5GkrXuGvv7DLeGJ7aRgsZbzLaGCFvmq1hib7OfDCH1ySd0ZCaJnMYdAYZs2Oj2m3tu32UKFp4+8VCZmKCGCM58bMj7CZJTAm8+W4OnU3/ouGyX1wgioLgv1mEcV1OFxO3da0WtsRnbTEGxX/8ma5q9Gmaj/VNfepovNLpQGx/zXPfAu1Vj9UNgg8Fkos7V81Jx/YEF3V2iSS6kOWsaOG1iSPcEqo5wfNkSntSPHN9Okz19FWrvfK1o1VibhMvaCHLkzgaKD4P43SJFQd6CqeUgJjYoeO6blVkenhg3dfp61Z9SrgM4rt02LtLIe7yZ9JcxPSXTxduZuouowCz/pLE5FZmtoYIZEekw9Hsx3SaJtUJQdvhJsyTOYCoTlMZnR6fnHIl2A+nHPoYwjiVXGTpq8aymttrldb8JSyj57AU67TaJnipbl9YPL/Lwtff08BN6g2oLjo8gNZPXdYIBldMdTAN9VJ9UMVJE2l1w+s8Bq/no39Vg86C6398acd9aUh9F9yVeFY4C46Df8u60VTSfYfWQe2hV0oLT/KJAxmyTPaNl1oSJBVORRWf8jmk4upTYl+rhK226gKhp9JqP0inAp17ctDt+5t33+lNjHeqwChWxpQuYVWhMbulgCuE2bzstYPB1gNzsWquwKWUOReHFepXksMo8jdyiqbW0H0JoqT+6zt/UipvUyZnWI0fghiiMFsOxWRb99Cj+zq6pG+3oC8ntA4xuIqgL7hMkUAT73WpASi4r0M9Pxf/5Wr5yeNrh8mJL93nbWKQVObb7dTAFOfzxpZYe88EtGupvcqzfRXX04vfW6k9b6KWVdLbAvCtiYgvm6eg3dZOFFXyXCaVA1k9lTmBh15TbKexsH4DZ+UODrW7nBXjr2jWdsIctk6WybrqVAZri6biVKTKQZ9+akN5m8E9H7FJlojhB4Mq1fioFbTvukBN5uUeCgHtuqaF6mnngdaxsK3ys29DorOzBtUVekMmpX3fcaB2ZVyZZ98GVSVNu9UCekMmJH9hcqC2M7y2zuHUzmGLGBxCnZw3UAenJ0no15o3A1ZCsarM4duttwXQept/qBZ8IFVoxBRo3rT6KswYFpipH/Ccj+IncpRa76Ck5WoE2zaqRGNTiEZGimlavo6evqo1PXhNcWnK2qgxmAKnpx0FGrqLGqGu4IAcdRWxKXBW39TIZJVAdIVz+urmyDCxdXc4XLuurCOp8CCZRBSRlTBUXlXpIIvmuDEuWrX85bwvEXguhuPGNOVP3GtzX2zus9aNqRmbhUdyWNr6ZW+0ao2jK+xBjBbFZ8R3xThQWuXkhqv+dQmqe9wWxATDzOvn2xugbR9Sab6N1ziK2i7c0fENQGGM46eLEjMaRgh/jgCE1VLS1JT/mD2B+Dq/W6HlCmGWQfaUMnlXJOLT4a8q7LA0T+6qF0zQBwuYzIRch97lH1ZJuqmFfyW5gFCAIKFkc1VDdInIlc1i3UES/06yClAjvi4CfgTZMsXA4F0+C6m/GmBBG168P4FFGK3b5+FqIP2KYMU+uUzCRRlmsIGxGY9/YhuOs9dv/w9Rbi9pw4wAAA==</value> </data> <data name="DefaultSchema" xml:space="preserve"> <value>dbo</value> </data> </root>
{ "pile_set_name": "Github" }
/*============================================================================= Copyright (c) 2001-2007 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_INCLUDE_OUT) #define FUSION_INCLUDE_OUT #include <boost/fusion/support/config.hpp> #include <boost/fusion/sequence/io/out.hpp> #endif
{ "pile_set_name": "Github" }
#!/usr/bin/env node var app = require("commander"); var async = require("async"); var api = require("./lib/api"); var auth = require("./lib/auth"); app.description("Delete completed tasks").parse(process.argv); function main() { async.waterfall([ function (callback) { api("/lists", function (err, res, body) { if (err || body.error) { console.error(JSON.stringify(err || body.error, null, 2)); process.exit(1); } callback(err, body); }); }, function (results, callback) { var tasks = []; async.eachLimit( results, 10, function (list, done) { api( { url: "/tasks", qs: { completed: true, list_id: list.id } }, function (err, res, body) { if (err) process.exit(1); body .filter(function (task) { return task.completed === true; }) .forEach(function (task) { tasks.push(task); }); done(); } ); }, function () { callback(null, tasks); } ); }, function (results, callback) { async.eachLimit(results, 10, function (task, done) { api.del( { url: "/tasks/" + task.id, qs: { revision: task.revision } }, function (err, res, body) { if (err) { // } done(); } ); }); }, ]); } auth(main);
{ "pile_set_name": "Github" }
import json, sys, glob, os here = os.path.dirname(os.path.abspath(__file__)) sys.path.append(here+'/..') from package_json import json_options for fluid in glob.glob(here+'/fluids/*.json'): print(fluid) j = json.load(open(fluid, 'r')) fp = open(fluid, 'w') fp.write(json.dumps(j, **json_options)) fp.close()
{ "pile_set_name": "Github" }
activity-social-networking-summary-add-connection={0} and {1} are now connected. (Automatic Copy) add-projects=프로젝트를 추가하십시오 (Automatic Translation) administrators=관리자 (Automatic Translation) are-you-sure-you-want-to-delete-x-from-your-contacts=Are you sure you want to delete {0} from your contacts? (Automatic Copy) back-to-selection=선택 등을 맞댄 (Automatic Translation) blocked=차단 (Automatic Translation) connect=연결 (Automatic Translation) connected=연결 (Automatic Translation) connection-requested=요구되는 연결 (Automatic Translation) connections=연결 (Automatic Translation) contacts-center=접촉은 중심에 둔다 (Automatic Translation) contacts-center-lets-you-search-view-and-establish-social-relations-with-other-users=연락처 센터를 사용 하면 검색 하 고 보고 하 고, 다른 사용자와 사회적 관계를 설정할 수 있습니다. 따라 하거나 그들의 사회 활동 및 microblogs 연결 사용자를 추가 합니다. (Automatic Translation) disconnect=연결 끊기 (Automatic Translation) email-address-cannot-be-empty=이메일 주소는 빌 수 없다. (Automatic Translation) export-my-x-as-vcards=Export My {0} as vCards (Automatic Copy) filter-contacts=여과기는 접촉한다 (Automatic Translation) filter-members=여과기 일원 (Automatic Translation) filter-x-connections=Filter {0}'s Connections (Automatic Copy) find-people=발견 사람들 (Automatic Translation) follow=따르십시오 (Automatic Translation) follower=추종자 (Automatic Translation) following=따르기 (Automatic Translation) full-name-cannot-be-empty=성명은 빌 수 없다. (Automatic Translation) information=정보 (Automatic Translation) introduction=소개 (Automatic Translation) javax.portlet.title.1_WAR_contactsportlet=연락처 센터 (Automatic Translation) javax.portlet.title.2_WAR_contactsportlet=프로필 (Automatic Translation) javax.portlet.title.3_WAR_contactsportlet=내 연락처 (Automatic Translation) javax.portlet.title.4_WAR_contactsportlet=회원 (Automatic Translation) members-of=일원의 (Automatic Translation) my-connections=나의 연결 (Automatic Translation) my-contacts=나의 접촉 (Automatic Translation) no-last-name=성 없음 (Automatic Translation) people=사람들 (Automatic Translation) receive-a-notification-when-someone-sends-you-a-social-relationship-request=sends you a social relationship request. (Automatic Copy) recent-activity=최근 활동 (Automatic Translation) request-social-networking-summary-add-connection={0} would like to add you as a connection. (Automatic Copy) requests=요구 (Automatic Translation) send-message=메시지 보내기 (Automatic Translation) show-additional-email-addresses=쇼 추가 이메일 주소 (Automatic Translation) show-addresses=쇼 주소 (Automatic Translation) show-comments=쇼는 논평한다 (Automatic Translation) show-complete-your-profile=쇼는 당신의 단면도를 완료한다 (Automatic Translation) show-icon=쇼 아이콘 (Automatic Translation) show-instant-messenger=쇼 Instant Messenger (Automatic Translation) show-phones=쇼는 전화를 건다 (Automatic Translation) show-recent-activity=쇼 최근 활동 (Automatic Translation) show-sites=쇼 위치 (Automatic Translation) show-sms=쇼 SMS (Automatic Translation) show-social-network=쇼 사회 네트워크 (Automatic Translation) show-users-information=쇼 User&#039; s 정보 (Automatic Translation) show-websites=쇼 웹사이트 (Automatic Translation) there-is-already-a-contact-with-this-email-address=이미 이 이메일 주소와의 접촉이 있다. (Automatic Translation) this-user-has-received-a-connection-request-from-you=이 사용자는 당신이에서 연결 요청을 받고 있다. (Automatic Translation) to-complete-your-profile-please-add=당신의 단면도를 완료하기 위하여는, 추가하십시오: (Automatic Translation) unblock=비블록화하십시오 (Automatic Translation) unfollow=Unfollow (Automatic Translation) update-contact=갱신 접촉 (Automatic Translation) users-per-section=단면도 당 사용자 (Automatic Translation) vcard=vCard (Automatic Translation) view-all-x-connections=View all {0}'s connections. (Automatic Copy) view-all-x-users=View all {0} users. (Automatic Copy) view-my-x-contacts=View my {0} contacts. (Automatic Copy) view-profile=전망 단면도 (Automatic Translation) x-does-not-belong-to-any-sites={0} does not belong to any sites. (Automatic Copy) x-does-not-have-any-tags={0} does not have any tags. (Automatic Copy) x-has-no-connections={0} has no connections. (Automatic Copy) x-has-no-contacts={0} has no contacts. (Automatic Copy) x-has-x-connections={0} has {1} connections. (Automatic Copy) you-are-following-x-people=You are following {0} people. (Automatic Copy) you-are-following-x-people-in-this-site=You are following {0} people in this site. (Automatic Copy) you-are-not-connected-to-this-user-anymore=당신은이 사용자에 게 더 이상 연결 되지 않습니다. (Automatic Translation) you-are-not-following-this-user-anymore=당신은 더 이상 하지이 사용자를 따르고 있다. (Automatic Translation) you-are-now-connected-to-this-user=이제이 사용자에 게 연결 되어 있습니다. (Automatic Translation) you-are-now-following-this-user=이제이 사용자를 따르고 있다. (Automatic Translation) you-have-a-pending-request=당신은 팬딩되어 있는 요구가 있다. (Automatic Translation) you-have-blocked-this-user=이 사용자를 차단 했다. (Automatic Translation) you-have-no-connections=당신은 아무 연결도 없다. (Automatic Translation) you-have-no-pending-requests=당신은 팬딩되어 있는 요구가 없다. (Automatic Translation) you-have-successfully-added-a-new-contact=당신은 성공적으로 새로운 접촉을 추가했다. (Automatic Translation) you-have-successfully-updated-the-contact=당신은 성공적으로 접촉을 새롭게 했다. (Automatic Translation) you-have-unblocked-this-user=이 사용자 차단을 해제 해야 합니다. (Automatic Translation) you-have-x-connections=You have {0} connections. (Automatic Copy) you-have-x-connections-in-this-site=You have {0} connections in this site. (Automatic Copy) you-have-x-followers=You have {0} followers. (Automatic Copy) you-have-x-pending-requests=You have {0} pending requests. (Automatic Copy)
{ "pile_set_name": "Github" }
function Remove-PSFAlias { <# .SYNOPSIS Removes an alias from the global scope. .DESCRIPTION Removes an alias from the global* scope. Please note that this always affects the global scope and should not be used lightly. This has the potential to break code that does not comply with PowerShell best practices and relies on the use of aliases. Refuses to delete constant aliases. Requires the '-Force' parameter to delete ReadOnly aliases. *This includes aliases exported by modules. .PARAMETER Name The name of the alias to remove. .PARAMETER Force Enforce removal of aliases. Required to remove ReadOnly aliases (including default aliases such as "select" or "group"). .EXAMPLE PS C:\> Remove-PSFAlias -Name 'grep' Removes the global alias 'grep' .EXAMPLE PS C:\> Remove-PSFAlias -Name 'select' -Force Removes the default alias 'select' #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] [CmdletBinding()] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true)] [string[]] $Name, [switch] $Force ) process { foreach ($alias in $Name) { try { [PSFramework.Utility.UtilityHost]::RemovePowerShellAlias($alias, $Force.ToBool()) } catch { Stop-PSFFunction -Message $_ -EnableException $true -Cmdlet $PSCmdlet -ErrorRecord $_ -OverrideExceptionMessage } } } }
{ "pile_set_name": "Github" }
@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega
{ "pile_set_name": "Github" }
method M() { N(); if (*) { } else { assert (forall b: bool :: b || !b) || 0 != 0; } N(); assert (forall b: bool :: b || !b) || 3 != 3; if (*) { } else { assert (exists b: bool :: true) || 4 != 4; } assert (exists b: bool :: true) || 5 != 5; } method N() ensures (forall b: bool :: b || !b) || 2 != 2;
{ "pile_set_name": "Github" }
/*++ Copyright (c) 1990 Microsoft Corporation Module Name: duobase.h Abstract: This file contains the definitions to read and write IO registers. Author: Lluis Abello (lluis) 1-May-91 Environment: Kernel mode Revision History: --*/ #ifndef _DUOBASE #define _DUOBASE // // Remove scsi debug print to avoid useless messages in the prom // //#undef ScsiDebugPrint #define ScsiDebugPrint(a,b,c,d,e,f,g) #undef READ_REGISTER_UCHAR #undef READ_REGISTER_USHORT #undef READ_REGISTER_ULONG #undef WRITE_REGISTER_UCHAR #undef WRITE_REGISTER_USHORT #undef WRITE_REGISTER_ULONG // // define ScsiPort Write/Read macros // #define ScsiPortReadPortUchar(x) READ_REGISTER_UCHAR(x) #define ScsiPortReadPortUshort(x) READ_REGISTER_USHORT(x) #define ScsiPortReadPortUlong(x) READ_REGISTER_ULONG(x) #define ScsiPortWritePortUchar(x,y) WRITE_REGISTER_UCHAR(x, y) #define ScsiPortWritePortUshort(x,y) WRITE_REGISTER_USHORT(x, y) #define ScsiPortWritePortUlong(x,y) WRITE_REGISTER_ULONG(x, y) #define READ_REGISTER_UCHAR(x) *(volatile UCHAR * const)(x) #define READ_REGISTER_USHORT(x) *(volatile USHORT * const)(x) #define READ_REGISTER_ULONG(x) *(volatile ULONG * const)(x) #define WRITE_REGISTER_UCHAR(x, y) *(volatile UCHAR * const)(x) = y #define WRITE_REGISTER_USHORT(x, y) *(volatile USHORT * const)(x) = y #define WRITE_REGISTER_ULONG(x, y) *(volatile ULONG * const)(x) = y #endif
{ "pile_set_name": "Github" }
// Copyright 2020 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package charmhub import ( "bytes" "context" "io/ioutil" "net/http" "net/url" os "os" gomock "github.com/golang/mock/gomock" charmrepotesting "github.com/juju/charmrepo/v6/testing" "github.com/juju/testing" jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" ) const defaultSeries = "bionic" const localCharmRepo = "../testcharms/charm-repo" type DownloadSuite struct { testing.IsolationSuite } var _ = gc.Suite(&DownloadSuite{}) func (s *DownloadSuite) TestDownload(c *gc.C) { ctrl := gomock.NewController(c) defer ctrl.Finish() tmpFile, err := ioutil.TempFile("", "charm") c.Assert(err, jc.ErrorIsNil) defer func() { err := os.Remove(tmpFile.Name()) c.Assert(err, jc.ErrorIsNil) }() fileSystem := NewMockFileSystem(ctrl) fileSystem.EXPECT().Create(tmpFile.Name()).Return(tmpFile, nil) transport := NewMockTransport(ctrl) transport.EXPECT().Do(gomock.Any()).DoAndReturn(func(r *http.Request) (*http.Response, error) { archiveBytes := s.createCharmArchieve(c) return &http.Response{ StatusCode: 200, Body: ioutil.NopCloser(bytes.NewBuffer(archiveBytes)), }, nil }) serverURL, err := url.Parse("http://meshuggah.rocks") c.Assert(err, jc.ErrorIsNil) client := NewDownloadClient(transport, fileSystem, &FakeLogger{}) _, err = client.Download(context.TODO(), serverURL, tmpFile.Name()) c.Assert(err, jc.ErrorIsNil) } func (s *DownloadSuite) TestDownloadWithNotFoundStatusCode(c *gc.C) { ctrl := gomock.NewController(c) defer ctrl.Finish() tmpFile, err := ioutil.TempFile("", "charm") c.Assert(err, jc.ErrorIsNil) defer func() { err := os.Remove(tmpFile.Name()) c.Assert(err, jc.ErrorIsNil) }() fileSystem := NewMockFileSystem(ctrl) fileSystem.EXPECT().Create(tmpFile.Name()).Return(tmpFile, nil) transport := NewMockTransport(ctrl) transport.EXPECT().Do(gomock.Any()).DoAndReturn(func(r *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 404, Body: ioutil.NopCloser(bytes.NewBufferString("")), }, nil }) serverURL, err := url.Parse("http://meshuggah.rocks") c.Assert(err, jc.ErrorIsNil) client := NewDownloadClient(transport, fileSystem, &FakeLogger{}) _, err = client.Download(context.TODO(), serverURL, tmpFile.Name()) c.Assert(err, gc.ErrorMatches, `cannot retrieve "http://meshuggah.rocks": archive not found`) } func (s *DownloadSuite) TestDownloadWithFailedStatusCode(c *gc.C) { ctrl := gomock.NewController(c) defer ctrl.Finish() tmpFile, err := ioutil.TempFile("", "charm") c.Assert(err, jc.ErrorIsNil) defer func() { err := os.Remove(tmpFile.Name()) c.Assert(err, jc.ErrorIsNil) }() fileSystem := NewMockFileSystem(ctrl) fileSystem.EXPECT().Create(tmpFile.Name()).Return(tmpFile, nil) transport := NewMockTransport(ctrl) transport.EXPECT().Do(gomock.Any()).DoAndReturn(func(r *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 500, Body: ioutil.NopCloser(bytes.NewBufferString("")), }, nil }) serverURL, err := url.Parse("http://meshuggah.rocks") c.Assert(err, jc.ErrorIsNil) client := NewDownloadClient(transport, fileSystem, &FakeLogger{}) _, err = client.Download(context.TODO(), serverURL, tmpFile.Name()) c.Assert(err, gc.ErrorMatches, `cannot retrieve "http://meshuggah.rocks": unable to locate archive`) } func (s *DownloadSuite) createCharmArchieve(c *gc.C) []byte { tmpDir, err := ioutil.TempDir("", "charm") c.Assert(err, jc.ErrorIsNil) repo := charmrepotesting.NewRepo(localCharmRepo, defaultSeries) charmPath := repo.CharmArchivePath(tmpDir, "dummy") path, err := ioutil.ReadFile(charmPath) c.Assert(err, jc.ErrorIsNil) return path }
{ "pile_set_name": "Github" }
> unidoc $ exists target/scala-2.11/unidoc/example/A.html $ exists target/scala-2.11/unidoc/example/B.html -$ exists target/scala-2.11/unidoc/example/C.html
{ "pile_set_name": "Github" }
<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> ]> <doc ></doc >
{ "pile_set_name": "Github" }
<?php /** * Copyright (C) 2020 Xibo Signage Ltd * * Xibo - Digital Signage - http://www.xibo.org.uk * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo 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 Xibo. If not, see <http://www.gnu.org/licenses/>. */ namespace Xibo\Tests\Integration; use Xibo\Helper\Random; use Xibo\OAuth2\Client\Entity\XiboDaypart; use Xibo\Tests\LocalWebTestCase; /** * Class DaypartTest * @package Xibo\Tests\Integration */ class DaypartTest extends LocalWebTestCase { /** @var XiboDaypart[] */ protected $startDayparts; /** * setUp - called before every test automatically */ public function setup() { parent::setup(); $this->startDayparts = (new XiboDaypart($this->getEntityProvider()))->get(['start' => 0, 'length' => 10000]); $this->getLogger()->debug('There are ' . count($this->startDayparts) . ' dayparts at the start of the test'); } /** * tearDown - called after every test automatically */ public function tearDown() { // tearDown all dayparts that weren't there initially $finalDayparts = (new XiboDaypart($this->getEntityProvider()))->get(['start' => 0, 'length' => 10000]); # Loop over any remaining dayparts and nuke them foreach ($finalDayparts as $daypart) { /** @var XiboDaypart $daypart */ $flag = true; foreach ($this->startDayparts as $startDaypart) { if ($startDaypart->dayPartId == $daypart->dayPartId) { $flag = false; } } if ($flag) { try { $daypart->delete(); } catch (\Exception $e) { fwrite(STDERR, 'Unable to delete ' . $daypart->dayPartId . '. E:' . $e->getMessage()); } } } parent::tearDown(); } /** * testAddSuccess - test adding various daypart that should be valid * @dataProvider provideSuccessCases */ public function testAddSuccess($name, $description, $startTime, $endTime, $exceptionDays, $exceptionStartTimes, $exceptionEndTimes) { # Create daypart with arguments from provideSuccessCases $response = $this->sendRequest('POST','/daypart', [ 'name' => $name, 'description' => $description, 'startTime' => $startTime, 'endTime' => $endTime, 'exceptionDays' => $exceptionDays, 'exceptionStartTimes' => $exceptionStartTimes, 'exceptionEndTimes' => $exceptionEndTimes ]); $this->assertSame(200, $response->getStatusCode(), "Not successful: " . $response->getBody()); $object = json_decode($response->getBody()); $this->assertObjectHasAttribute('data', $object); $this->assertObjectHasAttribute('id', $object); $this->assertSame($name, $object->data->name); $this->assertSame($description, $object->data->description); # Check that the daypart was really added $dayparts = (new XiboDaypart($this->getEntityProvider()))->get(['start' => 0, 'length' => 10000]); $this->assertEquals(count($this->startDayparts) + 1, count($dayparts)); # Check that the daypart was added correctly $daypart = (new XiboDaypart($this->getEntityProvider()))->getById($object->id); $this->assertSame($name, $daypart->name); $this->assertSame($description, $daypart->description); # Clean up the daypart as we no longer need it $this->assertTrue($daypart->delete(), 'Unable to delete ' . $daypart->dayPartId); } /** * testAddFailure - test adding various daypart that should be invalid * @dataProvider provideFailureCases */ public function testAddFailure($name, $description, $startTime, $endTime, $exceptionDays, $exceptionStartTimes, $exceptionEndTimes) { # Create daypart with arguments from provideFailureCases $response = $this->sendRequest('POST','/daypart', [ 'name' => $name, 'description' => $description, 'startTime' => $startTime, 'endTime' => $endTime, 'exceptionDays' => $exceptionDays, 'exceptionStartTimes' => $exceptionStartTimes, 'exceptionEndTimes' => $exceptionEndTimes ]); # check if they fail as expected $this->assertSame(422, $response->getStatusCode(), 'Expecting failure, received ' . $response->getStatusCode()); } /** * Each array is a test run * Format ($name, $description, $startTime, $endTime, $exceptionDays, $exceptionStartTimes, $exceptionEndTimes) * @return array */ public function provideSuccessCases() { # Data for testAddSuccess, easily expandable - just add another set of data below return [ 'No exceptions' => ['phpunit daypart', 'API', '02:00', '06:00', NULL, NULL, NULL], 'Except Monday' => ['phpunit daypart exception', NULL, '02:00', '06:00', ['Monday'], ['00:01'], ['23:59']] ]; } /** * Each array is a test run * Format ($name, $description, $startTime, $endTime, $exceptionDays, $exceptionStartTimes, $exceptionEndTimes) * @return array */ public function provideFailureCases() { # Data for testAddfailure, easily expandable - just add another set of data below // TODO we should probably validate description and day names in daypart Controller. return [ 'Empty title' => [NULL, 'should be invalid', '07:00', '10:00', NULL, NULL, NULL], //'Description over 254 characters' => ['Too long description', Random::generateString(258), '07:00', '10:00', NULL, NULL, NULL], 'Wrong time data type' => ['Time as integer','should be incorrect', 21, 22, NULL, NULL, NULL], //'Wrong day name' => ['phpunit daypart exception', NULL, '02:00', '06:00', ['Cabbage'], ['00:01'], ['23:59']] ]; } /** * Edit an existing daypart */ public function testEdit() { #Create new daypart $daypart = (new XiboDaypart($this->getEntityProvider()))->create('phpunit daypart', 'API', '02:00', '06:00', NULL, NULL, NULL); # Change the daypart name and description $name = Random::generateString(8, 'phpunit'); $description = Random::generateString(8, 'description'); $response = $this->sendRequest('PUT','/daypart/' . $daypart->dayPartId, [ 'name' => $name, 'description' => $description, 'startTime' => '02:00', 'endTime' => '06:00', 'exceptionDays' => $daypart->exceptionDays, 'exceptionStartTimes' => $daypart->exceptionStartTimes, 'exceptionEndTimes' => $daypart->exceptionEndTimes ], ['CONTENT_TYPE' => 'application/x-www-form-urlencoded']); $this->assertSame(200, $response->getStatusCode(), 'Not successful: ' . $response->getBody()); $object = json_decode($response->getBody()); # Examine the returned object and check that it's what we expect $this->assertObjectHasAttribute('data', $object); $this->assertObjectHasAttribute('id', $object); $this->assertSame($name, $object->data->name); $this->assertSame($description, $object->data->description); # Check that the daypart was actually renamed $daypart = (new XiboDaypart($this->getEntityProvider()))->getById($object->id); $this->assertSame($name, $daypart->name); $this->assertSame($description, $daypart->description); # Clean up the Daypart as we no longer need it $daypart->delete(); } /** * Test delete * @group minimal */ public function testDelete() { $name1 = Random::generateString(8, 'phpunit'); $name2 = Random::generateString(8, 'phpunit'); # Load in a couple of known Dayparts $daypart1 = (new XiboDaypart($this->getEntityProvider()))->create($name1, 'API', '02:00', '06:00', NULL, NULL, NULL); $daypart2 = (new XiboDaypart($this->getEntityProvider()))->create($name2, 'API', '12:00', '16:00', NULL, NULL, NULL); # Delete the one we created last $response = $this->sendRequest('DELETE','/daypart/' . $daypart2->dayPartId); # This should return 204 for success $object = json_decode($response->getBody()); $this->assertSame(204, $object->status, $response->getBody()); # Check only one remains $dayparts = (new XiboDaypart($this->getEntityProvider()))->get(['start' => 0, 'length' => 10000]); $this->assertEquals(count($this->startDayparts) + 1, count($dayparts)); $flag = false; foreach ($dayparts as $daypart) { if ($daypart->dayPartId == $daypart1->dayPartId) { $flag = true; } } $this->assertTrue($flag, 'Daypart ID ' . $daypart1->dayPartId . ' was not found after deleting a different daypart'); $daypart1->delete(); } }
{ "pile_set_name": "Github" }
/* * HCS API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: 2.1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package hcsschema type GuestOs struct { HostName string `json:"HostName,omitempty"` }
{ "pile_set_name": "Github" }
{ "name": "package-4", "version": "1.0.0", "dependencies": { "package-1": "^0.0.0" } }
{ "pile_set_name": "Github" }
-- ======================================================= -- Enable a Table for All and Net Changes Queries Template -- ======================================================= USE <Database_Name,sysname,Database_Name> GO EXEC sys.sp_cdc_enable_table @source_schema = N'<source_schema,sysname,source_schema>', @source_name = N'<source_name,sysname,source_name>', @role_name = N'<role_name,sysname,role_name>', @supports_net_changes = 1 GO
{ "pile_set_name": "Github" }
{ "images": [ { "filename": "ic_photo.png", "idiom": "universal", "scale": "1x" }, { "filename": "ic_photo_2x.png", "idiom": "universal", "scale": "2x" }, { "filename": "ic_photo_3x.png", "idiom": "universal", "scale": "3x" } ], "info": { "author": "xcode", "version": 1 } }
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; using Hudl.FFmpeg.Attributes; using Hudl.FFmpeg.Filters.Attributes; using Hudl.FFmpeg.Filters.Interfaces; using Hudl.FFmpeg.Formatters; using Hudl.FFmpeg.Metadata; using Hudl.FFmpeg.Metadata.Interfaces; using Hudl.FFmpeg.Metadata.Models; using Hudl.FFmpeg.Resources.BaseTypes; using Hudl.FFmpeg.Validators; using Hudl.FFprobe.Metadata.Models; namespace Hudl.FFmpeg.Filters { /// <summary> /// Filter that return unprocessed audio frames. It is mainly useful as a template and to be employed in /// analysis / debugging tools, or as the source for filters which ignore the input data (for example /// the sox synth filter). /// </summary> [ForStream(Type = typeof(AudioStream))] [Filter(Name = "aevalsrc", MinInputs = 0, MaxInputs = 0)] public class AEvalSrc : IFilter, IMetadataManipulation { [FilterParameter(Name = "exprs")] public string Expression { get; set; } [FilterParameter(Name = "c")] public string ChannelLayout { get; set; } [FilterParameter(Name = "d", Formatter = typeof(TimeSpanFormatter))] [Validate(typeof(TimeSpanGreterThanZeroValidator))] public TimeSpan? Duration { get; set; } [FilterParameter(Name = "s", Default = 44100)] public int? SampleRate { get; set; } [FilterParameter(Name = "n", Default = 1024)] public long? NumberOfSamples { get; set; } public MetadataInfoTreeContainer EditInfo(MetadataInfoTreeContainer infoToUpdate, List<MetadataInfoTreeContainer> suppliedInfo) { var emptyMetadataInfo = MetadataInfo.Create(); emptyMetadataInfo.AudioMetadata = new AudioStreamMetadata { SampleRate = SampleRate ?? 44100, Duration = Duration ?? TimeSpan.MaxValue, DurationTs = long.MaxValue, }; return MetadataInfoTreeContainer.Create(AudioStream.Create(emptyMetadataInfo)); } } }
{ "pile_set_name": "Github" }
package com.alibaba.json.bvt.issue_1100; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONPath; import junit.framework.TestCase; /** * Created by wenshao on 05/05/2017. */ public class Issue1177_1 extends TestCase { public void test_for_issue() throws Exception { String text = "{\"a\":{\"x\":\"y\"},\"b\":{\"x\":\"y\"}}"; JSONObject jsonObject = JSONObject.parseObject(text); System.out.println(jsonObject); String jsonpath = "$..x"; String value="y2"; JSONPath.set(jsonObject, jsonpath, value); assertEquals("{\"a\":{\"x\":\"y2\"},\"b\":{\"x\":\"y2\"}}", jsonObject.toString()); } }
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z -frelaxed-template-template-args %s // expected-note@temp_arg_template_cxx1z.cpp:* 1+{{}} template<template<int> typename> struct Ti; template<template<int...> typename> struct TPi; template<template<int, int...> typename> struct TiPi; template<template<int..., int...> typename> struct TPiPi; // FIXME: Why is this not ill-formed? template<typename T, template<T> typename> struct tT0; template<template<typename T, T> typename> struct Tt0; template<template<typename> typename> struct Tt; template<template<typename, typename...> typename> struct TtPt; template<int> struct i; template<int, int = 0> struct iDi; template<int, int> struct ii; template<int...> struct Pi; template<int, int, int...> struct iiPi; template<int, typename = int> struct iDt; template<int, typename> struct it; template<typename T, T v> struct t0; template<typename...> struct Pt; namespace IntParam { using ok = Pt<Ti<i>, Ti<iDi>, Ti<Pi>, Ti<iDt>>; using err1 = Ti<ii>; // expected-error {{different template parameters}} using err2 = Ti<iiPi>; // expected-error {{different template parameters}} using err3 = Ti<t0>; // expected-error {{different template parameters}} using err4 = Ti<it>; // expected-error {{different template parameters}} } // These are accepted by the backwards-compatibility "parameter pack in // parameter matches any number of parameters in arguments" rule. namespace IntPackParam { using ok = TPi<Pi>; using ok_compat = Pt<TPi<i>, TPi<iDi>, TPi<ii>, TPi<iiPi>>; using err1 = TPi<t0>; // expected-error {{different template parameters}} using err2 = TPi<iDt>; // expected-error {{different template parameters}} using err3 = TPi<it>; // expected-error {{different template parameters}} } namespace IntAndPackParam { using ok = TiPi<Pi>; using ok_compat = Pt<TiPi<ii>, TiPi<iDi>, TiPi<iiPi>>; using err = TiPi<iDi>; } namespace DependentType { using ok = Pt<tT0<int, i>, tT0<int, iDi>>; using err1 = tT0<int, ii>; // expected-error {{different template parameters}} using err2 = tT0<short, i>; // FIXME: should this be OK? using err2a = tT0<long long, i>; // FIXME: should this be OK (if long long is larger than int)? using err2b = tT0<void*, i>; // expected-error {{different template parameters}} using err3 = tT0<short, t0>; // expected-error {{different template parameters}} using ok2 = Tt0<t0>; using err4 = Tt0<it>; // expected-error {{different template parameters}} } namespace Auto { template<template<int> typename T> struct TInt {}; template<template<int*> typename T> struct TIntPtr {}; template<template<auto> typename T> struct TAuto {}; template<template<auto*> typename T> struct TAutoPtr {}; template<template<decltype(auto)> typename T> struct TDecltypeAuto {}; template<auto> struct Auto; template<auto*> struct AutoPtr; template<decltype(auto)> struct DecltypeAuto; template<int> struct Int; template<int*> struct IntPtr; TInt<Auto> ia; TInt<AutoPtr> iap; // FIXME: ill-formed (?) TInt<DecltypeAuto> ida; TInt<Int> ii; TInt<IntPtr> iip; // expected-error {{different template parameters}} TIntPtr<Auto> ipa; TIntPtr<AutoPtr> ipap; TIntPtr<DecltypeAuto> ipda; TIntPtr<Int> ipi; // expected-error {{different template parameters}} TIntPtr<IntPtr> ipip; TAuto<Auto> aa; TAuto<AutoPtr> aap; // FIXME: ill-formed (?) TAuto<Int> ai; // FIXME: ill-formed (?) TAuto<IntPtr> aip; // FIXME: ill-formed (?) TAutoPtr<Auto> apa; TAutoPtr<AutoPtr> apap; TAutoPtr<Int> api; // FIXME: ill-formed (?) TAutoPtr<IntPtr> apip; // FIXME: ill-formed (?) TDecltypeAuto<DecltypeAuto> dada; TDecltypeAuto<Int> dai; // FIXME: ill-formed (?) TDecltypeAuto<IntPtr> daip; // FIXME: ill-formed (?) // FIXME: It's completely unclear what should happen here, but these results // seem at least plausible: TAuto<DecltypeAuto> ada; TAutoPtr<DecltypeAuto> apda; // Perhaps this case should be invalid, as there are valid 'decltype(auto)' // parameters (such as 'user-defined-type &') that are not valid 'auto' // parameters. TDecltypeAuto<Auto> daa; TDecltypeAuto<AutoPtr> daap; // FIXME: should probably be ill-formed int n; template<auto A, decltype(A) B = &n> struct SubstFailure; TInt<SubstFailure> isf; // FIXME: this should be ill-formed TIntPtr<SubstFailure> ipsf; }
{ "pile_set_name": "Github" }
--- title: ChatBubble 对话气泡 --- 对话气泡常出现于通讯类软件中,相对于纯文本形式的上下文对话,使用对话气泡可以让聊天界面更加生动有趣。通过扩展,还可以做出气泡皮肤,可使软件个性化功能更加丰富。 ```cs public class ChatBubble : SelectableItem ``` # 属性 | 属性 | 用途 | | ---------------------- | -------------------| | Role | 对话角色 | | Type | 消息类型 | | IsRead | 是否已读 | | ReadAction | 该气泡被选中时触发 | ![ChatBubble](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/ChatBubble.png) {% note warning %} 效果代码详见源码demo {% endnote %}
{ "pile_set_name": "Github" }
-----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQDy+OVI2u5NBOeB2CyzGnwy9b7Ao4CSi05XtUxh2IoVdzYZz6c4 PFb9C1ad52LDdRStiQT5A7+RKLj6Kr7fJrKFziJxMy4g4Kdn9G659vE7CWu/UAVj RUtc+mTBAEfjdbumizmHLG7DmnNhGl3RNGiVNLsUInSMGfUlJRzZJXhI4QIDAQAB AoGAEqBB83PVENJvbOTFiHVfUAjGtr3R/Wnwd4jOcjHHZB3fZ9sjVoxJntxfp3s1 dwZir2rxlqVS6i3VAFiGiVTOGo2Vvzhw2J7f58twCECmnLb2f863AkGEYe4dAndD GHGD0WI0CBMD1sT18YCj561o0Wol5deWH0gM9pr2N3HkeIECQQD6hUKFlFhrpaHP WNJsl6BxgE6pB5kxLcMcpIQ7P+kHUvtyvCJl5QZJqPrpPGjRsAI5Ph92rpsp/zDp /IZNWGVjAkEA+Ele31Rt+XbV32MrLKZgBDBk+Pzss5LTn9fZ5v1k/7hrMk2VVWvk AD6n5QiGe/g59woANpPb1T9l956SBf0d6wJABTXOS17pc9uvANP1FGMW6CVl/Wf2 DKrJ+weE5IKQwyE7r4gwIvRfbBrClSU3fNzvPueG2f4JphbzmnoxBNzIxwJAYivY mGNwzHehXx99/byXMHDWK+EN0n8WsBgP75Z3rekEcbJdfpYXY8Via1vwmOnwOW65 4NqbzHix37PSNw37GwJBALxaGNpREO2Tk+oWOvsD2QyviMVae3mXAJHc6nLVdKDM q0YvDT6VdeNYYFTkAuzJacsVXOpn6AnUMFj0OBedMhc= -----END RSA PRIVATE KEY-----
{ "pile_set_name": "Github" }
{ "name": "iron-behaviors", "version": "1.0.16", "description": "Provides a set of behaviors for the iron elements", "private": true, "authors": [ "The Polymer Authors" ], "repository": { "type": "git", "url": "git://github.com/PolymerElements/iron-behaviors.git" }, "main": [ "iron-button-state.html", "iron-control-state.html" ], "license": "http://polymer.github.io/LICENSE.txt", "dependencies": { "polymer": "Polymer/polymer#^1.2.0", "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" }, "devDependencies": { "paper-styles": "polymerelements/paper-styles#^1.0.2", "paper-input": "polymerelements/paper-input#^1.0.0", "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0", "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [] }
{ "pile_set_name": "Github" }
#!/usr/bin/env bash ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS="" APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn ( ) { echo "$*" } die ( ) { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; esac # For Cygwin, ensure paths are in UNIX format before anything is touched. if $cygwin ; then [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` fi # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >&- APP_HOME="`pwd -P`" cd "$SAVED" >&- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=$((i+1)) done case $i in (0) set -- ;; (1) set -- "$args0" ;; (2) set -- "$args0" "$args1" ;; (3) set -- "$args0" "$args1" "$args2" ;; (4) set -- "$args0" "$args1" "$args2" "$args3" ;; (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules function splitJvmOpts() { JVM_OPTS=("$@") } eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
{ "pile_set_name": "Github" }
<ContentDialog x:Name="passwordDialog" x:Class="BreadPlayer.Dialogs.PasswordDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:BreadPlayer.Dialogs" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" PrimaryButtonText="Let me enter!" SecondaryButtonText="Get me out of here!" PrimaryButtonClick="ContentDialog_PrimaryButtonClick" SecondaryButtonClick="ContentDialog_SecondaryButtonClick"> <StackPanel Width="{Binding ElementName=InputDia, Path=DialogWidth, UpdateSourceTrigger=Explicit}"> <PasswordBox x:Name="password" Style="{StaticResource RoundedPasswordBoxStyle}" Visibility="Visible" Header="Password:" Password="{Binding ElementName=passwordDialog, Path=Password, Mode=TwoWay}" Margin="0,5,0,0" /> </StackPanel> </ContentDialog>
{ "pile_set_name": "Github" }
Header { Version = 6; } Model { State = "ITEM_SPMP1"; Flags = spin | autoscale; Sub { File = "Items/Map/Map.md2"; } }
{ "pile_set_name": "Github" }
/** ****************************************************************************** * @file stm32f4xx_exti.h * @author MCD Application Team * @version V1.0.0 * @date 30-September-2011 * @brief This file contains all the functions prototypes for the EXTI firmware * library. ****************************************************************************** * @attention * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2> ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_EXTI_H #define __STM32F4xx_EXTI_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx.h" /** @addtogroup STM32F4xx_StdPeriph_Driver * @{ */ /** @addtogroup EXTI * @{ */ /* Exported types ------------------------------------------------------------*/ /** * @brief EXTI mode enumeration */ typedef enum { EXTI_Mode_Interrupt = 0x00, EXTI_Mode_Event = 0x04 }EXTIMode_TypeDef; #define IS_EXTI_MODE(MODE) (((MODE) == EXTI_Mode_Interrupt) || ((MODE) == EXTI_Mode_Event)) /** * @brief EXTI Trigger enumeration */ typedef enum { EXTI_Trigger_Rising = 0x08, EXTI_Trigger_Falling = 0x0C, EXTI_Trigger_Rising_Falling = 0x10 }EXTITrigger_TypeDef; #define IS_EXTI_TRIGGER(TRIGGER) (((TRIGGER) == EXTI_Trigger_Rising) || \ ((TRIGGER) == EXTI_Trigger_Falling) || \ ((TRIGGER) == EXTI_Trigger_Rising_Falling)) /** * @brief EXTI Init Structure definition */ typedef struct { uint32_t EXTI_Line; /*!< Specifies the EXTI lines to be enabled or disabled. This parameter can be any combination value of @ref EXTI_Lines */ EXTIMode_TypeDef EXTI_Mode; /*!< Specifies the mode for the EXTI lines. This parameter can be a value of @ref EXTIMode_TypeDef */ EXTITrigger_TypeDef EXTI_Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines. This parameter can be a value of @ref EXTITrigger_TypeDef */ FunctionalState EXTI_LineCmd; /*!< Specifies the new state of the selected EXTI lines. This parameter can be set either to ENABLE or DISABLE */ }EXTI_InitTypeDef; /* Exported constants --------------------------------------------------------*/ /** @defgroup EXTI_Exported_Constants * @{ */ /** @defgroup EXTI_Lines * @{ */ #define EXTI_Line0 ((uint32_t)0x00001) /*!< External interrupt line 0 */ #define EXTI_Line1 ((uint32_t)0x00002) /*!< External interrupt line 1 */ #define EXTI_Line2 ((uint32_t)0x00004) /*!< External interrupt line 2 */ #define EXTI_Line3 ((uint32_t)0x00008) /*!< External interrupt line 3 */ #define EXTI_Line4 ((uint32_t)0x00010) /*!< External interrupt line 4 */ #define EXTI_Line5 ((uint32_t)0x00020) /*!< External interrupt line 5 */ #define EXTI_Line6 ((uint32_t)0x00040) /*!< External interrupt line 6 */ #define EXTI_Line7 ((uint32_t)0x00080) /*!< External interrupt line 7 */ #define EXTI_Line8 ((uint32_t)0x00100) /*!< External interrupt line 8 */ #define EXTI_Line9 ((uint32_t)0x00200) /*!< External interrupt line 9 */ #define EXTI_Line10 ((uint32_t)0x00400) /*!< External interrupt line 10 */ #define EXTI_Line11 ((uint32_t)0x00800) /*!< External interrupt line 11 */ #define EXTI_Line12 ((uint32_t)0x01000) /*!< External interrupt line 12 */ #define EXTI_Line13 ((uint32_t)0x02000) /*!< External interrupt line 13 */ #define EXTI_Line14 ((uint32_t)0x04000) /*!< External interrupt line 14 */ #define EXTI_Line15 ((uint32_t)0x08000) /*!< External interrupt line 15 */ #define EXTI_Line16 ((uint32_t)0x10000) /*!< External interrupt line 16 Connected to the PVD Output */ #define EXTI_Line17 ((uint32_t)0x20000) /*!< External interrupt line 17 Connected to the RTC Alarm event */ #define EXTI_Line18 ((uint32_t)0x40000) /*!< External interrupt line 18 Connected to the USB OTG FS Wakeup from suspend event */ #define EXTI_Line19 ((uint32_t)0x80000) /*!< External interrupt line 19 Connected to the Ethernet Wakeup event */ #define EXTI_Line20 ((uint32_t)0x00100000) /*!< External interrupt line 20 Connected to the USB OTG HS (configured in FS) Wakeup event */ #define EXTI_Line21 ((uint32_t)0x00200000) /*!< External interrupt line 21 Connected to the RTC Tamper and Time Stamp events */ #define EXTI_Line22 ((uint32_t)0x00400000) /*!< External interrupt line 22 Connected to the RTC Wakeup event */ #define IS_EXTI_LINE(LINE) ((((LINE) & (uint32_t)0xFF800000) == 0x00) && ((LINE) != (uint16_t)0x00)) #define IS_GET_EXTI_LINE(LINE) (((LINE) == EXTI_Line0) || ((LINE) == EXTI_Line1) || \ ((LINE) == EXTI_Line2) || ((LINE) == EXTI_Line3) || \ ((LINE) == EXTI_Line4) || ((LINE) == EXTI_Line5) || \ ((LINE) == EXTI_Line6) || ((LINE) == EXTI_Line7) || \ ((LINE) == EXTI_Line8) || ((LINE) == EXTI_Line9) || \ ((LINE) == EXTI_Line10) || ((LINE) == EXTI_Line11) || \ ((LINE) == EXTI_Line12) || ((LINE) == EXTI_Line13) || \ ((LINE) == EXTI_Line14) || ((LINE) == EXTI_Line15) || \ ((LINE) == EXTI_Line16) || ((LINE) == EXTI_Line17) || \ ((LINE) == EXTI_Line18) || ((LINE) == EXTI_Line19) || \ ((LINE) == EXTI_Line20) || ((LINE) == EXTI_Line21) ||\ ((LINE) == EXTI_Line22)) /** * @} */ /** * @} */ /* Exported macro ------------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /* Function used to set the EXTI configuration to the default reset state *****/ void EXTI_DeInit(void); /* Initialization and Configuration functions *********************************/ void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct); void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct); void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line); /* Interrupts and flags management functions **********************************/ FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line); void EXTI_ClearFlag(uint32_t EXTI_Line); ITStatus EXTI_GetITStatus(uint32_t EXTI_Line); void EXTI_ClearITPendingBit(uint32_t EXTI_Line); #ifdef __cplusplus } #endif #endif /* __STM32F4xx_EXTI_H */ /** * @} */ /** * @} */ /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 39baceec69bb1ee4fb4194d50e1a6d10 NativeFormatImporter: userData: assetBundleName:
{ "pile_set_name": "Github" }
package TypecheckTest = TestFn (testDir = "../../valid-programs" outDir = "results" trans = (\\ ( { raw_syntax_tree, ... }: BuildRawSyntaxTree::Raw_Syntax_Tree_Bundle) => raw_syntax_tree))
{ "pile_set_name": "Github" }
__________________________________________________________________________________________________ __________________________________________________________________________________________________ __________________________________________________________________________________________________
{ "pile_set_name": "Github" }
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Solaris system calls. // This file is compiled as ordinary Go code, // but it is also input to mksyscall, // which parses the //sys lines and generates system call stubs. // Note that sometimes we use a lowercase //sys name and wrap // it in our own nicer implementation, either here or in // syscall_solaris.go or syscall_unix.go. package unix import ( "syscall" "unsafe" ) // Implemented in runtime/syscall_solaris.go. type syscallFunc uintptr func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Family uint16 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [244]int8 raw RawSockaddrDatalink } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok { return 0, false } return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } //sysnb pipe(p *[2]_C_int) (n int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { return EINVAL } var pp [2]_C_int n, err := pipe(&pp) if n != 0 { return err } p[0] = int(pp[0]) p[1] = int(pp[1]) return nil } func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Port < 0 || sa.Port > 0xFFFF { return nil, 0, EINVAL } sa.raw.Family = AF_INET p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p[0] = byte(sa.Port >> 8) p[1] = byte(sa.Port) for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr[i] = sa.Addr[i] } return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil } func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Port < 0 || sa.Port > 0xFFFF { return nil, 0, EINVAL } sa.raw.Family = AF_INET6 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p[0] = byte(sa.Port >> 8) p[1] = byte(sa.Port) sa.raw.Scope_id = sa.ZoneId for i := 0; i < len(sa.Addr); i++ { sa.raw.Addr[i] = sa.Addr[i] } return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil } func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { name := sa.Name n := len(name) if n >= len(sa.raw.Path) { return nil, 0, EINVAL } sa.raw.Family = AF_UNIX for i := 0; i < n; i++ { sa.raw.Path[i] = int8(name[i]) } // length is family (uint16), name, NUL. sl := _Socklen(2) if n > 0 { sl += _Socklen(n) + 1 } if sa.raw.Path[0] == '@' { sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- } return unsafe.Pointer(&sa.raw), sl, nil } //sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname func Getsockname(fd int) (sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny if err = getsockname(fd, &rsa, &len); err != nil { return } return anyToSockaddr(fd, &rsa) } // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { buf := make([]byte, 256) vallen := _Socklen(len(buf)) err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) if err != nil { return "", err } return string(buf[:vallen-1]), nil } const ImplementsGetwd = true //sys Getcwd(buf []byte) (n int, err error) func Getwd() (wd string, err error) { var buf [PathMax]byte // Getcwd will return an error if it failed for any reason. _, err = Getcwd(buf[0:]) if err != nil { return "", err } n := clen(buf[:]) if n < 1 { return "", EINVAL } return string(buf[:n]), nil } /* * Wrapped */ //sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error) //sysnb setgroups(ngid int, gid *_Gid_t) (err error) func Getgroups() (gids []int, err error) { n, err := getgroups(0, nil) // Check for error and sanity check group count. Newer versions of // Solaris allow up to 1024 (NGROUPS_MAX). if n < 0 || n > 1024 { if err != nil { return nil, err } return nil, EINVAL } else if n == 0 { return nil, nil } a := make([]_Gid_t, n) n, err = getgroups(n, &a[0]) if n == -1 { return nil, err } gids = make([]int, n) for i, v := range a[0:n] { gids[i] = int(v) } return } func Setgroups(gids []int) (err error) { if len(gids) == 0 { return setgroups(0, nil) } a := make([]_Gid_t, len(gids)) for i, v := range gids { a[i] = _Gid_t(v) } return setgroups(len(a), &a[0]) } // ReadDirent reads directory entries from fd and writes them into buf. func ReadDirent(fd int, buf []byte) (n int, err error) { // Final argument is (basep *uintptr) and the syscall doesn't take nil. // TODO(rsc): Can we use a single global basep for all calls? return Getdents(fd, buf, new(uintptr)) } // Wait status is 7 bits at bottom, either 0 (exited), // 0x7F (stopped), or a signal number that caused an exit. // The 0x80 bit is whether there was a core dump. // An extra number (exit code, signal causing a stop) // is in the high bits. type WaitStatus uint32 const ( mask = 0x7F core = 0x80 shift = 8 exited = 0 stopped = 0x7F ) func (w WaitStatus) Exited() bool { return w&mask == exited } func (w WaitStatus) ExitStatus() int { if w&mask != exited { return -1 } return int(w >> shift) } func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } func (w WaitStatus) Signal() syscall.Signal { sig := syscall.Signal(w & mask) if sig == stopped || sig == 0 { return -1 } return sig } func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP } func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP } func (w WaitStatus) StopSignal() syscall.Signal { if !w.Stopped() { return -1 } return syscall.Signal(w>>shift) & 0xFF } func (w WaitStatus) TrapCause() int { return -1 } //sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) { var status _C_int rpid, err := wait4(int32(pid), &status, options, rusage) wpid := int(rpid) if wpid == -1 { return wpid, err } if wstatus != nil { *wstatus = WaitStatus(status) } return wpid, nil } //sys gethostname(buf []byte) (n int, err error) func Gethostname() (name string, err error) { var buf [MaxHostNameLen]byte n, err := gethostname(buf[:]) if n != 0 { return "", err } n = clen(buf[:]) if n < 1 { return "", EFAULT } return string(buf[:n]), nil } //sys utimes(path string, times *[2]Timeval) (err error) func Utimes(path string, tv []Timeval) (err error) { if tv == nil { return utimes(path, nil) } if len(tv) != 2 { return EINVAL } return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } //sys utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) func UtimesNano(path string, ts []Timespec) error { if ts == nil { return utimensat(AT_FDCWD, path, nil, 0) } if len(ts) != 2 { return EINVAL } return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { if ts == nil { return utimensat(dirfd, path, nil, flags) } if len(ts) != 2 { return EINVAL } return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) } //sys fcntl(fd int, cmd int, arg int) (val int, err error) // FcntlInt performs a fcntl syscall on fd with the provided command and argument. func FcntlInt(fd uintptr, cmd, arg int) (int, error) { valptr, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) var err error if errno != 0 { err = errno } return int(valptr), err } // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0) if e1 != 0 { return e1 } return nil } //sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error) func Futimesat(dirfd int, path string, tv []Timeval) error { pathp, err := BytePtrFromString(path) if err != nil { return err } if tv == nil { return futimesat(dirfd, pathp, nil) } if len(tv) != 2 { return EINVAL } return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } // Solaris doesn't have an futimes function because it allows NULL to be // specified as the path for futimesat. However, Go doesn't like // NULL-style string interfaces, so this simple wrapper is provided. func Futimes(fd int, tv []Timeval) error { if tv == nil { return futimesat(fd, nil, nil) } if len(tv) != 2 { return EINVAL } return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_UNIX: pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) sa := new(SockaddrUnix) // Assume path ends at NUL. // This is not technically the Solaris semantics for // abstract Unix domain sockets -- they are supposed // to be uninterpreted fixed-size binary blobs -- but // everyone uses this convention. n := 0 for n < len(pp.Path) && pp.Path[n] != 0 { n++ } bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil case AF_INET: pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) sa := new(SockaddrInet4) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) for i := 0; i < len(sa.Addr); i++ { sa.Addr[i] = pp.Addr[i] } return sa, nil case AF_INET6: pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) sa := new(SockaddrInet6) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) sa.ZoneId = pp.Scope_id for i := 0; i < len(sa.Addr); i++ { sa.Addr[i] = pp.Addr[i] } return sa, nil } return nil, EAFNOSUPPORT } //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept func Accept(fd int) (nfd int, sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny nfd, err = accept(fd, &rsa, &len) if nfd == -1 { return } sa, err = anyToSockaddr(fd, &rsa) if err != nil { Close(nfd) nfd = 0 } return } //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var msg Msghdr var rsa RawSockaddrAny msg.Name = (*byte)(unsafe.Pointer(&rsa)) msg.Namelen = uint32(SizeofSockaddrAny) var iov Iovec if len(p) > 0 { iov.Base = (*int8)(unsafe.Pointer(&p[0])) iov.SetLen(len(p)) } var dummy int8 if len(oob) > 0 { // receive at least one normal byte if len(p) == 0 { iov.Base = &dummy iov.SetLen(1) } msg.Accrightslen = int32(len(oob)) } msg.Iov = &iov msg.Iovlen = 1 if n, err = recvmsg(fd, &msg, flags); n == -1 { return } oobn = int(msg.Accrightslen) // source address is only specified if the socket is unconnected if rsa.Addr.Family != AF_UNSPEC { from, err = anyToSockaddr(fd, &rsa) } return } func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { _, err = SendmsgN(fd, p, oob, to, flags) return } //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { var ptr unsafe.Pointer var salen _Socklen if to != nil { ptr, salen, err = to.sockaddr() if err != nil { return 0, err } } var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Namelen = uint32(salen) var iov Iovec if len(p) > 0 { iov.Base = (*int8)(unsafe.Pointer(&p[0])) iov.SetLen(len(p)) } var dummy int8 if len(oob) > 0 { // send at least one normal byte if len(p) == 0 { iov.Base = &dummy iov.SetLen(1) } msg.Accrightslen = int32(len(oob)) } msg.Iov = &iov msg.Iovlen = 1 if n, err = sendmsg(fd, &msg, flags); err != nil { return 0, err } if len(oob) > 0 && len(p) == 0 { n = 0 } return n, nil } //sys acct(path *byte) (err error) func Acct(path string) (err error) { if len(path) == 0 { // Assume caller wants to disable accounting. return acct(nil) } pathp, err := BytePtrFromString(path) if err != nil { return err } return acct(pathp) } //sys __makedev(version int, major uint, minor uint) (val uint64) func Mkdev(major, minor uint32) uint64 { return __makedev(NEWDEV, uint(major), uint(minor)) } //sys __major(version int, dev uint64) (val uint) func Major(dev uint64) uint32 { return uint32(__major(NEWDEV, dev)) } //sys __minor(version int, dev uint64) (val uint) func Minor(dev uint64) uint32 { return uint32(__minor(NEWDEV, dev)) } /* * Expose the ioctl function */ //sys ioctl(fd int, req uint, arg uintptr) (err error) func IoctlSetTermio(fd int, req uint, value *Termio) (err error) { return ioctl(fd, req, uintptr(unsafe.Pointer(value))) } func IoctlGetTermio(fd int, req uint) (*Termio, error) { var value Termio err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) return &value, err } //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { return poll(nil, 0, timeout) } return poll(&fds[0], len(fds), timeout) } func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } return sendfile(outfd, infd, offset, count) } /* * Exposed directly */ //sys Access(path string, mode uint32) (err error) //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) //sys Chdir(path string) (err error) //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) //sys Close(fd int) (err error) //sys Creat(path string, mode uint32) (fd int, err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(oldfd int, newfd int) (err error) //sys Exit(code int) //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchmod(fd int, mode uint32) (err error) //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Fdatasync(fd int) (err error) //sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) //sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) //sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) //sysnb Getgid() (gid int) //sysnb Getpid() (pid int) //sysnb Getpgid(pid int) (pgid int, err error) //sysnb Getpgrp() (pgid int, err error) //sys Geteuid() (euid int) //sys Getegid() (egid int) //sys Getppid() (ppid int) //sys Getpriority(which int, who int) (n int, err error) //sysnb Getrlimit(which int, lim *Rlimit) (err error) //sysnb Getrusage(who int, rusage *Rusage) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Getuid() (uid int) //sys Kill(pid int, signum syscall.Signal) (err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) //sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten //sys Lstat(path string, stat *Stat_t) (err error) //sys Madvise(b []byte, advice int) (err error) //sys Mkdir(path string, mode uint32) (err error) //sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mkfifoat(dirfd int, path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) //sys Mlock(b []byte) (err error) //sys Mlockall(flags int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Msync(b []byte, flags int) (err error) //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) //sys Pause() (err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sysnb Setegid(egid int) (err error) //sysnb Seteuid(euid int) (err error) //sysnb Setgid(gid int) (err error) //sys Sethostname(p []byte) (err error) //sysnb Setpgid(pid int, pgid int) (err error) //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Setuid(uid int) (err error) //sys Shutdown(s int, how int) (err error) = libsocket.shutdown //sys Stat(path string, stat *Stat_t) (err error) //sys Statvfs(path string, vfsstat *Statvfs_t) (err error) //sys Symlink(path string, link string) (err error) //sys Sync() (err error) //sysnb Times(tms *Tms) (ticks uintptr, err error) //sys Truncate(path string, length int64) (err error) //sys Fsync(fd int) (err error) //sys Ftruncate(fd int, length int64) (err error) //sys Umask(mask int) (oldmask int) //sysnb Uname(buf *Utsname) (err error) //sys Unmount(target string, flags int) (err error) = libc.umount //sys Unlink(path string) (err error) //sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys munmap(addr uintptr, length uintptr) (err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = libsendfile.sendfile //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto //sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair //sys write(fd int, p []byte) (n int, err error) //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.__xnet_getsockopt //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom func readlen(fd int, buf *byte, nbuf int) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0) n = int(r0) if e1 != 0 { err = e1 } return } func writelen(fd int, buf *byte, nbuf int) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0) n = int(r0) if e1 != 0 { err = e1 } return } var mapper = &mmapper{ active: make(map[*byte][]byte), mmap: mmap, munmap: munmap, } func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { return mapper.Mmap(fd, offset, length, prot, flags) } func Munmap(b []byte) (err error) { return mapper.Munmap(b) }
{ "pile_set_name": "Github" }
PKGNAME= librdkafka LIBNAME= librdkafka LIBVER= 1 -include ../Makefile.config ifneq ($(wildcard ../.git),) # Add librdkafka version string from git tag if this is a git checkout CPPFLAGS += -DLIBRDKAFKA_GIT_VERSION="\"$(shell git describe --abbrev=6 --dirty --tags 2>/dev/null)\"" endif SRCS_$(WITH_SASL_CYRUS) += rdkafka_sasl_cyrus.c SRCS_$(WITH_SASL_SCRAM) += rdkafka_sasl_scram.c SRCS_$(WITH_SASL_OAUTHBEARER) += rdkafka_sasl_oauthbearer.c SRCS_$(WITH_SNAPPY) += snappy.c SRCS_$(WITH_ZLIB) += rdgz.c SRCS_$(WITH_ZSTD) += rdkafka_zstd.c SRCS_$(WITH_HDRHISTOGRAM) += rdhdrhistogram.c SRCS_$(WITH_SSL) += rdkafka_ssl.c SRCS_LZ4 = rdxxhash.c ifneq ($(WITH_LZ4_EXT), y) # Use built-in liblz4 SRCS_LZ4 += lz4.c lz4frame.c lz4hc.c endif SRCS_y += rdkafka_lz4.c $(SRCS_LZ4) SRCS_$(WITH_LIBDL) += rddl.c SRCS_$(WITH_PLUGINS) += rdkafka_plugin.c ifneq ($(HAVE_REGEX), y) SRCS_y += regexp.c endif SRCS= rdkafka.c rdkafka_broker.c rdkafka_msg.c rdkafka_topic.c \ rdkafka_conf.c rdkafka_timer.c rdkafka_offset.c \ rdkafka_transport.c rdkafka_buf.c rdkafka_queue.c rdkafka_op.c \ rdkafka_request.c rdkafka_cgrp.c rdkafka_pattern.c \ rdkafka_partition.c rdkafka_subscription.c \ rdkafka_assignor.c rdkafka_range_assignor.c \ rdkafka_roundrobin_assignor.c rdkafka_feature.c \ rdcrc32.c crc32c.c rdmurmur2.c rdfnv1a.c rdaddr.c rdrand.c rdlist.c \ tinycthread.c tinycthread_extra.c \ rdlog.c rdstring.c rdkafka_event.c rdkafka_metadata.c \ rdregex.c rdports.c rdkafka_metadata_cache.c rdavl.c \ rdkafka_sasl.c rdkafka_sasl_plain.c rdkafka_interceptor.c \ rdkafka_msgset_writer.c rdkafka_msgset_reader.c \ rdkafka_header.c rdkafka_admin.c rdkafka_aux.c \ rdkafka_background.c rdkafka_idempotence.c rdkafka_cert.c \ rdkafka_txnmgr.c rdkafka_coord.c \ rdvarint.c rdbuf.c rdunittest.c \ rdkafka_mock.c rdkafka_mock_handlers.c rdkafka_mock_cgrp.c \ rdkafka_error.c \ $(SRCS_y) HDRS= rdkafka.h rdkafka_mock.h OBJS= $(SRCS:.c=.o) all: lib check include ../mklove/Makefile.base CHECK_FILES+= $(LIBFILENAME) $(LIBNAME).a file-check: lib check: file-check @(printf "%-30s " "Symbol visibility" ; \ (($(SYMDUMPER) $(LIBFILENAME) | grep rd_kafka_new >/dev/null) && \ ($(SYMDUMPER) $(LIBFILENAME) | grep -v rd_kafka_destroy >/dev/null) && \ printf "$(MKL_GREEN)OK$(MKL_CLR_RESET)\n") || \ printf "$(MKL_RED)FAILED$(MKL_CLR_RESET)\n") install: lib-install uninstall: lib-uninstall clean: lib-clean # Compile LZ4 with -O3 $(SRCS_LZ4:.c=.o): CFLAGS:=$(CFLAGS) -O3 ifeq ($(WITH_LDS),y) # Enable linker script if supported by platform LIB_LDFLAGS+= $(LDFLAG_LINKERSCRIPT)$(LIBNAME_LDS) $(LIBNAME_LDS): $(HDRS) @(printf "$(MKL_YELLOW)Generating linker script $@ from $(HDRS)$(MKL_CLR_RESET)\n" ; \ cat $(HDRS) | ../lds-gen.py > $@) endif -include $(DEPS)
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8152.3" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8124.4"/> </dependencies> <scenes> <!--View Controller--> <scene sceneID="EHf-IW-A2E"> <objects> <viewController id="01J-lp-oVM" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> </view> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="53" y="375"/> </scene> </scenes> </document>
{ "pile_set_name": "Github" }
Contact the relevant local authorities in Angola to find out about local marriage laws, including what documents you’ll need. ^You should [get legal advice](/government/collections/list-of-lawyers) before making any plans.^ ##What you need to do You’ll be asked to provide a certificate of no impediment (CNI) to prove you’re allowed to marry. To get a CNI, you must post notice of your intended marriage in Angola. You can do this at the British embassy or in front of a notary public. You’ll need to have been living in Angola for at least 3 full days before you can post notice, for example if you arrive in the country on Thursday, the earliest you can post notice is the following Monday. [Make an appointment at the embassy in Luanda.](https://www.consular-appointments.service.gov.uk/fco/#!/british-embassy-luanda/notice-of-marriage-or-civil-partnership/slot_picker) You’ll need to provide supporting documents, including: - your passport - proof of residence, such as a residence certificate - check with the embassy or notary public to find out what you need - equivalent documents for your partner You’ll need to complete a [‘Notice of marriage’](/government/publications/notice-of-marriage-form--2) form and an [‘Affidavit for marriage’](/government/publications/affirmationaffidavit-of-marital-status-form) form. You can download and fill in (but not sign) the forms in advance. You must take the forms with you to your appointment. %The names on all documents you provide must appear exactly as they do on your passports - if not, the authorities may refuse to allow the marriage to go ahead. You may need to provide evidence if the name on your passport is different to your birth certificate (for example marriage certificate or deed poll).% ^Your partner will need to follow the same process and pay the fees to get their own CNI.^ If you or your partner have been divorced, widowed or previously in a civil partnership, you’ll also need whichever of the following documents is appropriate: - a [decree absolute or final order](/copy-decree-absolute-final-order) - a civil partnership dissolution or annulment certificate - your (or your partner’s) former spouse or civil partner’s [death certificate](/order-copy-birth-death-marriage-certificate/) ^You’ll also need to provide evidence of nationality or residence if the divorce or dissolution took place outside the UK. You’ll need to get it [legalised](/get-document-legalised) and [translated](/government/collections/lists-of-translators-and-interpreters) if it’s not in English.^ ###What happens next The embassy or notary public will charge a fee for taking the oath. If you give notice at a notary public, you must post the signed forms and any supporting documents to your nearest British embassy or consulate afterwards. ^The embassy or consulate may charge a fee to return your documents to you.^ The consulate will display your notice of marriage publicly for 7 days. They’ll then send all of your documentation to the British embassy or consulate nearest to where you’re getting married in Angola, who will issue your CNI (as long as nobody has registered an objection). There’s an additional fee for this - the embassy or consulate will contact you to arrange payment. You should check if your CNI needs to be legalised (certified as genuine) by the local authorities in Angola. ^You don't need to stay in the country while your notice is posted.^ ## Fees <%= render partial: 'consular_fees_table_items', collection: calculator.services, as: :service, locals: { calculator: calculator } %> You normally have to pay fees for consular services in the local currency - these are shown in the list of [consular fees for Angola](/government/publications/angola-consular-fees). <%= render partial: 'how_to_pay', locals: {calculator: calculator} %> *[CNI]:certificate of no impediment
{ "pile_set_name": "Github" }
/* * Driver for the Auvitek USB bridge * * Copyright (c) 2008 Steven Toth <stoth@linuxtv.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/module.h> #include <linux/init.h> #include <linux/device.h> #include <linux/suspend.h> #include <media/v4l2-common.h> #include "au0828.h" #include "au8522.h" #include "xc5000.h" #include "mxl5007t.h" #include "tda18271.h" DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); #define _AU0828_BULKPIPE 0x83 #define _BULKPIPESIZE 0xe522 static u8 hauppauge_hvr950q_led_states[] = { 0x00, /* off */ 0x02, /* yellow */ 0x04, /* green */ }; static struct au8522_led_config hauppauge_hvr950q_led_cfg = { .gpio_output = 0x00e0, .gpio_output_enable = 0x6006, .gpio_output_disable = 0x0660, .gpio_leds = 0x00e2, .led_states = hauppauge_hvr950q_led_states, .num_led_states = sizeof(hauppauge_hvr950q_led_states), .vsb8_strong = 20 /* dB */ * 10, .qam64_strong = 25 /* dB */ * 10, .qam256_strong = 32 /* dB */ * 10, }; static struct au8522_config hauppauge_hvr950q_config = { .demod_address = 0x8e >> 1, .status_mode = AU8522_DEMODLOCKING, .qam_if = AU8522_IF_6MHZ, .vsb_if = AU8522_IF_6MHZ, .led_cfg = &hauppauge_hvr950q_led_cfg, }; static struct au8522_config fusionhdtv7usb_config = { .demod_address = 0x8e >> 1, .status_mode = AU8522_DEMODLOCKING, .qam_if = AU8522_IF_6MHZ, .vsb_if = AU8522_IF_6MHZ, }; static struct au8522_config hauppauge_woodbury_config = { .demod_address = 0x8e >> 1, .status_mode = AU8522_DEMODLOCKING, .qam_if = AU8522_IF_4MHZ, .vsb_if = AU8522_IF_3_25MHZ, }; static struct xc5000_config hauppauge_hvr950q_tunerconfig = { .i2c_address = 0x61, .if_khz = 6000, }; static struct mxl5007t_config mxl5007t_hvr950q_config = { .xtal_freq_hz = MxL_XTAL_24_MHZ, .if_freq_hz = MxL_IF_6_MHZ, }; static struct tda18271_config hauppauge_woodbury_tunerconfig = { .gate = TDA18271_GATE_DIGITAL, }; /*-------------------------------------------------------------------*/ static void urb_completion(struct urb *purb) { u8 *ptr; struct au0828_dev *dev = purb->context; int ptype = usb_pipetype(purb->pipe); dprintk(2, "%s()\n", __func__); if (!dev) return; if (dev->urb_streaming == 0) return; if (ptype != PIPE_BULK) { printk(KERN_ERR "%s() Unsupported URB type %d\n", __func__, ptype); return; } ptr = (u8 *)purb->transfer_buffer; /* Feed the transport payload into the kernel demux */ dvb_dmx_swfilter_packets(&dev->dvb.demux, purb->transfer_buffer, purb->actual_length / 188); /* Clean the buffer before we requeue */ memset(purb->transfer_buffer, 0, URB_BUFSIZE); /* Requeue URB */ usb_submit_urb(purb, GFP_ATOMIC); } static int stop_urb_transfer(struct au0828_dev *dev) { int i; dprintk(2, "%s()\n", __func__); for (i = 0; i < URB_COUNT; i++) { usb_kill_urb(dev->urbs[i]); kfree(dev->urbs[i]->transfer_buffer); usb_free_urb(dev->urbs[i]); } dev->urb_streaming = 0; return 0; } static int start_urb_transfer(struct au0828_dev *dev) { struct urb *purb; int i, ret = -ENOMEM; dprintk(2, "%s()\n", __func__); if (dev->urb_streaming) { dprintk(2, "%s: bulk xfer already running!\n", __func__); return 0; } for (i = 0; i < URB_COUNT; i++) { dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); if (!dev->urbs[i]) goto err; purb = dev->urbs[i]; purb->transfer_buffer = kzalloc(URB_BUFSIZE, GFP_KERNEL); if (!purb->transfer_buffer) { usb_free_urb(purb); dev->urbs[i] = NULL; goto err; } purb->status = -EINPROGRESS; usb_fill_bulk_urb(purb, dev->usbdev, usb_rcvbulkpipe(dev->usbdev, _AU0828_BULKPIPE), purb->transfer_buffer, URB_BUFSIZE, urb_completion, dev); } for (i = 0; i < URB_COUNT; i++) { ret = usb_submit_urb(dev->urbs[i], GFP_ATOMIC); if (ret != 0) { stop_urb_transfer(dev); printk(KERN_ERR "%s: failed urb submission, " "err = %d\n", __func__, ret); return ret; } } dev->urb_streaming = 1; ret = 0; err: return ret; } static int au0828_dvb_start_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct au0828_dev *dev = (struct au0828_dev *) demux->priv; struct au0828_dvb *dvb = &dev->dvb; int ret = 0; dprintk(1, "%s()\n", __func__); if (!demux->dmx.frontend) return -EINVAL; if (dvb) { mutex_lock(&dvb->lock); if (dvb->feeding++ == 0) { /* Start transport */ au0828_write(dev, 0x608, 0x90); au0828_write(dev, 0x609, 0x72); au0828_write(dev, 0x60a, 0x71); au0828_write(dev, 0x60b, 0x01); ret = start_urb_transfer(dev); } mutex_unlock(&dvb->lock); } return ret; } static int au0828_dvb_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct au0828_dev *dev = (struct au0828_dev *) demux->priv; struct au0828_dvb *dvb = &dev->dvb; int ret = 0; dprintk(1, "%s()\n", __func__); if (dvb) { mutex_lock(&dvb->lock); if (--dvb->feeding == 0) { /* Stop transport */ au0828_write(dev, 0x608, 0x00); au0828_write(dev, 0x609, 0x00); au0828_write(dev, 0x60a, 0x00); au0828_write(dev, 0x60b, 0x00); ret = stop_urb_transfer(dev); } mutex_unlock(&dvb->lock); } return ret; } static int dvb_register(struct au0828_dev *dev) { struct au0828_dvb *dvb = &dev->dvb; int result; dprintk(1, "%s()\n", __func__); /* register adapter */ result = dvb_register_adapter(&dvb->adapter, DRIVER_NAME, THIS_MODULE, &dev->usbdev->dev, adapter_nr); if (result < 0) { printk(KERN_ERR "%s: dvb_register_adapter failed " "(errno = %d)\n", DRIVER_NAME, result); goto fail_adapter; } dvb->adapter.priv = dev; /* register frontend */ result = dvb_register_frontend(&dvb->adapter, dvb->frontend); if (result < 0) { printk(KERN_ERR "%s: dvb_register_frontend failed " "(errno = %d)\n", DRIVER_NAME, result); goto fail_frontend; } /* register demux stuff */ dvb->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING | DMX_MEMORY_BASED_FILTERING; dvb->demux.priv = dev; dvb->demux.filternum = 256; dvb->demux.feednum = 256; dvb->demux.start_feed = au0828_dvb_start_feed; dvb->demux.stop_feed = au0828_dvb_stop_feed; result = dvb_dmx_init(&dvb->demux); if (result < 0) { printk(KERN_ERR "%s: dvb_dmx_init failed (errno = %d)\n", DRIVER_NAME, result); goto fail_dmx; } dvb->dmxdev.filternum = 256; dvb->dmxdev.demux = &dvb->demux.dmx; dvb->dmxdev.capabilities = 0; result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); if (result < 0) { printk(KERN_ERR "%s: dvb_dmxdev_init failed (errno = %d)\n", DRIVER_NAME, result); goto fail_dmxdev; } dvb->fe_hw.source = DMX_FRONTEND_0; result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); if (result < 0) { printk(KERN_ERR "%s: add_frontend failed " "(DMX_FRONTEND_0, errno = %d)\n", DRIVER_NAME, result); goto fail_fe_hw; } dvb->fe_mem.source = DMX_MEMORY_FE; result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); if (result < 0) { printk(KERN_ERR "%s: add_frontend failed " "(DMX_MEMORY_FE, errno = %d)\n", DRIVER_NAME, result); goto fail_fe_mem; } result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); if (result < 0) { printk(KERN_ERR "%s: connect_frontend failed (errno = %d)\n", DRIVER_NAME, result); goto fail_fe_conn; } /* register network adapter */ dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); return 0; fail_fe_conn: dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); fail_fe_mem: dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); fail_fe_hw: dvb_dmxdev_release(&dvb->dmxdev); fail_dmxdev: dvb_dmx_release(&dvb->demux); fail_dmx: dvb_unregister_frontend(dvb->frontend); fail_frontend: dvb_frontend_detach(dvb->frontend); dvb_unregister_adapter(&dvb->adapter); fail_adapter: return result; } void au0828_dvb_unregister(struct au0828_dev *dev) { struct au0828_dvb *dvb = &dev->dvb; dprintk(1, "%s()\n", __func__); if (dvb->frontend == NULL) return; dvb_net_release(&dvb->net); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); dvb_dmxdev_release(&dvb->dmxdev); dvb_dmx_release(&dvb->demux); dvb_unregister_frontend(dvb->frontend); dvb_frontend_detach(dvb->frontend); dvb_unregister_adapter(&dvb->adapter); } /* All the DVB attach calls go here, this function get's modified * for each new card. No other function in this file needs * to change. */ int au0828_dvb_register(struct au0828_dev *dev) { struct au0828_dvb *dvb = &dev->dvb; int ret; dprintk(1, "%s()\n", __func__); /* init frontend */ switch (dev->boardnr) { case AU0828_BOARD_HAUPPAUGE_HVR850: case AU0828_BOARD_HAUPPAUGE_HVR950Q: dvb->frontend = dvb_attach(au8522_attach, &hauppauge_hvr950q_config, &dev->i2c_adap); if (dvb->frontend != NULL) dvb_attach(xc5000_attach, dvb->frontend, &dev->i2c_adap, &hauppauge_hvr950q_tunerconfig); break; case AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL: dvb->frontend = dvb_attach(au8522_attach, &hauppauge_hvr950q_config, &dev->i2c_adap); if (dvb->frontend != NULL) dvb_attach(mxl5007t_attach, dvb->frontend, &dev->i2c_adap, 0x60, &mxl5007t_hvr950q_config); break; case AU0828_BOARD_HAUPPAUGE_WOODBURY: dvb->frontend = dvb_attach(au8522_attach, &hauppauge_woodbury_config, &dev->i2c_adap); if (dvb->frontend != NULL) dvb_attach(tda18271_attach, dvb->frontend, 0x60, &dev->i2c_adap, &hauppauge_woodbury_tunerconfig); break; case AU0828_BOARD_DVICO_FUSIONHDTV7: dvb->frontend = dvb_attach(au8522_attach, &fusionhdtv7usb_config, &dev->i2c_adap); if (dvb->frontend != NULL) { dvb_attach(xc5000_attach, dvb->frontend, &dev->i2c_adap, &hauppauge_hvr950q_tunerconfig); } break; default: printk(KERN_WARNING "The frontend of your DVB/ATSC card " "isn't supported yet\n"); break; } if (NULL == dvb->frontend) { printk(KERN_ERR "%s() Frontend initialization failed\n", __func__); return -1; } /* define general-purpose callback pointer */ dvb->frontend->callback = au0828_tuner_callback; /* register everything */ ret = dvb_register(dev); if (ret < 0) { if (dvb->frontend->ops.release) dvb->frontend->ops.release(dvb->frontend); return ret; } return 0; }
{ "pile_set_name": "Github" }
<a href='http://github.com/angular/angular.js/edit/master/src/ng/directive/ngEventDirs.js' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this doc</a> <a href='http://github.com/angular/angular.js/tree/master/src/ng/directive/ngEventDirs.js#L157' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">ngMouseenter</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - directive in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="api-profile-description"> <p>Specify custom behavior on mouseenter event.</p> </div> <div> <h2>Directive Info</h2> <ul> <li>This directive executes at priority level 0.</li> </ul> <h2 id="usage">Usage</h2> <div class="usage"> <ul> <li>as attribute: <pre><code>&lt;ANY&#10; ng-mouseenter=&quot;&quot;&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre> </li> </div> <section class="api-section"> <h3>Arguments</h3> <table class="variables-matrix input-arguments"> <thead> <tr> <th>Param</th> <th>Type</th> <th>Details</th> </tr> </thead> <tbody> <tr> <td> ngMouseenter </td> <td> <a href="" class="label type-hint type-hint-expression">expression</a> </td> <td> <p><a href="guide/expression">Expression</a> to evaluate upon mouseenter. (<a href="guide/expression#-event-">Event object is available as <code>$event</code></a>)</p> </td> </tr> </tbody> </table> </section> <h2 id="example">Example</h2><p> <div> <a ng-click="openPlunkr('examples/example-example27')" class="btn pull-right"> <i class="glyphicon glyphicon-edit">&nbsp;</i> Edit in Plunker</a> <div class="runnable-example" path="examples/example-example27"> <div class="runnable-example-file" name="index.html" language="html" type="html"> <pre><code>&lt;button ng-mouseenter=&quot;count = count + 1&quot; ng-init=&quot;count=0&quot;&gt;&#10; Increment (when mouse enters)&#10;&lt;/button&gt;&#10;count: {{count}}</code></pre> </div> <iframe class="runnable-example-frame" src="examples/example-example27/index.html" name="example-example27"></iframe> </div> </div> </p> </div>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup Label="Globals"> <ProjectGuid>7122e830-c550-488a-bc17-a5542ff5dd17</ProjectGuid> <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> </PropertyGroup> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> <PropertyGroup /> <Import Project="Ultraviolet.Presentation.Uvss.Tests.projitems" Label="Shared" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" /> </Project>
{ "pile_set_name": "Github" }
/* * Copyright 2017 Igor Maznitsa. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.igormaznitsa.jbbp.exceptions; import com.igormaznitsa.jbbp.compiler.JBBPNamedFieldInfo; import com.igormaznitsa.jbbp.model.JBBPAbstractField; import com.igormaznitsa.jbbp.model.JBBPFieldByte; import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import static org.junit.jupiter.api.Assertions.*; public class JBBPMapperExceptionTest { private final JBBPAbstractField field = new JBBPFieldByte(new JBBPNamedFieldInfo("test.test", "test", 0), (byte) 1); private final Exception cause = new Exception(); private final String message = "Message"; @Test public void testConstructorAndGetters() throws Exception { final Class<?> clazz = Integer.class; final Field clazzField = Integer.class.getDeclaredFields()[0]; assertNotNull(clazzField); final JBBPMapperException ex = new JBBPMapperException(this.message, this.field, clazz, clazzField, this.cause); assertSame(this.message, ex.getMessage()); assertSame(this.field, ex.getField()); assertSame(clazz, ex.getMappingClass()); assertSame(clazzField, ex.getMappingClassField()); } @Test public void testToString() throws Exception { final Class<?> clazz = Integer.class; final Field clazzField = Integer.class.getDeclaredFields()[0]; assertNotNull(clazzField); final JBBPMapperException ex = new JBBPMapperException(this.message, this.field, clazz, clazzField, this.cause); assertTrue(ex.toString().contains(clazzField.toString())); } }
{ "pile_set_name": "Github" }
#! /bin/sh t=__wt.$$ trap 'rm -f $t' 0 1 2 3 13 15 # Insulate against locale-specific sort order and IFS from the user's env LC_ALL=C export LC_ALL IFS=' '' '' ' export IFS build() { # Build the standard typedefs. f=../src/include/wt_internal.h (sed -e '/Forward type declarations .*: BEGIN/{' \ -e 'n' \ -e 'q' \ -e '}' < $f l=`ls ../src/include/*.[hi] ../src/include/*.in | sed -e '/wiredtiger.*/d' -e '/queue.h/d'` egrep -h \ '^[ ]*(((struct|union)[ ].*__wt_.*{)|WT_PACKED_STRUCT_BEGIN)' \ $l | sed -e 's/WT_PACKED_STRUCT_BEGIN(\(.*\))/struct \1 {/' \ -e 's/WT_COMPILER_TYPE_ALIGN(.*)[ ]*//' \ -e 's/^[ ]*//' -e 's/[ ]*{.*//' | sort -u | \ while read t n; do upper=`echo $n | sed -e 's/^__//' | tr [a-z] [A-Z]` echo "$t $n;" echo " typedef $t $n $upper;" done echo '/*' sed -e '/Forward type declarations .*: END/,${' \ -e 'p' \ -e '}' \ -e 'd' < $f) > $t cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f) } check() { # Complain about unused #typedefs. # List of files to search. l=`sed -e '/^[a-z]/!d' -e 's/[ ].*$//' -e 's,^,../,' filelist` l="$l `echo ../src/utilities/*.c`" ( # Get the list of typedefs search=`cat ../src/include/*.h ../src/include/*.in | sed -e 's/^struct.*typedef.* \(.*\);$/\1/p' \ -e 's/^union.*typedef.* \(.*\);$/\1/p' \ -e d | sort -u` echo "$search" fgrep -who "$search" $l ) | sort | uniq -u > $t test -s $t && cat $t } usage() { echo 'usage: s_typedef [-bc]' >&2 exit 1 } test "$#" -eq 1 || usage while : do case "$1" in -b) # -b builds the typedefs build shift;; -c) # -c checks the typedefs check shift;; *) test "$#" -eq 0 || usage break;; esac done exit 0
{ "pile_set_name": "Github" }
/* * keaoverview.cpp * * Created by Pete Bunting on 01/08/2012. * Copyright 2012 LibKEA. All rights reserved. * * This file is part of LibKEA. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the * Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #include "keaoverview.h" CPL_CVSID("$Id$") // constructor KEAOverview::KEAOverview(KEADataset *pDataset, int nSrcBand, GDALAccess eAccessIn, kealib::KEAImageIO *pImageIO, LockedRefCount *pRefCount, int nOverviewIndex, uint64_t nXSize, uint64_t nYSize) : KEARasterBand( pDataset, nSrcBand, eAccessIn, pImageIO, pRefCount ) { this->m_nOverviewIndex = nOverviewIndex; // overridden from the band - not the same size as the band obviously this->nBlockXSize = pImageIO->getOverviewBlockSize(nSrcBand, nOverviewIndex); this->nBlockYSize = pImageIO->getOverviewBlockSize(nSrcBand, nOverviewIndex); this->nRasterXSize = static_cast<int>(nXSize); this->nRasterYSize = static_cast<int>(nYSize); } KEAOverview::~KEAOverview() {} // overridden implementation - calls readFromOverview instead CPLErr KEAOverview::IReadBlock( int nBlockXOff, int nBlockYOff, void * pImage ) { try { // GDAL deals in blocks - if we are at the end of a row // we need to adjust the amount read so we don't go over the edge int nxsize = this->nBlockXSize; int nxtotalsize = this->nBlockXSize * (nBlockXOff + 1); if( nxtotalsize > this->nRasterXSize ) { nxsize -= (nxtotalsize - this->nRasterXSize); } int nysize = this->nBlockYSize; int nytotalsize = this->nBlockYSize * (nBlockYOff + 1); if( nytotalsize > this->nRasterYSize ) { nysize -= (nytotalsize - this->nRasterYSize); } this->m_pImageIO->readFromOverview( this->nBand, this->m_nOverviewIndex, pImage, this->nBlockXSize * nBlockXOff, this->nBlockYSize * nBlockYOff, nxsize, nysize, this->nBlockXSize, this->nBlockYSize, this->m_eKEADataType ); return CE_None; } catch (kealib::KEAIOException &e) { CPLError( CE_Failure, CPLE_AppDefined, "Failed to read file: %s", e.what() ); return CE_Failure; } } // overridden implementation - calls writeToOverview instead CPLErr KEAOverview::IWriteBlock( int nBlockXOff, int nBlockYOff, void * pImage ) { try { // GDAL deals in blocks - if we are at the end of a row // we need to adjust the amount written so we don't go over the edge int nxsize = this->nBlockXSize; int nxtotalsize = this->nBlockXSize * (nBlockXOff + 1); if( nxtotalsize > this->nRasterXSize ) { nxsize -= (nxtotalsize - this->nRasterXSize); } int nysize = this->nBlockYSize; int nytotalsize = this->nBlockYSize * (nBlockYOff + 1); if( nytotalsize > this->nRasterYSize ) { nysize -= (nytotalsize - this->nRasterYSize); } this->m_pImageIO->writeToOverview( this->nBand, this->m_nOverviewIndex, pImage, this->nBlockXSize * nBlockXOff, this->nBlockYSize * nBlockYOff, nxsize, nysize, this->nBlockXSize, this->nBlockYSize, this->m_eKEADataType ); return CE_None; } catch (kealib::KEAIOException &e) { CPLError( CE_Failure, CPLE_AppDefined, "Failed to write file: %s", e.what() ); return CE_Failure; } } GDALRasterAttributeTable *KEAOverview::GetDefaultRAT() { // KEARasterBand implements this, but we don't want to return nullptr; } CPLErr KEAOverview::SetDefaultRAT(CPL_UNUSED const GDALRasterAttributeTable *poRAT) { // KEARasterBand implements this, but we don't want to return CE_Failure; }
{ "pile_set_name": "Github" }
namespace Shapeshifter.WindowsDesktop.Services.Keyboard.Interfaces { using System.Threading.Tasks; using System.Windows.Input; public interface IKeyboardManager { bool IsKeyDown(Key key); Task SendKeysAsync(params Key[] keys); Task SendKeysAsync(params KeyOperation[] keyOperations); } }
{ "pile_set_name": "Github" }
///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_collpane.h // Purpose: XML resource handler for wxCollapsiblePane // Author: Francesco Montorsi // Created: 2006-10-27 // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_COLLPANE_H_ #define _WX_XH_COLLPANE_H_ #include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_COLLPANE class WXDLLIMPEXP_FWD_CORE wxCollapsiblePane; class WXDLLIMPEXP_XRC wxCollapsiblePaneXmlHandler : public wxXmlResourceHandler { public: wxCollapsiblePaneXmlHandler(); virtual wxObject *DoCreateResource() wxOVERRIDE; virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE; private: bool m_isInside; wxCollapsiblePane *m_collpane; wxDECLARE_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler); }; #endif // wxUSE_XRC && wxUSE_COLLPANE #endif // _WX_XH_COLLPANE_H_
{ "pile_set_name": "Github" }